/* --- Variables et Reset --- */
:root {
    --color-yellow: #f3b63a;
    --color-dark-blue: #2a3a5e;
    --color-white: #ffffff;
    --color-text: #333;
    --font-primary: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-primary); }
.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 {
    background-color: #004AAD;
    padding: 0.8rem 5%;
    font-size: 0.9rem;
    color: #fff;
}
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 1.5rem; }
.top-bar a { text-decoration: none; color: var(--color-dark-blue); font-weight: 600; }
.top-bar i { margin-right: 0.5rem; }
.social-icons { display: flex; gap: 1rem; }
.social-icons a { font-size: 1.1rem; }
.search-form { display: flex; }
.search-form input {
    border: 1px solid var(--color-dark-blue);
    border-right: none;
    padding: 0.5rem;
    border-radius: 5px 0 0 5px;
}

.social-icons a {
    color: #fff;
}

.top-bar-left a {
    color: #fff;
}
.search-form button {
    border: 1px solid var(--color-dark-blue);
    background-color: var(--color-white);
    padding: 0 0.8rem;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

/* Navigation principale */
.main-nav {
    background-color: var(--color-white);
    padding: 0.5rem 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo img { height: 80px; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a {
    text-decoration: none;
    color: var(--color-dark-blue);
    font-weight: 600;
    padding: 1.5rem 0.5rem;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease;
}
.nav-links a:hover { border-bottom-color: var(--color-yellow); }

.btn-admission {
    border: 2px solid var(--color-yellow);
    color: var(--color-dark-blue);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.btn-admission:hover { background-color: var(--color-yellow); }

/* --- Section Hero --- */
.hero-section {
    height: 85vh;
    background: url('assets/72286504_1811265639016912_719482604914475008_n.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--color-white);
    padding: 0 8%;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(42, 58, 94, 0.85) 0%, rgba(42, 58, 94, 0.4) 100%);
}
.hero-content {
    position: relative;
    max-width: 600px;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.hero-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.btn-savoir-plus {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.btn-savoir-plus:hover { background-color: #3e5771; }

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

@media (max-width: 1024px) {
    .nav-links, .btn-admission { display: none; }
    .top-bar-right, .top-bar-left span, .top-bar-left a:last-of-type { display: none; } /* Simplifie le top-bar */
    .top-bar .header-container { justify-content: center; }
    .hamburger-menu {
        display: block;
        background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--color-dark-blue);
    }
    .main-nav .header-container { justify-content: space-between; }

    .nav-links.active, .btn-admission.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .main-nav { position: relative; }
    .nav-links.active {
        position: absolute;
        top: 100%; left: 0;
        background: var(--color-white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }
    .nav-links.active li { padding: 0.5rem 0; }
    .nav-links.active a { padding: 1rem; border: none; }
    .btn-admission.active {
        position: absolute;
        top: calc(100% + 6 * 57px); /* Position sous le menu */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        margin: 1rem 0;
        z-index: 100;
        background: var(--color-white);
    }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .hero-content { text-align: center; }
    .hero-section::before { background: rgba(42, 58, 94, 0.7); } /* Overlay plus uniforme */
    .hero-content h1 { font-size: 2.5rem; }
}

/* --- Section Présentation connect'academia --- */
.presentation-section {
    padding: 70px 5%;
    background-color: var(--color-white);
    
}

.presentation-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.video-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: auto;
}

.video-wrapper {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Responsive pour la section présentation */
@media (max-width: 900px) {
    .presentation-container {
        flex-direction: column;
        gap: 2rem;
    }
    .video-wrapper {
        max-width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

@media (max-width: 600px) {
    .presentation-section {
        padding: 30px 2%;
    }
    .video-wrapper {
        max-width: 100vw;
        aspect-ratio: 16 / 9;
    }
}
/* --- Section Galerie ESM (CSS Grid) --- */
.gallery-grid-section {
    padding: 0; /* La grille doit toucher les bords */
    line-height: 0; /* Évite les espaces blancs inattendus */
}

.gallery-grid-container {
    display: grid;
    /* Définition de la grille : 3 colonnes de largeurs différentes */
    grid-template-columns: 2fr 1fr 1fr; /* La 1ère colonne est 2x plus large */
    /* Définition de la hauteur des rangées */
    grid-auto-rows: minmax(300px, auto); /* Chaque rangée fait au moins 300px */
}

.grid-cell-gallery {
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Positionnement spécifique de chaque cellule */
.grid-cell-gallery:nth-child(1) { /* Grande image */
    grid-column: 1 / 2; /* Prend la 1ère colonne */
    grid-row: 1 / 3;    /* S'étend sur 2 rangées */
}
.grid-cell-gallery:nth-child(2) { /* Texte 1 */
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}
.grid-cell-gallery:nth-child(3) { /* Image étudiantes */
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}
.grid-cell-gallery:nth-child(4) { /* Logo */
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    background-color: #fff; /* Fond blanc pour le logo */
}
.grid-cell-gallery:nth-child(5) { /* Texte 2 */
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

/* Style des blocs de texte */
.text-block-blue {
    background-color: #0033a0; /* Un bleu roi, proche de l'image */
    color: #fff;
    display: flex;
    align-items: center;
    padding: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 600;
}

/* Style de la cellule du logo */
.logo-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.logo-cell img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Style du CTA "S'inscrire" */
.cta-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0033a0;
    color: #fff;
    padding: 1.5rem 2.5rem;
}
.cta-overlay h3 {
    font-size: 2rem;
    font-weight: 700;
}


/* --- RESPONSIVITÉ pour la galerie --- */
@media (max-width: 992px) {
    .gallery-grid-container {
        /* Passe en 2 colonnes sur tablette */
        grid-template-columns: 1fr 1fr;
    }
    /* On réarrange les éléments pour une disposition logique */
    .grid-cell-gallery:nth-child(1) { grid-column: 1 / 3; grid-row: 1; } /* Grande image prend toute la largeur */
    .grid-cell-gallery:nth-child(2) { grid-column: 1 / 2; grid-row: 2; }
    .grid-cell-gallery:nth-child(3) { grid-column: 2 / 3; grid-row: 2; }
    .grid-cell-gallery:nth-child(4) { grid-column: 1 / 2; grid-row: 3; }
    .grid-cell-gallery:nth-child(5) { grid-column: 2 / 3; grid-row: 3; }
}

@media (max-width: 768px) {
    .gallery-grid-container {
        /* Passe en 1 colonne sur mobile */
        grid-template-columns: 1fr;
    }
    /* L'ordre est maintenant défini par le HTML, pas besoin de réajuster */
    .grid-cell-gallery:nth-child(1),
    .grid-cell-gallery:nth-child(2),
    .grid-cell-gallery:nth-child(3),
    .grid-cell-gallery:nth-child(4),
    .grid-cell-gallery:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
        min-height: 250px;
    }
    .text-block-blue {
        text-align: center;
    }
}

/* --- Section Filières BBS --- */
.bbs-filiere-section {
    padding: 80px 5%;
    background-color: #004AAD; /* Utilisation du bleu foncé */
    color: var(--color-white); /* Texte blanc pour contraste */
}

.filiere-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center; /* Centrer le contenu */
}

/* Tabs */
.bbs-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* Ligne subtile */
    padding-bottom: 1rem;
}
.bbs-tab-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background-color: transparent;
    border: 2px solid var(--color-yellow); /* Bordure jaune */
    color: var(--color-yellow); /* Texte jaune */
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.bbs-tab-button:hover {
    background-color:#004AAD;
    color: var(--color-dark-blue); /* Texte bleu foncé */
}

.bbs-tab-button.active {
    background-color: var(--color-yellow);
    color: var(--color-dark-blue);
    box-shadow: 0 4px 15px rgba(243, 182, 58, 0.4); /* Ombre subtile */
}

.bbs-tab-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.bbs-tab-panel.active {
    display: block;
}

.filiere-grid-bbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.filiere-card-bbs {
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1); /* Fond transparent */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Bordure subtile */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.filiere-card-bbs:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--color-yellow); /* Bordure jaune au survol */
}

.filiere-card-bbs h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-yellow); /* Titre jaune */
    margin-bottom: 1rem;
}

.filiere-card-bbs p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-white); /* Texte blanc */
}

/* --- Section Points Forts --- */
.points-forts-section {
    padding: 100px 5%;
    background-color: var(--dark-blue);
}
.section-header.dark-bg h2 { color: #fff; }
.section-header.dark-bg p { color: #ccc; }

.points-forts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.point-fort-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.point-fort-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}
.point-fort-card h4 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.8rem;
}
.point-fort-card p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
}

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

/* On réutilise la classe .section-header déjà stylée */

.location-grid-bbs {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    /* La carte est 1.5x plus grande que le texte */
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.contact-info-block-bbs h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
}
.contact-info-block-bbs .address-text {
    color: var(--text-grey);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.info-item-bbs {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.info-item-bbs i {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-top: 5px;
}
.info-item-bbs strong {
    font-weight: 600;
    color: var(--dark-blue);
}
.info-item-bbs p {
    color: var(--text-grey);
    margin-top: 0.25rem;
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--primary-blue);
    color: #fff;
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.btn-directions:hover {
    background-color: #002275; /* Un bleu légèrement plus foncé */
}

.map-block-bbs {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 51, 160, 0.2);
}

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


/* --- RESPONSIVITÉ pour la section localisation --- */
@media (max-width: 992px) {
    .location-grid-bbs {
        /* Passe en une seule colonne sur tablette/mobile */
        grid-template-columns: 1fr;
    }
    .contact-info-block-bbs {
        text-align: center;
        margin-bottom: 2rem;
    }
    .info-item-bbs {
        text-align: left; /* Garde le texte des infos aligné à gauche */
    }
}

@media (max-width: 768px) {
    .location-section-bbs {
        padding: 60px 5%;
    }
    .map-block-bbs {
        height: 400px;
    }
}

/* Footer styles */
.site-footer {
    background-color: #004AAD; /* Bleu de fond */
    color: #fff;
    padding: 40px 20px;
    font-family: 'Poppins', sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info, .footer-links, .footer-social {
    flex: 1;
    min-width: 200px;
}

.footer-info h4, .footer-links h4, .footer-social h4 {
    font-weight: 600;
    margin-bottom: 10px;
    color: #FFD700; /* Jaune pour les titres */
}

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

.footer-links ul li {
    margin-bottom: 5px;
}

.footer-links ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #FFD700; /* Jaune au survol */
}

.social-icons a {
    color: #fff;
    margin-right: 10px;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #FFD700; /* Jaune au survol */
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
    color: #ccc; /* Gris clair pour le texte */
}

/* Responsiveness */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-info, .footer-links, .footer-social {
        margin-bottom: 20px;
    }
}

/* Bouton WhatsApp flottant */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    width: 55px;
    height: 55px;
    background: #25d366;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}
.whatsapp-float:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    background: #20ba5a;
}
.whatsapp-float img {
    width: 32px;
    height: 32px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
    margin: 0;
    padding: 0;
}