/* ================================================================
   YENZCLUB 2026 — Mobile first + accessibility polish
   ================================================================ */

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .yz-scope *, .yz-scope *::before, .yz-scope *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .yz-marquee__track { animation: none !important; }
  .yz-wallet { transform: none !important; }
  .gs-hero-text, .gs-reveal, .gs-fade, .gs-chars, .gs-words, .gs-scale, .gs-slide-left, .gs-slide-right, .gs-stagger, .gs-stagger > *, .yz-char, .yz-word {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Focus states (keyboard nav) ---------- */
.yz-scope a:focus-visible,
.yz-scope button:focus-visible,
.yz-scope input:focus-visible,
.yz-scope textarea:focus-visible,
.yz-scope select:focus-visible {
  outline: 2px solid var(--yz-brown);
  outline-offset: 3px;
  border-radius: 2px;
}
.yz-btn:focus-visible { outline-offset: 4px; }

/* ---------- Touch target sizing (min 44×44 per WCAG) ---------- */
@media (pointer: coarse) {
  .yz-scope .yz-nav-icon { width: 44px; height: 44px; }
  .yz-scope .yz-btn { padding: 1.3rem 2.4rem; min-height: 48px; }
  .yz-scope .yz-accordion__btn { padding: 2rem 0; min-height: 60px; }
  .yz-scope .yz-product__variant { min-height: 44px; padding: 0.9rem 1.4rem; }
  .yz-scope .yz-nav-link { padding: 0.6rem 0; }
}

/* ---------- Improve text rendering on mobile ---------- */
@media (max-width: 768px) {
  .yz-scope {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
  }
  .yz-scope .yz-massive { font-size: clamp(4rem, 20vw, 10rem); }
  .yz-scope .yz-title { font-size: clamp(2.8rem, 12vw, 5rem); }
  .yz-scope .yz-lead { font-size: 1.05rem; }

  /* Tighter padding */
  .yz-scope .yz-section-padding { padding: 4.5rem var(--yz-pad-x); }
  /* Hero stays side-by-side on mobile (text left, video right) */
  .yz-scope .yz-hero__left { padding: 2rem var(--yz-pad-x); }
  .yz-scope .yz-hero__subtitle-box { padding: 1.2rem var(--yz-pad-x); }
  .yz-scope .yz-hero__media { padding: 0.6rem; min-height: 160px; }
  .yz-scope .yz-hero__media > * { min-height: 160px; }

  /* Format cards — full width */
  .yz-scope .yz-format-card { padding: 2.5rem var(--yz-pad-x); gap: 1.5rem; min-height: 0; }
  .yz-scope .yz-format-card h3 { font-size: 2.8rem; }
  .yz-scope .yz-format-card p { font-size: 0.95rem; margin-top: 1rem; }

  /* Membership info */
  .yz-scope .yz-membership__info { padding: 3.5rem var(--yz-pad-x); }
  .yz-scope .yz-price { font-size: 2.8rem; }
  .yz-scope .yz-membership__text { font-size: 1rem; }
  .yz-scope .yz-wallet-container { padding: 3rem 1rem; min-height: 440px; }
  .yz-scope .yz-wallet { width: 90%; max-width: 320px; height: 460px; }

  /* Image-text stacking */
  .yz-scope .yz-image-text__text { padding: 3rem var(--yz-pad-x); gap: 1.2rem; }
  .yz-scope .yz-image-text__text .yz-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .yz-scope .yz-image-text__media { min-height: 360px; }

  /* Stats */
  .yz-scope .yz-stat-card { padding: 2.5rem var(--yz-pad-x); }
  .yz-scope .yz-stat-card__num { font-size: 3.2rem; }
  .yz-scope .yz-stat-card__label { font-size: 0.68rem; }

  /* Marquee more aggressive */
  .yz-scope .yz-marquee { padding: 1.2rem 0; }
  .yz-scope .yz-marquee__item { font-size: 2.4rem; gap: 2.5rem; }
  .yz-scope .yz-marquee__item::after { margin-left: 2.5rem; }
  .yz-scope .yz-marquee__track { gap: 2.5rem; }

  /* Testimonials */
  .yz-scope .yz-testimonial-card { padding: 2rem 1.8rem; gap: 1.4rem; }
  .yz-scope .yz-testimonial-card__text { font-size: 1rem; }

  /* FAQ */
  .yz-scope .yz-accordion__btn { padding: 1.6rem 0; font-size: 1rem; }
  .yz-scope .yz-accordion__btn > span:last-child { width: 34px; height: 34px; font-size: 1.1rem; }

  /* Shop */
  .yz-scope .yz-shop__header { margin-bottom: 3rem; }
  .yz-scope .yz-merch-grid { gap: 2.5rem 1rem; }
  .yz-scope .yz-merch-item__title { font-size: 0.72rem; }

  /* Product detail */
  .yz-scope .yz-product { padding: calc(var(--yz-header-height) + 1.5rem) var(--yz-pad-x) 2.5rem; gap: 1.5rem; }
  .yz-scope .yz-product__title { font-size: clamp(2rem, 8vw, 3rem); }
  .yz-scope .yz-product__gallery { gap: 0.5rem; }
  .yz-scope .yz-product__variants { gap: 0.4rem; }

  /* Collection */
  .yz-scope .yz-collection-header { padding: calc(var(--yz-header-height) + 2.5rem) var(--yz-pad-x) 2.5rem; }
  .yz-scope .yz-collection-header h1 { font-size: clamp(3rem, 13vw, 5rem); }

  /* Footer */
  .yz-scope .yz-footer { padding: 4.5rem var(--yz-pad-x) 2rem; }
  .yz-scope .yz-footer__grid { gap: 2.5rem; margin-bottom: 3rem; padding-bottom: 3rem; }
  .yz-scope .yz-footer__big { font-size: clamp(5rem, 26vw, 12rem); margin-top: 3rem; }

  /* Contact form — single col */
  .yz-scope .yz-form__row { grid-template-columns: 1fr; gap: 0.8rem; }

  /* CTA banner */
  .yz-scope .yz-cta-banner { padding: 5rem var(--yz-pad-x); }
  .yz-scope .yz-cta-banner .yz-title { font-size: clamp(2.4rem, 11vw, 4rem); }

  /* League */
  .yz-scope .yz-league > div:first-child { padding: 3rem var(--yz-pad-x) !important; }
  .yz-scope .yz-league > div:last-child { min-height: 340px !important; }

  /* Page hero */
  .yz-scope .yz-page-hero { min-height: 60vh !important; }
  .yz-scope .yz-page-hero h1 { font-size: clamp(2.5rem, 14vw, 6rem); }

  /* Page transition overlay — smaller logo */
  .yz-scope .yz-page-transition__logo,
  .yz-page-transition__logo { font-size: 3rem !important; }

  /* Disable cursor follower on mobile - already JS guarded but safe extra */
  .yz-cursor { display: none; }

  /* Gallery */
  .yz-scope .yz-gallery-grid { gap: 0.25rem !important; }

  /* Partners */
  .yz-scope .yz-partners { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding: 3rem 0; }
  .yz-scope .yz-partners img { max-height: 32px; }
}

/* ---------- Extra-small screens (phones < 400px) ---------- */
@media (max-width: 400px) {
  .yz-scope .yz-header__right .yz-nav-icon:first-child { display: none; } /* hide search to save room */
  .yz-scope .yz-hero__subtitle-box { padding: 1.8rem var(--yz-pad-x); }
  .yz-scope .yz-hero__subtitle-box .yz-lead { font-size: 0.95rem; }
  .yz-scope .yz-merch-grid { grid-template-columns: 1fr; }
}

/* ---------- Dark mode respect (optional override) ---------- */
@media (prefers-color-scheme: dark) {
  .yz-scope .yz-header { background: rgba(8,8,8,0.85); border-bottom-color: rgba(255,255,255,0.1); }
  /* Pas d'override total : on garde la DA éditoriale */
}

/* ---------- Safe-area (iPhone notch) ---------- */
@supports (padding: max(0px)) {
  .yz-scope .yz-header { padding-left: max(var(--yz-pad-x), env(safe-area-inset-left)); padding-right: max(var(--yz-pad-x), env(safe-area-inset-right)); }
  .yz-scope .yz-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
}

/* ---------- Content visibility for perf ---------- */
@supports (content-visibility: auto) {
  .yz-scope .yz-section-padding,
  .yz-scope .yz-membership,
  .yz-scope .yz-cta-banner,
  .yz-scope .yz-marquee,
  .yz-scope .yz-formats-grid,
  .yz-scope .yz-stats-grid,
  .yz-scope .yz-merch-grid {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
  }
}

/* ---------- Tap highlight color ---------- */
.yz-scope { -webkit-tap-highlight-color: rgba(245, 175, 197, 0.3); }

/* ---------- Print ---------- */
@media print {
  .yz-header, .yz-footer, .yz-marquee, .yz-cta-banner, .yz-cursor, .yz-page-transition { display: none; }
  .yz-scope * { background: white !important; color: black !important; }
}

/* ============================================================
   Pages membre — harmonisation mobile (≤600px)
   Réduit les paddings entre sections + uniformise titres/textes
   ============================================================ */
@media (max-width: 600px) {
  /* NB: le padding-y des sections membre est désormais contrôlé via Shopify
     Customize (réglage "Espacement section" sur chaque section). On ne force
     plus de valeurs ici — les inline styles des sections ont la priorité. */

  /* Titres harmonisés sur mobile */
  .events-only h2,
  .bootcamp h2,
  .pass-section h2,
  .dashboard h2,
  .sub-mgr h2 {
    font-size: clamp(36px, 11vw, 56px) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.02em !important;
  }
  .pwa h2 { font-size: clamp(26px, 8vw, 40px) !important; line-height: 1.05 !important; }
  .yenz-welcome h1, .yenz-welcome h2 { font-size: clamp(36px, 11vw, 56px) !important; line-height: 0.95 !important; }
  .prog-run h2 { font-size: clamp(36px, 11vw, 56px) !important; line-height: 0.95 !important; }

  /* Textes corps cohérents */
  .yenz-welcome p,
  .prog-run p,
  .events-only p,
  .bootcamp__feature,
  .dashboard p,
  .sub-mgr__lead,
  .pwa p,
  .pass-section p,
  .yz-discount p {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
  }

  /* Eyebrows mono harmonisés */
  .events-only .eyebrow,
  .bootcamp__eyebrow,
  .dashboard .eyebrow,
  .sub-mgr__inner .eyebrow,
  .pass-section .eyebrow,
  .pwa .eyebrow,
  .yz-discount .eyebrow,
  .prog-run .eyebrow {
    font-size: 10.5px !important;
    letter-spacing: 0.22em !important;
  }
}
