/* Wiki de Brumaria — généré par site/src/wiki.py. Couleurs : docs/art/charte-graphique.md */
:root {
  --fond: #1A1718; --fond-2: #2B2628; --fond-3: #403A3B; --bord: #4d4547;
  --texte: #EAEDEA; --texte-doux: #B4BCC0; --lien: #F2C94C; --lien-survol: #FFF0A8;
  --accent: #E8913A; --accent-sombre: #723317; --smog: #B5E61D; --acier: #A3B6CF;
  --carte: #231f20; --code: rgba(242,201,76,.12); --code-t: #FFF0A8;
  --pastille-fond: #1A1718;
  --titre: "Rockwell", "Roboto Slab", "Georgia", "Times New Roman", serif;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --haut: 60px; --bandeau: 290px;
  color-scheme: dark;
}
:root[data-theme="clair"] {
  --fond: #F8F6EE; --fond-2: #EFEBDF; --fond-3: #E2DCCB; --bord: #CFC6B0;
  --texte: #2B2628; --texte-doux: #5A5048; --lien: #8E4622; --lien-survol: #723317;
  --accent: #B5561C; --accent-sombre: #F2C94C; --smog: #4C7A0A; --acier: #3B5470;
  --carte: #FFFDF6; --code: rgba(114,51,23,.09); --code-t: #723317;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --fond: #F8F6EE; --fond-2: #EFEBDF; --fond-3: #E2DCCB; --bord: #CFC6B0;
    --texte: #2B2628; --texte-doux: #5A5048; --lien: #8E4622; --lien-survol: #723317;
    --accent: #B5561C; --accent-sombre: #F2C94C; --smog: #4C7A0A; --acier: #3B5470;
    --carte: #FFFDF6; --code: rgba(114,51,23,.09); --code-t: #723317;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--haut) + 12px); }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--corps); font-size: 16.5px; line-height: 1.6; }
a { color: var(--lien); }
a:hover { color: var(--lien-survol); }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--code); color: var(--code-t); padding: .05em .4em; border-radius: 5px; font-size: .92em; white-space: nowrap; }
.w-saut { position: absolute; left: -999px; top: 8px; background: var(--fond-2); padding: 8px 12px; z-index: 100; }
.w-saut:focus { left: 8px; }

/* En-tête */
.w-haut { position: sticky; top: 0; z-index: 30; height: var(--haut); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: linear-gradient(180deg, #2B2628, #1A1718); border-bottom: 2px solid #7A5A1C; color: #EAEDEA; }
.w-logo { display: block; line-height: 0; }
.w-logo img { height: 46px; width: auto; display: block; }
.w-logo-sous { font-family: var(--titre); font-weight: 900; font-size: 15px; color: #F2C94C; text-transform: uppercase; letter-spacing: .14em; text-decoration: none; }
.w-menu, .w-theme { background: #403A3B; color: #F2C94C; border: 1px solid #7A5A1C; border-radius: 8px; height: 38px; min-width: 38px; font-size: 18px; cursor: pointer; }
.w-menu { display: none; }
.w-site { color: #B4BCC0; font-size: 14px; white-space: nowrap; }
.w-recherche { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.w-recherche input { width: 100%; height: 38px; border-radius: 19px; border: 1px solid #7A5A1C; background: #1A1718; color: #EAEDEA; padding: 0 16px; font-size: 15px; }
.w-recherche input:focus { outline: 2px solid #F2C94C; outline-offset: 1px; }
.w-resultats { position: absolute; top: 44px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--carte); color: var(--texte);
  border: 1px solid var(--bord); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); max-height: 70vh; overflow: auto; }
.w-resultats li a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--texte); }
.w-resultats li a:hover, .w-resultats li a.choisi { background: var(--fond-3); }
.w-resultats strong { color: var(--lien); }
.w-resultats small { display: block; color: var(--texte-doux); }
.w-resultats .vide { padding: 10px; color: var(--texte-doux); }

/* Mise en page */
.w-cadre { display: grid; grid-template-columns: var(--bandeau) minmax(0, 1fr); min-height: calc(100vh - var(--haut)); }
.w-bandeau { position: sticky; top: var(--haut); height: calc(100vh - var(--haut)); overflow-y: auto; background: var(--fond-2); border-right: 1px solid var(--bord); }
.w-bandeau-int { padding: 12px 10px 40px; }
.w-bandeau ul { list-style: none; margin: 0; padding: 0 0 4px 12px; }
.w-bandeau li a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--texte); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.w-bandeau li a:hover { background: var(--fond-3); }
.w-bandeau a.actif { background: var(--accent); color: #1A1718; font-weight: 700; }
:root[data-theme="clair"] .w-bandeau a.actif { background: #723317; color: #FFF8E6; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .w-bandeau a.actif { background: #723317; color: #FFF8E6; } }
.w-rub > summary { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-family: var(--titre); font-weight: 700; color: var(--lien); list-style: none; }
.w-rub > summary::-webkit-details-marker, .w-sous summary::-webkit-details-marker { display: none; }
.w-rub > summary::after { content: "▸"; margin-left: auto; color: var(--texte-doux); transition: transform .15s; }
.w-rub[open] > summary::after { transform: rotate(90deg); }
.w-rub > summary:hover { background: var(--fond-3); }
.w-sous summary { list-style: none; display: flex; align-items: center; cursor: pointer; }
.w-sous summary::before { content: "▸"; width: 12px; margin-left: -12px; color: var(--texte-doux); font-size: 11px; transition: transform .15s; }
.w-sous details[open] > summary::before { transform: rotate(90deg); }
.w-sous summary a { flex: 1; }
.ico-rub { width: 26px; height: 26px; image-rendering: pixelated; }
.w-bientot-lien { display: block; margin: 14px 8px 0; padding: 8px 10px; border: 1px dashed var(--bord); border-radius: 8px; color: var(--texte-doux); text-decoration: none; font-size: 14px; }

.w-page { padding: 20px clamp(16px, 4vw, 48px) 40px; max-width: 1060px; min-width: 0; }
.w-ariane { font-size: 13.5px; color: var(--texte-doux); margin-bottom: 8px; }
.w-ariane a { color: var(--texte-doux); }
.w-entete { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  min-height: 230px; padding: 18px 16px 22px; margin: 4px 0 18px; border-radius: 16px; overflow: hidden; border: 2px solid #7A5A1C;
  background: url(../img/decor/nuages.png) center 60% / cover, url(../img/decor/loin.png) center 70% / cover, url(../img/decor/ciel.png) center / cover, #34435A;
  image-rendering: pixelated; }
.w-entete a { line-height: 0; }
.w-entete img { width: min(78vw, 520px); height: auto; display: block; image-rendering: auto; filter: drop-shadow(0 8px 12px rgba(0,0,0,.55)); }
.w-entete-sous { font-family: var(--titre); font-weight: 900; font-size: clamp(22px, 4vw, 34px); letter-spacing: .5em; padding-left: .5em;
  text-transform: uppercase; color: #FFF0A8; text-shadow: 0 2px 0 #723317, 0 4px 10px rgba(0,0,0,.7); margin-top: -6px; }
.w-page h1 { font-family: var(--titre); font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 6px 0 14px; color: var(--lien); }
.w-texte h2 { font-family: var(--titre); font-size: 25px; margin: 34px 0 10px; padding-bottom: 4px; border-bottom: 2px solid var(--bord); }
.w-texte h3 { font-family: var(--titre); font-size: 19px; margin: 24px 0 8px; color: var(--accent); }
.w-texte p, .w-texte li { max-width: 72ch; }
.w-beta { background: repeating-linear-gradient(135deg, rgba(242,201,76,.14) 0 12px, rgba(242,201,76,.06) 12px 24px); border: 1px solid #7A5A1C;
  border-radius: 10px; padding: 8px 14px; margin: 0 0 12px; font-weight: 600; }
.w-beta::before { content: "⚙ "; color: var(--accent); }
.w-sommaire { float: right; width: 250px; margin: 0 0 16px 24px; padding: 10px 14px; background: var(--fond-2); border: 1px solid var(--bord); border-radius: 12px; font-size: 14px; }
.w-sommaire ol { margin: 6px 0 0; padding-left: 20px; }
.w-astuce, .w-attention { border-left: 4px solid var(--smog); background: var(--fond-2); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 14px 0; max-width: 76ch; }
.w-attention { border-left-color: var(--accent); }
.w-figure { margin: 16px 0; }
.w-figure img { border-radius: 12px; display: block; }
.w-figure figcaption { font-size: 14px; color: var(--texte-doux); margin-top: 6px; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 28px 0; }
.w-trou { background: #F06449; color: #fff; padding: 0 4px; border-radius: 4px; }

/* Tableaux */
.w-table { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--bord); border-radius: 12px; clear: right; }
.w-table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.w-table caption { text-align: left; padding: 8px 12px; color: var(--texte-doux); }
.w-table th, .w-table td { padding: 8px 12px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: middle; }
.w-table thead th { background: var(--fond-3); font-family: var(--titre); font-size: 14.5px; white-space: nowrap; }
.w-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--fond-2) 60%, transparent); }
.w-table tbody tr:last-child td { border-bottom: 0; }
.w-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.w-mk th.mk { background: var(--pastille-fond); font-weight: 800; white-space: nowrap; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.w-mk tbody th.mk, .w-mk td:first-child.mk { background: var(--pastille-fond); }
.rar { display: inline-block; background: var(--pastille-fond); padding: 1px 9px; border-radius: 99px; font-weight: 700; font-size: 13.5px; border: 1px solid #403A3B; white-space: nowrap; }
.w-chances .num { min-width: 150px; }
.w-barre { display: inline-block; width: 70px; height: 8px; margin-left: 8px; background: var(--fond-3); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.w-barre span { display: block; height: 100%; background: var(--accent); }
.w-doux { color: var(--texte-doux); font-size: .92em; }
.w-plus { color: var(--smog); font-size: .9em; }
.w-bientot { color: var(--texte-doux); font-style: italic; }
.w-symbole { font-size: 20px; }
.w-cache-txt { position: absolute; left: -9999px; }

/* Icônes (textures du pack agrandies, pixel art net) */
.ico { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; margin-right: 6px; object-fit: contain; }
.ico-l { width: 48px; height: 48px; }
.ico-xl { width: 96px; height: 96px; }
.ico-titre { width: auto; height: 30px; }
.ico-vide { display: inline-block; width: 64px; height: 64px; }
.w-obj { white-space: nowrap; }
.w-mk-icones { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 10px 0 18px; }
.w-mk-icones li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 2px solid var(--bord); border-radius: 12px; background: var(--pastille-fond); }
.w-mk-icones .ico-xl { width: 72px; height: 72px; margin: 0; }
.w-grille { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.w-galerie { display: flex; flex-wrap: wrap; gap: 10px; }
.w-galerie img { width: 130px; height: auto; border-radius: 10px; background: var(--fond-2); }

/* Cartes */
.w-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 22px; clear: right; }
.w-carte { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; text-decoration: none; color: var(--texte); transition: transform .12s, border-color .12s; }
.w-carte:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--texte); }
.w-carte-ico .ico { margin: 0; width: 40px; height: 40px; }
.w-carte-ico .ico-l { width: 48px; height: 48px; }
.w-carte-txt { display: flex; flex-direction: column; min-width: 0; }
.w-carte-txt strong { color: var(--lien); font-family: var(--titre); }
.w-carte-txt span { font-size: 14px; color: var(--texte-doux); }

/* Schémas */
.w-altitude { margin: 14px 0 20px; border: 1px solid var(--bord); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #34435A 0%, #7489A8 45%, #E89A2A 80%, #5A2E06 100%); }
.w-palier { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px dashed rgba(255,255,255,.25); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.w-palier a { color: #fff; font-weight: 700; }
.w-palier.actif { background: rgba(26,23,24,.55); outline: 2px solid #F2C94C; outline-offset: -2px; }
.w-palier-m { font-variant-numeric: tabular-nums; opacity: .9; }
.w-palier-c, .w-palier-r { font-size: 14px; white-space: nowrap; }
.w-smog { background: repeating-linear-gradient(90deg, #6f8f12 0 20px, #B5E61D 20px 40px); color: #1A1718; font-weight: 800; text-align: center; padding: 6px; }
.w-fontaine { margin: 12px 0; }
.w-fontaine-ligne { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; margin: 6px 0; }
.w-fontaine-c { font-size: 13px; color: var(--texte-doux); white-space: nowrap; }
.w-pile { display: flex; height: 18px; border-radius: 6px; overflow: hidden; border: 1px solid var(--bord); }
.w-pile span { display: block; height: 100%; }
.w-legende { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.w-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,.3); }
.w-recette { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 10px 0 18px; }
.w-recette figcaption { width: 100%; font-size: 14px; color: var(--texte-doux); }
.w-grille3 { display: grid; grid-template-columns: repeat(3, 46px); gap: 3px; padding: 6px; background: #8B8B8B; border-radius: 6px; }
.w-case { width: 46px; height: 46px; background: #6E6E6E; border: 2px solid; border-color: #373737 #FFF #FFF #373737; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; overflow: hidden; }
.w-case .ico { margin: 0; width: 36px; height: 36px; }
.w-case.res { width: auto; min-width: 46px; padding: 4px 10px; gap: 4px; background: #8B8B8B; color: #1A1718; font-weight: 700; font-size: 13px; border-radius: 6px; }
.w-fleche { font-size: 28px; color: var(--texte-doux); }
.w-arbre { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 20px; }
.w-etage { border: 1px solid var(--bord); border-radius: 12px; padding: 8px; background: var(--fond-2); position: relative; }
.w-etage + .w-etage::before { content: "▲"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 12px; }
.w-etage-n { font-family: var(--titre); font-weight: 700; color: var(--accent); font-size: 14px; }
.w-etage-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 6px; }
.w-comp { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 8px 10px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.w-comp .ico { width: 28px; height: 28px; }
.w-rangs { color: var(--texte-doux); font-size: 13px; }
.w-frise { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: f; }
.w-frise li { flex: 1 1 160px; background: var(--carte); border: 1px solid var(--bord); border-top: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.w-frise-j { font-family: var(--titre); font-weight: 800; color: var(--lien); }
.w-commandes li { margin: 3px 0; }

/* Pages voisines et pied */
.w-suite { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; clear: both; flex-wrap: wrap; }
.w-suite a { flex: 1 1 240px; padding: 12px 16px; border: 1px solid var(--bord); border-radius: 12px; text-decoration: none; background: var(--carte); }
.w-suite a span { display: block; font-size: 13px; color: var(--texte-doux); }
.w-suiv { text-align: right; }
.w-pied { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--bord); font-size: 14px; color: var(--texte-doux); }
.w-mentions { font-size: 12.5px; }

/* Téléphone : le bandeau devient un menu (☰) */
@media (max-width: 900px) {
  .w-menu { display: inline-block; }
  .w-cadre { grid-template-columns: 1fr; }
  .w-bandeau { position: fixed; left: 0; top: var(--haut); bottom: 0; width: min(88vw, 330px); height: auto; z-index: 25; transform: translateX(-105%); transition: transform .2s; box-shadow: 6px 0 24px rgba(0,0,0,.4); }
  body.menu-ouvert .w-bandeau { transform: none; }
  .w-voile { position: fixed; inset: var(--haut) 0 0 0; background: rgba(0,0,0,.45); z-index: 20; }
  .w-sommaire { float: none; width: auto; margin: 0 0 16px; }
  .w-site { display: none; }
}
@media (max-width: 520px) {
  .w-resultats { position: fixed; left: 8px; right: 8px; top: calc(var(--haut) + 4px); max-height: calc(100vh - var(--haut) - 16px); }
  .w-logo-sous { display: none; }
  .w-haut { gap: 8px; padding: 0 10px; }
  .w-logo img { height: 36px; }
  .w-logo-sous { font-size: 12px; letter-spacing: .08em; }
  .w-palier { grid-template-columns: 64px 1fr; }
  .w-palier-c, .w-palier-r { grid-column: 2; }
  .w-table th, .w-table td { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Raretés (config.yml, cosmetiques.yml) */
.r-cuivre{color:#FFFFFF}
.r-bord-cuivre{border-color:#FFFFFF}
.r-peu_commun{color:#5FD38D}
.r-bord-peu_commun{border-color:#5FD38D}
.r-bronze{color:#5B8DEF}
.r-bord-bronze{border-color:#5B8DEF}
.r-laiton{color:#B266E8}
.r-bord-laiton{border-color:#B266E8}
.r-or{color:#F2C94C}
.r-bord-or{border-color:#F2C94C}
.r-emeraude{background-image:linear-gradient(90deg,#F04A3E,#FFD2CC,#F04A3E);-webkit-background-clip:text;background-clip:text;color:transparent}
.r-bord-emeraude{border-color:#F04A3E}
th.mk.r-emeraude,td.mk.r-emeraude{background-image:none;color:#F04A3E}
.r-unique{background-image:linear-gradient(90deg,#FF4FD8,#5CC8FF);-webkit-background-clip:text;background-clip:text;color:transparent}
.r-bord-unique{border-color:#FF4FD8}
th.mk.r-unique,td.mk.r-unique{background-image:none;color:#FF4FD8}
.r-platine{background-image:linear-gradient(90deg,#9FADBE,#F8FAFC,#9FADBE);-webkit-background-clip:text;background-clip:text;color:transparent}
.r-bord-platine{border-color:#9FADBE}
th.mk.r-platine,td.mk.r-platine{background-image:none;color:#9FADBE}
.r-platine_noel{background-image:linear-gradient(90deg,#D7263D,#F4F7FB,#F2C94C,#F4F7FB,#D7263D);-webkit-background-clip:text;background-clip:text;color:transparent}
.r-bord-platine_noel{border-color:#D7263D}
th.mk.r-platine_noel,td.mk.r-platine_noel{background-image:none;color:#D7263D}
.rl-commun{color:#FFFFFF}
.rl-peu_rare{color:#5B8DEF}
.rl-epique{color:#B266E8}
.rl-legendaire{color:#F2C94C}
.rl-mythique{background-image:linear-gradient(90deg,#F04A3E,#FFD2CC,#F04A3E);-webkit-background-clip:text;background-clip:text;color:transparent}
th.mk.rl-mythique,td.mk.rl-mythique{background-image:none;color:#F04A3E}
.rl-collector{background-image:linear-gradient(90deg,#9FADBE,#F8FAFC,#9FADBE);-webkit-background-clip:text;background-clip:text;color:transparent}
th.mk.rl-collector,td.mk.rl-collector{background-image:none;color:#9FADBE}
