/* chiliQ — charte Chilipocalypse : noir, rouge piment, flammes, vert tige */
@font-face { font-family: 'Creepster'; src: url('/fonts/creepster.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #0a0a0a; --bg2: #151313; --card: #1d1919; --line: #352c2c;
  --red: #e0242a; --red-d: #9e1418; --orange: #f47a20; --flame: #ffb02e; --green: #3aa845; --cream: #f3ecd2;
  --txt: #f6f1ea; --muted: #a99d93;
  --a0: #d62828; --a1: #f07c00; --a2: #2a9d3a; --a3: #7b2cbf;
  --radius: 14px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--txt); }
body {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(224, 36, 42, .35), transparent 60%),
    radial-gradient(ellipse at 50% -20%, rgba(244, 122, 32, .12), transparent 55%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--flame); }
.hidden { display: none !important; }
.display { font-family: 'Creepster', Impact, fantasy; letter-spacing: .04em; font-weight: normal; color: var(--cream);
  text-shadow: 0 0 1px #000, 2px 2px 0 var(--red-d), 0 0 18px rgba(224, 36, 42, .55); }
.muted { color: var(--muted); }
.center { text-align: center; }

button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: .75em 1.2em; cursor: pointer;
  background: linear-gradient(180deg, var(--red), var(--red-d)); color: #fff; box-shadow: 0 3px 0 #5a0b0e;
  transition: transform .05s, filter .15s; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; justify-content: center;
}
button:hover, .btn:hover { filter: brightness(1.12); }
button:active, .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #5a0b0e; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary, .btn.secondary { background: #2b2424; box-shadow: 0 3px 0 #120f0f; color: var(--txt); }
button.ghost { background: transparent; box-shadow: none; border: 1px solid var(--line); color: var(--txt); }
button.green { background: linear-gradient(180deg, #46b852, #23782d); box-shadow: 0 3px 0 #164d1c; }
button.small { padding: .4em .7em; font-size: .85em; }
input, select, textarea {
  font: inherit; color: var(--txt); background: #0f0d0d; border: 1px solid var(--line); border-radius: 10px; padding: .7em .8em; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
label { display: block; font-size: .85em; color: var(--muted); margin: .6em 0 .25em; }

.card { background: rgba(29, 25, 25, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }

/* Formes des réponses (accessibilité : forme + couleur) */
.ans-0 { background: var(--a0); } .ans-1 { background: var(--a1); } .ans-2 { background: var(--a2); } .ans-3 { background: var(--a3); }
.shape { font-size: 1.3em; line-height: 1; width: 1.4em; text-align: center; flex: none; }

/* Barre de temps */
.timebar { height: 10px; background: #2a2222; border-radius: 99px; overflow: hidden; }
.timebar > div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--flame), var(--red)); transform-origin: left; }

.chip { display: inline-block; padding: .25em .7em; border-radius: 99px; background: #2b2121; border: 1px solid var(--line); font-size: .85em; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2b2121; border: 1px solid var(--orange);
  padding: .7em 1.1em; border-radius: 10px; z-index: 1000; max-width: 92vw; box-shadow: 0 8px 30px #000a; }
.conn { position: fixed; top: 8px; right: 8px; font-size: .75em; padding: .25em .6em; border-radius: 99px; background: #4a1012; z-index: 999; }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes flicker { 0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 90, 20, .55)); } 50% { filter: drop-shadow(0 0 30px rgba(255, 140, 30, .8)); } }
.pop { animation: pop .35s ease-out both; }
.logo-glow { animation: flicker 2.4s ease-in-out infinite; }
.chip.ans-0 { background: var(--a0); } .chip.ans-1 { background: var(--a1); } .chip.ans-2 { background: var(--a2); } .chip.ans-3 { background: var(--a3); }
