/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    --bg:           #FAFAF8;
    --bg-alt:       #F4F1EC;
    --text:         #1A1A1A;
    --text-muted:   #6B6560;
    --accent:       #7C5C3E;
    --accent-h:     #5E4530;
    --accent-light: #D4B896;
    --border:       #E5DDD4;
    --white:        #FFFFFF;
    --serif:        'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:         'Inter', system-ui, -apple-system, sans-serif;
    --nav-h:        68px;
    --max:          1200px;
    --r:            3px;
    --shadow:       0 2px 16px rgba(0,0,0,0.07);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(250,250,248,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: box-shadow .3s;
}
.site-nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
    max-width: var(--max); margin: 0 auto; padding: 0 2rem;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-family: var(--serif); font-size: 1.2rem;
    letter-spacing: .03em; color: var(--text);
    display: flex; align-items: center;
}
.nav-logo-text { line-height: 1; }
.nav-logo-img  { height: 38px; width: auto; display: block; }

/* logo noir sur fond clair (nav), logo blanc masqué */
.nav-logo-light { display: none; }
.nav-logo-dark  { display: block; }

/* ── Hero logo ───────────────────────────────────────────────────────────── */
.hero-logo { height: 80px; width: auto; margin: 0 auto 1.75rem; display: block; }
.nav-links {
    display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
    font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
    display: block; width: 22px; height: 1.5px;
    background: var(--text); transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: #2a2420 center/cover no-repeat;
    background-attachment: fixed;
    position: relative; text-align: center;
    padding-top: var(--nav-h);
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.45) 100%);
}
.hero-content {
    position: relative; z-index: 1;
    color: var(--white); padding: 2rem; max-width: 840px;
}
.hero-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 400; letter-spacing: .04em;
    line-height: 1.15; margin-bottom: .6rem;
}
.hero-subtitle {
    font-size: clamp(.85rem, 2vw, 1.05rem);
    letter-spacing: .25em; text-transform: uppercase;
    opacity: .75; font-weight: 300; margin-bottom: 3rem;
}
.hero-cta {
    display: inline-flex; flex-direction: column; align-items: center; gap: .5rem;
    color: rgba(255,255,255,.65); font-size: .7rem; letter-spacing: .15em;
    text-transform: uppercase; background: none; border: none;
    cursor: pointer; animation: bounce 2.4s ease-in-out infinite; color: rgba(255,255,255,.7);
}
.hero-cta svg { width: 22px; height: 22px; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(7px)} }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding: 5.5rem 2rem; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-title {
    font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 400; text-align: center; margin-bottom: 1rem;
}
.section-rule {
    width: 48px; height: 2px; background: var(--accent);
    margin: 0 auto 3.5rem; border: none;
}

/* ── About ──────────────────────────────────────────────────────────────── */
#about { background: var(--bg-alt); }
.about-text {
    max-width: 680px; margin: 0 auto;
    text-align: center; font-size: 1.05rem;
    line-height: 1.9; color: var(--text-muted);
}

/* ── Gallery ────────────────────────────────────────────────────────────── */
#gallery { background: var(--bg); }
.category-filters {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .625rem; margin-bottom: 3rem;
}
.filter-btn {
    padding: .45rem 1.2rem;
    border: 1px solid var(--border); border-radius: 2rem;
    background: none; font-size: .75rem; letter-spacing: .07em;
    color: var(--text-muted); cursor: pointer;
    text-transform: uppercase; transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent); border-color: var(--accent); color: var(--white);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.gallery-item {
    position: relative; overflow: hidden;
    background: var(--bg-alt); border-radius: var(--r);
    cursor: pointer; aspect-ratio: 4/3;
    transition: box-shadow .3s;
}
.gallery-item:hover { box-shadow: var(--shadow); }
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .55s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
    opacity: 0; transition: opacity .3s;
    display: flex; align-items: flex-end; padding: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item-title {
    color: var(--white); font-family: var(--serif);
    font-size: .95rem; line-height: 1.3;
}
.gallery-empty {
    grid-column: 1/-1; text-align: center; padding: 5rem 2rem;
    color: var(--text-muted); font-style: italic; font-size: 1.05rem;
}

/* ── Gallery sections (groupement par catégorie) ─────────────────────────── */
.gallery-sections { display: flex; flex-direction: column; gap: 3.5rem; }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-cat-title {
    font-family: var(--serif); font-size: 1.15rem; font-weight: 400;
    color: var(--text-muted); letter-spacing: .04em;
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.25rem;
}
.gallery-cat-title::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(10,8,6,.93);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-close {
    position: fixed; top: 1.25rem; right: 1.5rem;
    background: none; border: none; color: rgba(255,255,255,.7);
    font-size: 2.2rem; cursor: pointer; line-height: 1;
    transition: color .2s; z-index: 301;
}
.lightbox-close:hover { color: white; }
.lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--r); color: white; font-size: 2rem;
    padding: 1.1rem .85rem; cursor: pointer; transition: background .2s;
    z-index: 301;
}
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lightbox-body {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    max-width: 90vw; max-height: 90vh;
}
.lightbox-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: var(--r); }
.lightbox-caption { color: rgba(255,255,255,.6); font-family: var(--serif); font-size: 1rem; }
.lightbox-link {
    font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.45); border-bottom: 1px solid rgba(255,255,255,.2);
    padding-bottom: 1px; transition: color .2s;
}
.lightbox-link:hover { color: rgba(255,255,255,.8); }

/* ── Contact ────────────────────────────────────────────────────────────── */
#contact { background: var(--bg-alt); text-align: center; }
.contact-sub { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.05rem; }

/* ── Button ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block; padding: .875rem 2.5rem;
    background: var(--accent); color: var(--white);
    border: 1px solid var(--accent); border-radius: var(--r);
    font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
    cursor: pointer; transition: background .2s, transform .15s;
}
.btn:hover { background: var(--accent-h); border-color: var(--accent-h); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    padding: 2.5rem 2rem; text-align: center;
    border-top: 1px solid var(--border); background: var(--bg);
}
.footer-inner { display: flex; flex-direction: column; gap: .4rem; }
.footer-name { font-family: var(--serif); font-size: 1rem; }
.site-footer a { color: var(--accent); }
.site-footer a:hover { text-decoration: underline; }
.footer-copy { font-size: .8rem; color: var(--text-muted); }

/* ── Artwork page ───────────────────────────────────────────────────────── */
.artwork-page {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 3.5rem) 2rem 5rem;
}
.artwork-inner { max-width: 980px; margin: 0 auto; }
.artwork-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: start; }
.artwork-img-wrap { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.artwork-img-wrap img { width: 100%; }
.artwork-meta { padding-top: .5rem; }
.artwork-cat {
    font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: .75rem;
}
.artwork-title {
    font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 400; line-height: 1.3; margin-bottom: 1.25rem;
}
.artwork-desc { color: var(--text-muted); line-height: 1.85; margin-bottom: 1.5rem; }
.artwork-technique { font-size: .875rem; color: var(--text-muted); font-style: italic; margin-bottom: 1.5rem; }
.artwork-price { font-family: var(--serif); font-size: 1.7rem; margin-bottom: 2rem; }
.artwork-back {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; letter-spacing: .06em; color: var(--text-muted);
    transition: color .2s; text-transform: uppercase;
}
.artwork-back:hover { color: var(--accent); }
.artwork-back svg { width: 15px; height: 15px; }
.artwork-not-for-sale {
    display: inline-block; padding: .4rem 1rem;
    border: 1px solid var(--border); border-radius: 2rem;
    font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 2rem;
}

/* ── Scroll-to-top ──────────────────────────────────────────────────────── */
#scroll-top {
    position: fixed; bottom: 2rem; right: 2rem;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: white;
    border: none; cursor: pointer; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
#scroll-top.show { opacity: 1; pointer-events: all; }
#scroll-top:hover { transform: scale(1.1); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .artwork-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 600px) {
    .nav-links {
        display: none; position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        background: var(--bg); flex-direction: column;
        padding: 1.5rem 2rem; gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .gallery-grid { grid-template-columns: 1fr; gap: 1rem; }
    section { padding: 3.5rem 1.25rem; }
    .section-rule { margin-bottom: 2.5rem; }
    .hero { background-attachment: scroll; }
}
