/* Adaptation mobile — chargé en dernier, complète site.css et shop.css.
   Le site d'origine ne prévoyait qu'un seul palier (960px) ; ce fichier ajoute
   le vrai comportement téléphone : menu, débordements, tailles de touche. */

/* ── correctifs de débordement (valables à toutes les tailles) ──────────
   Les enfants de grille ont min-width:auto par défaut : leur contenu le plus
   large (ici l'image produit de 800 px) force la colonne et fait déborder la
   page horizontalement. */
.hero-grid > *, .buy-card > *, .prod > *, .science > *, .ritual-grid > *,
.fw-grid > *, .rev-grid > *, .foot-top > *, .co-grid > *, .values .wrap > * { min-width: 0; }
img { height: auto; }
body { overflow-x: hidden; }

/* ── menu mobile ───────────────────────────────────────────────────── */
.burger { display: none; background: none; border: 0; padding: 10px 12px 10px 0; cursor: pointer; }
.burger span { display: block; width: 22px; height: 1px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.burger span + span { margin-top: 6px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }

  /* Le menu déroule sous l'en-tête plutôt que de disparaître. */
  .nav-links {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--porcelain); border-bottom: 1px solid var(--line);
    padding: 0 22px; max-height: 0; overflow: hidden;
    transition: max-height .35s var(--ease), padding .35s var(--ease);
  }
  .nav-links.open { max-height: 320px; padding: 10px 22px 22px; }
  .nav-links a { display: block; padding: 15px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  header { position: sticky; }
  .nav { position: relative; height: 62px; }
  .brand { font-size: 22px; letter-spacing: .34em; padding-left: .34em; }
  .cart { padding: 9px 14px; font-size: 11px; letter-spacing: .1em; }
}

/* ── téléphones ────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  .sec { padding: 66px 0; }
  .announce { font-size: 9.5px; letter-spacing: .14em; padding: 9px 14px; line-height: 1.5; }

  /* Bannière : la photo passe sous le texte, sans hauteur en vh (barre d'URL). */
  .hero { padding: 20px 0 26px; }
  .hero-grid { min-height: 0; gap: 26px; }
  .hero-left { padding-right: 0; padding-bottom: 0; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 48px); }
  .hero .sub { font-size: 16px; margin: 20px 0 26px; }
  .hero-right { min-height: 0; }
  .hero-stage { aspect-ratio: 1 / .92; }
  .hero-tag, .hero-idx { font-size: 10px; }
  .hero-tag { left: 16px; bottom: 16px; } .hero-idx { right: 16px; top: 16px; }
  .kicker { margin-bottom: 18px; font-size: 11px; }

  /* Boutons pleine largeur : cible tactile confortable. */
  .btn { padding: 17px 26px; font-size: 12px; letter-spacing: .16em; justify-content: center; }
  .hero-cta { gap: 18px; }
  .hero-cta .btn { width: 100%; }
  .prod-buy .btn, .prod-buy a.btn { width: 100%; justify-content: center; }
  .prod-buy { flex-wrap: wrap; gap: 16px; }

  /* Pastilles de teinte : 44 px de zone tactile (recommandation iOS/Android). */
  .swatches { gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
  .swatch { width: 38px; height: 38px; }
  .swatch::after { inset: -5px; }
  .swatch-name { width: 100%; margin-left: 0; margin-top: 4px; }

  .values .wrap { grid-template-columns: 1fr 1fr; }
  .value { padding: 24px 14px; }
  .value:nth-child(2n) { border-right: 0; }
  .value:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .science-txt { padding: 34px 0 0; }
  .ritual-img img { min-height: 260px; }
  .ritual-txt { padding: 36px 22px; }
  .ritual-steps li { font-size: 15px; }

  .fw-grid { gap: 0; }
  .fw { padding: 26px 0; }

  /* Fiche d'achat */
  .buy-visual { min-height: 260px; }
  .buy-visual img { width: 62%; }
  .buy-info { padding: 34px 22px; }
  .buy-info h3 { font-size: 30px; }
  .buy-price .now { font-size: 36px; }
  .buy-card .btn-buy { width: 100%; }

  .prod-media { min-height: 240px; }
  .prod-body { padding: 30px 22px; }
  .prod-body h3 { font-size: 28px; }
  .prod-media.textcard .pull { font-size: 20px; }

  /* Tableau comparatif : lisible sans défilement horizontal. */
  .ctable .crow { grid-template-columns: 1.5fr .75fr .75fr; }
  .ctable .crow > div { padding: 15px 12px; font-size: 13px; }
  .ctable .feat { font-size: 13px; }
  .ctable .crow.head > div { font-size: 10px; letter-spacing: .1em; }

  .rev-top { flex-wrap: wrap; gap: 10px; }
  .faq-grid summary { font-size: 15px; }
  .manifesto { padding: 60px 0; }
  .manifesto p { font-size: 20px; }

  .foot-top { gap: 34px; }
  .foot-bot { flex-direction: column; gap: 10px; text-align: center; }

  /* Tunnel de commande */
  .co { padding: 34px 0 70px; }
  .co h1 { font-size: 32px; margin-bottom: 22px; }
  .co-summary { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr 1.6fr; }
  /* 16 px minimum : en dessous, iOS zoome automatiquement sur le champ. */
  .field input, .field textarea, .field select { font-size: 16px; padding: 14px; }

  .page { padding: 50px 0 70px; }
  .page h1 { font-size: 34px; }
  .ok-box { padding: 22px 18px; }
  .ok-box .ref { font-size: 24px; }
}

/* ── panier ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* dvh suit la barre d'adresse mobile ; le bloc de paiement reste visible. */
  .drawer { width: 100%; height: 100dvh; }
  .drawer-head { padding: 18px 20px; }
  .drawer-body { padding: 14px 20px; }
  .drawer-foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); }
  .drawer-cont { padding: 14px 0; }
  .ci { grid-template-columns: 56px 1fr auto; gap: 12px; padding: 15px 0; }
  .ci img, .ci-noimg { width: 56px; height: 56px; }
  .qty button { width: 30px; height: 30px; }
}

/* ── très petits écrans (≤ 360 px) ─────────────────────────────────── */
@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 19px; letter-spacing: .28em; }
  .cart { padding: 8px 10px; }
  .buy-info { padding: 28px 18px; }
  .ctable .crow > div { padding: 13px 8px; font-size: 12px; }
}

/* ── cibles tactiles ───────────────────────────────────────────────────
   Sur écran tactile on ne vise pas au pixel : tout ce qui se clique doit
   faire au moins ~44 px de haut (recommandation Apple/Google). */
@media (hover: none), (max-width: 960px) {
  .nav .brand { padding-top: 8px; padding-bottom: 8px; }
  .faq-grid summary { padding-top: 20px; padding-bottom: 20px; }
  .fcol a { padding: 11px 0; display: inline-block; }
  .foot-bot a { padding: 12px 4px; display: inline-block; }
  .co-note a { padding: 12px 4px; display: inline-block; }
  .drawer-close { width: 44px; height: 44px; margin: -11px -12px -11px 0; font-size: 20px; }
  .qty button { width: 34px; height: 34px; }
  .qty .rm { height: 34px; padding: 0 6px; }
  .news input { padding: 13px 14px; font-size: 16px; }
  .news button { padding: 0 20px; min-height: 46px; }
}

/* ── admin sur téléphone ───────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Tout est préfixé .shell : ces règles ne doivent jamais toucher le site public,
     qui partage les mêmes noms de classes (.btn, .panel…). */
  .shell .grid2 > *, .shell .grid3 > *, .shell .grid4 > * { min-width: 0; }
  .shell .grid2, .shell .grid3, .shell .grid4 { grid-template-columns: 1fr; }
  /* La grille de l'admin doit pouvoir rétrécir, sinon c'est la page qui déborde. */
  .shell, .shell > * { min-width: 0; }
  .shell .main { max-width: 100%; overflow-x: hidden; }
  .shell .btn { padding: 12px 18px; }
  .shell .btn.sm { padding: 10px 14px; }
  .shell .inline { flex-wrap: wrap; }
  .shell input, .shell textarea, .shell select { min-width: 0; min-height: 42px; font-size: 16px; }
  .shell input[type=color] { padding: 4px; }
  .shell input[type=checkbox] { width: 20px; height: 20px; min-height: 0; }
  /* Les tableaux défilent dans leur cadre (.panel a overflow-x:auto). */
  .shell table { min-width: 460px; }
  .shell .cards { gap: 10px; }
}
@media (max-width: 900px) {
  .shell .side { display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    padding: 14px 16px; height: auto; }
  .shell .side .logo { width: 100%; padding: 0 0 12px; margin-bottom: 10px; font-size: 20px; }
  .shell .side a { padding: 8px 12px; font-size: 12px; }
  .shell .side form { width: 100%; padding: 14px 0 0; margin-top: 12px; }
  .shell .side .view { padding: 10px 0 0; }
  /* Les tableaux de commandes défilent dans leur cadre, jamais la page. */
  .shell .panel { overflow-x: auto; padding: 16px; }
  .shell details.prod > summary { flex-wrap: wrap; gap: 8px; }
  .shell details.prod .inner { padding: 16px 14px 20px; }
}
