/* Console de rack, thème unique sombre (charte compromission) :
   barre d'état fixe, mot-titre qui bat au kick, carte du morceau, trois panneaux, prise de main, terminal. */

/* polices hébergées sur le site (OFL, voir fonts/OFL-*.txt) */
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/unbounded-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/unbounded-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(fonts/jetbrains-mono-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #0a0b09;
  --panel: #11130e;
  --line: #262a1f;
  --fg: #e7eadf;
  --muted: #8a917b;
  --acid: #c6ff3d;
  --acid-dim: rgba(198, 255, 61, .22);
  --warn: #ffa53d;
  --bad: #ff5f52;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); margin: 0; padding: 0; }
body { font: 400 13px/1.55 var(--mono); }
a { color: var(--acid); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }

/* barre d'état */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.brand { font-weight: 600; letter-spacing: .04em; }
.brand span { color: var(--muted); font-weight: 400; }
.etat { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 11px; letter-spacing: .06em; padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); white-space: nowrap; }
.chip .pt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.chip.on { color: var(--acid); border-color: var(--acid-dim); }
.chip.on .pt { background: var(--acid); }
.chip.simu { color: var(--warn); border-color: var(--warn); }

/* mot-titre */
.hero { padding-block: 36px 20px; display: grid; gap: 10px; }
.mot {
  margin: 0; height: 1.15em; overflow: visible; white-space: nowrap;
  font-family: var(--display); font-size: min(7.4vw, 108px); line-height: 1.1;
  font-variation-settings: "wght" 300; font-weight: 300; letter-spacing: -.02em;
}
.mot .rom { color: var(--acid); }
.sous { color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.sous b { color: var(--fg); font-weight: 600; }

/* lecteur et carte */
.piste { display: grid; gap: 12px; padding-block: 8px 28px; }
.transport { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.play {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px;
  background: var(--acid); color: var(--bg); border: 0; border-radius: 3px; font-weight: 600;
}
.play svg { width: 14px; height: 14px; fill: currentColor; }
.temps { font-variant-numeric: tabular-nums; color: var(--muted); }
.temps b { color: var(--fg); font-weight: 600; }
.choix { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.choix select {
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px;
  color: var(--fg); max-width: min(52vw, 360px); text-overflow: ellipsis;
}
.choix select:focus { border-color: var(--acid); }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--warn); width: 16px; height: 16px; }
.carte-wrap { border: 1px solid var(--line); border-radius: 4px; background: var(--panel); overflow: hidden; }
#carte { display: block; width: 100%; height: 168px; cursor: pointer; touch-action: none; }
.legende { color: var(--muted); font-size: 12px; max-width: 80ch; margin: 0; }

/* panneaux */
.console { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 12px; padding-block: 8px 28px; }
.panneau { border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: 14px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.panneau h2 { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.panneau h2 span { letter-spacing: .04em; text-transform: none; font-weight: 400; }

.metres { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; height: 190px; }
.metre { display: grid; grid-template-rows: 1fr auto auto; gap: 6px; min-width: 0; }
.metre .tube { position: relative; border: 1px solid var(--line); border-radius: 2px; background: repeating-linear-gradient(to top, transparent 0 9px, var(--line) 9px 10px); overflow: hidden; }
.metre .niv { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: var(--acid); opacity: .9; }
.metre .crete { position: absolute; left: 0; right: 0; height: 2px; bottom: 0%; background: var(--fg); }
.metre .nom { font-size: 10px; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metre .val { font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }

.horloge { display: grid; gap: 10px; }
.bpm { font-family: var(--display); font-size: 40px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.bpm small { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.temps-forts { display: flex; gap: 8px; align-items: center; }
.temps-forts i { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--line); display: inline-block; }
.temps-forts i.on { background: var(--acid); border-color: var(--acid); }
.temps-forts i.on.un { background: var(--fg); border-color: var(--fg); }
.position { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; }
#scope { width: 100%; height: 90px; display: block; border-top: 1px solid var(--line); padding-top: 6px; }

.journal { list-style: none; margin: 0; padding: 0; height: 238px; overflow-y: auto; display: grid; align-content: start; gap: 2px; scrollbar-color: var(--line) transparent; }
.journal li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 3px 6px; border-radius: 2px; color: var(--muted); opacity: .45; }
.journal li.passe { opacity: 1; }
.journal li.courant { background: var(--acid-dim); color: var(--fg); opacity: 1; }
.journal .h { font-variant-numeric: tabular-nums; }
.journal .t-kick { color: var(--fg); }
.journal .t-intrusion { color: var(--warn); }
.journal .t-veto, .journal .t-revoque { color: var(--bad); }
.journal .t-main { color: var(--acid); }
.journal .tag { font-size: 10px; border: 1px solid currentColor; border-radius: 99px; padding: 0 5px; margin-left: 6px; color: var(--warn); }

/* prise de main */
.main-sec { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; padding-block: 8px 28px; }
.main-sec .panneau p { margin: 0; color: var(--muted); max-width: 60ch; }
.parties { display: flex; gap: 8px; flex-wrap: wrap; }
.partie { padding: 8px 14px; border: 1px solid var(--line); background: transparent; border-radius: 3px; }
.partie[aria-pressed="true"] { border-color: var(--acid); color: var(--acid); }
.partie:disabled { opacity: .4; cursor: not-allowed; }
.compte { font-family: var(--display); font-size: 28px; font-variant-numeric: tabular-nums; }
.compte.revoque { color: var(--bad); font-size: 16px; font-family: var(--mono); }
#pad { position: relative; height: 230px; border: 1px solid var(--line); border-radius: 4px; touch-action: none; overflow: hidden;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 12.5% 100%, var(--panel); }
#pad .curseur { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid var(--acid); border-radius: 50%; left: 50%; top: 50%; display: none; }
#pad .axes { position: absolute; left: 10px; bottom: 8px; right: 10px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
#pad .repos { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 16px; }
#pad.actif { cursor: crosshair; border-color: var(--acid-dim); }
#pad.actif .repos { display: none; }

/* terminal */
.term { padding-block: 8px 40px; }
.term .panneau { gap: 8px; }
#sortie { margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto; color: var(--muted); }
#sortie .cmd { color: var(--fg); }
#sortie .ok { color: var(--acid); }
#sortie .non { color: var(--bad); }
.ligne { display: flex; gap: 8px; align-items: center; }
.ligne label { color: var(--acid); white-space: nowrap; }
.ligne input { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 6px 2px; outline: none; }
.ligne input:focus { border-bottom-color: var(--acid); }

footer { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-block: 16px 32px; }
footer .wrap { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 900px) {
  .console { grid-template-columns: 1fr 1fr; }
  .console .panneau:last-child { grid-column: 1 / -1; }
  .main-sec { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .console { grid-template-columns: 1fr; }
  .choix { margin-left: 0; width: 100%; }
  .choix select { flex: 1; max-width: none; }
  .metres { height: 160px; gap: 6px; }
  .ligne label { display: none; }
}
