/* ========================================
   S.A.T.A SARL - RESPONSIVE OPTIMIZATIONS
   Comprehensive responsive overrides
   ======================================== */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

/* ===== TABLETTES & PETITS DESKTOPS (1024px) ===== */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }

    .nav-links { gap: 4px; }
    .nav-links a { padding: 8px 14px; font-size: 0.88rem; }
    .nav-cta { padding: 10px 18px !important; font-size: 0.82rem !important; }

    .hero-content { padding-top: 80px; max-width: 90%; }
    .hero h1 { font-size: clamp(1.2rem, 2.2vw, 1.7rem); }
    .hero-subtitle { font-size: 1.05rem; }

    .why-us-grid { grid-template-columns: 1fr; gap: 56px; }
    .why-us-image img { height: 460px; }
    .experience-badge { left: 20px; bottom: -20px; }

    .about-intro { grid-template-columns: 1fr; gap: 40px; }
    .about-intro-img { height: 380px; }

    .contact-grid { grid-template-columns: 1fr; gap: 32px; }

    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

    .testimonial-card { padding: 32px; }
}

/* ===== TABLETTES (900px) ===== */
@media (max-width: 900px) {
    /* Hamburger menu mobile */
    .nav-links {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 82%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        padding: 100px 24px 32px;
        gap: 6px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.12);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    .nav-links.active { right: 0; }
    .nav-links a {
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 12px;
        text-align: left;
        color: var(--gray-800);
    }
    .nav-links a.active { background: rgba(232, 121, 43, 0.1); color: var(--primary); }

    .hamburger { display: flex; z-index: 1001; }
    .nav-cta { display: none !important; }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); background: var(--primary); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); background: var(--primary); }

    /* Body scroll lock when menu open */
    body.menu-open { overflow: hidden; }

    .hero-stats { gap: 28px; flex-wrap: wrap; }
    .stat { flex: 1 0 30%; }

    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .equipment-grid { grid-template-columns: repeat(2, 1fr); }
    .equipment-card.large { grid-column: span 2; height: 280px; }
    .projects-grid { grid-template-columns: 1fr 1fr; }
    .equipment-detail-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .about-values { grid-template-columns: repeat(2, 1fr); }

    .counters-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .counter-number { font-size: 2.1rem; }

    .partner-logo img { height: 90px; max-width: 220px; min-width: 150px; padding: 14px 22px; }

    .service-detail-card { grid-template-columns: 1fr; gap: 32px; padding: 50px 0; }
    .service-detail-card:nth-child(even) { direction: ltr; }
    .service-detail-img { height: 280px; }

    .locations-grid { grid-template-columns: 1fr; gap: 24px; max-width: 500px; margin: 0 auto; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: left; }

    .testimonials-section .testimonials-track { display: block; }
    .testimonial-card { padding: 28px 22px; }
}

/* ===== MOBILES (600px) ===== */
@media (max-width: 600px) {
    :root { --section-padding: 60px 0; }

    .container { padding: 0 16px; }
    .navbar { padding: 14px 0; }
    .logo-img { height: 60px; }
    #header.scrolled .logo-img { height: 50px; }
    .footer .logo-img { height: 190px; }

    /* Hero */
    .hero { min-height: 88vh; padding: 70px 0 40px; }
    .hero-content { padding-top: 60px; }
    .hero h1 { font-size: 1.25rem; line-height: 1.25; }
    .hero-subtitle { font-size: 0.92rem; margin-bottom: 28px; }
    .hero-badge { padding: 7px 14px; font-size: 0.72rem; margin-bottom: 24px; }
    .hero-actions { gap: 12px; flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-stats { gap: 18px; padding-top: 28px; flex-wrap: wrap; }
    .stat-number { font-size: 1.6rem; }
    .stat-suffix { font-size: 1.3rem; }
    .stat-label { font-size: 0.7rem; }

    /* Section headers */
    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: 0.98rem; }
    .section-header p { font-size: 0.9rem; }
    .section-tag { font-size: 0.75rem; padding: 6px 14px; }

    /* Services */
    .services-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { padding: 26px 20px; }
    .service-card h3 { font-size: 1.1rem; }
    .service-card p { font-size: 0.88rem; }
    .service-icon { width: 56px; height: 56px; font-size: 1.3rem; }

    /* Equipment showcase */
    .equipment-grid { grid-template-columns: 1fr; gap: 14px; }
    .equipment-card.large { grid-column: span 1; height: 240px; }
    .equipment-card { height: 220px; }
    .equipment-overlay h3 { font-size: 1.05rem; }

    /* Equipment details */
    .equipment-detail-grid { grid-template-columns: 1fr; gap: 16px; }
    .equipment-detail-card .card-img { height: 200px; }
    .equipment-detail-card .card-body { padding: 20px; }
    .equipment-detail-card h3 { font-size: 1.05rem; }
    .equipment-specs { flex-wrap: wrap; gap: 12px; }
    .equipment-specs .spec-value { font-size: 0.85rem; }

    /* Projects / Realisations */
    .projects-grid { grid-template-columns: 1fr; }
    .project-card { height: 280px; }
    .project-info h3 { font-size: 1.1rem; }
    .realisations-grid { grid-template-columns: 1fr; gap: 16px; }
    .realisation-img { height: 200px; }
    .realisation-meta { flex-wrap: wrap; gap: 12px; font-size: 0.78rem; }

    /* Team */
    .team-grid { grid-template-columns: 1fr; gap: 16px; max-width: 360px; margin: 0 auto; }
    .team-card { padding: 26px 20px; }
    .team-avatar { width: 88px; height: 88px; }

    /* About values */
    .about-values { grid-template-columns: 1fr 1fr; gap: 12px; }
    .value-card { padding: 24px 14px; }
    .value-card h3 { font-size: 0.95rem; }
    .value-card p { font-size: 0.78rem; }
    .value-card .value-icon { width: 56px; height: 56px; font-size: 1.2rem; }

    /* Counters */
    .counters-section { padding: 50px 0; }
    .counters-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .counter-number { font-size: 1.7rem; }
    .counter-suffix { font-size: 1.3rem; }
    .counter-label { font-size: 0.72rem; }
    .counter-icon { font-size: 1.3rem; }

    /* Testimonials */
    .testimonial-card { padding: 28px 20px; }
    .testimonial-text { font-size: 0.9rem; line-height: 1.7; }
    .testimonial-stars { font-size: 0.95rem; margin-bottom: 16px; }
    .testimonials-nav { gap: 12px; margin-top: 20px; }
    .slider-btn { width: 38px; height: 38px; }
    .author-avatar { width: 48px; height: 48px; }
    .testimonial-author h4 { font-size: 0.92rem; }
    .testimonial-author span { font-size: 0.75rem; }

    /* Partners */
    .partners-section { padding: 50px 0; }
    .partner-logo img { height: 75px; max-width: 180px; min-width: 130px; padding: 10px 16px; }
    .partners-track { gap: 20px; }

    /* Why us */
    .why-us-grid { gap: 40px; }
    .why-us-content h2 { font-size: 1.7rem; }
    .why-us-text { font-size: 0.92rem; }
    .why-us-image img { height: 320px; }
    .experience-badge { bottom: -20px; left: 16px; padding: 18px 22px; }
    .exp-number { font-size: 2rem; }
    .exp-text { font-size: 0.78rem; }
    .feature-item { gap: 12px; }
    .feature-item h4 { font-size: 0.92rem; }
    .feature-item p { font-size: 0.8rem; }

    /* Service detail page */
    .service-detail-card { padding: 36px 0; gap: 28px; }
    .service-detail-content h3 { font-size: 1.4rem; }
    .service-detail-img { height: 220px; }
    .service-features li { font-size: 0.86rem; gap: 10px; }

    /* Locations */
    .location-card { padding: 26px 20px; }
    .location-card h3 { font-size: 1.1rem; }

    /* Contact */
    .contact-info-card { padding: 22px 18px; gap: 14px; }
    .contact-info-card .info-icon { width: 44px; height: 44px; font-size: 1rem; }
    .contact-info-card h4 { font-size: 0.95rem; }
    .contact-info-card p { font-size: 0.85rem; }
    .contact-form-wrapper { padding: 28px 20px; }
    .contact-form-wrapper h3 { font-size: 1.3rem; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .form-group input, .form-group select, .form-group textarea {
        padding: 12px 14px; font-size: 0.9rem;
    }

    /* CTA */
    .cta-content h2 { font-size: 1.8rem; }
    .cta-content p { font-size: 0.92rem; }
    .cta-actions { flex-direction: column; gap: 12px; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    /* Modal */
    .modal { padding: 28px 20px; border-radius: 16px; max-height: 92vh; }
    .modal-header h3 { font-size: 1.2rem; }
    .modal-header p { font-size: 0.85rem; }
    .modal-icon { width: 52px; height: 52px; font-size: 1.2rem; }
    .modal-form .form-grid { grid-template-columns: 1fr; }
    .modal-close { width: 32px; height: 32px; top: 12px; right: 12px; }

    /* Page header */
    .page-header { padding: 120px 0 50px; }
    .page-header h1 { font-size: 1.15rem; }
    .page-header p { font-size: 0.9rem; }
    .breadcrumb { font-size: 0.78rem; flex-wrap: wrap; gap: 6px; }

    /* Equipment filter */
    .equipment-filter { gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
    .filter-btn { padding: 8px 14px; font-size: 0.78rem; }

    /* Footer */
    .footer { padding: 50px 0 0; }
    .footer-grid { gap: 28px; }
    .footer-brand p { font-size: 0.85rem; }
    .footer-links h4, .footer-contact h4 { font-size: 1rem; margin-bottom: 16px; }
    .footer-links a, .footer-contact p { font-size: 0.85rem; }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        font-size: 0.75rem;
        padding: 20px 0;
    }
    .social-links a { width: 38px; height: 38px; font-size: 0.85rem; }

    /* Buttons */
    .btn { padding: 11px 22px; font-size: 0.88rem; }
    .btn-lg { padding: 13px 26px; font-size: 0.92rem; }
}

/* ===== TRES PETITS PHONES (380px) ===== */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.05rem; }
    .hero-stats { gap: 12px; }
    .about-values { grid-template-columns: 1fr; }
    .counters-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 1.4rem; }
    .footer-bottom { font-size: 0.7rem; }
    .container { padding: 0 14px; }
    .section-header h2 { font-size: 0.9rem; }
    .page-header h1 { font-size: 1.05rem; }
    .logo-img { height: 52px; }
    #header.scrolled .logo-img { height: 44px; }
}

/* ===== Landscape phones ===== */
@media (max-width: 900px) and (orientation: landscape) {
    .hero { min-height: 100vh; }
    .hero-content { padding-top: 100px; }
}
