/* --- IMPORTATION DE LA POLICE PIXEL --- */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

body {
    background-color: #151515; 
    color: #333;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    cursor: url("../assets/images/pixel-cursor.png") 0 0, auto; 
}

/* --- CONTENEUR PRINCIPAL --- */
.folder-container {
    width: 85%;
    max-width: 1100px;
    height: 75vh;
    position: relative;
    margin-top: 100px; 
}

/* --- LES PAGES (Intercalaires) --- */
.page {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    filter: drop-shadow(0px -2px 4px rgba(0, 0, 0, 0.25)); 
    transition: filter 0.3s ease, z-index 0s;
}

#home  { top: 0px;  z-index: 3; } 
#works { top: -3px; z-index: 2; } 
#about { top: -6px; z-index: 1; } 

.page.active {
    z-index: 10 !important; 
    filter: drop-shadow(0px -6px 12px rgba(0, 0, 0, 0.4)); 
}

/* --- LE CONTENU DE LA PAGE --- */
.page-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 15px; 
    padding: 50px;
}

/* --- LES ONGLETS (Le Masque SVG Magique) --- */
.tab-btn {
    position: absolute;
    /* Moins haut qu'avant (-55px au lieu de -70px) */
    top: -55px; 
    height: 70px; 
    /* Plus large (280px au lieu de 260px) */
    width: 280px; 
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 15px; /* Recentre le texte */
    
    font-family: 'VT323', monospace;
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: #222;
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer; 
    z-index: 2;

    /* LE POCHOIR SVG : Bords très obliques et coins joliment arrondis */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M 0 100 L 15 20 Q 18 0 25 0 L 75 0 Q 82 0 85 20 L 100 100 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M 0 100 L 15 20 Q 18 0 25 0 L 75 0 Q 82 0 85 20 L 100 100 Z' fill='black'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
}

/* Positionnement : les espacements (24, 240, 456) sont des multiples de 6 !
   Cela garantit que les rayures du carton s'emboîtent au pixel près. */
#home .tab-btn  { left: 24px; }
#works .tab-btn { left: 240px; } 
#about .tab-btn { left: 456px; } 

/* --- TEXTURES ET COULEURS --- */

/* Le Carton (Home) */
.cardboard, #home .tab-btn {
    background-color: #cda372;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0, 0, 0, 0.05) 3px, rgba(0, 0, 0, 0.05) 6px),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.25'/%3E%3C/svg%3E");
}

/* Le Blanc (Works) */
.white, #works .tab-btn {
    background-color: #f7f7f7;
    background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png");
}

/* Le Rose (About) - Texture ULTRA renforcée */
.pink, #about .tab-btn {
    background-color: #F8C8D4;
    background-image: 
        /* On ajoute le filtre de bruit qu'on a utilisé pour le carton */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.25'/%3E%3C/svg%3E"),
        url("https://www.transparenttextures.com/patterns/cream-paper.png");
}

/* =========================================
   STYLE DE LA PAGE D'ACCUEIL (HOME)
   ========================================= */

/* Structure en grille : Gauche / Droite */
.home-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%; 
    position: relative;
}

.home-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Le Logo (Agrandit) */
.title-image {
    width: 100%;
    max-width: 480px; /* Plus grand qu'avant */
    height: auto;
    transform: rotate(-3deg); 
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

/* --- LES PHOTOS BRUTES (Sans cadre blanc) --- */
.home-right {
    flex: 1;
    position: relative;
    height: 100%;
}

.photo-container {
    position: absolute;
    /* On garde juste une belle ombre pour détacher la photo du fond */
    box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, z-index 0s;
}

.photo-container img {
    width: 330px; /* Photos agrandies (avant c'était 220px) */
    height: auto;
    display: block;
}

/* Effet au survol de la photo */
.photo-container:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 5px 10px 25px rgba(0,0,0,0.4);
    /* Maintient le curseur pixel sur la photo */
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important; 
}

/* --- LE FAUX SCOTCH --- */
.tape {
    position: absolute;
    top: -15px; 
    left: 50%;
    margin-left: -40px; 
    width: 80px;
    height: 25px;
    background-color: rgba(255, 255, 235, 0.7); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 2px dashed rgba(0,0,0,0.1);
    border-right: 2px dashed rgba(0,0,0,0.1);
    z-index: 5; /* S'assure que le scotch est bien par dessus la photo */
}

/* Positionnement de la Photo 1 */
.photo-1 {
    top: 10%;
    right: 30%;
    transform: rotate(-6deg);
    z-index: 2;
}

/* Positionnement de la Photo 2 */
.photo-2 {
    top: 35%;
    right: 3%;
    transform: rotate(8deg);
    z-index: 3;
}
.photo-2 .tape {
    transform: rotate(4deg); 
}

/* --- LES LOGOS PIXEL (FOOTER) --- */
.home-footer {
    position: absolute;
    bottom: 20px; /* Collé tout en bas de la couverture */
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 5px; 
}

.pixel-icon {
    width: 60px;
    image-rendering: auto; /* J'ai retiré le forçage pixelated car ton icône mail est un PNG normal et le SVG se gère seul */
    transition: transform 0.2s ease;
    filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.2));
}

.pixel-icon:hover {
    transform: scale(1.2) translateY(-5px); 
}

/* --- FIX DU CURSEUR SUR LES LIENS --- */
.social-link, .social-link:hover, .social-link * {
    /* Le !important force le navigateur à écouter NOTRE curseur et pas le sien */
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}

/* =========================================
   STYLE DE LA PAGE À PROPOS (ABOUT)
   ========================================= */

.about-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 40px;
}

/* --- GAUCHE : PHOTO ET TROMBONE --- */
.about-left {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.about-photo {
    position: relative;
    background: #fff;
    /* On remet le cadre style Polaroïd/Argentique pour cette photo */
    padding: 15px 15px 45px 15px; 
    box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.about-photo:hover {
    transform: rotate(0deg) scale(1.02);
}

.portrait-img {
    width: 260px;
    height: auto;
    display: block;
}

/* Le Trombone Pixel */
.paperclip {
    position: absolute;
    /* Règle ces deux valeurs selon la taille de ton image pour le mettre à cheval sur le bord ! */
    top: -30px; 
    left: 20px; 
    
    width: 45px; /* Ajuste la taille si besoin */
    z-index: 15; /* Toujours au-dessus de la photo */
    image-rendering: pixelated; 
    
    /* On penche légèrement le trombone pour un effet naturel posé à la main */
    transform: rotate(-3deg);
    
    /* Une petite ombre portée fine pour donner du relief par rapport au papier */
    filter: drop-shadow(2px 2px 1px rgba(0,0,0,0.5));
}

/* --- DROITE : PAGE CARNET DÉCHIRÉE --- */
.about-right {
    flex: 1.2;
    height: 90%;
    position: relative;
}

.torn-paper-wrapper {
    width: 100%;
    height: 100%;
    /* L'ombre de la feuille est appliquée ici */
    filter: drop-shadow(4px 8px 15px rgba(0,0,0,0.25));
}

.torn-paper {
    background-color: #fafafa;
    width: 100%;
    height: 100%;
    /* Espace intérieur pour que le texte respire */
    padding: 50px 40px 50px 70px;
    
    /* On arrondit uniquement les angles en haut à droite et en bas à droite */
    border-radius: 0 15px 15px 0;
    
    /* --- FONDS : Lignes + Texture --- */
    background-image: 
        /* 1. Les lignes horizontales du carnet */
        repeating-linear-gradient(transparent, transparent 31px, #cbd5e1 31px, #cbd5e1 32px),
        /* 2. La texture grain de papier appliquée par-dessus */
        url("https://www.transparenttextures.com/patterns/cream-paper.png");
    
    /* La magie pour que les lignes ne touchent pas les bords : elles ne font que 85% de large */
    background-size: 85% 100%, auto; 
    
    /* On centre les lignes horizontalement, et on répète la texture partout */
    background-position: center 10px, 0 0;
    background-repeat: no-repeat, repeat;
    
    /* --- LE MASQUE : Trous de carnet déchirés --- */
    /* On crée des demi-cercles sur la bordure gauche qui se répètent toutes les 32px (comme les lignes !) */
    -webkit-mask-image: radial-gradient(circle at -4px 16px, transparent 10px, black 11.5px);
    -webkit-mask-size: 100% 32px;
    mask-image: radial-gradient(circle at -4px 16px, transparent 10px, black 11.5px);
    mask-size: 100% 32px;
}

/* --- TEXTE DANS LE CARNET --- */
.about-title {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #222;
}

.about-list {
    list-style: none; /* Enlève les puces de base */
    margin-bottom: 30px;
}

.about-list li {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 32px; /* Calé pile sur l'espacement des lignes du carnet (32px) */
    color: #333;
}

.about-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 32px; /* Calé pile sur l'espacement des lignes du carnet */
    color: #444;
}

/* --- STICKERS PIXEL ART (PAGE ABOUT) --- */
.sticker {
    position: absolute;
    z-index: 20; 
    image-rendering: pixelated; 
    
    /* L'astuce ultime du contour blanc : 4 ombres blanches (Haut, Bas, Gauche, Droite) + l'ombre noire du relief */
    filter: 
        drop-shadow(2px 0px 0px white) 
        drop-shadow(-2px 0px 0px white) 
        drop-shadow(0px 2px 0px white) 
        drop-shadow(0px -2px 0px white); 
}

/* On retire le mouvement, on garde juste ton curseur pixelisé */
.sticker:hover {
    cursor: url("../assets/images/pixel-cursor.png") 0 0, auto !important; 
}

/* Placement individuel de chaque sticker */
.sticker-moustillon {
    /* J'ai passé la taille de 65px à 85px, tu peux encore l'augmenter si besoin ! */
    width: 105px; 
    bottom: 0.01%; 
    left: 0.01%;
    transform: rotate(-20deg);
}

.sticker-pc {
    width: 75px;
    top: 7%; 
    right: 3%;
    transform: rotate(15deg);
}

.sticker-cd {
    width: 60px;
    bottom: 10%; 
    right: 45%;
    transform: rotate(-8deg);
}

/* =========================================
   STYLE DE LA PAGE WORKS (GALERIE)
   ========================================= */

.works-gallery {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Empêche tout débordement bizarre */
}

/* --- LA GRILLE (3 colonnes) --- */
.grid-container {
    flex: 1; /* Prend tout l'espace disponible */
    min-height: 0; /* Ligne magique indispensable pour que le scroll marche */
    
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-auto-rows: max-content; /* Oblige les lignes à respecter la hauteur des carrés */
    gap: 25px; 
    align-content: start; 
    
    overflow-y: auto; /* Le scroll se fait uniquement ici */
    padding-right: 15px; /* Un peu plus d'espace à droite pour la barre de scroll */
    padding-bottom: 40px; 
    padding-top: 10px;
}

.work-item {
    position: relative;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    background-color: #000; 
    box-shadow: 2px 4px 10px rgba(0,0,0,0.1);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.4s ease;
}

/* L'overlay sombre avec le titre */
.work-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.65); 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    padding: 15px; /* Empêche le texte long de coller aux bords */
}

/* L'overlay sombre avec le titre */
.work-overlay h3 {
    color: white;
    /* Application de la police pixel */
    font-family: 'VT323', monospace; 
    /* Légèrement agrandi car cette police taille un peu plus petit */
    font-size: 1.8rem; 
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center; 
    line-height: 1.2; 
}

/* Au survol : Disparition de l'overlay transparent uniquement, SANS zoom */
.work-item:hover {
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}
.work-item:hover .work-overlay {
    opacity: 0; 
}

/* --- LE CAROUSEL --- */
.hidden {
    display: none !important;
}

.carousel-view {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Tout est centré verticalement par rapport à la page */
    align-items: center;
    position: relative; /* Indispensable pour fixer le bouton Exit dans le coin */
}

.carousel-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 85%; /* Laisse de l'espace juste pour les miniatures en bas */
}

#carousel-image {
    max-width: 100%; 
    max-height: 100%;
    object-fit: contain; 
    box-shadow: 0px 10px 30px rgba(0,0,0,0.3);
    border: none; 
}

/* --- FLÈCHES GAUCHE/DROITE --- */
.nav-btn {
    position: absolute; /* Fixées par rapport à toute la page blanche */
    top: 50%; 
    transform: translateY(-50%); /* Centrage mathématique parfait */
    background: none;
    border: none;
    font-size: 2rem; 
    color: #888; 
    padding: 15px;
    z-index: 10;
    transition: color 0.2s, transform 0.2s;
}

.prev-btn { left: 1%; }
.next-btn { right: 1%; }

.nav-btn:hover {
    color: #222;
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
    transform: translateY(-50%) scale(1.2); 
}

/* --- MINIATURES (Aperçu en bas) --- */
.carousel-thumbnails {
    display: flex;
    gap: 1px;
    margin-top: 20px;
    height: 60px; 
    justify-content: center;
    flex-shrink: 0; 
}

.thumb-img {
    height: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    opacity: 0.4; 
    transition: opacity 0.3s ease;
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}

.thumb-img:hover, .thumb-img.active {
    opacity: 1; 
}

/* --- BOUTON EXIT (Coin en bas à droite) --- */
.exit-btn {
    position: absolute;
    bottom: -45px;
    right: -20px;
    height: 90px; 
    width: auto;
    image-rendering: pixelated; 
    transition: transform 0.2s ease;
    z-index: 15; /* S'assure qu'il est toujours cliquable */
}

.exit-btn:hover {
    transform: scale(1.05);
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}

/* =========================================
   STYLE DU FOOTER HOME ET MENTIONS LÉGALES
   ========================================= */

.home-footer {
    position: absolute;
    bottom: 15px; 
    left: 0; right: 0;
    display: flex;
    flex-direction: column; /* Aligne les logos au-dessus du texte */
    align-items: center;
    gap: 10px; 
}

.social-links-container {
    display: flex;
    gap: 15px;
}

.legal-link {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: rgba(0,0,0,0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: rgba(0,0,0,0.8);
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}

/* --- LA FENÊTRE MODALE --- */
.modal-overlay {
    position: fixed; /* LA LIGNE MAGIQUE : se fixe par rapport à l'écran entier */
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 9999; /* On met un chiffre énorme pour être au-dessus des intercalaires */
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    width: 80%;
    max-width: 600px;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0px 10px 40px rgba(0,0,0,0.5);
}

.modal-content h2 {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    margin-bottom: 25px;
    text-align: center;
}

.legal-text h3 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #222;
}

.legal-text p {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #444;
}

/* Bouton Fermer */
.close-btn-pixel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: #222;
    transition: transform 0.2s ease;
}

.close-btn-pixel:hover {
    transform: scale(1.2);
    cursor: url("../assets/images/pixel-cursor.png") 0 0, pointer !important;
}

/* =========================================
   RESPONSIVE DESIGN (SMARTPHONES ET TABLETTES)
   ========================================= */

@media screen and (max-width: 768px) {

    /* Cache tous les stickers sur mobile */
    .sticker {
        display: none !important;
    }
    
    /* =========================================
       1. STRUCTURE GLOBALE SÉCURISÉE (BOÎTE HERMÉTIQUE)
       ========================================= */
    .folder-container {
        width: 95%; 
        /* La taille fixe calculée sur le pire scénario du navigateur, avec marge pour les onglets */
        height: calc(100svh - 90px); 
        margin-top: 70px; 
        /* Surtout pas de overflow: hidden ici, sinon les onglets sont décapités */
    }

    .page {
        height: auto; /* Annule la hauteur fixe de 100% */
        bottom: 0;    /* Force la page à s'étirer rigoureusement jusqu'en bas du dossier, peu importe son décalage en haut */
    }

   .page-content {
        height: 100%; 
        padding: 20px;
        overflow-y: auto; 
        overflow-x: hidden; 
        z-index: 5; /* LA CORRECTION : Force la feuille à passer par-dessus la base de l'onglet */
    }

    /* --- LES ONGLETS --- */
    .tab-btn {
        width: 36%;
        height: 50px;
        top: -40px;
        font-size: 1.2rem;
        padding-top: 10px;
    }
    
    #home .tab-btn  { left: 0; z-index: 3; }
    #works .tab-btn { left: 50%; transform: translateX(-50%); z-index: 2; }
    #about .tab-btn { left: auto; right: 0; z-index: 1; }

    /* =========================================
       2. PAGE HOME
       ========================================= */
    .home-layout {
        flex-direction: column; 
        justify-content: flex-start;
        gap: 30px; 
        /* Annule le 100% du bureau pour que la page respire si l'écran est petit */
        height: auto; 
        min-height: 100%; 
        padding-bottom: 70px; /* Laisse un espace propre pour les logos en bas */
    }
    
    .home-left {
        flex: none;
        height: auto;
        display: flex;
        justify-content: center;
    }
    
    .title-image {
        max-width: 95%; 
        margin-top: 15px;
    }

    .home-right {
        width: 100%;
        height: 380px; 
        position: relative;
    }

    .photo-container { width: 190px; }
    .photo-container img { width: 100%; height: auto; object-fit: cover; } 
    .tape { transform: scale(0.85); top: -12px; }
    .photo-1 { top: 0; left: 5%; z-index: 1; }
    .photo-2 { top: 40%; right: 5%; z-index: 2; }
    
    .home-footer { 
        bottom: 15px; 
    }

    /* =========================================
       3. PAGE ABOUT
       ========================================= */
    .about-layout {
        flex-direction: column;
        justify-content: flex-start;
        height: auto; /* Annule le 100% du bureau */
        min-height: 100%; 
        gap: 55px; /* Tes valeurs conservées */
        padding-bottom: 40px; /* Un peu d'air en bas du papier */
    }

   .about-left {
        flex: none;
        width: 100%;
        text-align: center;
        position: relative;
        margin-top: 20px; 
    }
    
    .portrait-img { 
        width: 130px; 
        height: 175px; /* Ta valeur conservée */
        object-fit: cover; 
        object-position: top; 
        display: inline-block;
    }
    
    .paperclip { 
        transform: scale(0.7); 
        left: 50%; 
        margin-left: -75px; 
        top: -35px; 
        z-index: 5;
    }

    .about-right {
        flex: none;
        width: 100%;
        height: auto;
        position: relative; 
    }

    .torn-paper {
        padding: 30px 15px 30px 50px; 
        height: max-content; /* S'adapte proprement au texte de Loeiza */
    }
    
    .about-title { font-size: 1.8rem; }
    .about-list li, .about-text { font-size: 0.95rem; }

    /* =========================================
       4. PAGE WORKS (Grille & Carousel)
       ========================================= */
    .grid-container {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
        padding-bottom: 20px;
    }
    .work-overlay h3 { font-size: 1.1rem; } 

    /* Le Carousel est de nouveau parfaitement centré */
    .carousel-view {
        height: 100%; /* Prend toute la place dispo */
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* 1. On fige la hauteur de la zone photo pour que les miniatures en bas ne bougent plus jamais */
    .carousel-content { 
        height: 72%; 
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative; /* LA CORRECTION EST ICI : Les flèches se centreront sur cette boîte */
    }
    
    /* 2. On réduit légèrement l'image pour l'écarter des flèches */
    #carousel-image {
        max-width: 75%; /* Plus petite largeur pour laisser respirer les côtés */
        max-height: 100%;
        border-width: 4px; 
    }

    /* 3. On repousse les flèches aux extrémités de l'écran */
    .nav-btn { 
        font-size: 1.8rem; 
        padding: 5px; 
        z-index: 10; 
    }
    .prev-btn { left: -5px; } 
    .next-btn { right: -5px; }

    .exit-btn { 
        position: relative; /* Arrête de flotter au-dessus de tout */
        align-self: flex-end; /* S'aligne automatiquement tout à droite de la page */
        margin-top: 15px; /* Crée un espace strict SOUS les miniatures */
        margin-right: 5%; /* Garde une marge avec le bord de l'écran */
        height: 80px; 
        
        /* OBLIGATOIRE : On désactive les réglages de l'ordinateur pour ne plus qu'ils interfèrent */
        bottom: auto; 
        right: auto; 
    }

    .carousel-thumbnails { 
        display: flex;
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        width: 90%;
        height: 60px; /* Taille fixe pour garantir que ça s'affiche bien */
        margin-top: 15px; 
        justify-content: flex-start; 
        gap: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .carousel-thumbnails::-webkit-scrollbar { display: none; }
    .carousel-thumbnails img { flex: 0 0 auto; }
    
    /* =========================================
       5. MENTIONS LÉGALES
       ========================================= */
    .modal-content { width: 95%; padding: 25px; }
    .modal-content h2 { font-size: 2rem; }
    .legal-text h3 { font-size: 1rem; }
    .legal-text p { font-size: 0.85rem; }
    }
    /* --- CACHER LE BADGE NETLIFY --- */
a[href*="netlify.com"] {
    display: none !important;
}
