/* ==========================================================================
   1. VARIABLES ET CONFIGURATION GÉNÉRALE
   ========================================================================== */
:root {
    --primary: #004a99;
    --secondary: #ffd700;
    --accent: #f8f9fa;
    --text-dark: #1a1a1a;
    --transition: all 0.3s ease;
}

body { 
    font-family: 'Poppins', 'Montserrat', sans-serif; 
    color: var(--text-dark);
    overflow-x: hidden; 
}

/* ==========================================================================
   2. EN-TÊTE ET NAVIGATION (TOP BAR & NAVBAR)
   ========================================================================== */
/* Barre supérieure */
.top-bar {
    background-color: #f8f9fa;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
    color: #555;
}

/* Navbar */
.navbar {
    padding: 0.5rem 0;
    transition: var(--transition);
    background-color: #fff;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

/* Liens du menu et effet de soulignement */
.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333 !important;
    padding: 0.5rem 10px !important;
    margin: 0 5px;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary) !important;
}

/* Bouton d'inscription dans le menu */
.btn-nav {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 8px 20px !important;
    text-transform: uppercase;
}

/* ==========================================================================
   3. SECTION HERO (ACCUEIL)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    background: rgba(255, 215, 0, 0.15);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
}

/* ==========================================================================
   4. SECTIONS À PROPOS ET CYCLES
   ========================================================================== */
/* À propos */
.about-img { 
    border-radius: 30px; 
    border-bottom: 10px solid var(--secondary); 
}

/* Cycles scolaire */
.cycle-card {
    border: none; 
    border-radius: 20px; 
    transition: var(--transition);
    background: #fff; 
    overflow: hidden;
}

.cycle-card:hover { 
    transform: scale(1.03); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

.cycle-card img { 
    height: 250px; 
    object-fit: cover; 
}

/* Fonctionnalités / Features */
.card-feature {
    border: none;
    border-radius: 20px;
    transition: var(--transition);
    background: white;
}

.card-feature:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}

.icon-circle {
    width: 70px; 
    height: 70px;
    background: var(--accent);
    color: var(--primary);
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 50%; 
    margin: 0 auto 20px; 
    font-size: 1.5rem;
}

/* ==========================================================================
   5. GALERIE DÉROULANTE (MARQUEE)
   ========================================================================== */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 20px 0;
}

.marquee-content {
    display: inline-flex;
    animation: scroll 30s linear infinite;
}

.marquee-content img {
    width: 280px; 
    height: 200px;
    object-fit: cover;
    margin: 0 10px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================================
   6. CONTACT ET FORMULAIRE
   ========================================================================== */
.contact-section {
    position: relative;
    background: url('images/img4.jpg') center top/cover fixed;
    padding: 100px 0;
}

.contact-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 74, 153, 0.85); /* Overlay bleu institutionnel */
}

.contact-card {
    position: relative; 
    z-index: 2;
    background: white; 
    border-radius: 20px; 
    padding: 40px;
}

/* ==========================================================================
   7. ANIMATIONS DE CHARGEMENT
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; opacity: 0; }
.delay-2 { animation-delay: 0.4s; opacity: 0; }

.img-gallery {
    transition: transform 0.4s ease;
    cursor: pointer;
}
.img-gallery:hover {
    transform: scale(1.1);
}
.filter-btn.active {
    background-color: var(--primary) !important;
    color: white !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 15px;
        margin-top: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
}

/* ========================================================================== 
   8. STYLE MENU MOBILE (SOULIGNEMENT ADAPTÉ)
   ========================================================================== */
@media (max-width: 991px) {

    .nav-link {
        display: block;
        padding: 12px 0 !important;
        margin: 5px 0;
    }

    /* Réinitialise l'effet desktop */
    .nav-link::after {
        left: 0;
        bottom: 5px;
        transform: none;
        width: 0;
        height: 2px;
    }

    /* Effet au hover et actif */
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    /* Couleur active plus visible */
    .nav-link.active {
        color: var(--primary) !important;
        font-weight: 600;
    }
}