:root {
  --bg: #14110d;
  --surface: #211c15;
  --surface-2: #2b241b;
  --border: #4a3e2c;
  --text: #ede4d1;
  --muted: #b9ab90;
  --gold: #d9b45a;
  --gold-strong: #f0cf7a;
  --alliance: #6fa3ff;
  --horde: #ff6b5e;
  --radius: 10px;
  --title: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg) radial-gradient(ellipse at top, #2a2219 0%, var(--bg) 60%) no-repeat;
  color: var(--text);
  font: 16px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
h1, h2, h3 { font-family: var(--title); color: var(--gold-strong); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: 1.35rem; margin-top: 2em; }
h3 { font-size: 1.05rem; }
a { color: var(--gold-strong); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--border); background: rgba(20, 17, 13, .9); padding: 12px 16px; }
.brand { font-family: var(--title); font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--gold); }
.site-header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; padding: 0; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 4px 0; display: inline-block; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--gold-strong); }
.site-header nav a[aria-current="page"] { border-bottom: 2px solid var(--gold); }
@media (min-width: 760px) {
  .site-header { display: flex; align-items: center; justify-content: space-between; }
  .site-header nav ul { margin: 0; }
}

.site-footer { border-top: 1px solid var(--border); padding: 16px; text-align: center; font-size: .85rem; color: var(--muted); }
.site-footer p { margin: 4px 0; }

/* Cartes et boutons */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.btn {
  display: inline-block; font: 600 1rem var(--body); text-decoration: none; text-align: center;
  padding: 12px 20px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--gold); background: var(--gold); color: #1a1408;
}
.btn:hover { background: var(--gold-strong); }
.btn-ghost { background: transparent; color: var(--gold-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .4; cursor: default; }

/* Accueil */
.hero { text-align: center; padding: 16px 0 8px; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto 1.5em; }
.quiz-card h2 { margin-top: 0; }
.quiz-card .meta { color: var(--gold); font-weight: 600; }
.quiz-card .btn { width: 100%; margin-top: 8px; }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-check li { padding-left: 28px; position: relative; }
.list-check li::before { content: '✦'; position: absolute; left: 4px; color: var(--gold); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before {
  content: counter(step); flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: #1a1408; font-weight: 700;
}

/* Quiz */
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.quiz h1 { font-size: clamp(1.3rem, 4.5vw, 1.8rem); margin: 16px 0 24px; min-height: 3em; }
.answers { display: grid; gap: 10px; }
.answer {
  font: 600 1rem var(--body); text-align: left; padding: 14px 18px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.answer:hover { border-color: var(--gold); background: var(--surface-2); }
.answer[aria-pressed="true"] { border-color: var(--gold); background: #3a2f1c; }
.double { display: flex; gap: 10px; align-items: center; margin: 20px 0; cursor: pointer; }
.double input { width: 20px; height: 20px; accent-color: var(--gold); }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; }

/* Résultats */
.result-hero { text-align: center; }
.result-hero .combo { font-size: clamp(1.8rem, 7vw, 3rem); }
.podium .card { border-top: 4px solid var(--c, var(--gold)); }
.podium .rank { color: var(--muted); font-size: .9rem; }
.podium .pct { font-size: 2rem; font-weight: 700; font-family: var(--title); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 11em) 1fr auto; gap: 10px; align-items: center; }
.bar-row .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .value { text-align: right; white-space: nowrap; min-width: 3.2em; font-variant-numeric: tabular-nums; }
.bar { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c, var(--gold)); }
.faction-alliance { color: var(--alliance); }
.faction-horde { color: var(--horde); }
.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-strong); margin-left: 6px; }
details summary { cursor: pointer; font-weight: 600; color: var(--gold-strong); padding: 8px 0; }
.why { padding-left: 1.2em; }
.why li { margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--gold); padding-left: 12px; margin-top: 24px; }

/* Encyclopédie et comparateur */
.icon { vertical-align: -0.15em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .875rem; }
.pre { white-space: pre-line; }
.tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); border-top: 4px solid var(--c, var(--gold)); }
.tile:hover { background: var(--surface-2); }
.tile-icon { color: var(--c, var(--gold)); }
.podium h3 .icon { color: var(--c, var(--gold)); }
.entity-title { display: flex; align-items: center; gap: 12px; }
.entity-title .icon { color: var(--c); }
.h-card { margin-top: 0; font-size: 1.1rem; }
.card ul { margin: 0; padding-left: 1.2em; }
.racial h3 { margin-bottom: 4px; }
.racial p:last-child { margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--c); color: var(--text); text-decoration: none; }
.chips a .icon { color: var(--c); }
.toggle { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 20px; flex-wrap: wrap; }
.toggle label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.toggle input { accent-color: var(--gold); width: 18px; height: 18px; }
.field { display: grid; gap: 6px; color: var(--muted); }
.field select { font: 1rem var(--body); padding: 10px; border-radius: var(--radius); background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.table-wrap { overflow-x: auto; margin-top: 24px; }
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare th, .compare td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.compare thead th { font-family: var(--title); color: var(--gold-strong); }
.compare tbody th { color: var(--muted); font-weight: 600; width: 28%; font-size: .9rem; }
.share-img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); margin-top: 16px; }
