/* Gabarit commun du site Barométier (pages générées par 20_site.py). */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --ink: #14181f; --ink2: #545b66; --line: #e2e5ea; --zone: #eef0f3;
  --accent: #2a78d6; --accent-soft: #e3eefb; --series2: #9fc3ee;
  --closing: #b8550f; --closing-soft: #fbeadd; --open: #12825a; --open-soft: #dcf2e8;
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1216; --surface: #171b21; --ink: #eef1f5; --ink2: #a2a9b4; --line: #2a3039; --zone: #20252d;
  --accent: #5b9cea; --accent-soft: #1b2a3d; --series2: #33557f;
  --closing: #f0955a; --closing-soft: #3a2518; --open: #4cc995; --open-soft: #143126; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --ink: #eef1f5; --ink2: #a2a9b4; --line: #2a3039; --zone: #20252d;
  --accent: #5b9cea; --accent-soft: #1b2a3d; --series2: #33557f;
  --closing: #f0955a; --closing-soft: #3a2518; --open: #4cc995; --open-soft: #143126; color-scheme: dark }

body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.55; margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
.num { font-family: var(--f-data); font-variant-numeric: tabular-nums; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding-block: 12px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
nav a { color: var(--ink2); text-decoration: none; padding-block: 2px; border-bottom: 2px solid transparent; }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
nav a:hover { color: var(--ink); }
.mock { font-size: 13px; color: var(--ink2); padding-block: 10px 0; }

main { display: grid; gap: 52px; padding-block: 28px 64px; }
.hero { display: grid; gap: 14px; }
.eyebrow { font-size: 14px; color: var(--ink2); }
.hero h1 { font-size: clamp(30px, 5.5vw, 46px); line-height: 1.06; letter-spacing: -0.02em; font-weight: 800; }
.lede { font-size: 19px; }

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .figures { grid-template-columns: 1fr; } }
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.fig .v { font-family: var(--f-display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; }
.fig .k { font-weight: 700; }
.fig .c { font-size: 14px; color: var(--ink2); }
.down { color: var(--closing); } .up { color: var(--open); }

section { display: grid; gap: 14px; }
section h2 { font-size: 26px; letter-spacing: -0.01em; }
.sub { color: var(--ink2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--f-data); font-size: 11px; fill: var(--ink2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink2); padding-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 15px; }
.filters select, .filters input { font: inherit; font-size: 15px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 100%; }
.filters select:focus-visible, .filters input:focus-visible, nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; white-space: nowrap; }
td.rank { color: var(--ink2); font-family: var(--f-data); width: 2.5em; }
td .small { display: block; font-size: 13px; color: var(--ink2); }
@media (max-width: 560px) { table { font-size: 14px; } th, td { padding: 9px 8px; } .hide-sm { display: none; } }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.o { background: var(--open-soft); color: var(--open); }
.pill.c { background: var(--closing-soft); color: var(--closing); }
.pill.n { background: var(--line); color: var(--ink2); }
.pill.a { background: var(--accent-soft); color: var(--accent); }

.meter { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--line); position: relative; vertical-align: middle; margin-left: 8px; }
.meter b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
@media (max-width: 560px) { .meter { display: none; } }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile h3 { font-size: 19px; }
.tile p { color: var(--ink2); font-size: 15px; }
.tile .q { font-family: var(--f-data); font-size: 12px; color: var(--accent); }

.sources { border-top: 1px solid var(--line); padding-top: 20px; gap: 10px; }
.sources h2 { font-size: 16px; color: var(--ink2); }
.sources dl { margin: 0; display: grid; gap: 4px 0; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.sources dt { font-weight: 700; margin-top: 8px; }
.sources dd { margin: 0; }

/* ===== Identité Barométier v2 : ciel, menthe, aiguille. Surcharge les jetons et composants ci-dessus. ===== */
/* Mise en page : colonne aérée (920 px), en-tête en pilule flottante, fond « météo » (menthe, ciel, soleil pâle). */
:root {
  --bg: #f7faf8; --surface: #ffffff; --ink: #0f1a1c; --ink2: #5a6b6e; --line: #e3ebe8; --zone: #eef5f2;
  --accent: #127a72; --accent-soft: #dff1ee; --series2: #a9d8d1; --sky: #3b82c4;
  --closing: #c2410c; --closing-soft: #fdeadf; --open: #0f7a55; --open-soft: #dcf3e8;
  --mint-blob: #d6f1e6; --sky-blob: #d9e8fa; --sun-blob: #fbf0cf;
  --shadow: 0 1px 2px rgba(15, 26, 28, .05), 0 12px 32px -18px rgba(15, 26, 28, .22);
  --glass: rgba(255, 255, 255, .72);
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1416; --surface: #121d20; --ink: #e8f1ef; --ink2: #9db0ad; --line: #22312f; --zone: #15231f;
  --accent: #4cc2b4; --accent-soft: #143430; --series2: #1f4c47; --sky: #7ab3ec;
  --closing: #f59a6a; --closing-soft: #3a2116; --open: #5fd3a2; --open-soft: #133325;
  --mint-blob: #0f2b25; --sky-blob: #0f2033; --sun-blob: #2a2612;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7); --glass: rgba(18, 29, 32, .72); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0c1416; --surface: #121d20; --ink: #e8f1ef; --ink2: #9db0ad; --line: #22312f; --zone: #15231f;
  --accent: #4cc2b4; --accent-soft: #143430; --series2: #1f4c47; --sky: #7ab3ec;
  --closing: #f59a6a; --closing-soft: #3a2116; --open: #5fd3a2; --open-soft: #133325;
  --mint-blob: #0f2b25; --sky-blob: #0f2033; --sun-blob: #2a2612;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7); --glass: rgba(18, 29, 32, .72); color-scheme: dark }

body { background: var(--bg); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(42rem 30rem at 8% -6%, var(--mint-blob), transparent 70%),
              radial-gradient(40rem 28rem at 96% 2%, var(--sky-blob), transparent 70%),
              radial-gradient(46rem 30rem at 50% 108%, var(--sun-blob), transparent 70%); }
.wrap { max-width: 960px; }
a { color: var(--accent); text-underline-offset: 3px; }

.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: transparent; border: 0; padding-top: 12px; }
.top .wrap { background: var(--glass); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow); max-width: 1080px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.brand .bn { color: var(--ink); }
.brand .bn span { color: var(--accent); }
.brand svg { width: 22px; height: 22px; flex: none; }
nav { gap: 2px; font-size: 14.5px; }
nav a { padding: 6px 12px; border-radius: 999px; border: 0; }
nav a:hover { background: var(--zone); color: var(--ink); }
nav a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; border: 0; }
@media (max-width: 760px) { .top .wrap { border-radius: 22px; } nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  nav a { white-space: nowrap; } }

main { gap: 72px; padding-block: 48px 72px; }
.hero { gap: 18px; }
.hero h1 { font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; font-size: clamp(36px, 6.4vw, 64px); }
.hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink2); max-width: 46rem; }
.eyebrow { display: inline-flex; justify-self: start; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink2); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.grad { background: linear-gradient(100deg, var(--accent), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.figures { gap: 14px; }
.fig, .card, .tbl, .tile, details { border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); background: var(--surface); }
.fig { padding: 20px; gap: 6px; }
.fig .v { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; }
.fig .k { font-weight: 600; }
section { gap: 16px; }
section h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; letter-spacing: -0.03em; }
.card { padding: 20px; }
.chart .ct { font-size: 16px; }
th { font-size: 11.5px; letter-spacing: .06em; padding-block: 14px; background: transparent; }
th, td { border-bottom-color: var(--line); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--zone); }
td a { color: var(--ink); font-weight: 600; text-decoration-color: var(--series2); text-decoration-thickness: 2px; }
td a:hover { color: var(--accent); }
.pill { border-radius: 999px; padding: 3px 10px; }
.filters select, .filters input { border-radius: 999px; padding: 8px 14px; background: var(--surface); }
.tile { padding: 22px; gap: 8px; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--series2); }
.tile h3 { font-weight: 600; letter-spacing: -0.02em; font-size: 20px; }
.tile .go { color: var(--accent); font-weight: 600; font-size: 14px; }
.sources { border-top: 1px solid var(--line); padding-top: 28px; }
.sources h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.site-foot { padding-block: 28px 40px; font-size: 13px; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-foot a { color: var(--ink2); }

/* Accueil */
.home-hero { position: relative; text-align: center; justify-items: center; padding-block: 36px 24px; }
.home-hero .lede { margin-inline: auto; }
.home-hero .eyebrow { justify-self: center; }
.search { position: relative; width: min(560px, 100%); margin-top: 8px; z-index: 2; }
.search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; padding: 16px 22px 16px 50px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.search input:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink2); }
.search ul { position: absolute; left: 0; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.search li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.search li a:hover, .search li a:focus-visible { background: var(--zone); outline: none; }
.search li span { color: var(--ink2); font-size: 14px; white-space: nowrap; }
.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 14px; color: var(--ink2); }
.proof b { color: var(--ink); }
.floats { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.chip { position: absolute; display: inline-flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.25;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; animation: flotte 7s ease-in-out infinite; }
.chip b { font-family: var(--f-display); font-size: 15px; font-weight: 600; }
.chip .o { color: var(--open); } .chip .c { color: var(--closing); }
@keyframes flotte { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-8px) rotate(var(--r, 0deg)); } }
.chip { width: 180px; box-sizing: border-box; }
@media (max-width: 1399px) { .floats { display: none; } }
@media (prefers-reduced-motion: reduce) { .chip, .tile { animation: none; transition: none; } }
.annuaire { display: grid; gap: 18px; }
.annuaire h3 { font-size: 15px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; }
.annuaire p { display: flex; flex-wrap: wrap; gap: 8px; }
.annuaire a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 14.5px; }
.annuaire a:hover { border-color: var(--accent); color: var(--accent); }

/* Fiche : le baromètre */
.baro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 760px) { .baro { grid-template-columns: 1fr; } }
.gauge { display: grid; justify-items: center; gap: 4px; padding: 18px 18px 16px; }
.gauge svg { width: min(260px, 100%); height: auto; }
.gauge .gv { font-family: var(--f-display); font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: -6px; }
.gauge .gk { font-weight: 600; text-align: center; }
.gauge .gc { font-size: 13.5px; color: var(--ink2); text-align: center; }
.gauge text { font-family: var(--f-data); font-size: 10px; fill: var(--ink2); }
.verdict { font-size: 14px; padding: 6px 14px; }

.verdict { justify-self: start; font-size: 14px; padding: 5px 12px; }
.chart .ct { font-family: var(--f-body); font-size: 16px; font-weight: 700; padding: 0 0 10px; }
.legend i.dash { width: 18px; height: 0; border-top: 2px dashed var(--ink2); border-radius: 0; vertical-align: 3px; }
.pay { display: grid; gap: 18px; }
.sal-row { display: grid; gap: 8px; }
.sal-row h3 { font-family: var(--f-body); font-size: 15px; font-weight: 700; }
.sal-line { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 10px; }
.sal-lab { font-size: 14px; color: var(--ink2); }
.sal-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sal-bar { height: 22px; border-radius: 4px; flex: none; }
.sal-bar.deb { background: var(--accent); } .sal-bar.conf { background: var(--ink2); opacity: 0.55; }
.sal-val { font-family: var(--f-data); font-size: 14px; font-weight: 500; white-space: nowrap; }
.pay-note { font-size: 13px; color: var(--ink2); }
.card h3 { font-size: 17px; margin-bottom: 6px; }
sup { font-size: 0.5em; vertical-align: 0.9em; }
@media (max-width: 520px) { .sal-bar { max-width: 60%; } }
