/* ============ HUB — socle visuel commun à tous les modules ============
   Mêmes jetons que BLOC (thème sombre, typo athlétique) pour que passer d'un module à
   l'autre ne change pas d'univers. Un module ne redéfinit pas ces jetons : il les utilise. */
:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232322;
  --surface-3: #2c2c2a;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #9a9a9a;
  --line: #2c2c2a;
  --accent: #d95926;
  --good: #2ecc71;
  --warning: #f5a524;
  --critical: #e5484d;
  --c-sport: #d95926;
  --c-nutrition: #2ecc71;
  --c-glowup: #b48cff;
  --c-loisirs: #3987e5;
  --radius: 12px;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }

/* ---- structure ---- */
.hub-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(13,13,13,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hub-header .brand { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: 1px; line-height: 1; }
.hub-header .brand small { display: block; font: 600 10px/1.2 var(--font-ui); letter-spacing: 2px; color: var(--muted); margin-top: 2px; text-transform: uppercase; }
.hub-header .retour { font-size: 14px; color: var(--muted); padding: 8px 10px 8px 0; }
.hub-header .spacer { flex: 1; }
.hub-header .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.hub-header .dot.ok { background: var(--good); }
.hub-header .dot.err { background: var(--critical); }
.hub-header .dot.pending { background: var(--warning); }
.vue { max-width: 680px; margin: 0 auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }

/* ---- composants ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; margin-bottom: 12px; }
h1.titre { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: .5px; }
.sur-titre { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
h2.section { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip.good { color: var(--good); border-color: rgba(46,204,113,.5); }
.chip.warn { color: var(--warning); border-color: rgba(245,165,36,.5); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.btn.block { width: 100%; }
.mini-btn { min-width: 40px; min-height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- liste cochable (routines) ---- */
.coche-liste { display: flex; flex-direction: column; gap: 6px; }
.coche { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; color: var(--ink); }
.coche .case { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: transparent; }
.coche .txt { flex: 1; min-width: 0; font-size: 15px; }
.coche .txt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.coche.on { border-color: rgba(46,204,113,.55); }
.coche.on .case { background: var(--good); border-color: var(--good); color: #0d0d0d; }
.coche.on .txt { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(154,154,154,.6); }
.coche.on .txt small { text-decoration: none; }
.coche.off-jour { opacity: .55; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.progress.good > i { background: var(--good); }

/* ---- onglets d'un module ---- */
.onglets { display: flex; gap: 6px; margin: 4px 0 14px; }
.onglets button { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; }
.onglets button.active { color: var(--ink); border-color: var(--accent); background: rgba(217,89,38,.12); }

/* ---- tableaux de fiches ---- */
table.fiche { width: 100%; border-collapse: collapse; font-size: 14px; }
table.fiche th, table.fiche td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fiche th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.regle { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.regle:last-child { border-bottom: 0; }
.regle .puce { color: var(--accent); font-weight: 700; }
#toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: #1f1f1e; border: 1px solid var(--line); border-left: 3px solid var(--good); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-size: 14px; max-width: 92vw; }
.toast.warn { border-left-color: var(--warning); }
.toast.err { border-left-color: var(--critical); }

/* couleurs des mouvements de BLOC, utilisées par les types de blocs du planning (routine = squat, loisir = terre) */
:root { --c-squat: #3987e5; --c-bench: #d95926; --c-terre: #199e70; }
