/* MOBILE FIX CSS - IWI Formateurs */
/* À inclure APRÈS style.css dans header.php */

/* ==================== CORRECTIFS CRITIQUES ==================== */

/* 1. BOUTON HAMBURGER - LE FORCER À APPARAÎTRE */
#mobileToggle.modern-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    border-radius: 8px !important;
}

#mobileToggle.modern-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: #374151 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
}

#mobileToggle.modern-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
}

#mobileToggle.modern-toggle.active span:nth-child(2) {
    opacity: 0 !important;
}

#mobileToggle.modern-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
}

/* 2. MENU MOBILE - LE FORCER À APPARAÎTRE */
#mobileMenu.mobile-menu {
    display: block !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: white !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    padding: 1rem !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

#mobileMenu.mobile-menu.active {
    transform: translateX(0) !important;
}

/* 3. CACHER LA NAV DESKTOP SUR MOBILE */
@media (max-width: 992px) {
    .modern-nav {
        display: none !important;
    }
    
    .modern-actions .btn-new {
        display: none !important;
    }
    
    /* Assurer que le bouton hamburger est visible */
    #mobileToggle.modern-toggle {
        display: flex !important;
    }
}

/* 4. EMPÊCHER LE SCROLL QUAND MENU OUVERT */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* 5. AJUSTEMENTS RESPONSIVE */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem !important;
    }
    
    .navbar-container {
        padding: 0 1rem !important;
    }
    
    .modern-brand .brand-tagline {
        display: none !important;
    }
    
    .brand-name {
        font-size: 1.1rem !important;
    }
}

/* 6. IMAGES RESPONSIVES */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* 7. FORMULAIRES MOBILE */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* Empêche le zoom sur iOS */
    }
    
    .form-control {
        padding: 0.75rem !important;
    }
}

/* 8. TOUCH TARGETS (Accessibilité) */
@media (max-width: 768px) {
    .btn, .nav-link, .mobile-nav-link {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .action-btn {
        width: 44px !important;
        height: 44px !important;
    }
}

/* 9. TABLES RESPONSIVES */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    table {
        min-width: 600px !important;
    }
}

/* 10. FIX POUR LES DROPDOWNS SUR MOBILE */
@media (max-width: 992px) {
    .nav-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        display: none !important;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block !important;
    }
}