/* Modern Navbar Dropdown Styles */

/* Dropdown Container */
.nav-dropdown {
    position: relative;
    z-index: 1035;
    /* Fix: must be above fixed header (z-index: 1030) */
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px 0;
    margin-top: 8px;

    /* Animation states */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* FIX PRINCIPAL : Passe par-dessus l'effet de l'onglet actif */
    z-index: 9999 !important;
}

/* Menu visible */
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.dropdown-item:hover {
    background: #F5F5F5;
    transform: translateX(5px);
}

.item-icon {
    font-size: 20px;
}

.dropdown-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

/* Logout Button Style */
.btn-logout {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-text {
        display: none;
    }

    /* Center dropdown on mobile */
    .dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* FIX SECONDAIRE :
   Empêche l’effet .nav-link.active d’écraser le dropdown.
*/
.nav-link.active {
    position: relative;
    z-index: 1;
    /* Dropdown will still be above */
}