/* stages-noel.css */

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

html, body {
    width: 100%;
    max-width: 100%; /* Empêche tout dépassement */
    overflow-x: hidden; /* Coupe tout ce qui dépasse sur les côtés */
    background-color: #000;
}
/* CORRECTION DU BODY */
body {
    background-color: #000;
    font-family: 'Exo 2', sans-serif;
    color: white;
    
    /* IMPORTANT : Utiliser 100% et non 100vw pour éviter le rouge et le débordement */
    width: 100%; 
    max-width: 100%;
    
    /* Coupe tout ce qui dépasse sur les côtés */
    overflow-x: hidden; 
    
    min-height: 100vh;
    position: relative;
}

/* --- LE FOND ANIMÉ (L'ARBRE) --- */
#christmas-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* ASTUCE : On décale le fond de 25% vers la droite. 
       L'arbre étant au centre du canvas, il se retrouve à droite de l'écran */
    transform: translateX(25%); 
    transition: transform 0.5s ease; /* Transition douce si on redimensionne */
}

canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- BOUTON RETOUR --- */
.nav-back {
    position: absolute;
    top: 70px;
    left: 40px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00ffff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}
.nav-back:hover {
    background: #00ffff;
    color: #000;
    box-shadow: 0 0 15px #00ffff;
}

/* --- CONTENEUR PRINCIPAL --- */
.content-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    
    /* 1. On garde l'alignement horizontal à gauche */
    justify-content: flex-start; 
    
    /* 2. CHANGEMENT ICI : On aligne en HAUT au lieu du centre */
    align-items: flex-start; 
    
    /* 3. AJOUT ICI : On pousse vers le bas (par exemple 30% de la hauteur de l'écran) */
    padding-top: 15vh; 
    
    /* Le reste ne change pas */
    padding-left: 10%; 
    padding-right: 20px;
}

/* --- LA CARTE DE TEXTE --- */
.frost-card {
    background: rgba(12, 20, 35, 0.85); /* Un peu plus opaque pour la lisibilité */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    
    /* On limite la largeur pour laisser la place à l'arbre à droite */
    width: 100%;
    max-width: 550px; 
    
    text-align: left; /* Texte aligné à gauche c'est souvent plus propre */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: slideInLeft 1s ease-out;
}

.frost-card h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    color: #00ffff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    line-height: 1.1;
}

.subtitle {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
    font-weight: 300;
}

/* --- BOITE DETAILS --- */
.details-box {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
    border-left: 4px solid #ff00ff;
}

.details-box h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ff00ff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.details-box ul {
    list-style: none;
}

.details-box li {
    margin-bottom: 12px;
    font-size: 1.05rem;
    display: flex;
    align-items: flex-start;
}

.details-box li strong {
    color: white;
    margin-right: 5px;
}

.details-box li::before {
    content: "❄️";
    margin-right: 12px;
    font-size: 0.9rem;
    margin-top: 3px; /* Alignement icone */
}

/* --- BOUTON CTA --- */
.cta-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 18px 40px;
    background: linear-gradient(90deg, #00ffff, #0088ff);
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    width: 100%; /* Bouton pleine largeur dans la carte */
    text-align: center;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- RESPONSIVE MOBILE --- */
/* --- RESPONSIVE MOBILE & TABLETTE --- */
/* --- RESPONSIVE MOBILE (CORRECTIF FORCÉ) --- */
/* --- RESPONSIVE MOBILE (CORRECTIF FINAL) --- */
@media (max-width: 1000px) {

    /* 1. LE FOND (SAPIN) */
    /* On le fixe en arrière-plan et on le centre */
    #christmas-bg {
        position: fixed !important;
        top: 0; left: 0;
        width: 100vw;
        height: 100vh;
        transform: translateX(0) !important; /* On annule le décalage PC */
        z-index: 0;
    }

    /* 2. LE CONTENEUR PRINCIPAL */
    .content-wrapper {
        /* On casse le centrage vertical */
        display: block !important; 
        
        /* C'EST ICI LA CLÉ : */
        /* On pousse le contenu vers le bas de 75% de la hauteur de l'écran.
           Ainsi, au chargement, l'utilisateur voit 75% de sapin vide. */
        padding-top: 75vh !important; 
        
        /* Marge en bas pour pouvoir scroller jusqu'au bout */
        padding-bottom: 100px; 
        padding-left: 15px;
        padding-right: 15px;
        
        height: auto !important;
        min-height: 100vh;
    }

    /* 3. LA CARTE DE TEXTE */
    .frost-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        
        /* On renforce le fond pour bien lire par dessus le bas du sapin */
        background: rgba(10, 15, 25, 0.95); 
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8); /* Ombre vers le haut */
    }

    /* 4. LE BOUTON ACCUEIL */
    .nav-back {
        position: absolute !important; /* Il défilera avec la page et disparaîtra */
        
        /* On le place assez haut pour ne pas gêner l'étoile, mais visible */
        top: 100px !important; 
        
        /* Centré horizontalement */
        left: 50% !important;
        transform: translateX(-50%);
        
        font-size: 0.8rem;
        padding: 8px 16px;
        background: rgba(0, 0, 0, 0.5); /* Plus discret */
        border-color: rgba(0, 255, 255, 0.5);
        z-index: 20;
    }
    
    /* Ajustement titre mobile */
    .frost-card h1 {
        font-size: 1.8rem;
    }
}
/* --- GUIRLANDE LUMINEUSE (Lightrope) --- */
.lightrope {
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    position: absolute;
    z-index: 5;
    
    /* --- CORRECTION ICI --- */
    /* On enlève le -15px et on met 0, voire un peu de padding */
    margin: 0; 
    padding-top: 20px; /* On descend la guirlande de 20px pour tout voir */
    /* ---------------------- */
    
    pointer-events: none;
    width: 100%;
    top: 0;
    left: 0;
}

.lightrope li {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 0 20px; /* Espacement horizontal */
    
    /* Animation et couleur par défaut (Vert) */
    background: rgba(0,247,165,1);
    box-shadow: 0px 4.6px 24px 3px rgba(0,247,165,1);
    animation: flash-1 2s infinite both;
}

/* Variantes de couleurs et timing */
.lightrope li:nth-child(2n+1) {
    background: rgba(0,255,255,1); /* Cyan */
    box-shadow: 0px 4.6px 24px 3px rgba(0,255,255,0.5);
    animation-name: flash-2;
    animation-duration: 0.4s;
}

.lightrope li:nth-child(4n+2) {
    background: rgba(247,0,148,1); /* Magenta/Rose */
    box-shadow: 0px 4.6px 24px 3px rgba(247,0,148,1);
    animation-name: flash-3;
    animation-duration: 1.1s;
}

.lightrope li:nth-child(odd) { animation-duration: 1.8s; }
.lightrope li:nth-child(3n+1) { animation-duration: 1.4s; }

/* Le petit connecteur noir au dessus de l'ampoule */
.lightrope li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 10px;
    height: 9.3px;
    border-radius: 3px;
    top: -4.6px;
    left: 1px;
}

/* Le fil qui relie les ampoules */
.lightrope li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 52px;
    height: 18.6px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.lightrope li:last-child:after {
    content: none;
}

.lightrope li:first-child {
    margin-left: -40px;
}

/* --- ANIMATIONS DE CLIGNOTEMENT --- */
@keyframes flash-1 { 
    0%, 100% { 
        background: rgba(0,247,165,1);
        box-shadow: 0px 4.6px 24px 3px rgba(0,247,165,1);
    } 
    50% { 
        background: rgba(0,247,165,0.4);
        box-shadow: 0px 4.6px 24px 3px rgba(0,247,165,0.2);
    }
}

@keyframes flash-2 { 
    0%, 100% { 
        background: rgba(0,255,255,1);
        box-shadow: 0px 4.6px 24px 3px rgba(0,255,255,1);
    } 
    50% { 
        background: rgba(0,255,255,0.4);
        box-shadow: 0px 4.6px 24px 3px rgba(0,255,255,0.2);
    }
}

@keyframes flash-3 { 
    0%, 100% { 
        background: rgba(247,0,148,1);
        box-shadow: 0px 4.6px 24px 3px rgba(247,0,148,1);
    } 
    50% { 
        background: rgba(247,0,148,0.4);
        box-shadow: 0px 4.6px 24px 3px rgba(247,0,148,0.2);
    }
}