/* ===== NOUVEAU HEADER ===== */
header {
    position: relative;
    width: 100%;
    color: white;
}

.header-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    transition: background-image 1s ease-in-out;
}

/* Ajoutez une superposition semi-transparente */
.header-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* Assurez-vous que le contenu est au-dessus de l'arrière-plan */
#header-hero-acad, .slogan-container {
    position: relative;
    z-index: 1;
}

#header-hero-acad{
    font-family: 'Times New Roman', Times, serif;
    font-size: 5em;
}

.logo-container {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
    display: none; /* Supprimer l'élément img inutile */
}

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slogan-container {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 0 2rem;
}

.slogan-slider {
    position: relative;
    height: auto; /* Au lieu de 120px */
    min-height: 120px;
    overflow: hidden;
}

.slogan {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(100%);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 1s ease, transform 2s ease;
    will-change: transform, opacity; /* Optimisation GPU */
}

.slogan.active {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

/* ===== NAVIGATION PRINCIPALE ===== */
.main-nav {
    background-color: #1a2a6c;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-list > li {
    position: relative;
}

.nav-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-list a:hover {
    background-color: #ffab00;
    color: #1a2a6c;
}

.nav-list a i {
    font-size: 1.1rem;
}

/* Menu déroulant */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 0 0 5px 5px;
    border: 2px solid rgba(0, 0, 0, 0.342);
    overflow: hidden;
}

.dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a {
    color: #333;
    padding: 0.8rem 1.2rem;
}

.dropdown-menu a:hover {
    background-color: #ffab00;
    color: #1a2a6c;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Logo Mobile */
.nav-logo-mobile {
    display: none;
    padding: 0.5rem 1rem;
}

.nav-logo-mobile img {
    height: 40px;
}

/* Bouton Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.menu-icon {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    left: 0;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .nav-list a {
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .nav-list {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .nav-list > li {
        flex: 1 0 25%;
    }
    
    .dropdown-menu {
        box-shadow: none;
        display: none;
        
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 0.5rem 0;
        position: relative;
    }
    
    .nav-logo-mobile {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #1a2a6c;
        flex-direction: column;
        padding-top: 60px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-list > li {
        flex: none;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-list a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .dropdown-menu {
        position: static;
        background: white;
        box-shadow: none;
    }
    
    .dropdown-menu a {
        padding-left: 2.5rem;
    }
    
   
    .dropdown-menu a:hover {
        background-color: #ffab00;
        color: #1a2a6c;
        font-size: 1.1rem;
        font-weight: bold;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1000;
    }
    
    .mobile-menu-btn.active .menu-icon {
        background: transparent;
    }
    
    .mobile-menu-btn.active .menu-icon::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .mobile-menu-btn.active .menu-icon::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
}