/* Review layout. Wide screens: board | coach | moves. Medium: board | coach, moves under the coach. Narrow: stacked.
   In "key moments" mode the move list is hidden: one decision at a time. */
.rv { display: grid; gap: 1rem 1.6rem; margin-top: 1rem; align-items: start;
  grid-template-columns: calc(var(--bmax) + 30px) minmax(340px, 1fr);
  grid-template-areas: "top top" "board coach" "board moves"; }
@media (min-width: 1480px) {
  .rv { grid-template-columns: calc(var(--bmax) + 30px) minmax(360px, 1fr) 240px; grid-template-areas: "top top top" "board coach moves"; }
  .rv[data-mode="key"] { grid-template-columns: calc(var(--bmax) + 30px) minmax(360px, 640px); grid-template-areas: "top top" "board coach"; }
}
@media (max-width: 900px) { .rv { grid-template-columns: 1fr; grid-template-areas: "top" "board" "coach" "moves"; } }
.rv-top { grid-area: top; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rv-game { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rv-game .players { justify-content: flex-start; gap: .9rem; font-size: 1rem; }
.rv-board { grid-area: board; position: sticky; top: 4rem; }
@media (max-width: 900px) { .rv-board { position: static; } }
.rv-coach { grid-area: coach; min-width: 0; }
.rv-moves { grid-area: moves; min-width: 0; }
.rv[data-mode="key"] .rv-moves { display: none; }
.rv-moves .moves { margin-top: .3rem; max-height: min(50vh, 420px); }
.moves-h { font: 600 .78rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mvb.km { box-shadow: inset 0 -2px 0 var(--focus); }

/* Segmented control: key moments / whole game */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-b { font: 600 .9rem/1 var(--font-display); border: 0; background: transparent; color: var(--muted); padding: .55rem 1rem; border-radius: 999px; cursor: pointer; text-transform: var(--head-case); letter-spacing: var(--head-track); }
.seg-b span { display: inline-block; min-width: 1.4em; padding: .1em .35em; margin-left: .3em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8em; }
.seg-b.on { background: var(--accent); color: var(--accent-ink); }
.seg-b.on span { background: rgba(255,255,255,.22); color: inherit; }
.seg-b:disabled { opacity: .45; cursor: default; }

/* Board controls and moment dots */
.rv-ctrl { display: flex; gap: .4rem; align-items: center; margin: .6rem 0; }
.rv-ctrl > button { font: 600 .9rem/1 var(--font-body); padding: .55rem .8rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: calc(var(--radius) - 4px); cursor: pointer; }
.rv-ctrl > button:disabled { opacity: .4; cursor: default; }
.rv-ctrl > button:not(:disabled):hover { border-color: var(--accent); }
.dots { flex: 1; display: flex; justify-content: center; align-items: center; gap: .45rem; flex-wrap: wrap; }
.dotb { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.dotb.gaffe { border-color: var(--bad); } .dotb.erreur { border-color: var(--warn); } .dotb.imprecision { border-color: var(--imp); } .dotb.good { border-color: var(--good); }
.dotb.seen { background: var(--line); }
.dotb.on { transform: scale(1.35); background: var(--focus); border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.dotb.end { width: auto; height: auto; border: 0; background: none; color: var(--muted); font-size: .95rem; line-height: 1; }
.dotb.end.on { color: var(--focus); transform: scale(1.3); box-shadow: none; }

/* Eval graph with key-moment dots */
.graph { height: 70px; }
.graph .kmdot { stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.graph .kmdot.gaffe { fill: var(--bad); } .graph .kmdot.erreur { fill: var(--warn); } .graph .kmdot.imprecision { fill: var(--imp); } .graph .kmdot.good { fill: var(--good); }

/* The coach stage: headline first, then the demonstration, the idea to keep, the next action. Details wait. */
.stage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem 1.1rem; display: flex; flex-direction: column; gap: .85rem; }
.stage::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--qc, var(--accent)); }
.stage.xp::before { background: #7c3aed; }
.stage-top { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.step { font: 700 .74rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.theme-chip { font-size: .82rem; padding: .25rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.verdict-line { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.verdict-line .mv { font: 600 1.02rem/1 var(--font-mono); }
.headline { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); line-height: 1.25; margin: 0; max-width: 32ch; }
.headline b { color: var(--accent); }
.demo-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.demo-btns .mvt { font-family: var(--font-mono); opacity: .85; margin-left: .2rem; }
.demo-out { background: var(--surface-2); border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px); padding: .7rem .9rem; }
.demo-h { font: 700 .74rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .45rem; }
.demo-line { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; font-size: .95rem; }
.demo-line li { padding: .15rem .5rem; border-left: 3px solid transparent; color: var(--muted); }
.demo-line li.done { color: var(--ink); }
.demo-line li.now { border-left-color: var(--focus); background: color-mix(in srgb, var(--focus) 12%, transparent); font-weight: 600; }
.demo-result { margin: .5rem 0 0; font-weight: 700; }
.demo-result.played { color: var(--bad); } .demo-result.best { color: var(--good); }
.keep { background: var(--accent-soft); border-radius: calc(var(--radius) - 4px); padding: .75rem .95rem; }
.keep p { margin: .3rem 0 0; font-size: 1.02rem; }
.eyebrow { font: 700 .72rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.next-row { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; margin-top: .1rem; }
.btn.primary { font-size: 1rem; padding: .7rem 1.2rem; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
details.more { border-top: 1px solid var(--line); padding-top: .6rem; }
details.more > summary { font-size: .9rem; }
details.more[open] > summary { margin-bottom: .5rem; }
.takeaways { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.takeaways li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; background: var(--accent-soft); border-radius: calc(var(--radius) - 4px); }
.done-stage::before { background: var(--focus); }
@media (prefers-reduced-motion: no-preference) { .stage { animation: stage-in .22s ease-out; } }
@keyframes stage-in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Direction picker (Display page): each card previews its own palette */
.dirs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin: .4rem 0 .6rem; }
.dir { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .35rem; }
.dir.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dir-name { font: 800 1.15rem/1.1 var(--font-display); }
.dir[data-prev="etude"] .dir-name { font-family: "Bricolage Grotesque", sans-serif; }
.dir[data-prev="nuit"] .dir-name { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 600; }
.dir[data-prev="club"] .dir-name { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.dir-desc { font-size: .88rem; color: var(--muted); }
.dir-sw { display: flex; gap: 4px; margin-top: .2rem; }
.dir-sw i { width: 26px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.dir[data-prev="etude"] .dir-sw i:nth-child(1) { background: #eef1f4; } .dir[data-prev="etude"] .dir-sw i:nth-child(2) { background: #17212b; } .dir[data-prev="etude"] .dir-sw i:nth-child(3) { background: #1d6b8f; } .dir[data-prev="etude"] .dir-sw i:nth-child(4) { background: #d98a1c; }
.dir[data-prev="nuit"] .dir-sw i:nth-child(1) { background: #0f1113; } .dir[data-prev="nuit"] .dir-sw i:nth-child(2) { background: #eceae6; } .dir[data-prev="nuit"] .dir-sw i:nth-child(3) { background: #2a2e33; } .dir[data-prev="nuit"] .dir-sw i:nth-child(4) { background: #f0b44c; }
.dir[data-prev="club"] .dir-sw i:nth-child(1) { background: #f1f4ef; } .dir[data-prev="club"] .dir-sw i:nth-child(2) { background: #0f1d33; } .dir[data-prev="club"] .dir-sw i:nth-child(3) { background: #1f8f4e; } .dir[data-prev="club"] .dir-sw i:nth-child(4) { background: #f5a524; }
.display .rv-coach > .card { margin: .8rem 0 0; }
