/* Salle de vote des spots : charte Origin Labs (papier, teal, rouge signal, DM Sans).
   Mise en page : bandeau teal, puis une colonne de « posts » façon forum ; le rouge marque la décision humaine (le vote positif). */
:root {
  --bg: #fbf8f0; --surface: #ffffff; --sunk: #f3eee2; --fg: #0a1f24;
  --muted: rgba(10, 31, 36, 0.62); --faint: rgba(10, 31, 36, 0.45); --rule: rgba(10, 31, 36, 0.14); --field: rgba(10, 31, 36, 0.28);
  --teal: #0d7377; --on-teal: #ffffff; --on-teal-soft: rgba(255, 255, 255, 0.75);
  --red: #f7222c; --red-ink: #c8101a; --down: #0d7377; --link: #0d7377; --focus: #0d7377;
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1f24; --surface: #10292f; --sunk: #0d2328; --fg: #f3eee2;
    --muted: rgba(243, 238, 226, 0.68); --faint: rgba(243, 238, 226, 0.48); --rule: rgba(243, 238, 226, 0.14); --field: rgba(243, 238, 226, 0.3);
    --teal: #0a5c5f; --red: #ff3d46; --red-ink: #ff7077; --down: #4fb3b6; --link: #4fb3b6; --focus: #4fb3b6;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; color: inherit; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.band { background: var(--teal); color: var(--on-teal); }
.band .wrap { padding-block: 40px 32px; display: grid; gap: 14px; }
.bandtop { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.wm { display: inline-flex; align-items: baseline; letter-spacing: -0.035em; font-size: 20px; line-height: 1; white-space: nowrap; }
.wm b { font-weight: 700; }
.wm .l { position: relative; margin-left: 5px; font-weight: 400; }
.wm .l i { position: absolute; left: 50%; bottom: -6px; width: 13px; height: 2px; transform: translateX(-50%); background: var(--red); }
.me { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--on-teal); background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.me .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.me .edit { color: var(--on-teal-soft); font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--on-teal-soft); display: flex; gap: 8px; align-items: center; }
.eyebrow .plus { color: var(--red); font-weight: 700; }
h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; }
.lead { margin: 0; max-width: 62ch; color: var(--on-teal-soft); font-size: 17px; }

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--rule); }
.bar .wrap { display: flex; gap: 6px; align-items: center; padding-block: 10px; flex-wrap: wrap; }
.bar .label { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.tab { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tab[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.status { margin-left: auto; font-size: 13px; color: var(--faint); }

.notice { margin: 18px 0 0; padding: 12px 14px; border-left: 2px solid var(--red); background: var(--sunk); font-size: 14px; color: var(--muted); border-radius: 0 var(--r) var(--r) 0; }
.namebox { margin: 18px 0 0; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--red); border-radius: var(--r); display: grid; gap: 10px; }
.namebox label { font-weight: 600; font-size: 15px; }
.namebox input { flex: 1 1 200px; min-width: 0; padding: 9px 12px; border: 1px solid var(--field); border-radius: var(--r); background: var(--bg); }

.list { display: grid; padding-block: 8px 64px; }
.post { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding-block: 28px; border-bottom: 1px solid var(--rule); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; }
.vbtn { width: 40px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r); cursor: pointer; color: var(--faint); }
.vbtn:hover:not(:disabled) { background: var(--sunk); color: var(--fg); }
.vbtn:disabled { cursor: not-allowed; opacity: 0.45; }
.vbtn svg { width: 24px; height: 24px; }
.vbtn.up[aria-pressed="true"] { color: var(--red); }
.vbtn.down[aria-pressed="true"] { color: var(--down); }
.score { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: center; }
.score.pos { color: var(--red-ink); }
.score.neg { color: var(--down); }
.rank { margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--faint); }

.body { min-width: 0; display: grid; gap: 12px; }
.head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.num { font-size: 15px; font-weight: 700; letter-spacing: -0.04em; color: var(--red-ink); font-variant-numeric: tabular-nums; }
h2 { margin: 0; font-size: clamp(22px, 3.2vw, 28px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.meta { font-size: 13px; color: var(--faint); display: flex; gap: 6px; flex-wrap: wrap; }
.screen { background: #000; border-radius: var(--r); overflow: hidden; }
.screen video { display: block; width: 100%; height: auto; background: #000; }
.tally { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.tally b { color: var(--fg); font-variant-numeric: tabular-nums; }
.voters { color: var(--faint); }
.link { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--link); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; text-decoration-thickness: 1px; }

.thread { display: grid; gap: 14px; padding-top: 4px; }
.composer { display: grid; gap: 8px; }
.composer textarea { width: 100%; min-height: 76px; resize: vertical; padding: 10px 12px; border: 1px solid var(--field); background: var(--surface); border-radius: var(--r); font-size: 15px; line-height: 1.45; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { border: 0; border-radius: var(--r); padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--rule); }
.hint { font-size: 12px; color: var(--faint); }
.err { font-size: 13px; color: var(--red-ink); }

.c { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.c .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.c .cb { min-width: 0; display: grid; gap: 4px; }
.c .who { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.c .who b { color: var(--fg); font-weight: 600; }
.c .txt { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c .acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.c .acts .vbtn { width: 30px; height: 28px; }
.c .acts .vbtn svg { width: 18px; height: 18px; }
.c .acts .cs { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: center; }
.mini { background: none; border: 0; padding: 4px 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 6px; }
.mini:hover:not(:disabled) { background: var(--sunk); color: var(--fg); }
.replies { display: grid; gap: 14px; margin-top: 10px; padding-left: 14px; border-left: 1px solid var(--rule); }
.empty { margin: 0; font-size: 14px; color: var(--faint); }
footer { padding-block: 0 48px; color: var(--faint); font-size: 13px; }

@media (max-width: 560px) {
  .post { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .vbtn { width: 36px; }
  .band .wrap { padding-block: 28px 24px; }
  .status { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .vbtn, .tab, .btn { transition: background-color .15s ease, color .15s ease, transform .15s ease; }
  .vbtn:active:not(:disabled) { transform: scale(0.92); }
}
