/* Tempo — thème sombre inspiré des apps Apple (iOS). Mobile d'abord, même sur ordinateur. */
:root {
  --bg: #000;
  --bg-2: #0b0b0d;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --card-3: #3a3a3c;
  --sep: rgba(84, 84, 88, .6);
  --label: #fff;
  --label-2: rgba(235, 235, 245, .62);
  --label-3: rgba(235, 235, 245, .32);
  --label-4: rgba(235, 235, 245, .16);
  --accent: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;

  /* Couleurs Tempo (palette « Classique ») */
  --blue: #0a84ff;  --blue-hi: #5eb1ff; --blue-lo: #0047d6; --blue-glow: rgba(10, 132, 255, .45); --blue-ink: #fff;
  --white: #f2f2f7; --white-hi: #ffffff; --white-lo: #b8bfcc; --white-glow: rgba(255, 255, 255, .32); --white-ink: #111;
  --red: #ff453a;   --red-hi: #ff8a7a;  --red-lo: #c4001d;  --red-glow: rgba(255, 69, 58, .5);   --red-ink: #fff;

  --radius: 22px;
  --radius-s: 14px;
  --pad: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
html[data-palette="doux"] {
  --blue: #6aa8ff;  --blue-hi: #a9cdff; --blue-lo: #3d6fd1; --blue-glow: rgba(106, 168, 255, .35);
  --white: #ece9e2; --white-hi: #fbf9f4; --white-lo: #bdb6a8; --white-glow: rgba(250, 245, 230, .25);
  --red: #ff7a6e;   --red-hi: #ffb1a6;  --red-lo: #d2453e;  --red-glow: rgba(255, 122, 110, .38);
}
html[data-palette="neon"] {
  --blue: #2e6bff;  --blue-hi: #00e0ff; --blue-lo: #3a00ff; --blue-glow: rgba(0, 200, 255, .55);
  --white: #e9f6ff; --white-hi: #ffffff; --white-lo: #8fb4ff; --white-glow: rgba(160, 220, 255, .5);
  --red: #ff2d55;   --red-hi: #ff7a00;  --red-lo: #d4004f;  --red-glow: rgba(255, 45, 85, .6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--label);
  font-family: var(--font); font-size: 17px; line-height: 1.35; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* Ordinateur : la colonne reste au format téléphone */
.app { position: relative; max-width: 440px; margin: 0 auto; min-height: 100dvh; background: var(--bg); overflow-x: clip; }
@media (min-width: 600px) {
  body { background: radial-gradient(1200px 700px at 50% -10%, #101522 0%, #000 60%) fixed; }
  .app { margin: 28px auto; min-height: calc(100dvh - 56px); border-radius: 44px; box-shadow: 0 0 0 1px #1d1d20, 0 40px 120px rgba(0, 0, 0, .8); overflow: hidden; }
  .tabbar { bottom: 28px; border-radius: 0 0 44px 44px; }
  .toast { bottom: 124px; }
}

.view { padding: calc(var(--safe-t) + 8px) var(--pad) calc(96px + var(--safe-b)); }
.view.enter { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* En-tête « grand titre » iOS */
.large-title { padding: 34px 4px 14px; }
.large-title h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: .01em; }
.large-title p { margin: 4px 0 0; color: var(--label-2); font-size: 15px; }
.large-title p::first-letter, .sheet h2::first-letter, .month h3 span::first-letter { text-transform: uppercase; }
.large-title .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }

.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 4px 10px; }
.section-h h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .005em; }
.section-h .aside { color: var(--label-2); font-size: 15px; }
.caption { color: var(--label-2); font-size: 13px; line-height: 1.4; margin: 8px 4px 0; }
.caption a { color: var(--label-2); text-decoration: underline; text-underline-offset: 2px; }

.card { background: var(--card); border-radius: var(--radius); padding: var(--pad); }
.card + .card { margin-top: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--label-2); }
.tnum { font-variant-numeric: tabular-nums; }

/* Pastille de couleur */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; flex: none; }
.c-BLUE { --c: var(--blue); --c-hi: var(--blue-hi); --c-lo: var(--blue-lo); --c-glow: var(--blue-glow); --c-ink: var(--blue-ink); }
.c-WHITE { --c: var(--white); --c-hi: var(--white-hi); --c-lo: var(--white-lo); --c-glow: var(--white-glow); --c-ink: var(--white-ink); }
.c-RED { --c: var(--red); --c-hi: var(--red-hi); --c-lo: var(--red-lo); --c-glow: var(--red-glow); --c-ink: var(--red-ink); }
.c-NONE { --c: var(--card-3); --c-hi: #48484a; --c-lo: #2c2c2e; --c-glow: transparent; --c-ink: var(--label-2); }
.dot { background: var(--c); }

/* ——— Carte héros « Aujourd'hui » ——— */
.hero {
  position: relative; overflow: hidden; border-radius: 30px; padding: 22px 22px 20px; min-height: 270px;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--c-hi) 55%, transparent) 0%, transparent 55%),
    linear-gradient(160deg, color-mix(in oklab, var(--c) 92%, #000) 0%, color-mix(in oklab, var(--c-lo) 85%, #000) 100%);
  color: var(--c-ink);
  box-shadow: 0 24px 60px -18px var(--c-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
  isolation: isolate;
}
.hero::after { /* grain très léger */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.6'/></svg>");
}
.hero .orb {
  position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%);
  filter: blur(2px); animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08) translate(-6px, 6px); opacity: .85; } }
.hero .eyebrow { color: color-mix(in oklab, var(--c-ink) 70%, transparent); }
.hero .big { font-family: var(--font-round); font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 6px; }
.hero .sub { font-size: 17px; opacity: .85; }
.hero .price { margin-top: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hero .price > div { white-space: nowrap; }
.hero .price .v { font-family: var(--font-round); font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.hero .price .u { font-size: 15px; opacity: .8; margin-left: 4px; font-weight: 500; }
.hero .chip { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: color-mix(in oklab, var(--c-ink) 14%, transparent); backdrop-filter: blur(8px); white-space: nowrap; }
.dayline { margin-top: 18px; }
.dayline .track { position: relative; height: 8px; border-radius: 4px; background: color-mix(in oklab, var(--c-ink) 16%, transparent); overflow: hidden; }
.dayline .hc { position: absolute; top: 0; bottom: 0; background: color-mix(in oklab, var(--c-ink) 14%, transparent); }
.dayline .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in oklab, var(--c-ink) 78%, transparent); }
.dayline .ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; font-weight: 600; opacity: .7; }
.hero.pending { --c: #2c2c2e; --c-hi: #3a3a3c; --c-lo: #1c1c1e; --c-ink: #fff; --c-glow: transparent; }

/* ——— Demain ——— */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px; background: var(--card); min-height: 150px; display: flex; flex-direction: column; text-align: left; width: 100%; }
.tile .label { font-family: var(--font-round); font-size: 30px; font-weight: 700; margin-top: auto; line-height: 1.05; }
.tile .meta { font-size: 13px; color: var(--label-2); margin-top: 4px; }
.tile.colored { background: linear-gradient(160deg, color-mix(in oklab, var(--c) 88%, #000), color-mix(in oklab, var(--c-lo) 80%, #000)); color: var(--c-ink); box-shadow: 0 16px 40px -20px var(--c-glow); }
.tile.colored .meta, .tile.colored .eyebrow { color: color-mix(in oklab, var(--c-ink) 72%, transparent); }
.tile.forecast { background: var(--card); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 55%, transparent); }
.tile.forecast .label { color: var(--c); }
.tile.forecast.c-WHITE .label { color: var(--white); }
.tile .pill-orb { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--c-hi), var(--c) 55%, var(--c-lo)); box-shadow: 0 0 22px var(--c-glow); }
.tile.forecast .pill-orb { background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--card-3) 0); box-shadow: none; -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); }
.shimmer { background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%); background-size: 300% 100%; animation: sh 2.4s linear infinite; }
@keyframes sh { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ——— Prochains jours ——— */
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.daycard { scroll-snap-align: start; flex: 0 0 76px; background: var(--card); border-radius: 18px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.daycard .wd { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: capitalize; }
.daycard .dn { font-size: 13px; color: var(--label-3); margin-top: -6px; }
.daycard .ring { width: 40px; height: 40px; border-radius: 50%; position: relative; }
.daycard .ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--card-3) 0); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.daycard .ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--c-hi), var(--c) 60%, var(--c-lo)); opacity: calc(.35 + var(--p) / 160); }
.daycard .ring.sure { background: radial-gradient(circle at 35% 30%, var(--c-hi), var(--c) 55%, var(--c-lo)); box-shadow: 0 0 16px -2px var(--c-glow); }
.daycard .ring.sure::after, .daycard .ring.sure::before { display: none; }
.daycard .pct { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.daycard .lbl { font-size: 12px; color: var(--label-2); margin-top: -6px; }
.bars3 { display: flex; width: 100%; height: 4px; border-radius: 2px; overflow: hidden; gap: 1px; background: var(--card-2); }
.bars3 i { display: block; height: 100%; }
.bars3 .b { background: var(--blue); } .bars3 .w { background: var(--white); } .bars3 .r { background: var(--red); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 4px 9px; border-radius: 999px; background: var(--card-2); }
.badge.warn { color: var(--orange); background: color-mix(in oklab, var(--orange) 16%, transparent); }
.badge.red { color: var(--red); background: color-mix(in oklab, var(--red) 16%, transparent); }

/* ——— Anneaux de saison ——— */
.rings-card { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.rings svg { width: 132px; height: 132px; display: block; transform: rotate(-90deg); }
.rings .track { fill: none; stroke-width: 15; opacity: .22; }
.rings .prog { fill: none; stroke-width: 15; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.legend-rows { display: grid; gap: 12px; }
.legend-row { display: block; }
.legend-row .n { display: block; font-family: var(--font-round); font-size: 24px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend-row .n small { font-size: 15px; color: var(--label-3); font-weight: 600; }
.legend-row .t { display: block; font-size: 13px; color: var(--label-2); margin: 1px 0 0 15px; }
.legend-row .dot { width: 9px; height: 9px; margin-right: 6px; position: relative; top: -2px; }
.win { margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--sep); }
.win .bar { position: relative; height: 6px; border-radius: 3px; background: var(--card-2); margin: 8px 0 6px; overflow: hidden; }
.win .bar .w { position: absolute; top: 0; bottom: 0; background: color-mix(in oklab, var(--red) 40%, transparent); }
.win .bar .now { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--label); border-radius: 1px; }
.win .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--label-3); }

/* ——— Grille tarifaire ——— */
.prices { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0; }
.prices > div { padding: 11px 6px; border-top: .5px solid var(--sep); font-variant-numeric: tabular-nums; }
.prices > .h { border-top: 0; font-size: 12px; font-weight: 600; color: var(--label-2); letter-spacing: .04em; text-transform: uppercase; }
.prices .k { display: flex; align-items: center; gap: 8px; font-weight: 500; padding-left: 0; }
.prices .v { text-align: right; }
.prices .v.on { color: var(--label); font-weight: 700; }
.prices .v.on::before { content: "●"; color: var(--green); font-size: 9px; margin-right: 6px; vertical-align: 2px; }
.prices .v:not(.on) { color: var(--label-2); }

/* ——— Listes groupées (Réglages) ——— */
.group { background: var(--card); border-radius: var(--radius-s); overflow: hidden; }
.group + .caption { margin-bottom: 4px; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; position: relative; width: 100%; text-align: left; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
a.cell { color: var(--label); }
.cell .grow { flex: 1; min-width: 0; }
.cell .sub { font-size: 13px; color: var(--label-2); margin-top: 1px; overflow-wrap: anywhere; }
.cell .val { color: var(--label-2); font-size: 15px; }
.cell .chev { color: var(--label-3); font-size: 20px; line-height: 1; }
.cell .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 16px; }
.cell input[type="email"], .cell input[inputmode="numeric"] {
  flex: 1; min-width: 0; background: none; border: 0; color: var(--label); font: inherit; padding: 6px 0; outline: none;
}
.cell input::placeholder { color: var(--label-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 600; width: 100%; }
.btn.secondary { background: var(--card-2); color: var(--label); }
.btn.danger { background: none; color: var(--red); height: 44px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.small { height: 32px; width: auto; padding: 0 12px; border-radius: 999px; font-size: 14px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 100%; height: 100%; border-radius: 16px; background: var(--card-3); cursor: pointer; transition: background .25s; }
.switch input:checked { background: var(--green); }
.switch input::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, .3); transition: transform .3s var(--ease); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .4; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card-2); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { height: 30px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.seg button[aria-pressed="true"] { background: var(--card-3); color: var(--label); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.palette-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.palette-pick button { background: var(--card); border-radius: 16px; padding: 12px 10px 10px; display: grid; gap: 8px; justify-items: center; box-shadow: inset 0 0 0 1.5px transparent; }
.palette-pick button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.palette-pick .sw { display: flex; gap: 4px; }
.palette-pick .sw i { width: 18px; height: 18px; border-radius: 50%; }
.palette-pick span { font-size: 13px; font-weight: 600; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* ——— Calendrier de saison ——— */
.cal-head { position: sticky; top: 0; z-index: 5; margin: 0 calc(-1 * var(--pad)); padding: calc(var(--safe-t) + 8px) var(--pad) 10px; background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--card); }
.stackbar i { display: block; height: 100%; }
.stackbar .rest { background: var(--card-2); flex: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--label-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sq { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.legend .sq.fc { background: transparent; box-shadow: inset 0 0 0 1.5px var(--label-2); border-radius: 4px; }
.month { margin-top: 18px; }
.month h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; font-size: 17px; font-weight: 600; }
.month h3 span { display: inline-block; }
.month h3 small { font-size: 12px; font-weight: 600; color: var(--label-3); text-transform: none; }
.month.redwin h3 small { color: color-mix(in oklab, var(--red) 80%, var(--label-2)); }
.month .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.month .wdh { font-size: 11px; font-weight: 600; color: var(--label-3); text-align: center; padding-bottom: 2px; }
.cell-d {
  aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center; position: relative;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--card); color: var(--label-3);
}
.cell-d.o { background: radial-gradient(circle at 30% 25%, color-mix(in oklab, var(--c-hi) 60%, var(--c)), var(--c) 55%, var(--c-lo)); color: var(--c-ink); }
.cell-d.o.c-BLUE { background: color-mix(in oklab, var(--blue) 34%, var(--card)); color: color-mix(in oklab, var(--blue-hi) 70%, #fff); }
.cell-d.f { background: color-mix(in oklab, var(--c) calc(var(--p) * .38%), var(--card)); color: var(--label); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 75%, transparent); }
.cell-d.t { color: var(--label-3); }
.cell-d.t::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: calc(var(--r) * 2.2); }
.cell-d.t.tw::after { background: var(--white); opacity: calc(var(--w) * 1.4); }
.cell-d.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--label); }
.cell-d.hol::before { content: ""; position: absolute; top: 5px; right: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.cell-d.empty { background: none; }
.cell-d:is(button) { cursor: pointer; }
.cell-d:is(button):active { transform: scale(.94); }

/* ——— Historique ——— */
.season { margin-top: 12px; }
.season .top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.season .top h3 { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.season .top .counts { display: flex; gap: 10px; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.season .top .counts b { color: var(--label); font-weight: 600; }
.barcode { display: grid; grid-template-columns: 18px repeat(31, minmax(0, 1fr)); gap: 2px; }
.barcode .m { font-size: 9px; font-weight: 600; color: var(--label-3); line-height: 1; align-self: center; text-transform: uppercase; }
.barcode i { aspect-ratio: 1; border-radius: 2px; background: var(--card-2); display: block; }
.barcode i.B { background: color-mix(in oklab, var(--blue) 30%, var(--card)); }
.barcode i.W { background: var(--white); }
.barcode i.R { background: var(--red); box-shadow: 0 0 6px -1px var(--red-glow); }
.barcode i.x { background: transparent; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.facts .badge b { color: var(--label); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--sep); stroke-width: .5; }
.chart .axis text { fill: var(--label-3); font-size: 10px; font-family: var(--font); }
.chart .old { fill: none; stroke: var(--label-4); stroke-width: 1.2; }
.chart .cur { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--c-glow)); }
.chart .curdot { stroke: var(--bg); stroke-width: 2.5; }
.chart .avg { fill: none; stroke: var(--label-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 120px; }
.mbars .col { display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; }
.mbars .col i { display: block; border-radius: 4px; min-height: 0; }
.mlab { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 6px; font-size: 10px; color: var(--label-3); text-align: center; font-weight: 600; }

/* ——— Feuille (bottom sheet) ——— */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fade .3s ease both; }
.sheet-panel {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 440px; transform: translateX(-50%);
  background: #1c1c1e; border-radius: 22px 22px 0 0; padding: 8px var(--pad) calc(24px + var(--safe-b));
  max-height: 88dvh; overflow-y: auto; animation: up .45s var(--ease) both; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
}
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--card-3); margin: 0 auto 12px; cursor: pointer; }
@keyframes up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } }
.sheet h2 { margin: 6px 0 2px; font-size: 24px; font-weight: 700; }
.sheet h3 { margin: 22px 0 4px; font-size: 17px; font-weight: 700; }
.probrow { display: grid; grid-template-columns: 70px 1fr 44px; gap: 10px; align-items: center; margin: 10px 0; font-size: 15px; }
.probrow .track { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.probrow .track i { display: block; height: 100%; border-radius: 5px; background: var(--c); }
.probrow .pv { text-align: right; font-variant-numeric: tabular-nums; color: var(--label-2); }
.srcline { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: .5px solid var(--sep); font-size: 15px; }
.srcline .grow { flex: 1; }
.srcline .mini { display: flex; width: 90px; height: 6px; border-radius: 3px; overflow: hidden; gap: 1px; }

/* ——— Barre d'onglets ——— */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 440px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + var(--safe-b));
  background: color-mix(in oklab, #161618 78%, transparent); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: .5px solid var(--sep);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: #8e8e93; font-size: 10px; font-weight: 600; letter-spacing: .01em; }
.tabbar svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar svg .f { fill: currentColor; stroke: none; }
.tabbar a[aria-selected="true"] { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60; background: rgba(60, 60, 64, .92); backdrop-filter: blur(20px); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: fade .25s ease both; }

.skeleton { height: 270px; border-radius: 30px; }
.err { padding: 16px; border-radius: var(--radius-s); background: color-mix(in oklab, var(--red) 14%, var(--card)); color: var(--label); font-size: 15px; }
.muted { color: var(--label-2); }
.spacer { height: 8px; }
.prose { font-size: 15px; line-height: 1.5; color: var(--label-2); }
.prose b { color: var(--label); font-weight: 600; }
.prose ul { padding-left: 18px; margin: 8px 0; }
.prose li { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
