:root {
    --bg-color: #000000f5;
    --card-bg: #0d0d0d;
    --text-color: #fff; 
    --font-main: 'Space Grotesk', Arial, sans-serif;
    
    /* VARIABLES HSL SIMPLES (Contrôlées par JS) */
    --glow-hue: 300;        
    --glow-sat: 100%;       
    --glow-light: 70%;      
    --glow-opacity: 0.45;   

    /* Couleurs Neon */
    --neon-son: #ffffff;    

    /* Variables JS injectées */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* 1. La base (léger par défaut pour un look moderne) */
body {
    font-family: var(--font-main);
    font-weight: 300; 
}

/* 2. Les titres (bien gras) */
h1, h2, .project-level-title, .project-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3. Les boutons et liens du menu (graisse moyenne) */
.box, .filter-btn, .action-btn, #backButton {
    font-weight: 500;
    letter-spacing: 2px;
}

/* 4. Les badges de catégorie (un peu plus gras pour la lisibilité) */
.category-badge {
    font-weight: 400;
    font-size: 0.7rem;
}

/* 5. Les descriptions (léger) */
.project-description, .profile-text p {
    font-weight: 300;
    line-height: 1.6;
}



body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}


#intro-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000; /* Fond noir pendant le chargement */
    z-index: 9999; /* Au-dessus de tout, même du curseur */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* La vidéo remplit l'écran sans déformation */
}

#skip-intro {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    font-weight: 500;
    padding: 15px 35px;
    border-radius: 15px;
    cursor: pointer;
    z-index: 10000;
    transition: 400ms ease-in-out;
}

#skip-intro:hover {
    transform: scale(1.05);
    background: white;
    color: black;
    box-shadow: 0 0 10px 0 rgba(255, 255, 255, 0.5);
    
}

/* Classe pour cacher l'intro */
.intro-hidden {
    opacity: 0;
    visibility: hidden;
}




/* =========================================================
    AURORA LUMINEUSE ANIMÉE
   ========================================================= */
body::after {
    content: '';
    position: fixed;
    left: -6vw; right: -6vw; bottom: -35vh; height: 40vh;
    background:
    radial-gradient(circle at 15% 65%, rgba(155, 73, 11, 0.7), transparent 48%),
    radial-gradient(circle at 35% 55%, rgba(209, 110, 255, 0.75), transparent 50%),
    radial-gradient(circle at 55% 60%, rgba(80, 140, 255, 0.72), transparent 52%),
    radial-gradient(circle at 75% 58%, rgba(17, 71, 159, 0.74), transparent 50%),
    radial-gradient(circle at 50% 75%, rgba(255, 60, 60, 0.68), transparent 55%);
    filter: blur(200px);
    opacity: 0.85;
    pointer-events: none;
    z-index: -2;
    animation: aurora-flow 8s ease-in-out infinite alternate, aurora-shift 10s ease-in-out infinite, aurora-breathe 20s ease-in-out infinite;
}

@keyframes aurora-flow {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(2vw, -2vh, 0) scale(1.04); }
    100% { transform: translate3d(-2vw, -1vh, 0) scale(1.02); }
}
@keyframes aurora-shift {
    0%, 100% { background-position: 18% 55%, 60% 45%, 82% 78%, 38% 80%, 45% 70%; }
    50% { background-position: 22% 52%, 56% 48%, 78% 74%, 42% 78%, 48% 72%; }
}
@keyframes aurora-breathe {
    0% { opacity: 0.75; } 50% { opacity: 0.95; } 100% { opacity: 0.65; }
}

/* GLOW SOURIS */
#mainContent::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(480px circle at var(--mouse-x) var(--mouse-y), hsla(var(--glow-hue), var(--glow-sat), var(--glow-light), 0.30) 0%, rgba(0,0,0,0) 78%);
    filter: blur(150px); opacity: 0.9; pointer-events: none;
}

/* --- STRUCTURE GÉNÉRALE --- */
#mainContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* --- MODIFICATION 1 : CONTENEUR PLEINE LARGEUR POUR COLLER LA SCROLLBAR --- */
.project-view {
    width: 100%;       /* Prend toute la largeur de l'écran */
    max-width: none;   /* Supprime la limite qui créait la scrollbar flottante */
    height: 100vh;     /* Toute la hauteur */
    padding-top: 15vh;
    overflow-y: auto;  /* Scrollbar sur le bord du navigateur */
    scrollbar-color: #444 transparent; /* Scrollbar sombre pour Firefox */
    scrollbar-width: thin;
    
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre le contenu (titre, grille) au milieu de la page */
}

/* Style Webkit (Chrome/Safari) pour une scrollbar discrète */
.project-view::-webkit-scrollbar {
    width: 8px;
}
.project-view::-webkit-scrollbar-track {
    background: transparent;
}
.project-view::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.project-view::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}









.project-level-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff !important; 
    text-align: center;
    margin-bottom: 2rem;
    opacity: 1 !important;
}

/* --- ONGLETS (FILTRES) --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(42, 42, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: none; 
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}
.filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--neon-son);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* --- MODIFICATION 2 : GRILLE PROJETS (MAX 3 PAR LIGNE) --- */
.project-grid {
    display: grid;
    /* Force exactement 3 colonnes de taille égale */
    grid-template-columns: repeat(3, 1fr); 
    gap: 2rem; /* Espace un peu plus grand entre les cartes */
    
    width: 90%; /* Largeur relative à l'écran */
    max-width: 1200px; /* Ne dépasse jamais 1200px pour rester lisible */
    padding-bottom: 10vh;
    margin: 0 auto; /* Centrage horizontal */
    transition: opacity 0.2s ease-in-out;
}

/* Carte Projet Glassmorphism */
.project-card {
    background: rgba(31, 31, 31, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: none;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: rgba(45, 45, 45, 0.5);
}

/* Style par défaut : Noir et Blanc */
.project-placeholder {
    width: 100%;
    height: 200px; /* Ajuste selon tes besoins */
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
    position: relative;
}

/* Au survol de la CARTE, l'image devient colorée */
.project-card:hover .project-placeholder {
    filter: grayscale(0%);
}

.category-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.project-info {
    padding: 1.5rem;
    color: #fff;
    flex-grow: 1; /* Pousse le contenu pour remplir la carte */
}
.project-title { color: var(--neon-son); font-weight: bold; margin-bottom: 0.5rem; font-size: 1.1rem; }
.project-description { color: #aaa; font-size: 0.9rem; line-height: 1.4; }


.project-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Si tu veux que la vidéo prenne toute la largeur de la colonne */
.video-container {
    column-span: all; /* Optionnel : pour que la vidéo traverse les deux colonnes */
    margin-bottom: 20px;
}


/* --- BOITES PAGE D'ACCUEIL (MENU) --- */
/* --- ACCUEIL VERSION BENTO GRID --- */
.container {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    grid-template-rows: 200px 200px;
    gap: 1.5rem;
    width: 90%;
    max-width: 740px;
}

.box {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(15deg, rgba(255, 178, 140, 0.103) 0%, rgba(66, 66, 66, 0.174) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px 0 rgba(0, 1, 23, 0.844);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;

    /* --- LES LIGNES AJOUTÉES POUR LE BLANC --- */
    color: #fff !important;      /* Force le texte en blanc */
    text-decoration: none;       /* Enlève le soulignement des liens */
}

/* On s'assure que même visité, le lien reste blanc */
.box:visited, .box:active, .box:focus {
    color: #fff !important;
}

/* On définit les tailles spécifiques pour chaque bouton */
.box:nth-child(1) { /* PROJETS */
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background: linear-gradient(135deg, rgba(255, 178, 140, 0.09) 0%, rgba(255,255,255,0) 100%);
}

.box:nth-child(2) { /* PROFIL */
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.box:nth-child(3) { /* CONTACT */
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* Effets visuels Bento */
.box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    opacity: 0;
    transition: opacity 0.4s;
}

.box:hover::before {
    opacity: 1;
}

.box:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #fff !important; /* Garde le blanc au survol */
}



/* --- BOUTON RETOUR --- */
#backButton {
    position: fixed; /* Fixé pour ne pas bouger au scroll */
    top: 2rem; left: 2rem;
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff; font-size: 1rem; font-weight: 500;
    cursor: none; padding: 0.8rem 1.5rem;
    border-radius: 50px; transition: all 0.3s ease;
    z-index: 100; backdrop-filter: blur(5px);
}
#backButton:hover {
    transform: translateX(-5px);
    border-color: var(--neon-son);
    color: var(--neon-son);
    background: rgba(255, 255, 255, 0.05);
}

/* --- VUE DÉTAILLÉE (CARROUSEL) --- */
.project-carrousel-view {
    position: relative; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}
.project-details {
    width: 90vw; 
    max-width: 900px; 
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(20, 20, 20, 0.425);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 16px;
    padding: 3rem;
    
    /* FLEXBOX CONFIG */
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; /* Aligne tout le contenu à gauche */
    
    /* L'ESPACE ENTRE TEXTE ET IMAGES */
    gap: 40px; /* Ajuste cette valeur (40px) pour augmenter ou réduire l'espace */
}

/* Optionnel : pour être sûr que le texte ne s'étale pas trop */
.terminal-content {
    width: 100%;
    text-align: left;
    margin-bottom: 10px; /* Un petit plus de sécurité sous la description */
}
/* Scrollbar pour la boite de détails */
.project-details::-webkit-scrollbar { width: 6px; }
.project-details::-webkit-scrollbar-track { background: transparent; }
.project-details::-webkit-scrollbar-thumb { background-color: #555; border-radius: 10px; }

/* --- VERSION CORRIGÉE : ALIGNEMENT CÔTE À CÔTE --- */
.project-gallery {
    display: flex;          /* On passe en flexbox pour aligner horizontalement */
    flex-wrap: wrap;        /* Permet de passer à la ligne sur mobile */
    gap: 20px;              /* L'espace entre les colonnes */
    width: 100%;
    align-items: flex-start; /* Aligne le haut du lecteur et de l'image */
}

.gallery-item {
    /* Expliquation : 
       flex: 1 -> l'élément grandit pour prendre l'espace
       min-width: 300px -> en dessous de cette largeur, ils s'empilent (mobile)
       calc(50% - 10px) -> pour qu'ils fassent environ la moitié de la largeur
    */
    flex: 1 1 calc(50% - 10px); 
    min-width: 300px; 
    
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    display: block; /* Changé de inline-block à block pour flexbox */
}

/* On s'assure que le conteneur Spotify ne force pas la pleine largeur */
.spotify-embed-container {
    width: 100% !important; /* Il prend toute la largeur de sa "moitié" de colonne */
    margin-bottom: 0 !important; 
}

.project-gallery-image {
    width: 100%; 
    height: auto; 
    display: block;
    filter: grayscale(100%); 
    transition: filter 0.5s ease;
}

.project-gallery-image:hover { 
    filter: grayscale(0%); 
}


/* --- FIX ÉTIREMENT --- */
.gallery-item {
    /* flex-grow: 0 empêche l'élément de s'étirer pour remplir le vide */
    flex: 0 1 calc(50% - 10px); 
    min-width: 300px; 
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    display: block;
    cursor: pointer; /* Indique qu'on peut cliquer */
}

/* --- SYSTÈME DE ZOOM (LIGHTBOX) --- */
#lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 20000; /* Au-dessus de tout */
    cursor: zoom-out;
}

#lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lightbox-overlay.active {
    display: flex;
}

#lightbox-overlay.active img {
    transform: scale(1);
}





/* --- SYSTÈME DE ZOOM AVANCÉ (LIGHTBOX + SLIDER) --- */
#lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8); /* Fond sombre */
    backdrop-filter: blur(15px);    /* L'EFFET DE FLOU SOUHAITÉ */
    -webkit-backdrop-filter: blur(15px);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 20000;
    user-select: none;
}

#lightbox-overlay img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transition: transform 0.3s ease-out;
}

/* --- LIGHTBOX ÉPURÉE --- */
#lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px); /* Flou de l'arrière-plan */
    -webkit-backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#lightbox-overlay img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    user-select: none;
}

/* Flèches ultra-simples */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 5rem; /* Grand pour être cliquable */
    font-weight: 100; /* Très fin */
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    padding: 20px;
    z-index: 100000;
}

.lightbox-nav:hover {
    opacity: 1;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.close-lightbox {
    position: absolute;
    top: 20px; right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.5;
}

/* Version Mobile */
@media (max-width: 768px) {
    .lightbox-nav { font-size: 3rem; padding: 10px; }
    .close-lightbox { top: 10px; right: 20px; }
}




/* --- OPTIMISATION MOBILE --- */
@media (max-width: 600px) {
    .gallery-item {
        flex: 1 1 100%; /* Sur tout petit écran, prend toute la largeur */
    }
}
/* FLÈCHES NAV */
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: none;
    color: var(--neon-son); opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
    padding: 20px; z-index: 1000;
}
.nav-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.2); }
.nav-arrow svg { width: 40px; height: 40px; }
.left-arrow { left: 20px; }
.right-arrow { right: 20px; }

/* --- MISE EN PAGE PROFIL (HISTOIRE) --- */
.profile-layout {
    display: flex; 
    gap: 3rem; 
    width: 100%; 
    align-items: flex-start; 
    margin-top: 1rem;
    padding-bottom: 2rem; /* Espace en bas pour éviter que ce soit collé */
}

.profile-text { 
    flex: 1; 
    text-align: left; 
    line-height: 1.8; 
    color: #f6f6f6; 
    
    /* ACTIVATION DU SCROLL */
    max-height: 500px; /* Ajuste cette hauteur selon tes besoins */
    overflow-y: auto; 
    padding-right: 15px; 
}

/* Personnalisation de la barre de défilement pour qu'elle soit jolie */
.profile-text::-webkit-scrollbar {
    width: 4px;
}
.profile-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.profile-text::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 10px;
}

.profile-image { 
    flex: 1; 
    border-radius: 8px; 
    overflow: hidden; 
    position: sticky; /* L'image reste visible pendant que le texte défile */
    top: 0;
}

.profile-image img { 
    width: 100%; 
    height: auto; 
    display: block; 
}

/* CURSEUR & TEXTE */
html, body { cursor: none !important; }
h1.main-title-overlay {
    font-size: 3rem; font-weight: 800; color: #fff;
    margin-bottom: 3rem; text-align: center;
}
#customCursorGlow {
    position: fixed; top: 0; left: 0; width: 32px; height: 32px;
    background: url('logo_curseur.png') center / contain no-repeat;
    pointer-events: none; z-index: 9999;
    opacity: 0.65; transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.1s ease;
}
.cursor-active { opacity: 1 !important; transform: translate(-50%, -50%) scale(1.1); }
a, button, .box, .project-card, .filter-btn { cursor: none !important; }


/* --- STYLES SPÉCIFIQUES PROFIL (CORRIGÉ) --- */

.profile-content-wrapper {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(31, 31, 31, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    
    /* FIX : On limite la hauteur pour qu'elle tienne dans l'écran */
    max-height: 70vh; 
    display: flex;
    flex-direction: column;
    
    /* FIX : On autorise le scroll SEULEMENT à l'intérieur de cette boîte */
    overflow-y: auto; 
}

/* Customisation de la barre de scroll interne pour qu'elle soit discrète */
.profile-content-wrapper::-webkit-scrollbar {
    width: 6px;
}
.profile-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* Conteneur parent : On change 'hidden' en 'auto' pour que les PROJETS puissent défiler */
.project-view {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center ici peut gêner la grille, on peut le laisser si 
       on gère bien le padding-top */
    padding: 12vh 0 5vh 0; 
    
    /* FIX : 'auto' permet de scroller la grille de projets normalement */
    overflow-y: auto; 
    overflow-x: hidden;
}

/* Layout Histoire */
.profile-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start; /* Aligné en haut pour le scroll interne */
    width: 100%;
}

.profile-text {
    flex: 1; /* Donne un peu plus de place au texte */
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
    text-align: left;
}

.profile-image {
    flex: 2;
    position: sticky; /* L'image reste visible pendant qu'on scroll le texte */
    top: 0;
    aspect-ratio: 4 / 3; 
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* Layout Centré (pour CV et Vibe) */
.profile-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Bouton d'action (Télécharger CV) */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: none;
}

.action-btn:hover {
    background: var(--neon-son);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* ========================================
   SPOTIFY EMBED STYLES
   ======================================== */
   .spotify-embed-container {
    width: 100%;
    column-span: all; 
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(27, 27, 27, 0.2);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}


.spotify-embed-container iframe {
    display: block;
    width: 100%;
    min-height: 352px;
    border-radius: 12px;
}

/* Version mobile */
@media (max-width: 850px) {
    .spotify-embed-container {
        margin-bottom: 20px;
    }
    
    .spotify-embed-container iframe {
        height: 232px;
    }
}






/* =========================================================
   RESPONSIVE (TABLETTES & MOBILES) - VERSION FINALE
   ========================================================= */

   @media (max-width: 850px) {


    @media (max-width: 850px) {
        /* --- TITRE ACCUEIL --- */
        h1.main-title-overlay.home-title-active {
            font-size: 1.8rem !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            line-height: 1.2 !important;
            width: 100% !important;
            padding: 0 20px !important;
            text-align: center !important;
        }
    
        .title-part-name { font-weight: 800; }
        .title-part-portfolio { font-size: 1.3rem; color: #bbb; margin-top: 5px; }
    
        


        /* --- CENTRAGE DU BOUTON SKIP (Formule magique) --- */
        #skip-intro {
            position: absolute !important;
            bottom: 50px !important; /* Ajuste la hauteur ici */
            left: 50% !important;
            transform: translateX(-50%) !important; /* Centre parfaitement par rapport au milieu */
            right: auto !important;
            width: auto !important;
            padding: 12px 30px !important;
            white-space: nowrap !important;
        }
    
        /* --- NAVIGATION --- */
        #backButton {
            top: 1rem !important;
            left: 1rem !important;
            z-index: 10001;
        }
    
        /* Autres ajustements mobiles */
        .container { width: 85%; }
        .project-grid { grid-template-columns: 1fr; }
        .project-details { width: 95vw; padding: 1.5rem; }
        .project-gallery { column-count: 1; }
    }

    /* --- TITRE PRINCIPAL (Accueil uniquement) --- */
    h1.main-title-overlay.home-title-active {
        font-size: 1.8rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.3 !important;
        margin-bottom: 2rem !important;
        /* Marges de sécurité sur les côtés */
        width: 100% !important;
        padding: 0 25px !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /* Titres des autres pages (Portfolio, Profil) */
    .project-level-title {
        display: block !important; 
        font-size: 2rem !important;
        margin-top: 20px !important;
        text-align: center !important;
    }

    /* Structure interne du titre accueil */
    .home-title-active .title-part-name {
        display: block;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .home-title-active .title-part-portfolio {
        display: block;
        font-weight: 700;
        color: #ddd;
        font-size: 1.4rem;
        margin-top: 5px;
    }

    /* --- BENTO MENU (ACCUEIL) --- */
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
        width: 85%;
    }
    
    .box:nth-child(1), .box:nth-child(2), .box:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
        height: 120px !important;
        font-size: 1.2rem;
    }

    /* --- GRILLE DE PROJETS --- */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 92%;
    }

    /* --- FILTRES --- */
    .filter-container {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    /* --- PAGE PROFIL (HISTOIRE) --- */
    .profile-content-wrapper {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .profile-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .profile-image {
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .profile-text {
        max-height: none;
        padding-right: 0;
        font-size: 1rem;
    }

    /* --- DÉTAILS PROJET (CARROUSEL) --- */
    .project-details {
        width: 95vw;
        padding: 1.2rem;
    }
    .project-gallery {
        column-count: 1;
    }

    /* --- NAVIGATION --- */
    #backButton {
        top: 1.5rem; /* Corrigé : point au lieu de virgule */
        left: 1rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    #skip-intro {
        position: absolute !important;
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important; /* C'est ça qui centre parfaitement */
        padding: 12px 25px !important;
        font-size: 0.9rem !important;
        white-space: nowrap !important;
        width: auto !important;
        right: auto !important; /* Annule le right: 20px précédent */
    }

    /* --- VIDÉO D'INTRO --- */
    #intro-layer {
        background: #000;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        width: 100vw;
    }

    #intro-video {
        object-fit: contain; 
        width: 100% !important;
        height: 100% !important;
    }

    .nav-arrow { display: none; }

    /* --- CURSEUR & EFFETS --- */
    #customCursorGlow, body::before {
        display: none !important;
    }
    html, body {
        cursor: auto !important;
        overflow-y: auto;
    }
}

/* Petits mobiles (iPhone SE, etc.) */
@media (max-width: 400px) {
    h1.main-title-overlay.home-title-active {
        font-size: 1.5rem !important;
    }
    .box {
        height: 100px !important;
    }
}