/* ============================================================
   CAPSULE HOME — Responsive complet toutes pages
   Mobile first — breakpoints : 1200 / 1024 / 900 / 768 / 640 / 480 / 375
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   1. LAYOUT GLOBAL — SIDEBAR & WRAPPER
   ═══════════════════════════════════════════════════════════ */

/* Tablet large */
@media (max-width: 1200px) {
  :root { --sb-width: 220px; }
  html body #wrapper, html body main#wrapper, html body main.wrapper {
    margin-left: 220px !important;
    width: calc(100% - 220px) !important;
  }
  .ch-footer { margin-left: 220px !important; width: calc(100% - 220px) !important; }
  body:not(.page-index):not(.page-registration):not(.page-authentication) div#center-column { margin-left: 220px; }
  .page-contact #wrapper.wrapper,
  .page-cms.cms-id-4 #wrapper.wrapper { margin-left: 220px !important; width: calc(100% - 220px) !important; }
}

/* Mobile / tablette */
@media (max-width: 900px) {
  :root { --sb-width: 0px; }

  /* Sidebar cachée */
  .ch-sidebar { transform: translateX(-100%) !important; transition: transform .35s cubic-bezier(0.4,0,0.2,1) !important; }
  .ch-sidebar.is-open { transform: translateX(0) !important; box-shadow: 8px 0 32px rgba(0,0,0,.5); }

  /* Contenu pleine largeur */
  html body #wrapper, html body main#wrapper, html body main.wrapper,
  .ch-footer,
  .page-contact #wrapper.wrapper,
  .page-cms.cms-id-4 #wrapper.wrapper,
  .page-registration #wrapper,
  .page-authentication #wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body:not(.page-index):not(.page-registration):not(.page-authentication) div#center-column {
    margin-left: 0 !important;
  }

  /* Cacher ancien burger dans sidebar */
  .ch-sidebar__toggle { display: none !important; }
  .ch-mobile-burger { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   2. HOMEPAGE — HERO VIDÉO
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ch-video-hero { min-height: 100svh; min-height: 100vh; }
  .ch-video-hero__content { padding: 0 1.25rem; }
  .ch-video-hero__title { font-size: clamp(1.75rem, 8vw, 2.75rem) !important; line-height: 1.1; }
  .ch-video-hero__desc { font-size: 0.88rem !important; }
  .ch-video-hero__badge { font-size: 0.72rem; }
  .ch-video-hero__trust { gap: 0.75rem; flex-wrap: wrap; }
  .ch-video-hero__trust-sep { display: none; }
  .ch-video-hero__trust-item:nth-child(n+5) { display: none; }
  .ch-video-hero__ctas { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .ch-video-hero__cta-primary { width: 100%; justify-content: center; font-size: 0.9rem; padding: 0.875rem 1.25rem; }
  .ch-video-hero__scroll { display: none; }
  .ch-video-hero__sound { bottom: 1rem; right: 1rem; width: 40px !important; height: 40px !important; }
}

@media (max-width: 480px) {
  .ch-video-hero__title { font-size: clamp(1.5rem, 9vw, 2.25rem) !important; }
  .ch-video-hero__trust { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   3. HOMEPAGE — SECTIONS
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .ch-brand { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .ch-features-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
  .ch-container { padding: 0 1.25rem; }
  .ch-section { padding: 3rem 0; }
  .ch-section-title { font-size: clamp(1.4rem, 5vw, 2rem) !important; }
  .ch-section-subtitle { font-size: 0.9rem !important; }
  .ch-badge { font-size: 0.72rem !important; }

  /* Stats */
  .ch-stats { padding: 1.5rem 0; }
  .ch-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0 !important; }
  .ch-stat__num { font-size: 1.5rem; }

  /* Gammes */
  .ch-gammes-grid { grid-template-columns: 1fr !important; }
  .ch-gamme-card { aspect-ratio: 16/9; }
  .ch-gamme-card__desc { display: none; }

  /* Features */
  .ch-features-grid { grid-template-columns: 1fr !important; }
  .ch-feature-card { padding: 1.25rem; }

  /* Galerie bento */
  .ch-gallery-bento { grid-template-columns: 1fr 1fr !important; grid-template-rows: auto !important; }
  .ch-gallery-bento__item:nth-child(1) { grid-column: 1/3 !important; grid-row: 1 !important; }
  .ch-gallery-bento__item:nth-child(2) { grid-column: 1 !important; grid-row: 2 !important; }
  .ch-gallery-bento__item:nth-child(3) { grid-column: 2 !important; grid-row: 2 !important; }
  .ch-gallery-bento__item:nth-child(4) { grid-column: 1 !important; grid-row: 3 !important; }
  .ch-gallery-bento__item:nth-child(5) { grid-column: 2 !important; grid-row: 3 !important; }
  .ch-gallery-bento__item:nth-child(6) { display: none !important; }
  .ch-gallery-bento__item img { height: 160px !important; }
  .ch-gallery-bento__item:nth-child(1) img { height: 220px !important; }
  .ch-gallery-header { flex-direction: column !important; gap: 1.25rem; padding: 0 1.25rem 2rem; }

  /* CTA */
  .ch-cta { padding: 4rem 1.25rem !important; }
  .ch-cta__title { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
  .ch-cta__buttons { flex-direction: column; align-items: center; }
  .ch-cta__buttons .ch-btn { width: 100% !important; justify-content: center; }

  /* Mission */
  .ch-brand { padding: 0 1.25rem; }
  .ch-mission-box { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .ch-section { padding: 2.5rem 0; }
  .ch-stats-grid { grid-template-columns: 1fr 1fr !important; }
  .ch-about__value-card { padding: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════
   4. FOOTER
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .ch-footer__grid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
}
@media (max-width: 640px) {
  .ch-footer__newsletter-inner { flex-direction: column; gap: 1.25rem; }
  .ch-footer__newsletter-form { flex-direction: column; width: 100%; }
  .ch-footer__newsletter-form input[type="email"] { width: 100% !important; }
  .ch-footer__newsletter-form button { width: 100%; justify-content: center; }
  .ch-footer__grid { grid-template-columns: 1fr !important; }
  .ch-footer__body { padding: 2.5rem 1.25rem 2rem; }
  .ch-footer__copy { flex-direction: column; gap: 0.25rem; text-align: center; }
  .ch-footer__copy-sep { display: none; }
  .ch-footer__bottom-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   5. FICHES PRODUIT
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .cp-body {
    grid-template-columns: 1fr !important;
    height: auto !important; min-height: auto !important;
    padding: 1rem !important; gap: 1rem;
  }
  .cp-left { position: static !important; height: auto !important; }
  .cp-cover { min-height: auto !important; aspect-ratio: 16/9 !important; border-radius: 0.625rem !important; }
  .cp-right { height: auto !important; min-height: auto !important; }
  .cp-configurator { height: auto !important; min-height: auto !important; border-radius: 1rem !important; }
  .cp-options { min-height: auto !important; overflow-y: auto !important; max-height: 60vh; }
  .cp-option-group > .cp-option { display: flex !important; width: 100% !important; margin-right: 0 !important; }
  .cp-size-cards { grid-template-columns: repeat(2, 1fr) !important; }
  .cp-hero { height: 200px !important; }
  .cp-hero__title { font-size: 1.4rem !important; }
}

@media (max-width: 768px) {
  .cp-body { padding: 0.75rem !important; }
  .cp-hero { height: 160px !important; }
  .cp-hero__inner { padding: 0 1rem 1rem !important; }
  .cp-hero__title { font-size: 1.2rem !important; }
  .cp-cover { aspect-ratio: 4/3 !important; }
  .cp-size-cards { grid-template-columns: 1fr !important; gap: 0.5rem !important; }
  .cp-size-cards[style*="2,1fr"] { grid-template-columns: 1fr 1fr !important; }
  .cp-configurator__header { padding: 1rem !important; }
  .cp-configurator__name { font-size: 1.1rem !important; }
  .cp-price-block { padding: 0.75rem 1rem !important; }
  .cp-price-base { font-size: 1.1rem !important; }
  .cp-options { padding: 0.75rem 1rem !important; max-height: none !important; }
  .cp-actions { flex-direction: column !important; padding: 0.75rem 1rem !important; gap: 0.5rem !important; }
  .cp-actions__main, .cp-actions .ch-btn--dark { width: 100% !important; justify-content: center !important; }
  .cp-total { padding: 0.875rem 1rem !important; }
  .cp-total__amount { font-size: 1.25rem !important; }
  .cp-reassurance { padding: 0.5rem 1rem 0.875rem !important; }
  .cp-arrow { width: 36px !important; height: 36px !important; }
  .cp-arrow--prev { left: 0.5rem !important; }
  .cp-arrow--next { right: 0.5rem !important; }
  .cp-doc-section { padding: 2.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .cp-body { padding: 0.5rem !important; }
  .cp-hero { height: 130px !important; }
  .cp-cover { aspect-ratio: 1/1 !important; }
  .cp-size-cards { grid-template-columns: 1fr !important; }
  .cp-option { padding: 0.5rem 0.6rem !important; }
  .cp-option__info span { display: none !important; }
  .cp-models-grid { grid-template-columns: 1fr !important; }
  .cp-features-grid6 { grid-template-columns: 1fr 1fr !important; }
  .cp-usages-grid { grid-template-columns: 1fr !important; }
  .cp-install-steps { grid-template-columns: 1fr !important; }
  .cp-chip { font-size: 0.62rem !important; padding: 0.18rem 0.45rem !important; }
  .cp-cover__info-name { font-size: 1.1rem !important; }
  .cp-cover__info { padding: 1rem 1rem 0.875rem !important; }
}

/* ═══════════════════════════════════════════════════════════
   6. PAGE CONTACT
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ch-contact__hero { height: 240px !important; }
  .ch-contact__hero-inner { padding: 0 1.25rem 1.75rem !important; max-width: 100% !important; }
  .ch-contact__hero-title { font-size: clamp(1.5rem, 6vw, 2.25rem) !important; }
  .ch-contact__hero-sub { font-size: 0.88rem !important; }
}
@media (max-width: 640px) {
  .ch-contact__body { grid-template-columns: 1fr !important; padding: 0 1rem 3rem !important; margin-top: 0 !important; }
  .ch-contact__info { position: static !important; border-radius: 1rem !important; }
  .ch-contact__form-wrap { margin-left: 0 !important; padding: 1.5rem !important; border-radius: 1rem !important; margin-top: 1rem; }
  .ch-contact__fields { grid-template-columns: 1fr !important; }
  .ch-contact__field--half, .ch-contact__field:not(.ch-contact__field--half) { grid-column: span 1 !important; }
}

/* ═══════════════════════════════════════════════════════════
   7. PAGE INSCRIPTION / CONNEXION
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
  .ch-reg-page { grid-template-columns: 1fr !important; }
  .ch-reg-side { display: none !important; }
  .ch-reg-form-wrap { min-height: auto !important; padding: 2rem 1.25rem !important; }
  .ch-reg-form-inner { max-width: 100% !important; }
}
@media (max-width: 480px) {
  .ch-reg-form-wrap { padding: 1.5rem 1rem !important; }
  .ch-reg-type__choices { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
  .ch-pro-fields__grid { grid-template-columns: 1fr !important; }
  .ch-login-footer { flex-direction: column !important; gap: 0.75rem; }
  .ch-login-submit { width: 100% !important; justify-content: center !important; }
  .ch-login-register-btn { width: 100%; }
  .ch-login-sep { margin: 1rem 0; }
}

/* ═══════════════════════════════════════════════════════════
   8. PAGE À PROPOS
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ch-about__hero { height: 260px !important; }
  .ch-about__hero-title { font-size: clamp(1.6rem, 6vw, 2.5rem) !important; }
  .ch-about__hero-inner { padding-top: 0 !important; padding-bottom: 2rem !important; }
}
@media (max-width: 860px) {
  .ch-about__who-grid,
  .ch-about__mission-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .ch-about__who-img { height: 240px !important; border-radius: 1rem !important; }
  .ch-about__mission-img { height: 220px !important; border-radius: 1rem !important; order: -1; }
  .ch-about__pro-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .ch-about__pro-img { height: 260px !important; border-radius: 1rem !important; order: -1; }
  .ch-about__pro-cols { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  .ch-about__pro-targets { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .ch-about__container { padding: 0 1.25rem; }
  .ch-about__who,
  .ch-about__mission-section,
  .ch-about__values-section,
  .ch-about__pro-section { padding: 2.5rem 0 !important; }
  .ch-about__mission-inner { padding: 0 1.25rem !important; }
  .ch-about__mission-quote { font-size: 1.05rem !important; }
  .ch-about__mission-stats { gap: 0.75rem !important; padding: 1.25rem !important; flex-wrap: wrap; justify-content: space-around; }
  .ch-about__mission-stat-sep { display: none; }
  .ch-about__values-grid { grid-template-columns: 1fr 1fr !important; gap: 0.875rem !important; }
  .ch-about__cta-section { padding: 3rem 1.25rem !important; }
  .ch-about__cta-buttons { flex-direction: column; align-items: stretch; }
  .ch-about__btn-primary, .ch-about__btn-outline { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
  .ch-about__values-grid { grid-template-columns: 1fr !important; }
  .ch-about__who-img { height: 200px !important; }
}

/* ═══════════════════════════════════════════════════════════
   9. MODAL ENTRÉE (si réactivée)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .ch-entry-modal__box { padding: 1.75rem 1.25rem !important; border-radius: 1.25rem !important; }
  .ch-entry-modal__choices { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════
   10. SIDEBAR — Ajustements internes tablette
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .ch-sidebar__product-body span { display: none; }
  .ch-sidebar__section-title { font-size: 0.58rem; }
}

/* ═══════════════════════════════════════════════════════════
   11. BOUTON WHATSAPP
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .ch-whatsapp-btn { bottom: 5.5rem !important; right: 1rem !important; width: 48px !important; height: 48px !important; }
}

/* ═══════════════════════════════════════════════════════════
   12. OVERFLOW & BASE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  img { max-width: 100%; height: auto; }
  * { box-sizing: border-box; }
}

/* ═══════════════════════════════════════════════════════════
   13. TYPOGRAPHIE GLOBALE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  html { font-size: 15px; }
  .ch-section-title { font-size: clamp(1.3rem, 5.5vw, 1.75rem) !important; }
  .ch-btn { font-size: 0.88rem !important; padding: 0.75rem 1.25rem !important; }
}

/* ── Spécifications détaillées — grilles responsives ── */
.cp-spec-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.cp-usages-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.cp-models-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Tablette ≤ 900px */
@media (max-width: 900px) {
  .cp-spec-grid2 {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .cp-usages-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cp-models-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cp-tech-table { font-size: .82rem; }
  .cp-tech-row { gap: .5rem; }
  .cp-tech-row span:first-child { min-width: 110px; }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
  .cp-spec-grid2 {
    grid-template-columns: 1fr;
  }
  .cp-usages-grid--3 {
    grid-template-columns: 1fr;
  }
  .cp-models-grid--3 {
    grid-template-columns: 1fr;
  }
  .cp-tech-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    padding: .6rem 0;
  }
  .cp-tech-row span:first-child {
    font-size: .78rem;
    color: var(--ch-text-muted, #888);
    min-width: unset;
  }
  .cp-tech-row strong {
    font-size: .88rem;
  }
  .cp-tech-row--head { display: none; }
}
