/*! Coup d'Avance — styles */
/* Concept : tableau tactique de vestiaire. Un terrain vu du dessus comme un échiquier,
   une phase de décision (choix du coup) puis une phase de geste (swipe). */
:root {
  --bg: #0a1620;
  --panel: #11222f;
  --panel-2: #172d3d;
  --court: #17557f;
  --court-dark: #11466a;
  --line: #e6eff5;
  --ink: #e6eff5;
  --muted: #8da6b6;
  --ball: #d6f23c;
  --opp: #ff7a59;
  --good: #5fe3a1;
  --warn: #ffc857;
  --bad: #ff6b6b;
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.4; padding-inline: 16px; padding-block: 12px 28px; }
#app { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--ball); outline-offset: 2px; }

.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.brand { white-space: nowrap; font-family: var(--f-display); font-weight: 800; font-size: 25px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.brand b { color: var(--ball); font-weight: 800; }
.hud { display: flex; gap: 9px; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
.hud span b { color: var(--ink); font-weight: 500; font-size: 15px; }

.board { position: relative; border-radius: 14px; overflow: hidden; background: var(--court-dark); border: 1px solid #234a63; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 360 / 520; touch-action: none; user-select: none; -webkit-user-select: none; }
.pill { position: absolute; left: 10px; top: 10px; font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; background: rgba(10,22,32,.82); border: 1px solid #2c5671; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.toast { position: absolute; left: 0; right: 0; top: 46%; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 44px; text-transform: uppercase; letter-spacing: .03em; pointer-events: none; text-shadow: 0 3px 14px rgba(0,0,0,.6); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: none; }

.sheet { background: var(--panel); border: 1px solid #1f3a4d; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sheet h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.sheet p { margin: 0; color: var(--muted); }
.sheet p.read { color: var(--ink); }
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { text-align: left; background: var(--panel-2); border: 1px solid #28485e; border-radius: 10px; padding: 10px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt:active { background: #1f3b50; border-color: var(--ball); }
.opt strong { font-family: var(--f-display); font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.opt span { font-size: 12.5px; color: var(--muted); }

.btn { background: var(--ball); color: #16200a; border: 0; border-radius: 10px; padding: 12px 16px; font-family: var(--f-display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .04em; min-height: 46px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #2f536b; }
.row { display: flex; gap: 8px; }
.row .btn { flex: 1; }

.recipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.recipe div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.recipe small { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.recipe b { font-family: var(--f-display); font-size: 18px; font-weight: 700; text-transform: uppercase; }

.score { display: flex; align-items: baseline; gap: 10px; }
.score .n { font-family: var(--f-display); font-weight: 800; font-size: 54px; line-height: 1; }
.score .v { font-family: var(--f-display); font-weight: 700; font-size: 22px; text-transform: uppercase; }
.meters { display: grid; gap: 7px; }
.meter { display: grid; grid-template-columns: 92px 1fr 36px; gap: 8px; align-items: center; font-size: 13px; }
.meter .bar { height: 8px; border-radius: 99px; background: #0d1b26; overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 99px; }
.meter em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-align: right; }
.why { border-left: 3px solid var(--ball); padding-left: 10px; color: var(--ink); }
.why small { display: block; color: var(--muted); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.menu-top .top { order: -2; }
.menu-top .sheet { order: -1; }
.hud em { font-style: normal; }
.star { font-style: normal; color: var(--ball); }
.pips { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pips i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3b6179; flex: none; }
.pips i.on { background: var(--ball); border-color: var(--ball); }
.pips span { margin-left: 6px; }
.gl { background: var(--panel-2); border-radius: 10px; padding: 8px 11px; }
.gl summary { cursor: pointer; font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 16px; }
.glist { display: grid; gap: 8px; margin-top: 8px; }
.glist div { display: grid; gap: 1px; }
.glist span { font-size: 12.5px; color: var(--muted); }
/* pied de page : version */
.foot { max-width: 420px; margin: 14px auto 0; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
