/* 
 * STYLES POUR LA BARRE DE NAVIGATION (TOPBAR)
 * Gestion du menu principal fixe avec sous-menu déroulant animé
 * Auteur: Manley.B
 */

/* ==================== BARRE DE NAVIGATION PRINCIPALE ==================== */
/* Configuration de la topbar fixe en haut de la page */

#topbar {
    user-select: none;
    position: fixed;
    left: -0.1vh;
    width: 100%;
    height: 85px;
    background: transparent;
    color: #242423;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2em;
    transition: top 0.3s, background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
    z-index: 1000;
    backdrop-filter: none;
    box-shadow: none;
}

#topbar.topbar-blur {
    border: 1px solid rgba(255, 255, 255, 0.301);
    background: rgba(9, 0, 29, 0.2);
    box-shadow: 0 2px 16px rgba(44,62,80,0.08);
    backdrop-filter: blur(6px);
}

#topbar span {
    flex: 1;
    text-align: left;
    padding-left: 30px;
}

/* ==================== BOUTON MENU PRINCIPAL ==================== */
/* Styles pour le bouton d'ouverture du menu déroulant */

#topbar nav {
    display: flex;
    align-items: center;
    position: relative;
}

#menu-toggle {
    background: rgba(40, 40, 40, 0.9);
    color: #F5CB5C;
    border: none;
    font-size: 1.5em;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    margin-right: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

#menu-toggle:hover {
    background: #F5CB5C;
    color: #1a1a1a;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(245, 203, 92, 0.4);
}

/* ==================== SOUS-MENU DÉROULANT ==================== */
/* 
 * Menu déroulant avec animations d'apparition/disparition
 * Utilise opacity, visibility et transform pour des transitions fluides
 */

.menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 2.65em;
    right: 0em;
    background: rgba(40, 40, 40, 0.95);
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.2);
    z-index: 1001;
    padding: 0;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 203, 92, 0.2);
    
    /* Animation de disparition par défaut */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.menu.open {
    /* Animation d'apparition */
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Animation des éléments individuels du menu */
.menu li {
    list-style: none;
    border-bottom: 1px solid rgba(245, 203, 92, 0.1);
    margin: 0.2em;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.2s ease;
}

.menu.open li {
    opacity: 1;
    transform: translateX(0);
}

/* Délai échelonné pour les éléments */
.menu.open li:nth-child(1) { transition-delay: 0.1s; }
.menu.open li:nth-child(2) { transition-delay: 0.15s; }
.menu.open li:nth-child(3) { transition-delay: 0.2s; }
.menu.open li:nth-child(4) { transition-delay: 0.25s; }
.menu.open li:nth-child(5) { transition-delay: 0.3s; }
.menu.open li:nth-child(6) { transition-delay: 0.35s; }

.menu li:last-child {
    border-bottom: none;
}

/* ==================== LIENS DU SOUS-MENU ==================== */
/* Styles pour les éléments de navigation avec effets hover */

.menu a {
    display: block;
    color: #F5CB5C;
    text-decoration: none;
    padding: 15px 20px;
    transition: all 0.3s ease;
    border-radius: 6px;
    background: rgba(245, 203, 92, 0.05);
    border: 1px solid rgba(245, 203, 92, 0.2);
    margin: 2px;
    font-weight: 500;
}

.menu a:hover {
    background: rgba(245, 203, 92, 0.2);
    color: #F5CB5C;
    transform: translateX(5px) scale(1.02);
    border-color: rgba(245, 203, 92, 0.4);
    box-shadow: 0 3px 10px rgba(245, 203, 92, 0.2);
}

/* ==================== BOUTON CERTIFICATION SPÉCIAL ==================== */
/* Bouton pour naviguer vers la page certifications */

.btn-certification {
    background: linear-gradient(135deg, #F5CB5C 0%, #e6b84d 100%);
    color: #1a1a1a;
    border: 2px solid #000000;
    margin-right: 3em;
    padding: 0.8em 1.5em;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    box-shadow: 0 4px 15px rgba(245, 203, 92, 0.3);
    backdrop-filter: blur(5px);
    font-size: 0.9em;
}

.btn-certification:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #000000;
    border-color: #F5CB5C;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 203, 92, 0.4);
}

.btn-certification:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-certification i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.btn-certification:hover i {
    transform: rotate(15deg) scale(1.1);
}

/* ==================== INTEGRATION DANS LE MENU ==================== */
/* Styles pour intégrer le bouton dans la topbar */

#topbar .btn-certification {
    margin-left: 1em;
    font-size: 0.85em;
    padding: 0.6em 1.2em;
}

@media (max-width: 768px) {
    #topbar .btn-certification {
        display: none;
    }
    
    /* Afficher dans le menu mobile */
    #topbar .menu .btn-certification {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0.5em 0;
        padding: 1em 2em;
        border-radius: 6px;
    }
}

/* ==================== STYLES RESPONSIVES ==================== */
/* Adaptations pour tablettes et mobile */

@media (max-width: 57vh) {
    #topbar {
    height: 200px;
    font-size: 3em;
    }

    #topbar span {
    padding-left: 15px;
    }

    #menu-toggle {
    font-size: 1.2em;
    padding: 8px 16px;
    margin-right: 15px;
    }

    .menu {
        top: 2.5em;
        right: 0.5em;
        min-width: 150px;
        font-size: 1.4em;
    }

    .btn-certification {
        border: 2px solid #000000;
        margin-right: 0.5em;
        padding: 0.8em 0.5em;
        border-radius: 8px;
        text-transform: uppercase;
        cursor: pointer;
        transition: all 0.3s ease;
    }
}


