/* ──────────────────────────────────────────────────────────────────────
   Adam BANLIAT — Photographie
   Direction visuelle : éditoriale, sobre, contraste fort sur typographie,
   espace généreux, textures ivoire & encre. Inspirations : Magnum,
   Lensculture, monographies imprimées.
   ────────────────────────────────────────────────────────────────────── */

:root {
    /* Palette Light : ivoire chaud, encre, accents discrets */
    --bg:            #f3f0e8;
    --bg-elevated:   #faf7ef;
    --surface:       #ffffff;
    --surface-2:     #efebe1;
    --text:          #14110f;
    --text-soft:     #3d3733;
    --muted:         #7a716a;
    --line:          #d8d2c4;
    --line-soft:     #e6e0d2;
    --accent:        #b94a3c;       /* terracotta — pour micro-détails */
    --accent-soft:   #d8a59c;

    --lb-bg:         rgba(20, 17, 15, 0.97);
    --lb-text:       #f4f1e9;
    --lb-muted:      rgba(244, 241, 233, 0.55);
    --lb-surface:    rgba(255, 255, 255, 0.08);
    --lb-surface-h:  rgba(255, 255, 255, 0.18);

    --shadow-sm: 0 2px 8px rgba(20, 17, 15, 0.05);
    --shadow-md: 0 12px 36px rgba(20, 17, 15, 0.10);
    --shadow-lg: 0 32px 80px rgba(20, 17, 15, 0.18);

    --font-display: 'Bebas Neue', 'Inter', sans-serif;
    --font-serif:   'Cormorant Garamond', 'EB Garamond', serif;
    --font-sans:    'Inter', 'Hind', system-ui, sans-serif;

    --container:    1400px;
    --container-md: 1100px;
    --radius-sm:    4px;
    --radius-md:    10px;
    --radius-lg:    18px;

    --ease:         cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast:       0.2s var(--ease);
    --t-base:       0.4s var(--ease);
    --t-slow:       0.7s var(--ease);

    --logo-img: url('/assets/logo-dark.png');
    --frame-img: url('/assets/cadre-light.png');
    --frame-img-anim: url('/assets/cadre-light.gif');
    --arrow-img: url('/assets/fleche-light.png');
}

[data-theme="dark"] {
    --bg:            #0e0c0b;
    --bg-elevated:   #161311;
    --surface:       #1a1614;
    --surface-2:     #221d1a;
    --text:          #f4f1e9;
    --text-soft:     #d6d0c4;
    --muted:         #8e857c;
    --line:          #2c2622;
    --line-soft:     #221d1a;
    --accent:        #e0735f;
    --accent-soft:   #7a3a30;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 36px 90px rgba(0, 0, 0, 0.7);

    --logo-img: url('/assets/logo-light.png');
    --frame-img: url('/assets/cadre-dark.png');
    --frame-img-anim: url('/assets/cadre-dark.gif');
    --arrow-img: url('/assets/fleche-dark.png');
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background var(--t-base), color var(--t-base);
    overflow-x: hidden;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ─── Texture de fond subtile ──────────────────────────────────────── */
body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(185, 74, 60, 0.04), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(185, 74, 60, 0.03), transparent 45%);
    opacity: 1;
}
[data-theme="dark"] body::before {
    background-image:
        radial-gradient(circle at 12% 18%, rgba(224, 115, 95, 0.07), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(224, 115, 95, 0.05), transparent 45%);
}

/* Grain léger (option premium) */
body::after {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.6;
    mix-blend-mode: multiply;
}
[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: 0.35; }

main, .navbar, footer { position: relative; z-index: 2; }

/* ─── Navigation ───────────────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 2rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--t-base), padding var(--t-base);
}
.navbar.scrolled { border-bottom-color: var(--line); padding-block: 0.85rem; }
.nav-inner {
    width: 100%; max-width: var(--container);
    margin: 0 auto;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.brand-logo {
    width: 56px; height: 56px;
    background: var(--logo-img) center/contain no-repeat;
    transition: transform var(--t-base);
    justify-self: start;
}
.brand-logo:hover { transform: scale(1.04); }
.nav-links { display: flex; gap: 2rem; justify-self: center; }
.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-soft);
    position: relative;
    padding: 0.4rem 0;
    transition: color var(--t-fast);
}
.nav-links a::after {
    content: ''; position: absolute; left: 50%; bottom: -2px;
    width: 0; height: 1px; background: var(--accent);
    transform: translateX(-50%);
    transition: width var(--t-base);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; gap: 0.5rem; align-items: center; justify-self: end; }
.icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text);
    transition: background var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); transform: scale(1.05); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon  { display: block; }

/* Menu mobile */
.nav-toggle { display: none; }
@media (max-width: 800px) {
    .nav-inner { grid-template-columns: auto 1fr auto; }
    .nav-links {
        position: fixed; inset: 64px 0 auto 0;
        flex-direction: column; gap: 0;
        background: var(--bg-elevated);
        padding: 1.5rem 2rem;
        border-bottom: 1px solid var(--line);
        transform: translateY(-110%);
        transition: transform var(--t-base);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links a { padding: 0.85rem 0; font-size: 0.95rem; letter-spacing: 0.12em; }
    .nav-toggle { display: inline-flex; }
}

/* ─── Layout ────────────────────────────────────────────────────────── */
main { display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem 6rem; }
.container.narrow { max-width: var(--container-md); }
@media (max-width: 700px) { .container { padding-inline: 1.25rem; } }

/* ─── Hero éditorial ───────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 4rem 0 5rem;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-text { position: relative; z-index: 2; }
.kicker {
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.kicker::before { content: ''; width: 36px; height: 1px; background: var(--accent); display: inline-block; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 7.5rem);
    line-height: 0.88;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 1.75rem;
    word-wrap: break-word;
}
.hero-title .lead-letter { color: var(--text); transition: color var(--t-base); }
.hero-title .em { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }

.hero-lead {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 1.4vw, 1.45rem);
    line-height: 1.55;
    color: var(--text-soft);
    max-width: 32rem;
    margin-bottom: 2rem;
}
.hero-meta {
    display: flex; gap: 2rem; flex-wrap: wrap;
    color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-meta strong { color: var(--text); font-weight: 600; }

.hero-feature {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
}
.hero-feature img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.6s var(--ease), filter var(--t-base);
}
.hero-feature:hover img { transform: scale(1.04); }
.hero-feature::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--frame-img) center/22% no-repeat;
    pointer-events: none; opacity: 0.85;
    transition: opacity var(--t-base), background-image 0s;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.hero-feature:hover::after,
.hero-feature:focus-within::after,
.hero-feature:active::after { background-image: var(--frame-img-anim); opacity: 1; }
.hero-feature-caption {
    position: absolute; left: 1.5rem; bottom: 1.25rem; right: 1.5rem;
    color: #fff;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    font-size: 1.1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.55);
    z-index: 2;
    display: flex; justify-content: space-between; align-items: end; gap: 1rem;
}
.hero-feature-caption .small {
    font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 0.22em; opacity: 0.85; text-transform: uppercase;
}

@media (max-width: 900px) {
    .hero { padding: 2rem 0 3rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-meta { gap: 1.25rem; font-size: 0.75rem; }
}

/* ─── Section heading ──────────────────────────────────────────────── */
.section {
    padding-block: 3rem;
    border-top: 1px solid var(--line);
}
.section-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.section-head .rule {
    height: 1px; background: var(--line); margin-bottom: 0.7rem;
}
.section-head p {
    font-family: var(--font-serif);
    font-size: 1rem; font-style: italic;
    color: var(--muted);
    text-align: right;
    max-width: 26rem;
    margin-left: auto;
}
@media (max-width: 700px) {
    .section-head { grid-template-columns: 1fr; gap: 0.75rem; }
    .section-head .rule { display: none; }
    .section-head p { text-align: left; max-width: none; }
}

/* ─── Albums grid (cartes éditoriales) ─────────────────────────────── */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4rem 2.5rem;
}
.album-card { display: block; cursor: pointer; }
.album-cover {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface-2);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}
.album-cover img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.1s var(--ease), filter var(--t-base);
}
.album-card:hover .album-cover img { transform: scale(1.06); filter: brightness(0.92); }

/* Cadre transparent par-dessus */
.album-cover::after {
    content: ''; position: absolute; inset: 0;
    background: var(--frame-img) center/30% no-repeat;
    pointer-events: none; opacity: 0.85;
    transition: opacity var(--t-base), transform var(--t-base);
    z-index: 4;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.4));
}
.album-card:hover .album-cover::after,
.album-card:focus-within .album-cover::after,
.album-card:active .album-cover::after { opacity: 1; transform: scale(1.05); background-image: var(--frame-img-anim); }

/* Petit numéro éditorial en haut à gauche */
.album-cover .index {
    position: absolute; top: 1rem; left: 1.1rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: #fff;
    background: rgba(20, 17, 15, 0.55);
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    backdrop-filter: blur(6px);
    z-index: 5;
}
.album-cover .count {
    position: absolute; bottom: 1rem; right: 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: #fff;
    background: rgba(20, 17, 15, 0.55);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    z-index: 5;
}

.album-meta { text-align: center; padding: 0 0.5rem; }
.album-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.06em;
    line-height: 1;
    margin-bottom: 0.45rem;
}
.album-desc {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 26rem; margin: 0 auto;
    line-height: 1.5;
}
.album-date {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.7rem; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--muted);
}

/* ─── Photos grid : justified-style masonry ───────────────────────── */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-auto-rows: 8px;
    gap: 12px;
}
.photo-item {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    cursor: zoom-in;
    border-radius: 2px;
    grid-row: span 30;
}
.photo-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.1s var(--ease), filter var(--t-base);
}
.photo-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.55) 100%);
    opacity: 0; transition: opacity var(--t-base);
    pointer-events: none;
}
.photo-item:hover img { transform: scale(1.05); }
.photo-item:hover::after { opacity: 1; }
.photo-item .caption {
    position: absolute; left: 1rem; bottom: 0.85rem; right: 1rem;
    color: #fff;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    font-size: 1rem;
    transform: translateY(8px);
    opacity: 0; transition: opacity var(--t-base), transform var(--t-base);
    z-index: 2;
}
.photo-item:hover .caption { transform: translateY(0); opacity: 1; }
.photo-item .caption-meta {
    display: block;
    font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    opacity: 0.8; margin-top: 0.2rem;
}

/* Tailles variables (effet justified) — assignées par JS via --span */
.photo-item[data-span] { grid-row: span var(--span); }

@media (max-width: 700px) {
    .photos-grid { grid-template-columns: 1fr 1fr; gap: 6px; grid-auto-rows: 6px; }
}

/* ─── Latest slider ────────────────────────────────────────────────── */
.slider-wrap { position: relative; }
.slider-track {
    display: flex; gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0 2rem;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide {
    flex: 0 0 280px;
    scroll-snap-align: start;
    cursor: pointer;
}
.slide-frame {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 2px;
    background: var(--surface-2);
    box-shadow: var(--shadow-sm);
}
.slide-frame img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.1s var(--ease);
}
.slide:hover .slide-frame img { transform: scale(1.06); }
.slide-frame::after {
    content: ''; position: absolute; inset: 0;
    background: var(--frame-img) center/35% no-repeat;
    pointer-events: none; opacity: 0.85;
    transition: opacity var(--t-base), transform var(--t-base);
    z-index: 3;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.slide:hover .slide-frame::after,
.slide:focus-within .slide-frame::after,
.slide:active .slide-frame::after { opacity: 1; transform: scale(1.06); background-image: var(--frame-img-anim); }

.slide-meta { padding: 0.85rem 0.25rem 0; }
.slide-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.1em;
}
.slide-album {
    font-family: var(--font-sans);
    font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted); margin-top: 0.25rem;
}

.slider-btn {
    position: absolute; top: 38%; transform: translateY(-50%);
    width: 48px; height: 48px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    z-index: 4;
    transition: transform var(--t-fast), background var(--t-fast);
}
.slider-btn:hover { background: var(--accent); color: #fff; transform: translateY(-50%) scale(1.05); border-color: var(--accent); }
.slider-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.slider-btn.prev { left: -22px; }
.slider-btn.next { right: -22px; }
@media (max-width: 700px) { .slider-btn { display: none; } }

/* ─── Toolbar (recherche + filtres + tri + vue) ────────────────────── */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    margin-bottom: 2.5rem;
}
.toolbar .search {
    position: relative; flex: 1 1 240px; max-width: 360px;
}
.toolbar .search input {
    width: 100%; padding: 0.65rem 0.9rem 0.65rem 2.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.92rem;
    transition: border-color var(--t-fast);
}
.toolbar .search input:focus { outline: 0; border-color: var(--accent); }
.toolbar .search svg {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2;
}
.toolbar .filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
    padding: 0.45rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8rem; letter-spacing: 0.06em;
    color: var(--text-soft);
    transition: all var(--t-fast);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.toolbar .right { display: flex; gap: 0.5rem; align-items: center; }
.toolbar select {
    padding: 0.55rem 2rem 0.55rem 0.85rem;
    background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 0.7rem center;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.8rem;
    appearance: none; -webkit-appearance: none;
}
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.view-toggle button { padding: 0.4rem 0.7rem; border-radius: 999px; transition: background var(--t-fast); }
.view-toggle button.active { background: var(--text); color: var(--bg); }
.view-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── Breadcrumbs ──────────────────────────────────────────────────── */
.breadcrumbs {
    margin-bottom: 2.5rem;
    font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--muted);
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.breadcrumbs a { transition: color var(--t-fast); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--line); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* ─── Album header ─────────────────────────────────────────────────── */
.album-hero {
    padding: 2rem 0 3rem;
}
.album-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.04em;
    line-height: 0.9;
    margin-bottom: 0.75rem;
}
.album-hero .em { font-family: var(--font-serif); font-style: italic; font-weight: 500; }
.album-hero .lead {
    font-family: var(--font-serif);
    font-size: 1.2rem; font-style: italic;
    color: var(--text-soft);
    max-width: 38rem; line-height: 1.55;
}
.album-hero .meta {
    margin-top: 1.5rem;
    display: flex; gap: 2rem; flex-wrap: wrap;
    font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--muted);
}

/* ─── Empty / loader ──────────────────────────────────────────────── */
.empty {
    text-align: center; padding: 5rem 1rem;
    color: var(--muted);
    font-family: var(--font-serif); font-style: italic;
    font-size: 1.15rem;
}

/* ─── LIGHTBOX ─────────────────────────────────────────────────────── */
.lb {
    position: fixed; inset: 0; z-index: 1000;
    display: none;
    background: var(--lb-bg);
    color: var(--lb-text);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.lb.open { display: block; animation: lbFadeIn 0.35s var(--ease); }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 5.5rem 5rem 6.5rem;
    overflow: hidden;
}
.lb-image-wrap {
    position: relative;
    max-width: 100%; max-height: 100%;
    cursor: grab;
    user-select: none; -webkit-user-select: none;
    touch-action: none;
    will-change: transform;
}
.lb-image-wrap.dragging { cursor: grabbing; }
.lb-image {
    max-width: min(80vw, 1600px);
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    transition: transform 0.35s var(--ease);
    will-change: transform;
    -webkit-user-drag: none;
}
.lb.zoomed .lb-image-wrap { cursor: zoom-out; }
.lb.zoomed .lb-image { transition: none; }
.lb-image.loading { opacity: 0; }

/* En-tête / pieds de la lightbox */
.lb-top, .lb-bottom {
    position: absolute; left: 0; right: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.2rem 1.6rem;
    pointer-events: none;
}
.lb-top { top: 0; background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent); }
.lb-bottom { bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent); }
.lb-top > *, .lb-bottom > * { pointer-events: auto; }

.lb-counter {
    font-family: var(--font-display);
    letter-spacing: 0.18em;
    font-size: 0.95rem;
    background: var(--lb-surface);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}
.lb-controls { display: flex; gap: 0.4rem; }
.lb-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--lb-surface);
    color: var(--lb-text);
    backdrop-filter: blur(10px);
    transition: background var(--t-fast), transform var(--t-fast);
}
.lb-btn:hover { background: var(--lb-surface-h); transform: scale(1.06); }
.lb-btn.active { background: var(--accent); }
.lb-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.lb-info {
    flex: 1;
    display: flex; flex-direction: column; gap: 0.2rem;
    color: var(--lb-text);
    font-family: var(--font-sans);
    pointer-events: auto;
    max-width: 60ch;
}
.lb-info .title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    line-height: 1;
}
.lb-info .desc { color: var(--lb-muted); font-size: 0.95rem; line-height: 1.55; margin-top: 0.4rem; font-family: var(--font-serif); font-style: italic; }
.lb-meta {
    display: flex; gap: 0.5rem; flex-wrap: wrap;
    margin-top: 0.65rem;
    font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.lb-tag {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: var(--lb-surface);
    border-radius: 999px;
    color: var(--lb-text);
}
.lb-tag svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Navigation gauche/droite */
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 56px; height: 56px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--lb-surface);
    color: var(--lb-text);
    z-index: 3;
    backdrop-filter: blur(10px);
    transition: background var(--t-fast), transform var(--t-fast);
}
.lb-nav:hover { background: var(--lb-surface-h); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }
.lb-nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Filmstrip miniatures */
.lb-filmstrip {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    padding: 0.85rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent 95%);
    transform: translateY(100%); transition: transform var(--t-base);
    pointer-events: none;
}
.lb.show-strip .lb-filmstrip { transform: translateY(0); pointer-events: auto; }
.lb-filmstrip-track {
    display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.3rem;
    scrollbar-width: thin;
}
.lb-thumb {
    flex: 0 0 64px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity var(--t-fast), transform var(--t-fast), outline-color var(--t-fast);
    outline: 2px solid transparent;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.lb-thumb.active { opacity: 1; outline-color: var(--accent); }

/* Slideshow indicator */
.lb-progress {
    position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: rgba(255,255,255,0.1); z-index: 4;
}
.lb-progress span {
    display: block; height: 100%; background: var(--accent); width: 0%;
    transition: width 0.1s linear;
}

/* Mobile lightbox */
@media (max-width: 800px) {
    .lb-stage { padding: 4.5rem 1rem 5rem; }
    .lb-image { max-width: 100vw; max-height: 70vh; }
    .lb-prev { left: 0.4rem; }
    .lb-next { right: 0.4rem; }
    .lb-nav { width: 44px; height: 44px; }
    .lb-info .title { font-size: 1.05rem; }
    .lb-meta { font-size: 0.65rem; }
    .lb-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.8rem 1rem 1.1rem; }
}

/* ─── Footer ───────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--line);
    padding: 4rem 2rem 3rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}
footer .foot-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 2rem;
}
footer .signature {
    font-family: var(--font-display);
    font-size: 1.4rem; letter-spacing: 0.18em;
    color: var(--text);
}
footer .links { display: flex; gap: 1.25rem; justify-content: flex-end; }
footer a { transition: color var(--t-fast); }
footer a:hover { color: var(--text); }
@media (max-width: 700px) {
    footer .foot-grid { grid-template-columns: 1fr; text-align: center; }
    footer .links { justify-content: center; }
}

/* ─── Page À propos / Contact ─────────────────────────────────────── */
.page {
    padding: 4rem 0;
    max-width: 60rem; margin: 0 auto;
}
.page h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
    line-height: 0.95;
}
.page p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-soft);
    margin-bottom: 1.25rem;
}

/* ─── Animations & utilitaires ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ─── Anti-vol & no-drag ──────────────────────────────────────────── */
img { -webkit-user-drag: none; user-drag: none; }
.no-select { user-select: none; -webkit-user-select: none; }

/* Désactivation du long-press menu sur images mobiles */
@media (pointer: coarse) {
    .photo-item img, .album-cover img, .lb-image, .slide-frame img {
        -webkit-touch-callout: none;
    }
}
