/* Le monde fou — feuille de style. Polices système uniquement. */
:root {
  --ink: #16193a; --ink-2: #3c4170; --muted: #6a6f93; --line: #e3e0d4;
  --bg: #fffdf6; --card: #ffffff; --soft: #f6f2e3;
  --lemon: #ffd23f; --lemon-ink: #8a6a00; --coral: #ff5e5b; --teal: #11998e; --sky: #3a86ff;
  --bar: #16193a; --bar-top: #ff5e5b; --map-land: #e9e3cc; --map-sea: #f4f1e6; --pin: #16193a; --pin-text: #ffd23f;
  --shadow: 0 1px 2px rgba(22, 25, 58, .06), 0 6px 22px rgba(22, 25, 58, .07);
  --r: 16px;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Roboto, Ubuntu, system-ui, sans-serif;
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", var(--sans);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1ff; --ink-2: #c9cbef; --muted: #9a9fc6; --line: #2d3263;
    --bg: #0f1230; --card: #171b42; --soft: #1d2250;
    --lemon: #ffd23f; --lemon-ink: #ffd23f; --coral: #ff7b78; --teal: #3ccfc0; --sky: #6ea6ff;
    --bar: #c9cbef; --bar-top: #ffd23f; --map-land: #2a3068; --map-sea: #141840; --pin: #ffd23f; --pin-text: #16193a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--lemon); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--lemon); color: #16193a; padding: 8px 12px; z-index: 9; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); font-weight: 900; margin: .3em 0 .25em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); font-weight: 850; margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; font-weight: 800; margin: 1.2em 0 .3em; }
.num, td.v, .big { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.js-only { display: none; }
html.js .js-only { display: revert; }
html.js .js-only.flex { display: flex; }

/* ---------- barre ---------- */
.top { background: #16193a; color: #fff; position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 900 1.2rem/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand em { color: #ffd23f; font-style: normal; }
.top nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { text-decoration: none; padding: 7px 10px; border-radius: 99px; font-weight: 650; font-size: .93rem; white-space: nowrap; color: #e7e8ff; }
.top nav a:hover, .top nav a[aria-current] { background: #2b3070; color: #ffd23f; }
.hasard { border: 0; background: #ffd23f; color: #16193a; font: 800 .9rem/1 var(--sans); padding: 9px 13px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.hasard:hover { background: #ffe27a; }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 6px 10px; padding: 8px 0 6px; }
  .top nav { order: 3; width: 100%; margin: 0 -6px; }
  .hasard { margin-left: auto; }
  .top { position: static; }
}

/* ---------- héros ---------- */
.hero { background: #16193a; color: #fff; overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; padding-top: 34px; padding-bottom: 40px; }
.hero h1 { color: #fff; margin-top: 0; }
.hero h1 em { color: #ffd23f; font-style: normal; }
.hero p.lead { color: #d9dbff; font-size: 1.12rem; max-width: 36em; }
.kicker { display: inline-block; font: 800 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #16193a; background: #ffd23f; padding: 6px 9px; border-radius: 6px; }
.hero .stat { background: #232860; border-radius: var(--r); padding: 22px; }
.hero .stat .big { font: 900 clamp(2.6rem, 7vw, 4.6rem)/1 var(--display); color: #ffd23f; display: block; margin: 6px 0; }
.hero .stat a { color: #fff; }
.hero svg.scale { width: 100%; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 22px; } }

/* page header with photo */
.phead { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; align-items: end; margin-top: 10px; }
.phead .lead { font-size: 1.12rem; color: var(--ink-2); }
.phead figure { margin: 0; }
@media (max-width: 860px) { .phead { grid-template-columns: 1fr; } }

/* ---------- photos ---------- */
figure.photo { margin: 0; position: relative; }
figure.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--soft); }
figure.photo figcaption { font-size: .74rem; color: var(--muted); margin-top: 5px; line-height: 1.35; }
figure.photo figcaption a { text-decoration-thickness: 1px; }

/* ---------- cartes ---------- */
.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.grid > * { flex: 0 1 calc((100% - 3 * 16px) / 4); min-width: 0; }   /* 4 / 2 / 1 columns, short last row centred (PARK-56) */
@media (max-width: 1000px) { .grid > * { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 560px) { .grid > * { flex-basis: 100%; } }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .15s; }
a.card:hover { transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--soft); }
.card .in { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card .t { font: 850 1.08rem/1.2 var(--display); }
.card .big { font: 900 1.65rem/1.05 var(--display); color: var(--coral); }
.card .s { font-size: .87rem; color: var(--muted); }
.tag { display: inline-block; font: 750 .7rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--lemon-ink); }
.rubriques { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rubriques a { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; box-shadow: var(--shadow); }
.rubriques b { display: block; font: 900 1.2rem/1.1 var(--display); }
.rubriques span { display: block; font-size: .85rem; line-height: 1.4; color: var(--muted); margin-top: 4px; }

/* ---------- fil d'Ariane ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.crumbs a { color: var(--muted); }

/* ---------- définition, encadrés ---------- */
.defn { background: var(--soft); border-left: 5px solid var(--lemon); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 18px 0; font-size: .96rem; }
.defn b { font-weight: 800; }
.dispute { background: color-mix(in srgb, var(--coral) 10%, var(--card)); border-left: 5px solid var(--coral); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 14px 0; font-size: .95rem; }
.saviez { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 10px 0 0; padding: 0; list-style: none; }
.saviez li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.saviez .big { display: block; font: 900 2.3rem/1 var(--display); color: var(--coral); margin-bottom: 4px; }

/* ---------- tableau ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 8px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: 650 .87rem/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
select, input[type=search] { font: inherit; font-size: .92rem; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); max-width: 100%; }
.tablewrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
table.rank { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.rank th, table.rank td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.rank thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--soft); }
table.rank td.r { font: 900 1.25rem/1 var(--display); color: var(--muted); width: 2.4em; }
table.rank tr.top3 td.r { color: var(--coral); }
table.rank td.v { font-weight: 800; white-space: nowrap; text-align: right; }
table.rank th.v { text-align: right; }
table.rank td.n a { font-weight: 750; }
table.rank td.n .c { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 3px; }
table.rank td.n .flag { font-size: .8rem; color: var(--muted); }
table.rank tr:last-child td { border-bottom: 0; }
.src { display: inline-block; font: 700 .68rem/1 var(--sans); padding: 3px 6px; border-radius: 5px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.src.wp { background: color-mix(in srgb, var(--sky) 14%, var(--card)); }
.disp { color: var(--coral); font-weight: 800; }
@media (max-width: 640px) {
  table.rank th.hide-m, table.rank td.hide-m { display: none; }
  table.rank th, table.rank td { padding: 9px 8px; }
}

/* ---------- graphiques ---------- */
.viz { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); margin: 14px 0; }
.viz h3 { margin-top: 0; }
.viz .scroll { overflow-x: auto; }
.viz svg { display: block; }
.viz svg.silh { min-width: 640px; width: 100%; }
.viz svg text { fill: var(--ink); font: 700 12px var(--sans); }
.viz svg .lab { fill: var(--ink-2); font-weight: 650; font-size: 11px; }
.viz svg .val { font-weight: 850; }
.viz svg .base { stroke: var(--muted); stroke-width: 1; }
.viz svg .grid { stroke: var(--line); stroke-width: 1; }
.viz svg .bar { fill: var(--bar); }
.viz svg .bar.top, .viz svg .shape.top { fill: var(--bar-top); }
.viz svg .shape { fill: var(--bar); }
.viz svg .ref { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 5 4; }
.viz svg .reftext { fill: var(--teal); font-weight: 800; }
.viz svg .person { fill: var(--muted); }
.viz svg g.hov:hover .bar, .viz svg g.hov:hover .shape { fill: var(--coral); }
svg.carte { width: 100%; display: block; }
svg.carte .globe, svg.carte .mer { fill: var(--map-sea); }
svg.carte .terre { fill: var(--map-land); stroke: var(--bg); stroke-width: .6; }
svg.carte .voisins { fill: color-mix(in srgb, var(--map-land) 50%, var(--map-sea)); }
svg.carte .pin circle { fill: var(--pin); stroke: var(--bg); stroke-width: 2; }
svg.carte .pin.top circle { fill: var(--coral); }
svg.carte .pin text { fill: var(--pin-text); font: 800 10px var(--sans); text-anchor: middle; }
svg.carte .pin.top text { fill: #fff; }
svg.carte-fr { max-height: 560px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* ---------- fiche ---------- */
.fiche-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; }
@media (max-width: 860px) { .fiche-top { grid-template-columns: 1fr; } }
.keyfig { background: #16193a; color: #fff; border-radius: var(--r); padding: 18px 20px; margin: 10px 0 16px; }
.keyfig .big { font: 900 clamp(2.4rem, 6vw, 3.6rem)/1 var(--display); color: #ffd23f; display: block; }
.ranks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ranks li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; display: flex; gap: 12px; align-items: center; }
.ranks .r { font: 900 1.6rem/1 var(--display); color: var(--coral); min-width: 2.2em; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; }
dl.facts dd { margin: 0; font-weight: 650; }

/* ---------- comparateur ---------- */
.cmp-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.cmp-form select { width: 100%; }
.cmp-form label { min-width: 0; font-size: .82rem; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) { .cmp-form { grid-template-columns: 1fr; } }
.cmp-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.cmp-out .big { font: 900 clamp(2.2rem, 6vw, 3.4rem)/1 var(--display); color: var(--coral); }
.units { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.units button { border: 0; background: transparent; color: var(--ink); padding: 6px 11px; font: 700 .82rem/1 var(--sans); cursor: pointer; }
.units button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- prose ---------- */
.prose { max-width: 760px; }
.prose li { margin: .3em 0; }
.placeholder { background: var(--lemon); color: #16193a; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
dl.ml dt { font-weight: 700; margin-top: 8px; }
dl.ml dd { margin: 2px 0 0; }
table.val { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.val th, table.val td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ok { color: var(--teal); font-weight: 800; }
.ko { color: var(--coral); font-weight: 800; }
code { font-size: .88em; background: var(--soft); padding: 1px 4px; border-radius: 4px; }

/* ---------- pied ---------- */
.foot { background: #16193a; color: #cfd2f5; margin-top: 60px; padding: 34px 0 26px; font-size: .9rem; }
.foot a { color: #fff; }
.foot-cols { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 24px; }
@media (max-width: 800px) { .foot-cols { grid-template-columns: 1fr; } }
.foot-brand { font: 900 1.2rem/1 var(--display); color: #fff; display: flex; gap: 8px; align-items: center; }
.foot-h { font-weight: 800; color: #ffd23f; text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; }
.foot-links { border-top: 1px solid #2b3070; padding-top: 14px; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .top, .foot, .filters, .hasard { display: none; } }
.fiche-scale svg.silh { min-width: 0; max-height: 420px; }
