/* === FIX POUR LES MENUS DÉROULANTS JOOMLA === */
/* Style IDENTIQUE au fichier HTML */

/* Force l'affichage des sous-menus au survol */
.top-nav ul li:hover > ul,
.top-nav .main-menu li:hover > .submenu,
.top-nav .mod-menu li:hover > ul,
.top-nav .nav-item:hover > ul,
.top-nav li.parent:hover > ul,
.top-nav li.deeper:hover > ul,
.top-nav .dropdown:hover > .submenu,
.top-nav .submenu:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Style des sous-menus - FOND NOIR comme dans le HTML */
.top-nav ul ul,
.top-nav .submenu,
.top-nav .mod-menu ul ul {
    display: none;
    position: absolute;
    bottom: 100% !important;  /* S'ouvre VERS LE HAUT */
    left: 0;
    background: rgba(0, 0, 0, 0.98) !important;  /* FOND NOIR */
    backdrop-filter: blur(10px);
    border: 2px solid var(--gold) !important;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.75rem 0;
    box-shadow: 0 -8px 16px rgba(0,0,0,0.6) !important;
    z-index: 99999 !important;
    margin-bottom: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    list-style: none;
    margin: 0 0 5px 0;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.top-nav ul li:hover > ul,
.top-nav .dropdown:hover > .submenu {
    animation: fadeInUp 0.2s ease-in;
}

/* Items des sous-menus */
.top-nav ul ul li,
.top-nav .submenu li {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    list-style: none;
}

/* Liens des sous-menus - TEXTE CLAIR sur FOND NOIR */
.top-nav ul ul a,
.top-nav .submenu a {
    display: block !important;
    padding: 0.65rem 1.25rem !important;
    color: var(--stone) !important;  /* Couleur pierre claire */
    background: transparent !important;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-transform: none !important;
    letter-spacing: 0.05rem;
    white-space: nowrap;
    border: none !important;
    text-align: left;
}

.top-nav ul ul a:hover,
.top-nav .submenu a:hover {
    background: rgba(212, 175, 55, 0.3) !important;  /* Hover doré transparent */
    color: var(--gold) !important;
}

/* Zone invisible pour garder le menu ouvert */
.top-nav .dropdown::after,
.top-nav li.parent::after,
.top-nav li.deeper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 999;
}

/* Indicateur de sous-menu */
.top-nav li.deeper > a::after,
.top-nav li.parent > a::after,
.top-nav .dropdown > a::after {
    content: " ▾";
    margin-left: 0.3rem;
    font-size: 0.8em;
}

/* Force le positionnement relatif pour les items parents */
.top-nav > ul > li,
.top-nav .main-menu > li,
.top-nav .dropdown {
    position: relative;
}

/* Scrollbar pour sous-menus longs */
.top-nav .submenu::-webkit-scrollbar,
.top-nav ul ul::-webkit-scrollbar {
    width: 8px;
}

.top-nav .submenu::-webkit-scrollbar-track,
.top-nav ul ul::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}

.top-nav .submenu::-webkit-scrollbar-thumb,
.top-nav ul ul::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.top-nav .submenu::-webkit-scrollbar-thumb:hover,
.top-nav ul ul::-webkit-scrollbar-thumb:hover {
    background: var(--bronze);
}
