/*--------------------------------------------------
 # Dropdown Menu Styles
 # Styles pour les sous-menus de navigation
--------------------------------------------------*/

/* Conteneur du dropdown */
.dropdown {
    position: relative;
}

/* Style du bouton déclencheur du dropdown */
.dropdown > a {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Icône d'indication du dropdown */
.dropdown > a::after {
    content: '\f107'; /* Icône flèche bas Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* Conteneur des liens du sous-menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(69, 39, 160, 0.42) 0%, rgba(123, 31, 162, 0.42) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

/* Affichage du menu au survol */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style des liens dans le sous-menu avec animation identique au menu principal */
.dropdown-menu a {
    display: flex;
    justify-content: center;
    padding: 8px 15px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* Animation du soulignement identique aux liens du menu principal */
.dropdown-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease, opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.dropdown-menu a:hover::before {
    width: 70%;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Surcharge pour s'assurer que seule notre animation est active */
.dropdown-menu a::after {
    display: none !important;
}

/* Styles spécifiques pour la section dropdown-menu qui prennent la priorité */
.dropdown-menu a::before {
    display: block !important;
}

/* Styles mobile pour les dropdowns */
@media screen and (max-width: 991px) {
    .dropdown > a::after {
        margin-left: auto;
    }

    .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        border-radius: 0;
        border-left: 2px solid rgba(255, 255, 255, 0.2);
        margin-left: 20px;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .dropdown.active > a::after {
        transform: rotate(180deg);
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 10px 0;
    }
    
    .dropdown-menu a {
        padding: 10px 15px;
    }
}
