/* Présentation commune des guides. Les couleurs en ligne (quêtes, parties
   chasseur, surlignages de l'Outland) portent du sens : on ne les touche pas,
   on adoucit seulement les teintes pures des balises <font>. */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --side: #fafbfc;
  --line: #e3e6eb;
  --text: #1f2328;
  --muted: #59636e;
  --link: #1a5fb4;
  --quest: #1a5fb4;
  --hunter: #9b2c2c;
  --alert: #c62828;
  --radius: 12px;
  --maxw: 1280px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 24px 16px 64px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Le HTML d'origine impose ses polices partout ; on les neutralise. */
body * { font-family: inherit; }

p { margin: 0; }
b, strong { font-weight: 600; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

font[color="#0000ff"] { color: var(--quest); }
font[color="#800000"] { color: var(--hunter); }
font[color="#ff0000"] { color: var(--alert); }

/* Chaque grande table d'origine devient une carte. */
body > table {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

body > table > tbody > tr > td {
  padding: 24px 28px;
  vertical-align: top;
  border: 0;
}

/* Colonne des cartes et captures. */
body > table > tbody > tr > td + td {
  background: var(--side);
  border-left: 1px solid var(--line);
}

body > table > tbody > tr + tr > td { border-top: 1px solid var(--line); }

/* Tables internes (tableaux de talents, de temps…). */
td table { border-collapse: collapse; }
td table td { padding: 4px 8px; border: 1px solid var(--line); }

img { max-width: 100%; height: auto; border-radius: 6px; }

/* Titres de zone : liens « retour en haut » d'origine. */
body > table a[href="#top"] { color: var(--text) !important; }
body > table a[href="#top"] font { color: inherit; }

/* Étapes : le Word d'origine mettait tout en gras. */
p[style*="margin-left: 0.15in"] {
  margin-left: 2.4em !important;
  text-indent: -2.4em !important;
  padding: 1px 0;
}
p[style*="margin-left: 0.15in"] > b { font-weight: 400; }

/* Paragraphes vides de Word servant d'espacement. */
p.MsoNormal:empty, p:has(> br:only-child) { min-height: .6em; }

/* Intertitres hors carte (Outland). */
body > p { max-width: var(--maxw); margin: 0 auto; }
body > p[align="center"] { margin: 8px auto 16px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.totop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
}
.totop:hover { color: var(--text); text-decoration: none; }


@media print {
  body { background: #fff; padding: 0; }
  body > table { box-shadow: none; break-inside: auto; }
  .totop { display: none; }
}

/* Colonne des cartes : assez large pour qu'elles restent lisibles. */
body > table > tbody > tr > td + td { width: 38%; }
body > table > tbody > tr > td.portrait { width: 30%; text-align: center; vertical-align: middle; }

/* Sommaire des zones (guide 1-60). */
.toc {
  list-style: none;
  margin: 12px 0 20px;
  padding: 0;
  columns: 3 14em;
  column-gap: 24px;
}
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { font-weight: 500; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  body { padding: 12px 10px 64px; }
  body > table,
  body > table > tbody,
  body > table > tbody > tr,
  body > table > tbody > tr > td { display: block; width: auto !important; }
  body > table > tbody > tr > td { padding: 18px 16px; }
  body > table > tbody > tr > td + td { border-left: 0; border-top: 1px solid var(--line); }
}

p:has(+ .toc) { margin-top: 20px; }
