/* ========================================================= */
/* 0. Variables Globales (à mettre en début de votre fichier CSS) */
/* ========================================================= */
:root {
    /* Couleurs principales */
    --primary-color: #007BFF;       /* Bleu (Actions/Highlight) */
    --secondary-color: #6C757D;      /* Gris (Boutons secondaires) */
    --text-dark: #343A40;
    --text-light: #F8F9FA;          /* Blanc cassé (texte sur fond sombre) */
    --highlight-color: #5ad4db ;     /* Vert éclatant (mise en évidence) */
    --bg-dark-blue: #0c1524;        /* Bleu très sombre (fond du ciel) */
}

/* ========================================================= */
/* 1. HERO SECTION & CONTENEUR PRINCIPAL */
/* ========================================================= */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: var(--text-light);
    z-index: 1; 
    padding: 100px 0;
    border-bottom-left-radius: 160px 10px;
    border-bottom-right-radius: 160px 10px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
    z-index: 2; /* Contenu au-dessus du fond animé */
}

/* Zone de texte */
.text-content {
    flex: 1;
    max-width: 50%;
}

.text-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.text-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.highlight {
    color: var(--highlight-color);
    font-weight: 700;
}


/* ========================================================= */
/* 2. BOUTONS D'ACTION (CTA) */
/* ========================================================= */
.cta-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    user-select: none;
}

.btn i {
    margin-left: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}


/* ========================================================= */
/* 3. CARROUSEL (Optimisé pour Fondu enchaîné) */
/* ========================================================= */
.carousel-wrapper {
    flex: 1;
    max-width: 50%;
    position: relative;
}

.carousel-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Conteneur des images - Définit la hauteur */
.carousel {
    position: relative; 
    width: 100%;
    height: 400px; /* Hauteur fixe essentielle pour les images absolues */
}

/* Images empilées (position: absolute pour le fondu) */
.carousel img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    position: absolute; 
    left: 0;
    top: 0;
    opacity: 0; 
    z-index: 1; 
    /* La transition est gérée par le JS pour s'assurer qu'elle correspond */
    /* transition: opacity 0.6s ease-in-out; */
}


/* Flèches de navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--text-light);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
    z-index: 10;
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-arrow.left { left: 10px; }
.carousel-arrow.right { right: 10px; }

/* Dots de Navigation */
.carousel-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* Les dots sont des boutons dans la version JS finale */
.carousel-nav button.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    text-indent: -9999px;
    overflow: hidden;
    padding: 0; /* Important pour les boutons */
}

.carousel-nav button.carousel-dot.active {
    background-color: var(--primary-color);
}

/* Stats Overlay */
.stats-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 15px 25px;
    z-index: 5; 
    color: var(--text-light);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}


/* ========================================================= */
/* 4. ARRIÈRE-PLAN ANIMÉ (Aurore Boréale & Particules) */
/* ========================================================= */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark-blue); 
    z-index: 0; 
}

/* Couches de dégradé (les "voiles" de l'Aurore) */
.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    mix-blend-mode: screen; 
    filter: blur(80px); 
    animation: aurora-move 40s ease-in-out infinite alternate;
}

/* Définition des couleurs spécifiques pour chaque couche */
.bg-gradient:nth-child(1) {
    background: radial-gradient(circle at 10% 90%, #6dd5ed, transparent 50%);
    top: 0;
    left: 0;
}
.bg-gradient:nth-child(2) {
    background: radial-gradient(circle at 70% 20%, #4facfe, transparent 50%);
    bottom: 0;
    right: 0;
    animation-delay: -5s;
    animation-duration: 45s;
}
.bg-gradient:nth-child(3) {
    background: radial-gradient(circle at 40% 50%, #65c7f7, transparent 60%);
    top: 50%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 35s;
}
.bg-gradient:nth-child(4) {
    background: radial-gradient(circle at 90% 10%, #70e1f5, transparent 70%);
    bottom: 10%;
    right: 10%;
    animation-delay: -15s;
    animation-duration: 50s;
}

/* Keyframes pour le mouvement lent des voiles de l'Aurore */
@keyframes aurora-move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vw, -10vh) scale(1.1); }
}

/* Particules (Étoiles) */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 50%;
    opacity: 0.7;
    animation: twinkle 5s linear infinite alternate;
}

/* Positionnement des particules (ajuster selon votre préférence) */
.particle:nth-child(6) { top: 10%; left: 30%; animation-delay: 0s; }
.particle:nth-child(7) { top: 80%; left: 60%; animation-delay: 1s; }
.particle:nth-child(8) { top: 25%; left: 85%; animation-delay: 2s; }
.particle:nth-child(9) { top: 50%; left: 10%; animation-delay: 3s; }
.particle:nth-child(10) { top: 65%; left: 75%; animation-delay: 4s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Effet Shimmer (Brillance subtile) */
.shimmer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    animation: shimmer 15s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}


/* ========================================================= */
/* 5. RESPONSIVE DESIGN (Mobile et Tablette) */
/* ========================================================= */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto; /* Laisse le contenu dicter la hauteur */
        padding: 60px 0;
    }
    
    .hero-container {
        flex-direction: column; /* Empile le texte et le carrousel */
        text-align: center;
        gap: 30px;
    }

    .text-content,
    .carousel-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .text-content h1 {
        font-size: 2.5rem;
    }
    
    .text-content p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        justify-content: center; /* Centre les boutons */
    }

    .carousel {
        height: 300px; /* Réduction de la hauteur du carrousel sur mobile */
    }

    .stats-overlay {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 15px;
    }

    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .carousel-arrow {
        /* Rendre les flèches moins intrusives sur mobile */
        padding: 8px 12px;
        width: 35px;
        height: 35px;
        line-height: 15px;
    }
}

/* Petite optimisation pour les très petits écrans */
@media (max-width: 576px) {
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
}