/* ============================================
   RESPONSIVE – Mobile-first breakpoints
   ============================================ */

/* ─── Garde-fou anti-débordement horizontal — 12/04/2026 ─────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Tablette (768px+) */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .reassurance-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .steps {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
  
  .step-connector {
    display: block;
    position: absolute;
    top: 40px;
    left: 33%;
    right: 33%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0.3;
  }
  
  .zones-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .panel-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .faq-grid {
    grid-template-columns: 1fr 2fr;
  }
  
  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
  
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .features-mini {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Grands écrans (1280px+) */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-2xl);
  }
}

/* Optimisations mobile */
@media (max-width: 767px) {
  .section {
    padding: var(--space-3xl) 0;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .features-mini {
    grid-template-columns: 1fr;
  }
  
  .mini-card {
    flex-direction: row;
  }
  
  .visual-card {
    min-height: 320px;
  }
  
  .big-number {
    font-size: 3rem;
  }
  
  .tabs {
    flex-direction: column;
  }
  
  .tab-btn {
    justify-content: center;
  }
  
  .fab-phone {
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 56px;
    height: 56px;
  }

  /* FAQ : désactiver sticky sur mobile (évite le chevauchement) */
  .faq-intro {
    position: static;
  }
}

/* ─── Corrections responsive mobile ────────────────────────────── */
@media (max-width: 768px) {

  /* 1. Annuler white-space: nowrap — cause principale du scroll horizontal */
  #process-title,
  .process .section-lead,
  .collaboration .section-lead,
  .visual-strip .strip-text {
    white-space: normal;
    overflow-wrap: break-word;
  }

  /* 2. Service cards : contenir l'image à marges négatives dans la carte */
  .service-card {
    overflow: hidden;
  }

  /* 3. Reassurance bar : 1 colonne sur mobile */
  .reassurance-grid {
    grid-template-columns: 1fr;
  }

  /* 4. Hero : réduire le padding vertical */
  .hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
  }

  /* 5. Boutons hero : empiler en colonne */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* 6. Boutons CTA final : empiler en colonne */
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* 7. Sécurité images — éviter tout débordement résiduel */
  img:not(.service-img) {
    max-width: 100%;
    height: auto;
  }
}

/* ─── Extra-small (iPhone SE 375px) ────────────────────────────── */
@media (max-width: 480px) {

  /* Titre hero : taille réduite sur très petit écran */
  .hero-title {
    font-size: 1.875rem;
  }

  /* Section header : casser les longues lignes */
  .section-title {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Form container : réduire le padding interne */
  .form-container {
    padding: var(--space-lg);
  }

  /* Zones chips trust pills : centrer */
  .hero-trust-pills {
    flex-direction: column;
    align-items: center;
  }
}

/* Réduction mouvement */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mode sombre système (optionnel) */
@media (prefers-color-scheme: dark) {
  /* Peut être activé plus tard */
}