/* ==========================================================================
   FISH·STUDIO — Expérience immersive
   Canvas WebGL fixe en fond, contenu défilant par-dessus.
   ========================================================================== */

:root {
    --bg:        #04060c;
    --text:      #eef0f4;
    --text-dim:  #8b93a3;
    --accent:    #d7ff3e;
    --line:      rgba(255, 255, 255, 0.08);

    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;

    --pad-x: clamp(1.5rem, 7vw, 8rem);
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
}

.accent { color: var(--accent); }

a { color: inherit; }

::selection { background: var(--accent); color: #000; }

/* Barre de défilement discrète */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a3040; }

/* ==========================================================================
   PRELOADER
   ========================================================================== */

#loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease 0.2s, visibility 0.7s ease 0.2s;
}

body.loaded #loader { opacity: 0; visibility: hidden; }

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.loader-brand {
    font-weight: 700;
    letter-spacing: 0.25em;
    font-size: 0.9rem;
}
.loader-brand i, .brand i { font-style: normal; color: var(--accent); }

.loader-pct {
    font-size: 2.4rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.loader-bar {
    width: 180px;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}
.loader-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.15s linear;
}

.loader-hint { color: var(--text-dim); font-size: 0.6rem; }

/* ==========================================================================
   CURSEUR PERSONNALISÉ (desktop uniquement)
   ========================================================================== */

.cursor-dot, .cursor-ring {
    display: none;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@media (pointer: fine) {
    .cursor-dot, .cursor-ring { display: block; }
    .cursor-dot { width: 5px; height: 5px; background: var(--accent); }
    .cursor-ring {
        width: 34px; height: 34px;
        border: 1px solid rgba(215, 255, 62, 0.4);
        transition: width 0.25s, height 0.25s, border-color 0.25s;
    }
    body.cursor-hover .cursor-ring {
        width: 56px; height: 56px;
        border-color: var(--accent);
    }
}

/* ==========================================================================
   SCÈNE WEBGL + VIGNETTAGE
   ========================================================================== */

#gl {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: block;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 55%, rgba(2, 4, 9, 0.75) 100%),
        linear-gradient(180deg, rgba(2, 4, 9, 0.5) 0%, transparent 12%, transparent 88%, rgba(2, 4, 9, 0.6) 100%);
}

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

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem var(--pad-x);
    mix-blend-mode: difference;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.8s ease 1s, transform 0.8s ease 1s;
}
body.loaded .site-header { opacity: 1; transform: none; }

.brand {
    font-weight: 700;
    letter-spacing: 0.22em;
    font-size: 0.85rem;
    text-decoration: none;
}

.header-loc { color: var(--text-dim); font-size: 0.62rem; }

.header-right {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.header-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.65rem;
    transition: color 0.25s;
}
.header-link:hover,
.header-link.active { color: var(--accent); }

.header-cta {
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.65rem;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.header-cta:hover { background: #fff; color: #000; border-color: #fff; }

/* ==========================================================================
   NAVIGATION PAR SCÈNES (points latéraux)
   ========================================================================== */

.scene-nav {
    position: fixed;
    right: clamp(1rem, 3vw, 2.5rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    opacity: 0;
    transition: opacity 0.8s ease 1.4s;
}
body.loaded .scene-nav { opacity: 1; }

.scene-nav a {
    text-decoration: none;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}
.scene-nav a::before {
    content: "";
    width: 16px;
    height: 1px;
    background: currentColor;
    transition: width 0.3s;
}
.scene-nav a.active { color: var(--accent); }
.scene-nav a.active::before { width: 30px; }
.scene-nav a span { font-size: 0.6rem; }

/* ==========================================================================
   PANNEAUX / SCÈNES
   ========================================================================== */

main { position: relative; z-index: 10; }

.panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem var(--pad-x);
}

/* Mot fantôme géant en arrière-plan de chaque scène */
.ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(6rem, 24vw, 22rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.panel-inner {
    max-width: 44rem;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-inner.inview { opacity: 1; transform: none; }

.kicker {
    color: var(--accent);
    margin-bottom: 1.6rem;
}

h2 {
    font-size: clamp(2rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.8rem;
}

.copy {
    color: var(--text-dim);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    max-width: 36rem;
    margin-bottom: 1.6rem;
}

.copy-note { color: var(--text-dim); font-size: 0.65rem; }

/* --- Hero --- */

#hero { justify-content: flex-start; }

.hero-title {
    font-size: clamp(2.6rem, 9vw, 7.5rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 1.2rem 0 2rem;
}

/* Révélation ligne par ligne */
.hero-title .line {
    display: block;
    overflow: hidden;
}
.hero-title .line > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
body.loaded .hero-title .line:nth-child(1) > span { transition-delay: 0.55s; transform: none; }
body.loaded .hero-title .line:nth-child(2) > span { transition-delay: 0.68s; transform: none; }
body.loaded .hero-title .line:nth-child(3) > span { transition-delay: 0.81s; transform: none; }

.hero-inner { opacity: 1; transform: none; }
.hero-inner .kicker, .hero-sub {
    opacity: 0;
    transition: opacity 1s ease 1.2s;
}
body.loaded .hero-inner .kicker,
body.loaded .hero-sub { opacity: 1; }

.hero-sub {
    color: var(--text-dim);
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    letter-spacing: 0.04em;
}

.scroll-hint {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-dim);
    font-size: 0.6rem;
    opacity: 0;
    transition: opacity 1s ease 1.8s;
}
body.loaded .scroll-hint { opacity: 1; }

.scroll-line {
    width: 1px;
    height: 44px;
    background: linear-gradient(var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Contact --- */

.contact-inner { max-width: 52rem; }

.contact-mail {
    display: inline-block;
    background: none;
    border: none;
    border-bottom: 2px solid var(--accent);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 3.8vw, 2.6rem);
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: 0 0 0.35rem;
    margin: 1.2rem 0 3rem;
    transition: color 0.25s, letter-spacing 0.4s;
}
.contact-mail:hover { color: var(--accent); letter-spacing: 0.02em; }

.contact-cta-group { margin-bottom: 2.5rem; }

.btn-secondary {
    display: inline-block;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 4rem;
    color: var(--text-dim);
    margin-bottom: 4rem;
}
.contact-meta dt { color: var(--accent); font-size: 0.6rem; margin-bottom: 0.4rem; }
.contact-meta dd { font-size: 0.68rem; }

.footer-line {
    color: var(--text-dim);
    font-size: 0.58rem;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
}

/* ==========================================================================
   ACCESSIBILITÉ & RESPONSIVE
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .panel-inner, .hero-title .line > span { transition: none; opacity: 1; transform: none; }
    .scroll-line { animation: none; }
}

@media (max-width: 768px) {
    .header-loc { display: none; }
    .header-right { gap: 0.9rem; }
    .header-link { font-size: 0.58rem; }
    .scene-nav a span { display: none; }
    .scene-nav { gap: 0.9rem; }
    .ghost { font-size: clamp(4rem, 26vw, 9rem); }
    .contact-meta { flex-direction: column; gap: 1.4rem; }

    /* Le texte remonte juste sous le header ; la formation 3D (décalée en JS
       via points.position.y) occupe la partie basse, libre de tout texte.
       .panel a un padding-top de 6rem par défaut : il faut le réduire nettement,
       pas de 0.5rem, pour un effet visible. */
    #hero {
        align-items: flex-start;
        padding-top: 6.5rem !important;
        padding-right: 3rem;
        padding-bottom: 2rem;
    }
    .hero-title { margin: 0.8rem 0 1.2rem; font-size: 35px; }
}

/* ==========================================================================
   MODALE DE CONTACT
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 4, 9, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.open { opacity: 1; }

.modal {
    position: relative;
    width: min(100%, 30rem);
    max-height: 90vh;
    overflow-y: auto;
    background: #0a0d16;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.8rem, 5vw, 3rem);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.modal-backdrop.open .modal { transform: none; opacity: 1; }

.modal h3 {
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0.8rem 0 1rem;
}

.modal-copy {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

.modal-mail {
    display: block;
    font-family: var(--font-mono);
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1.2rem;
    word-break: break-all;
}
.modal-mail:hover { text-decoration: underline; }

.modal-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.58rem;
    transition: border-color 0.2s, color 0.2s;
}
.modal-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.modal-copy-btn.copied { border-color: var(--accent); color: var(--accent); }

/* --- Formulaire --- */

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.form-row { display: flex; flex-direction: column; gap: 0.45rem; }

.form-row label {
    color: var(--text-dim);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
}

.form-row input,
.form-row textarea {
    background: #0e121c;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.7rem 0.8rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s;
}
.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-row input:invalid:not(:placeholder-shown) { border-color: #ff6b6b; }

.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-send {
    background: var(--accent);
    color: #04060c;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.4rem;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
}
.btn-send:hover { filter: brightness(1.1); }
.btn-send:active { transform: scale(0.98); }
.btn-send:disabled { opacity: 0.55; cursor: wait; }

.form-status {
    min-height: 1.2em;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff6b6b; }

.modal-alt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dim);
    font-size: 0.6rem;
    padding-top: 1.2rem;
    margin-bottom: 1.2rem;
    border-top: 1px solid var(--line);
}

.modal-mail-inline {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.modal-mail-inline:hover { color: var(--accent); }

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    color: var(--text-dim);
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
}
.modal-meta dt { color: var(--accent); font-size: 0.58rem; margin-bottom: 0.3rem; }
.modal-meta dd { font-size: 0.68rem; }

body.modal-open { overflow: hidden; }

/* ==========================================================================
   RÉVÉLATION GÉNÉRIQUE AU SCROLL (hors panneaux plein écran)
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.inview { opacity: 1; transform: none; }

/* ==========================================================================
   PAGE PROJETS
   ========================================================================== */

.projects-main { position: relative; z-index: 10; }

.gallery-hero {
    max-width: 50rem;
    padding: clamp(8rem, 18vh, 11rem) var(--pad-x) 3rem;
}
.gallery-hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.6rem;
}

/* --- Filtres --- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 0 var(--pad-x) 2.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter-btn:hover { border-color: rgba(215, 255, 62, 0.5); color: var(--text); }
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #04060c;
    font-weight: 700;
}
.filter-count { opacity: 0.65; }
.filter-btn.active .filter-count { opacity: 0.75; }

/* --- Galerie en cascade (masonry) : les images gardent leurs proportions
   réelles, la variété des formats donne le rythme visuel de la galerie. --- */

.gallery-grid-section { padding: 0 var(--pad-x) 5rem; }

/* --- Silotage des domaines : "Systèmes & R&D" (focus actuel) vs
   "Fondations & Design" (acquis historiques, signal visuel volontairement
   plus discret : opacité réduite, pas d'effet de survol dynamique). --- */

.gallery-domain.is-hidden { display: none; }

.domain-head {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
    padding-top: 1rem;
}

.domain-title {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.domain-sub {
    color: var(--text-dim);
    font-size: 0.6rem;
}

.domain-note {
    flex-basis: 100%;
    color: var(--text-dim);
    font-size: 0.85rem;
    max-width: 36rem;
    margin-top: 0.2rem;
}

.gallery-domain--foundation {
    border-top: 1px solid var(--line);
    padding-top: 3rem;
}
.gallery-domain--foundation .domain-title { color: var(--text-dim); }
.gallery-domain--foundation .domain-sub { opacity: 0.7; }

/* Cartes "Fondations" : présence volontairement atténuée, sans dynamisme
   au survol — ce sont des acquis, pas le focus actuel du studio. */
.gallery-item--foundation {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.gallery-item--foundation:hover {
    opacity: 0.85;
    border-color: var(--line);
    transform: none;
}
.gallery-item--foundation img {
    filter: saturate(0.6) brightness(0.9);
}
.gallery-item--foundation:hover img {
    transform: none;
    filter: saturate(0.6) brightness(0.9);
}
.gallery-item--foundation figcaption {
    opacity: 0;
}
.gallery-item--foundation:hover figcaption {
    opacity: 1;
    transform: none;
}

.masonry {
    column-count: 4;
    column-gap: 1.2rem;
}

.gallery-item {
    break-inside: avoid;
    margin: 0 0 1.2rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0a0d16;
    cursor: pointer;
    transition: opacity 0.35s ease, transform 0.3s ease;
}
.gallery-item.is-hidden {
    display: none;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    filter: saturate(0.9);
}
.gallery-item:hover img { transform: scale(1.045); filter: saturate(1.1); }
.gallery-item:hover { border-color: rgba(215, 255, 62, 0.4); }

.gallery-item figcaption {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 2.2rem 1rem 0.9rem;
    background: linear-gradient(180deg, transparent, rgba(2, 4, 9, 0.92) 65%);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover figcaption { opacity: 1; transform: none; }

.gi-title { font-weight: 700; font-size: 0.85rem; letter-spacing: -0.01em; }
.gi-tag { color: var(--accent); font-size: 0.58rem; }

/* --- Lightbox --- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 1.5rem;
    background: rgba(2, 4, 9, 0.94);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }

.lightbox-img {
    max-width: min(90vw, 1100px);
    max-height: 78vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption { color: var(--text-dim); }

.lightbox-close {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(10, 13, 22, 0.8);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(10, 13, 22, 0.8);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.lightbox-nav:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-prev { left: clamp(0.8rem, 3vw, 2.5rem); }
.lightbox-next { right: clamp(0.8rem, 3vw, 2.5rem); }

.gallery-cta {
    padding: 4rem var(--pad-x) 5rem;
    border-top: 1px solid var(--line);
    text-align: left;
}
.gallery-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
}
.gallery-cta .contact-mail { margin: 0.5rem 0 0; }

.site-footer {
    padding: 2rem var(--pad-x) 3rem;
}

@media (max-width: 1200px) {
    .masonry { column-count: 3; }
}

@media (max-width: 860px) {
    .masonry { column-count: 2; }
}

@media (max-width: 560px) {
    .masonry { column-count: 1; }
    .gallery-hero { padding-top: 7rem; }
    .filter-bar { padding-bottom: 1.8rem; }
    .lightbox-nav { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
}

/* Pages sans moteur 3D (galerie) : un header plein et lisible plutôt que le
   mix-blend-mode pensé pour se détacher du fond animé plein écran. */
body.no-engine .site-header {
    mix-blend-mode: normal;
    background: rgba(4, 6, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
