/* =================================
   🧭 NAVIGATION & MENU ADMIN
================================= */
/* =========================
   MENU PRINCIPAL 3
========================= */
nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: var(--white);
    padding: 5px 8px;
    border-radius: 5px;
    transition: background 0.2s;
    text-decoration: none;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =========================
   MENU ADMIN (DROPDOWN)
========================= */
.admin-menu {
    position: relative;
    display: inline-block;
}

/* Bouton admin */
.admin-toggle {
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown caché */
.admin-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow-large);
    max-height: 75vh;
    overflow-y: auto;
    scrollbar-width: thin;
    z-index: 9999;
}

.admin-dropdown::-webkit-scrollbar {
    display: block;
    width: 8px;
}

.admin-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .4);
    border-radius: 4px;
}

/* Liens dans menu admin */
.admin-dropdown a {
    display: block;
    padding: 8px 12px;
    margin: 0;
    width: 100%;
    color: var(--white);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.admin-dropdown a:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Activation via JS */
.admin-menu.open .admin-dropdown {
    display: block;
}

/* =========================
   MENU MOBILE
========================= */
@media(max-width:767px) {
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        padding: 10px;
        flex-direction: column;
        gap: 5px;
    }

    nav.active {
        display: flex;
    }

    nav a {
        width: 100%;
        text-align: center;
        /*padding:8px;*/
    }

    .admin-menu {
        width: 100%;
    }

    .admin-toggle {
        display: block;
        text-align: center;
        width: 100%;
    }

    .admin-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: 70vh;
        overflow-y: auto;
        margin-top: 5px;
        box-shadow: var(--shadow-large);
        background: var(--primary-color);
        z-index: 9999;

    }

    .admin-menu.open .admin-dropdown {
        display: block;
    }

    .admin-dropdown a {
        text-align: center;
        padding: 7px;
    }
}