/* =========================================================
   GUERINSTUDIO — V2 (prévisualisation)
   Direction : sombre, épuré, la typographie blanche comme
   élément principal. Fichier autonome (n'importe pas style.css).
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
    --bg: #0a0a0a;
    --text: #f4f2ee;            /* blanc chaud, moins clinique que #fff */
    --text-dim: rgba(244, 242, 238, 0.55);
    --text-faint: rgba(244, 242, 238, 0.28);
    --line: rgba(244, 242, 238, 0.12);
    --line-strong: rgba(244, 242, 238, 0.35);
    --nav-bg: rgba(10, 10, 10, 0.72);

    --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --pad: 5%;                            /* même marge latérale que le site actuel */
    --nav-h: 98px;                        /* hauteur du menu (logo 50px + 2 × 1.5rem) */
    --section: clamp(6rem, 12vw, 10rem);  /* respiration verticale */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    /* Variables attendues par script.js (barre mobile, etc.) */
    --mobile-nav-bg: rgba(10, 10, 10, 0.85);
    --mobile-nav-border: rgba(244, 242, 238, 0.08);
    --text-main: var(--text);
    --text-muted: var(--text-dim);
    --accent: var(--text);
    --transition: all 0.4s var(--ease);
}

[data-theme="light"] {
    --bg: #f3f1ec;
    --text: #0d0d0d;
    --text-dim: rgba(13, 13, 13, 0.58);
    --text-faint: rgba(13, 13, 13, 0.3);
    --line: rgba(13, 13, 13, 0.12);
    --line-strong: rgba(13, 13, 13, 0.35);
    --nav-bg: rgba(243, 241, 236, 0.72);
    --mobile-nav-bg: rgba(243, 241, 236, 0.85);
    --mobile-nav-border: rgba(13, 13, 13, 0.08);
}

/* ---------- 2. BASE ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a var(--bg);
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
ul, ol { list-style: none; }

::selection { background: var(--text); color: var(--bg); }

:focus { outline: none; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

/* Grain subtil : donne de la matière au noir */
.grain {
    position: fixed;
    inset: -50%;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 8s steps(8) infinite;
}

[data-theme="light"] .grain { opacity: 0.07; }

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-3%, 2%); }
    50% { transform: translate(2%, -3%); }
    75% { transform: translate(-2%, -1%); }
}

/* Barre de progression injectée par script.js */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 1px;
    width: 0;
    background: var(--text);
    z-index: 2100;
}

/* Éléments injectés par script.js et inutiles ici */
.ambient-glow-container { display: none; }

/* ---------- 3. LOADER ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.loader-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.6em;
    color: var(--text);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), letter-spacing 1.2s var(--ease);
}

.loader.ready .loader-mark {
    opacity: 1;
    transform: none;
    letter-spacing: 0.35em;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Transition de sortie vers une autre page */
.loader.fade-in.active {
    opacity: 1;
    visibility: visible;
    transition-duration: 0.15s;
}

.loader-backdrop,
.loader-bg { display: none; }

/* ---------- 4. NAVIGATION (gabarit du site actuel) ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: 2.5rem;
    align-items: center;
    padding: 1.5rem var(--pad);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, background-color 0.4s ease;
}

.site-nav.is-scrolled { border-bottom-color: var(--line); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    justify-self: start;
}

.brand-logo {
    height: 50px;
    width: auto;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

@media (min-width: 769px) {
    .site-nav nav {
        position: static !important;
        width: auto !important;
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        display: block !important;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    font-size: 1rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease);
}

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

.nav-links a.active { font-weight: 600; }

.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-switch {
    justify-self: end;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dim);
}

.lang-btn {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active { color: var(--text); }

.separator {
    margin: 0 8px;
    opacity: 0.5;
}

/* Bouton thème injecté par script.js */
.theme-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 6px;
    margin-left: 7px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-btn:hover { color: var(--text); transform: scale(1.1); }
.theme-icon-sun,
.theme-icon-moon { width: 18px; height: 18px; transition: transform 0.5s ease; }
[data-theme="light"] .theme-icon-moon,
[data-theme="dark"] .theme-icon-sun { display: none; }

/* ---------- 5. ÉLÉMENTS COMMUNS ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--line);
}

.section-label,
.section-count {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.6rem 1rem 1.8rem;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.btn-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px -12px color-mix(in srgb, var(--text) 45%, transparent);
}

.btn-pill-arrow {
    display: inline-block;
    transition: transform 0.5s var(--ease);
}

.btn-pill:hover .btn-pill-arrow { transform: translateX(4px); }

.link-underline {
    position: relative;
    font-weight: 500;
    color: var(--text);
}

.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: var(--line-strong);
    transition: background-color 0.3s ease;
}

.link-underline:hover::after { background: var(--text); }

/* Apparition au scroll (classe .active ajoutée par script.js) */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
    transition-delay: var(--d, 0ms);
}

.reveal.active { opacity: 1; transform: none; }

/* ---------- 6. HERO ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--nav-h) + 1.75rem) var(--pad) clamp(2rem, 4vw, 3rem);
}

/* Infos dans les coins, façon cartouche d'architecte */
.hero-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 1.2s var(--ease) 0.9s;
}

.hero-dot { margin-right: 0.7em; color: var(--text); }

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 8.4vw, 9.2rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin: clamp(2rem, 6vh, 4rem) 0;
    will-change: transform;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.05em;   /* évite de rogner les lettres */
}

.hero-title .line-inner {
    display: inline-block;
    white-space: nowrap;
    transform: translateY(105%);
    transition: transform 1.3s var(--ease);
}

.hero-title .line:nth-child(2) .line-inner { transition-delay: 0.12s; }

.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.2s var(--ease) 0.7s, transform 1.2s var(--ease) 0.7s;
}

.hero-sub {
    max-width: 32ch;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.5;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.scroll-cue:hover { color: var(--text); }

.scroll-cue-line {
    position: relative;
    width: 1px;
    height: 42px;
    background: var(--line);
    overflow: hidden;
}

.scroll-cue-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: -40%;
    width: 100%;
    height: 40%;
    background: var(--text);
    animation: scrollCue 2.2s var(--ease-in-out) infinite;
}

@keyframes scrollCue {
    0% { top: -40%; }
    100% { top: 100%; }
}

/* État chargé : déclenché par v2.js */
body.is-loaded .hero-title .line-inner { transform: none; }
body.is-loaded .hero-meta { opacity: 1; }
body.is-loaded .hero-bottom { opacity: 1; transform: none; }

/* ---------- 7. DÉCLARATION ---------- */
.statement {
    padding: var(--section) var(--pad);
}

.statement-text {
    max-width: 22ch;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 5rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

/* Mots découpés par v2.js : s'allument au fil du scroll */
.statement-text .w {
    color: var(--text-faint);
    transition: color 0.5s ease;
}

.statement-text .w.on { color: var(--text); }

.statement-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    font-size: 0.9rem;
    color: var(--text-dim);
}

.statement-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1);
}

/* ---------- 8. RÉALISATIONS ---------- */
.works {
    padding: 0 var(--pad) var(--section);
}

.page-suivi #chantiers {
    padding-top: 0;
    padding-bottom: clamp(2rem, 3.5vw, 3rem);
}

.page-suivi #partenariats {
    padding-top: 0;
    padding-bottom: clamp(4rem, 8vw, 6rem);
}

.works .section-head { margin-bottom: 0; }
.page-suivi .section-head { margin-bottom: clamp(1.75rem, 2.5vw, 2.25rem); }

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

.work-link {
    display: grid;
    grid-template-columns: 2.8rem 76px 1fr auto 2.5rem;
    align-items: center;
    gap: clamp(1rem, 2vw, 2.2rem);
    padding: clamp(1rem, 1.8vw, 1.6rem) 0;
}

.work-thumb-wrap {
    width: 76px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    background: #141414;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.work-link:hover .work-thumb {
    transform: scale(1.08);
}

.work-idx {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.work-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3.6vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    transition: transform 0.6s var(--ease), color 0.4s ease;
}

.work-loc {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: right;
    white-space: nowrap;
}

.work-arrow {
    justify-self: end;
    font-size: 1.4rem;
    color: var(--text-dim);
    transform: translateX(-10px);
    opacity: 0;
    transition: transform 0.6s var(--ease), opacity 0.4s ease, color 0.3s ease;
}

/* Survol : les autres lignes s'estompent, celle-ci avance */
@media (hover: hover) {
    .works-list:hover .work-title { color: var(--text-faint); }
    .work-link:hover .work-title { color: var(--text); transform: translateX(1.2rem); }
    .work-link:hover .work-arrow { opacity: 1; transform: none; color: var(--text); }
}

.works-foot {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.big-link {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    letter-spacing: -0.03em;
}

.big-link-arrow {
    display: grid;
    place-items: center;
    width: 2.2em;
    height: 2.2em;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 0.7em;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.6s var(--ease), border-color 0.4s ease;
}

.big-link:hover .big-link-arrow {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: rotate(-45deg);
}

/* ---------- 9. CHIFFRES ---------- */
.numbers {
    padding: 0 var(--pad) var(--section);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.number {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-right: 2rem;
}

.number + .number {
    padding-left: clamp(1.5rem, 3vw, 3rem);
    border-left: 1px solid var(--line);
}

.number:nth-child(2) { --d: 100ms; }
.number:nth-child(3) { --d: 200ms; }

.number-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6.5vw, 6.5rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}

.number-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ---------- 10. FOOTER (concept du site actuel) ---------- */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem var(--pad);
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 0.5rem;
}

.social-icons a {
    display: flex;
    color: var(--text-dim);
    transition: color 0.3s ease, transform 0.3s var(--ease);
}

.social-icons a:hover {
    color: var(--text);
    transform: translateY(-3px);
}

/* ---------- 11. RESPONSIVE ---------- */
@media (max-width: 1150px) and (min-width: 769px) {
    .site-nav { column-gap: 1.2rem; }
    .nav-links { gap: 1.1rem; }
    .nav-links a { font-size: 0.88rem; }
}

@media (max-width: 950px) and (min-width: 769px) {
    .site-nav { column-gap: 0.75rem; }
    .nav-links { gap: 0.7rem; }
    .nav-links a { font-size: 0.8rem; }
}

@media (max-width: 1024px) {
    .work-link { grid-template-columns: 2.5rem 64px 1fr auto; }
    .work-thumb-wrap { width: 64px; height: 46px; }
    .work-arrow { display: none; }
}

@media (max-width: 768px) {
    :root { 
        --pad: 5%; 
        --nav-h: 75px; 
        --section: clamp(4rem, 10vw, 5.5rem);
    }

    .site-nav {
        grid-template-columns: 1fr auto !important;
        column-gap: 1rem !important;
        padding: 0.9rem var(--pad) !important;
    }

    .brand-logo { height: 42px !important; }
    .brand-name { font-size: 0.95rem !important; }

    /* Suppression totale du menu texte en haut sur mobile */
    .site-nav nav,
    .site-nav .nav-links,
    header.site-nav nav,
    body.v2 header.site-nav nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* HERO SUR MOBILE : espacements resserrés et équilibrés */
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-h) + 1.25rem);
        padding-bottom: clamp(3rem, 7vh, 4.5rem);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 1.25rem;
    }

    .hero-meta {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
        margin-bottom: 0.25rem;
    }

    .hero-coords { display: none; }

    /* Titre percutant et ajusté sur mobile sans aucun rognage */
    .hero-title {
        font-size: clamp(1.35rem, 6.2vw, 2.1rem);
        line-height: 1.08;
        letter-spacing: -0.035em;
        margin: 0.5rem 0 1rem 0;
        padding: 0;
    }

    .hero-title .line,
    .page-patrimoine .hero-title .line,
    .page-suivi .hero-title .line,
    .hero-title-suivi .line {
        overflow: visible;
        padding-right: 0.3em;
    }

    .hero-title .line-inner,
    .page-patrimoine .hero-title .line-inner,
    .page-suivi .hero-title .line-inner,
    .hero-title-suivi .line-inner {
        white-space: nowrap;
        padding-right: 0.3em;
    }

    .page-patrimoine .hero-title,
    .hero-title-patrimoine,
    .page-suivi .hero-title,
    .hero-title-suivi {
        font-size: clamp(1.15rem, 5.2vw, 1.8rem);
        line-height: 1.1;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        margin-top: 0.5rem;
    }

    .hero-sub {
        font-size: 0.95rem;
        line-height: 1.45;
        max-width: 100%;
    }

    .btn-pill {
        padding: 0.85rem 1.4rem;
        font-size: 0.85rem;
    }

    .scroll-cue { display: none; }

    /* DÉCLARATION SUR MOBILE */
    .statement {
        padding: var(--section) var(--pad);
    }

    .statement-text {
        font-size: clamp(1.65rem, 6.8vw, 2.2rem);
        line-height: 1.15;
        max-width: 100%;
    }

    .statement-foot {
        margin-top: 2rem;
        font-size: 0.85rem;
        gap: 0.8rem 1.2rem;
    }

    .statement-avatar {
        width: 38px;
        height: 38px;
    }

    /* RÉALISATIONS SUR MOBILE */
    .works {
        padding: 0 var(--pad) var(--section);
    }

    .work-link {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.25rem;
        padding: 1.1rem 0;
        align-items: center;
    }

    .work-thumb-wrap {
        grid-row: 1 / 3;
        width: 60px;
        height: 60px;
    }

    .work-idx { display: none; }
    .work-title { font-size: 1.2rem; line-height: 1.15; }
    .work-loc { text-align: left; font-size: 0.78rem; }
    .work-arrow { display: none; }

    .works-foot {
        margin-top: 2.5rem;
    }

    .big-link {
        font-size: 1.2rem;
    }

    /* CHIFFRES SUR MOBILE */
    .numbers {
        padding: 0 var(--pad) var(--section);
    }

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

    .number,
    .number + .number {
        padding: 1.5rem 0;
        border-left: none;
        border-bottom: 1px solid var(--line);
    }

    .number:first-child { padding-top: 0; }
    .number-value { font-size: clamp(2.8rem, 12vw, 4rem); }
    .number-label { font-size: 0.85rem; }

    /* FOOTER SUR MOBILE : dégagement pour la barre mobile sticky */
    .site-footer {
        padding: 3rem var(--pad) calc(5.5rem + env(safe-area-inset-bottom, 0px));
        font-size: 0.8rem;
    }
}

/* ---------- 12. ACCESSIBILITÉ : MOUVEMENT RÉDUIT ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .statement-text .w { color: var(--text); }
}


/* =======================================================
   NEWSLETTER GUERINSTUDIO - FOOTER & POPUP HAUT DE GAMME
   ======================================================= */

/* ---------- 1. ENCART FOOTER ---------- */
.footer-newsletter {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto 3rem auto !important;
    padding: 2.6rem 2.2rem !important;
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, rgba(18, 19, 22, 0.95) 75%) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(212, 175, 55, 0.08) !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.footer-newsletter::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 10% !important;
    right: 10% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #d4af37, #fef3c7, #d4af37, transparent) !important;
}

.newsletter-tag {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: 'Inter Tight', var(--font-main, sans-serif) !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.12) !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    padding: 5px 14px !important;
    border-radius: 99px !important;
    margin-bottom: 0.85rem !important;
}

.newsletter-title {
    font-family: 'Inter Tight', var(--font-main, sans-serif) !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 0.6rem 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
}

.newsletter-desc {
    font-size: 0.92rem !important;
    color: #a0a5ad !important;
    margin: 0 auto 1.6rem auto !important;
    line-height: 1.55 !important;
    max-width: 480px !important;
}

.newsletter-form {
    display: flex !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    width: 100% !important;
    max-width: 490px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.newsletter-input {
    flex: 1 !important;
    padding: 0.95rem 1.4rem !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 99px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.newsletter-input:focus {
    border-color: #d4af37 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

.newsletter-submit {
    padding: 0.95rem 1.8rem !important;
    background: linear-gradient(135deg, #d4af37 0%, #f6e08c 50%, #b8860b 100%) !important;
    color: #0b0c0e !important;
    font-family: 'Inter Tight', var(--font-main, sans-serif) !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 99px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35) !important;
}

.newsletter-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.55) !important;
    filter: brightness(1.05) !important;
}

.newsletter-submit:active {
    transform: translateY(0) !important;
}

.newsletter-submit.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.newsletter-disclaimer {
    font-size: 0.75rem !important;
    color: #7b828d !important;
    margin-top: 1rem !important;
    display: block !important;
    line-height: 1.4 !important;
}

/* État déjà abonné - contrôlé par la classe .is-subscribed */
#gs-newsletter-subscribed-wrapper,
#gs-modal-subscribed-wrapper {
    display: none !important;
}

.footer-newsletter.is-subscribed #gs-newsletter-form-wrapper,
.gs-newsletter-modal-card.is-subscribed #gs-modal-form-wrapper {
    display: none !important;
}

.footer-newsletter.is-subscribed #gs-newsletter-subscribed-wrapper,
.gs-newsletter-modal-card.is-subscribed #gs-modal-subscribed-wrapper {
    display: flex !important;
}

.newsletter-subscribed {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 1rem 0 !important;
}

.newsletter-subscribed-icon {
    font-size: 2.2rem !important;
    margin-bottom: 0.3rem !important;
    display: inline-block !important;
    animation: pulseIcon 2s infinite ease-in-out !important;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.newsletter-subscribed-title {
    font-family: 'Inter Tight', var(--font-main, sans-serif) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #4ade80 !important;
}

.newsletter-subscribed-desc {
    font-size: 0.9rem !important;
    color: #9ca3af !important;
    max-width: 440px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.newsletter-reopt-btn {
    background: none !important;
    border: none !important;
    color: #d4af37 !important;
    font-size: 0.8rem !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    margin-top: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
    transition: opacity 0.2s ease !important;
}

.newsletter-reopt-btn:hover {
    opacity: 0.8 !important;
}

.newsletter-feedback {
    margin-top: 0.75rem !important;
    font-size: 0.85rem !important;
    display: none;
}
.newsletter-feedback.error {
    display: block !important;
    color: #f87171 !important;
}
.newsletter-feedback.success {
    display: block !important;
    color: #4ade80 !important;
}

@media (max-width: 580px) {
    .footer-newsletter {
        padding: 2rem 1.2rem !important;
        margin-bottom: 2rem !important;
        border-radius: 16px !important;
    }
    .newsletter-title {
        font-size: 1.3rem !important;
    }
    .newsletter-form {
        flex-direction: column !important;
    }
    .newsletter-submit {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ---------- 2. POP-UP MODAL (BREVO) ---------- */
.gs-newsletter-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.2rem !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s !important;
}

.gs-newsletter-modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.gs-newsletter-modal-card {
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12) 0%, #111215 80%) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    border-radius: 24px !important;
    max-width: 520px !important;
    width: 100% !important;
    padding: 2.8rem 2.4rem 2.2rem 2.4rem !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 175, 55, 0.15) !important;
    text-align: center !important;
    position: relative !important;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.gs-newsletter-modal-overlay.active .gs-newsletter-modal-card {
    transform: translateY(0) scale(1) !important;
}

.gs-newsletter-modal-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 12% !important;
    right: 12% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #d4af37, #fef3c7, #d4af37, transparent) !important;
}

.gs-newsletter-modal-close {
    position: absolute !important;
    top: 1.2rem !important;
    right: 1.2rem !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e0e0e0 !important;
    font-size: 1.3rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}

.gs-newsletter-modal-close:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    border-color: #d4af37 !important;
    color: #d4af37 !important;
    transform: rotate(90deg) scale(1.05) !important;
}

.gs-newsletter-modal-icon {
    font-size: 2.6rem !important;
    margin-bottom: 0.8rem !important;
    display: inline-block !important;
}

.gs-newsletter-modal-title {
    font-family: 'Inter Tight', var(--font-main, sans-serif) !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 0.7rem 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
}

.gs-newsletter-modal-desc {
    font-size: 0.94rem !important;
    color: #a3a9b2 !important;
    margin: 0 auto 1.8rem auto !important;
    line-height: 1.55 !important;
    max-width: 440px !important;
}

@media (max-width: 580px) {
    .gs-newsletter-modal-card {
        padding: 2.2rem 1.4rem 1.8rem 1.4rem !important;
        border-radius: 18px !important;
    }
    .gs-newsletter-modal-title {
        font-size: 1.35rem !important;
    }
}

/* ---------- 3. NEWSLETTER — ADAPTATION THÈME CLAIR ---------- */
[data-theme="light"] .footer-newsletter,
[data-theme="light"] .gs-newsletter-modal-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%) !important;
    border: 1px solid rgba(13, 13, 13, 0.11) !important;
    box-shadow: 0 12px 36px rgba(13, 13, 13, 0.07), 0 2px 6px rgba(13, 13, 13, 0.04) !important;
}

[data-theme="light"] .footer-newsletter::before,
[data-theme="light"] .gs-newsletter-modal-card::before {
    background: linear-gradient(90deg, transparent, rgba(168, 128, 28, 0.55), transparent) !important;
}

[data-theme="light"] .newsletter-tag {
    color: #8c6712 !important;
    background: rgba(184, 134, 11, 0.09) !important;
    border: 1px solid rgba(184, 134, 11, 0.24) !important;
}

[data-theme="light"] .newsletter-title,
[data-theme="light"] .gs-newsletter-modal-title {
    color: #0d0d0d !important;
}

[data-theme="light"] .newsletter-desc,
[data-theme="light"] .gs-newsletter-modal-desc {
    color: #55534e !important;
}

[data-theme="light"] .newsletter-input {
    background: #f5f3ee !important;
    border: 1px solid rgba(13, 13, 13, 0.14) !important;
    color: #0d0d0d !important;
}

[data-theme="light"] .newsletter-input:focus {
    background: #ffffff !important;
    border-color: #b8860b !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.16) !important;
}

[data-theme="light"] .newsletter-input::placeholder {
    color: rgba(13, 13, 13, 0.45) !important;
}

[data-theme="light"] .newsletter-submit {
    background: #0d0d0d !important;
    color: #f4f2ee !important;
    box-shadow: 0 6px 18px rgba(13, 13, 13, 0.16) !important;
}

[data-theme="light"] .newsletter-submit:hover {
    background: #222222 !important;
    box-shadow: 0 10px 24px rgba(13, 13, 13, 0.24) !important;
    filter: none !important;
}

[data-theme="light"] .newsletter-disclaimer {
    color: #6e6c67 !important;
}

[data-theme="light"] .newsletter-subscribed-title {
    color: #15803d !important;
}

[data-theme="light"] .newsletter-subscribed-desc {
    color: #55534e !important;
}

[data-theme="light"] .newsletter-reopt-btn {
    color: #8c6712 !important;
}

[data-theme="light"] .newsletter-feedback.error {
    color: #dc2626 !important;
}

[data-theme="light"] .newsletter-feedback.success {
    color: #15803d !important;
}

[data-theme="light"] .gs-newsletter-modal-overlay {
    background: rgba(13, 13, 13, 0.45) !important;
}

[data-theme="light"] .gs-newsletter-modal-close {
    background: rgba(13, 13, 13, 0.05) !important;
    border: 1px solid rgba(13, 13, 13, 0.12) !important;
    color: #0d0d0d !important;
}

[data-theme="light"] .gs-newsletter-modal-close:hover {
    background: rgba(13, 13, 13, 0.12) !important;
    border-color: rgba(13, 13, 13, 0.28) !important;
    color: #0d0d0d !important;
}

/* =========================================================
   SYSTÈME D'ANIMATIONS ARCHITECTURALES & MICRO-INTERACTIONS
   (Transitions de pages, ondes au clic, lumière rasante,
    boutons magnétiques et révélations fluides)
   ========================================================= */

/* --- 1. RIDEAU DE TRANSITION DE PAGE UNIFIÉ --- */
.loader {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg, #0a0a0a) !important;
    border-top: 1px solid rgba(244, 242, 238, 0.14);
    border-bottom: 1px solid rgba(244, 242, 238, 0.14);
    transform: translateY(0%);
    opacity: 1 !important;
    visibility: visible;
    transition: transform 0.56s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.56s !important;
    will-change: transform;
}

.loader::after {
    content: '';
    width: clamp(90px, 14vw, 150px);
    height: 1px;
    background: rgba(244, 242, 238, 0.14);
    margin-top: 1.25rem;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(90deg, transparent, var(--text, #f4f2ee), #d4af37, transparent);
    background-size: 200% 100%;
    animation: loaderArchSweep 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes loaderArchSweep {
    0% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}

.loader-mark,
.loader-content {
    transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sortie du rideau vers le haut (révélation de la page) */
.loader.fade-out,
.loader.hidden {
    transform: translateY(-100%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.56s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.56s !important;
}

.loader.fade-out .loader-mark,
.loader.fade-out .loader-content,
.loader.hidden .loader-mark,
.loader.hidden .loader-content {
    opacity: 0 !important;
    transform: translateY(-18px) !important;
}

/* Fermeture du rideau depuis le bas lors d'un clic sur un lien */
.loader.fade-in {
    transform: translateY(100%) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
}

.loader.fade-in .loader-mark,
.loader.fade-in .loader-content {
    opacity: 0 !important;
    transform: translateY(16px) !important;
}

.loader.fade-in.active {
    transform: translateY(0%) !important;
    visibility: visible !important;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1) !important;
}

.loader.fade-in.active .loader-mark,
.loader.fade-in.active .loader-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
    letter-spacing: 0.35em !important;
    transition-delay: 0.08s !important;
}

/* Recul subtil du contenu de la page pendant la transition */
main {
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.4s ease;
}

body.is-leaving main {
    opacity: 0.28 !important;
    transform: translateY(-16px) scale(0.988) !important;
    filter: blur(2px);
}

/* --- 2. BOUTONS DESIGN : REFLET LUMINEUX, PRESSION & ONDE --- */
.btn-pill,
.btn-main,
.filter-btn,
.arch-btn-primary,
.arch-btn-secondary,
.newsletter-submit,
.btn-share {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Reflet oblique soyeux au survol */
.btn-pill::before,
.btn-main::before,
.arch-btn-primary::before,
.arch-btn-secondary::before,
.newsletter-submit::before,
.btn-share::before,
.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 65%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: skewX(-22deg);
    transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .btn-pill::before,
[data-theme="dark"] .btn-main::before,
[data-theme="dark"] .arch-btn-primary::before {
    background: linear-gradient(110deg, transparent, rgba(10, 10, 10, 0.16), transparent);
}

.btn-pill:hover::before,
.btn-main:hover::before,
.arch-btn-primary:hover::before,
.arch-btn-secondary:hover::before,
.newsletter-submit:hover::before,
.btn-share:hover::before,
.filter-btn:hover::before {
    left: 135%;
}

/* Sensation physique de clic (rebond élastique) */
.btn-pill:active,
.btn-main:active,
.filter-btn:active,
.arch-btn-primary:active,
.arch-btn-secondary:active,
.newsletter-submit:active,
.btn-share:active,
.lang-btn:active,
.theme-btn:active,
.model-control-btn:active,
.mobile-nav-item:active,
.is-pressing {
    transform: scale(0.95) !important;
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Onde d'impact au clic (injectée par JS aux coordonnées exactes du curseur) */
.gs-click-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(244, 242, 238, 0.42) 0%, rgba(212, 175, 55, 0.22) 55%, transparent 75%);
    transform: translate(-50%, -50%) scale(0);
    animation: gsRippleWave 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 2;
}

[data-theme="dark"] .btn-pill .gs-click-ripple,
[data-theme="dark"] .btn-main .gs-click-ripple,
[data-theme="dark"] .arch-btn-primary .gs-click-ripple {
    background: radial-gradient(circle, rgba(10, 10, 10, 0.25) 0%, rgba(212, 175, 55, 0.25) 55%, transparent 75%);
}

@keyframes gsRippleWave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.8);
        opacity: 0;
    }
}

/* --- 3. LUMIÈRE RASANTE SUR LES CARTES (SPOTLIGHT CURSEUR) --- */
.has-spotlight {
    position: relative;
}

.has-spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(244, 242, 238, 0.065), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

[data-theme="light"] .has-spotlight::after {
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(13, 13, 13, 0.045), transparent 65%);
}

@media (hover: hover) {
    .has-spotlight:hover::after {
        opacity: 1;
    }
}

/* --- 4. MICRO-ANIMATIONS DU LOGO, LIENS & CARTES --- */
.brand-logo,
.logo-img {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.brand:hover .brand-logo,
.brand-container:hover .logo-img {
    transform: scale(1.07) rotate(-4deg) !important;
}

.card-link .arrow,
.patrimoine-card-action {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-link .arrow,
.patrimoine-card-mini:hover .patrimoine-card-action {
    transform: translateX(5px);
}

/* Révélations au scroll enrichies */
.reveal {
    opacity: 0;
    transform: translateY(26px) scale(0.99);
    filter: blur(2px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s ease;
    transition-delay: var(--d, 0ms);
}

.reveal.active {
    opacity: 1;
    transform: none;
    filter: blur(0px);
}

/* Ligne d'en-tête de section qui se dessine */
.section-head.reveal {
    position: relative;
}

/* Transition douce lors du changement de langue FR / EN */
[data-i18n] {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.is-switching-lang [data-i18n] {
    opacity: 0.25 !important;
    transform: translateY(2px);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        filter: none !important;
        transform: none !important;
        transition: opacity 0.3s ease !important;
    }
}

/* ---------- 12. NAVIGATION MOBILE, FOOTER LÉGAL & FICHES PROJETS V2 ---------- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: var(--mobile-nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--mobile-nav-border);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(65px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: clamp(0.56rem, 2.3vw, 0.65rem);
    font-weight: 600;
    letter-spacing: 0;
    transition: var(--transition);
    gap: 4px;
    flex: 1 1 0%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    height: 100%;
    padding-top: 6px;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-nav-icon {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--text-main);
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: translateY(-2px);
    color: var(--accent);
}

@media screen and (max-width: 768px) {
    body.v2 {
        padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .carousel-slide {
        scroll-snap-stop: always;
    }
}

.footer-legal-links {
    margin-top: 0.4rem;
    font-size: 0.82rem;
}

.footer-legal-links a {
    color: var(--text-dim, var(--text-muted, rgba(244, 242, 238, 0.55)));
    text-decoration: none;
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.15));
    padding-bottom: 2px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-legal-links a:hover {
    color: var(--text, var(--text-main, #ffffff));
    border-color: currentColor;
}

/* Harmonisation des fiches projets en V2 */
body.v2.page-projet main > header {
    margin-top: var(--nav-h, 98px) !important;
}

body.v2.page-projet h1,
body.v2.page-projet h2,
body.v2.page-projet h3 {
    font-family: var(--font-display);
}

body.v2.page-projet .site-nav .lang-switch {
    position: static;
    transform: none;
}
