/* =============================================
   EXTERNALIS TEAM — responsive.css
   Mobile-first breakpoints
   ============================================= */

/* ---- Fix débordement horizontal global ---- */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* =============================================
   TOUTES LARGEURS <= 1440px
   ============================================= */
@media (max-width: 1440px) {
  .hero-section,
  .chaos-section,
  .transition-section,
  .comp-section,
  .modeles-section,
  .metiers-section,
  .secteurs-section,
  .processus-section,
  .resultats-section,
  .garanties-section,
  .faq-section,
  .contact-section {
    width: 100%;
    max-width: 100%;
  }
}

/* =============================================
   TABLETTE (max 1024px)
   ============================================= */
@media (max-width: 1024px) {

  .hero-section { height: auto; min-height: 100vh; overflow: hidden; }

  .hero-content { flex-direction: column; padding: 40px 24px 48px; gap: 40px; }
  .hero-left { padding-top: 0; }
  .hero-title, .hero-italic { font-size: 48px; }
  .hero-right { width: 100%; max-width: 100%; padding-top: 0; }
  .hero-photos { justify-content: center; }
  .hero-photo { width: 140px; height: 200px; min-width: 0; }

  .step-card { width: 100% !important; max-width: 100% !important; }

  .header { padding: 16px 16px 0; }
  .nav { display: none !important; }
  .header-cta .btn-outline-dark,
  .header-cta .btn-dark { display: none !important; }
  .hamburger { display: flex !important; }

  .chaos-title { width: 100%; font-size: 32px; }
  .chaos-title-accent { font-size: 32px; }

  .comp-title { width: 100%; font-size: 32px; }
  .comp-cards { flex-direction: column; align-items: center; }
  .comp-card { width: 100%; max-width: 411px; height: auto; }

  .modeles-title { width: 100%; font-size: 32px; }
  .modeles-grid { grid-template-columns: repeat(2, 1fr); }
  .modeles-card { width: 100%; }
  .modeles-card-text { width: 100%; }

  .metiers-title { width: 100%; font-size: 32px; }
  .metiers-layout { flex-direction: column; }
  .metiers-nav-item { width: 100%; }
  .metiers-detail { width: 100%; }
  .metiers-detail-title { width: 100%; }

  .processus-title { width: 100%; font-size: 32px; }
  .processus-desc { width: 100% !important; }
  .processus-card { width: 100% !important; height: auto !important; flex-direction: column; }
  .processus-left { flex: none; padding: 32px 28px; gap: 24px; }
  .processus-right { padding: 0 22px 22px; }
  .processus-photo { width: 100% !important; height: 300px !important; }
  .processus-step-text { width: 100% !important; }

  .faq-title { width: 100%; font-size: 32px; }
  .faq-list { width: 100% !important; }
  .faq-item { width: 100% !important; }

  .contact-section { height: auto !important; }
  .contact-inner { flex-direction: column; padding: 48px 24px; gap: 40px; }
  .contact-title { font-size: 42px; width: 100%; }
  .contact-desc { width: 100% !important; }
  .contact-form-box { width: 100% !important; height: auto !important; }
  .contact-sep { width: 100% !important; }

  .garanties-layout { margin-left: 0 !important; flex-direction: column; align-items: center; gap: 40px; }
  .garanties-title { width: 100%; font-size: 32px; }
  .garanties-photo { width: 100%; }
}

/* =============================================
   MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {

  html, body { overflow-x: hidden; }

  .hero-section, .hero-content, .hero-left, .hero-right, .hero-steps,
  .chaos-section, .cc-outer, .transition-section, .comp-section,
  .modeles-section, .metiers-section, .secteurs-section, .processus-section,
  .resultats-section, .garanties-section, .faq-section,
  .contact-section, .contact-inner {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* ---- Header ---- */
  .header { padding: 12px 16px 0; }
  .header-inner { height: auto; padding: 12px 16px; gap: 16px; flex-wrap: nowrap; justify-content: space-between; align-items: center; }
  .nav { display: none !important; }
  .header-cta { gap: 8px; margin-left: 0; }
  .header-cta .btn-outline-dark, .header-cta .btn-dark { display: none !important; }
  .header-contact { font-size: 14px; }
  .hamburger { display: flex !important; margin-left: auto; }

  /* ---- Hero ---- */
  .hero-section { height: auto; min-height: auto; }
  .hero-content { flex-direction: column; padding: 28px 20px 40px; gap: 32px; }
  .hero-title, .hero-italic { font-size: 38px; }
  .hero-desc { font-size: 16px; max-width: 100%; }
  .hero-buttons { flex-direction: column; gap: 12px; }
  .btn-cyan, .btn-outline-cyan { width: 100%; height: 54px; justify-content: center; }
  .hero-stats { flex-direction: row; align-items: center; gap: 20px; flex-wrap: nowrap; }
  .stat-divider { display: block; width: 1px; height: 48px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
  .stat-value { font-size: 30px; }
  .stat-icon { margin-left: 8px; width: 24px; height: 24px; }
  .hero-right { width: 100%; max-width: 100%; }
  .hero-photos { gap: 8px; justify-content: center; }
  .hero-photo { width: calc(33% - 8px); height: 160px; min-width: 0; }

  .hero-steps { width: 100%; }
  .step-card { width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 60px; padding: 14px 16px; }

  /* ---- Chaos ---- */
  .chaos-section { padding: 48px 20px 0; gap: 16px; }
  .chaos-title { font-size: 26px; width: 100%; }
  .chaos-title-accent { font-size: 26px; }
  .chaos-desc { font-size: 15px; }
  .cc-outer { margin-top: 16px; overflow: hidden; }
  .cc-clip { padding-bottom: 60px; overflow: hidden; }
  .cc-card { width: 260px; }
  .cc-next { right: 0; width: 56px; height: 56px; }

  /* ---- Transition ---- */
  .transition-section { padding: 24px 20px 48px; }
  .transition-title { width: 100%; font-size: 22px; }

  /* ---- Comparaison ---- */
  .comp-section { padding: 48px 20px; gap: 32px; }
  .comp-title { font-size: 26px; width: 100%; }
  .comp-cards { flex-direction: column; align-items: stretch; gap: 16px; }
  .comp-card { width: 100%; height: auto; padding: 28px 24px; gap: 24px; }
  .comp-btn { width: 100%; }

  /* ---- Modèles ---- */
  .modeles-section { padding: 48px 20px; gap: 32px; }
  .modeles-title { font-size: 26px; width: 100%; }
  .modeles-grid { grid-template-columns: 1fr; }
  .modeles-card { width: 100%; height: auto; padding: 28px 24px; }
  .modeles-card-text { width: 100%; }

  /* ---- Métiers ---- */
  .metiers-section { padding: 48px 20px; gap: 32px; }
  .metiers-title { font-size: 26px; width: 100%; }
  .metiers-layout { flex-direction: column; gap: 16px; }
  .metiers-nav-item { width: 100%; height: auto; padding: 16px; font-size: 16px; }
  .metiers-detail { width: 100%; min-height: auto; padding: 24px 20px; }
  .metiers-detail-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .metiers-detail-icon-box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }
  .metiers-detail-title-wrap {
    flex: 1;
    min-width: 0;
  }
  .metiers-detail-title {
    width: 100%;
    font-size: 20px;
  }
  .metiers-detail-reporting {
    width: 100%;
    font-size: 14px;
    margin-inline-start: 65px;
  }
  .metiers-detail-body { flex-direction: column; gap: 20px; padding: 20px; }

  /* ---- Secteurs ---- */
  .secteurs-section { padding: 32px 20px 16px; }
  .secteurs-title { font-size: 26px; width: 100%; }
  .secteurs-outer { overflow: hidden; }
  .secteurs-clip { overflow: hidden; }
  .secteurs-card { width: 180px; height: 140px; }
  .secteurs-next { right: 0; width: 56px; height: 56px; }

  /* ---- Processus ---- */
  .processus-section { padding: 48px 20px; gap: 28px; }
  .processus-title { font-size: 26px; width: 100% !important; }
  .processus-desc { font-size: 15px; width: 100% !important; }
  .processus-card { width: 100% !important; max-width: 100% !important; flex-direction: column; height: auto !important; border-radius: 12px; }
  .processus-left { flex: none; padding: 24px 20px; gap: 20px; }
  .processus-step-title { font-size: 20px; }
  .processus-step-text { width: 100% !important; font-size: 15px; }
  .processus-btn { width: 60px; height: 60px; }
  .processus-right { padding: 0 12px 12px; }
  .processus-photo { width: 100% !important; height: 220px !important; }

  /* ---- Résultats ---- */
  .resultats-section { padding: 48px 20px; gap: 32px; }
  .resultats-title { font-size: 26px; }
  .resultats-outer { overflow: hidden; }
  .resultats-clip { overflow: hidden; }
  .resultats-card { width: 300px; padding: 24px; }
  .resultats-prix { font-size: 30px; }
  .resultats-next { right: 0; width: 56px; height: 56px; }
  .resultats-sep { width: 100%; }

  /* ---- Garanties ---- */
  .garanties-section { padding: 48px 20px; gap: 32px; }
  .garanties-title { font-size: 26px; width: 100%; }
  .garanties-layout { margin-left: 0 !important; flex-direction: column; gap: 32px; }
  .garanties-photo { width: 100%; height: 300px; }
  .garanties-item-text { font-size: 16px; }

  /* ---- FAQ ---- */
  .faq-section { padding: 48px 20px; gap: 28px; }
  .faq-title { font-size: 26px; width: 100%; }
  .faq-list { width: 100% !important; }
  .faq-item { width: 100% !important; }
  .faq-header { height: auto; padding: 20px; }
  .faq-question { font-size: 17px; }
  .faq-answer { padding: 0 20px 20px; }
  .faq-answer p { font-size: 15px; }

  /* ---- Contact ---- */
  .contact-section { height: auto !important; }
  .contact-inner { flex-direction: column; padding: 48px 20px; gap: 36px; }
  .contact-left { gap: 24px; }
  .contact-title { font-size: 36px; width: 100%; }
  .contact-subtitle { font-size: 22px; }
  .contact-desc { font-size: 15px; width: 100% !important; }
  .contact-btn-call { width: 100%; justify-content: center; }
  .contact-form-box { width: 100% !important; height: auto !important; padding: 32px 24px; }
  .contact-form-title { font-size: 22px; }
  .contact-sep { width: 100% !important; }
  .contact-btn-send { width: 100%; justify-content: center; }

  /* ---- Modal ---- */
  .modal-box { width: calc(100% - 40px); padding: 32px 24px; }
}

/* =============================================
   PETIT MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {

  .hero-title, .hero-italic { font-size: 30px; }
  .hero-photo { width: calc(33% - 6px); height: 130px; }
  .hero-stats { flex-direction: row !important; align-items: center; gap: 16px; flex-wrap: nowrap; }
  .stat-divider { display: block !important; width: 1px; height: 48px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
  .stat-value { font-size: 26px; }

  .chaos-title, .chaos-title-accent { font-size: 22px; }
  .comp-title, .modeles-title, .metiers-title,
  .secteurs-title, .processus-title, .resultats-title,
  .garanties-title, .faq-title { font-size: 22px; }

  .metiers-detail-title { font-size: 18px; }
  .metiers-detail-icon-box { width: 52px; height: 52px; }

  .contact-title { font-size: 28px; }
  .step-card { padding: 12px 14px; }
  .step-text { font-size: 14px; }
  .step-num { font-size: 18px; }
  .btn-cyan, .btn-outline-cyan { font-size: 14px; height: 50px; }
  .resultats-card { width: 280px; }
  .cc-card { width: 240px; }
  .secteurs-card { width: 160px; height: 130px; }
  .cc-next, .secteurs-next, .resultats-next { right: 0; }
}