/* ==============================================
   DEBUG ET FIX DROPDOWN MENU PROFIL
   ============================================== */

/* IMPORTANT : Ce fichier doit être chargé EN DERNIER dans le header.php */

/* SOLUTION RADICALE : Position FIXED pour sortir du contexte d'empilement */

/* Forcer l'affichage au-dessus de tout */
.banner {
    position: relative;
    z-index: 1 !important;
}

.banner-overlay {
    z-index: 2 !important;
}

.banner-content {
    z-index: 3 !important;
}

.user-actions {
    position: relative !important;
    z-index: 99998 !important;
}

.user-menu {
    position: relative !important;
    z-index: 99998 !important;
}

.btn-profile {
    position: relative !important;
    z-index: 99998 !important;
}

/* Le menu déroulant lui-même - POSITION FIXED */
.dropdown-menu {
    display: none !important;
    /* CHANGEMENT CRITIQUE : fixed au lieu de absolute */
    position: fixed !important;
    /* On va calculer la position avec JavaScript */
    top: auto !important;
    right: auto !important;
    left: auto !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    min-width: 220px !important;
    max-width: 280px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    z-index: 999999 !important; /* MAXIMUM ABSOLU */
    overflow: visible !important;
}

/* Quand le menu est visible */
.dropdown-menu.show {
    display: block !important;
}

/* Les liens dans le menu */
.dropdown-menu a {
    display: block !important;
    padding: 12px 20px !important;
    color: #333333 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
    white-space: nowrap !important;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa !important;
    color: #003d7a !important;
}

/* Séparateur */
.dropdown-menu hr {
    margin: 8px 0 !important;
    border: none !important;
    border-top: 1px solid #e9ecef !important;
    height: 0 !important;
}

/* Menu de navigation - position sticky normale */
.main-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
}

/* Debug : bordure rouge pour voir le dropdown (à retirer en production) */
/* .dropdown-menu.show {
    border: 2px solid red !important;
} */

/* Responsive mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 200px !important;
    }
}

/* Fix pour éviter que d'autres éléments cachent le dropdown */
body {
    overflow-x: hidden;
}

header.banner {
    overflow: visible !important;
}

.banner-overlay {
    overflow: visible !important;
}

.banner-content {
    overflow: visible !important;
}

