/* SB'ID : palette gruvbox de SB'Music, angles droits, JetBrains Mono partout. */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1d2021;
  --bg1: #282828;
  --bg2: #32302f;
  --line: #504945;
  --fg: #ebdbb2;
  --fg-strong: #fbf1c7;
  --muted: #a89984;
  --dim: #7c6f64;
  --yellow: #fabd2f;
  --orange: #fe8019;
  --red: #fb4934;
  --green: #b8bb26;
  --aqua: #8ec07c;
  --blue: #83a598;
  --purple: #d3869b;
  --on-accent: #1d2021;
  --chart: #d65d0e;
  --grid: #3c3836;
  --good: #b8bb26;
  --bad: #fb4934;
  --font: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbf1c7; --bg1: #f2e5bc; --bg2: #ebdbb2; --line: #d5c4a1;
    --fg: #3c3836; --fg-strong: #282828; --muted: #7c6f64; --dim: #928374;
    --yellow: #b57614; --orange: #af3a03; --red: #9d0006; --green: #79740e;
    --aqua: #427b58; --blue: #076678; --purple: #8f3f71; --on-accent: #fbf1c7;
    --chart: #af3a03; --grid: #ebdbb2; --good: #79740e; --bad: #9d0006;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fbf1c7; --bg1: #f2e5bc; --bg2: #ebdbb2; --line: #d5c4a1;
  --fg: #3c3836; --fg-strong: #282828; --muted: #7c6f64; --dim: #928374;
  --yellow: #b57614; --orange: #af3a03; --red: #9d0006; --green: #79740e;
  --aqua: #427b58; --blue: #076678; --purple: #8f3f71; --on-accent: #fbf1c7;
  --chart: #af3a03; --grid: #ebdbb2; --good: #79740e; --bad: #9d0006;
  color-scheme: light;
}

* { box-sizing: border-box; border-radius: 0; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; color: var(--fg-strong); }
p { margin: 0; }
a { color: var(--yellow); }
button, input, select { font: inherit; color: inherit; }

/* Boutons bordés, en capitales espacées */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .85em 1.4em;
  border: 2px solid var(--fg);
  background: transparent;
  text-transform: uppercase; letter-spacing: .22em; font-weight: 700; font-size: .8rem;
  cursor: pointer;
  transition: background .12s, color .12s, transform .08s;
  user-select: none;
  text-decoration: none;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: inherit; }
.btn.primary { border-color: var(--yellow); background: var(--yellow); color: var(--on-accent); }
.btn.primary:hover { background: var(--fg-strong); border-color: var(--fg-strong); color: var(--bg); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; color: var(--fg); }
.btn.small { padding: .55em .9em; font-size: .7rem; letter-spacing: .16em; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-weight: 700;
}

input[type="text"] {
  width: 100%;
  background: var(--bg1);
  border: 2px solid var(--line);
  padding: .8em 1em;
  font-size: 1.05rem;
  outline: none;
}
input[type="text"]:focus { border-color: var(--yellow); }
input::placeholder { color: var(--dim); }

.wordmark {
  font-weight: 800; letter-spacing: -.02em; color: var(--fg-strong);
  display: inline-flex; align-items: baseline;
}
.wordmark .q { color: var(--yellow); }
.wordmark .cursor {
  display: inline-block; width: .55em; height: .9em; margin-left: .12em;
  background: var(--red); transform: translateY(.1em);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.error-line { color: var(--red); font-size: .9rem; min-height: 1.4em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
