/* =========================================================
   HOME RESPONSIVE PATCH
   À charger APRÈS style.css
   ========================================================= */

html, body { max-width: 100%; overflow-x: hidden; }

.hero,
.services,
.projects-section,
.cta-section { overflow: hidden; }

.hero-inner { width: 100%; }
.hero .row { margin-left: 0; margin-right: 0; }
.hero-title { overflow-wrap: anywhere; }
.hero-desc { overflow-wrap: anywhere; }

/* Le menu mobile doit rester au-dessus du contenu */
@media (max-width: 991.98px) {
    .navbar { padding: 14px 0; }
    .navbar .container { padding-left: 16px; padding-right: 16px; }
    .navbar-collapse {
        margin-top: 12px;
        padding: 14px;
        border-radius: 16px;
        background: rgba(13,13,13,.96);
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 18px 45px rgba(0,0,0,.28);
    }
    .navbar-nav { align-items: stretch !important; gap: 4px; }
    .navbar-nav .nav-link { padding: 11px 12px !important; }
    .navbar-nav .btn-nav-cta { margin: 8px 0 0; justify-content: center; }

    .hero { min-height: auto; padding: 118px 0 42px; }
    .hero-inner { padding-bottom: 0; }
    .hero-title { font-size: clamp(2.8rem, 9vw, 4.1rem); }
    .hero-side { margin-top: 26px; }
    .hero-side-box { max-width: 520px; width: 100%; }

    .hero-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 14px;
        margin-top: 34px;
    }

    .services-right { width: 100%; }
    .services-right .btn-nav-cta { margin-top: 4px; }

    .services-marquee,
    .projects-marquee { width: 100%; }
    .service-item { width: min(76vw, 260px); }
    .project-card { width: min(72vw, 290px); }
}

@media (max-width: 767.98px) {
    .hero { padding-top: 104px; }
    .hero-title { font-size: clamp(2.35rem, 13vw, 3.25rem); letter-spacing: -1.5px; }
    .hero-subtitle { font-size: .86rem; }
    .hero-desc { font-size: .96rem; line-height: 1.65; }

    .hero-stats-row { grid-template-columns: 1fr 1fr; }
    .hero-stats-row .stat { min-width: 0; }
    .hero-stats-row .stat p,
    .hero-stats-row .stat span.tag { overflow-wrap: anywhere; }

    .services { padding-top: 56px; }
    .services-title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
    .section-header { margin-bottom: 34px; }
    .section-header h2 { font-size: clamp(1.75rem, 8vw, 2.2rem); line-height: 1.12; }

    .service-item { width: 78vw; max-width: 280px; }
    .project-card { width: 78vw; max-width: 300px; }

    .cta-section { margin-left: 12px; margin-right: 12px; }
    .cta-section h2 { line-height: 1.15; }
}

@media (max-width: 575.98px) {
    .container { width: 100%; max-width: 100%; }
    .hero { padding-top: 96px; padding-bottom: 34px; }
    .hero-side-box h5 { font-size: .98rem; line-height: 1.35; }

    .hero-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 28px;
        padding-top: 18px;
    }
    .hero-stats-row .stat { padding: 2px; }
    .hero-stats-row .stat span.tag { font-size: .62rem; letter-spacing: .4px; }
    .hero-stats-row .stat p { font-size: .72rem; line-height: 1.35; }

    .hero-buttons .btn { max-width: 100%; }
    .services { padding-bottom: 12px; }
    .services-right p { max-width: 95%; }
    .service-item { width: 82vw; }
    .project-card { width: 82vw; }

    /* Évite qu'une animation horizontale agrandisse la page */
    .services-track,
    .projects-track { will-change: transform; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 2.05rem; }
    .hero-stats-row { grid-template-columns: 1fr; }
    .hero-stats-row .stat { border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 10px; }
    .hero-stats-row .stat:last-child { border-bottom: 0; }
}

/* Préférence accessibilité : réduit les déplacements si demandé */
@media (prefers-reduced-motion: reduce) {
    .services-track,
    .projects-track { animation: none !important; transform: none !important; }
}
