/* Cycles 2 — système visuel. Matériaux translucides, typographie système, couleurs sémantiques. */

:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --bg2: #ffffff;
  --bg3: #f2f2f7;
  --fill: rgba(120, 120, 128, .12);
  --fill2: rgba(120, 120, 128, .2);
  --label: #000000;
  --label2: rgba(60, 60, 67, .62);
  --label3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .18);
  --glass: rgba(255, 255, 255, .64);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .06);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04);

  --tint: #ff2d55;
  --period: #ff375f;
  --period-soft: rgba(255, 55, 95, .13);
  --fertile: #2bb3c9;
  --fertile-soft: rgba(43, 179, 201, .15);
  --ovu: #5856d6;
  --ovu-soft: rgba(88, 86, 214, .14);
  --preg: #af52de;
  --preg-soft: rgba(175, 82, 222, .13);
  --away: #ff9500;
  --away-soft: rgba(255, 149, 0, .15);
  --ok: #34c759;
  --ok-soft: rgba(52, 199, 89, .14);
  --danger: #ff3b30;
  --danger-soft: rgba(255, 59, 48, .12);
  --info: #007aff;

  --r-card: 26px;
  --r-group: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000; --bg2: #1c1c1e; --bg3: #2c2c2e;
    --fill: rgba(120, 120, 128, .24); --fill2: rgba(120, 120, 128, .36);
    --label: #ffffff; --label2: rgba(235, 235, 245, .62); --label3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .55);
    --glass: rgba(40, 40, 44, .58); --glass-strong: rgba(44, 44, 48, .86); --glass-edge: rgba(255, 255, 255, .12);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .4);
    --card-shadow: none;
    --tint: #ff375f; --period: #ff4569; --period-soft: rgba(255, 69, 105, .2);
    --fertile: #40c8e0; --fertile-soft: rgba(64, 200, 224, .18);
    --ovu: #7d7aff; --ovu-soft: rgba(125, 122, 255, .2);
    --preg: #bf5af2; --preg-soft: rgba(191, 90, 242, .2);
    --away: #ff9f0a; --away-soft: rgba(255, 159, 10, .2);
    --ok: #30d158; --ok-soft: rgba(48, 209, 88, .18);
    --danger: #ff453a; --danger-soft: rgba(255, 69, 58, .18); --info: #0a84ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --bg2: #1c1c1e; --bg3: #2c2c2e;
  --fill: rgba(120, 120, 128, .24); --fill2: rgba(120, 120, 128, .36);
  --label: #ffffff; --label2: rgba(235, 235, 245, .62); --label3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .55);
  --glass: rgba(40, 40, 44, .58); --glass-strong: rgba(44, 44, 48, .86); --glass-edge: rgba(255, 255, 255, .12);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .4);
  --card-shadow: none;
  --tint: #ff375f; --period: #ff4569; --period-soft: rgba(255, 69, 105, .2);
  --fertile: #40c8e0; --fertile-soft: rgba(64, 200, 224, .18);
  --ovu: #7d7aff; --ovu-soft: rgba(125, 122, 255, .2);
  --preg: #bf5af2; --preg-soft: rgba(191, 90, 242, .2);
  --away: #ff9f0a; --away-soft: rgba(255, 159, 10, .2);
  --ok: #30d158; --ok-soft: rgba(48, 209, 88, .18);
  --danger: #ff453a; --danger-soft: rgba(255, 69, 58, .18); --info: #0a84ff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--label);
  font: 17px/1.35 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--info) 60%, transparent); outline-offset: 2px; border-radius: 12px; }
[hidden] { display: none !important; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.muted { color: var(--label2); }
.tiny { font-size: 12px; }
.small { font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icônes ---------- */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i.sm { width: 17px; height: 17px; }
.i.lg { width: 28px; height: 28px; }
.i .f { fill: currentColor; stroke: none; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.sidebar { display: none; }
main#view { min-width: 0; padding: calc(var(--safe-t) + 8px) 16px calc(var(--tabbar-h) + var(--safe-b) + 40px); max-width: 760px; width: 100%; margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(var(--safe-t) + 6px) 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px;
  transition: background .25s, box-shadow .25s;
}
.topbar.scrolled { background: var(--glass); backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%); box-shadow: 0 .5px 0 var(--sep); }
.topbar .compact { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.topbar.scrolled .compact { opacity: 1; }
.topbar .lead, .topbar .trail { display: flex; gap: 8px; align-items: center; min-width: 44px; }
.topbar .trail { justify-content: flex-end; }
.largetitle { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .01em; margin: 2px 0 2px; }
.subtitle { color: var(--label2); font-size: 15px; margin: 0 0 18px; }

/* Barre d'onglets flottante */
.tabbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--safe-b)); display: flex; gap: 2px; padding: 5px;
  border-radius: 999px; background: var(--glass); border: .5px solid var(--glass-edge);
  backdrop-filter: blur(28px) saturate(190%); -webkit-backdrop-filter: blur(28px) saturate(190%);
  box-shadow: var(--glass-shadow); max-width: calc(100vw - 20px);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 62px; height: 54px; padding: 0 8px; border-radius: 999px; color: var(--label);
  text-decoration: none; font-size: 10px; font-weight: 600; letter-spacing: .01em; transition: background .3s var(--ease), color .2s;
}
.tabbar a .i { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { background: var(--fill); color: var(--tint); }
@media (max-width: 380px) { .tabbar a { min-width: 52px; padding: 0 4px; } }

@media (min-width: 1000px) {
  .app { grid-template-columns: 280px 1fr; }
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px;
    background: var(--glass); border-right: .5px solid var(--sep);
    backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; padding: 6px 10px 18px; }
  .sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--label); text-decoration: none; font-size: 16px; font-weight: 500; }
  .sidebar a .i { color: var(--tint); }
  .sidebar a:hover { background: var(--fill); }
  .sidebar a[aria-current="page"] { background: var(--tint); color: #fff; }
  .sidebar a[aria-current="page"] .i { color: #fff; }
  .sidebar .foot { margin-top: auto; font-size: 12px; color: var(--label2); padding: 10px; }
  main#view { padding: 18px 40px 60px; max-width: 1040px; }
  .topbar { margin: 0 -40px; padding-left: 40px; padding-right: 40px; }
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .cols > * { margin-top: 0 !important; }
}

/* ---------- Cartes et listes ---------- */
.card { background: var(--bg2); border-radius: var(--r-card); padding: 18px; box-shadow: var(--card-shadow); margin-top: 14px; position: relative; overflow: hidden; }
.card h3, .section-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.card .hint { color: var(--label2); font-size: 15px; margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.section-title { margin: 26px 4px 8px; font-size: 22px; }
.caption { text-transform: uppercase; font-size: 13px; color: var(--label2); margin: 24px 16px 7px; letter-spacing: .02em; font-weight: 500; }
.footnote { font-size: 13px; color: var(--label2); margin: 7px 16px 0; }

.group { background: var(--bg2); border-radius: var(--r-group); overflow: hidden; box-shadow: var(--card-shadow); }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 16px; width: 100%; text-align: left;
  position: relative; background: transparent; color: var(--label);
}
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.row.has-icon + .row.has-icon::before { left: 60px; }
button.row:active, a.row:active { background: var(--fill); }
a.row { text-decoration: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { display: block; }
.row .sub { display: block; font-size: 14px; color: var(--label2); margin-top: 1px; }
.row .value { color: var(--label2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .chev { color: var(--label3); width: 15px; height: 15px; stroke-width: 2.6; }
.row .lead-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.row .lead-icon .i { width: 19px; height: 19px; }
.row input, .row select { border: 0; background: transparent; text-align: right; color: var(--label2); min-width: 0; max-width: 60%; padding: 4px 0; }
.row input:focus, .row select:focus { outline: none; color: var(--label); }
.row.danger { color: var(--danger); }
.row.tint { color: var(--info); }
.row.done .title { color: var(--label2); text-decoration: line-through; text-decoration-color: var(--label3); }

.bg-period { background: var(--period); } .bg-fertile { background: var(--fertile); } .bg-ovu { background: var(--ovu); }
.bg-preg { background: var(--preg); } .bg-away { background: var(--away); } .bg-ok { background: var(--ok); }
.bg-info { background: var(--info); } .bg-gray { background: #8e8e93; } .bg-danger { background: var(--danger); }
.c-period { color: var(--period); } .c-fertile { color: var(--fertile); } .c-ovu { color: var(--ovu); } .c-preg { color: var(--preg); }
.c-away { color: var(--away); } .c-ok { color: var(--ok); } .c-danger { color: var(--danger); } .c-info { color: var(--info); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; font-weight: 600; font-size: 16px; background: var(--fill); color: var(--label);
  transition: transform .15s var(--ease), background .2s, opacity .2s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--tint); color: #fff; }
.btn.preg { background: var(--preg); color: #fff; }
.btn.tinted { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); }
.btn.tinted.preg { background: var(--preg-soft); color: var(--preg); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; min-height: 50px; font-size: 17px; }
.btn.small { min-height: 34px; padding: 0 13px; font-size: 14px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--label);
  background: var(--glass); border: .5px solid var(--glass-edge); box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.tint { color: var(--tint); }
.icon-btn.flat { background: var(--fill); border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.icon-btn.sm { width: 34px; height: 34px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.quick button {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 4px 12px; border-radius: 20px;
  background: var(--bg2); font-size: 12px; font-weight: 600; color: var(--label); box-shadow: var(--card-shadow);
  transition: transform .15s var(--ease);
}
.quick button:active { transform: scale(.95); }
.quick .bubble { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }

/* ---------- Puces, contrôles segmentés, interrupteurs ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--fill); font-size: 15px; font-weight: 500; transition: background .2s, color .2s, transform .15s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--chip, var(--tint)); color: #fff; }
.chip .i { width: 17px; height: 17px; }

.seg { display: flex; background: var(--fill); border-radius: 12px; padding: 2px; gap: 2px; position: relative; }
.seg button { flex: 1; min-height: 34px; border-radius: 10px; font-size: 14px; font-weight: 500; padding: 0 10px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.seg button[aria-pressed="true"] { background: var(--bg2); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #636366; } }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; max-width: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill2); transition: background .25s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }

.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; color: var(--label2); margin: 0 4px 6px; text-transform: uppercase; letter-spacing: .02em; }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 0; border-radius: 12px; background: var(--fill); padding: 12px 14px; min-height: 46px; color: var(--label);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--info) 55%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two > .field { margin-top: 14px; }

/* ---------- Anneau ---------- */
.hero { display: grid; place-items: center; padding: 6px 0 4px; position: relative; }
.ring { width: min(84vw, 330px); height: auto; overflow: visible; }
.ring .track { stroke: var(--fill); }
.ring .seg-period { stroke: var(--period); }
.ring .seg-predicted { stroke: var(--period); opacity: .38; }
.ring .seg-fertile { stroke: var(--fertile); }
.ring .seg-ovu { stroke: var(--ovu); }
.ring .seg-t1 { stroke: color-mix(in srgb, var(--preg) 40%, transparent); }
.ring .seg-t2 { stroke: color-mix(in srgb, var(--preg) 65%, transparent); }
.ring .seg-t3 { stroke: var(--preg); }
.ring .progress { stroke: var(--preg); }
.ring .knob { fill: var(--bg2); stroke: var(--label); stroke-width: 3; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.ring .tick { stroke: var(--label3); stroke-width: 1.5; }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.ring-center .kicker { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--label2); }
.ring-center .big { font-family: var(--font-round); font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.ring-center .big small { font-size: 26px; font-weight: 600; color: var(--label2); }
.ring-center .line { font-size: 16px; font-weight: 600; }
.ring-center .line2 { font-size: 14px; color: var(--label2); margin-top: 2px; }

/* Bandeau de la semaine */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.week button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0; border-radius: 16px; }
.week .wd { font-size: 12px; color: var(--label2); font-weight: 600; text-transform: uppercase; }
.week .dn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.week .today .dn { box-shadow: inset 0 0 0 2px var(--label); }

/* ---------- Calendrier ---------- */
.monthhead { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.monthhead h2 { margin: 0; font-size: 22px; font-weight: 700; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; touch-action: pan-y; }
.cal .wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--label2); padding-bottom: 4px; }
.day {
  position: relative; aspect-ratio: 1 / 1.08; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 4px;
  border-radius: 14px; font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 500; transition: background .15s;
}
.day:hover { background: var(--fill); }
.day .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.day.out { opacity: .35; }
.day.today .n { box-shadow: inset 0 0 0 2px var(--label); font-weight: 700; }
.mk-period .n, .week .mk-period .dn { background: var(--period); color: #fff; }
.mk-predicted .n, .week .mk-predicted .dn { box-shadow: inset 0 0 0 2px var(--period); color: var(--period); background: transparent; border: 0; outline: 2px dashed transparent; }
.mk-predicted .n { background: repeating-linear-gradient(135deg, var(--period-soft) 0 4px, transparent 4px 8px); }
.mk-fertile .n, .week .mk-fertile .dn { background: var(--fertile-soft); color: var(--fertile); }
.mk-high .n, .week .mk-high .dn { background: color-mix(in srgb, var(--fertile) 32%, transparent); color: color-mix(in srgb, var(--fertile) 70%, var(--label)); }
.mk-ovu .n, .week .mk-ovu .dn { background: var(--ovu); color: #fff; }
.mk-preg .n, .week .mk-preg .dn { background: var(--preg-soft); color: var(--preg); }
.mk-due .n, .week .mk-due .dn { background: var(--preg); color: #fff; }
.mk-past-fertile .n { box-shadow: inset 0 0 0 1.5px var(--fertile-soft); }
.day.today.mk-period .n, .day.today.mk-ovu .n { box-shadow: inset 0 0 0 2px var(--label), inset 0 0 0 4px var(--bg2); }
.dots { display: flex; gap: 3px; height: 6px; margin-top: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--label3); }
.dot.lh { background: var(--ovu); } .dot.preg { background: var(--preg); } .dot.log { background: var(--label2); }
.dot.appt { background: var(--preg); } .dot.wk { position: absolute; top: 2px; left: 4px; font-size: 9px; color: var(--preg); font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; font-size: 13px; color: var(--label2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.sw.period { background: var(--period); } .sw.predicted { box-shadow: inset 0 0 0 2px var(--period); }
.sw.fertile { background: var(--fertile-soft); box-shadow: inset 0 0 0 1px var(--fertile); } .sw.ovu { background: var(--ovu); }
.sw.preg { background: var(--preg); }

/* ---------- Statistiques ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--bg2); border-radius: 20px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.stat .k { font-size: 13px; color: var(--label2); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.stat .v { font-family: var(--font-round); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.01em; }
.stat .v small { font-size: 15px; color: var(--label2); font-weight: 600; margin-left: 2px; }
.stat .d { font-size: 13px; color: var(--label2); margin-top: 2px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 16px; overflow-x: auto; padding-bottom: 22px; position: relative; }
.bars .b { flex: 0 0 26px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; height: 100%; }
.bars .b i { display: block; border-radius: 8px; background: var(--fill2); min-height: 4px; }
.bars .b i.p { background: var(--period); border-radius: 0 0 8px 8px; }
.bars .b .lab { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--label2); white-space: nowrap; }
.bars .b .val { font-size: 11px; color: var(--label2); text-align: center; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.chart .grid { stroke: var(--sep); stroke-width: 1; }
.chart .axis { fill: var(--label2); font-size: 11px; }
.chart .band { fill: var(--ok-soft); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .pt { stroke: var(--bg2); stroke-width: 2; }

/* ---------- Grossesse ---------- */
.baby { display: flex; align-items: center; gap: 16px; }
.baby .size { width: 72px; height: 72px; border-radius: 22px; background: var(--preg-soft); color: var(--preg); display: grid; place-items: center; flex: none; }
.baby .size svg { width: 40px; height: 40px; }
.timeline { position: relative; }
.mile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; position: relative; }
.mile + .mile::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: .5px solid var(--sep); }
.mile .lead-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; margin-top: 2px; }
.mile .lead-icon .i { width: 19px; height: 19px; }
.mile .grow { flex: 1; min-width: 0; }
.mile .when { font-size: 13px; color: var(--label2); margin-top: 2px; }
.mile.now { background: var(--preg-soft); }
.mile.done .t { text-decoration: line-through; color: var(--label2); }
.check { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.8px var(--label3); display: grid; place-items: center; flex: none; color: #fff; transition: background .2s; }
.check[aria-checked="true"] { background: var(--ok); box-shadow: none; }
.check .i { width: 15px; height: 15px; stroke-width: 3; }
.progressbar { height: 8px; background: var(--fill); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.progressbar i { display: block; height: 100%; background: var(--preg); border-radius: 8px; transition: width .5s var(--ease); }
.weeks { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin: 0 -16px; padding-left: 16px; scrollbar-width: none; }
.weeks::-webkit-scrollbar { display: none; }
.weekcard { scroll-snap-align: center; flex: 0 0 104px; border-radius: 20px; background: var(--bg2); padding: 12px; box-shadow: var(--card-shadow); text-align: left; }
.weekcard.cur { background: var(--preg); color: #fff; }
.weekcard.cur .muted { color: rgba(255, 255, 255, .8); }
.weekcard .w { font-family: var(--font-round); font-size: 24px; font-weight: 700; }

.bigcount { font-family: var(--font-round); font-size: 88px; line-height: 1; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; margin: 10px 0 4px; }
.tapzone {
  width: 210px; height: 210px; border-radius: 50%; margin: 18px auto 8px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--preg) 70%, #fff), var(--preg));
  box-shadow: 0 18px 50px color-mix(in srgb, var(--preg) 45%, transparent), inset 0 2px 0 rgba(255, 255, 255, .35);
  font-size: 20px; font-weight: 700; transition: transform .12s var(--ease); user-select: none;
}
.tapzone:active { transform: scale(.94); }
.tapzone.live { background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--period) 70%, #fff), var(--period)); box-shadow: 0 18px 50px color-mix(in srgb, var(--period) 45%, transparent); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; background: var(--fill); aspect-ratio: 3 / 4; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- Bandeaux ---------- */
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 20px; margin-top: 14px; background: var(--bg2); box-shadow: var(--card-shadow); }
.banner .grow { flex: 1; }
.banner.preg { background: var(--preg-soft); }
.banner.warn { background: var(--away-soft); }
.banner.danger { background: var(--danger-soft); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--fill); }
.pill.period { background: var(--period-soft); color: var(--period); }
.pill.fertile { background: var(--fertile-soft); color: var(--fertile); }
.pill.ovu { background: var(--ovu-soft); color: var(--ovu); }
.pill.preg { background: var(--preg-soft); color: var(--preg); }
.pill.away { background: var(--away-soft); color: var(--away); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }


.empty { text-align: center; padding: 34px 20px; color: var(--label2); }
.empty .i { width: 44px; height: 44px; color: var(--label3); margin-bottom: 8px; }

/* ---------- Feuilles modales ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 94dvh;
  border-radius: 34px 34px 0 0; background: var(--bg); color: var(--label); overflow: hidden;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, .25);
}
dialog.sheet[open] { animation: sheet-in .45s var(--ease); display: flex; flex-direction: column; }
dialog.sheet.closing { animation: sheet-out .28s var(--ease) forwards; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .32); animation: fade-in .3s; }
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--label3); margin: 7px auto 0; flex: none; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 6px; flex: none; }
.sheet .sheet-head h2 { font-size: 17px; font-weight: 600; margin: 0; text-align: center; flex: 1; }
.sheet .sheet-body { padding: 6px 16px calc(24px + var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 700px) {
  dialog.sheet { margin: auto; width: 560px; border-radius: 34px; max-height: 88dvh; }
  dialog.sheet[open] { animation: pop-in .35s var(--ease); }
  .sheet .grabber { display: none; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes pop-in { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } }

.toast {
  position: fixed; z-index: 100; left: 50%; top: calc(var(--safe-t) + 12px); transform: translate(-50%, -140%);
  padding: 12px 20px; border-radius: 999px; background: var(--glass-strong); color: var(--label); font-weight: 600; font-size: 15px;
  border: .5px solid var(--glass-edge); box-shadow: var(--glass-shadow); display: flex; gap: 8px; align-items: center;
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  transition: transform .45s var(--ease), visibility 0s .45s; max-width: calc(100vw - 32px); visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease); }

.tip {
  position: fixed; z-index: 120; max-width: 260px; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.35;
  background: var(--glass-strong); color: var(--label); border: .5px solid var(--glass-edge); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .15s, transform .2s var(--ease);
}
.tip.show { opacity: 1; transform: none; }
.info-btn { color: var(--label3); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.info-btn .i { width: 18px; height: 18px; }

.fade { animation: fade-up .45s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(60% 50% at 20% 10%, color-mix(in srgb, var(--period) 22%, transparent), transparent),
  radial-gradient(50% 45% at 85% 30%, color-mix(in srgb, var(--fertile) 22%, transparent), transparent),
  radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--preg) 20%, transparent), transparent), var(--bg); }
.login form { width: min(100%, 380px); padding: 34px 26px 26px; border-radius: 34px; background: var(--glass); border: .5px solid var(--glass-edge);
  box-shadow: var(--glass-shadow); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); text-align: center; }
.login .mark { width: 72px; height: 72px; margin: 0 auto 14px; display: block; }
.login h1 { margin: 0 0 22px; font-size: 28px; font-weight: 700; }
.login input { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--fill); padding: 0 16px; font-size: 17px; text-align: center; }
.login input + label + input { margin-top: 10px; }
.login .btn { margin-top: 12px; }
.login .msg { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: 15px; }

/* Compléments */
.quick a { text-decoration: none; color: var(--label); display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 4px 12px; border-radius: 20px; background: var(--bg2); font-size: 12px; font-weight: 600; box-shadow: var(--card-shadow); text-align: center; }
.quick a .qbtn { display: contents; }
.icon-btn.spin .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1000px) { .back-mobile { display: none; } }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .i:last-child { transform: rotate(180deg); }
.week .mk-high .dn, .week .mk-fertile .dn, .week .mk-ovu .dn { font-weight: 700; }
.mile > button.grow { color: inherit; }
@media (min-width: 700px) { .day { aspect-ratio: auto; height: 68px; } }
.bars .b { flex: 1 1 0; min-width: 24px; max-width: 56px; }
.bars .b .lab { font-size: 9px; }
.chart { max-width: 620px; margin-left: auto; margin-right: auto; }
.check .i { opacity: 0; transition: opacity .15s; }
.check[aria-checked="true"] .i { opacity: 1; }
