/* ==========================================================================
   Total Siege — thème commun du site vitrine et du wiki
   Reprend l'identité du jeu : charbon chaud, bronze, or médiéval, ivoire
   parchemin (cf. `src/style.css` :root), titres Cinzel, texte Nunito Sans,
   halos et braises de l'écran-titre.
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-2: #10131a;
  --panel: #161a22;
  --panel-2: #1d2230;
  --panel-3: #262c3b;
  --line: #2a3040;
  --border: #52402d;
  --text: #f3ead8;
  --muted: #a59a88;
  --faint: #6f6a60;

  --gold: #e5b842;
  --gold-hover: #f3c85c;
  --gold-soft: #c9a76a;
  --gold-deep: #8a6a2a;
  --accent: #e0662f;
  --crimson: #c93b3b;
  --success: #34d399;
  --info: #38bdf8;

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 50px rgba(0, 0, 0, 0.45);
  --gutter: 16px;
  --container: 1180px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration-color: rgba(229, 184, 66, 0.4);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--gold-hover);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--gold);
  color: #1a1306;
  font-weight: 800;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 8px;
}

/* --- Marque (blason du menu du jeu) --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand .crest {
  width: 28px;
  height: 34px;
  color: var(--gold-soft);
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.38em;
  color: var(--gold-soft);
  margin-top: 1px;
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 800 15px/1.1 var(--font-body);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #1d1406;
  background: linear-gradient(180deg, #f6d27a 0%, var(--gold) 45%, #c9932a 100%);
  border-color: #f8dc8e;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 28px rgba(229, 184, 66, 0.28);
}
.btn-primary:hover {
  color: #1d1406;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 34px rgba(229, 184, 66, 0.42);
}
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--gold-hover);
  border-color: var(--gold-soft);
  background: rgba(229, 184, 66, 0.06);
}
.btn-lg {
  min-height: 54px;
  padding: 14px 28px;
  font-size: 17px;
}
.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 14px;
}

/* --- Pastilles --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip.gold {
  color: var(--gold);
  border-color: rgba(229, 184, 66, 0.45);
  background: rgba(229, 184, 66, 0.08);
}
.chip.new {
  color: #1d1406;
  background: var(--gold);
  border-color: var(--gold);
}
.chip.free {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.07);
}

/* --- Halos & braises (décor de l'écran-titre) --- */
.halo {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}
.halo.a {
  width: 720px;
  height: 720px;
  left: -220px;
  top: -260px;
  background: radial-gradient(closest-side, rgba(229, 184, 66, 0.22), rgba(229, 184, 66, 0) 70%);
}
.halo.b {
  width: 640px;
  height: 640px;
  right: -200px;
  bottom: -280px;
  background: radial-gradient(closest-side, rgba(224, 102, 47, 0.2), rgba(224, 102, 47, 0) 70%);
}

.embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.embers i {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--z);
  height: var(--z);
  border-radius: 50%;
  background: radial-gradient(circle, #ffd27a 0%, #ff8a3a 45%, rgba(255, 90, 30, 0) 72%);
  box-shadow: 0 0 8px 2px rgba(255, 138, 58, 0.55);
  opacity: 0;
  animation: ember-rise var(--s) linear var(--d) infinite;
}
@keyframes ember-rise {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.95;
  }
  60% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(var(--w), -92vh, 0) scale(0.3);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .embers {
    display: none;
  }
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}

/* --- Ornement de titre de section --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--gold-soft);
  font: 800 12px var(--font-body);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.eyebrow::after {
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

/* --- Tableaux de données (wiki surtout) --- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
table.data th,
table.data td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th:first-child,
table.data td:first-child,
table.data td.l,
table.data th.l {
  text-align: left;
}
table.data td.wrap {
  white-space: normal;
  min-width: 220px;
}
table.data thead th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
table.data tbody tr:last-child td {
  border-bottom: 0;
}
table.data tbody tr:hover td {
  background: rgba(229, 184, 66, 0.04);
}
table.data tr.dim td {
  color: var(--muted);
}

/* --- Pied de page commun --- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080a0e;
  color: var(--muted);
  font-size: 14px;
  padding: 36px 0 28px;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.site-footer h3 {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--gold-hover);
}
.site-footer .legal {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
}
@media (max-width: 760px) {
  .site-footer .cols {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer .cols > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .eyebrow {
    letter-spacing: 0.2em;
    font-size: 11px;
  }
  .eyebrow::before,
  .eyebrow::after {
    width: 14px;
  }
}
