/**
 * STYLES COMPLETS POUR LA TOPBAR
 * Version finale consolidée et optimisée
 */

/* ============================================
   STRUCTURE DE BASE
   ============================================ */

.top-navigation {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.top-navigation > li {
    position: relative !important;
    display: inline-block !important;
    margin: 0 0px !important;
}

.top-navigation > li > a {
    font-size: 13px !important;
    padding: 8px 4px !important;
    display: inline-block !important;
    white-space: nowrap !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.top-navigation > li > a:hover {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.08) !important;
    border-radius: 4px !important;
}

/* ============================================
   DROPDOWNS - MASQUÉS PAR DÉFAUT
   ============================================ */

.top-navigation .dropdown,
.top-navigation ul.dropdown {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    min-width: auto !important;
    width: auto !important;
    white-space: nowrap !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08) !important;
    z-index: 99999 !important;
    padding: 8px 0 !important;
    margin: 5px 0 0 0 !important;
    list-style: none !important;
    border-top: 3px solid #007bff !important;
    border-radius: 0 0 6px 6px !important;
    border-left: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* AFFICHER AU SURVOL */
.top-navigation li:hover > .dropdown,
.top-navigation li:hover > ul.dropdown {
    display: block !important;
}

/* ============================================
   ITEMS DES DROPDOWNS
   ============================================ */

.top-navigation .dropdown li,
.top-navigation ul.dropdown li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.top-navigation .dropdown li:last-child,
.top-navigation ul.dropdown li:last-child {
    border-bottom: none !important;
}

/* ============================================
   LIENS DANS LES DROPDOWNS
   ============================================ */

.top-navigation .dropdown li a,
.top-navigation ul.dropdown li a {
    display: block !important;
    padding: 8px 12px !important;
    color: #333333 !important;
    background: #ffffff !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    white-space: nowrap !important;
}

/* Icône flèche */
.top-navigation .dropdown li a::before,
.top-navigation ul.dropdown li a::before {
    content: '▸' !important;
    position: absolute !important;
    left: 10px !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    color: #007bff !important;
    font-size: 12px !important;
}

/* SURVOL DES LIENS */
.top-navigation .dropdown li a:hover,
.top-navigation ul.dropdown li a:hover {
    background: linear-gradient(to right, #f0f7ff 0%, #ffffff 100%) !important;
    color: #007bff !important;
    padding-left: 22px !important;
    box-shadow: inset 4px 0 0 #007bff !important;
}

.top-navigation .dropdown li a:hover::before,
.top-navigation ul.dropdown li a:hover::before {
    opacity: 1 !important;
    left: 14px !important;
}

/* ============================================
   INDICATEURS VISUELS
   ============================================ */

/* Flèche pour les menus avec dropdown */
.top-navigation > li > a[href*="membres"]::after,
.top-navigation > li > a[href*="dons"]::after {
    content: '\f107' !important;
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    margin-left: 6px !important;
    font-size: 10px !important;
    transition: transform 0.3s ease !important;
}

/* Rotation de la flèche au survol */
.top-navigation > li:hover > a::after {
    transform: rotate(180deg) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-navigation li:hover > .dropdown,
.top-navigation li:hover > ul.dropdown {
    animation: dropdownSlideIn 0.3s ease-out !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .top-navigation .dropdown,
    .top-navigation ul.dropdown {
        position: relative !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #007bff !important;
        margin-left: 15px !important;
    }
}
