/* =========================================================================
   Bocal 2 — feuille de style
   Matière : air pur des Alpes, verre du bocal, jaune des panneaux de
   randonnée suisses. Bricolage Grotesque pour les chiffres et les titres,
   Instrument Sans pour le texte.
   ========================================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("../fonts/instrument-sans.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;

  --sky:        #eef4f7;   /* fond : air clair */
  --sky-deep:   #dbe8ee;
  --paper:      #ffffff;
  --paper-2:    #f6fafb;
  --ink:        #0e2430;   /* bleu lac, presque noir */
  --ink-soft:   #4f6773;
  --ink-faint:  #8aa0aa;
  --line:       rgba(14, 36, 48, .11);
  --line-strong: rgba(14, 36, 48, .2);

  --honey:      #f5b700;   /* billets du bocal = balisage jaune */
  --honey-deep: #9a6c00;
  --honey-soft: #fff4cf;
  --pine:       #0e7a57;   /* santé, réussite */
  --pine-deep:  #0a573e;
  --pine-soft:  #e2f3ec;
  --ember:      #e0452b;   /* braise : retard, alerte */
  --ember-deep: #a52a16;
  --ember-soft: #fdebe6;
  --alpine:     #2f6fb3;   /* balisage blanc-bleu-blanc */
  --blood:      #d60c0c;

  --note-10: linear-gradient(115deg, #ffd04a, #f0ac00 55%, #ffca3a);
  --note-20: linear-gradient(115deg, #f08a73, #d9493a 55%, #ec7d68);
  --note-50: linear-gradient(115deg, #5fc195, #23936a 55%, #57b98c);
  --note-100: linear-gradient(115deg, #7eaee6, #346fbf 55%, #77a6df);

  --glass-a: rgba(255, 255, 255, .78);
  --glass-b: rgba(255, 255, 255, .22);
  --glass-c: rgba(255, 255, 255, .1);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 1px 2px rgba(14, 36, 48, .05), 0 12px 32px -20px rgba(14, 36, 48, .4);
  --shadow-lift: 0 2px 4px rgba(14, 36, 48, .06), 0 24px 48px -24px rgba(14, 36, 48, .5);
  --wrap: 72rem;

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --tabbar-h: 0px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --sky:        #0b1a22;
    --sky-deep:   #08141a;
    --paper:      #12242e;
    --paper-2:    #172c37;
    --ink:        #e7f0f3;
    --ink-soft:   #a3b8c2;
    --ink-faint:  #6d8793;
    --line:       rgba(231, 240, 243, .1);
    --line-strong: rgba(231, 240, 243, .2);
    --honey-deep: #ffcf4a;
    --honey-soft: rgba(245, 183, 0, .14);
    --pine:       #3cc08f;
    --pine-deep:  #6fd8b0;
    --pine-soft:  rgba(60, 192, 143, .13);
    --ember:      #ff6b4f;
    --ember-deep: #ff9a85;
    --ember-soft: rgba(255, 107, 79, .13);
    --alpine:     #6aa6ec;
    --glass-a: rgba(255, 255, 255, .16);
    --glass-b: rgba(255, 255, 255, .05);
    --glass-c: rgba(255, 255, 255, .02);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sky);
  background-image:
    radial-gradient(70rem 30rem at 85% -8rem, rgba(245, 183, 0, .10), transparent 70%),
    radial-gradient(60rem 30rem at 0% -10rem, rgba(47, 111, 179, .08), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-h);
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, dl, dd, ol, ul, figure, blockquote, fieldset { margin: 0; }
ul, ol { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--honey); }

:focus-visible {
  outline: 2.5px solid var(--honey);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--sky); padding: .6rem 1rem; border-radius: var(--r-s);
}
.skip:focus { top: 1rem; }

.icon { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------ En-tête */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--sky) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: .8rem 1.5rem;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark {
  width: 16px; height: 21px;
  border: 2px solid var(--ink);
  border-radius: 3px 3px 7px 7px;
  background: linear-gradient(to top, var(--honey) 0 48%, transparent 48%);
}
.brand__name { font-family: var(--display); font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }

.nav { display: flex; gap: .2rem; margin-left: auto; }
.nav__link {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 500;
  padding: .45rem .8rem;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.nav__link:hover { color: var(--ink); background: var(--line); }
.nav__link.is-current { color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }

.page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 4rem;
}

.footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
}
.footer p:first-child {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.015em;
  max-width: 40ch;
}
.footer__small { margin-top: .5rem; font-size: .8rem; color: var(--ink-faint); max-width: 60ch; }

/* Barre d'onglets du bas (mobile) */
.tabbar { display: none; }

/* ------------------------------------------------------------- SOS */

.sos-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem .95rem .5rem .8rem;
  border-radius: 999px;
  border: 0;
  background: var(--ember);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px var(--ember);
  transition: transform .12s ease, background .15s ease;
}
.sos-btn:hover { background: var(--ember-deep); }
@media (prefers-color-scheme: dark) { .sos-btn:hover { background: #ff5436; } }
.sos-btn:active { transform: scale(.97); }

.sos-fab { display: none; }

/* ---------------------------------------------------------------- Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: .72rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }

.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--sky); padding-inline: 1.5rem; }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--honey)); }

.btn--quiet { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn--quiet:hover { color: var(--ink); box-shadow: none; background: var(--line); }

.btn--ghost { background: transparent; }
.btn--small { padding: .45rem .85rem; font-size: .85rem; border-radius: 10px; }
.btn--big { padding: .95rem 1.8rem; font-size: 1.05rem; border-radius: 14px; }

.btn--onred { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn--onred:hover { background: var(--ember-deep); }
.btn--ongreen { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn--ongreen:hover { background: var(--pine-deep); }
@media (prefers-color-scheme: dark) {
  .btn--onred, .btn--ongreen { color: #08141a; }
}

.btn--withdraw { border-color: color-mix(in srgb, var(--pine) 50%, transparent); color: var(--pine); }
.btn--withdraw:hover { background: var(--pine-soft); }
.btn--withdraw-solid { background: var(--pine); border-color: var(--pine); color: #fff; }

.btn--sos {
  background: var(--ember); border-color: var(--ember); color: #fff;
  padding: 1rem 1.6rem; font-size: 1.05rem; border-radius: 14px;
  box-shadow: 0 14px 30px -14px var(--ember);
}
.btn--sos:hover { background: var(--ember-deep); }
.btn--sos .icon { width: 22px; height: 22px; }

.link-danger {
  font: inherit; font-size: .85rem;
  background: none; border: 0; padding: 0;
  color: var(--ink-faint); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-danger:hover { color: var(--ember); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 10px; border: 0;
  background: transparent; color: var(--ink-faint);
  cursor: pointer;
}
.icon-btn:hover { background: var(--ember-soft); color: var(--ember); }
.icon-btn .icon { width: 17px; height: 17px; }

/* ------------------------------------------------------- Bandeau d'alerte */

.alert {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .3rem 1.5rem;
  margin: 0 0 2rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--r-m);
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.alert__amount {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.alert__detail { color: var(--ink-soft); font-size: .93rem; grid-column: 1; }
.alert .btn { grid-column: 2; grid-row: 1 / span 2; }

.alert--late { background: var(--ember-soft); border-color: color-mix(in srgb, var(--ember) 30%, transparent); }
.alert--late .alert__amount { color: var(--ember); }
.alert--late .alert__detail { color: var(--ember-deep); }
.alert--today { background: var(--pine-soft); border-color: color-mix(in srgb, var(--pine) 30%, transparent); }
.alert--today .alert__amount { color: var(--pine); }
.alert--today .alert__detail { color: var(--pine-deep); }
.alert--ahead .alert__amount { color: var(--pine); }

/* ------------------------------------------------------------------ Héros */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow { color: var(--ink-soft); font-size: .92rem; margin-bottom: .5rem; }

.total {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.total__cur {
  font-size: .2em;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-soft);
  transform: translateY(-.5em);
}
.total__sub { color: var(--ink-soft); font-size: .98rem; margin-top: .7rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 1.8rem 0 2rem;
  max-width: 30rem;
}
.fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.fact dt { color: var(--ink-soft); font-size: .88rem; }
.fact dd { font-weight: 650; font-variant-numeric: tabular-nums; }
.fact--bonus dd { color: var(--honey-deep); }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ------------------------------------------------------------------ Bocal */

.hero__jar { display: flex; justify-content: center; }

.jar {
  position: relative;
  width: clamp(250px, 72vw, 380px);
  filter: drop-shadow(0 30px 40px rgba(14, 36, 48, .22));
}
@media (prefers-color-scheme: dark) { .jar { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); } }

.jar__lid {
  width: 76%;
  height: 30px;
  margin: 0 auto -2px;
  border-radius: 8px 8px 3px 3px;
  background:
    repeating-linear-gradient(90deg, rgba(14, 36, 48, .1) 0 2px, transparent 2px 7px),
    linear-gradient(#24414f, #0e2430);
  box-shadow: inset 0 -4px 6px -4px rgba(0, 0, 0, .5);
}
.jar__neck {
  width: 66%;
  height: 16px;
  margin: 0 auto -4px;
  background: linear-gradient(90deg, var(--glass-a), var(--glass-b) 45%, var(--glass-a));
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}
.jar__body {
  position: relative;
  height: clamp(360px, 56vh, 480px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 46px 46px 38px 38px / 60px 60px 46px 46px;
  background:
    linear-gradient(100deg, var(--glass-a) 0 6%, var(--glass-b) 18%, var(--glass-c) 52%, var(--glass-b) 82%, var(--glass-a) 100%);
  box-shadow: inset 0 -18px 30px -22px rgba(14, 36, 48, .5);
}
.jar__money { position: absolute; inset: 0; }

.bill {
  position: absolute;
  left: 50%;
  width: 58%;
  height: 11px;
  border-radius: 2px;
  background: var(--note-10);
  transform: translateX(-50%) translateX(var(--x, 0px)) rotate(var(--rot, 0deg));
  box-shadow: 0 1px 1px rgba(14, 36, 48, .22);
}
.bill::after {
  content: "";
  position: absolute;
  inset: 3px 6px;
  border-radius: 1px;
  border: 1px solid rgba(255, 255, 255, .45);
}
.bill--20 { background: var(--note-20); }
.bill--50 { background: var(--note-50); }
.bill--100 { background: var(--note-100); }
.bill--drop {
  bottom: auto;
  top: -40px;
  z-index: 3;
  animation: drop .65s cubic-bezier(.4, .05, .35, 1) forwards;
}
@keyframes drop {
  0%   { top: -40px; opacity: 0; transform: translateX(-50%) rotate(-14deg); }
  15%  { opacity: 1; }
  100% { top: calc(100% - var(--land, 40px)); transform: translateX(-50%) rotate(6deg); }
}

.jar__line {
  position: absolute;
  left: 8%; right: 8%;
  bottom: var(--fill, 0%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--honey-deep), transparent);
  transition: bottom .5s cubic-bezier(.3, .8, .4, 1);
}
.jar__glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(97deg, var(--glass-a) 0 4%, transparent 9%),
    linear-gradient(258deg, var(--glass-b) 0 3%, transparent 8%),
    linear-gradient(180deg, var(--glass-b) 0 4%, transparent 14%);
}
.jar__ticks { position: absolute; inset: 0; pointer-events: none; }
.jar__ticks span {
  position: absolute;
  left: 0; right: 0;
  font-size: .62rem;
  color: var(--ink-faint);
  text-align: right;
  padding-right: 10%;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.jar__caption {
  margin-top: 1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
}
.jar__caption span { display: block; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink); }
.jar__caption em { display: block; font-style: normal; color: var(--ink-faint); max-width: 32ch; margin: .2rem auto 0; }

/* ---------------------------------------------- Bande « cigarettes » (accueil) */

.strip {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: .8rem;
  margin-top: 3rem;
}
.strip a {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--r-m);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.strip a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.strip__main { background: #0e2430 !important; color: #eef4f7; border-color: #0e2430 !important; }
@media (prefers-color-scheme: dark) { .strip__main { background: #050f14 !important; border-color: var(--line) !important; } }
.strip__label { font-size: .85rem; color: var(--ink-soft); }
.strip__main .strip__label, .strip__main .strip__next { color: rgba(238, 244, 247, .7); }
.strip__count {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.strip__main .strip__count { color: var(--honey); font-size: clamp(2.2rem, 6vw, 3.4rem); }
.strip__count small { font-size: .45em; color: var(--ink-faint); font-weight: 600; letter-spacing: 0; }
.strip__next { font-size: .82rem; color: var(--ink-faint); margin-top: auto; }

/* Barres de progression */
.progress {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--honey);
  transition: width .4s ease;
}
.progress--thin { height: 6px; margin: .5rem 0 .2rem; }
.strip__main .progress { background: rgba(255, 255, 255, .14); }

/* ------------------------------------------------------- Paliers mensuels */

.milestone {
  margin: 1rem 0 0;
  padding: 1.1rem 1.4rem;
  border-radius: var(--r-m);
  background: var(--pine-soft);
  border: 1px solid color-mix(in srgb, var(--pine) 25%, transparent);
}
.milestone__title { font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; color: var(--pine); }
.milestone__sub { color: var(--ink-soft); font-size: .9rem; margin-top: .2rem; }
.milestone--year { background: var(--honey-soft); border-color: color-mix(in srgb, var(--honey) 45%, transparent); }
.milestone--year .milestone__title { font-size: 1.8rem; color: var(--honey-deep); }

/* ------------------------------------------------------- Derniers mouvements */

.recent { margin-top: 3rem; }
.recent h2 { font-size: 1.25rem; margin-bottom: .8rem; }
.recent__more { margin-top: .9rem; font-size: .9rem; }

.ledger {
  max-width: 40rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: .3rem 1.1rem;
}
.ledger__row {
  display: grid;
  grid-template-columns: 6.3rem auto 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.ledger__row:last-child { border-bottom: 0; }
.ledger__date { color: var(--ink-soft); font-size: .9rem; }
.ledger__note { color: var(--ink-faint); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger__amount { font-weight: 650; justify-self: end; }
.ledger__row--out .ledger__amount, .ledger__row--out .ledger__note { color: var(--pine); }
.ledger__row--new { animation: flashRow 1.4s ease; }
@keyframes flashRow { from { background: var(--honey-soft); } to { background: transparent; } }

.tag {
  justify-self: start;
  align-self: center;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  padding: .32rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag--ontime { color: var(--pine); background: var(--pine-soft); }
.tag--late   { color: var(--ember); background: var(--ember-soft); }
.tag--bonus  { color: var(--honey-deep); background: var(--honey-soft); }
.tag--out    { color: var(--ink-soft); background: var(--line); }

.empty { color: var(--ink-faint); font-size: .95rem; }

/* ------------------------------------------------------------ Dialogues */

.dialog {
  border: 0;
  border-radius: var(--r-l);
  padding: 0;
  width: min(27rem, 92vw);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  background: var(--paper);
}
.dialog::backdrop { background: rgba(8, 20, 26, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.dialog__form { padding: 1.6rem; display: grid; gap: .95rem; }
.dialog__form h2 { font-size: 1.35rem; }
.dialog__intro { font-size: .9rem; color: var(--ink-soft); margin-top: -.3rem; }
.dialog--withdraw { border-top: 5px solid var(--pine); }
.dialog__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }

.field { display: grid; gap: .35rem; }
.field span { font-size: .85rem; color: var(--ink-soft); }
.field input, .field select, .inline-form input {
  font: inherit;
  padding: .68rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper-2);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .inline-form input:focus { outline: 2.5px solid var(--honey); outline-offset: 1px; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 160%);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--sky);
  padding: .75rem 1.2rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1), opacity .25s ease;
  z-index: 80;
  max-width: 90vw;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast--error { background: var(--ember); color: #fff; }

/* --------------------------------------------------- Sections génériques */

.panel { margin-top: 3.5rem; }
.panel > h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: .5rem; }
.panel__note { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.3rem; max-width: 62ch; }
.panel--quiet { padding: 1.5rem; border-radius: var(--r-m); background: var(--paper-2); border: 1px solid var(--line); }
.panel--quiet > h2 { font-size: 1.1rem; }

.prose { display: grid; gap: .7rem; max-width: 68ch; font-size: .92rem; color: var(--ink-soft); }

.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.035em; }
.section-head p { color: var(--ink-soft); margin-top: .35rem; max-width: 60ch; }

/* --------------------------------------------------- Statistiques */

.congrats {
  margin: 0 0 2rem;
  padding: 1.6rem 1.7rem;
  border-radius: var(--r-l);
  background: var(--pine-soft);
  border: 1px solid color-mix(in srgb, var(--pine) 25%, transparent);
}
.congrats__big {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--pine);
}
.congrats__sub { color: var(--ink-soft); font-size: .95rem; margin-top: .4rem; max-width: 52ch; }
.congrats--year { background: var(--honey-soft); border-color: color-mix(in srgb, var(--honey) 40%, transparent); }
.congrats--year .congrats__big { font-size: clamp(2.4rem, 8vw, 4rem); color: var(--honey-deep); }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .7rem;
}
.kpi {
  background: var(--paper);
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
}
.kpi__value {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.kpi__label { font-size: .82rem; color: var(--ink-soft); margin-top: .1rem; }
.kpi--late .kpi__value { color: var(--ember); }
.kpi--bonus .kpi__value { color: var(--honey-deep); }

.timeline { border-left: 2px solid var(--line-strong); margin-left: .6rem; }
.timeline__item {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: .7rem 0 .7rem 1.4rem;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px; top: 1.1rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--pine);
  box-shadow: 0 0 0 3px var(--sky);
}
.timeline__mark { min-width: 3.4rem; font-family: var(--display); font-weight: 700; color: var(--pine); }
.timeline__text strong { display: block; font-weight: 600; }
.timeline__text em { font-style: normal; font-size: .85rem; color: var(--ink-faint); }
.timeline__item--year::before { background: var(--honey); width: 16px; height: 16px; left: -9px; }
.timeline__item--year .timeline__mark,
.timeline__item--year .timeline__text strong { color: var(--honey-deep); font-size: 1.15rem; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  height: 210px;
  padding: 1.6rem 0 0;
  overflow-x: auto;
  margin-bottom: 1.6rem;
}
.chart--day { gap: .28rem; }
.chart__col { flex: 1 0 2.2rem; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 2.2rem; }
.chart__bar {
  position: relative;
  height: var(--h, 2%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: var(--note-10);
}
.chart__bar--day { background: color-mix(in srgb, var(--alpine) 55%, var(--sky-deep)); }
.chart__value {
  position: absolute; top: -1.35rem; left: 0; right: 0;
  text-align: center; font-size: .68rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.chart__label { margin-top: .4rem; text-align: center; font-size: .68rem; line-height: 1.25; color: var(--ink-faint); }

.evo { position: relative; min-height: 230px; margin-bottom: .8rem; touch-action: pan-y; }
.evo__svg { display: block; max-width: 100%; overflow: visible; }
.evo__grid { stroke: var(--line); stroke-width: 1; }
.evo__grid--zero { stroke: var(--line-strong); }
.evo__axis { font-family: var(--sans); font-size: 11px; fill: var(--ink-faint); font-variant-numeric: tabular-nums; }
.evo__expected { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 5 5; }
.evo__line { fill: none; stroke: var(--honey-deep); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.evo__origin { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.evo__dot { fill: var(--honey); stroke: var(--paper); stroke-width: 1.5; transition: r .12s ease; }
.evo__dot--out { fill: var(--pine); }
.evo__dot.is-active { r: 6.5; stroke: var(--ink); stroke-width: 2; }
.evo__tip {
  position: absolute; z-index: 2;
  min-width: 9rem; max-width: 15rem;
  padding: .55rem .75rem;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
  font-size: .8rem; line-height: 1.35;
  pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.evo__tip.is-visible { opacity: 1; transform: none; }
.evo__tip span, .evo__tip strong { display: block; }
.evo__tip-date { color: var(--ink-faint); font-size: .72rem; }
.evo__tip-amount { font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--honey-deep); }
.evo__tip-amount.is-out { color: var(--pine); }
.evo__tip-note { color: var(--ink-soft); margin: .1rem 0; }
.evo__tip-total { margin-top: .25rem; padding-top: .25rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.evo__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .8rem; color: var(--ink-soft); }
.evo__legend li { display: flex; align-items: center; gap: .45rem; }
.evo__key { display: inline-block; flex: none; }
.evo__key--line { width: 18px; height: 3px; border-radius: 2px; background: var(--honey-deep); }
.evo__key--dot, .evo__key--out { width: 9px; height: 9px; border-radius: 50%; background: var(--honey); }
.evo__key--out { background: var(--pine); }
.evo__key--expected { width: 18px; border-top: 2px dashed var(--ink-faint); }

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.table th {
  text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .8rem;
  padding: .45rem .6rem .45rem 0; border-bottom: 1px solid var(--line-strong);
}
.table td { padding: .6rem .6rem .6rem 0; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; padding-right: 0; }
.table--ledger { max-width: 48rem; }
.row--out td { color: var(--pine); }
.cell--bonus { color: var(--honey-deep); white-space: nowrap; }

.withdrawals { display: grid; gap: .6rem; }
.withdrawal {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .95rem 1.15rem;
  border-radius: var(--r-m);
  background: var(--pine-soft);
}
.withdrawal__amount { font-family: var(--display); font-weight: 700; color: var(--pine); font-variant-numeric: tabular-nums; min-width: 6rem; }
.withdrawal__body strong { display: block; font-weight: 600; }
.withdrawal__body em { font-style: normal; font-size: .85rem; color: var(--ink-faint); }

/* =========================================================================
   Page « Cigarettes » : le compteur et le sentier
   ========================================================================= */

.counter {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.3rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 32px;
  background: #0e2430;
  color: #eef4f7;
  overflow: hidden;
  isolation: isolate;
}
/* Les crêtes des Alpes en filigrane, au pied du compteur */
.counter::before {
  content: "";
  position: absolute;
  inset: auto -2% -1px -2%;
  height: 46%;
  z-index: -1;
  opacity: .5;
  background: linear-gradient(180deg, rgba(245, 183, 0, .16), rgba(245, 183, 0, 0));
  clip-path: polygon(0 100%, 0 62%, 8% 44%, 14% 54%, 23% 22%, 30% 40%, 37% 30%, 46% 58%, 55% 12%, 61% 32%, 68% 24%, 76% 50%, 84% 30%, 91% 46%, 100% 34%, 100% 100%);
}
@media (prefers-color-scheme: dark) {
  .counter { background: #050f14; border: 1px solid var(--line); }
}

.counter__since { color: rgba(238, 244, 247, .65); font-size: .95rem; }

.counter__number {
  margin: .4rem 0 0;
  font-family: var(--display);
  font-size: clamp(4.2rem, 17vw, 11.5rem);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  letter-spacing: -.055em;
  line-height: .9;
  color: var(--honey);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.counter__number > span { display: inline-flex; }
.odo__d { display: inline-block; }
.odo__d.is-rolling { animation: roll .45s cubic-bezier(.2, .9, .3, 1.15); }
.odo__sep { display: inline-block; opacity: .4; margin: 0 .04em; }
@keyframes roll {
  from { transform: translateY(45%); opacity: 0; filter: blur(2px); }
  to   { transform: none; opacity: 1; filter: none; }
}

.counter__unit {
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -.025em;
  margin-top: .3rem;
}
.counter__hint { margin-top: 1rem; color: rgba(238, 244, 247, .7); }

.tick { margin-top: 1.6rem; max-width: 34rem; }
.tick__bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.tick__bar span { display: block; height: 100%; background: var(--honey); border-radius: inherit; }
.tick__text { margin-top: .55rem; font-size: .9rem; color: rgba(238, 244, 247, .72); }
.tick__text strong { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.tick__rate { display: block; color: rgba(238, 244, 247, .5); font-size: .84rem; }

.gains {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.2rem;
  border-radius: var(--r-m);
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
}
.gain { padding: 1rem 1.1rem; background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gain dt { font-size: .78rem; color: rgba(238, 244, 247, .62); line-height: 1.3; }
.gain dd {
  margin-top: .3rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

/* Prochain palier */
.next-tier {
  margin-top: 1.2rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--r-l);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.next-tier__head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.next-tier__kicker { font-size: .85rem; color: var(--ink-soft); }
.next-tier__name { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.next-tier__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.5rem; margin-top: .7rem; font-size: .92rem; color: var(--ink-soft); }
.next-tier__meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Panneau de randonnée suisse */
.sign {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 9.5rem;
  padding: .55rem 2.2rem .55rem .95rem;
  background: var(--honey);
  color: #111;
  clip-path: polygon(0 0, calc(100% - 1.3rem) 0, 100% 50%, calc(100% - 1.3rem) 100%, 0 100%);
  border-radius: 4px 0 0 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.sign__n {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.sign__when { font-size: .74rem; font-weight: 600; opacity: .72; line-height: 1.25; }
.sign--big { min-width: 0; padding-block: .7rem; }
.sign--big .sign__n { font-size: 1.8rem; }

.sign--montagne { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sign--montagne::before {
  content: ""; position: absolute; left: .95rem; right: 2.2rem; top: 0; height: 5px;
  background: linear-gradient(90deg, #fff 0 33%, #d52b1e 33% 67%, #fff 67%);
}
.sign--alpin { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sign--alpin::before {
  content: ""; position: absolute; left: .95rem; right: 2.2rem; top: 0; height: 5px;
  background: linear-gradient(90deg, #fff 0 33%, #2f6fb3 33% 67%, #fff 67%);
}

.sign--locked {
  background: var(--paper-2);
  color: var(--ink-soft);
  box-shadow: none;
}
.sign--locked::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: inherit;
  border: 2px dashed var(--line-strong);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}
.sign--locked.sign--montagne::before, .sign--locked.sign--alpin::before { opacity: .55; }

/* Le sentier */
.trail { margin-top: 3.5rem; }

.trail__group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.2rem 0 1rem;
}
.trail__group:first-of-type { margin-top: 0; }
.trail__group h3 { font-size: 1.15rem; }
.trail__group p { font-size: .88rem; color: var(--ink-soft); max-width: 58ch; }
.trail__blaze { flex: none; width: 34px; height: 22px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.trail__group--rando .trail__blaze { background: linear-gradient(90deg, var(--honey) 0 100%); clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%); }
.trail__group--montagne .trail__blaze { background: linear-gradient(90deg, #fff 0 33%, #d52b1e 33% 67%, #fff 67%); }
.trail__group--alpin .trail__blaze { background: linear-gradient(90deg, #fff 0 33%, #2f6fb3 33% 67%, #fff 67%); }

.trail__list {
  position: relative;
  display: grid;
  gap: .9rem;
  padding-left: 1.8rem;
}
/* Le chemin lui-même : pointillé de la couleur du balisage */
.trail__list::before {
  content: "";
  position: absolute;
  left: .5rem; top: .4rem; bottom: .4rem;
  width: 4px;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, var(--honey) 0 10px, transparent 10px 18px);
}
.trail__list--montagne::before { background: repeating-linear-gradient(180deg, #d52b1e 0 10px, color-mix(in srgb, var(--paper) 90%, #ccc) 10px 18px); }
.trail__list--alpin::before { background: repeating-linear-gradient(180deg, var(--alpine) 0 10px, color-mix(in srgb, var(--paper) 90%, #ccc) 10px 18px); }

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: var(--r-m);
  background: var(--paper);
  border: 1px solid var(--line);
}
.stop::before {
  content: "";
  position: absolute;
  left: calc(-1.8rem + .5rem - 5px);
  top: 1.55rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line-strong);
}
.stop.is-reached::before { background: var(--pine); border-color: var(--pine-soft); }
.stop .sign { width: 100%; }

.stop:not(.is-reached) { background: transparent; border-style: dashed; }
.stop:not(.is-reached) .stop__msg { color: var(--ink-faint); }

.stop__name { display: flex; align-items: center; gap: .4rem; font-size: 1.1rem; }
.stop__check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--pine); color: #fff;
}
.stop__check .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.stop__msg { font-size: .93rem; color: var(--ink-soft); margin-top: .25rem; max-width: 62ch; }
.stop__facts { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.stop__facts li {
  font-size: .76rem; font-weight: 500;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.stop.is-reached .stop__facts li { background: var(--honey-soft); color: var(--honey-deep); }

/* « Tu es ici » */
.here {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .3rem 0;
  font-weight: 600;
}
.here__dot {
  position: absolute;
  left: calc(-1.8rem + .5rem - 9px);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 5px var(--ember-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
.here__text { color: var(--ember); font-size: .95rem; }
.here__text strong { font-family: var(--display); font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent; } }

/* Lien vers le prochain palier (Motivation) */
.teaser {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-m);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.teaser:hover { box-shadow: var(--shadow-lift); }
.teaser .sign { flex: none; min-width: 8rem; }
.teaser__body { display: grid; flex: 1; gap: .1rem; }
.teaser__body em { font-style: normal; font-size: .85rem; color: var(--ink-soft); }

/* =========================================================================
   Mode SOS
   ========================================================================= */

.sos {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: var(--ink);
  color: var(--sky);
}
@media (prefers-color-scheme: dark) { .sos { background: #050f14; color: var(--ink); } }
.sos::backdrop { background: var(--ink); }
.sos[open] { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }

.sos__inner {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) 1.3rem calc(2rem + env(safe-area-inset-bottom, 0px));
}
.sos__close {
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  right: 1rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: inherit; cursor: pointer;
}
.sos__close:hover { background: rgba(255, 255, 255, .18); }

.sos__stage { width: min(34rem, 100%); display: grid; justify-items: center; text-align: center; gap: 1.2rem; }
.sos__stage[hidden] { display: none; }
.sos__title { font-size: clamp(2.2rem, 7vw, 3.4rem); letter-spacing: -.045em; }
.sos__lead { color: color-mix(in srgb, currentColor 72%, transparent); max-width: 42ch; }
.sos__lead strong { color: var(--honey); }

.breath { position: relative; width: min(64vw, 260px); aspect-ratio: 1; margin: .4rem 0; }
.breath__ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.breath__track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.breath__progress { fill: none; stroke: var(--honey); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.breath__ball {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), transparent 55%), var(--pine);
  animation: breathe 10s ease-in-out infinite;
}
@keyframes breathe {
  0%   { transform: scale(.62); }
  40%  { transform: scale(1); }     /* 4 s d'inspiration */
  100% { transform: scale(.62); }   /* 6 s d'expiration */
}
.breath__text { position: absolute; inset: 0; display: grid; place-content: center; gap: .1rem; color: #fff; }
.breath__word { font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.breath__time { font-variant-numeric: tabular-nums; opacity: .8; }
.sos.is-done .breath__ball { animation-play-state: paused; transform: scale(.8); background: var(--honey); }
.sos.is-done [data-sos-win] { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.05); } }

.sos__card {
  width: 100%;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: .5rem;
  justify-items: center;
}
.sos__card.is-fresh { animation: fadeIn .4s ease; }
.sos__card-label { font-size: .8rem; color: var(--honey); font-weight: 600; }
.sos__card.is-reason .sos__card-label { color: #7fe0b9; }
.sos__card-text { font-family: var(--display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.sos__card .btn--ghost { color: inherit; border-color: rgba(255, 255, 255, .25); }

.sos__count { font-size: .9rem; color: color-mix(in srgb, currentColor 65%, transparent); }
.sos__count span { color: var(--honey); font-weight: 700; font-variant-numeric: tabular-nums; }

.sos__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.sos .btn--primary { background: var(--honey); border-color: var(--honey); color: #111; }
.sos .btn--primary:hover { background: #ffcb2e; }
.sos .btn--ghost { color: inherit; border-color: rgba(255, 255, 255, .25); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.chips legend, .scale legend { width: 100%; margin-bottom: .7rem; font-weight: 600; text-align: center; }
.chip input, .scale__step input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .88rem;
  cursor: pointer;
}
.chip input:checked + span { background: var(--honey); border-color: var(--honey); color: #111; font-weight: 600; }
.chip input:focus-visible + span, .scale__step input:focus-visible + span { outline: 2.5px solid var(--honey); outline-offset: 2px; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; width: min(20rem, 100%); }
.scale__step span {
  display: grid; place-items: center;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  font-weight: 700;
  cursor: pointer;
}
.scale__step input:checked + span { background: var(--ember); border-color: var(--ember); color: #fff; }
.scale__ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .78rem; opacity: .65; }

/* =========================================================================
   Célébration d'un palier
   ========================================================================= */

.celebrate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.3rem;
  background: rgba(8, 20, 26, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn .3s ease;
}
.celebrate[hidden] { display: none; }
.celebrate__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate__card {
  position: relative;
  width: min(30rem, 100%);
  padding: 2.2rem 1.8rem 1.8rem;
  border-radius: 28px;
  background: var(--paper);
  text-align: center;
  box-shadow: var(--shadow-lift);
  animation: rise .55s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes rise { from { transform: translateY(30px) scale(.94); opacity: 0; } }
.celebrate__kicker { font-weight: 600; color: var(--pine); }
.celebrate__number {
  font-family: var(--display);
  font-size: clamp(4rem, 18vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  margin-top: .3rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.celebrate__unit { color: var(--ink-soft); }
.celebrate__name {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .45rem 2.2rem .45rem 1rem;
  background: var(--honey);
  color: #111;
  font-size: 1.25rem;
  clip-path: polygon(0 0, calc(100% - 1.2rem) 0, 100% 50%, calc(100% - 1.2rem) 100%, 0 100%);
}
.celebrate__msg { margin-top: 1rem; color: var(--ink-soft); }
.celebrate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }

/* =========================================================================
   Page « Tenir bon »
   ========================================================================= */

.help-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  border-radius: 32px;
  background: var(--ember-soft);
  border: 1px solid color-mix(in srgb, var(--ember) 22%, transparent);
}
.help-hero__title { font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -.045em; line-height: 1; }
.help-hero__lead { margin: .9rem 0 1.4rem; color: var(--ink-soft); max-width: 46ch; font-size: 1.02rem; }
.help-hero__stats { display: grid; gap: .6rem; }
.help-hero__stats div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--r-m);
  background: var(--paper);
}
.help-hero__stats dt { font-size: .88rem; color: var(--ink-soft); }
.help-hero__stats dd { font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.help-hero__stats div:first-child dd { color: var(--ember); }

.toc {
  position: sticky;
  top: calc(3.9rem + env(safe-area-inset-top, 0px));
  z-index: 10;
  display: flex;
  gap: .4rem;
  margin: 1.4rem -1.5rem 0;
  padding: .6rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--sky) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.toc::-webkit-scrollbar { display: none; }
.toc a {
  flex: none;
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: .85rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--paper);
}
.toc a:hover { color: var(--ink); border-color: var(--honey); }

.reasons { display: grid; gap: .5rem; margin-bottom: 1rem; }
.reason {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem .6rem .85rem 1.1rem;
  border-radius: var(--r-m);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--pine);
}
.reason__text { font-family: var(--display); font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
.reason.is-new { animation: flashRow 1.4s ease; }
.inline-form { display: flex; gap: .5rem; max-width: 40rem; }
.inline-form input { flex: 1; }
#reasonEmpty { margin-bottom: 1rem; }

.journal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-bottom: 1rem;
}
.journal__block { padding: 1.1rem 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.journal__block--wide { grid-column: 1 / -1; }
.journal__block h3 { font-size: .98rem; margin-bottom: .9rem; }
.journal__insight { margin-top: .9rem; font-size: .9rem; color: var(--ink-soft); }

.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.mini-bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mini-bars__bar { display: block; height: max(var(--h), 3px); border-radius: 4px 4px 1px 1px; background: var(--pine); }
.mini-bars__label { font-size: .64rem; color: var(--ink-faint); text-align: center; margin-top: .3rem; }

.trigger-bars { display: grid; gap: .5rem; }
.trigger-bars li { display: grid; grid-template-columns: 9rem 1fr 2rem; gap: .6rem; align-items: center; font-size: .86rem; }
.trigger-bars__label { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trigger-bars__bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.trigger-bars__bar span { display: block; height: 100%; background: var(--ember); border-radius: inherit; }
.trigger-bars__n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hours__cell {
  height: 30px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ember) calc(var(--a) * 100%), var(--line));
}
.hours__axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-faint); margin-top: .3rem; }

.cravings { display: grid; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: .2rem .6rem .2rem 1.1rem; }
.craving { display: grid; grid-template-columns: 9rem 1fr auto auto; gap: 1rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.craving:last-child { border-bottom: 0; }
.craving__when { font-variant-numeric: tabular-nums; }
.craving__when em { font-style: normal; color: var(--ink-faint); }
.craving__trigger { color: var(--ink-soft); }
.craving__level { display: inline-flex; gap: 3px; }
.craving__level i { width: 8px; height: 14px; border-radius: 2px; background: var(--line); }
.craving__level i.on { background: var(--ember); }

.quick-log { margin-top: 1rem; }
.quick-log summary { cursor: pointer; color: var(--ink-soft); font-size: .92rem; }
.quick-log__form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin-top: .9rem; }
.quick-log__form .field { min-width: 12rem; }

.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.four__item { padding: 1.3rem 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.four__n {
  display: inline-grid; place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: var(--honey);
  color: #111;
  font-family: var(--display);
  font-weight: 800;
  margin-bottom: .8rem;
}
.four__item h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.four__item p { font-size: .9rem; color: var(--ink-soft); }

.symptoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.symptom { padding: 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.symptom h3 { font-size: 1.05rem; }
.symptom__duration {
  display: inline-block;
  margin: .45rem 0 .55rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--honey-soft);
  color: var(--honey-deep);
  font-size: .78rem;
  font-weight: 600;
}
.symptom p:last-child { font-size: .9rem; color: var(--ink-soft); }

.triggers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; }
.trigger { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.trigger dt { font-family: var(--display); font-weight: 700; }
.trigger dd { font-size: .92rem; color: var(--ink-soft); }

.aids { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.aid { padding: 1.3rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; }
.aid h3 { font-size: 1.1rem; }
.aid p { font-size: .92rem; color: var(--ink-soft); }
.aid .aid__where { margin-top: auto; padding-top: .4rem; font-weight: 600; color: var(--pine); font-size: .86rem; }

.contact {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-top: 1rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--r-m);
  background: var(--pine-soft);
}
.contact__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--pine); color: #fff; }
.contact__title { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-bottom: .2rem; }
.contact p:last-child { font-size: .92rem; color: var(--ink-soft); }

.myths { display: grid; gap: .5rem; max-width: 52rem; }
.myth { border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.myth summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 3rem 1rem 1.2rem;
  position: relative;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
}
.myth summary::-webkit-details-marker { display: none; }
.myth summary::after {
  content: "+";
  position: absolute; right: 1.2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--ink-faint);
  transition: transform .2s ease;
}
.myth[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.myth p { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); font-size: .94rem; }

.steps { display: grid; gap: .6rem; max-width: 46rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.step__n {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--pine); color: var(--pine);
  font-family: var(--display); font-weight: 800;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: .92rem; color: var(--ink-soft); margin-top: .15rem; }

.ticks { display: grid; gap: .6rem; max-width: 46rem; }
.ticks li { display: flex; gap: .7rem; align-items: flex-start; }
.ticks .icon { color: var(--pine); margin-top: .15rem; stroke-width: 2.2; }

/* =========================================================================
   Page Motivation
   ========================================================================= */

.motiv-hero {
  padding: clamp(1.8rem, 5vw, 3rem) clamp(1.3rem, 4vw, 2.6rem) 0;
  border-radius: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.motiv-hero__kicker { font-weight: 600; color: var(--pine); margin-bottom: .8rem; }
.motiv-hero__quote p {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.08;
  max-width: 22ch;
  text-wrap: balance;
}
.motiv-hero__quote p::before { content: "« "; color: var(--honey); }
.motiv-hero__quote p::after { content: " »"; color: var(--honey); }
.motiv-hero__note { margin-top: .8rem; font-size: .85rem; color: var(--ink-faint); }

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0;
  margin: 2.2rem calc(-1 * clamp(1.3rem, 4vw, 2.6rem)) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; background: var(--paper-2); padding: 1.1rem 1.4rem; box-shadow: inset -1px -1px 0 var(--line); }
.stat__value { font-family: var(--display); font-size: 1.45rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: .8rem; color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: .8rem; }
.card { padding: 1.4rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.card__icon {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--honey-soft);
  color: var(--honey-deep);
  margin-bottom: .9rem;
}
.card__icon .icon { width: 22px; height: 22px; }
.card__title { font-size: 1.1rem; margin-bottom: .35rem; }
.card__text { font-size: .92rem; color: var(--ink-soft); line-height: 1.6; }

.recovery { position: relative; display: grid; border-left: 3px solid var(--line); margin-left: .5rem; }
.recovery__item {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: .75rem 0 .75rem 1.6rem;
  color: var(--ink-faint);
}
.recovery__item::before {
  content: "";
  position: absolute;
  left: -9px; top: 1.1rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid var(--line-strong);
}
.recovery__item.is-done { color: var(--ink); }
.recovery__item.is-done::before { background: var(--pine); border-color: var(--pine-soft); }
.recovery__item.is-next::before { border-color: var(--honey); background: var(--honey-soft); }
.recovery__item.is-next .recovery__when { color: var(--honey-deep); }
.recovery__when { font-family: var(--display); font-weight: 700; }
.recovery__item.is-done .recovery__when { color: var(--pine); }
.recovery__text { font-size: .95rem; line-height: 1.6; }

.trips { display: grid; gap: .5rem; }
.trip {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1.15rem;
  border-radius: var(--r-m);
  border: 1px dashed var(--line-strong);
}
.trip.is-done { border: 1px solid color-mix(in srgb, var(--honey) 50%, transparent); background: var(--honey-soft); }
.trip__amount { font-family: var(--display); font-weight: 750; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.trip.is-done .trip__amount { color: var(--honey-deep); }
.trip__body strong { display: block; font-weight: 600; }
.trip__body em { font-style: normal; font-size: .86rem; color: var(--ink-soft); }
.trip__state { font-size: .74rem; color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
.trip.is-done .trip__state { color: var(--honey-deep); border-color: var(--honey); }

.urges { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.urge { padding: 1.2rem 1.3rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.urge h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.urge p { font-size: .9rem; color: var(--ink-soft); }
.motiv-close { margin-top: 1.4rem; font-size: .95rem; color: var(--ink-soft); }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1020px) {
  .nav__link { padding-inline: .6rem; font-size: .88rem; }
  .gains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px)); }

  .nav, .sos-btn--top { display: none; }
  .topbar__inner { padding: .7rem 1.1rem; }

  .tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: var(--tabbar-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar__link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: .68rem; font-weight: 600;
    color: var(--ink-faint);
    text-decoration: none;
  }
  .tabbar__link .icon { width: 23px; height: 23px; }
  .tabbar__link.is-current { color: var(--ink); }
  .tabbar__link.is-current .icon { color: var(--honey-deep); }

  .sos-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--tabbar-h) + 1rem);
    z-index: 41;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .75rem 1.1rem .75rem .95rem;
    border: 0; border-radius: 999px;
    background: var(--ember); color: #fff;
    font: inherit; font-weight: 700;
    box-shadow: 0 12px 26px -10px var(--ember);
    cursor: pointer;
  }

  .page { padding: 1.2rem 1.1rem 5.5rem; }
  .footer { padding-inline: 1.1rem; padding-bottom: 6rem; }

  .alert { grid-template-columns: 1fr; }
  .alert .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .6rem; }

  .hero { grid-template-columns: 1fr; gap: 1.8rem; }
  .hero__jar { order: -1; }
  .facts { grid-template-columns: 1fr; max-width: none; }
  .actions .btn { flex: 1 1 auto; }

  .strip { grid-template-columns: 1fr 1fr; }
  .strip__main { grid-column: 1 / -1; }

  .help-hero { grid-template-columns: 1fr; }
  .toc { margin-inline: -1.1rem; padding-inline: 1.1rem; top: calc(3.6rem + env(safe-area-inset-top, 0px)); }
  .journal { grid-template-columns: 1fr; }
  .triggers, .aids { grid-template-columns: 1fr; }

  .stop { grid-template-columns: 1fr; gap: .8rem; }
  .stop .sign { width: auto; max-width: 100%; justify-self: start; }

  .recovery__item { grid-template-columns: 1fr; gap: .1rem; }
  .trip { grid-template-columns: 5.5rem 1fr; }
  .trip__state { display: none; }
  .withdrawal { flex-direction: column; gap: .2rem; }
  .ledger__row { grid-template-columns: 5.6rem auto 1fr auto; }
}

@media (max-width: 560px) {
  .gains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gain:first-child { grid-column: 1 / -1; }
  .four { grid-template-columns: 1fr; }
  .trigger { grid-template-columns: 1fr; gap: .2rem; }
  .craving { grid-template-columns: 1fr auto auto; }
  .craving__trigger { grid-column: 1; grid-row: 2; font-size: .82rem; }
  .craving__level { grid-row: 1 / span 2; grid-column: 2; }
  .craving .icon-btn { grid-row: 1 / span 2; grid-column: 3; }
  .trigger-bars li { grid-template-columns: 7rem 1fr 1.6rem; }
  .ledger { padding-inline: .8rem; }
  .ledger__note { display: none; }
  .ledger__row { grid-template-columns: 5.2rem auto 1fr; gap: .6rem; }
  .inline-form { flex-direction: column; }
  .teaser { flex-direction: column; align-items: flex-start; }
  .hours__cell { height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .breath__ball { animation: none; transform: scale(.85); }
}

/* =========================================================================
   Herbe : bravo, le tas, la pousse, les taf
   ========================================================================= */

:root {
  --forest: #0a2b22;
  --mint:   #74e3b1;
  --leaf-1: #bfe8cf;   /* la graine */
  --leaf-2: #52bb8a;   /* la pousse */
  --leaf-3: #0e7a57;   /* l'arbre */
}

/* ------------------------------------------------ Sous-navigation herbe */

.subnav {
  display: flex;
  gap: .4rem;
  margin: -.4rem 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav__link {
  flex: none;
  padding: .45rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
}
.subnav__link:hover { color: var(--ink); border-color: var(--leaf-2); }
.subnav__link.is-current { background: var(--forest); border-color: var(--forest); color: #eaf6f0; }
@media (prefers-color-scheme: dark) {
  .subnav__link.is-current { background: var(--mint); border-color: var(--mint); color: #05281d; }
}

/* ------------------------------------------------------------- Hero bravo */

.hh {
  position: relative;
  padding: clamp(2rem, 5vw, 3.6rem) clamp(1.3rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 32px;
  background:
    radial-gradient(60rem 26rem at 100% -10%, rgba(116, 227, 177, .22), transparent 65%),
    radial-gradient(40rem 20rem at -10% 110%, rgba(116, 227, 177, .10), transparent 65%),
    #0a2b22;
  color: #eaf6f0;
  overflow: hidden;
  isolation: isolate;
}
@media (prefers-color-scheme: dark) { .hh { border: 1px solid var(--line); } }

.hh__bravo {
  font-family: var(--display);
  font-size: clamp(5rem, 24vw, 13rem);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  letter-spacing: -.065em;
  line-height: .82;
  color: var(--mint);
  margin-left: -.04em;
}
.hh__lead {
  max-width: 34ch;
  margin-top: 1.4rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.22;
  color: rgba(234, 246, 240, .86);
}
.hh__lead strong { color: #fff; font-weight: 700; }

.hh__count { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-top: 2.2rem; }
.hh__number {
  font-family: var(--display);
  font-size: clamp(3.4rem, 12vw, 7rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .9;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex;
}
.hh__unit { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: -.02em; }

.tick--green { margin-top: 1.4rem; }
.tick--green .tick__bar span { background: var(--mint); }
.hh .tick__text { color: rgba(234, 246, 240, .74); }
.hh .tick__text strong { color: #fff; }
.hh .tick__rate { color: rgba(234, 246, 240, .5); }

.gains--green { background: rgba(255, 255, 255, .1); }
.hh .gain { background: rgba(255, 255, 255, .05); }
.hh .gain dt { color: rgba(234, 246, 240, .64); }
.hh .gain dd a { color: inherit; text-decoration-color: rgba(234, 246, 240, .4); }

/* ----------------------------------------------------------------- Le tas */

.wall-panel .section-head p { max-width: 62ch; }

.wall {
  position: relative;
  padding: 1rem .9rem 1.2rem;
  border-radius: var(--r-l);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.wall__canvas { display: block; width: 100%; touch-action: pan-y; }
.wall__tip {
  position: absolute;
  z-index: 3;
  min-width: 11rem;
  padding: .55rem .75rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--sky);
  font-size: .8rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: var(--shadow-lift);
}
.wall__tip.is-visible { opacity: 1; transform: none; }
.wall__tip strong, .wall__tip span { display: block; }
.wall__tip strong { font-family: var(--display); font-size: .95rem; }
.wall__tip-taf { color: var(--honey); font-weight: 600; }

.wall__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .9rem; font-size: .82rem; color: var(--ink-soft); }
.wall__legend li { display: flex; align-items: center; gap: .5rem; }
.wall__key { display: inline-block; width: 13px; height: 13px; border-radius: 50%; flex: none; }
.wall__key--on  { background: var(--pine); }
.wall__key--now { background: transparent; border: 1.5px solid var(--pine); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--pine) 35%, transparent); }
.wall__key--taf { background: var(--honey); }
.wall__note { margin-top: .6rem; font-size: .82rem; color: var(--ink-faint); max-width: 62ch; }

/* ------------------------------------------------------------------ Lettre */

.letter__body { max-width: 62ch; display: grid; gap: .9rem; }
.letter__body p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; }
.letter__body strong { color: var(--ink); }
.letter__body h3 { font-size: 1.15rem; margin-top: .6rem; color: var(--pine); }

/* -------------------------------------------------- Prochain palier, vert */

.next-tier--green .next-tier__kicker { color: var(--pine); font-weight: 600; }
.progress--green > span { background: var(--pine); }

/* ------------------------------------------- Feuilles (paliers de l'herbe) */

.leaf {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 9.5rem;
  padding: .6rem 1.4rem .6rem 1.05rem;
  border-radius: 6px 30px 6px 30px;
  background: var(--leaf-2);
  color: #052818;
}
.leaf__n { font-family: var(--display); font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.leaf__when { font-size: .74rem; font-weight: 600; opacity: .75; line-height: 1.25; }
.leaf--big { min-width: 0; padding-block: .75rem; }
.leaf--big .leaf__n { font-size: 1.8rem; }
.leaf--graine { background: var(--leaf-1); }
.leaf--pousse { background: var(--leaf-2); }
.leaf--arbre  { background: var(--leaf-3); color: #fff; }
.leaf--locked {
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 2px dashed var(--line-strong);
}

.stop--green .leaf { width: 100%; }
.stop--green.is-reached::before { background: var(--pine); }

.trail__blaze--leaf { width: 30px; height: 22px; border-radius: 3px 14px 3px 14px; box-shadow: none; }
.trail__blaze--graine { background: var(--leaf-1); }
.trail__blaze--pousse { background: var(--leaf-2); }
.trail__blaze--arbre  { background: var(--leaf-3); }
.trail__list--green::before { background: repeating-linear-gradient(180deg, var(--leaf-2) 0 10px, transparent 10px 18px); }

.here--green .here__dot { background: var(--pine); box-shadow: 0 0 0 5px var(--pine-soft); }
.here--green .here__text { color: var(--pine); }

/* -------------------------------------------------------- Mois par mois */

.months { display: grid; gap: .6rem; max-width: 46rem; }
.month { padding: 1rem 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.month__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.month__head h3 { font-size: 1.1rem; }
.month__chf { font-family: var(--display); font-size: 1.35rem; font-weight: 750; letter-spacing: -.03em; color: var(--pine); font-variant-numeric: tabular-nums; }
.month__bar { height: 9px; margin: .6rem 0 .5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.month__bar span { display: block; height: 100%; background: var(--pine); border-radius: inherit; min-width: 3px; }
.month__meta { font-size: .85rem; color: var(--ink-soft); }
.month__partial { color: var(--ink-faint); }

.future { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.future__item { padding: 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.future__when { font-size: .88rem; color: var(--ink-soft); }
.future__chf { font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; margin: .15rem 0; font-variant-numeric: tabular-nums; }
.future__n { font-size: .85rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- Les taf */

.taf-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  border-radius: 32px;
  background: var(--honey-soft);
  border: 1px solid color-mix(in srgb, var(--honey) 40%, transparent);
}
.taf-hero.is-over { background: var(--ember-soft); border-color: color-mix(in srgb, var(--ember) 30%, transparent); }
.taf-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.05em; line-height: 1; }
.taf-hero__lead { margin: .8rem 0 1.4rem; color: var(--ink-soft); font-size: 1.05rem; max-width: 46ch; }
.taf-hero__lead strong { color: var(--ink); }
.taf-hero__status { margin: 1rem 0 1.3rem; max-width: 50ch; }
.taf-hero__over { margin: -.4rem 0 1.2rem; max-width: 52ch; padding: .8rem 1rem; border-radius: var(--r-s); background: var(--paper); color: var(--ember-deep); font-size: .92rem; }
.taf-hero .btn--primary { background: var(--ink); }

.taf-gauge { display: flex; gap: .7rem; }
.taf-gauge__dot {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--honey-deep) 55%, transparent);
  background: var(--paper);
  color: #111;
}
.taf-gauge__dot .icon { width: 26px; height: 26px; stroke-width: 2.4; }
.taf-gauge__dot.is-used { background: var(--honey); border-color: var(--honey); }
.taf-gauge__dot.is-extra { border-color: var(--ember); }
.taf-gauge__dot.is-extra.is-used { background: var(--ember); color: #fff; }

.taf-hero__stats { display: grid; gap: .6rem; }
.taf-hero__stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 1.1rem; border-radius: var(--r-m); background: var(--paper); }
.taf-hero__stats dt { font-size: .88rem; color: var(--ink-soft); }
.taf-hero__stats dd { font-family: var(--display); font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: right; }

.honest { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.honest__item { padding: 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.honest__value { font-family: var(--display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.honest__label { font-size: .86rem; color: var(--ink-soft); margin-top: .2rem; }

.rules { display: grid; gap: .6rem; max-width: 46rem; }
.rule { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.rule__n {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--honey); color: #111;
  font-family: var(--display); font-weight: 800;
}
.rule h3 { font-size: 1.05rem; }
.rule p { font-size: .92rem; color: var(--ink-soft); margin-top: .15rem; }

.ticks--questions li { align-items: flex-start; }

.taf-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .7rem; }
.taf-month { padding: 1rem 1.1rem; border-radius: var(--r-m); background: var(--paper); border: 1px solid var(--line); }
.taf-month h3 { font-size: 1rem; }
.taf-month__dots { display: flex; gap: 6px; margin: .6rem 0 .4rem; }
.taf-month__dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--honey-deep) 50%, transparent); }
.taf-month__dots i.on { background: var(--honey); border-color: var(--honey); }
.taf-month__dots i.extra { border-color: var(--ember); }
.taf-month__dots i.extra.on { background: var(--ember); }
.taf-month p { font-size: .82rem; color: var(--ink-soft); }
.taf-month.is-over { border-color: color-mix(in srgb, var(--ember) 40%, transparent); }

.taf-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: .2rem .6rem .2rem 1.1rem; }
.taf-row { display: grid; grid-template-columns: 9rem auto 1fr auto; gap: 1rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.taf-row:last-child { border-bottom: 0; }
.taf-row__when { font-variant-numeric: tabular-nums; }
.taf-row__when em { font-style: normal; color: var(--ink-faint); }
.taf-row__n { font-weight: 600; color: var(--honey-deep); }
.taf-row__note { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------------------------- Aide herbe + petits ajouts */

.help-hero--green { background: var(--pine-soft); border-color: color-mix(in srgb, var(--pine) 25%, transparent); }
.help-hero--green .help-hero__stats div:first-child dd { color: var(--pine); }

.note-card { max-width: 52rem; padding: 1.2rem 1.4rem; border-radius: var(--r-m); background: var(--honey-soft); border: 1px solid color-mix(in srgb, var(--honey) 40%, transparent); }
.note-card p { color: var(--ink-soft); line-height: 1.65; }
.note-card strong { color: var(--ink); }

.craving__sub { font-style: normal; font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: var(--pine-soft); color: var(--pine); margin-left: .3rem; }

.chips--sub { margin-bottom: -.2rem; }

.dlg-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5rem 0; }
.dlg-section summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.dlg-section__body { display: grid; gap: .8rem; padding: .7rem 0 .4rem; }
.dialog { max-height: 92vh; overflow-y: auto; }

.celebrate--green .celebrate__kicker { color: var(--pine); }
.celebrate--green .celebrate__name { background: var(--leaf-2); color: #052818; clip-path: none; border-radius: 6px 24px 6px 24px; padding: .5rem 1.4rem; }

.strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strip__main, .strip__side { grid-column: span 2; }
.strip__main--green { background: var(--forest) !important; border-color: var(--forest) !important; color: #eaf6f0; }
.strip__main--green .strip__count { color: var(--mint); }
.strip__main--green .progress > span { background: var(--mint); }
@media (prefers-color-scheme: dark) { .strip__main--green { border-color: var(--line) !important; } }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1020px) {
  .future { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .tabbar { grid-template-columns: repeat(6, 1fr); }
  .tabbar__link { font-size: .62rem; }
  .tabbar__link .icon { width: 22px; height: 22px; }

  .strip { grid-template-columns: 1fr 1fr; }
  .strip__main { grid-column: 1 / -1; }
  .strip__side { grid-column: auto; }

  .taf-hero { grid-template-columns: 1fr; }
  .honest { grid-template-columns: 1fr; }
  .stop--green .leaf { width: auto; max-width: 100%; justify-self: start; }
}

@media (max-width: 560px) {
  .future { grid-template-columns: 1fr 1fr; }
  .taf-row { grid-template-columns: 1fr auto auto; }
  .taf-row__note { grid-column: 1; grid-row: 2; font-size: .82rem; }
  .taf-row__n { grid-column: 2; grid-row: 1; }
  .taf-row .icon-btn { grid-column: 3; grid-row: 1 / span 2; }
  .taf-gauge__dot { width: 48px; height: 48px; }
  .hh__bravo { font-size: clamp(4.4rem, 26vw, 8rem); }
}


/* ==================================================== La tirelire de BOB (v4) */
.brand__name b { font-weight: 800; color: var(--amber, #e3a81c); letter-spacing: .02em; }

.alerts { display: grid; gap: .75rem; margin-bottom: 2rem; }
.alerts .alert { margin-bottom: 0; }
.alert-both { margin: 0; display: flex; }
.alert-both .btn { width: 100%; justify-content: center; }
@media (min-width: 720px) { .alert-both .btn { width: auto; } }

.nav__link, .tabbar__link { position: relative; }
.nav__dot {
  display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--ember, #e0452b); margin-left: .4rem; vertical-align: middle;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember, #e0452b) 25%, transparent);
}
.tabbar__link .nav__dot { position: absolute; top: .35rem; left: calc(50% + .6rem); margin: 0; }

.reminder {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem;
  margin: 0 0 1.25rem; padding: .8rem 1rem; border-radius: 14px; text-decoration: none;
  background: var(--ember-soft, #fde8e3); color: var(--ember-deep, #8f2412);
  border: 1px solid color-mix(in srgb, var(--ember, #e0452b) 30%, transparent);
}
.reminder strong { color: var(--ember, #e0452b); }
.reminder em { margin-left: auto; font-style: normal; font-weight: 700; text-decoration: underline; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: .5rem 0 0; font-size: .95rem; }
.split__plus { opacity: .5; }
.src {
  display: inline-block; padding: .08rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; background: color-mix(in srgb, #e3a81c 22%, transparent); color: inherit;
}
.src--weed { background: color-mix(in srgb, #2fb67c 24%, transparent); }
.btn--herb { background: #1f8a5f; border-color: #1f8a5f; color: #fff; }
.btn--herb:hover { background: #17724f; }
.field--choice { border: 0; padding: 0; margin: 0 0 1rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.field--choice legend { padding: 0; margin-bottom: .35rem; font-size: .85rem; opacity: .75; }
.field--choice label { display: inline-flex; align-items: center; gap: .4rem; }

.heart { color: var(--blood); }
.footer_small_mine {
  margin: 1.4rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: .01em;
}
.footer_small_mine .heart { display: inline-block; margin: 0 .1em; }

/* Réglages : case « J'arrête aussi l'herbe » */
.check--weed { margin: 1rem 0 .6rem; font-weight: 600; color: var(--ink); }
.dlg-section[hidden] { display: none !important; }