/* --- Variables et Reset --- */
:root {
    --primary-blue: #0033a0;
    --dark-blue: #0a192f;
    --light-grey: #f8f9fa;
    --text-grey: #555;
    --font-primary: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background-color: #fff;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

/* --- En-tête --- */
/* Barre supérieure */
.top-bar {
    padding: 1rem 5%;
    background-color: #fff;
}
.logo img {
    height: 60px;
}
.contact-details {
    display: flex;
    gap: 2rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 2rem;
    border-left: 1px solid #e0e0e0;
}
.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}
.contact-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-blue);
}
.contact-item p {
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* Navigation principale */
.main-navigation {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 5%;
}
.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}
.desktop-nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--dark-blue);
    padding: 1rem 0;
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.desktop-nav a.active,
.desktop-nav a:hover {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.social-links {
    display: flex;
    gap: 0.8rem;
}
.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid #ccc;
    border-radius: 50%;
    color: var(--dark-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-links a:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}

/* --- Section Hero --- */
.hero-section {
    display: flex;
    min-height: calc(100vh - 153px); /* Hauteur de l'écran moins la hauteur de l'en-tête */
}
.hero-content-left {
    flex: 1;
    background: url('assets/475855679_9558766440821231_4973890803534098363_n.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3rem 8%;
    color: #fff;
}
.hero-content-left::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 25, 47, 0.85); /* Overlay bleu foncé */
    z-index: 1;
}
.text-wrapper {
    position: relative;
    z-index: 2;
    max-width: 500px;
}
.text-wrapper h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.text-wrapper p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-content-right {
    flex: 1;
    background: url('assets/477584069_1254281762889115_1954875450711445232_n.jpg') no-repeat center center/cover;
}

/* --- RESPONSIVITÉ --- */
.hamburger-menu { display: none; }

@media (max-width: 1024px) {
    .contact-details { display: none; } /* On cache les contacts pour simplifier */
    .top-bar .header-container { justify-content: center; } /* Centre le logo */
    
    .desktop-nav, .social-links { display: none; }
    .hamburger-menu {
        display: block;
        background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--dark-blue);
    }
    .main-navigation .header-container { justify-content: flex-end; }

    .desktop-nav.active {
        display: block;
        position: absolute;
        top: 153px; /* Hauteur de l'en-tête */
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .desktop-nav.active ul {
        flex-direction: column;
        gap: 0;
    }
    .desktop-nav.active li {
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }
    .hero-content-left, .hero-content-right {
        flex: auto; /* Réinitialise le flex */
        min-height: 400px;
    }
    .text-wrapper h1 {
        font-size: 2.2rem;
    }
}

/* Style pour les boutons */
.button-wrapper {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background-color: #007BFF;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #007BFF;
    color: #fff;
}

.btn-secondary:hover {
    background-color:#0056b3 ;
}

/* --- Section des Frais de Scolarité --- */
.fees-section {
    padding: 60px 5%;
    background-color: var(--light-grey); /* Utilise la variable de couleur grise claire */
}

.fees-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    /* Crée deux colonnes de largeur égale */
    grid-template-columns: 1fr 1fr;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Pour que le border-radius s'applique correctement */
}

/* --- Icône Flottante WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}


.fee-card {
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 51, 160, 0.1); /* Ombre bleue subtile au survol */
}

/* Ligne de séparation verticale */
.fee-card:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: #e0e0e0;
}

.fee-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.fee-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-blue);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.fee-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1.1;
}

.fee-price .fee-prefix {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-grey);
    margin-bottom: 0.5rem;
}

.fee-price small {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}


/* --- RESPONSIVITÉ pour cette section --- */
@media (max-width: 768px) {
    .fees-container {
        /* Passe en une seule colonne sur mobile */
        grid-template-columns: 1fr;
    }

    /* On cache la ligne de séparation verticale */
    .fee-card:first-child::after {
        display: none;
    }

    /* On ajoute une ligne de séparation horizontale */
    .fee-card:first-child {
        border-bottom: 1px solid #e0e0e0;
    }
}

@media (max-width: 576px) {
    .fee-price {
        font-size: 2rem;
    }
    .fee-price small {
        font-size: 1.2rem;
    }
}

/* --- Section Galerie et Avantages (CSS Grid) --- */
.features-grid-section {
    /* Pas de padding pour que la grille touche les bords */
    padding: 0;
    line-height: 0; /* Empêche les espaces blancs entre les éléments de la grille */
}

.features-grid {
    display: grid;
    /* Définition de la grille : 3 colonnes */
    grid-template-columns: repeat(3, 1fr);
    /* Définition de la hauteur des lignes */
    grid-template-rows: auto auto; 
    gap: 0; /* Pas d'espace entre les éléments */
}

.grid-item {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
    min-height: 350px; /* Hauteur minimale pour chaque case */
}

/* Positionnement spécifique de chaque élément dans la grille */
.grid-item:nth-child(1) { /* Grande image */
    grid-column: 1 / 3; /* Commence à la ligne 1, s'étend jusqu'à la ligne 3 */
    grid-row: 1 / 3;    /* Commence à la colonne 1, s'étend jusqu'à la colonne 3 */
}
.grid-item:nth-child(2) { /* Texte 1 */
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}
.grid-item:nth-child(3) { /* Image borne */
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    /* Ce bloc sera au-dessus du bloc de texte grâce à l'ordre dans le HTML, 
       mais le texte sera visible grâce à sa couleur de fond. 
       Correction : On va les séparer pour que ce soit plus simple */
}

/* Correction de la grille pour un layout plus simple et fidèle */
.features-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 2 lignes de 350px de hauteur chacune */
    grid-template-rows: 350px 350px;
}
.grid-item:nth-child(1) { /* Grande image */
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}
.grid-item:nth-child(2) { /* Texte 1 */
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}


/* --- APPROCHE FINALE ET ROBUSTE AVEC CSS GRID --- */
.features-grid {
    display: grid;
    /* La grille a 3 colonnes et 2 rangées */
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(350px, auto); /* Chaque rangée fait au moins 350px */
}
.grid-item:nth-child(1) { /* Grande image */
    grid-column: span 2;
    grid-row: span 2;
}
.grid-item:nth-child(2) { /* Texte 1 */
    grid-column: 3;
    grid-row: 1;
}

/* --- VERSION FINALE CORRIGÉE EN ANALYSANT MIEUX L'IMAGE --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* La grille a 4 colonnes en réalité */
    grid-auto-rows: minmax(300px, auto);
}

.grid-item:nth-child(1) { /* Grande image */
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}
.grid-item:nth-child(2) { /* Texte 1 (bloc bleu) */
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}
.grid-item:nth-child(3) { /* Image borne */
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}
.grid-item:nth-child(4) { /* Image ordinateur */
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}
.grid-item:nth-child(5) { /* Texte 2 (bloc bleu) */
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* Styles pour les blocs de texte */
.text-block {
    background-color: var(--primary-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Style pour le bloc "Comment S'inscrire" */
.cta-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%; /* Prend la moitié de la largeur de son parent */
    background-color: var(--primary-blue);
    padding: 2rem;
}
.cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.cta-box a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- RESPONSIVITÉ --- */
@media (max-width: 992px) {
    .features-grid {
        /* Passe en 2 colonnes sur tablette */
        grid-template-columns: repeat(2, 1fr);
    }
    /* On réajuste l'ordre et la taille pour que ça reste cohérent */
    .grid-item:nth-child(1) { /* Grande image */
        grid-column: span 2;
        grid-row: 1;
    }
    .grid-item:nth-child(2) { /* Texte 1 */
        grid-column: 1;
        grid-row: 2;
    }
    .grid-item:nth-child(3) { /* Image borne */
        grid-column: 2;
        grid-row: 2;
    }
    .grid-item:nth-child(4) { /* Image ordi */
        grid-column: 1;
        grid-row: 3;
    }
    .grid-item:nth-child(5) { /* Texte 2 */
        grid-column: 2;
        grid-row: 3;
    }
    .cta-box {
        width: 100%;
        position: relative;
        background-color: rgba(0, 51, 160, 0.8);
    }
    .grid-item:nth-child(1) {
        display: flex;
        align-items: flex-end; /* Aligne le CTA en bas */
    }
}

@media (max-width: 768px) {
    .features-grid {
        /* Passe en 1 colonne sur mobile */
        grid-template-columns: 1fr;
    }
    /* L'ordre naturel du HTML fonctionne bien, pas besoin de réajuster */
    .grid-item:nth-child(1),
    .grid-item:nth-child(2),
    .grid-item:nth-child(3),
    .grid-item:nth-child(4),
    .grid-item:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
    }
}

/* --- Section Nos Formations --- */
.formations-section {
    padding: 100px 5%;
    background-color: var(--light-grey);
}

.formations-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 1rem;
}
.section-header p {
    font-size: 1.1rem;
    color: var(--text-grey);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.cycle-block {
    margin-bottom: 4rem;
}
.cycle-block:last-child {
    margin-bottom: 0;
}

.cycle-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-blue);
}
.cycle-title i {
    font-size: 2rem;
    color: var(--primary-blue);
}
.cycle-title h3 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    font-weight: 600;
}

.filiere-grid {
    display: grid;
    /* Crée autant de colonnes de 250px que possible */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filiere-card {
    background-color: #fff;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filiere-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 51, 160, 0.1);
}

.filiere-card i {
    font-size: 2.2rem;
    color: var(--primary-blue);
    flex-shrink: 0; /* Empêche l'icône de se réduire */
}

.filiere-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-blue);
    line-height: 1.4;
}


/* --- RESPONSIVITÉ pour cette section --- */
@media (max-width: 768px) {
    .formations-section {
        padding: 60px 5%;
    }
    .section-header h2 {
        font-size: 2.2rem;
    }
    .cycle-title h3 {
        font-size: 1.5rem;
    }
}

/* --- Section Contact & Localisation --- */
.location-section {
    padding: 100px 5%;
    background-color: #fff;
}

.location-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* On peut réutiliser la classe .section-header que nous avons déjà stylée ! */

.location-grid {
    display: grid;
    /* La carte prend 1.5x plus de place que le texte */
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center; /* Centre verticalement les deux colonnes */
    margin-top: 3rem;
}

.contact-info-block h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-top: 5px;
    flex-shrink: 0;
}

.info-item strong {
    font-weight: 600;
    color: var(--dark-blue);
    display: block;
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--text-grey);
    line-height: 1.5;
    margin: 0;
}

.map-block {
    height: 450px; /* Hauteur fixe pour la carte */
    border-radius: 12px;
    overflow: hidden; /* Important pour que l'iframe respecte le border-radius */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-block iframe {
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- RESPONSIVITÉ pour la section localisation --- */
@media (max-width: 992px) {
    .location-grid {
        /* Passe en une seule colonne sur tablette/mobile */
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* --- Footer Principal --- */
.main-footer {
    background-color: var(--primary-blue); /* Le bleu foncé de votre marque */
    color: #fff;
    padding: 80px 5% 0;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* Crée 4 colonnes de largeur égale */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 4rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-column p {
    color: #d0d0d0;
    margin-bottom: 1.5rem;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
}

.footer-social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #333; /* Un gris très foncé */
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.footer-social-icons a:hover {
    background-color: #555;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: #d0d0d0; /* Gris clair pour les liens */
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff; /* Blanc pur au survol */
}

/* Pour la liste des horaires qui n'est pas un lien */
.footer-links.plain-text li {
    color: #d0d0d0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #d0d0d0;
}


/* --- RESPONSIVITÉ pour le Footer --- */
@media (max-width: 992px) {
    .footer-container {
        /* Passe en 2 colonnes sur tablette */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding-top: 60px;
    }
    .footer-container {
        /* Passe en 1 colonne sur mobile */
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social-icons {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}