/* ==========================================================================
   1. VARIABLES DE COULEURS & RÉINITIALISATION (Thème Bleu Océan)
   ========================================================================== */
:root {
	--entete: #006994;
    --primary: #006994;     /* Bleu océan profond (boutons, titres, icônes) */
    --secondary: #20b2aa;   /* Vert d'eau / Turquoise clair pour les accents */
    --dark: #0a2333;        /* Bleu nuit très foncé pour un texte ultra-lisible */
    --light: #b3c1c0;       /* Bleu lagon très clair pour le fond des sections alternées */
    --white: #BFE6F2;       /* Blanc pur pour les cartes et le menu */
	--blanc: #FFFFFF;       /* Blanc pur pour les cartes et le menu */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #dddddd; /* Bleu azur givré */
    color: var(--blanc);
	max-width: 100%;
  overflow-x: hidden;
}

/* ==========================================================================
   2. INTERFACE DE NAVIGATION - MODE ORDINATEUR (Par défaut)
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--blanc);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
	
}

.logo i {
    margin-right: 8px;
    color: var(--secondary);
}

/* Conteneur principal forcé en flex sur ordinateur */
.nav-container {
    display: flex !important; 
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: var(--dark);
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

/* Bouton Burger : caché sur ordinateur */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   3. BOUTONS & SECTIONS GLOBALESS
   ========================================================================== */
.btn-cta, .btn-primary {
    background: var(--secondary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cta:hover, .btn-primary:hover {
    background: #e09216;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
    transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* Section Hero */
.hero {
    background: linear-gradient(rgba(18, 26, 205, 0.8), rgba(18, 26, 205, 0.8)), 
                url(images/logo_hib_jpg.jpg) no-repeat center center/cover;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanc);
    padding: 60px 20px;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 { 
    font-size: 3rem; 
    margin-bottom: 20px; 
    line-height: 1.2;
}

.hero p { 
    font-size: 1.3rem; 
    margin-bottom: 35px; 
    opacity: 0.9; 
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Section Chiffres */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 30px 4%;
    background: var(--light);
}

.stat-card { 
    text-align: center; 
    padding: 18px;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.stat-card h3 { font-size: 2.5rem; color: var(--primary); margin-bottom: 5px; }
.stat-card p { color: var(--dark); font-weight: 500; }

/* Section Formations */
.courses { padding: 80px 8%; text-align: center; }
.courses h2 { margin-bottom: 50px; color: var(--dark); font-size: 2.2rem; }

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.course-card h3 { margin-bottom: 15px; color: var(--dark); }
.course-card p { color: #666; line-height: 1.6; }

/* Section Formulaire */
.registration {
    background: var(--light);
    padding: 30px 8%;
    display: flex;
    justify-content: center;
}

.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 600px;
}


/* Animation pour l'apparition du message de succès */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Styles pour la validation du téléphone */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* Caché par défaut */
}

/* Section Témoignages */
.testimonials {
    padding: 80px 8%;
    text-align: center;
    background: var(--white);
}

.testimonials h2 {
    margin-bottom: 50px;
    color: var(--dark);
    font-size: 2.2rem;
}

.testimonials-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.testimonial-card {
    background: var(--blanc);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 450px;
    text-align: left;
    flex: 1 1 300px;
}

.stars {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.comment {
    color: #555;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
}

.student-name {
    color: var(--dark);
    margin-bottom: 2px;
}

.student-year {
    color: #888;
    font-size: 0.85rem;
}






/* Section Galerie Campus */
.campus-gallery {
    padding: 80px 8%;
    text-align: center;
    background: var(--light);
}

.campus-gallery h2 {
    margin-bottom: 50px;
    color: var(--dark);
    font-size: 2.2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 250px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Effet au survol de l'image */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 76, 129, 0.85); /* Utilise la couleur principale */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Section Carte Google Maps */
.map-section {
    padding: 80px 8% 40px 8%;
    text-align: center;
    background: var(--white);
}

.map-section h2 {
    color: var(--dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.map-section p {
    color: #666;
    margin-bottom: 30px;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Bouton de discussion flottant vert */
.whatsapp-floating {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* Effet au survol de la souris */
.whatsapp-floating:hover {
    transform: scale(1.1);
    background-color: #1ebd56;
}


.faq-section { padding: 80px 8%; background: var(--light); text-align: center; }
.faq-section h2 { color: var(--dark); font-size: 2.2rem; margin-bottom: 10px; }
.faq-subtitle { color: #666; margin-bottom: 40px; }
.faq-container { max-width: 800px; margin: 0 auto; text-align: left; }
.faq-item { background: var(--white); border-radius: 8px; margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); overflow: hidden; border-left: 4px solid var(--primary); }
.faq-question { width: 100%; padding: 20px; background: none; border: none; outline: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 1.1rem; font-weight: 600; color: var(--dark); }
.faq-question i { transition: transform 0.3s ease; color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: var(--blanc); }
.faq-answer p { padding: 0 20px 20px 20px; color: #555; line-height: 1.6; }

/* Classes d'activation */
.faq-item.active .faq-answer { max-height: 200px; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.form-container h2 { text-align: center; color: var(--primary); margin-bottom: 10px; }
.form-container p { text-align: center; color: #666; margin-bottom: 30px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--dark); font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; outline: none; transition: border-color 0.3s; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover { background: #0a355c; }

/* Pied de page */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 8% 20px 8%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* ==========================================================================
   4. ADAPTABILITÉ INTERFACE - MODE MOBILE (Écrans inférieurs à 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .burger-menu {
        display: flex; /* Le bouton burger apparaît uniquement ici */
    }

    .nav-container {
        display: none !important; /* Masqué par défaut sur mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        text-align: center;
        gap: 25px;
    }

    /* Déploiement vertical lors du clic sur le burger */
    .nav-container.open {
        display: flex !important;
    }

    .nav-links {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links li a {
        margin: 0;
        font-size: 1.2rem;
    }

    .nav-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .nav-buttons .btn-cta {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    /* Animations du burger vers le logo "X" */
    .burger-menu.toggle-cross span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.toggle-cross span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.toggle-cross span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}
