/* -------------------------------------------------------------
 * HEADER & NAVIGATION INSTITUTIONNELLE FONGI (DESKTOP & MOBILE)
 * ------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: none;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    transition: all var(--transition-normal);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    background: transparent;
}

.site-logo img {
    height: 66px;
    width: auto;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.35rem;
}

/* Nav link élégant sans aucune ligne */
.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 0.55rem 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link:hover {
    color: #0d6b8e;
    background-color: rgba(83, 195, 235, 0.12);
}

.nav-link.active {
    color: #0d6b8e;
    background-color: rgba(83, 195, 235, 0.18);
    font-weight: 700;
}

/* -------------------------------------------------------------
 * MENU DÉROULANT FONGI — SOUS-MENUS (DESKTOP)
 * ------------------------------------------------------------- */
.nav-item-dropdown {
    position: relative;
}

.dropdown-chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nav-item-dropdown:hover .dropdown-chevron,
.nav-item-dropdown.is-active .dropdown-chevron {
    transform: rotate(180deg);
    color: #1e7fa0;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 245px;
    background: #ffffff;
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    border: none;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s;
    z-index: 1100;
}

/* Affichage au survol desktop */
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    transition: all 0.18s ease;
}

.dropdown-item svg {
    color: var(--fongi-blue);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(83, 195, 235, 0.12);
    color: #0d6b8e;
    transform: translateX(4px);
}

.dropdown-item:hover svg {
    transform: scale(1.15);
}

.dropdown-item.active {
    background-color: rgba(83, 195, 235, 0.18);
    color: #0d6b8e;
    font-weight: 700;
}

/* Boutons Espace Membre */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-member-portal {
    background: linear-gradient(135deg, var(--fongi-blue) 0%, var(--fongi-blue-dark) 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-full);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(83, 195, 235, 0.35);
}

.btn-member-portal:hover {
    background: linear-gradient(135deg, #2da9d6 0%, #0d6b8e 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(83, 195, 235, 0.5);
    transform: translateY(-1px);
}

/* Mobile Toggle Bouton */
.mobile-toggle {
    display: none;
    background: #f0f9ff;
    border: none;
    cursor: pointer;
    padding: 0.6rem;
    color: #0d6b8e;
    border-radius: 10px;
    transition: background 0.2s;
}

.mobile-toggle:hover {
    background: rgba(83, 195, 235, 0.2);
    color: #0d6b8e;
}

/* -------------------------------------------------------------
 * RESPONSIVE MOBILE & TABLETTE — EXPÉRIENCE MENU ÉPURÉE (SANS LIGNE)
 * ------------------------------------------------------------- */
@media (max-width: 992px) {
    .header-inner {
        height: 76px;
    }

    .site-logo img {
        height: 52px;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Panneau de navigation déroulant mobile */
    .main-nav {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        background-color: #ffffff;
        flex-direction: column;
        padding: 1.25rem 1.25rem 2.25rem;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        border: none;
        display: none;
        z-index: 999;
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.35rem;
        align-items: stretch;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 0.85rem 1.15rem;
        text-align: left;
        border-radius: 10px;
        border: none;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-primary);
        background: transparent;
        transition: all 0.22s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        color: #0d6b8e;
        background: rgba(83, 195, 235, 0.14);
    }

    /* Bouton Accordéon Fongi sur Mobile */
    .nav-link-dropdown {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        cursor: pointer;
    }

    .nav-link-dropdown .dropdown-chevron {
        width: 16px;
        height: 16px;
        stroke-width: 2.5;
        transition: transform 0.25s ease;
    }

    .nav-item-dropdown.is-active .nav-link-dropdown .dropdown-chevron {
        transform: rotate(180deg);
        color: var(--fongi-blue);
    }

    /* Sous-menu Accordéon sur Mobile */
    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #f0f9ff;
        border-radius: 12px;
        padding: 0.5rem;
        margin: 0.25rem 0 0.5rem 0;
        opacity: 1;
        visibility: visible;
        display: none;
        flex-direction: column;
        gap: 0.35rem;
        box-sizing: border-box;
    }

    .nav-item-dropdown.is-active .dropdown-menu {
        display: flex;
        animation: mobileSubmenuIn 0.22s ease-out both;
    }

    .dropdown-item {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        font-size: 0.92rem;
        font-weight: 600;
        color: var(--text-secondary);
        border-radius: 8px;
        background: #ffffff;
        border: none;
    }

    .dropdown-item:hover {
        background: rgba(83, 195, 235, 0.15);
        color: #0d6b8e;
        transform: none;
    }

    .dropdown-item.active {
        background: rgba(83, 195, 235, 0.2);
        color: #0d6b8e;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 1.25rem;
        padding-top: 0;
        border: none;
    }

    .btn-member-portal {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }
}

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