/* ==========================================================================
   Ethylique — theme « chambre noire »
   Noir d'encre, texte couleur papier photo, accent rouge de lampe inactinique.
   Tout le theme passe par les variables ci-dessous.
   ========================================================================== */

:root {
    --ink: #09090a;
    --ink-2: #111113;
    --ink-3: #18181b;
    --line: #26262b;
    --line-strong: #3a3a40;
    --paper: #ebe6dc;
    --paper-dim: #c9c3b7;
    --muted: #8f8a80;
    --safelight: #e8442e;
    --safelight-soft: rgba(232, 68, 46, 0.14);
    --ok: #7fb685;

    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --gutter: clamp(16px, 4vw, 48px);
    --container: 1320px;
    --radius: 2px;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --header-h: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--ink);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 4px;
    transition: color .2s, text-decoration-color .2s;
}

a:hover {
    color: #fff;
    text-decoration-color: var(--safelight);
}

:focus-visible {
    outline: 1px solid var(--safelight);
    outline-offset: 3px;
}

::selection {
    background: var(--safelight);
    color: #fff;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 .4em;
}

h1 { font-size: clamp(44px, 7vw, 96px); }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }

em, .italic {
    font-style: italic;
}

p {
    margin: 0 0 1em;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Seulement le haut et le bas : la marge laterale de .container doit rester. */
.section {
    padding-top: clamp(64px, 10vw, 140px);
    padding-bottom: clamp(64px, 10vw, 140px);
}

/* Etiquette technique en mono, facon bord de pellicule */
.label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

.label--red {
    color: var(--safelight);
}

.lead {
    font-size: clamp(18px, 1.6vw, 21px);
    color: var(--paper-dim);
    max-width: 62ch;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 1000;
    background: var(--paper);
    color: var(--ink);
    padding: 8px 14px;
}

.skip-link:focus {
    left: 8px;
}

[hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Grain de pellicule + vignettage (twist artistique, desactivable par
   prefers-reduced-motion pour l'animation)
   -------------------------------------------------------------------------- */

body::after {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 900;
    pointer-events: none;
    opacity: .07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 899;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-5%, 3%); }
    40% { transform: translate(4%, -6%); }
    60% { transform: translate(-3%, 7%); }
    80% { transform: translate(6%, 2%); }
    100% { transform: translate(-2%, -4%); }
}

/* --------------------------------------------------------------------------
   En-tete et pied de page
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background .4s, backdrop-filter .4s;
}

.site-header.is-scrolled {
    background: rgba(9, 9, 10, .78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .42em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper);
}

/* Petite lampe rouge allumee : « chambre noire en service » */
.logo__lamp {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--safelight);
    box-shadow: 0 0 10px 2px rgba(232, 68, 46, .6);
    animation: lamp 4s ease-in-out infinite;
}

@keyframes lamp {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.6vw, 40px);
}

.main-nav a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper-dim);
    position: relative;
    padding: 6px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--safelight);
    transition: right .35s var(--ease);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--paper);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
    right: 0;
}

.main-nav .nav-guest {
    color: var(--muted);
    border: 1px solid var(--line-strong);
    padding: 6px 12px;
}

.main-nav .nav-guest::after {
    display: none;
}

.main-nav .nav-guest:hover {
    border-color: var(--safelight);
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--paper);
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    margin: 6px auto;
    background: currentColor;
    transition: transform .3s;
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
        position: relative;
        z-index: 2;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        background: var(--ink);
        opacity: 0;
        visibility: hidden;
        transition: opacity .35s, visibility .35s;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
    }

    .main-nav a {
        font-family: var(--font-display);
        font-size: 34px;
        letter-spacing: 0;
        text-transform: none;
        font-style: italic;
    }

    .main-nav .nav-guest {
        font-family: var(--font-mono);
        font-size: 12px;
        font-style: normal;
        letter-spacing: .2em;
        text-transform: uppercase;
    }
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 40px;
    margin-top: 40px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.site-footer__tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 26px;
    color: var(--paper-dim);
    max-width: 22ch;
    margin-top: 16px;
}

.site-footer ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.site-footer li {
    margin: 6px 0;
}

.site-footer li a {
    text-decoration: none;
    color: var(--paper-dim);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.safelight-toggle {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.safelight-toggle::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--safelight);
}

html.safelight-on .safelight-toggle::before {
    background: var(--safelight);
}

@media (max-width: 720px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__grid > :first-child {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Boutons, formulaires
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 24px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .25s, background .25s, color .25s;
}

.btn:hover {
    border-color: var(--safelight);
    color: #fff;
}

.btn--primary {
    background: var(--safelight);
    border-color: var(--safelight);
    color: #fff;
}

.btn--primary:hover {
    background: #ff5a42;
    border-color: #ff5a42;
}

.btn--ghost {
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.btn[disabled] {
    opacity: .5;
    cursor: wait;
}

.arrow-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper-dim);
}

.arrow-link::after {
    content: ' →';
    transition: margin .3s var(--ease);
}

.arrow-link:hover::after {
    margin-left: 6px;
}

.form {
    display: grid;
    gap: 22px;
    max-width: 640px;
}

.form label {
    display: grid;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
}

.form input,
.form textarea,
.form select {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    padding: 10px 0;
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 17px;
    letter-spacing: 0;
    text-transform: none;
    transition: border-color .25s;
}

.form textarea {
    min-height: 150px;
    resize: vertical;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    outline: none;
    border-bottom-color: var(--safelight);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Pot de miel anti-spam : invisible pour un humain */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Revelateur : les images « se developpent » en entrant dans l'ecran,
   comme un tirage dans le bac de revelateur.
   -------------------------------------------------------------------------- */

.develop {
    opacity: 0;
    filter: grayscale(1) sepia(.5) brightness(2.6) contrast(.3) blur(8px);
    transform: scale(1.015);
    transition: opacity 1.1s var(--ease), filter 2.2s var(--ease), transform 2.2s var(--ease);
}

.develop.is-developed {
    opacity: 1;
    filter: none;
    transform: none;
}

/* --------------------------------------------------------------------------
   Accueil : lampe de chambre noire (la lumiere suit le curseur)
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    background: var(--ink);
    --x: 50%;
    --y: 50%;
    --r: clamp(180px, 26vw, 420px);
}

.hero__frame {
    position: absolute;
    inset: 0;
}

.hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 2.4s var(--ease), transform 9s linear;
}

.hero__img.is-active {
    opacity: 1;
    transform: scale(1);
}

/* Le voile noir est perce par un cercle de lumiere a la position du curseur */
.hero__dark {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 6, .93);
    -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0%, transparent 35%, #000 100%);
    mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0%, transparent 35%, #000 100%);
    transition: opacity 1.6s var(--ease);
}

.hero.is-exposed .hero__dark {
    opacity: .25;
}

/* Lueur rouge de la lampe inactinique autour du faisceau */
.hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle calc(var(--r) * 1.4) at var(--x) var(--y), rgba(232, 68, 46, .10), transparent 70%);
    mix-blend-mode: screen;
}

.hero__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(32px, 8vh, 88px);
    z-index: 2;
    pointer-events: none;
}

.hero__title {
    font-size: clamp(64px, 14vw, 220px);
    font-style: italic;
    line-height: .85;
    margin: 0;
    letter-spacing: -0.03em;
    mix-blend-mode: difference;
    color: var(--paper);
}

.hero__tagline {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--paper-dim);
    margin-top: 18px;
}

.hero__meta {
    position: absolute;
    top: calc(var(--header-h) + 12px);
    right: var(--gutter);
    z-index: 2;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--muted);
    line-height: 1.9;
}

.hero__hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    transition: opacity .8s;
}

.hero.has-moved .hero__hint {
    opacity: 0;
}

.hero__scroll {
    position: absolute;
    right: var(--gutter);
    bottom: clamp(32px, 8vh, 88px);
    z-index: 2;
    writing-mode: vertical-rl;
}

.hero--empty .hero__dark {
    -webkit-mask-image: none;
    mask-image: none;
}

/* --------------------------------------------------------------------------
   Introduction, index des galeries (accueil + page Galeries)
   -------------------------------------------------------------------------- */

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(24px, 6vw, 96px);
    align-items: start;
}

.intro__text {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 44px);
    line-height: 1.2;
    color: var(--paper);
}

@media (max-width: 820px) {
    .intro {
        grid-template-columns: 1fr;
    }
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: clamp(28px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.section-head h2 {
    margin: 6px 0 0;
}

/* Liste editoriale : numero, titre, apercu flottant au survol */
.gallery-index {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: gal;
}

.gallery-index__item {
    border-bottom: 1px solid var(--line);
}

.gallery-index__link {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: clamp(18px, 2.6vw, 34px) 0;
    text-decoration: none;
    position: relative;
}

.gallery-index__num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.gallery-index__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5.4vw, 76px);
    line-height: 1;
    transition: transform .5s var(--ease), color .3s;
}

.gallery-index__sub {
    display: block;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--muted);
    margin-top: 8px;
}

.gallery-index__count {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    color: var(--muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.gallery-index__link:hover .gallery-index__title {
    transform: translateX(18px);
    font-style: italic;
}

.gallery-index__link:hover .gallery-index__num {
    color: var(--safelight);
}

.gallery-index__thumb {
    display: none;
}

/* Apercu qui suit le curseur (cree par JS, ordinateur seulement) */
.float-preview {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    width: clamp(220px, 22vw, 340px);
    aspect-ratio: 4 / 5;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.92);
    transition: opacity .35s, transform .5s var(--ease);
    overflow: hidden;
}

.float-preview.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.float-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (hover: none), (max-width: 820px) {
    .gallery-index__link {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-index__num,
    .gallery-index__count {
        display: none;
    }

    .gallery-index__thumb {
        display: block;
        aspect-ratio: 3 / 2;
        overflow: hidden;
        background: var(--ink-2);
    }

    .gallery-index__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .float-preview {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Page de galerie
   -------------------------------------------------------------------------- */

.page-head {
    padding-top: calc(var(--header-h) + clamp(48px, 9vw, 120px));
    padding-bottom: clamp(32px, 5vw, 64px);
}

.page-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-bottom: 18px;
}

.gallery-head {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(24px, 5vw, 80px);
    align-items: end;
}

.gallery-head__desc {
    color: var(--paper-dim);
}

@media (max-width: 820px) {
    .gallery-head {
        grid-template-columns: 1fr;
    }
}

.gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    margin-bottom: 28px;
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    background: rgba(9, 9, 10, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.view-switch {
    display: inline-flex;
    gap: 4px;
}

.view-switch button {
    background: none;
    border: 1px solid transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
}

.view-switch button[aria-pressed="true"] {
    color: var(--paper);
    border-color: var(--line-strong);
}

.guest-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}

.guest-bar strong {
    color: var(--paper);
    font-weight: 500;
}

/* Mur justifie : chaque tuile garde son ratio, les rangees remplissent la largeur */
.wall {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 14px);
    --row: clamp(200px, 26vw, 360px);
}

.wall::after {
    content: '';
    flex-grow: 999;
}

.tile {
    position: relative;
    margin: 0;
    flex-grow: var(--ratio);
    flex-basis: calc(var(--row) * var(--ratio));
    background: var(--ink-2);
    overflow: hidden;
    cursor: zoom-in;
}

.tile::before {
    content: '';
    display: block;
    padding-bottom: calc(100% / var(--ratio));
}

.tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile__veil {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 14px;
    background: linear-gradient(transparent 55%, rgba(0, 0, 0, .65));
    opacity: 0;
    transition: opacity .35s;
}

.tile:hover .tile__veil,
.tile:focus-visible .tile__veil {
    opacity: 1;
}

.tile__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(235, 230, 220, .7);
    border-radius: 50%;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.tile__play::before {
    content: '';
    margin-left: 4px;
    border-left: 14px solid var(--paper);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

@media (max-width: 560px) {
    .wall {
        --row: 150px;
    }
}

/* Planche contact : bande de film, numeros d'image, perforations */
.contact-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    background: #0d0c0b;
    border: 1px solid var(--line);
    padding: 26px 18px;
    gap: 26px 10px;
    position: relative;
}

.frame {
    position: relative;
    margin: 0;
    padding: 18px 8px 26px;
    background:
        radial-gradient(circle at 50% 50%, #0d0c0b 2.5px, transparent 3px) 0 3px / 14px 12px repeat-x,
        radial-gradient(circle at 50% 50%, #0d0c0b 2.5px, transparent 3px) 0 calc(100% - 3px) / 14px 12px repeat-x,
        #2a1d12;
    cursor: zoom-in;
}

.frame__img {
    aspect-ratio: 3 / 2;
    background: #000;
    overflow: hidden;
}

.frame__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: none !important;
}

.frame__num {
    position: absolute;
    left: 10px;
    bottom: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #e2a33a;
    letter-spacing: .1em;
}

.frame__brand {
    position: absolute;
    right: 10px;
    bottom: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: #e2a33a;
    opacity: .7;
    letter-spacing: .14em;
}

/* Marque au crayon gras rouge sur les images choisies par l'invite */
.grease-slot {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.grease-mark {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.grease-mark path {
    fill: none;
    stroke: var(--safelight);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    filter: url(#grease);
    opacity: .92;
    animation: draw .9s var(--ease) forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.fav-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(235, 230, 220, .5);
    background: rgba(0, 0, 0, .45);
    color: var(--paper);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transition: opacity .25s, background .25s;
}

.tile:hover .fav-dot,
.frame:hover .fav-dot,
.fav-dot:focus-visible,
.is-favorite .fav-dot {
    opacity: 1;
}

.is-favorite .fav-dot {
    background: var(--safelight);
    border-color: var(--safelight);
}

@media (hover: none) {
    .fav-dot {
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   Visionneuse plein ecran
   -------------------------------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 800;
    background: #050506;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    opacity: 0;
    transition: opacity .35s;
    --ambient: #000;
}

.lightbox.is-open {
    opacity: 1;
}

/* Lueur ambiante : la couleur dominante de l'image deborde dans le noir */
.lightbox::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(ellipse at center, var(--ambient) 0%, transparent 62%);
    opacity: .28;
    filter: blur(40px);
    transition: background 1.2s;
    pointer-events: none;
}

/* Au-dessus des zones « precedente / suivante », qui occupent toute la hauteur :
   sinon le bouton Fermer recevait le clic de la zone « suivante ». */
.lightbox__top,
.lightbox__bottom {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px var(--gutter);
}

.lightbox__stage {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 0 clamp(8px, 6vw, 96px);
    min-height: 0;
    touch-action: pan-y;
}

.lightbox__stage video {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

/* L'image remplit la scene, mais n'est jamais agrandie plus de 1,6x (--nw = largeur reelle) */
.lightbox__stage img {
    width: min(100%, calc(var(--nw, 2400) * 1.6px));
    height: 100%;
    max-height: calc(var(--nh, 2400) * 1.6px);
    object-fit: contain;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6));
    transition: opacity .5s, filter 1.2s var(--ease);
}

.lightbox__stage img.is-loading {
    opacity: .15;
    filter: blur(10px) brightness(2);
}

.lightbox__nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18%;
    z-index: 2;
    background: none;
    border: 0;
    color: var(--paper);
    cursor: pointer;
    font-size: 28px;
    opacity: 0;
    transition: opacity .3s;
}

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
    opacity: .9;
}

.lightbox__nav--prev { left: 0; text-align: left; padding-left: var(--gutter); }
.lightbox__nav--next { right: 0; text-align: right; padding-right: var(--gutter); }

.lightbox__caption {
    max-width: 70ch;
}

.lightbox__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-style: italic;
    margin: 0;
}

.lightbox__text {
    color: var(--paper-dim);
    font-size: 14px;
    margin: 2px 0 0;
}

.lightbox__exif {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
}

.lightbox__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--paper);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.icon-btn:hover {
    border-color: var(--safelight);
    color: #fff;
}

.icon-btn.is-active {
    background: var(--safelight);
    border-color: var(--safelight);
}

@media (max-width: 640px) {
    .lightbox__exif {
        display: none;
    }

    .lightbox__nav {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Videos
   -------------------------------------------------------------------------- */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
    gap: clamp(28px, 4vw, 56px) clamp(16px, 2.4vw, 32px);
}

.video-card {
    text-decoration: none;
    display: block;
}

.video-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ink-2);
}

.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.video-card:hover .video-card__thumb img {
    transform: scale(1.04);
}

/* Lignes de balayage facon moniteur au survol */
.video-card__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
    opacity: 0;
    transition: opacity .4s;
}

.video-card:hover .video-card__thumb::after {
    opacity: 1;
}

.video-card__badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, .55);
    padding: 6px 10px;
}

.video-card__badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--safelight);
}

.video-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 30px;
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

.video-card__body {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.video-card__title {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 0;
}

.video-card__desc {
    color: var(--muted);
    font-size: 14px;
    margin: 4px 0 0;
}

.video-card__out {
    white-space: nowrap;
    padding-top: 10px;
}

/* --------------------------------------------------------------------------
   Acces invite, pages simples
   -------------------------------------------------------------------------- */

.narrow {
    max-width: 560px;
}

.access-card {
    border: 1px solid var(--line);
    padding: clamp(24px, 5vw, 48px);
    background: linear-gradient(180deg, var(--ink-2), var(--ink));
}

.code-input {
    display: flex;
    gap: 10px;
    margin: 24px 0;
}

.code-input input {
    width: 100%;
    max-width: 56px;
    aspect-ratio: 4 / 5;
    background: var(--ink);
    border: 1px solid var(--line-strong);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 26px;
    text-align: center;
}

.code-input input:focus {
    outline: none;
    border-color: var(--safelight);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 28px;
}

.card {
    text-decoration: none;
    display: block;
}

.card__img {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--ink-2);
    margin-bottom: 14px;
}

.card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.card:hover .card__img img {
    transform: scale(1.03);
}

.card h3 {
    margin: 0 0 4px;
}

.empty-state {
    padding: 60px 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 26px;
}

.prose {
    max-width: 68ch;
    color: var(--paper-dim);
    font-size: 18px;
}

.prose::first-letter {
    font-family: var(--font-display);
    font-size: 4.2em;
    float: left;
    line-height: .8;
    padding: 6px 10px 0 0;
    color: var(--paper);
}

.about {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(28px, 6vw, 96px);
    align-items: start;
}

.about__portrait {
    aspect-ratio: 4 / 5;
    background: var(--ink-2);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-h) + 24px);
}

.about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.1);
}

@media (max-width: 820px) {
    .about {
        grid-template-columns: 1fr;
    }

    .about__portrait {
        position: static;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(28px, 6vw, 96px);
}

.contact-details {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--paper-dim);
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

@media (max-width: 820px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.cta-band {
    border-top: 1px solid var(--line);
    text-align: center;
}

.cta-band h2 {
    font-style: italic;
    margin-bottom: 28px;
}

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
}

.not-found__code {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(120px, 26vw, 320px);
    line-height: .8;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
}

/* --------------------------------------------------------------------------
   Curseur viseur (ordinateur seulement)
   -------------------------------------------------------------------------- */

.viewfinder {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 950;
    width: 34px;
    height: 34px;
    pointer-events: none;
    transform: translate3d(-100px, -100px, 0);
    transition: width .35s var(--ease), height .35s var(--ease), opacity .3s;
    margin: -17px 0 0 -17px;
    opacity: 0;
}

.viewfinder.is-visible {
    opacity: 1;
}

.viewfinder::before,
.viewfinder::after,
.viewfinder span::before,
.viewfinder span::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    border-color: var(--paper);
    border-style: solid;
    border-width: 0;
    transition: border-color .3s;
}

.viewfinder::before { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.viewfinder::after { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.viewfinder span::before { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.viewfinder span::after { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }

.viewfinder i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 3px;
    margin: -1.5px;
    border-radius: 50%;
    background: var(--safelight);
}

.viewfinder b {
    position: absolute;
    left: 100%;
    top: 100%;
    margin: 6px 0 0 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .12em;
    color: var(--paper);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .3s;
}

.viewfinder.is-focus {
    width: 74px;
    height: 54px;
    margin: -27px 0 0 -37px;
}

.viewfinder.is-focus::before,
.viewfinder.is-focus::after,
.viewfinder.is-focus span::before,
.viewfinder.is-focus span::after {
    border-color: var(--safelight);
}

.viewfinder.is-focus b {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Mode « lumiere inactinique » : tout le site vire au rouge monochrome
   -------------------------------------------------------------------------- */

.safelight-layer {
    position: fixed;
    inset: 0;
    z-index: 890;
    pointer-events: none;
    display: none;
}

html.safelight-on .safelight-layer {
    display: block;
}

.safelight-layer--mono {
    -webkit-backdrop-filter: grayscale(1) contrast(1.15);
    backdrop-filter: grayscale(1) contrast(1.15);
}

.safelight-layer--tint {
    background: #ff2a12;
    mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   Modale (messages de formulaire)
   -------------------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .75);
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal-box {
    position: relative;
    width: min(480px, 100%);
    background: var(--ink-2);
    border: 1px solid var(--line-strong);
    border-top: 2px solid var(--ok);
    padding: 32px;
}

.modal-box--error {
    border-top-color: var(--safelight);
}

.modal-box h2 {
    font-size: 30px;
}

.modal-content p {
    color: var(--paper-dim);
    margin: 0;
    white-space: pre-line;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
}

/* Badges « Editer » quand un admin navigue sur le site public */
.admin-editable {
    outline: 1px dashed rgba(232, 68, 46, .35);
    outline-offset: 4px;
    position: relative;
}

.admin-edit-badge {
    position: absolute;
    top: -12px;
    right: -6px;
    z-index: 60;
    font: 10px/1 var(--font-mono);
    letter-spacing: .08em;
    background: var(--safelight);
    color: #fff;
    border: 0;
    padding: 5px 7px;
    cursor: pointer;
    opacity: .85;
    font-style: normal;
    text-transform: none;
}

.admin-preview-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 700;
    background: var(--safelight);
    color: #fff;
    padding: 8px 16px;
}

/* --------------------------------------------------------------------------
   Mouvement reduit : on coupe animations et effets de suivi
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .develop {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .viewfinder {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero__scroll {
        display: none;
    }
}
