/* WORKANDSUCCESS_FUSION_VITRINE_MOBILE_FIXES_V1 — Patch responsive complet
 * Append APRÈS vitrine.css dans base.html.
 * Couvre : hero, sections padding, typo, navbar, tarifs, footer, forms, CTA.
 * Tests sur < 480 / < 768 / < 960. iOS zoom-on-input bloqué (16px minimum).
 */

/* ─────────── TABLET (max 960px) ─────────── */
@media (max-width: 960px) {
  /* Hero : pile colonnes au lieu de 2 */
  .fs-hero { padding: 56px 0 64px; }
  .fs-hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .fs-hero__visual {
    order: 2;
    max-width: 100%;
  }
  /* Section padding global réduit */
  .fs-section { padding: 60px 0; }
  /* Container interne respire mieux */
  .fs-container { padding-left: 20px; padding-right: 20px; }
}

/* ─────────── MOBILE (max 768px) ─────────── */
@media (max-width: 768px) {
  /* Typography hero */
  .fs-hero__title { font-size: clamp(28px, 7vw, 38px) !important; line-height: 1.15 !important; }
  .fs-hero__lead { font-size: 16px !important; line-height: 1.6 !important; }
  .fs-hero__eyebrow { font-size: 12px; padding: 5px 10px; }
  .fs-hero { padding: 40px 0 48px; }

  /* Headings réduits */
  .fs-h1, h1 { font-size: clamp(26px, 6vw, 34px) !important; }
  .fs-h2, h2 { font-size: clamp(22px, 5vw, 28px) !important; }
  .fs-h3, h3 { font-size: clamp(19px, 4.5vw, 24px) !important; }
  .fs-display { font-size: clamp(32px, 8vw, 44px) !important; }

  /* Sections : padding réduit */
  .fs-section { padding: 44px 0 !important; }
  .fs-stats, .fs-modules, .fs-usecases, .fs-pricing, .fs-cta { padding: 44px 0 !important; }

  /* CTA buttons : 100% width + min height touch */
  .fs-hero__cta { flex-direction: column; gap: 12px; }
  .fs-hero__cta .fs-btn { width: 100%; min-height: 48px; justify-content: center; }
  .fs-btn { min-height: 44px; padding: 12px 20px; }
  .fs-cta__buttons .fs-btn { width: 100%; }

  /* Bullets hero stack */
  .fs-hero__bullets {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Cards generiques */
  .fs-card, .fs-module-card, .fs-usecase-card, .fs-pricing-card, .fs-testimonial {
    padding: 20px !important;
  }

  /* Pricing : forcer 1 colonne */
  .fs-pricing-grid, .fs-pricing { grid-template-columns: 1fr !important; gap: 16px !important; }
  .fs-pricing-card { max-width: 100%; }

  /* Stats grid */
  .fs-stats__grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
  .fs-stat__value { font-size: clamp(28px, 7vw, 36px) !important; }

  /* Footer responsive */
  .fs-footer { padding: 40px 20px 32px !important; }
  .fs-footer__grid { grid-template-columns: 1fr 1fr !important; gap: 28px; }
  .fs-footer__col { font-size: 14px; }

  /* Forms : taille input 16px minimum (anti zoom iOS) */
  .fs-input, .fs-textarea, .fs-select,
  input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"],
  textarea, select {
    font-size: 16px !important;
    padding: 12px 14px !important;
    min-height: 44px !important;
  }
  .fs-form-grid--2 { grid-template-columns: 1fr !important; }
  .fs-form label { font-size: 14px; }

  /* Modules grid forced 1 col */
  .fs-modules { grid-template-columns: 1fr !important; }

  /* Tableaux : scroll horizontal au lieu d'écrasement */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Tabs / nav internes */
  .fs-tabs { flex-wrap: wrap; }
  .fs-tabs__item { flex: 1 1 auto; min-width: 0; padding: 10px 12px !important; font-size: 14px; }

  /* Images fluid */
  img, svg, video { max-width: 100%; height: auto; }

  /* Hide visual elements purement décoratifs sur petit écran */
  .fs-hero__decorative-shape, .fs-hero__floating-card { display: none !important; }

  /* Chat bubble mobile-friendly (existait déjà mais on consolide) */
  .cb-fab { bottom: 14px !important; right: 14px !important; }
  .cb-panel {
    right: 8px !important; left: 8px !important;
    bottom: 70px !important; width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 110px) !important;
  }
}

/* ─────────── SMALL MOBILE (max 480px) ─────────── */
@media (max-width: 480px) {
  .fs-container { padding-left: 16px; padding-right: 16px; }
  .fs-navbar__inner { padding: 12px 16px !important; }
  .fs-brand__name em { font-size: 16px !important; }
  .fs-brand__name strong { font-size: 11px !important; }
  .fs-brand__mark { width: 32px; height: 32px; flex-basis: 32px; }

  /* Footer 1 colonne sur très petit */
  .fs-footer__grid { grid-template-columns: 1fr !important; }
  .fs-footer__tagline { max-width: 100%; }

  /* Stats : 1 colonne */
  .fs-stats__grid { grid-template-columns: 1fr !important; }

  /* Section padding encore plus réduit */
  .fs-section, .fs-stats, .fs-modules, .fs-usecases, .fs-pricing, .fs-cta { padding: 32px 0 !important; }
  .fs-hero { padding: 28px 0 36px !important; }

  /* Hero title plus petit */
  .fs-hero__title { font-size: clamp(24px, 6vw, 32px) !important; }
  .fs-hero__lead { font-size: 15px !important; }

  /* Tarifs : padding card réduit */
  .fs-pricing-card { padding: 18px !important; }
  .fs-pricing-card__price { font-size: 32px !important; }

  /* Liens navbar mobile : touch target */
  .fs-nav__link { padding: 14px 16px !important; font-size: 16px !important; }
}

/* ─────────── VERY SMALL (max 380px) — iPhone SE 1st gen ─────────── */
@media (max-width: 380px) {
  .fs-container { padding-left: 12px; padding-right: 12px; }
  .fs-hero__title { font-size: 22px !important; line-height: 1.18 !important; }
  .fs-h1, h1 { font-size: 22px !important; }
  .fs-h2, h2 { font-size: 19px !important; }
  .fs-h3, h3 { font-size: 17px !important; }
}

/* ─────────── PRINT (clean) ─────────── */
@media print {
  .fs-navbar, .fs-footer, .cb-fab, .cb-panel, .fs-nav__toggle { display: none !important; }
}

/* ─────────── REDUCED MOTION ─────────── */
@media (prefers-reduced-motion: reduce) {
  .fs-hero__visual, .fs-hero__floating-card, [class*="animate"] {
    animation: none !important;
    transition: none !important;
  }
}
