/* Mise en page : une colonne format téléphone ; chaque série est un disque chargé sur une barre ;
   la récup s'affiche dans un bandeau bleu marine collé en bas. Palette : marine, gris bleuté, vert sapin, blanc, anthracite. */

@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-display: swap; src: url("fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }

:root {
  --navy: #0E196F;
  --slate: #848FA5;
  --teal: #004643;
  --charcoal: #32322C;

  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --ink: #32322C;
  --ink-2: #4F5059;
  --muted: #646E84;
  --line: #DADEE7;
  --brand: #0E196F;
  --brand-ink: #FFFFFF;
  --brand-soft: #E7E9F4;
  --done: #004643;
  --done-soft: #DCEBEA;
  --warn: #9A5800;
  --warn-soft: #F8ECD8;
  --bar-bg: #0E196F;
  --bar-ink: #FFFFFF;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-s: 6px;
  --r-m: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1B18; --surface: #262621; --ink: #F1F1EC; --ink-2: #C5C8D0; --muted: #9CA4B6; --line: #3A3A33;
    --brand: #9AA6F5; --brand-ink: #0E196F; --brand-soft: #23264A;
    --done: #4DB3A9; --done-soft: #17302E; --warn: #E3A54A; --warn-soft: #3A2D16;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1B18; --surface: #262621; --ink: #F1F1EC; --ink-2: #C5C8D0; --muted: #9CA4B6; --line: #3A3A33;
  --brand: #9AA6F5; --brand-ink: #0E196F; --brand-soft: #23264A;
  --done: #4DB3A9; --done-soft: #17302E; --warn: #E3A54A; --warn-soft: #3A2D16;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
a { color: var(--brand); }
[hidden] { display: none !important; }

.logo {
  display: inline-block; flex: none;
  width: 34px; height: 34px;
  background: var(--brand);
  -webkit-mask: url("assets/logo-mask.png") center / contain no-repeat;
  mask: url("assets/logo-mask.png") center / contain no-repeat;
}

/* Barre du haut */
.appbar {
  display: flex; align-items: center; gap: 10px;
  max-width: 480px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 4px;
}
.appbar.wide { max-width: 760px; }
.appbar .spacer { flex: 1; }
.sync { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--done); }
.sync.pending::before { background: var(--slate); }
.sync.offline::before { background: var(--warn); }
.menubtn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink-2); }

.app { max-width: 480px; margin: 0 auto; padding: 0 16px 150px; }
.app.wide { max-width: 760px; }

/* En-têtes */
.top { padding: 14px 0 14px; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.top .kicker { color: var(--muted); font-size: 14px; }
.big-title {
  font-family: var(--display); font-weight: 800;
  font-size: 64px; line-height: .9; letter-spacing: -.5px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.big-title .num { color: var(--brand); }
.sub { color: var(--ink-2); font-size: 15px; }

.backbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.backbtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 6px 4px; color: var(--brand); font-weight: 700; }
.backbtn svg { width: 20px; height: 20px; }
.backbar .count { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.backbar .count small { font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 0 0 4px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 2px; transition: width .25s ease; }

/* Listes de séances et de coachés */
.list { display: grid; gap: 10px; margin-top: 8px; }
.row-card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 14px 14px 14px 12px;
}
.row-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.row-card .n { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; text-align: center; color: var(--slate); }
.row-card.is-done .n { color: var(--done); }
.row-card.is-progress .n { color: var(--brand); }
.row-card .what { min-width: 0; }
.row-card .what b { display: block; font-size: 16px; }
.row-card .what span { display: block; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.initial {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--display); font-weight: 800; font-size: 24px;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.chip.done { background: var(--done-soft); color: var(--done); border-color: transparent; }
.chip.progress { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip svg { width: 14px; height: 14px; }

.note {
  margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-m);
  background: var(--brand-soft); color: var(--ink); font-size: 14px;
}
.note b { display: block; margin-bottom: 2px; }
.note.warn { background: var(--warn-soft); }
.empty-state { text-align: center; padding: 40px 10px; display: grid; gap: 10px; justify-items: center; color: var(--ink-2); }
.empty-state .logo { width: 72px; height: 72px; background: var(--slate); }
.empty-state p { margin: 0; max-width: 34ch; }

/* Exercices (vue coaché) */
.exlist { display: grid; gap: 12px; margin-top: 14px; }
.ex {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 14px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr);
}
.ex.is-current { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.ex-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.ex-head h3 { font-size: 18px; line-height: 1.25; }
.plates { flex: none; display: block; }
.targets { display: flex; flex-wrap: wrap; gap: 6px; }
.cue { margin: 0; color: var(--ink-2); font-size: 15px; border-left: 3px solid var(--slate); padding-left: 10px; white-space: pre-line; }
.vid { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; font-size: 15px; width: fit-content; }
.vid svg { width: 18px; height: 18px; }

.setgrid { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.sethead, .setrow { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 52px; align-items: center; gap: 8px; }
.sethead { font-size: 12px; color: var(--muted); padding: 0 2px; }
.sethead span:nth-child(2), .sethead span:nth-child(3) { text-align: center; }
.setrow .k { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--muted); text-align: center; }
.stepper { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; background: var(--bg); border-radius: var(--r-s); min-height: 52px; }
.stepper button { border: 0; background: transparent; height: 52px; font-size: 22px; line-height: 1; color: var(--ink-2); border-radius: var(--r-s); }
.stepper button:active { background: var(--line); }
.stepper .val { display: grid; justify-items: center; line-height: 1; min-width: 0; }
.stepper input {
  width: 100%; min-width: 0; border: 0; background: transparent; text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 28px; padding: 2px 0; font-variant-numeric: tabular-nums;
}
.stepper input:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.stepper .was { font-size: 11px; color: var(--warn); margin-top: 1px; }
.stepper.static { grid-template-columns: minmax(0, 1fr); text-align: center; }
.stepper.static .big { font-family: var(--display); font-weight: 700; font-size: 26px; }
.stepper.static small { display: block; font-size: 12px; color: var(--muted); }
.check {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); color: var(--muted);
  display: grid; place-items: center;
}
.check svg { width: 26px; height: 26px; }
.setrow.is-next .check { border-color: var(--brand); color: var(--brand); }
.setrow.is-done .check { background: var(--done); border-color: var(--done); color: var(--surface); }
.setrow.is-done .stepper { background: var(--done-soft); }
.setrow.is-done .stepper button { visibility: hidden; }
.play { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--brand); background: var(--surface); color: var(--brand); display: grid; place-items: center; }
.setrow.is-next .play { background: var(--brand); color: var(--brand-ink); }
.play svg { width: 24px; height: 24px; }

.rir { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.rir .lbl { font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rir .lbl button { border: 0; background: transparent; color: var(--brand); padding: 0; font-size: 14px; text-decoration: underline; }
.rir .opts { display: flex; gap: 6px; }
.rir .opts button {
  flex: 1; min-height: 40px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface);
  font-family: var(--display); font-weight: 700; font-size: 20px;
}
.rir .opts button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ex-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ex-done p { margin: 0; color: var(--ink-2); font-size: 14px; }
.linkbtn { border: 0; background: transparent; color: var(--brand); font-weight: 700; padding: 4px 0; justify-self: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; text-align: center;
}
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.block { width: 100%; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }
.finish { margin-top: 18px; }

/* Bandeau de récup */
.restbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--bar-bg); color: var(--bar-ink);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .2s ease;
}
.restbar.on { transform: none; }
.restbar .in { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.restbar .t { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.restbar .t.over { color: #F5C77A; }
.restbar .lbl { font-size: 13px; opacity: .85; }
.restbar .next { grid-column: 1 / -1; font-size: 14px; opacity: .9; }
.restbar .acts { display: flex; gap: 6px; }
.restbar .acts button { min-height: 44px; min-width: 52px; border-radius: var(--r-s); border: 1px solid rgb(255 255 255 / .35); background: transparent; color: var(--bar-ink); font-weight: 700; padding: 0 10px; }
.restbar .acts button.skip { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; }
.restbar .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .2); overflow: hidden; }
.restbar .bar span { display: block; height: 100%; background: #FFFFFF; }

/* Fenêtres */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgb(14 25 111 / .35); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; max-height: 92%; overflow: auto;
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr);
}
.sheet h2 { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; }
.sheet p { margin: 0; color: var(--ink-2); }
.sheet label, .form label { font-weight: 700; font-size: 15px; display: grid; gap: 6px; }
textarea, .input {
  width: 100%; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
.input { min-height: 48px; font-size: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--bg); border-radius: var(--r-s); padding: 10px; display: grid; gap: 2px; }
.tile .v { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.05; }
.tile .l { font-size: 12px; color: var(--muted); }
.tile .d { font-size: 12px; font-weight: 700; }
.tile .d.minus { color: var(--warn); }
.tile .d.plus, .tile .d.eq { color: var(--done); }
.chrono { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 10px 0; }
.chrono .big { font-family: var(--display); font-weight: 800; font-size: 120px; line-height: .9; font-variant-numeric: tabular-nums; color: var(--brand); }
.chrono .side { font-size: 18px; font-weight: 700; }
.btnrow { display: flex; gap: 8px; }
.btnrow .btn { flex: 1; }
.codebox {
  font-family: var(--display); font-weight: 800; font-size: 48px; letter-spacing: 4px; text-align: center;
  background: var(--brand-soft); color: var(--brand); border-radius: var(--r-m); padding: 8px;
}
.msgbox { background: var(--bg); border-radius: var(--r-s); padding: 10px 12px; font-size: 14px; white-space: pre-line; color: var(--ink); }

.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -200%); z-index: 40;
  background: var(--charcoal); color: #FFFFFF; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 700;
  transition: transform .25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.on { transform: translate(-50%, 0); }
.toast.err { background: var(--warn); }

/* Connexion */
.auth {
  min-height: 100vh; min-height: 100dvh;
  background: var(--navy); color: #FFFFFF;
  display: grid; align-content: center; justify-items: center; gap: 22px;
  padding: calc(28px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}
.auth .logo { width: 132px; height: 132px; background: #FFFFFF; }
.auth .card {
  width: 100%; max-width: 400px; background: var(--surface); color: var(--ink);
  border-radius: 18px; padding: 20px 18px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr);
}
.auth h1 { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1; }
.auth .card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.form { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.form .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.err { color: var(--warn); font-size: 14px; font-weight: 700; margin: 0; }
.auth .switch { color: #FFFFFF; background: transparent; border: 0; text-decoration: underline; font-size: 15px; }
.auth .foot { font-size: 13px; opacity: .8; text-align: center; max-width: 36ch; }

/* Vue coach */
.coach-top { padding: 10px 0 6px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; }
.coach-top .who { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: .9; }
.coach-top .meta { color: var(--ink-2); font-size: 15px; padding-bottom: 4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 10px 0 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; overflow-x: auto; }
.tabs button { flex: none; border: 0; background: transparent; padding: 12px 10px 10px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

.statrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; display: grid; gap: 2px; }
.stat .l { font-size: 13px; color: var(--muted); }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.05; }
.stat .d { font-size: 13px; color: var(--ink-2); }

.cs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 10px; }
.cs > summary { list-style: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.cs > summary::-webkit-details-marker { display: none; }
.cs > summary .n { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; text-align: center; color: var(--slate); }
.cs.is-done > summary .n { color: var(--done); }
.cs.is-progress > summary .n { color: var(--brand); }
.cs > summary .what b { display: block; }
.cs > summary .what span { color: var(--muted); font-size: 14px; }
.cs .body { padding: 0 14px 14px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.quote { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: var(--r-s); font-style: italic; color: var(--ink); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line); }
.cmp td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td.name { font-weight: 700; }
.cmp .sets { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.miss { color: var(--warn); font-weight: 700; }
.more, .eq { color: var(--done); font-weight: 700; }
.dim { color: var(--muted); }
.tablewrap { overflow-x: auto; }

/* Éditeur de programme */
.weekchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.weekchips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.weekchips button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.cta { background: var(--surface); border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: var(--r-m); padding: 16px; display: grid; gap: 10px; margin-bottom: 14px; grid-template-columns: minmax(0, 1fr); }
.cta p { margin: 0; color: var(--ink-2); }
.sesstabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.sesstabs button { flex: none; min-width: 48px; min-height: 44px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); font-family: var(--display); font-weight: 700; font-size: 22px; }
.sesstabs button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sesstabs button.add { color: var(--brand); }
.sessname { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sessname input { flex: 1; min-width: 0; }
.ed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; display: grid; gap: 12px; margin-bottom: 10px; grid-template-columns: minmax(0, 1fr); }
.ed-head { display: flex; gap: 8px; align-items: center; }
.ed-head input { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; border: 1px solid transparent; background: transparent; border-radius: var(--r-s); padding: 6px 8px; margin-left: -8px; }
.ed-head input:hover, .ed-head input:focus { border-color: var(--line); background: var(--bg); }
.iconbtn { width: 38px; height: 38px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:disabled { opacity: .35; cursor: default; }
.last { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-2); background: var(--bg); border-radius: var(--r-s); padding: 8px 10px; }
.last b { color: var(--ink); }
.last .sets { font-variant-numeric: tabular-nums; }
.edgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.field .stepper { min-height: 46px; }
.field .stepper button { height: 46px; }
.field .stepper input { font-size: 24px; }
.field select, .field input[type="text"], .field input[type="url"] {
  min-height: 44px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--bg); padding: 0 10px; color: var(--ink); font-size: 15px; width: 100%;
}
.field textarea { font-size: 15px; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink); }
.checkline input { width: 20px; height: 20px; accent-color: var(--brand); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--brand); }
.ed details > summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 14px; }
.ed details[open] > summary { margin-bottom: 10px; }
.ed details .inner { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.persets { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.perset { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 38px; gap: 8px; align-items: center; }
.perset .k { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--muted); text-align: center; }
.addex { margin-bottom: 14px; }
.pubbar { display: grid; gap: 8px; margin-top: 8px; grid-template-columns: minmax(0, 1fr); }
.savestate { font-size: 13px; color: var(--muted); text-align: right; min-height: 18px; margin: -6px 0 8px; }

/* Graphiques */
.chartcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.chartcard h3 { font-size: 17px; }
.chartcard .cap { color: var(--muted); font-size: 13px; margin: 0; }
.chart { position: relative; width: 100%; height: 240px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--body); font-variant-numeric: tabular-nums; }
.chart .endlbl { fill: var(--ink); font-weight: 700; font-size: 13px; }
.tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--charcoal); color: #FFFFFF; border-radius: var(--r-s);
  padding: 6px 10px; font-size: 13px; white-space: nowrap; transform: translate(-50%, -100%);
  display: none;
}
.tip b { display: block; }
.selrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.selrow select { min-height: 44px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font-size: 15px; flex: 1; min-width: 0; width: 100%; color: var(--ink); }
.datatable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.datatable th, .datatable td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.datatable th { font-weight: 400; color: var(--muted); font-size: 12px; }

/* Import */
.dropzone {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  border: 2px dashed var(--slate); border-radius: var(--r-m); padding: 22px 14px; background: var(--surface); cursor: pointer;
}
.dropzone b { font-size: 16px; }
.dropzone span { color: var(--muted); font-size: 14px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.importlist { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 2px; }

.empty { color: var(--muted); font-size: 14px; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { display: grid; place-items: center; min-height: 60vh; }
.loading .logo { width: 64px; height: 64px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 380px) {
  .big-title { font-size: 54px; }
  .sethead, .setrow { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 6px; }
  .check, .play { width: 48px; height: 48px; }
  .stepper { grid-template-columns: 30px minmax(0, 1fr) 30px; }
  .edgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statrow, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
