/* ───────────────────────── LUMEN ─────────────────────────
   Principe : le contenu est opaque (listes groupées façon iOS),
   le verre est réservé à ce qui flotte au-dessus (onglets, barre de titre, feuilles, alertes). */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.25, .9, .3, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --radius: 20px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --cell: #1c1c1e;
  --cell-2: #2c2c2e;
  --sep: rgba(84, 84, 88, .55);
  --label: #fff;
  --label-2: rgba(235, 235, 245, .62);
  --label-3: rgba(235, 235, 245, .32);
  --fill: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .36);
  --glass: rgba(30, 30, 32, .7);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-hi: rgba(255, 255, 255, .16);
  --shadow: 0 10px 40px rgba(0, 0, 0, .5);

  --accent: #ff9f0a;        /* signature : ambre (XP, actions principales) */
  --accent-ink: #1f1300;    /* texte sur ambre */
  --accent-text: #ffb340;
  --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --mint: #63e6e2;
  --teal: #40c8e0; --blue: #0a84ff; --indigo: #5e5ce6; --pink: #ff375f; --brown: #ac8e68; --gray: #8e8e93;
  --work: #63e6e2; --neutral: #636366; --distraction: #ff375f;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7;
  --cell: #fff;
  --cell-2: #e5e5ea;
  --sep: rgba(60, 60, 67, .2);
  --label: #000;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .32);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --glass: rgba(250, 250, 252, .72);
  --glass-line: rgba(0, 0, 0, .08);
  --glass-hi: rgba(255, 255, 255, .9);
  --shadow: 0 10px 34px rgba(0, 0, 0, .12);

  --accent: #ff9500;
  --accent-ink: #1f1300;
  --accent-text: #c45d00;
  --red: #ff3b30; --orange: #ff9500; --yellow: #ffcc00; --green: #34c759; --mint: #00c7be;
  --teal: #30b0c7; --blue: #007aff; --indigo: #5856d6; --pink: #ff2d55; --brown: #a2845e; --gray: #8e8e93;
  --work: #00b5ad; --neutral: #aeaeb2; --distraction: #ff2d55;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--label); font-family: var(--font);
  font-size: 17px; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { flex: none; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }

.num, .round { font-family: var(--font-round); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ───────── Verre (couche flottante uniquement) ───────── */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  backdrop-filter: blur(22px) saturate(190%);
  border: .5px solid var(--glass-line);
  box-shadow: inset 0 .5px 0 var(--glass-hi), var(--shadow);
}

/* ───────── Structure ───────── */
#app { max-width: 1080px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) 16px calc(var(--safe-b) + 112px); }
@media (min-width: 900px) { #app { padding: 36px 32px 60px 132px; } }

.largetitle { margin: 34px 4px 22px; }
.largetitle .over { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; }
.largetitle h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 0; }
.largetitle .row { align-items: flex-end; }

/* Barre de titre compacte qui apparaît au défilement */
.navbar { position: fixed; z-index: 15; top: 0; left: 0; right: 0; height: calc(var(--safe-t) + 46px); padding-top: var(--safe-t);
  display: grid; place-items: center; font-weight: 600; font-size: 16px; border-width: 0 0 .5px 0; box-shadow: none;
  opacity: 0; pointer-events: none; transition: opacity .2s; border-radius: 0; }
body.scrolled .navbar { opacity: 1; }
@media (min-width: 900px) { .navbar { display: none; } }

.columns { display: grid; gap: 0 28px; }
@media (min-width: 900px) { .columns { grid-template-columns: 1.15fr 1fr; align-items: start; } }

/* Sections groupées */
.section { margin-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 9px; }
.section-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.section-head .aside { font-size: 15px; color: var(--label-2); }
.section-foot { font-size: 13px; line-height: 1.4; color: var(--label-2); margin: 8px 16px 0; }
.group { background: var(--cell); border-radius: var(--radius); overflow: hidden; }
html[data-theme="light"] .group { box-shadow: 0 .5px 0 rgba(0,0,0,.04); }
.pad { padding: 16px; }

.cell { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 16px; width: 100%; text-align: left; }
.cell + .cell::before, .cell + .rule-sep::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: .5px; background: var(--sep); }
button.cell:active, .cell.tap:active { background: var(--fill); }
@media (hover: hover) { button.cell:hover, .cell.tap:hover { background: color-mix(in srgb, var(--fill) 50%, transparent); } }
.cell .title { font-size: 17px; line-height: 1.25; }
.cell .sub { font-size: 14px; color: var(--label-2); margin-top: 2px; line-height: 1.3; }
.cell .value { color: var(--label-2); font-size: 16px; white-space: nowrap; }
.chev { width: 14px; height: 14px; color: var(--label-3); }

/* Icône carrée pleine (façon Réglages) */
.sq { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--c, var(--gray)); flex: none; font-size: 17px; }
.sq svg { width: 19px; height: 19px; }
.sq.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 24px; }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--label-2); }
.faint { color: var(--label-3); }
.small { font-size: 15px; }
.foot { font-size: 13px; }
.empty-cell { padding: 22px 16px; text-align: center; color: var(--label-2); font-size: 15px; line-height: 1.4; }

/* ───────── Boutons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 16px; font-weight: 600; background: var(--fill); color: var(--label); white-space: nowrap; transition: transform .2s var(--spring), opacity .2s; }
.btn:active { transform: scale(.96); opacity: .85; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.tinted { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.btn.destructive { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.textbtn { color: var(--accent-text); font-size: 16px; }
.roundbtn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); flex: none; transition: transform .2s var(--spring); }
.roundbtn:active { transform: scale(.88); }
.roundbtn svg { width: 15px; height: 15px; }
.roundbtn.ok { background: var(--accent); color: var(--accent-ink); }

/* Contrôle segmenté */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 10px; background: var(--fill); }
.seg button { height: 30px; border-radius: 8px; font-size: 14px; font-weight: 500; padding: 0 10px; transition: background .2s; }
.seg button.on { background: var(--cell-2); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
html[data-theme="light"] .seg button.on { background: #fff; }

/* Choix (pastilles) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.choice.on { background: var(--label); color: var(--bg); }
.choice .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.choice.on .dot { box-shadow: 0 0 0 2px var(--bg); }

/* Interrupteur */
.switch { width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); position: relative; transition: background .25s; flex: none; }
.switch::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(--spring); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }

/* ───────── Barre d'onglets (verre) ───────── */
.tabbar { position: fixed; z-index: 20; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translateX(-50%);
  display: flex; padding: 5px; border-radius: 999px; }
.tab { position: relative; z-index: 1; width: 68px; height: 52px; border-radius: 999px; display: grid; place-items: center; align-content: center; gap: 2px;
  color: var(--label); font-size: 10px; font-weight: 600; letter-spacing: 0; transition: color .25s; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent-text); }
.tab-indicator { position: absolute; z-index: 0; top: 5px; left: 5px; width: 68px; height: 52px; border-radius: 999px; background: var(--fill);
  transition: transform .45s var(--spring); }
@media (max-width: 380px) { .tab, .tab-indicator { width: 62px; } }
@media (min-width: 900px) {
  .tabbar { left: 28px; top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; }
}

/* ───────── Résumé du jour (anneaux) ───────── */
.summary { display: flex; align-items: center; gap: 20px; padding: 18px 18px 16px; }
.rings { width: 118px; height: 118px; flex: none; }
.rings svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.legend-list { display: grid; gap: 9px; flex: 1; min-width: 0; }
.legend-item .name { font-size: 14px; font-weight: 600; color: var(--c); }
.legend-item .val { font-family: var(--font-round); font-size: 20px; font-weight: 600; line-height: 1.15; }
.legend-item .val small { font-size: 14px; color: var(--label-2); font-weight: 500; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: .5px solid var(--sep); }
.stats3 > div { padding: 12px 16px 14px; }
.stats3 > div + div { border-left: .5px solid var(--sep); }
.stats3 .k { font-size: 13px; color: var(--label-2); }
.stats3 .v { font-family: var(--font-round); font-size: 22px; font-weight: 600; margin-top: 2px; }

/* Niveau */
.level { display: flex; align-items: center; gap: 16px; padding: 16px; }
.level-num { font-family: var(--font-round); font-size: 44px; font-weight: 700; line-height: 1; min-width: 44px; text-align: center; }
.level-k { font-size: 12px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.bar { height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--accent)); transition: width .8s var(--ease); }
.bar.thick { height: 10px; }
.stackbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--fill); }
.stackbar > i { height: 100%; }

/* ───────── Tâches (façon Rappels) ───────── */
.task { --inset: 56px; cursor: pointer; align-items: flex-start; }
.task .check { margin-top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--label-3); display: grid; place-items: center; flex: none;
  transition: transform .3s var(--spring), background .2s, border-color .2s; }
.task .check svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.3); transition: all .3s var(--spring); }
.task .check:active { transform: scale(.8); }
.task:not(.done) .check { border-color: color-mix(in srgb, var(--c) 75%, var(--label-3)); }
.task.done .check { background: var(--c); border-color: var(--c); }
.task.done .check svg { opacity: 1; transform: scale(1); }
.task.done .title { color: var(--label-2); }
.task .meta { font-size: 14px; color: var(--label-2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 0 6px; }
.task .meta .proj { color: var(--c); font-weight: 500; }
.task .meta > span + span::before { content: "·"; margin-right: 6px; color: var(--label-3); font-weight: 400; }
.task.late .meta .when { color: var(--red); }
.task .xp { font-family: var(--font-round); font-size: 14px; font-weight: 600; color: var(--accent-text); padding-top: 2px; white-space: nowrap; }
.task.done .xp { color: var(--label-3); }
.task .actions { display: flex; gap: 8px; align-self: center; }
.addcell { color: var(--accent-text); --inset: 56px; }
.addcell .plus { width: 24px; height: 24px; display: grid; place-items: center; }
.addcell .plus svg { width: 22px; height: 22px; }

/* ───────── Planning ───────── */
.week { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin: -6px 0 22px; }
.wd { display: grid; justify-items: center; gap: 6px; padding: 4px 0; }
.wd .l { font-size: 12px; font-weight: 600; color: var(--label-2); text-transform: uppercase; }
.wd .n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-round); font-size: 19px; font-weight: 500; transition: background .2s; }
.wd.today .n { color: var(--accent-text); font-weight: 700; }
.wd.on .n { background: var(--label); color: var(--bg); font-weight: 700; }
.wd .d { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.wd.has .d { background: var(--label-3); }

.timeline { position: relative; margin: 6px 12px 12px 58px; }
.tl-h { position: absolute; left: -46px; right: 0; height: 0; border-top: .5px solid var(--sep); }
.tl-h span { position: absolute; top: -8px; left: 0; font-family: var(--font-round); font-size: 12px; color: var(--label-2); }
.tl-ev { position: absolute; left: 2px; right: 0; border-radius: 7px; padding: 4px 8px 4px 10px; overflow: hidden; font-size: 13px; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 22%, var(--cell)); cursor: pointer; }
.tl-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.tl-ev b { font-weight: 600; color: color-mix(in srgb, var(--c) 55%, var(--label)); }
.tl-ev .t { font-family: var(--font-round); font-size: 12px; color: var(--label-2); }
.tl-ev.busy { --c: var(--gray); cursor: default; background: repeating-linear-gradient(135deg, var(--fill) 0 5px, transparent 5px 10px); }
.tl-ev.busy b { color: var(--label-2); }
.tl-ev.proposed { background: transparent; outline: 1.5px dashed color-mix(in srgb, var(--c) 70%, transparent); outline-offset: -1.5px; }
.tl-ev.done { opacity: .45; }
.tl-now { position: absolute; left: -8px; right: 0; height: 1.5px; background: var(--red); z-index: 2; }
.tl-now::before { content: ""; position: absolute; left: -3px; top: -3.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ───────── Projets ───────── */
.proj-head { display: flex; align-items: center; gap: 14px; padding: 16px; }
.proj-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.goal-cell { display: block; padding: 13px 16px; }
.goal-cell .row { margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-top: .5px solid var(--sep); }
.kpis > div { padding: 11px 16px 13px; }
.kpis > div + div { border-left: .5px solid var(--sep); }
.kpis .k { font-size: 12px; color: var(--label-2); }
.kpis .v { font-family: var(--font-round); font-size: 19px; font-weight: 600; margin-top: 1px; }
.projects { display: grid; gap: 0 28px; }
@media (min-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }

/* ───────── Temps d'écran ───────── */
.big { font-family: var(--font-round); font-size: 40px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: end; height: 150px; margin: 8px 0 2px; position: relative; }
.chart .c { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 7px; }
.chart .s { width: 100%; max-width: 28px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 3px 3px; overflow: hidden; gap: 1.5px; min-height: 3px; }
.chart .s i { display: block; width: 100%; }
.chart .lab { font-size: 12px; color: var(--label-2); font-weight: 500; }
.chart .lab.on { color: var(--label); font-weight: 700; }
.chart .quota-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--label-3); }
.chart .quota-line span { position: absolute; right: 0; top: -17px; font-size: 11px; color: var(--label-2); }
.keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--label-2); margin-top: 12px; }
.keys span { display: inline-flex; align-items: center; gap: 6px; }
.keys i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.usage { --inset: 58px; }
.usage .mono { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--c); flex: none; }
.usage .ubar { height: 4px; border-radius: 999px; margin-top: 6px; background: var(--fill); overflow: hidden; }
.usage .ubar i { display: block; height: 100%; background: var(--c); border-radius: inherit; }

/* ───────── Focus & PC ───────── */
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.status-dot.off { background: var(--label-3); box-shadow: none; }
.status-dot.idle { background: var(--yellow); box-shadow: none; }
.focus-active .title { color: var(--accent-text); font-weight: 600; }
.countdown { font-family: var(--font-round); font-size: 34px; font-weight: 700; line-height: 1; }

/* ───────── Badges ───────── */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 18px 8px; padding: 18px 12px; }
.medal { text-align: center; }
.medal .disc { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: inset 0 0 0 3px color-mix(in srgb, #fff 25%, transparent), 0 6px 16px -6px var(--c); }
.medal .disc svg { width: 26px; height: 26px; }
.medal .n { font-size: 13px; font-weight: 600; margin-top: 8px; line-height: 1.2; }
.medal .d { font-size: 11.5px; color: var(--label-2); margin-top: 2px; line-height: 1.25; }
.medal.locked .disc { background: var(--fill); color: var(--label-3); box-shadow: none; }
.medal.locked .n { color: var(--label-2); }

/* ───────── Formulaires ───────── */
.form-group { margin-bottom: 22px; }
.form-label { font-size: 13px; color: var(--label-2); margin: 0 16px 7px; text-transform: uppercase; letter-spacing: .02em; }
.input { width: 100%; height: 50px; padding: 0 16px; border: 0; background: transparent; outline: none; font-size: 17px; }
.input::placeholder { color: var(--label-3); }
.group > .input + .input, .group > .input + .cell { border-top: .5px solid var(--sep); }
textarea.input { height: 90px; padding: 14px 16px; resize: none; display: block; }
select.input, .cell select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: none; color: var(--label-2); text-align: right; font-size: 17px; cursor: pointer; }
.cell select { max-width: 55%; }
.cell input[type="time"], .cell input[type="date"], .cell input[type="number"] { background: var(--fill); border: 0; border-radius: 8px; height: 34px; padding: 0 10px; font-size: 16px; outline: none; font-family: var(--font-round); }
.cell input[type="number"] { width: 90px; text-align: right; }
.field-error { color: var(--red); font-size: 13px; margin: 7px 16px 0; }
.group.invalid { box-shadow: inset 0 0 0 1.5px var(--red); }
.code { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 13px; color: var(--label-2); word-break: break-all; user-select: all; }

/* ───────── Feuille modale (verre) ───────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); animation: fade .25s var(--ease) both; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 93vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px calc(var(--safe-b) + 24px); border-radius: 30px 30px 0 0; animation: up .45s var(--spring) both;
  background: color-mix(in srgb, var(--bg) 82%, transparent); }
.sheet .grabber { width: 36px; height: 5px; border-radius: 999px; background: var(--fill-2); margin: 0 auto 6px; }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 48px; margin-bottom: 10px; }
.sheet-bar .t { font-weight: 600; font-size: 17px; text-align: center; }
.sheet-bar .l { justify-self: start; } .sheet-bar .r { justify-self: end; }
.sheet .group { background: var(--cell); }
.sheet.closing { animation: down .28s var(--ease) both; }
.scrim.closing { animation: fade .28s var(--ease) reverse both; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: 520px; max-height: 86vh; border-radius: 30px; padding: 10px 22px 24px;
    animation: pop .35s var(--spring) both; transform: translate(-50%, -50%); }
  .sheet .grabber { display: none; }
  .sheet.closing { animation: popout .2s var(--ease) both; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.96); } }
@keyframes popout { to { opacity: 0; transform: translate(-50%, -49%) scale(.97); } }

/* Alerte (confirmation) */
.alert { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 280px; border-radius: 22px; overflow: hidden;
  text-align: center; animation: alertIn .3s var(--spring) both; background: color-mix(in srgb, var(--cell) 75%, transparent); }
.alert .body { padding: 20px 18px 16px; }
.alert h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.alert p { font-size: 13.5px; margin: 0; color: var(--label-2); line-height: 1.35; }
.alert .btns { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--sep); }
.alert .btns button { height: 46px; font-size: 17px; color: var(--accent-text); }
.alert .btns button + button { border-left: .5px solid var(--sep); font-weight: 600; }
.alert .btns .danger { color: var(--red); }
@keyframes alertIn { from { opacity: 0; transform: translate(-50%, -50%) scale(1.12); } }

/* Toast (HUD) */
#toast-root { position: fixed; z-index: 60; top: calc(var(--safe-t) + 10px); left: 0; right: 0; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast.glass { background: color-mix(in srgb, var(--cell) 90%, transparent); }
.toast { padding: 11px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; max-width: 92vw; animation: tIn .45s var(--spring) both; display: flex; gap: 8px; align-items: center; }
.toast b { font-family: var(--font-round); color: var(--accent-text); }
.toast.err b, .toast.err { color: var(--red); }
.toast.out { animation: tOut .3s var(--ease) both; }
@keyframes tIn { from { opacity: 0; transform: translateY(-16px) scale(.94); } }
@keyframes tOut { to { opacity: 0; transform: translateY(-10px); } }
.xp-float { position: fixed; z-index: 70; pointer-events: none; font-family: var(--font-round); font-weight: 700; font-size: 17px; color: var(--accent-text);
  animation: xpUp 1s var(--ease) forwards; }
@keyframes xpUp { 0% { opacity: 0; transform: translate(-50%, 4px); } 25% { opacity: 1; transform: translate(-50%, -10px); } 100% { opacity: 0; transform: translate(-50%, -44px); } }

/* ───────── Squelettes de chargement ───────── */
.sk { background: var(--fill); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--label) 7%, transparent), transparent); animation: sk 1.3s infinite; }
@keyframes sk { to { transform: translateX(100%); } }
.sk-line { height: 13px; margin: 6px 0; }
.sk-title { height: 30px; width: 55%; margin: 34px 4px 24px; border-radius: 10px; }
.sk-group { height: 160px; border-radius: var(--radius); margin-bottom: 30px; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.sk-row .sk-c { width: 24px; height: 24px; border-radius: 50%; }

/* ───────── Connexion & marque ───────── */
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.wordmark .hy { color: var(--accent); }
.auth { max-width: 400px; margin: 12vh auto 0; }
.auth .mark { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 18px; display: block; }
.auth .wordmark { font-size: 28px; text-align: center; }
.auth .lead { text-align: center; color: var(--label-2); margin: 8px 16px 28px; font-size: 16px; line-height: 1.4; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; font-size: 15px; line-height: 1.4; color: var(--label-2); }
.notice b { color: var(--label); font-weight: 600; }
