/* Déclic design directions. Each one sets type, palette and a few component shapes.
   Layout concept: the board is the stage; one coach panel says what to look at; everything else waits behind a click. */

@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Condensed"; src: url(fonts/ibm-plex-sans-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font-display: system-ui, sans-serif; --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-mono: ui-monospace, Consolas, monospace;
  --focus: #e8a33d; --surface-2: var(--bg); --radius: 10px; --head-weight: 700; --head-case: none; --head-track: -.01em;
  --nav-bg: var(--surface); --nav-ink: var(--ink); --nav-muted: var(--muted);
}

/* ---------- Étude: calm daylight study ---------- */
:root[data-dir="etude"] {
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --bg: #eef1f4; --surface: #ffffff; --surface-2: #f6f8fa; --ink: #17212b; --muted: #5d6b78; --line: #dde3e9;
  --accent: #1d6b8f; --accent-ink: #ffffff; --accent-soft: #e1eef5; --focus: #d98a1c;
  --radius: 14px; --head-weight: 800; --head-track: -.02em;
  --nav-bg: #ffffff; --nav-ink: #17212b; --nav-muted: #5d6b78;
}
@media (prefers-color-scheme: dark) {
  :root[data-dir="etude"]:not([data-theme="light"]) { color-scheme: dark;
    --bg: #10161c; --surface: #18212a; --surface-2: #1d2731; --ink: #e6edf3; --muted: #93a3b2; --line: #26323d;
    --accent: #6cb6d9; --accent-ink: #08202c; --accent-soft: #19303d; --focus: #f0b44c; --nav-bg: #18212a; --nav-ink: #e6edf3; --nav-muted: #93a3b2; }
}
:root[data-dir="etude"][data-theme="dark"] { color-scheme: dark;
  --bg: #10161c; --surface: #18212a; --surface-2: #1d2731; --ink: #e6edf3; --muted: #93a3b2; --line: #26323d;
  --accent: #6cb6d9; --accent-ink: #08202c; --accent-soft: #19303d; --focus: #f0b44c; --nav-bg: #18212a; --nav-ink: #e6edf3; --nav-muted: #93a3b2; }

/* ---------- Nuit: focused dark, one amber accent for "look here" ---------- */
:root[data-dir="nuit"] { color-scheme: dark;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif; --font-body: "IBM Plex Sans", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --bg: #0f1113; --surface: #171a1d; --surface-2: #1d2125; --ink: #eceae6; --muted: #9a9c9e; --line: #2a2e33;
  --accent: #f0b44c; --accent-ink: #1a1406; --accent-soft: #2e2617; --focus: #f0b44c;
  --bad: #ff8a65; --bad-soft: #3a2218; --warn: #f0c34a; --warn-soft: #352c14; --good: #74d39a; --good-soft: #17301f; --imp: #a3a7ad;
  --radius: 6px; --head-weight: 600; --head-track: 0;
  --nav-bg: #0b0c0e; --nav-ink: #eceae6; --nav-muted: #9a9c9e;
}

/* ---------- Club: sporty, high contrast, condensed headings ---------- */
:root[data-dir="club"] { color-scheme: light;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; --font-body: "Barlow", "Segoe UI", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --bg: #f1f4ef; --surface: #ffffff; --surface-2: #f7f9f5; --ink: #0f1d33; --muted: #566175; --line: #dce3d8;
  --accent: #1f8f4e; --accent-ink: #ffffff; --accent-soft: #e2f2e7; --focus: #f5a524;
  --bad: #d4380d; --bad-soft: #fde8e0; --warn: #b26b00; --warn-soft: #fdf0d8; --good: #1f8f4e; --good-soft: #e2f2e7;
  --radius: 4px; --head-weight: 700; --head-case: uppercase; --head-track: .02em;
  --nav-bg: #0f1d33; --nav-ink: #ffffff; --nav-muted: #b8c2d3;
}

/* ---------- Applied everywhere ---------- */
body { font-family: var(--font-body); }
h1, h2, h3, .brand, .headline, .big, .btn, .tab, .stage-title { font-family: var(--font-display); }
h1, h2, h3, .headline, .stage-title { font-weight: var(--head-weight); letter-spacing: var(--head-track); text-transform: var(--head-case); text-wrap: balance; }
.card, .coach, .exp, .opt, .modal-box, .goalb { border-radius: var(--radius); }
.btn { border-radius: calc(var(--radius) - 4px); letter-spacing: .01em; }
.mvb, .ev, .evl, .evbar span, .pvline, .moves, kbd, .tbl td:not(:first-child), .big { font-variant-numeric: tabular-nums; }
.mvb, .ev, .pvline, .moves, .demo-line { font-family: var(--font-mono); font-size: .92em; }
#nav { background: var(--nav-bg); color: var(--nav-ink); }
#nav .brand { color: var(--nav-ink); }
#nav nav a, #nav .who, #nav .iconlink { color: var(--nav-muted); }
#nav nav a.on { color: var(--nav-ink); }
:root[data-dir="club"] #nav { border-bottom: 3px solid var(--accent); }
:root[data-dir="club"] #nav nav a.on { background: rgba(255,255,255,.12); }
:root[data-dir="club"] .brand { text-transform: uppercase; letter-spacing: .06em; font-size: 1.3rem; }
:root[data-dir="nuit"] .brand { letter-spacing: .04em; }
:root[data-dir="etude"] .brand { font-weight: 800; font-size: 1.3rem; }
.brand::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .18em; border-radius: 50%; background: var(--focus); vertical-align: .1em; }
/* Sentences stay in normal case in every direction: uppercase sentences read slower. */
.headline { text-transform: none; letter-spacing: -.005em; }
:root[data-dir="club"] .headline { font-family: var(--font-body); font-weight: 600; }
