header {
    background-color: #ffffff;
    margin-bottom: 1em;
    border-top: none;
    box-shadow: 0px 0px 5px gray;
    font-family: Arial, Helvetica, sans-serif;
    position: sticky;
    top: 0;
    z-index: 10000;
    /* Augmenté beaucoup pour être au-dessus de tout */
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
    /* État initial : visible */
}

.header-hidden {
    /* --- État caché : déplacé vers le haut --- */
    transform: translateY(-100%);
}



.activeLink:hover {
    color: rgb(11, 11, 96) !important;
}


.showMapA {
    display: flex;
    gap: .2em;
}

.nav_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3em 1em;
    width: 100%;

    ul {
        display: flex;
        align-items: center;
    }

    ul:nth-child(1) {
        font-size: 1.4em;
        gap: 1.5em;
        color: rgba(25, 143, 130, 0.68);

        li a {
            z-index: 1;
            position: relative;
            color: #464545;
        }

        li:nth-child(1) a {
            display: block;
            width: 100%;
            height: 100%;
            display: flex;
        }
    }
}




.liAdmin {
    margin-right: 1em;

    a {
        color: white;
        background-color: rgba(15, 154, 154, 0.79);
        padding: .3em .6em;
        border-radius: 10px;
        box-shadow: 1px 1px 5px rgba(104, 104, 104, 0.692);
    }

    a:hover {
        background-color: rgba(18, 186, 186, 0.79);

    }
}

.wrapperHeaderGauche .icon {
    display: none;
    /* Cache le texte */
}

.username {
    padding: 2px 4px;
    background-color: #9de6ffc2;
    color: #000000;
    /* border-radius: 5px; */
    margin-right: .5em;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 1px 1px 5px #434343;
    font-weight: 900;
    font-size: .9em;
    font-family: 'Raleway';
}

.logoFda {
    width: 3em;
    height: 3em;
    line-height: 0;
}



@media (max-width: 900px) {
    nav ul a {
        font-size: 0.75em;
    }

    .logoFda {
        width: 2em;
        height: 2em;
        line-height: 0;
    }
}


@media (max-width: 668px) {
    .nav_header ul:nth-child(1) {
        font-size: 2em;
        gap: 1em;
    }

    .wrapperHeaderGauche .text {
        display: none;
        /* Cache le texte */
    }

    .wrapperHeaderGauche .icon,
    .wrapperHeaderGauche i {
        display: block;
        /* Affiche l'icône */
        font-size: 1.1em;
        color: black;
    }
}

@media (max-width: 440px) {
    .nav_header ul:nth-child(1) {
        gap: .3em;
    }

    .wrapperHeaderGauche .text {
        display: none;
        /* Cache le texte */
    }

    .wrapperHeaderGauche .icon,
    .wrapperHeaderGauche i {
        display: block;
        /* Affiche l'icône */
        font-size: 1.1em;
        color: black;
    }
}

/* --- Styles pour le Dropdown des Liens Administratifs --- */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none !important;
    /* Forcé au départ */
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 20000;
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    top: 100%;
    left: 0;
    margin: 0;
    /* Supprimé pour éviter de perdre le hover */
    padding: 10px 0;
    border: 1px solid #e0e0e0;
    flex-direction: column;
}

/* Pseudo-élément pour boucher le trou invisible entre le bouton et le menu */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
    display: block !important;
    width: 100%;
}

.dropdown-menu li a {
    color: #333 !important;
    padding: 10px 20px;
    text-decoration: none;
    display: block !important;
    font-size: 0.9em;
    transition: background-color 0.2s;
    width: 100%;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #198f82 !important;
}

/* Affichage uniquement via la classe .show (gérée par Stimulus) */
.dropdown-menu.show {
    display: flex !important;
}

.dropdown .dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    background: none;
    font-size: inherit;
    font-family: inherit;
}

/* Forcer la disparition de l'icône sur desktop */
.dropdown .dropdown-toggle.icon {
    display: none !important;
}

/* Gestion de l'affichage mobile pour le dropdown */
@media (max-width: 668px) {
    .dropdown .dropdown-toggle.text {
        display: none !important;
    }

    .dropdown .dropdown-toggle.icon {
        display: block !important;
        font-size: 1.1em;
        color: black;
    }

    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-width: 200px;
        max-width: 90vw;
        right: auto;
    }
}

.no-links {
    padding: 10px 20px;
    color: #999;
    font-style: italic;
    font-size: 0.85em;
    display: block;
}