/* =========================================
   1. VARIABLES ET BASE (Reset)
   ========================================= */
:root {
    --bg-color: #0f0f0f;
    /* Anthracite très sombre */
    --card-bg: #1a1a1a;
    /* Légèrement plus clair pour les cartes */
    --text-main: #f0f0f0;
    /* Blanc cassé */
    --text-muted: #888888;
    /* Gris pour le texte secondaire */
    --accent: #ffffff;
    /* Accent blanc pur */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.4s ease;
}

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

/* --- SÉLECTION DE TEXTE PERSONNALISÉE --- */
::selection {
    background: var(--text-main);
    /* Fond blanc */
    color: var(--bg-color);
    /* Texte noir */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* =========================================
   2. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* STYLE DU BOUTON BURGER (Base) */
.burger {
    display: none;
    /* Caché sur PC */
}

.burger div {
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    margin: 6px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Bouton principal */
.btn-main {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* --- SWITCH LANGUE (VERSION PC) --- */
.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 40px;
    /* On pousse le bouton loin du menu "À propos" */

    /* Sécurité pour empêcher le bug de superposition : */
    position: relative;
    top: auto;
    right: auto;

    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

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

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

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

/* Ajustement Mobile : on cache le switch dans le burger ou on l'adapte */
@media screen and (max-width: 768px) {
    .lang-switch {
        position: absolute;
        /* Sur mobile, il doit flotter */
        top: 28px;
        right: 70px;
        left: auto;
        margin: 0;
        z-index: 2001;
    }
}

/* =========================================
   3. HEADER & HERO
   ========================================= */
header {
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 1s forwards 0.2s;
}

.subtitle {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.5rem);
    max-width: 600px;
    opacity: 0;
    animation: fadeUp 1s forwards 0.4s;
}

/* =========================================
   4. PORTFOLIO & GRILLE
   ========================================= */
section {
    padding: 5rem 10%;
}



.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 3rem;
    border-left: 2px solid var(--text-main);
    padding-left: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Style des Cartes (Modifié pour le Tilt 3D et Barre Noire) */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    /* Garde l'image à l'intérieur */

    /* --- AJOUTS POUR LA 3D --- */
    transform-style: preserve-3d;
    /* Indispensable pour l'effet de profondeur */
    transform: perspective(1000px);
    /* Donne la perspective */

    transition: var(--transition);
    /* Garde tes transitions fluides */
    position: relative;
    /* aspect-ratio: 4/3;  <-- On retire le ratio forcé pour laisser la place au texte */
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Ajoute aussi ce petit bloc juste après pour que le reflet suive les bords arrondis */
.js-tilt-glare {
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.card figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card img {
    width: 100%;
    /* height: 100%; <-- On laisse la hauteur auto pour l'image */
    height: 250px;
    /* On fixe une hauteur d'image pour l'uniformité si on veut, ou object-fit */
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.patrimoine-card img {
    height: 450px;
}

.patrimoine-card .card-info {
    border-top: none;
    background: transparent;
    padding-top: 2rem;
}

.card:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.card-info {
    /* Anciennement absolute, maintenant on le remet dans le flux pour faire la barre noire */
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 1.2rem;
    background-color: #000000;
    /* La fameuse barre noire */
    opacity: 1;
    /* Toujours visible */
    transform: none;
    transition: var(--transition);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover .card-info {
    background-color: #050505;
    /* Légère variation au survol */
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================
   5. PAGE À PROPOS
   ========================================= */
/* --- Mise à jour pour empiler la bio et le formulaire --- */
.about-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* <--- C'est la ligne magique ! (Empile verticalement) */
    justify-content: center;
    padding: 120px 10% 50px 10%;
    /* J'ai ajouté un peu de marge en bas aussi */
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: -20px 20px 0px rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

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

    .about-text {
        order: 2;
    }

    .about-image {
        order: 1;
    }
}

/* =========================================
   6. MODALE (Legacy / Sécurité)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: auto;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

/* Images dans la modale / pages */
.modal-img {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* =========================================
   7. FOOTER (AVEC ICÔNES)
   ========================================= */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-icons {
    display: flex;
    gap: 20px;
    /* Espace entre les icônes */
    margin-top: 0.5rem;
}

.social-icons a {
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Au survol, l'icône devient blanche et monte un peu */
.social-icons a:hover {
    color: var(--text-main);
    transform: translateY(-3px);
}

/* =========================================
   8. ANIMATIONS
   ========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   9. FILTRES PROJETS
   ========================================= */
.filter-container {
    margin-bottom: 3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 30px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text-main);
    color: var(--bg-color);
    border-color: var(--text-main);
}

/* =========================================
   11. LOADER
   ========================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: pulse 1.5s infinite;
}

.loader-img {
    width: 80px;
    height: auto;
    display: block;
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-main);
    text-transform: uppercase;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

/* =========================================
   12. STATISTIQUES PROJET
   ========================================= */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* =========================================
   13. VERSION MOBILE (RESPONSIVE)
   ========================================= */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* On affiche le burger et on le met au-dessus du menu déroulant */
    .burger {
        display: block;
        z-index: 2000;
    }

    /* Le menu qui glisse */
    .nav-links {
        position: fixed;
        right: 0px;
        height: 100vh;
        top: 0;
        background-color: var(--bg-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transform: translateX(100%);
        /* Caché à droite */
        transition: transform 0.5s ease-in-out;
        z-index: 1500;
    }

    /* Les liens dans le menu mobile */
    .nav-links li {
        margin: 2rem 0;
        opacity: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Classe activée par JS */
    .nav-active {
        transform: translateX(0%);
    }

    /* Animation d'apparition des liens */
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Animation de la Croix (Burger) */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* --- Ajustement du bouton FR/EN sur mobile --- */
.lang-switch {
    position: absolute;
    top: 28px;
    /* On l'aligne verticalement avec le burger */
    right: 70px;
    /* On le place à DROITE (à côté du burger) */
    left: auto;
    /* IMPORTANT : on annule l'alignement gauche */
    margin: 0;
    z-index: 2001;
}

/* =========================================
   14. FORMULAIRE DE CONTACT
   ========================================= */
.contact-section {
    margin-top: 5rem;
    padding-bottom: 5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form {
    width: 100%;
    max-width: 500px;
    /* On limite la largeur pour que ce soit joli */
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Quand on clique dans le champ */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

/* Le bouton envoyer */
.contact-form button {
    margin-top: 1rem;
    transition: transform 0.2s;
}

.contact-form button:hover {
    transform: scale(1.02);
}

/* =========================================
   15. PAGE 404 (ERREUR) - MODIFIÉE
   ========================================= */
.error-wrapper {
    /* On calcule la hauteur totale moins la barre de menu pour un centrage parfait */
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    /* Pousse le contenu sous le menu */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Le conteneur du "4-Brique-4" */
.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Espace entre les chiffres et la brique */
    margin-bottom: 1rem;
}

/* Le style des chiffres "4" (contour) */
.error-num {
    font-size: clamp(6rem, 15vw, 12rem);
    /* Taille adaptative géante */
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--text-muted);
    /* Le contour gris */
}

/* Le style de l'image de la brique (le "0") */
.error-brick {
    /* J'ai augmenté drastiquement les valeurs ci-dessous */
    height: clamp(8rem, 20vw, 16rem);
    /* C'était 5rem avant */

    width: auto;
    object-fit: contain;

    filter: drop-shadow(0 0 2px #ffffff);
    transform: rotate(-8deg) translateY(0px);
    /* J'ai retiré le translateY pour qu'elle reste centrée */
    opacity: 0.9;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-desc {
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   16. LIGHTBOX (ZOOM IMAGE)
   ========================================= */
.lightbox {
    display: none;
    /* Caché par défaut */
    position: fixed;
    z-index: 10000;
    /* Au-dessus de tout, même du menu */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* Fond presque noir */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
    /* Indique qu'on peut fermer */
}

/* Classe ajoutée par JS pour afficher */
.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    /* Petit effet de zoom à l'ouverture */
    transition: transform 0.3s ease;
    cursor: default;
    /* Pas de curseur sur l'image elle-même */
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--text-muted);
}

/* Petit détail : On change le curseur des images de la galerie pour dire "clique-moi" */
.grid figure img {
    cursor: zoom-in;
}

/* =========================================
   17. BARRE DE DÉFILEMENT PERSONNALISÉE (SCROLLBAR)
   ========================================= */

/* Pour Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 10px;
    /* Largeur de la barre verticale */
}

/* Le fond de la barre (le rail) */
::-webkit-scrollbar-track {
    background: var(--bg-color);
    /* On reprend la couleur de fond du site */
}

/* La partie mobile (le pouce) */
::-webkit-scrollbar-thumb {
    background-color: #333;
    /* Gris foncé discret */
    border-radius: 5px;
    /* Bords arrondis */
    border: 2px solid var(--bg-color);
    /* Petite marge autour pour l'élégance */
}

/* Quand on passe la souris dessus */
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
    /* Devient un peu plus clair */
}

/* Pour Firefox (Syntaxe différente) */
html {
    scrollbar-width: thin;
    /* Barre fine */
    scrollbar-color: #333 var(--bg-color);
    /* Couleur pouce / Couleur fond */
}

/* =========================================
   19. BOUTON RETOUR EN HAUT (BACK TO TOP)
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--text-main);
    /* Blanc */
    color: var(--bg-color);
    /* Noir */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    /* Invisible au début */
    visibility: hidden;
    transform: translateY(20px);
    /* Descend un peu pour l'anim */
    transition: all 0.4s ease;
    z-index: 999;
    /* Par dessus le contenu */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Classe ajoutée par JS quand on scrolle */
.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent);
    /* Reste blanc pur */
    transform: translateY(-5px);
    /* Monte un peu au survol */
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
    /* Lueur */
}

/* =========================================
   20. CONFIGURATION SMOOTH SCROLL
   ========================================= */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* =========================================
   21. EASTER EGG (PLUIE DE LEGO)
   ========================================= */
.lego-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Pour pouvoir cliquer au travers */
    z-index: 99999;
    overflow: hidden;
}

.falling-brick {
    position: absolute;
    top: -50px;
    /* Commence au-dessus de l'écran */
    width: 40px;
    height: 25px;
    border-radius: 2px;
    /* Petit effet 3D simple (bordure) */
    border-bottom: 4px solid rgba(0, 0, 0, 0.2);
    border-right: 4px solid rgba(0, 0, 0, 0.2);
    animation: fall linear forwards;
}

/* Les "tenons" (studs) sur la brique pour faire réaliste */
.falling-brick::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 4px;
    width: 10px;
    height: 4px;
    background: inherit;
    /* Même couleur que la brique */
    box-shadow: 18px 0 0 inherit;
    /* Le 2ème tenon */
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
        /* Tombe et tourne */
    }
}

/* =========================================
   22. PAGE COMING SOON (TEASING)
   ========================================= */
.coming-soon-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    text-align: center;
}

.coming-container {
    max-width: 800px;
    width: 90%;
}

/* Effet Silhouette */
.silhouette-container {
    position: relative;
    margin: 3rem auto;
    width: 100%;
    max-width: 600px;
}

/* =========================================
   19. COMING SOON PAGE
   ========================================= */
.coming-soon-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 5% 50px 5%;
    text-align: center;
}

.silhouette-img {
    width: 100%;
    height: auto;
    /* C'est ici la magie : on rend l'image totalement noire (ou presque) */
    filter: brightness(0) drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
    opacity: 0.8;
    transition: all 0.5s ease;
}

/* Petit effet au survol : on devine un peu les détails */
.silhouette-container:hover .silhouette-img {
    filter: brightness(0.2) drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

.question-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: 900;
    color: var(--text-main);
    opacity: 0.1;
    pointer-events: none;
}

/* Barre de progression */
.progress-wrapper {
    margin: 2rem auto;
    max-width: 400px;
    text-align: left;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--text-main);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.mystery-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.mystery-desc {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* =========================================
   FIX FINAL : FORCER L'AFFICHAGE PC
   (Ce code s'applique uniquement sur les grands écrans)
   ========================================= */
@media screen and (min-width: 769px) {
    .lang-switch {
        position: static !important;
        /* Force le bouton à ne pas flotter */
        transform: none !important;
        margin-left: 30px !important;
        /* Force l'espace avec le menu */
        margin-right: 0 !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
    }

    /* On s'assure que le menu ne touche pas le bouton */
    .nav-links {
        margin-right: 0;
    }
}

/* =========================================
   23. BARRE DE PROGRESSION (LECTURE)
   ========================================= */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    /* Épaisseur de la ligne */
    background: var(--text-main);
    /* Blanc (ou mets une couleur hex : #8a2be2 pour violet) */
    width: 0%;
    /* Au début, c'est à 0 */
    z-index: 99999;
    /* Au-dessus de TOUT (même du menu) */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    /* Petite lueur */
    transition: width 0.1s linear;
    /* Fluidité */
}

/* --- BOUTONS SUIVANT / PRÉCÉDENT (LIGHTBOX) --- */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--text-muted);
}

@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 10px;
    }
}

/* VIDEO NATIVE */
.video-native {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.video-native:hover {
    transform: scale(1.01);
}

/* Style des points (le rond rouge/blanc) */
.Hotspot {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background-color: var(--text-main);
    /* Blanc */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s;
}

.Hotspot:hover {
    transform: scale(1.2);
    background-color: #ff0000;
    /* Devient rouge au survol */
}

/* L'étiquette de texte (cachée par défaut) */
.HotspotAnnotation {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    position: absolute;
    transform: translate(-50%, -150%);
    /* On la place au-dessus du point */
    width: max-content;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Affiche le texte quand on survole le point */
.Hotspot:hover .HotspotAnnotation {
    opacity: 1;
}

/* Nouveau style pour le visionneur 3D */
.model-3d-container {
    width: 100%;
    height: 500px;
    /* Reset to original */

    /* Fond blanc demandé */
    background-color: #ffffff;

    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin: 2rem 0;
    position: relative;
}

model-viewer {
    width: 100%;
    height: 100%;
    /* Fond blanc explicite pour le composant aussi, par sécurité */
    background-color: #ffffff;
}

/* =========================================
   17. MAP INTERACTIVE
   ========================================= */
#map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
    /* S'assure que le menu passe au dessus */
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 2rem 0;
    background-color: #262626;
    /* Evite le fond blanc si on dézoom trop */
}

/* Custom Popup Styles for Dark Theme */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 10px;
    text-align: center;
}

.popup-img {
    width: 100%;
    max-width: 250px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.popup-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #333333;
    font-family: var(--font-main);
}

.popup-city {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}