/* Wikiclash — design tokens (handoff « Et si Wikipédia faisait un jeu vidéo ? »).
   Thème clair par défaut, sombre via [data-theme="dark"] sur <html> (posé avant le premier rendu, voir index.html).
   Aucune couleur en dur ailleurs : uniquement ces variables. */

/* Libertinus Serif, servie en local (assets/fonts, licence SIL OFL 1.1) */
@font-face { font-family: 'Libertinus Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Libertinus Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Libertinus Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Libertinus Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Libertinus Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Libertinus Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/libertinus-serif-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg2: #f8f9fa;
  --bg3: #eaecf0;
  --on: #ffffff;
  /* Traits */
  --ln2: #c8ccd1;
  --ln: #a2a9b1;
  /* Texte */
  --ink: #202122;
  --sub: #54595d;
  --mut: #72777d;
  /* Couleurs de sens (palette Wikipédia) */
  --link: #3366cc;
  --link2: #447ff5;
  --vis: #795cb2;
  --ok: #14866d;
  --err: #d73333;
  --warn: #ac6600;
  --sel: #eaf3ff;
  --sel2: #a3d3ff;
  --sel3: #f5f9ff;
  --okbg: #f2fbf8;
  --errbg: #fdf3f3;
  --ovr: 255,255,255;
  --shr: 32,33,34;

  /* Typo */
  --serif: 'Linux Libertine', 'Libertinus Serif', Georgia, serif;
  --sans: -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* Rayons, ombres */
  --radius-btn: 2px;
  --radius-key: 3px;
  --shadow-card: 0 18px 36px -28px rgba(var(--shr), .45);
  --shadow-float: 0 24px 48px -24px rgba(var(--shr), .55);
  --shadow-modal: 0 30px 60px -30px rgba(var(--shr), .45);

  /* Mouvement */
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-soft: cubic-bezier(.2,.7,.2,1);
  --ease-in: cubic-bezier(.5,0,.7,.4);

  /* Mise en page plein écran */
  --top-h: 64px;
  --foot-h: 56px;
  --pad-x: clamp(24px, 4vw, 64px);
  --pad-y: clamp(14px, 2.6vh, 28px);
  --gap-col: clamp(18px, 3vw, 48px);
  --side-col: clamp(200px, 21vw, 300px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1f2125; --bg2: #26292e; --bg3: #30343a; --on: #16181b;
  --ln2: #454a52; --ln: #5f656e;
  --ink: #e7e8ea; --sub: #bcc1c7; --mut: #9ca2a9;
  --link: #8fa9ec; --link2: #adc0f2; --vis: #b3a4dc;
  --ok: #4fbf9f; --err: #f2806f; --warn: #e4a853;
  --sel: #263552; --sel2: #3d5a8a; --sel3: #222c40;
  --okbg: #1b3029; --errbg: #3a2424;
  --ovr: 31,33,37; --shr: 0,0,0;
  color-scheme: dark;
}

/* Raretés (canon : 6 niveaux) — bande en haut de carte + pastille carrée */
:root {
  --r-anecdotique: var(--ln);
  --r-commune: var(--ok);
  --r-memorable: var(--link);
  --r-epique: var(--vis);
  --r-mythique: var(--warn);
  --r-legendaire: var(--ink);
}
.r0 { --rc: var(--r-anecdotique); }
.r1 { --rc: var(--r-commune); }
.r2 { --rc: var(--r-memorable); }
.r3 { --rc: var(--r-epique); }
.r4 { --rc: var(--r-mythique); }
.r5 { --rc: var(--r-legendaire); }

/* Reset commun */
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); font-size: 13px; transition: background 300ms ease; }
* { box-sizing: border-box; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link) !important; box-shadow: inset 0 0 0 1px var(--link); }

/* Motif « image de l'article » en attendant la vraie vignette */
.wc-hatch { background: repeating-linear-gradient(135deg, var(--bg2) 0 8px, var(--bg3) 8px 9px); }
