/* Palette « noir et bleu » / « blanc et bleu ».
   Le bleu électrique (confiance, énergie sportive) est réservé à ce qui compte : l'action principale de
   chaque écran, la progression, les muscles travaillés. Tout le reste est neutre, pour que l'œil y aille
   directement (effet d'isolement). Le rouge est réservé aux douleurs et aux alertes. */
:root {
  --bg: #070b14;
  --surface: #0f1624;
  --surface-2: #172033;
  --line: #24314a;
  --text: #eef3fb;
  --muted: #8b98ae;
  --accent: #2f80ff;
  --accent-strong: #5b9dff;
  --accent-soft: rgba(47, 128, 255, .16);
  --accent-ink: #ffffff;
  --danger: #ff5a5f;
  --danger-soft: rgba(255, 90, 95, .14);
  --warn: #ffb020;
  --ok: #4f9dff;
  --muscle-off: #1e2a3e;
  --danger-line: #7a2a31;
  --figure: #eef3fb;
  --radius: 14px;
  color-scheme: dark;
}
/* Thème clair (Réglages > Affichage) */
:root[data-theme="light"] {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #eaf0fa;
  --line: #d6dfec;
  --text: #0b1220;
  --muted: #56637a;
  --accent: #1462e6;
  --accent-strong: #0b4fc2;
  --accent-soft: rgba(20, 98, 230, .10);
  --accent-ink: #ffffff;
  --danger: #d93a3f;
  --danger-soft: rgba(217, 58, 63, .08);
  --warn: #b26a00;
  --ok: #1462e6;
  --muscle-off: #d2dceb;
  --danger-line: #efb3b5;
  --figure: #0b1220;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  min-height: 100vh;
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1;
}
.logo { font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 15px; }
.logo::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 26px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
a { color: var(--accent); }
label { display: block; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
input, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.small { width: 110px; }
/* Action principale : bleu plein, léger halo, c'est là que l'œil va en premier. */
button {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 12px;
  padding: 12px 18px; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 22px -10px var(--accent); transition: transform .12s ease, background .12s ease;
}
button:hover { background: var(--accent-strong); }
button:active { transform: scale(.98); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: wait; box-shadow: none; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 7px 12px; font-size: 14px; font-weight: 600; box-shadow: none; }
button.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
button.ghost.danger { color: var(--danger); }
.status { min-height: 1.5em; margin: 10px 0 0; color: var(--warn); font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row p { margin: 4px 0 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); }
.badge.active { color: var(--accent); }
.badge.demo { color: var(--warn); }
.badge.suspended { color: var(--danger); }
.banner { background: var(--surface-2); border-left: 4px solid var(--warn); padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.banner.danger { border-left-color: var(--danger); }
.qr { display: block; background: #fff; border-radius: 10px; padding: 8px; margin: 12px 0; max-width: 100%; height: auto; }
details { margin-bottom: 12px; color: var(--muted); }
code { word-break: break-all; color: var(--text); }
.inline-form .status { margin-top: 8px; }

/* ---------- Version 1.4 : charte Mona-Coach (marine et rouge du logo) ----------
   Rouge = « à toi d'agir » : l'action principale de chaque écran et les alertes (douleur, gêne).
   Une seule couleur vive par écran : l'œil va droit à ce qu'il faut toucher (effet d'isolement).
   Marine = confiance et données : charges, progression, informations. Le reste est neutre. */
:root {
  --bg: #0b1120;
  --surface: #131b2e;
  --surface-2: #1b2540;
  --line: #2a3654;
  --text: #eef2f9;
  --muted: #8e9ab3;
  --accent: #e0283c;
  --accent-strong: #f04a5c;
  --accent-soft: rgba(224, 40, 60, .16);
  --accent-ink: #ffffff;
  --data: #a9c1f0;
  --data-soft: rgba(169, 193, 240, .14);
  --danger: #ff5a66;
  --danger-soft: rgba(255, 90, 102, .14);
  --danger-line: #7a2a33;
  --ok: #a9c1f0;
  --muscle-off: #222d47;
  --figure: #eef2f9;
}
:root[data-theme="light"] {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --line: #dde2eb;
  --text: #15233d;
  --muted: #5b6478;
  --accent: #cc1126;
  --accent-strong: #a50d1e;
  --accent-soft: rgba(204, 17, 38, .08);
  --accent-ink: #ffffff;
  --data: #1f3f7a;
  --data-soft: rgba(31, 63, 122, .08);
  --danger: #cc1126;
  --danger-soft: rgba(204, 17, 38, .07);
  --danger-line: #f0b7be;
  --ok: #1f3f7a;
  --muscle-off: #d9dfea;
  --figure: #15233d;
}
.logo { display: inline-flex; align-items: center; gap: 8px; text-transform: none; font-size: 19px; letter-spacing: -.01em; }
.logo::before { content: none; }
.logo-mark { display: block; width: 30px; height: 30px; }
.logo-mona { color: var(--text); }
.logo-coach { color: var(--accent); }
/* Logo plus visible sur smartphone */
.logo { font-size: 21px; gap: 10px; }
.logo-mark { width: 40px; height: 40px; }
@media (max-width: 360px) { .logo { font-size: 19px; } .logo-mark { width: 36px; height: 36px; } }
