:root {
  --bg: #ffffff;
  --card: #f8f4f6;
  --card-2: #f1eaee;
  --line: rgba(64, 24, 44, 0.09);
  --ink: #24161e;
  --ink-2: #6f5f68;
  --ink-3: #a7989f;
  --on-accent: #ffffff;

  --regles: #e5446d;
  --regles-soft: #fde6ec;
  --folliculaire: #ec9532;
  --folliculaire-soft: #fdf0de;
  --ovulation: #10a393;
  --ovulation-soft: #dcf4f0;
  --luteale: #8a74df;
  --luteale-soft: #eeeafc;
  --neutre: #8c7f86;
  --neutre-soft: #f1ecef;
  --attention: #d47a1c;
  --attention-soft: #fff2e1;
  --ok: #2f9e6a;
  --ok-soft: #e2f5ea;

  --r-card: 24px;
  --r-ctl: 14px;
  --shadow-pop: 0 10px 40px rgba(36, 22, 30, 0.18);
  --tab-h: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gut: 18px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-round: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #161116;
    --card-2: #221a21;
    --line: rgba(255, 230, 240, 0.1);
    --ink: #f7eef2;
    --ink-2: #b5a6ae;
    --ink-3: #74666d;
    --regles: #ff5d84;
    --regles-soft: #3b1421;
    --folliculaire: #f5a54a;
    --folliculaire-soft: #34230f;
    --ovulation: #2cc4b2;
    --ovulation-soft: #0d2c29;
    --luteale: #a08dff;
    --luteale-soft: #221c3d;
    --neutre: #a1959b;
    --neutre-soft: #241e22;
    --attention: #f2a14a;
    --attention-soft: #33220e;
    --ok: #4cc48a;
    --ok-soft: #10291c;
    --shadow-pop: 0 10px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 400 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }
p > .ico, .pill > .ico, .link > .ico { display: inline-block; vertical-align: -2px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 18px; height: 18px; }
.ico.xs { width: 14px; height: 14px; stroke-width: 2.2; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hide { display: none !important; }

/* ——— Vues ——— */
#view {
  padding: calc(var(--safe-t) + 10px) var(--gut) calc(var(--tab-h) + var(--safe-b) + 28px);
  max-width: 560px;
  margin: 0 auto;
}
#view.enter { animation: fade 0.28s ease; }
#view[data-tab="calendar"] { padding-top: 0; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 4px; }
.topbar .hello { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.topbar .hello::first-letter { text-transform: uppercase; }
.title { font-size: 32px; line-height: 1.12; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 14px; }
.title.sm { font-size: 26px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); color: var(--ink);
}
.iconbtn:active { transform: scale(0.94); }

/* ——— Cartes ——— */
.card { background: var(--card); border-radius: var(--r-card); padding: 18px; margin: 12px 0; }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.card p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.card .eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.card.tint-regles { background: var(--regles-soft); }
.card.tint-folliculaire { background: var(--folliculaire-soft); }
.card.tint-ovulation { background: var(--ovulation-soft); }
.card.tint-luteale { background: var(--luteale-soft); }
.card.tint-attention { background: var(--attention-soft); }
.card.tint-ok { background: var(--ok-soft); }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 26px 2px 4px; }
.section-sub { font-size: 14px; color: var(--ink-2); margin: 0 2px 10px; }
.link { color: var(--regles); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; }
.link .ico { width: 16px; height: 16px; stroke-width: 2.2; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* ——— Boutons ——— */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 0 20px;
  border-radius: 18px;
  background: var(--regles); color: var(--on-accent);
  font-size: 17px; font-weight: 650; letter-spacing: -0.01em;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.98); opacity: 0.92; }
.btn.soft { background: var(--regles-soft); color: var(--regles); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.small { min-height: 42px; font-size: 15px; border-radius: 14px; width: auto; padding: 0 16px; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.textbtn { color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 12px; display: block; margin: 4px auto 0; }

/* ——— Bandeau de la semaine ——— */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 6px -6px 4px; }
.week button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0; }
.week .wd { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; }
.week .is-today .wd { color: var(--ink); }

/* Pastille d'un jour (bandeau et calendrier) */
.dnum {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-round); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.dnum.p { background: var(--regles); color: #fff; }
.dnum.pf { background: var(--regles-soft); color: var(--regles); }
.dnum.pp { border: 1.8px dashed var(--regles); color: var(--regles); }
.dnum.f { background: var(--ovulation-soft); color: var(--ovulation); }
.dnum.o { background: var(--ovulation); color: #fff; }
.dnum.past { opacity: 1; }
.dnum.dim { color: var(--ink-3); }
.dnum.today::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
}
.dnum.late { box-shadow: inset 0 0 0 1.6px var(--attention); color: var(--attention); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.dot.off { visibility: hidden; }

/* ——— Anneau du cycle ——— */
.hero { position: relative; display: grid; place-items: center; margin: 6px auto 0; width: min(84vw, 320px); aspect-ratio: 1; }
.hero svg { width: 100%; height: 100%; overflow: visible; }
.hero .arc { fill: none; stroke-linecap: round; transition: opacity 0.3s; }
.hero .center { position: absolute; inset: 16%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero .lbl { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.hero .big { font-family: var(--font-round); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 6px 0 6px; font-size: clamp(46px, 15vw, 64px); }
.hero .big small { font-size: 0.42em; font-weight: 650; letter-spacing: -0.01em; margin-left: 4px; }
.hero .sub { font-size: 14px; color: var(--ink-2); line-height: 1.35; max-width: 190px; }
.marker { filter: drop-shadow(0 2px 6px rgba(36, 22, 30, 0.25)); }
.hero-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  font-size: 13px; font-weight: 600;
}
.pill .sw { width: 8px; height: 8px; border-radius: 50%; }

/* ——— Pastilles de saisie ——— */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.1s ease, background 0.15s ease;
}
.chip:active { transform: scale(0.96); }
.chip.on { box-shadow: none; color: #fff; font-weight: 600; }
.chip.on.t-regles { background: var(--regles); }
.chip.on.t-folliculaire { background: var(--folliculaire); }
.chip.on.t-ovulation { background: var(--ovulation); }
.chip.on.t-luteale { background: var(--luteale); }
.chip.on.t-neutre { background: var(--ink); color: var(--bg); }
.chip.static { background: var(--bg); box-shadow: none; min-height: 32px; font-size: 14px; padding: 0 12px; }
.card .chip:not(.on) { background: var(--bg); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button {
  min-height: 56px; border-radius: 14px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 6px 2px;
}
.seg button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.seg.flow button.on { background: var(--regles); color: #fff; }
.seg .drops { display: flex; gap: 1px; height: 16px; align-items: center; }
.seg .drops svg { width: 11px; height: 14px; fill: currentColor; }
.seg .traces { display: flex; gap: 3px; height: 16px; align-items: center; }
.seg .traces i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* ——— Interrupteur ——— */
.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--card-2); transition: background 0.2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.22s cubic-bezier(0.3, 0.7, 0.4, 1); }
.switch.on { background: var(--regles); }
.switch.on.green { background: var(--ovulation); }
.switch.on::after { transform: translateX(20px); }

/* ——— Listes façon réglages ——— */
.list { background: var(--card); border-radius: 18px; overflow: hidden; margin: 10px 0; }
.list > * { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 16px; text-align: left; font-size: 16px; }
.list > * + * { border-top: 1px solid var(--line); }
.list .grow { flex: 1; min-width: 0; }
.list .val { color: var(--ink-2); font-size: 15px; }
.list small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.list .chev { color: var(--ink-3); }
.list .danger { color: var(--regles); }
.list-title { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin: 22px 16px 6px; }
.list-foot { font-size: 13px; color: var(--ink-2); margin: 6px 16px 0; line-height: 1.4; }

.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 20px; font-weight: 500; }
.stepper .num { min-width: 52px; text-align: center; font-weight: 650; font-size: 17px; }

/* ——— Barre d'onglets ——— */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 6px 8px calc(var(--safe-b) + 4px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 2px; color: var(--ink-3); font-size: 10.5px; font-weight: 600; min-height: 48px; }
.tabbar button .ico { width: 25px; height: 25px; }
.tabbar button.on { color: var(--regles); }

/* ——— Feuilles (panneaux qui montent du bas) ——— */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-wrap .scrim { position: absolute; inset: 0; background: rgba(20, 8, 14, 0.38); opacity: 0; transition: opacity 0.3s ease; }
.sheet-wrap.open .scrim { opacity: 1; }
.sheet {
  position: relative; z-index: 1;
  max-height: calc(100vh - var(--safe-t) - 12px);
  max-height: calc(100dvh - var(--safe-t) - 12px);
  height: calc(100vh - var(--safe-t) - 12px);
  height: calc(100dvh - var(--safe-t) - 12px);
  background: var(--bg); border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-pop);
  transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.sheet.auto { height: auto; }
.sheet-wrap.open .sheet { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--card-2); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 10px var(--gut) 8px; flex: none; }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 750; letter-spacing: -0.015em; }
.sheet-head h2::first-letter { text-transform: uppercase; }
.sheet-head .sub { font-size: 14px; color: var(--ink-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sheet-head .sub.dotted { gap: 0 6px; }
.sheet-head .sub.dotted span + span::before { content: '·'; margin-right: 6px; color: var(--ink-3); font-weight: 400; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--gut) calc(var(--safe-b) + 28px); flex: 1; overscroll-behavior: contain; }
.done-btn { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--card); font-weight: 650; font-size: 15px; flex: none; }

.block { margin: 22px 0 0; }
.block:first-child { margin-top: 8px; }
.block-title { font-size: 15px; font-weight: 650; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.block-title .sw { width: 8px; height: 8px; border-radius: 50%; }
.block-hint { font-size: 13px; color: var(--ink-2); margin: -4px 0 10px; line-height: 1.4; }
.rowbox { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 12px 14px; min-height: 56px; }
.rowbox .grow { flex: 1; }
.rowbox b { font-weight: 600; }

.field {
  width: 100%; min-height: 50px; border-radius: 14px; border: 0;
  background: var(--card); padding: 12px 14px; font-size: 16px; outline: none;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.15s;
}
.field:focus { box-shadow: inset 0 0 0 2px var(--regles); }
.field::placeholder { color: var(--ink-3); font-weight: 400; }
textarea.field { min-height: 92px; resize: vertical; line-height: 1.45; }
.temp-row { display: flex; align-items: center; gap: 10px; }
.temp-row .field { width: 130px; text-align: center; font-family: var(--font-round); font-size: 20px; font-weight: 650; }

/* ——— Calendrier ——— */
.cal-head { position: sticky; top: 0; z-index: 5; background: var(--bg); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); margin: 0 calc(-1 * var(--gut)); padding: calc(var(--safe-t) + 6px) var(--gut) 6px; }
.cal-head .title { margin: 0 0 8px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: center; }
.month { margin: 18px 0 8px; }
.month h4 { margin: 0 0 8px 4px; font-size: 18px; font-weight: 700; text-transform: capitalize; letter-spacing: -0.01em; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.grid .cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0; min-height: 50px; }
.grid .cell[disabled] { pointer-events: none; }
.edit-mark { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--ink-3); display: grid; place-items: center; color: #fff; }
.edit-mark.on { background: var(--regles); box-shadow: none; }
.edit-mark .ico { width: 13px; height: 13px; stroke-width: 3; }
.floatbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 15;
  bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-pop);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.floatbar.solo { padding: 0; }
.floatbar .btn { min-height: 40px; border-radius: 999px; width: auto; font-size: 15px; padding: 0 16px; }
.floatbar.solo .btn { min-height: 46px; padding: 0 20px; background: var(--ink); color: var(--bg); }

/* ——— Analyses ——— */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.tile { background: var(--card); border-radius: 20px; padding: 14px 16px 16px; min-height: 112px; display: flex; flex-direction: column; }
.tile .k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tile .v { font-family: var(--font-round); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: auto; line-height: 1.05; }
.tile .v small { font-size: 16px; font-weight: 650; margin-left: 3px; color: var(--ink-2); }
.tile .v.word { font-family: var(--font); font-size: 22px; letter-spacing: -0.01em; }
.tile .n { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }

.hist { display: flex; flex-direction: column; gap: 14px; }
.hist .h-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.hist .h-top b { font-family: var(--font-round); font-weight: 650; }
.bar { position: relative; height: 12px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.bar .o { width: 12px; height: 12px; border-radius: 50%; background: var(--ovulation); box-shadow: 0 0 0 2px var(--card); }

.pattern { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.pattern + .pattern { border-top: 1px solid var(--line); }
.pattern .tag { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.pattern b { font-weight: 650; }
.pattern .grow { flex: 1; min-width: 0; }
.pattern .p-top { display: flex; align-items: baseline; gap: 8px; }
.pattern .freq { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pattern .soon { font-size: 12px; font-weight: 650; color: var(--luteale); background: var(--luteale-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pattern .muted { font-size: 14px; }

.heat { width: 100%; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; font-size: 13px; }
.heat th { font-weight: 600; color: var(--ink-3); font-size: 11.5px; text-align: center; padding-bottom: 2px; }
.heat td:first-child { color: var(--ink); font-weight: 500; padding-right: 4px; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.heat td.c { height: 28px; border-radius: 8px; background: var(--card-2); }

.alert { display: flex; gap: 12px; align-items: flex-start; }
.alert .ico { color: var(--attention); margin-top: 1px; }
.alert.ok .ico { color: var(--ok); }
.alert + .alert { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.alert b { display: block; font-weight: 650; }
.alert p { margin: 3px 0 0; }

/* ——— Comprendre ——— */
.articles { display: grid; gap: 10px; margin: 8px 0; }
.article-card { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 20px; padding: 14px 16px; text-align: left; width: 100%; }
.article-card .badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.article-card .grow { flex: 1; min-width: 0; }
.article-card b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.article-card span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; }
.phase-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 4px; }
.phase-strip button { border-radius: 18px; padding: 12px 10px; text-align: left; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.phase-strip b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.phase-strip span { font-size: 12px; font-weight: 600; opacity: 0.8; }

.prose { font-size: 16.5px; line-height: 1.6; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; letter-spacing: -0.01em; line-height: 1.3; }
.prose p { margin: 10px 0; color: var(--ink); }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose .lead { font-size: 18px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.prose .note { background: var(--card); border-radius: 16px; padding: 14px 16px; font-size: 15px; color: var(--ink-2); margin: 16px 0; }
.prose .note.warn { background: var(--attention-soft); color: var(--ink); }
.prose .sources { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin-top: 30px; border-top: 1px solid var(--line); padding-top: 14px; }
.prose .sources a { color: inherit; }
.prose b { font-weight: 650; }
.chart-hormones { background: var(--card); border-radius: 18px; padding: 14px 12px 10px; margin: 16px 0; }
.chart-hormones svg { width: 100%; height: auto; }
.chart-key { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12.5px; color: var(--ink-2); margin: 8px 6px 2px; }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* ——— Accueil, installation ——— */
.onb { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; }
.onb-in { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 480px; margin: 0 auto; padding: calc(var(--safe-t) + 20px) 24px calc(var(--safe-b) + 24px); }
.onb.enter .onb-in { animation: fade 0.35s ease; }
.onb h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 750; }
.onb .lead { color: var(--ink-2); font-size: 17px; line-height: 1.5; margin: 0 0 22px; }
.onb .foot { margin-top: auto; padding-top: 22px; }
.onb .dots { display: flex; gap: 6px; margin-bottom: 28px; }
.onb .dots i { height: 4px; flex: 1; border-radius: 2px; background: var(--card-2); }
.onb .dots i.on { background: var(--regles); }
.logo { width: 92px; height: 92px; border-radius: 26px; box-shadow: 0 12px 30px rgba(229, 68, 109, 0.32); }
.welcome { display: flex; flex-direction: column; align-items: flex-start; padding-top: 8vh; }
.promise { display: grid; gap: 14px; margin: 26px 0 0; }
.promise > div { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.4; color: var(--ink-2); }
.promise .ico { color: var(--regles); margin-top: 1px; }
.promise b { color: var(--ink); font-weight: 600; display: block; }
.choice { display: grid; gap: 8px; }
.choice button { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border-radius: 16px; padding: 14px 16px; min-height: 58px; font-size: 16px; font-weight: 500; box-shadow: inset 0 0 0 2px transparent; }
.choice button small { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 400; margin-top: 1px; }
.choice button.on { box-shadow: inset 0 0 0 2px var(--regles); background: var(--regles-soft); }
.choice .grow { flex: 1; }
.radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-3); flex: none; display: grid; place-items: center; }
.on .radio { box-shadow: inset 0 0 0 7px var(--regles); }
.bigstep { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 20px; padding: 14px 16px; margin: 10px 0; }
.bigstep .num { font-size: 30px; font-weight: 700; }
.bigstep .stepper button { width: 44px; height: 44px; font-size: 24px; }

.mini-cal { background: var(--card); border-radius: 20px; padding: 12px 10px 8px; }
.mini-cal .mc-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 8px; }
.mini-cal .mc-head b { text-transform: capitalize; font-size: 16px; }
.mini-cal .grid .cell { min-height: 42px; }
.mini-cal .dnum.sel { background: var(--regles); color: #fff; }

.install-step { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 18px; padding: 14px 16px; margin: 8px 0; font-size: 16px; line-height: 1.4; }
.install-step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.install-step .kbd { display: inline-flex; align-items: center; gap: 4px; vertical-align: -5px; background: var(--bg); padding: 3px 8px; border-radius: 8px; font-weight: 600; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.install-step .kbd .ico { width: 17px; height: 17px; color: #0a84ff; }

/* ——— Messages ——— */
.toast {
  position: fixed; left: 50%; z-index: 80; top: calc(var(--safe-t) + 10px);
  transform: translate(-50%, -140%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 11px 18px;
  font-size: 15px; font-weight: 600; box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ——— Résumé imprimable ——— */
.report { font-size: 14px; }
.report table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.report th, .report td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.report th { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.report h3 { font-size: 16px; margin: 18px 0 6px; }
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; padding: 0; color: #000; }
  #print-root .report { font-size: 12px; }
  :root { --ink: #000; --ink-2: #444; --line: #ccc; }
}

@media (min-width: 700px) {
  .hero { width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
