/* ========================================
   Fonts
   ======================================== */

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-weight: 100 950;
    font-display: swap;
    src: url('../fonts/InterVariable-weight—LA-only-VF.woff2') format('woff2-variations');
}


@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/InterVariable.woff2') format('woff2-variations');
}

@font-face {
    font-family: 'Inter Variable';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/InterVariable-Italic.woff2') format('woff2-variations');
}

/* ========================================
   Variables CSS - Charte graphique
   ======================================== */

:root {
    /* Couleurs principales */
    --color-primary: #5e977a;          /* Vert LA (note A) - Fond du site */
    --color-accent: #952210;           /* Brique/Terracotta - Textes et accents */
    --color-accent-fluo: #ac1b04;           /* Brique/Terracotta - Textes et accents */
    
    /* Palette projets */
    --color-beige-clair: #f4f1ea;      /* Beige clair */
    --color-beige-clair-2: #e8dfd6;    /* Beige clair 2 */
    --color-vert-fonce: #3d5a4f;       /* Vert foncé */
    --color-beige-sable: #d9c5b2;      /* Beige sable */
    --color-vert-tres-fonce: #2a4039;  /* Vert très foncé */
    --color-rose-clair: #ffaedc;    /* Rose clair */
    --color-rose-tres-clair: #ffb8f0;    /* Rose très clair */
    --color-petrol-clair: #3effef;    /* Petrol clair */
    
    /* Couleurs UI */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text-dark: #1a1a1a;
    --color-text-medium: #333333;
    --color-text-light: #666666;
    
    /* Opacités */
    --opacity-overlay: 0.9;
    --opacity-footer: 0.6;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 1.7rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Marges spécifiques */
    --header-padding-desktop: 2rem;
    --header-padding-tablet: 1.5rem;
    --header-padding-mobile: 20px;
    
    /* Tailles de police */
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-base: 1rem;
    --font-size-md: 1.2rem;
    --font-size-lg: 1.5rem;
    --font-size-xl: 2.0rem;
    --font-size-xxl: 2.5rem;
    --font-size-xxxl: 3rem;
    --font-size-xxxxl: 5em;
    
    /* Poids de police */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    
    /* Hauteurs de ligne */
    --line-height-tight: 1;
    --line-height-base: 1.2;
    --line-height-relaxed: 1.5;
    --line-height-loose: 1.7;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Borders */
    --border-radius-sm: 2px;
    --border-radius-md: 4px;
    --border-radius-lg: 13px;
    --border-radius-full: 50%;
    
    /* Z-index */
    --z-footer: 10;
    --z-baseline: 10;
    --z-scroll-invitation: 99;
    --z-hero-title: 100;
    --z-header: 1000;
    --z-back-to-top: 1000;

    /* Tailles de police mobile */
    --font-size-hero-mobile: 50vw; /* Plus grand sur mobile */
    
    /* Texte scroll invitation */
    --font-size-scroll-label: 0.7rem;

    /* Espacement titre LA */
       /* Pour letter-spacing (en em) */
    --hero-letter-spacing: 0.2em;
    
    /* OU pour gap (en vw, proportionnel à la taille du titre) */
    --hero-letter-gap: 12vw; /* Environ 2 espaces à 60vw de taille */

    /* Liens */
    --link-color: var(--color-accent);
    --link-hover-color: #b82a15;
}
}

/* ========================================
   Base
   ======================================== */



.scroll-container {
  overflow: auto;
  scrollbar-width: none;        /* Firefox */
}

.scroll-container::-webkit-scrollbar {
  display: none;                /* WebKit */
}


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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--color-primary);
    color: #fff;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* ========================================
   Header & Navigation
   ======================================== */

/* ========================================
   Header & Navigation
   ======================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--header-padding-desktop);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    z-index: var(--z-header);
    color: var(--color-accent);
    background: rgba(94, 151, 122, 0.95); /* Fond vert semi-transparent */
    backdrop-filter: blur(10px);
    transition: background var(--transition-base);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s,
                background var(--transition-base);
}

/* Optionnel : Header devient plus opaque au scroll */
header.scrolled {
    background: rgba(94, 151, 122, 0.98);
}

header.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.logo {
    flex: 0 0 50%;
    max-width: 50%;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.05em;
    line-height: var(--line-height-base);
    font-size: clamp(var(--font-size-xl), 1.8vw, 1.1rem);
    /* padding-right: var(--spacing-lg); */
}

.logo a {
    color: inherit;
    text-decoration: none;
    display: block;
}

/* ========================================
   Liens
   ======================================== */

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--link-hover-color);
}

/* a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
} */

nav {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    gap: clamp(var(--spacing-sm), 3vw, 2.5rem);
    justify-content: flex;
    align-items: baseline;
    flex-wrap: wrap;
    padding-left: var(--spacing-lg);
}

nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: var(--font-size-base));
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-semibold);
    transition: font-weight var(--transition-fast);
    position: relative;
    white-space: nowrap;
    line-height: var(--line-height-base);
}

nav a:hover {
    font-weight: var(--font-weight-semibold);
}

nav a.active {
    font-weight: var(--font-weight-semibold);
    
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
}

/* ========================================
   Page d'accueil - Titre LA
   ======================================== */


/* Point d'ancrage neutre (titre LA) */
.neutral-point {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    /* Compense la hauteur du header fixe lors du scroll via ancre #home */
    scroll-margin-top: 0;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 56%;
    transform: translate(-50%, -50%); /* ✅ Centrage parfait H+V */
    width: auto; /* Pas de contrainte de largeur */
    font-size: 60vw;
    font-weight: var(--font-weight-light);
    letter-spacing: var(--hero-letter-spacing);
    color: var(--color-accent);
    z-index: var(--z-hero-title);
    transition: opacity var(--transition-slow);
    display: flex;
    line-height: var(--line-height-tight);
    justify-content: center;
    align-items: center;
    cursor: ew-resize;
    margin: 0 auto;
    text-align: center;
}

.hero-title .letter-l,
.hero-title .letter-a {
    /* Pas de padding-right, on utilise gap à la place */
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-hero-mobile);
        padding: 0 var(--header-padding-mobile);
        pointer-events: none;
        cursor: default;
    }
}

/* ========================================
   Vidéo d'animation
   ======================================== */

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

/* ========================================
   Overlay shuffle d'images — hover .hero-title
   Même positionnement que .hero-video.
   Absent du DOM si enable_video=true (priorité vidéo).
   ======================================== */

.image-shuffle-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.image-shuffle-overlay.is-visible {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-shuffle-overlay.is-fading {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.image-shuffle-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Légère atténuation comme la vidéo */
    opacity: 0.1;
}

.hero-title {
    /* ... styles existants ... */
    z-index: 100; /* Au-dessus de la vidéo */
}

/* ========================================
   Animation scroll invitation
   ======================================== */

.scroll-invitation {
    position: absolute;
    left: 50%;
    bottom: 2vh; /* Position fixe par rapport au neutral-point */
    transform: translateX(-50%);
    z-index: var(--z-scroll-invitation);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.scroll-label {
    font-size: var(--font-size-scroll-label);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.2em;
    color: var(--color-accent);
    text-transform: uppercase;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--color-accent);
    border-radius: var(--border-radius-lg);
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--border-radius-sm);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        top: 8px;
    }
    50% {
        opacity: 0.5;
        top: 18px;
    }
    100% {
        opacity: 0;
        top: 24px;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--header-padding-desktop);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    z-index: var(--z-header);
    color: var(--color-accent);
    background: rgba(94, 151, 122, 0.95);
    backdrop-filter: blur(10px);
    transition: background var(--transition-base);
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: var(--header-padding-mobile);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
        /* AJOUT : hauteur minimale et overflow */
        min-height: auto;
        max-height: none;
    }

    .logo {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        font-size: var(--font-size-sm);
        padding-right: 0;
        /* AJOUT : white-space pour éviter la coupure */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    nav {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        justify-content: flex-start;
        gap: var(--spacing-sm);
        padding-left: 0;
        /* AJOUT : permettre le wrap des liens */
        flex-wrap: wrap;
        overflow: visible;
    }

    nav a {
        font-size: 0.75rem;
        /* AJOUT : éviter la coupure */
        white-space: nowrap;
    }
}

/* Très petit mobile */
@media (max-width: 480px) {
    header {
        padding: var(--header-padding-mobile);
    }
    
    .logo {
        font-size: var(--font-size-xs);
        /* Permettre le retour à la ligne sur très petit écran */
        white-space: normal;
        line-height: 1.3;
    }
    
    nav {
        gap: 0.75rem;
    }
    
    nav a {
        font-size: var(--font-size-xs);
    }

.hero-title .letter-l {
    animation: mobile-weight-animation 20s ease-in-out infinite;
    /* Pour une animation plus rapide : 15s */
    /* Pour une animation plus lente : 30s */
}
}
    
/* Mobile */
@media (max-width: 768px) {
    
    .hero-title {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* ✅ Centrage parfait */
    max-width: calc(100vw - 40px);
}
        .scroll-invitation {
        bottom: 5vh; /* Plus bas sur mobile */
    }
    
    /* Animation LA sur mobile */
    .hero-title .letter-l {
        animation: mobile-weight-animation 20s ease-in-out infinite;
        animation-delay: 0s;
        font-weight: 900; /* Démarrer gras */
    }
    
    .hero-title .letter-a {
        animation: mobile-weight-animation 20s ease-in-out infinite;
        animation-delay: 10s; /* Décalage pour alternance */
        font-weight: 100; /* Démarrer fin */
    }
}

@media (max-width: 768px) {
    .projet-card figcaption {
        bottom: 18px !important;
        left: 18px !important;
        right: 18px !important /* même marge gauche/droite */
        padding: 0.7rem var(--spacing-sm);
        font-size: var(--font-size-base);
    }

    .projet-title {
        font-size: var(--font-size-base);
    }

    .projet-location,
    .authors,
    .photographer,
    .links {
        font-size: var(--font-size-sm);
    }
}

    .projet-header h1 {
        font-size: var(--font-size-xxl);
    }

    .a-propos h1,
    .credits h1 {
        font-size: var(--font-size-xxl);
    }


/* Images limitées à la largeur de la colonne */
.a-propos-content img,
.a-propos-container img,
.credits-content img,
.credits-container img {
    max-width: 100% !important;  /* ✅ Ne dépasse jamais le container */
    height: auto !important;     /* ✅ Garde les proportions */
    display: block;
    margin: var(--spacing-lg) 0; /* Espacement vertical */
    border-radius: var(--border-radius-md); /* Coins arrondis */
}

    .error-code {
        font-size: 6rem;
    }
    
    .error-page h1 {
        font-size: 1.8rem;
    }
}


/* Animation mobile titre LA */
@keyframes mobile-weight-animation {
    0% {
        font-weight: 900;
    }
    50% {
        font-weight: 100;
    }
    100% {
        font-weight: 900;
    }
}

/* Dans @media (max-width: 768px) */
.hero-title .letter-l {
    animation: mobile-weight-animation 20s ease-in-out infinite;
    animation-delay: 0s;
}

.hero-title .letter-a {
    animation: mobile-weight-animation 20s ease-in-out infinite;
    animation-delay: 10s; /* Décalage pour alternance */
}

/* Suppression des blocs de couleur - on garde juste la souris */
/* 
.color-blocks {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 30px;
    height: 40px;
    overflow: hidden;
}

.color-block {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-sm);
    position: absolute;
    left: 0;
}

.color-block:nth-child(1) {
    background: var(--color-beige-clair);
    animation: scroll-block 4s linear infinite;
    animation-delay: 0s;
}

.color-block:nth-child(2) {
    background: var(--color-vert-fonce);
    animation: scroll-block 4s linear infinite;
    animation-delay: 0.8s;
}

.color-block:nth-child(3) {
    background: var(--color-beige-sable);
    animation: scroll-block 4s linear infinite;
    animation-delay: 1.6s;
}

.color-block:nth-child(4) {
    background: var(--color-vert-tres-fonce);
    animation: scroll-block 4s linear infinite;
    animation-delay: 2.4s;
}

.color-block:nth-child(5) {
    background: var(--color-beige-clair-2);
    animation: scroll-block 4s linear infinite;
    animation-delay: 3.2s;
}

@keyframes scroll-block {
    0% {
        top: -30px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        top: 0;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 40px;
        opacity: 0;
    }
} */

/* ========================================
   Baseline
   ======================================== */


.baseline {
    position: fixed; /* Changé de absolute à fixed */
    left: 6px;
    right: auto;
    /* Position calculée : juste sous le header */
    top: 71px; /* Hauteur du header + marge */
    transform: none;
    text-align: left;
    z-index: calc(var(--z-header) - 1); /* Juste sous le header */
    max-width: 850px;
    padding: var(--spacing-md);
    pointer-events: none;
    color: var(--color-vert-tres-fonce);
    opacity: 0;
    transition: opacity var(--transition-base   );
    /* backdrop-filter: blur(10px); */
    border-radius: var(--border-radius-md);
}

.baseline p {
    font-size: var(--font-size-xxxl);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-light);
    letter-spacing: 0.02em;
    text-align: left;
    margin: 0;
}

/* Règles typographiques de la baseline : voir section "Blocs de transition" ci-dessus */

/* Mobile */
@media (max-width: 768px) {
    .baseline {
        left: -3px;
        right: var(--header-padding-mobile);
        top: 90px; /* Ajusté pour header mobile */
        max-width: 400px;
        text-align: left;
    }
    
    .baseline p {
        font-size: 1.8rem;
    }
}

/* .baseline {
    position: absolute;
    top: 50%;
    left: var(--header-padding-desktop);
    right: auto;
    transform: translateY(-50%);
    text-align: left;
    z-index: var(--z-baseline);
    max-width: 900px;
    padding: 0;
    pointer-events: none;
    color: var(  --color-vert-tres-fonce);
    opacity: 0;
    transition: opacity var(--transition-slow);
} */
/* 
.baseline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: var(--z-baseline);
    max-width: 600px;
    padding: 0 var(--spacing-lg);
    pointer-events: none;
    color: var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition-slow);
    width: 100%;
} */

/* .baseline {
    position: absolute;
    top: 80%;
    left: 33.5%;
    transform: translate(-50%, -50%);
    text-align: left;
    z-index: var(--z-baseline);
    max-width: 900;
    padding: 0 var(--spacing-lg);
    pointer-events: none;
    color: var(  --color-vert-tres-fonce);
    opacity: 0;
    transition: opacity var(--transition-base);
} */

/* .baseline p {
    font-size: var(--font-size-xxxl);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-light);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
.baseline {
    position: absolute;
    top: 82%;
    left: 20px;
    text-align: left;
    z-index: var(--z-baseline);
    width: 375px;
    pointer-events: none;
    color: var(  --color-vert-tres-fonce);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.baseline p {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-light);
    letter-spacing: 0.02em;
} */
}

/* ========================================
   Projets - Page d'accueil
   ======================================== */

.projets-container {
    position: relative;
    padding-top: 100vh;
}

.projet-card {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projet-card:last-child {
    position: relative;
}

.projet-card figure {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.projet-card img,
.projet-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Nouvelle classe pour les <img> générés par renderProjectImage() */
.projet-image-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Rétrocompatibilité background-image (si encore présent) */
.projet-image {
    background-size: cover;
    background-position: var(--focus-point, center);
}

.projet-card figcaption {
    position: absolute;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    background: rgba(255, 255, 255, var(--opacity-overlay));
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

.projet-title {
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.25rem;
    color: var(--color-text-dark);
}

.projet-location {
    font-weight: var(--font-weight-regular);
    color: var(--color-accent);
}

/* Liens KirbyText dans le champ lieu */
.projet-location a {
    color: var(--color-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: opacity var(--transition-fast);
    pointer-events: auto;
}

.projet-location a:hover {
    opacity: 0.7;
}

.photographer {
    font-size: 0.85em;
    opacity: 1;
    display: block;
    margin-top: 0.25rem;
}

.authors {
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
}

/* ========================================
   Structure de scroll bidirectionnelle
   ======================================== */

/* Container global pour permettre le scroll dans les deux sens */
body {
    font-family: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--color-primary);
    color: #fff;
    overflow-x: hidden;
    /* Permettre le scroll au-dessus de 0 */
    min-height: 100vh;
}

/* Wrapper principal pour tout le contenu */
.main-wrapper {
    position: relative;
}

/* Projets scroll UP (AVANT le point neutre) */
.projets-up {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    margin-top: 0;
}

/*
 * Scroll UP = défilement naturel (pas d'empilement sticky).
 * L'ordre visuel est inversé via column-reverse :
 * le projet avec le plus grand num (drag-drop panel) apparaît
 * juste au-dessus du neutral-point.
 */
.projets-up .projet-card {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Blocs de transition colorimétrique
   Fond coloré seul — pas de texte intégré.
   Le texte est géré par les overlays fixes
   .baseline (DOWN) et .baseline-up (UP),
   contrôlés par l'opacité via main.js.
   ======================================== */

/*
 * DOWN : placé juste après .neutral-point, sticky top:0.
 * S'empile comme un projet quand on scrolle vers le bas.
 */
.baseline-transition--down {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * UP : placé juste au-dessus du .neutral-point (hors .projets-up),
 * défilement normal (non sticky) — apparaît dès le premier scroll UP.
 */
.baseline-transition--up {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * Titre centré dans le bloc de transition.
 * Même typographie que .baseline — taille, graisse, lettre.
 * Conditionnel : n'apparaît que si title_up / title_down est renseigné.
 */
.baseline-transition-title {
    font-size: var(--font-size-xxxxl);
    font-weight: var(--font-weight-light);
    font-variation-settings: 'wght' 300;
    line-height: var(--line-height-base);
    letter-spacing: 0.02em;
    color: var(--color-vert-tres-fonce);
    text-align: center;
    max-width: 850px;
    padding: 0 var(--spacing-lg);
    margin: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .baseline-transition-title {
        font-size: 3.8rem;
        padding: 0 var(--spacing-md);
    }
}

/* ========================================
   Baseline UP (overlay fixe — scroll vers le haut)
   ======================================== */

.baseline-up {
    position: fixed;
    left: 6px;
    right: auto;
    top: 71px;
    text-align: left;
    z-index: calc(var(--z-header) - 1);
    max-width: 850px;
    padding: var(--spacing-md);
    pointer-events: none;
    color: var(--color-vert-tres-fonce);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--border-radius-md);
}

.baseline-up p {
    font-size: var(--font-size-xxxl);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-light);
    letter-spacing: 0.02em;
    text-align: left;
    margin: 0;
}

/* **texte** = Black variable (weight 900) */
.baseline strong,
.baseline-up strong {
    font-weight: 900 !important;
    font-style: normal;
    font-variation-settings: 'wght' 900;
}

/*
 * _texte_ ou *texte* en Kirby markdown → <em> (italique par défaut).
 * Ici on surcharge pour afficher en Thin (weight 100) sans italique.
 * Utilisation dans le panel : *A* ou _A_ pour l'écriture fine.
 */
.baseline em,
.baseline-up em {
    font-style: normal;
    font-weight: 100;
    font-variation-settings: 'wght' 100;
}

@media (max-width: 768px) {
    .baseline-up {
        left: -3px;
        right: var(--header-padding-mobile);
        top: 90px;
        max-width: 400px;
    }
    .baseline-up p {
        font-size: 1.8rem;
    }
}

/* ========================================
   Images en mode cadre (framed)
   Le fond coloré du projet est visible
   autour de l'image encadrée.
   ======================================== */

/*
 * La figure passe en flex centré.
 * Le background-color reste visible autour du cadre.
 */
.is-framed-figure {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/*
 * Conteneur du cadre : 84% × 84% de la figure.
 * Sert de parent positionné pour le swiper/image absolus.
 */
.framed-container {
    position: relative;
    width: 84%;
    height: 84%;
    overflow: hidden;
}

/* Image seule dans le cadre : contain pour voir l'image entière */
.is-framed-figure .projet-image {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: transparent;
}

.is-framed-figure .projet-image-img {
    object-fit: contain !important;
    background-color: transparent;
}

/* Swiper dans le cadre : remplit le framed-container */
.is-framed-figure .projet-swiper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .framed-container {
        width: 90%;
        height: 70%;
    }
}

/* Point d'ancrage neutre (titre LA) */
.neutral-point {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Projets scroll DOWN (APRÈS le point neutre) */
.projets-down {
    position: relative;
}

.projets-down .projet-card {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projets-down .projet-card:last-child {
    position: relative;
}

/* ========================================
   Bouton retour en haut
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: var(--spacing-xl);
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: var(--z-back-to-top);
    font-family: 'Inter', sans-serif;
    font-size: 44px;
    color: var(--color-primary);
}




.back-to-top::before {
    content: '↑\FE0E'; /* \FE0E = variation selector texte, empêche Safari de rendre en emoji */
    font-family: 'Inter Variable', 'Inter', sans-serif;
    font-style: normal;
    font-variant-emoji: text;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    /* transform: translateY(-2px); */
        background-color: white;
}

/* ========================================
   Bouton retour en bas (nouveau)
   ======================================== */

.back-to-bottom {
    position: fixed;
    top: 120px;
    right: var(--spacing-xl);
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: var(--z-back-to-top);
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    color: var(--color-primary);
}

.back-to-bottom::before {
    content: '↓\FE0E'; /* \FE0E = variation selector texte, empêche Safari de rendre en emoji */
    font-family: 'Inter Variable', 'Inter', sans-serif;
    font-style: normal;
    font-variant-emoji: text;
}

.back-to-bottom.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-bottom:hover {
    /* transform: translateY(3px); */
        background-color: white;
}

/* Mobile : même taille et alignement que le bouton + du swiper
   Placé APRÈS les règles desktop pour gagner la cascade */
@media (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        right: var(--spacing-lg);
        bottom: var(--spacing-lg);
        font-size: 22px;
    }
    .back-to-bottom {
        width: 40px;
        height: 40px;
        right: var(--spacing-lg);
        top: calc(var(--header-padding-mobile) * 2 + 3rem + 50px);
        font-size: 22px;
    }
}

/* ========================================
   Page projet détail
   ======================================== */

.projet-detail {
    min-height: 100vh;
    padding-top: 100px;
}

.projet-hero {
    width: 100%;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.projet-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projet-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xxl) var(--spacing-lg);
    background: var(--color-white);
    color: var(--color-text-dark);
}

.projet-header h1 {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

.projet-meta {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.meta-item {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
}

.meta-item.status {
    color: var(--color-accent);
    font-weight: var(--font-weight-medium);
}

.projet-description {
    font-size: var(--font-size-md);
    line-height: var(--line-height-loose);
    margin-bottom: var(--spacing-xl);
    color: var(--color-text-medium);
}

.projet-texte {
    margin-bottom: var(--spacing-xl);
}

.projet-gallery {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.projet-gallery figure {
    width: 100%;
}

.projet-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.projet-gallery figcaption {
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    font-style: italic;
}

.projet-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid #ddd;
    gap: var(--spacing-sm);
}

.projet-nav a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--font-weight-regular);
    transition: opacity var(--transition-base);
}

.projet-nav a:hover {
    opacity: 0.7;
}

.nav-home {
    font-weight: var(--font-weight-medium);
}

/* ========================================
   Page À propos
   ======================================== */

.a-propos {
    min-height: 100vh;
    padding: 120px var(--spacing-sm) var(--spacing-xxl);
    background-color: var(--color-rose-clair);
}

.a-propos-container {
    /* Grille 2 colonnes sur desktop :
       - colonne principale : flexible (contenu)
       - colonne aside      : fixe 280px (contact)
       gap entre les deux colonnes */
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-areas: "main aside";
    align-items: start;
    gap: var(--spacing-xxl);
    max-width: 1100px;
    margin: 13px;
    background: transparent;
    color: var(--color-vert-fonce);
}

.a-propos h1 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    /*! margin-bottom: var(--spacing-lg); */
    color: var(--color-accent);
    margin-top: 1em;
}

/* Zones de grille */
.a-propos-main  { grid-area: main; }
.a-propos-aside { grid-area: aside; }

.a-propos-content {
    font-size: 1.5em;
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-xl);
}

/* **texte** = Black (weight 900), *texte* = Thin (weight 100) sans italique
   Même comportement que les baselines de la home */
.a-propos-content strong,
.a-propos-container strong {
    font-weight: 900;
    font-style: normal;
    font-variation-settings: 'wght' 900;
}

.a-propos-content em,
.a-propos-container em {
    font-style: normal;
    font-weight: 100;
    font-variation-settings: 'wght' 100;
}

.a-propos-content h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-regular);
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    color: var(--color-accent);
}

.a-propos-content p {
    margin-bottom: var(--spacing-sm);
}

.contact {
    padding-top: var(--spacing-lg);
    /* border-top: 1px solid #ddd; */
    margin-top: 4px;
}

.contact h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    font-size: x-large;
    line-height: 1.2em;
}

.contact-item a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.contact-item a:hover {
    opacity: 0.7;
}


.a-propos-content figure,
.a-propos-container figure,
.credits-content figure,
.credits-container figure {
    max-width: 100%;
    margin: var(--spacing-lg) 0;
}

.a-propos-content figure img,
.a-propos-container figure img,
.credits-content figure img,
.credits-container figure img {
    width: 100%;
    height: auto;
    display: block;
}

.a-propos-content figcaption,
.a-propos-container figcaption,
.credits-content figcaption,
.credits-container figcaption {
    margin-top: var(--spacing-sm);
    font-size: 0.6em;            /* Proportionnel au texte (1.8em) */
    opacity: 0.8;
    font-style: italic;
    text-align: center;
}

/* ========================================
   Page Crédits
   ======================================== */

.credits {
    min-height: 100vh;
    padding: 120px var(--spacing-sm) var(--spacing-xxl);
    background-color: var(--color-petrol-clair);
}

.credits-container {
    max-width: 800px;
    margin: 13px;
    background: transparent;
    color: var(--color-primary);
}

.credits h1 {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-lg);
    color: var(--color-accent);
}

.credits-content {
    font-size: 1em;
    font-weight: 600;
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-xl);
    line-height: var(--line-height-relaxed);
}

.credits-content h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    color: var(--color-accent);
}

.credits-content h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    color: var(--color-accent-fluo);
}

.credits-content p {
    margin-bottom: var(--spacing-sm);
}

/* .credits {
    min-height: 100vh;
    padding: 120px var(--spacing-lg) var(--spacing-xxl);
}

.credits-container {
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    padding: var(--spacing-xxl);
    color: var(--color-text-dark);
}

.credits h1 {
    font-size: var(--font-size-xxxl);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.date-maj {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.credits-content {
    line-height: var(--line-height-loose);
    margin-bottom: var(--spacing-xl);
} */

.credits-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.credit-section h2 {
    font-size: var(--font-size-S);
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.credit-section div {
    line-height: var(--line-height-relaxed);
    color: var(--color-text-medium);
}

.credits .copyright {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #ddd;
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-base);
}

/* ========================================
   Page d'erreur 404
   ======================================== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.error-container {
    text-align: center;
    max-width: 600px;
}

.error-code {
    font-size: 10rem;
    font-weight: var(--font-weight-light);
    color: var(--color-accent);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-sm);
}

.error-page h1 {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-light);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.error-message {
    font-size: var(--font-size-md);
    color: var(--color-white);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-relaxed);
}

.btn-home {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    transition: background var(--transition-base);
}

.btn-home:hover {
    background: #b82a15;
}

/* ========================================
   Footer global
   ======================================== */

.site-footer {
    position: relative;
    left: 0;
    right: 0;
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
    text-align: center;
    z-index: var(--z-footer);
    background: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    line-height: 1.8em;
}

/* Logo LA interactif */
.footer-logo {
    display: block;
    font-size: 28vw;
    line-height: 0.85;
    color: var(--color-accent);
    letter-spacing: var(--hero-letter-spacing);
    text-decoration: none;
    cursor: ew-resize;
    /* Transition douce du weight pendant l'animation auto */
    transition: opacity var(--transition-base);
    user-select: none;
}

.footer-letter-l {
    display: inline-block;
    font-weight: 900;
    font-variation-settings: 'wght' 900;
    /* La transition est gérée par JS comme sur la home */
}

.footer-letter-a {
    display: inline-block;
    font-weight: 100;
    font-variation-settings: 'wght' 100;
}

.footer-copyright {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, var(--opacity-footer));
    line-height: 3em;
    margin: 0;
}

.footer-copyright a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.footer-copyright a:hover {
    color: var(--color-accent-fluo);
}

@media (max-width: 768px) {
    .footer-logo {
        font-size: 40vw;
        cursor: default; /* Pas d'interaction souris sur mobile */
    }
}





@media (max-width: 768px) {
    header {
        padding: var(--header-padding-mobile);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .logo {
        flex: 1 1 100%;
        max-width: 100%; /* Prend toute la largeur */
        width: 100%; /* Force la largeur complète */
        font-size: clamp(var(--font-size-xl), 1.8vw, 1.1rem);
        padding-right: 0;
    }

    nav {
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: flex-start;
        gap: var(--spacing-sm);
        padding-left: 0;
    }

    nav a {
        font-size: 0.75rem;
    }

/* Titre LA plus grand sur mobile */
    .hero-title {
        font-size: var(--font-size-hero-mobile); /* 50vw au lieu de calc(100vw - 40px) */
        /*! max-width: calc(100vw - 40px); */
        left: 50%;
        right: 50%;
        transform: translateY(-57%);
        justify-content: center;
    }
    
    /* Désactive l'effet de variation de poids sur mobile
    .hero-title .letter-l,
    .hero-title .letter-a {
        font-variation-settings: 'wght' 400 !important;
        transition: none;
    } */




    .projet-header h1 {
        font-size: var(--font-size-xxl);
    }

    .a-propos h1,
    .credits h1 {
        font-size: var(--font-size-xl);
    }

    .a-propos-container,
    .credits-container {
        
    }

    .error-code {
        font-size: 6rem;
    }
    
    .error-page h1 {
        font-size: 1.8rem;
    }
    
    /* .hero-title {
        font-size: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        left: var(--header-padding-mobile);
        right: var(--header-padding-mobile);
        transform: translateY(-50%);
        justify-content: center;
    } */




    .projet-header h1 {
        font-size: var(--font-size-xxl);
    }

    .a-propos,
    .credits {
         min-height: 100vh;
    padding-top: 120px;
    }
    .a-propos h1,
    .credits h1 {
        font-size: var(--font-size-xl);
        margin-bottom: 10px;
    }


/* Mobile : colonne unique, contact EN HAUT */
.a-propos-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "aside"
        "main";
    gap: var(--spacing-lg);
    max-width: 100%;
    margin: 0;
    background: transparent;
    color: var(--color-vert-fonce);
}

    .a-propos-container,
    .credits-container {
        padding: 0px;
    }

    .a-propos-content {
    font-size: 1.5em;
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-xl);
}

.credits-container {
    max-width: 800px;
    margin: 0px;
    background: transparent;
    color: var(--color-vert-fonce);
}



    .error-code {
        font-size: 6rem;
    }
    
    .error-page h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: var(--header-padding-mobile);
    }
    
    .logo {
        font-size: var(--font-size-lg);
    }
    
    nav {
        gap: 0.75rem;
    }
    
    nav a {
        font-size: var(--font-size-l);
    }
    
    .hero-title {
        font-size: 67vw;
    }
}
/* ========================================
   Swiper - Carousel images projets
   ======================================== */

/* Container Swiper */
.projet-swiper {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
}

/* Wrapper des slides */
.projet-swiper .swiper-wrapper {
    width: 100%;
    height: 100%;
}

/* Chaque slide */
.projet-swiper .swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Images dans les slides */
.projet-swiper .swiper-slide {
    position: relative; /* contexte pour .projet-image-img absolu */
}

.projet-swiper .swiper-slide .projet-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: var(--focus-point, center);
    background-repeat: no-repeat;
}

.projet-swiper .swiper-slide .projet-image-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* S'assurer que figure ne bloque pas le swiper */
.projet-card figure {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Ajouté */
}

/* Flèche de navigation Swiper - Droite uniquement */
.swiper-button-next {
    right: var(--spacing-xl) !important;
    left: auto !important;
    width: 60px !important;
    height: 60px !important;
    background: var(--color-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--border-radius-full);
    transition: all var(--transition-base);
    z-index: 30 !important;
    font-family: 'Inter', sans-serif;
}

/* Tuer complètement le ::after de Swiper (il injecte sa propre font icon) */
.swiper-button-next:after {
    content: '' !important;
    display: none !important;
}

/* Flèche via ::before — Swiper ne touche jamais ce pseudo-élément */
.swiper-button-next::before {
    content: '↓\FE0E'; /* \FE0E = variation selector texte */
    display: inline-block;
    transform: rotate(-90deg);
    font-size: 32px;
    font-family: 'Inter Variable', 'Inter', sans-serif;
    font-style: normal;
    font-variant-emoji: text;
    font-weight: 400;
    color: var(--color-accent);
    line-height: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .swiper-button-next::before {
        font-size: 20px;
    }
}

.swiper-button-next:hover {
    background-color: white;
}

/* Masquer la flèche gauche */
.swiper-button-prev {
    display: none !important;
}

/*
 * Fix 2 — Mode framed : le .swiper-button-next est déplacé
 * hors du .framed-container via JS (overflow:hidden le clipperait).
 * Une fois enfant direct de .is-framed-figure, il se positionne
 * par rapport à la figure (position:relative) au même endroit
 * que pour les images full-screen.
 */
.is-framed-figure > .swiper-button-next {
    position: absolute !important;
    right: var(--spacing-xl);
    top: 50% !important;
    transform: translateY(-50%) !important;
}/* ========================================
   Pagination Swiper - CORRIGÉE
   ======================================== */

/* ========================================
   Pagination Swiper — compteur fractionnel
   Déplacé dans la figcaption via JS (insertBefore).
   Position dans le flux, collé en haut à gauche du bloc légende.
   ======================================== */

/* Reset complet des styles Swiper par défaut */
.swiper-pagination {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: auto !important;
    transform: none !important;
    text-align: left !important;
    display: block;
    margin-bottom: 0.5rem;
    /* Typographie */
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.12em;
    color: var(--color-text-dark);
    opacity: 0.55;
    /* Pas de fond, pas de padding — s'intègre au bloc figcaption */
    background: none;
    backdrop-filter: none;
    padding: 0;
    line-height: 1.4;
    pointer-events: none;
}

.swiper-pagination-current {
    font-weight: 700;
    opacity: 1;
}

.swiper-pagination-total {
    opacity: 0.5;
}

/* Sur mobile : même comportement, taille identique */
@media (max-width: 768px) {
    .swiper-pagination {
        font-size: var(--font-size-xs);
        margin-bottom: 0.4rem;
    }
}

/* Figcaption au-dessus du swiper */
.projet-card figcaption {
    position: absolute;
    bottom: var(--spacing-xl);
    left: var(--spacing-lg);
    max-width: 400px;
    background: var(--color-rose-tres-clair);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    z-index: 40;
    pointer-events: auto; /* Activé pour que les liens lieu soient cliquables */
}

/* Mobile */
@media (max-width: 768px) {
    .swiper-button-next {
        right:    var(--spacing-lg) !important;
        width: 40px !important;
        height: 40px !important;
    }
}
    

    
    /* 🔧 CORRECTION : Boutons back-to-neutral même taille que swiper */
    .back-to-neutral {
        width: 40px;
        height: 40px;
        right: var(--spacing-sm);
    }
    
    .back-to-neutral::after {
        font-size: 1.1rem;
    }
    

}
/* ========================================
   Styles pour les ancres automatiques des H2
   ======================================== */

/* H2 avec ancre */
.a-propos-content h2.has-anchor,
.a-propos-container h2.has-anchor,
.credits-content h2.has-anchor,
.credits-container h2.has-anchor {
    position: relative;
    scroll-margin-top: calc(var(--header-padding-desktop) * 2 + 3rem); /* Espace pour le header fixe */
}

/* Style de base pour les H2 (si pas déjà défini) */
.a-propos-content h2,
.a-propos-container h2,
.credits-content h2,
.credits-container h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-accent);
    margin-top: var(--spacing-xxl);
    /*! margin-bottom: var(--spacing-lg); */
    line-height: var(--line-height-base);
    margin-bottom: 16px;
}

/* Premier H2 sans marge top */
.a-propos-content h2:first-of-type,
.a-propos-container h2:first-of-type,
.credits-content h2:first-of-type,
.credits-container h2:first-of-type {
    margin-top: 0;
}

/* Icône de lien au survol (optionnel) */
.a-propos-content h2.has-anchor::before,
.a-propos-container h2.has-anchor::before,
.credits-content h2.has-anchor::before,
.credits-container h2.has-anchor::before {
    content: '#';
    position: absolute;
    left: -1.5em;
    color: var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
    font-weight: var(--font-weight-light);
    cursor: pointer;
}

.a-propos-content h2.has-anchor:hover::before,
.a-propos-container h2.has-anchor:hover::before,
.credits-content h2.has-anchor:hover::before,
.credits-container h2.has-anchor:hover::before {
    opacity: 0.5;
}

/* Animation de highlight quand on arrive sur l'ancre */
.a-propos-content h2.anchor-highlight,
.a-propos-container h2.anchor-highlight,
.credits-content h2.anchor-highlight,
.credits-container h2.anchor-highlight {
    animation: anchor-pulse 2s ease-out;
}

@keyframes anchor-pulse {
    0% {
        background-color: rgba(149, 34, 16, 0.2);
        padding-left: var(--spacing-sm);
        margin-left: calc(var(--spacing-sm) * -1);
    }
    100% {
        background-color: transparent;
        padding-left: 0;
        margin-left: 0;
    }
}

/* Mobile : Ajuster l'offset pour le header */
@media (max-width: 768px) {
    .a-propos-content h2.has-anchor,
    .a-propos-container h2.has-anchor,
    .credits-content h2.has-anchor,
    .credits-container h2.has-anchor {
        scroll-margin-top: calc(var(--header-padding-mobile) * 2 + 5rem);
    }
    
    /* Masquer l'icône # sur mobile */
    .a-propos-content h2.has-anchor::before,
    .a-propos-container h2.has-anchor::before,
    .credits-content h2.has-anchor::before,
    .credits-container h2.has-anchor::before {
        display: none;
    }
    
    .a-propos-content h2,
    .a-propos-container h2,
    .credits-content h2,
    .credits-container h2 {
        font-size: var(--font-size-xl);
        margin-top: var(--spacing-xl);
    }
}

/* ========================================
   Images responsive - Focus Point
   ======================================== */

/*
 * Approche unifiée : <img class="projet-image-img"> généré par renderProjectImage().
 * object-position est injectée en inline style depuis PHP (focus point).
 * Rétrocompatibilité : .projet-image (background-image) conservé si présent.
 */

.projet-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: var(--focus-point, center);
    background-repeat: no-repeat;
}

.projet-image-img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* S'assurer que le conteneur parent a position relative */
.swiper-slide {
    position: relative;
}

.projet-card figure {
    position: relative;
}