/* BASE STYLES & TYPOGRAPHY */
:root {
    /* Light Mode Colors */
    --color-primary: #81C784;       /* Soft Mint Green */
    --color-secondary: #FFD54F;     /* Soft Gold */
    --color-background: #F9FAFC;    /* Near-white soft grey */
    --color-text: #212121;          /* Deep Charcoal */
    --color-text-light: #555555;    /* Subdued Text */
    --color-surface: #FFFFFF;       /* Card/Container Background */

    /* Typography */
    --font-header: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Spacing & Effects */
    --spacing-sm: 1.5rem;
    --spacing-lg: 3rem;
    --border-radius: 12px;
    --transition-speed: 0.3s ease-in-out;
}

/* --- Styles Généraux --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1, h2, h3 {
    font-family: var(--font-header);
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* --- Correction : Classe Container pour centrage et padding --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Padding Mobile */
}

/* --- Correction : Classe Section pour espacement vertical --- */
.section {
    padding: var(--spacing-lg) 0; 
    width: 100%; 
}

/* Section avec un fond légèrement coloré */
.section-colored {
    background-color: var(--color-surface); 
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
}

/* Animations: subtle fade */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out; /* Transition plus longue pour l'effet 'subtle' */
}

/* --- Styles des Boutons --- */
.button {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    transition: background-color var(--transition-speed), transform 0.2s;
    border: none;
    cursor: pointer;
}

.button-primary {
    background-color: var(--color-primary);
    color: white;
}

.button-primary:hover {
    background-color: #68B46B; /* Ton plus sombre de Mint Green */
    transform: translateY(-2px);
}

.button-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

.button-secondary:hover {
    background-color: #FFC43B; /* Ton plus vif de Gold */
    transform: translateY(-2px);
}

/* --- Header & Navigation --- */
#header {
    background-color: var(--color-surface);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}

.container-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-primary);
}

/* Desktop Nav (cachée par défaut) */
.desktop-nav {
    display: none; 
    align-items: center;
    gap: 2rem;
}
.desktop-nav a:not(.nav-cta) {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.desktop-nav .nav-cta {
    text-decoration: none;
    padding: 0.2rem;
    border-radius: 5%;
}

/* Hamburger Menu (visible par défaut) */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 99;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-text);
    transition: all var(--transition-speed);
    border-radius: 2px;
}

/* ---------------------------------------------------- */
/* --- État ACTIF : Le Hamburger devient une Croix (X) --- */
/* ---------------------------------------------------- */

/* 1. Cache la barre du milieu */
.hamburger-menu.active .bar{
    background-color: white;
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

/* 2. Fait pivoter la barre supérieure (celle du haut) */
.hamburger-menu.active .bar:nth-child(1) {
    /* Translate vers le centre puis pivote de 45 degrés */
    transform: translateY(11.5px) rotate(45deg); 
}

/* 3. Fait pivoter la barre inférieure (celle du bas) */
.hamburger-menu.active .bar:nth-child(3) {
    /* Translate vers le centre puis pivote de -45 degrés */
    transform: translateY(-5px) rotate(-45deg);
}

/* Optionnel : Assurer que la croix est blanche sur le menu overlay sombre */
body.dark-mode .hamburger-menu.active .bar,
.mobile-nav-overlay.active + .hamburger-menu .bar { /* La couleur des barres */
    background-color: white; 
}

/* Mobile Nav Overlay (caché par défaut) */
.mobile-nav-overlay {
    display: none;
    /* Ajoutez plus de styles pour le positionnement fixe et le fond sombre ici */
}

/* --- Hero Section --- */
#hero {
    position: relative; /* Très important pour positionner le carrousel en arrière-plan */
    overflow: hidden; /* Cache les parties des images qui débordent */
    padding: 6rem 0;
    text-align: center;
}

/* Conteneur pour le carrousel d'arrière-plan */
.hero-background-carousel {
    position: absolute; /* Positionne le carrousel par rapport à la section #hero */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place le carrousel derrière le contenu du hero */
    background-size: cover; /* Couvre toute la zone */
    background-position: center; /* Centre l'image */
    transition: background-image 1.5s ease-in-out; /* Transition douce entre les images */
    filter: brightness(0.7); /* Assombrit légèrement l'image pour que le texte ressorte */
}


/* Assurez-vous que le texte et les boutons sont centrés dans leur conteneur */
.hero-text {
    /* Si vous avez un div autour du texte, assurez-vous qu'il prend toute la largeur */
    width: 100%;
}

/* S'assurer que le contenu du héro est au-dessus et bien lisible */
.hero-content {
    position: relative; /* Assure que le contenu est au-dessus du carrousel */
    z-index: 1; /* Met le contenu au premier plan */
    color: white; /* Texte blanc pour contraster avec le fond assombri */
}
.hero-content .headline, .hero-content .subhead, .hero-content p {
    color: white; /* Forcer le texte en blanc */
}

/* Adapter les couleurs des boutons si nécessaire pour le contraste */
.hero-content .button-primary {
    background-color: var(--color-primary); /* Garder le vert clair */
    color: white !important;
}
.hero-content .button-primary:hover {
    background-color: #68B46B;
}

/* Mode sombre : ajuste la luminosité des images de fond */
body.dark-mode .hero-background-carousel {
    filter: brightness(0.5); /* Encore plus sombre en mode sombre */
}

.headline {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subhead {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* --- Why Choose Us (Features Grid) --- */
.features-grid {
    display: flex;
    flex-direction: column; /* Mobile : colonnes empilées */
    gap: var(--spacing-lg);
    text-align: center;
}

.feature-item {
    background-color: var(--color-surface);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* --- Contact Form --- */
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.teacher-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 1rem;
    border: 4px solid var(--color-primary);
}

.teacher-card h3 {
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.teacher-title {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

/* --- Logo --- */

.logo1 {
    width: 70px;
    height: 50px;
}

/* --- Footer --- */
#footer {
    background-color: var(--color-text); /* Fond charbon pour le footer */
    color: var(--color-surface);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.footer-col h4 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: var(--color-surface);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--color-primary);
}


/* --- DARK MODE OVERRIDES --- */
body.dark-mode {
    --color-background: #121212;
    --color-text: #E0E0E0;
    --color-text-light: #A0A0A0;
    --color-surface: #1E1E1E;
    --color-primary: #4CAF50; /* Vert plus vif */
    --color-secondary: #FFC107; /* Gold plus vif */
}

/* --- VIDEO LIBRARY SECTION --- */
.video-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    gap: 2rem;
    margin: 0 auto;
    max-width: 900px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Mobile Nav Overlay (Caché par défaut) --- */
.mobile-nav-overlay {
    display: none; /* Le cacher par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9); /* Fond sombre pour contraste */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 3rem;
}

.mobile-nav-overlay a, #dark-mode-toggle {
    color: white; 
    font-size: 1.5rem;
    margin: 1rem 0;
    text-decoration: none;
    background: none; 
    border: 1px solid white; /* Bordure pour le bouton Dark Mode */
    padding: 10px 20px; 
    border-radius: 8px;
    cursor: pointer;
}

.mobile-nav-overlay .nav-cta {
    background-color: var(--color-primary); 
    border: none;
}

.mobile-nav-overlay .button-primary {
    background-color: var(--color-primary);
}

/* --- RESPONSIVE MEDIA QUERIES --- */

@media (min-width: 200px) {
    .logo {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .header {
        font-size: 1rem;
    }
    .logo {
        font-size: 1rem;
    }
    .container {
        padding: 0 2rem; /* Desktop Padding */
    }

    /* Header: Montrer la navigation desktop, cacher le hamburger */
    .hamburger-menu, .mobile-nav-overlay {
        display: none !important;
    }
    .desktop-nav {
        display: flex;
    }
    
    /* Grilles à 2 colonnes */
    .about-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr); 
        max-width: 100%;
    }
    
    .contact-layout {
        display: grid;
        grid-template-columns: 1.5fr 2fr; /* Info plus petite que le formulaire */
        gap: 4rem;
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
    .container-logo {
        margin: 0.5rem;
    }
}

@media (min-width: 1024px) {
    .headline {
        font-size: 3.5rem;
    }
    
    /* Grille à 3 colonnes pour les fonctionnalités */
    .features-grid {
        flex-direction: row;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .container-logo {
        margin: 0.5rem;
    }
}