/* ==========================================================================
   MISTER OFFICE MAROC - RESPONSIVE DESIGN (responsive.css)
   Adaptation multi-supports (Tablettes, Mobiles, Ordinateurs)
   ========================================================================== */

/* --- ÉCRANS MOYENS & TABLETTES (Max 992px) --- */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: var(--primary-color);
        padding: 20px;
        border-radius: var(--border-radius);
        margin-top: 15px;
    }

    .hero-section {
        text-align: center;
        padding: 60px 0;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* --- SMARTPHONES & PETITS ÉCRANS (Max 768px) --- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1299;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        min-height: 100vh;
        padding: 24px 1.5rem 24px;
        margin: 0;
        background: rgba(0, 0, 0, 0.98);
        transform: translateX(110%);
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
        visibility: hidden;
        opacity: 0;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
        z-index: 1300;
    }

    .navbar .navbar-collapse.show {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

    .navbar .navbar-collapse.collapsing {
        display: flex !important;
    }

    .navbar .navbar-nav {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.1rem;
        width: 100%;
        margin-top: 0;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0 1.1rem;
        border-radius: 0.85rem;
        background: rgba(255, 255, 255, 0.04);
        color: #f1f1f1 !important;
        width: 100%;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .navbar .navbar-nav .btn,
    .navbar-nav .btn-mister-primary,
    .navbar-nav .btn-outline-light,
    .navbar-nav .btn-outline-success {
        width: 100%;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 1.1rem;
    }

    .navbar-close-btn {
        position: absolute;
        top: 18px;
        right: 18px;
        margin-bottom: 0;
        z-index: 1310;
    }

    .navbar .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar .navbar-nav .nav-item + .nav-item {
        margin-top: 0;
    }

    .navbar .navbar-nav .position-relative {
        overflow: visible;
    }

    .navbar .navbar-nav .position-relative .badge {
        top: 12px;
        right: 14px;
        left: auto;
        transform: none;
    }

    body.mobile-menu-open {
        overflow: hidden;
        touch-action: none;
    }

    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .nav-link.active {
        background: rgba(102, 204, 0, 0.18);
        color: var(--mister-green) !important;
    }

    .navbar-close-btn {
        display: inline-flex;
        align-self: flex-end;
        margin-bottom: 1.25rem;
    }

    .navbar-toggler {
        z-index: 1400;
    }

    .navbar-nav .btn,
    .navbar-nav .btn-mister-primary,
    .navbar-nav .btn-outline-light,
    .navbar-nav .btn-outline-success {
        width: 100%;
        justify-content: center;
    }

    /* Ajustement des boutons tactiles */
    .btn-mister-primary, 
    .btn-mister-outline {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    /* Bouton WhatsApp mobile plus ergonomique */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }

    /* Évite tout débordement horizontal */
    body {
        overflow-x: hidden;
    }

    body.mobile-menu-open {
        overflow: hidden;
        touch-action: none;
    }
}

/* --- TRÈS PETITS APPAREILS (Max 480px) --- */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}