/* ============================================================
   INRO, site vitrine
   Palette dérivée des propres visuels store de l'app (chaque
   fonctionnalité garde la couleur de sa capture d'écran d'origine).
   ============================================================ */

:root {
  --bg: #F6F8FC;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #EEF2F9;
  --text: #0B1526;
  --text-muted: #4B5A72;
  --text-faint: #7C8AA0;
  --border: #E2E8F2;

  --brand: #1D6FB8;
  --brand-ink: #0F4C81;
  --brand-wash: #E7F0FA;

  --green: #00915F;
  --green-wash: #E3F6EE;
  --red: #D93A3A;
  --red-wash: #FCEAEA;
  --amber: #B9720C;
  --amber-wash: #FBF0DE;
  --violet: #6D3FE0;
  --violet-wash: #EFE9FD;
  --pink: #A31E9C;
  --pink-wash: #F8E6F6;
  --teal: #067A6F;
  --teal-wash: #E1F4F1;

  /* Section "mode tactique" : reprend le vrai fond de l'app, fixe dans les deux thèmes */
  --tactique-bg: #170606;
  --tactique-text: #FBEAEA;
  --tactique-red: #E23F3F;

  /* Section démo onboarding : bleu nuit de marque, fixe dans les deux thèmes */
  --demo-bg: #0A1628;
  --demo-surface: #101F38;
  --demo-canvas-bg: #0C1D34;
  --demo-chip-bg: rgba(255,255,255,0.06);
  --demo-border: rgba(255,255,255,0.12);
  --demo-text: #F3F7FC;
  --demo-text-muted: rgba(243,247,252,0.72);
  --demo-text-faint: rgba(243,247,252,0.5);
  --demo-accent: #5FA8E8;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-card: 0 1px 2px rgba(11,21,38,0.04), 0 8px 24px -12px rgba(11,21,38,0.14);
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1220;
    --bg-alt: #101B30;
    --surface: #121F38;
    --surface-2: #182541;
    --text: #EEF3FB;
    --text-muted: #A9B8D0;
    --text-faint: #7E8CA6;
    --border: #223252;

    --brand: #63A9E8;
    --brand-ink: #BBDCF7;
    --brand-wash: #142A44;

    --green: #3FCB98;
    --green-wash: #0F2B24;
    --red: #F07070;
    --red-wash: #2E1414;
    --amber: #E3A83D;
    --amber-wash: #2E2210;
    --violet: #A688F5;
    --violet-wash: #241A42;
    --pink: #E477DC;
    --pink-wash: #351731;
    --teal: #4FCFC0;
    --teal-wash: #0F2B28;
  }
}

:root[data-theme="dark"] {
  --bg: #0A1220;
  --bg-alt: #101B30;
  --surface: #121F38;
  --surface-2: #182541;
  --text: #EEF3FB;
  --text-muted: #A9B8D0;
  --text-faint: #7E8CA6;
  --border: #223252;

  --brand: #63A9E8;
  --brand-ink: #BBDCF7;
  --brand-wash: #142A44;

  --green: #3FCB98;
  --green-wash: #0F2B24;
  --red: #F07070;
  --red-wash: #2E1414;
  --amber: #E3A83D;
  --amber-wash: #2E2210;
  --violet: #A688F5;
  --violet-wash: #241A42;
  --pink: #E477DC;
  --pink-wash: #351731;
  --teal: #4FCFC0;
  --teal-wash: #0F2B28;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 20px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

h2 { font-size: clamp(28px, 4.2vw, 44px); }
h3 { font-size: clamp(20px, 2.6vw, 26px); }

p { margin: 0; }

.lede {
  color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 58ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--accent, var(--brand-ink));
  background: var(--accent-wash, var(--brand-wash));
}

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.lang-switch {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  background: var(--surface);
}
.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  margin: 0;
  padding: 6px 13px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-faint);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-current="true"] {
  background: var(--brand);
  color: #fff;
}
.lang-btn[aria-current="true"]:hover { color: #fff; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); }
@media (max-width: 1000px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--brand-wash), var(--bg) 78%);
  padding-block: 56px 20px;
  border-bottom: 1px solid var(--border);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); margin-top: 16px; }
.hero .lede { margin-top: 16px; }
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 30px;
  margin-top: 28px;
}
.stat-row .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brand-ink);
}
.stat-row .stat span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.pill {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.store-badge {
  display: block;
  line-height: 0;
  border-radius: 12px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); opacity: 0.9; }
.store-badge img { height: 52px; width: auto; display: block; }
.hero-shot { display: flex; justify-content: center; }
.hero-shot img {
  width: min(320px, 78vw);
  border-radius: 34px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-shot { order: -1; }
}

/* ---------- Pour qui ---------- */
.audience {
  padding-block: 58px;
  border-bottom: 1px solid var(--border);
}
.audience header { max-width: 640px; margin-bottom: 26px; }
.audience header .lede { margin-top: 10px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: var(--shadow-card);
}

/* ---------- Features ---------- */
.features { padding-block: 20px; }
.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
  padding-block: 56px;
  border-bottom: 1px solid var(--border);
}
.feature-row:nth-child(even) { direction: rtl; }
.feature-row:nth-child(even) > * { direction: ltr; }
.feature-media { display: flex; justify-content: center; }
.feature-media img {
  width: min(280px, 72vw);
  border-radius: 30px;
  box-shadow: var(--shadow-card);
}
.feature-text h3 { margin-top: 14px; }
.feature-text .lede { margin-top: 12px; }
.feature-row .tag-row { margin-top: 18px; }
.feature-row .stat-row { margin-top: 22px; gap: 26px; }
.feature-row .stat-row b { font-size: 22px; }
@media (max-width: 860px) {
  .feature-row, .feature-row:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 26px;
    padding-block: 40px;
  }
}

/* ---------- Onboarding demo ---------- */
.demo {
  padding-block: 64px;
  background: var(--demo-bg);
  color: var(--demo-text);
  border-bottom: 1px solid var(--border);
}
.demo .kicker { max-width: 640px; margin-bottom: 34px; }
.demo .kicker .eyebrow { background: rgba(99,169,232,0.16); color: var(--demo-accent); }
.demo .kicker h2 { color: var(--demo-text); margin-top: 12px; }
.demo .kicker .lede { color: var(--demo-text-muted); margin-top: 12px; }

/* ---------- Démo : les cinq écrans d'accueil, côte à côte ----------
   Enregistrements d'écran réels de Houari, encodés en H.264.
   Attention : sur un <video>, il faut height:auto ET la bonne paire
   width/height en attributs, sinon le navigateur garde la hauteur brute
   de l'attribut et l'étire (le bug de la première version). */
.demo-videos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
}
.demo-vid { min-width: 0; }
.demo-vid video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 810;
  border-radius: 20px;
  background: var(--demo-surface);
  box-shadow: 0 18px 44px rgba(0,0,0,0.38);
}

/* En dessous de 900 px, cinq colonnes deviennent illisibles : on garde
   le côte à côte mais la rangée se fait défiler au doigt. */
@media (max-width: 900px) {
  .demo-videos {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .demo-videos::-webkit-scrollbar { display: none; }
  .demo-vid { flex: 0 0 auto; width: 168px; }
}

/* ---------- Bande de captures qui défile (version anglaise) ---------- */
.demo-strip {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent);
}
.demo-strip::-webkit-scrollbar { display: none; }
.demo-strip-track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 4px 4px 20px;
  animation: demo-strip-scroll 70s linear infinite;
}
.demo-strip:hover .demo-strip-track,
.demo-strip:focus-within .demo-strip-track { animation-play-state: paused; }
@keyframes demo-strip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.shot-card {
  flex: 0 0 auto;
  width: 208px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shot-card img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.34);
}
.shot-card figcaption { display: flex; flex-direction: column; gap: 3px; }
.shot-card figcaption b { font-size: 14px; color: var(--demo-text); }
.shot-card figcaption span { font-size: 12px; line-height: 1.4; color: var(--demo-text-muted); }

@media (prefers-reduced-motion: reduce) {
  .demo-strip-track { animation: none; }
}

/* ---------- Pricing ---------- */
.pricing { padding-block: 64px; border-bottom: 1px solid var(--border); }
.pricing header { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.pricing header .lede { margin: 10px auto 0; }
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
}
.plan.premium { border-color: var(--brand); position: relative; }
.plan .badge {
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan h3 { font-size: 18px; }
.plan .price {
  font-family: var(--font-display);
  font-size: 38px;
  margin-top: 14px;
  color: var(--text);
}
.plan .price small { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--text-faint); }
.plan .sub { font-size: 13px; color: var(--text-faint); margin-top: 4px; }
.plan ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.plan li::before { content: "✓ "; color: var(--green); font-weight: 800; }
.plan .btn { margin-top: 24px; width: 100%; justify-content: center; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Sources ---------- */
.sources {
  padding-block: 44px;
  text-align: center;
}
.sources .lede { max-width: 640px; margin: 10px auto 0; }
.disclaimer {
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-faint);
  max-width: 640px;
  margin-inline: auto;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}

/* ---------- FAQ ---------- */
.faq { padding-block: 56px; border-top: 1px solid var(--border); }
.faq header { max-width: 620px; margin-bottom: 26px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding-block: 18px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  color: var(--brand);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; color: var(--text-muted); font-size: 15px; max-width: 68ch; }

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 16px;
}

/* ---------- Tactique section override ---------- */
.feature-row.tactique {
  background: var(--tactique-bg);
  color: var(--tactique-text);
  border-radius: var(--radius-l);
  margin-block: 40px;
  padding: 44px 32px;
  border-bottom: none;
}
.feature-row.tactique .lede,
.feature-row.tactique .stat-row span { color: #C79B9B; }
.feature-row.tactique .eyebrow { background: rgba(226,63,63,0.16); color: var(--tactique-red); }
.feature-row.tactique .stat-row b { color: var(--tactique-red); }

/* ---------- Tableau de bord ESI recréé en code ----------
   Reprend la grille 2x2 réelle de l'écran Formation de l'app
   (stages, UE, gestes, heures), avec les chiffres du profil de
   démonstration intégré à l'app. Recréé en code plutôt qu'en
   capture, pour être traduisible et net à toutes les tailles. */
.dash-mock {
  width: min(300px, 78vw);
  border-radius: 26px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.dash-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: var(--brand-ink);
  color: #fff;
}
.dash-year {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.01em;
}
.dash-sems { display: flex; gap: 5px; }
.dash-sems span {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72);
}
.dash-sems span.is-on { background: #fff; color: var(--brand-ink); }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.dash-card {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dash-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.dash-card b {
  font-size: 21px;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dash-card b small { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.dash-ok { font-size: 10.5px; font-weight: 700; color: var(--dash, var(--brand)); }
.dash-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: 5px;
}
.dash-bar i { display: block; height: 100%; border-radius: 999px; background: var(--dash, var(--brand)); }

/* ---------- Confort de terrain ---------- */
.comfort {
  padding-block: 58px;
  border-top: 1px solid var(--border);
}
.comfort header { max-width: 640px; margin-bottom: 26px; }
.comfort header .lede { margin-top: 10px; }
.comfort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.comfort-card {
  padding: 20px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.comfort-card b { font-size: 16px; color: var(--text); }
.comfort-card span { font-size: 14px; line-height: 1.45; color: var(--text-muted); }

/* ---------- Catalogue complet des outils et des scores ----------
   Contenu relevé dans app/(tabs)/outils.tsx : les vrais noms et les
   vraies descriptions affichés dans l'app. */
.catalogue {
  padding-block: 62px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.catalogue header { max-width: 680px; margin-bottom: 30px; }
.catalogue header .lede { margin-top: 12px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.cat-card {
  padding: 22px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--cat, var(--brand));
}
.cat-card h3 {
  font-size: 17px;
  line-height: 1.2;
  color: var(--cat, var(--brand));
  margin-bottom: 14px;
}
.cat-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.cat-card li { display: flex; flex-direction: column; gap: 2px; }
.cat-card li b { font-size: 14.5px; color: var(--text); font-weight: 800; }
.cat-card li span { font-size: 13px; line-height: 1.4; color: var(--text-muted); }

/* ---------- Qui est derrière l'app ---------- */
.maker {
  padding-block: 62px;
  border-top: 1px solid var(--border);
  background: var(--brand-wash);
}
.maker .wrap { max-width: 820px; }
.maker h2 { margin-top: 12px; }
.maker blockquote {
  margin-top: 24px;
  padding-left: 22px;
  border-left: 3px solid var(--brand);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
}
.maker-sign {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-ink);
  letter-spacing: 0.02em;
}
.maker-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.maker-facts div { display: flex; flex-direction: column; gap: 5px; }
.maker-facts b {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brand-ink);
}
.maker-facts span { font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }

/* ---------- Le guide de préparation, les cinq écrans ----------
   Captures réelles envoyées par Houari : les 5 étapes du wizard
   (Ampoule, Soluté, Dosage, Seringue, Recette) sur de la noradrénaline. */
.recipe {
  padding-block: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.recipe header { max-width: 700px; margin-bottom: 32px; }
.recipe header .lede { margin-top: 12px; }

.guide-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  /* on élargit un peu la bande au-delà de la colonne de texte, pour que
     les cinq écrans restent lisibles */
  max-width: 1320px;
  margin-inline: calc((1120px - 1320px) / 2);
}
@media (max-width: 1400px) {
  .guide-strip { max-width: none; margin-inline: 0; }
}
.guide-step { display: flex; flex-direction: column; gap: 12px; }
.guide-step img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.guide-step figcaption { display: flex; flex-direction: column; gap: 3px; }
.guide-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 3px;
}
.guide-step figcaption b { font-size: 15px; color: var(--text); }
.guide-txt { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }

.guide-out {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--radius-l);
  background: var(--brand-wash);
}
.guide-shot img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.guide-out-txt { display: flex; flex-direction: column; gap: 14px; }
.guide-out-txt h3 { font-size: 24px; }
.guide-out-txt p { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }
.guide-sum { color: var(--text); }
.guide-sum b { color: var(--brand-ink); }
.rec-share { font-size: 13.5px; color: var(--text-muted); }

@media (max-width: 1000px) {
  .guide-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .guide-out { grid-template-columns: 1fr; gap: 22px; }
  .guide-shot img { width: min(260px, 66vw); display: block; margin: 0 auto; }
}
@media (max-width: 620px) {
  .guide-strip { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ---------- Calculatrice de dose ----------
   Portage web de la règle de trois de app/tools/calculatrice.tsx. */
.calc {
  padding-block: 64px;
  border-top: 1px solid var(--border);
}
.calc header { max-width: 660px; margin-bottom: 28px; }
.calc header .lede { margin-top: 12px; }

.calc-card {
  max-width: 700px;
  padding: 26px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.calc-row {
  display: grid;
  grid-template-columns: 54px 1fr 28px 1fr;
  align-items: center;
  gap: 10px;
}
.calc-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.calc-eq { text-align: center; font-size: 18px; color: var(--text-faint); }
.calc-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calc-in {
  flex: 1 1 auto;
  min-width: 0;
  font: 700 19px/1 var(--font-body);
  color: var(--text);
  padding: 13px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-variant-numeric: tabular-nums;
}
.calc-in:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.calc-out {
  flex: 1 1 auto;
  min-width: 0;
  font: 800 19px/1 var(--font-body);
  color: var(--brand-ink);
  padding: 14px;
  border-radius: var(--radius-s);
  border: 1px dashed var(--brand);
  background: var(--brand-wash);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.calc-unit {
  flex: 0 0 auto;
  font: 700 13px/1 var(--font-body);
  color: var(--brand-ink);
  padding: 11px 8px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--brand-wash);
}
.calc-u {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 4px;
}
.calc-sep { height: 1px; background: var(--border); margin: 16px 0; }

.calc-result {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--brand-ink);
  color: #fff;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.calc-result span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.calc-result b {
  font-family: var(--font-display);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.calc-btn {
  appearance: none;
  font: 700 13.5px/1 var(--font-body);
  color: var(--text-muted);
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.calc-btn:hover { color: var(--text); border-color: var(--text-faint); }

.calc-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.calc-ex-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 2px;
}
.calc-ex {
  appearance: none;
  font: 600 13px/1.3 var(--font-body);
  color: var(--brand-ink);
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--brand-wash);
  background: var(--brand-wash);
  cursor: pointer;
  text-align: left;
}
.calc-ex:hover { border-color: var(--brand); }
.calc-foot { margin-top: 18px; font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .calc-row { grid-template-columns: 1fr; gap: 8px; }
  .calc-eq { text-align: left; }
  .calc-card { padding: 20px; }
}

/* trois formules au lieu de deux */
.plans-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .plans-3 { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}

/* ---------- Préparation de seringue interactive ---------- */
.prep {
  padding-block: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.prep header { max-width: 680px; margin-bottom: 26px; }
.prep header .lede { margin-top: 12px; }
.prep-card {
  max-width: 760px;
  padding: 26px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.prep-card .calc-examples { margin-top: 0; margin-bottom: 22px; }
.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.prep-field { display: flex; flex-direction: column; gap: 6px; }
.prep-field--wide { grid-column: span 3; }
.prep-field label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.prep-field input,
.prep-field select {
  width: 100%;
  font: 700 16px/1 var(--font-body);
  color: var(--text);
  padding: 12px 13px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-variant-numeric: tabular-nums;
}
.prep-field input:focus,
.prep-field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.prep-inline { display: flex; align-items: center; gap: 8px; }
.prep-inline em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.prep-out {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.prep-out h3 { font-size: 17px; margin-bottom: 8px; }
.prep-out .rec-list li { padding: 12px 0; }
.prep-out .rec-txt b { color: var(--brand-ink); }
.prep-err {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--red-wash);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 700;
}
@media (max-width: 700px) {
  .prep-grid { grid-template-columns: 1fr 1fr; }
  .prep-field--wide { grid-column: span 2; }
  .prep-card { padding: 20px; }
}
@media (max-width: 460px) {
  .prep-grid { grid-template-columns: 1fr; }
  .prep-field--wide { grid-column: span 1; }
}

/* ---------- Liste de recette et résumé (utilisés par la préparation) ---------- */
.rec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}
.rec-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.rec-list li:last-child { border-bottom: 0; }
.rec-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}
.rec-txt { font-size: 14.5px; line-height: 1.45; color: var(--text); }
.rec-sum {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rec-sum div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.rec-sum dt { font-size: 13px; color: var(--text-muted); }
.rec-sum dd {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.rec-sum dd.is-key { font-size: 18px; color: var(--brand-ink); }

/* ---------- Section de téléchargement ---------- */
.download {
  padding-block: 66px;
  border-top: 1px solid var(--border);
  background: var(--brand-wash);
  text-align: center;
}
.download .wrap { max-width: 640px; }
.download h2 { margin-top: 12px; }
.download .lede { margin-top: 12px; }
.store-row--big {
  justify-content: center;
  margin-top: 28px;
}
.store-row--big .store-badge img { width: 200px; height: auto; }
.download-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Pages légales ---------- */
.legal {
  padding-block: 56px 80px;
}
.legal .wrap { max-width: 820px; }
.legal-date {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
.legal-sub {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
}
.legal-note {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--green-wash);
  border: 1px solid color-mix(in srgb, var(--green) 22%, transparent);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}
.legal-toc {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius-m);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.legal-toc-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 24px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.legal-toc li { padding-left: 2px; }
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { color: var(--brand); text-decoration: underline; }
.legal-toc-sub { list-style: none; }
.legal-toc-sub::marker { content: none; }

.legal-part {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.01em;
  margin: 56px 0 8px;
  padding-top: 28px;
  border-top: 2px solid var(--border);
}
.legal-part:first-of-type { border-top: 0; padding-top: 0; }

.legal-art { margin-top: 36px; scroll-margin-top: 90px; }
.legal-art h2,
.legal-art h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--text);
}
.legal-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding-inline: 6px;
  border-radius: 8px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transform: translateY(1px);
}
.legal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.68;
  max-width: 68ch;
}
.legal-body b { color: var(--text); font-weight: 800; }
.legal-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--brand-ink); }
.legal-body ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-body li { padding-left: 2px; }
.legal-warn {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius-s);
  background: var(--red-wash);
  border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
  color: var(--text);
  font-weight: 700;
}
.legal-copy {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

@media (max-width: 560px) {
  .legal { padding-block: 36px 56px; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-art h2, .legal-art h3 { font-size: 17.5px; gap: 10px; }
  .legal-body { font-size: 15px; }
}

/* ---------- Panneaux légaux ouverts depuis le pied de page ---------- */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.legal-modal[hidden] { display: none !important; }
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 13, 26, 0.55);
  backdrop-filter: blur(3px);
}
.legal-modal-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: 0 -8px 60px -12px rgba(11,21,38,0.4);
  overflow: hidden;
  animation: lm-up 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lm-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .legal-modal-panel { animation: none; } }
.legal-modal-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.legal-modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  color: var(--text);
  margin-right: auto;
}
.legal-modal-x {
  flex: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.legal-modal-x:hover { background: var(--brand-wash); color: var(--brand-ink); }
.legal-modal-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.legal-inline { padding-block: 28px 40px; }
.legal-inline .legal-part {
  font-size: clamp(21px, 3vw, 27px);
  margin: 44px 0 8px;
  padding-top: 24px;
}
.legal-inline .legal-art h3,
.legal-inline .legal-art h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--text);
}
.legal-inline > .legal-date,
.legal-inline > .legal-sub,
.legal-inline > .legal-note,
.legal-inline > .legal-art,
.legal-inline > .legal-part,
.legal-inline > .legal-copy { padding-inline: 24px; }
.legal-inline > .legal-sub { margin-top: 6px; }
body.lm-open { overflow: hidden; }

@media (max-width: 560px) {
  .legal-modal-panel { max-height: 96vh; border-radius: var(--radius-m) var(--radius-m) 0 0; }
  .legal-inline > * { padding-inline: 18px; }
  .legal-modal-title { font-size: 15px; }
}
