/* MOBILE MENU FORCE FIX - Garantie absolue d'affichage */
/* Ce fichier se charge EN DERNIER pour forcer l'affichage du menu mobile */

/* RÈGLE ULTIME: Forcer l'affichage sur mobile */
@media (max-width: 768px) {
    /* Bouton hamburger - TOUJOURS VISIBLE */
    .mega-mobile-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10001 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        clip: unset !important;
        clip-path: none !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 8px !important;
        background: transparent !important;
        border: none !important;
        pointer-events: all !important;
    }

    /* Container mobile nav - Base state */
    .mega-mobile-nav {
        display: block !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        max-width: 100% !important;
        max-height: none !important;
        background: rgba(15, 23, 42, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        z-index: 9998 !important;
        clip: unset !important;
        clip-path: none !important;
        overflow-y: auto !important;

        /* État fermé par défaut */
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    /* État ouvert */
    .mega-mobile-nav.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: all !important;
    }

    /* Inner container - Slide panel - FOND NOIR NetworkX */
    .mega-mobile-inner {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 85% !important;
        max-width: 380px !important;
        height: 100% !important;
        max-height: 100% !important;
        background: #000000 !important;
        background-color: #000000 !important;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15) !important;
        overflow-y: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        clip: unset !important;
        clip-path: none !important;
        left: auto !important;
        line-height: normal !important;

        /* Animation de slide */
        transform: translateX(100%) !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .mega-mobile-nav.active .mega-mobile-inner {
        transform: translateX(0) !important;
    }

    /* Tous les éléments enfants - VISIBLES */
    .mobile-menu-header,
    .mobile-menu-close,
    .mobile-nav-content,
    .mega-mobile-item,
    .mega-mobile-trigger,
    .mega-mobile-submenu,
    .mobile-submenu-section,
    .mega-mobile-link,
    .mega-mobile-cta,
    .mobile-menu-footer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        position: relative !important;
        left: 0 !important;
        clip: unset !important;
        clip-path: none !important;
        line-height: normal !important;
    }

    /* Éléments flex */
    .mobile-menu-header,
    .mobile-menu-close,
    .mega-mobile-trigger,
    .mega-mobile-link,
    .mega-mobile-cta {
        display: flex !important;
    }

    /* Submenu accordéon - Fermé par défaut */
    .mega-mobile-submenu {
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .mega-mobile-item.active .mega-mobile-submenu {
        max-height: 1000px !important;
    }

    /* Flèches mobiles */
    .mobile-arrow {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        font-size: 14px !important;
        line-height: 1 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .mega-mobile-item.active .mobile-arrow {
        transform: rotate(180deg) !important;
    }

    /* Masquer le menu desktop */
    .mega-menu-nav {
        display: none !important;
    }

    /* Ajuster la hauteur du header */
    .mega-menu-networkit {
        height: 70px !important;
    }

    .mega-menu-content {
        height: 70px !important;
    }

    /* Logo plus petit */
    .mega-menu-logo svg {
        height: 42px !important;
        max-height: 42px !important;
    }
}

/* DEBUG: Ajouter une couleur au hamburger pour vérifier qu'il est visible */
@media (max-width: 768px) {
    .mega-mobile-toggle span {
        display: block !important;
        width: 26px !important;
        height: 3px !important;
        background: #374151 !important;
        border-radius: 2px !important;
        margin: 0 0 5px 0 !important;
        transition: all 0.3s ease !important;
    }

    .mega-mobile-toggle span:last-child {
        margin-bottom: 0 !important;
    }

    /* Animation hamburger actif */
    .mega-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(11px) !important;
    }

    .mega-mobile-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }

    .mega-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-11px) !important;
    }
}
