:root {
    --navy: #2c3e50;
    --navy-light: #34495e;
    --gold: #E4B271;
    --gold-dark: #DAA520;
    --green: #046937;
    --cream: #fffffd;
    --cream-alt: #faf7f0;
    --white: #ffffff;
    --text: #1e293b;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--text);
}

/* =========================
   HEADER
========================= */

header {
    height: 82px;
    background-color:white;
    border-bottom: 4px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 25px rgba(0, 0, 0, .15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo img {
    width: 105px;
    height: auto;
}



nav {
    display: flex;
    gap: 34px;
    align-items: center;
}

nav a {
    color: black;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: .3s;
}

nav a:hover,
nav a.active {
    color: var(--gold);
}

.search-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    cursor: pointer;
    background: transparent;
    font-size: 16px;
    padding: 0;
}

.search-btn:hover {
    background: rgba(228, 178, 113, .12);
}

/* =========================
   SEARCH OVERLAY
========================= */

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 34, 43, .96);
    z-index: 6000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px;
}

.search-overlay.active {
    display: flex;
}

.search-box {
    width: 100%;
    max-width: 640px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 18px 24px;
    border-radius: 50px;
    border: 2px solid var(--gold);
    background: white;
    font-family: inherit;
    font-size: 17px;
    color: var(--navy);
    outline: none;
}

.search-box button {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box .search-submit {
    background: var(--gold);
    color: var(--navy);
}

.search-box .search-submit:hover {
    background: var(--gold-dark);
}

.search-box .search-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .4);
    color: white;
}

.search-box .search-close:hover {
    background: rgba(255, 255, 255, .1);
}

.search-results-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: -10px auto 30px;
    font-size: 13px;
    color: var(--gray);
}

.search-results-bar a {
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.search-results-bar a:hover {
    text-decoration: underline;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    padding: 75px 20px 35px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(228, 178, 113, .1);
    right: -150px;
    top: -100px;
}

.camera-icon {
    color: var(--gold);
    font-size: 34px;
    margin-bottom: 12px;
}

.hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(55px, 8vw, 90px);
    font-weight: 600;
    color: var(--navy);
    line-height: .9;
}

.hero h1 span {
    color: var(--gold-dark);
}

.gold-line {
    width: 120px;
    height: 2px;
    background: var(--gold);
    margin: 25px auto 15px;
    position: relative;
}

.gold-line::after {
    content: "◆";
    position: absolute;
    left: 50%;
    top: -9px;
    transform: translateX(-50%);
    background: var(--cream);
    padding: 0 8px;
    color: var(--gold);
    font-size: 11px;
}

.hero p {
    font-size: 16px;
    color: var(--text);
}

/* =========================
   BACK LINK (album pages)
========================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    margin: 25px 0 0 5%;
    transition: .3s;
}

.back-link:hover {
    color: var(--gold-dark);
    transform: translateX(-3px);
}

/* =========================
   FILTERS
========================= */

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px auto 15px;
    padding: 0 20px;
}

.filters-year {
    margin: 0 auto 40px;
}

.filter-btn {
    border: none;
    background: white;
    padding: 14px 25px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--navy);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .06);
    transition: .3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--green);
    color: white;
    transform: translateY(-2px);
}

.filters-year .filter-btn {
    padding: 9px 20px;
    font-size: 12px;
}

.filters-year .filter-btn:hover,
.filters-year .filter-btn.active {
    background: var(--gold);
    color: var(--navy);
}

/* =========================
   GALLERY (homepage masonry)
========================= */

.gallery {
    width: min(1400px, 92%);
    margin: auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 190px;
    gap: 14px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    min-height: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery > .gallery-item:nth-child(1) {
    grid-column: span 7;
    grid-row: span 3;
}

.gallery > .gallery-item:nth-child(2),
.gallery > .gallery-item:nth-child(3) {
    grid-column: span 5;
    grid-row: span 1.5;
}

.gallery > .gallery-item:nth-child(4),
.gallery > .gallery-item:nth-child(5),
.gallery > .gallery-item:nth-child(6) {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery > .gallery-item:nth-child(7),
.gallery > .gallery-item:nth-child(8),
.gallery > .gallery-item:nth-child(9),
.gallery > .gallery-item:nth-child(10),
.gallery > .gallery-item:nth-child(11) {
    grid-column: span 2.4;
    grid-row: span 1;
}

.gallery > .gallery-item:nth-child(n+12) {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Overlay */

.overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top,
            rgba(44, 62, 80, .93),
            rgba(44, 62, 80, .05) 65%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: white;
    opacity: 0;
    transition: .4s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.category {
    color: var(--gold);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 7px;
}

.overlay h3 {
    font-family: 'Lora', serif;
    font-size: 28px;
    margin-bottom: 6px;
}

.overlay p {
    font-size: 11px;
    opacity: .85;
}

.arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

/* =========================
   FEATURED
========================= */

.featured .overlay {
    opacity: 1;
}

.featured::after {
    content: "À LA UNE";
    position: absolute;
    top: 22px;
    left: 22px;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 10px;
    letter-spacing: 2px;
    background: rgba(44, 62, 80, .55);
    z-index: 1;
}

.featured-title {
    font-family: 'Lora', serif;
    font-size: clamp(35px, 4vw, 58px) !important;
    max-width: 500px;
}

/* =========================
   ALBUM GRID (category page)
========================= */

.album-grid {
    width: min(1400px, 92%);
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 240px;
    gap: 18px;
}

/* =========================
   STATISTICS
========================= */

.stats {
    margin-top: 70px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    padding: 55px 6%;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    align-items: center;
    gap: 30px;
}

.stat-intro {
    border-right: 1px solid rgba(255, 255, 255, .2);
    padding-right: 30px;
}

.stat-intro h2 {
    font-family: 'Lora', serif;
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 8px;
}

.stat-intro p {
    font-size: 12px;
    line-height: 1.7;
    opacity: .8;
}

.stat {
    text-align: center;
}

.stat .number {
    display: block;
    font-family: 'Lora', serif;
    font-size: 38px;
    color: var(--gold);
}

.stat small {
    font-size: 11px;
    opacity: .8;
}

.view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
    padding: 17px 28px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    transition: .3s;
}

.view-all:hover {
    transform: translateY(-3px);
    background: white;
}

/* =========================
   FOOTER
========================= */

footer {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    padding: 55px 6%;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
}

.footer-logo {
    font-family: 'Lora', serif;
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 10px;
}

footer p {
    font-size: 12px;
    line-height: 1.8;
    opacity: .75;
}

footer h3 {
    color: var(--gold);
    font-size: 14px;
    margin-bottom: 18px;
}

footer ul {
    list-style: none;
}

footer li {
    margin-bottom: 9px;
    font-size: 12px;
    opacity: .75;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 45px;
    padding-top: 20px;
    font-size: 10px;
    opacity: .5;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(26, 34, 43, .96);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 1000px;
    width: 100%;
    height: 100%;
    position: relative;
}

/* =========================
   ALBUM (page recto/verso qui se retourne)
========================= */

.scene {
    width: 100%;
    max-width: 950px;
    height: 100%;
    margin: 0 auto;
    perspective: 2200px;
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.page {
    cursor: pointer;
    position: absolute;
    inset: 0;
    transition: transform 1s cubic-bezier(.4, .1, .2, 1);
    transform-style: preserve-3d;
    transform-origin: left center;
    z-index: 0;
}

.page.flipped {
    transform: rotateY(-180deg);
    z-index: 1;
}

.page.active {
    z-index: 2;
}

.front,
.back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.back {
    transform: rotateY(180deg);
}

.book-face {
    width: 100%;
    height: 100%;
    position: relative;
    background: #12181f;
}

.book-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
    color: white;
}

.page-caption h3 {
    font-family: 'Lora', serif;
    font-size: 17px;
    color: var(--gold);
    margin-bottom: 2px;
}

.page-caption span {
    font-size: 11px;
    opacity: .8;
}

.book-face.book-cover {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 30px;
}

.book-face.book-cover img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gold);
    padding: 6px;
    margin-bottom: 22px;
}

.book-cover-label {
    font-size: 11px;
    opacity: .75;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.book-face.book-cover h2 {
    font-family: 'Lora', serif;
    font-size: 30px;
    color: var(--gold);
}

.book-face.book-blank {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.close {
    position: fixed;
    top: 25px;
    right: 30px;
    width: 45px;
    height: 45px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    cursor: pointer;
}

.lightbox-info {
    text-align: center;
    color: white;
    margin-top: 15px;
}

.lightbox-info h2 {
    font-family: 'Lora', serif;
    font-size: 32px;
    color: var(--gold);
}

.lightbox-info p {
    font-size: 12px;
    opacity: .7;
}

.lightbox-nav {
    position: fixed;
    left: 25px;
    right: 25px;
    top: 50%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-nav button {
    pointer-events: auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: var(--navy);
    color: var(--gold);
    font-size: 20px;
    cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width: 1000px) {

    nav {
        display: none;
    }

    .gallery {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery > .gallery-item:nth-child(n) {
        grid-column: span 3;
        grid-row: span 2;
    }

    .gallery > .gallery-item:nth-child(1) {
        grid-column: span 6;
        grid-row: span 3;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-intro {
        grid-column: span 2;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .2);
        padding-bottom: 25px;
    }

    .stats .view-all {
        grid-column: span 2;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width: 600px) {

    header {
        height: 70px;
    }

    .logo img {
        width: 43px;
        height: 43px;
    }

    .logo-text strong {
        font-size: 25px;
    }

    .hero {
        padding-top: 55px;
    }

    .hero h1 {
        font-size: 55px;
    }

    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .gallery {
        width: 94%;
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
    }

    .gallery > .gallery-item:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery > .gallery-item:nth-child(1) {
        grid-row: span 2;
    }

    .album-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        padding: 45px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .overlay {
        opacity: 1;
    }

}
