/* La face publique du French News Monitor : une feuille, pas de script, celle du
   German News Monitor, plus les cases des journaux et la table des sources.
   Les couleurs viennent des jetons --g-* de /theme.css (clair et sombre). */
:root {
  --bg: var(--g-fond);
  --panel: var(--g-surface);
  --panel-soft: var(--g-surface-2);
  --text: var(--g-encre);
  --muted: var(--g-encre-douce);
  --line: var(--g-filet);
  --line-strong: var(--g-filet-fort);
  --accent: var(--g-accent);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "OCR A Std Regular", "OCR A", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }

/* La barre des marques, comme sur l'admin : geheim.land à gauche, le nom
   de l'app à droite, même police et même corps (30 px, 24 px en colonne
   étroite). Hors de la colonne centrée, à 24 px des bords, pour tomber au
   même endroit que sur l'accueil. En colonne étroite, le nom passe sous
   la marque, toujours calé à droite, plutôt que de se couper. */
.site { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 24px 24px 0; line-height: normal; }
.brand, .app { text-decoration: none; font-size: 30px; letter-spacing: 1px; white-space: nowrap; }
.app { margin-left: auto; }
.brand:hover, .app:hover { color: var(--muted); }
@media (max-width: 600px) { .site { padding: 16px 16px 0; } .brand, .app { font-size: 24px; } }
.collections { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; font-size: 13px; }
.collections a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.collections a:hover { color: var(--text); }
.collections a.active { color: var(--text); border-bottom-color: var(--text); }

h1 { margin: 24px 0 8px; font-size: clamp(22px, 4vw, 30px); font-weight: 400; line-height: 1.2; }
h2 { margin: 32px 0 8px; font-size: 16px; font-weight: 400; }
h3 { margin: 4px 0; font-size: 15px; font-weight: 400; line-height: 1.35; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.back { display: inline-block; margin-top: 16px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.description { margin: 4px 0 12px; color: var(--muted); max-width: 70ch; }
.empty { color: var(--muted); }
.figure { margin: 8px 0 12px; color: var(--muted); }
.figure strong { color: var(--text); font-weight: 400; font-size: 20px; }

input, button, select {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px 8px;
}
input:focus, button:focus, select:focus { outline: none; border-color: var(--line-strong); }
button, select { cursor: pointer; }
button:hover, select:hover { border-color: var(--text); }
.search { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 12px; }
.search input { flex: 1 1 240px; }
.search a { color: var(--muted); }

/* L'interrupteur « retained only » : un lien qui recharge la page dans
   l'autre état. Un rail et un curseur carrés, dans le ton du reste ; à
   droite de la barre. */
.switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); text-decoration: none; }
.switch .track { position: relative; width: 26px; height: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; background: var(--muted); }
.switch:hover { color: var(--text); }
.switch[aria-checked="true"] { color: var(--text); }
.switch[aria-checked="true"] .track { border-color: var(--text); }
.switch[aria-checked="true"] .track::after { left: auto; right: 2px; background: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.card { display: block; padding: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.card:hover { border-color: var(--line-strong); }
.card .name { font-size: 15px; }
.card .description { margin: 6px 0 10px; font-size: 12px; }
.facts { display: flex; gap: 24px; margin: 0; }
.facts div { display: flex; flex-direction: column; }
.facts dt { color: var(--muted); font-size: 11px; }
.facts dd { margin: 0; }

/* Chaque article, chaque manifestation dans son cadre. */
.items { display: flex; flex-direction: column; gap: 12px; }
.item { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); }
.item header { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.item header .collection { color: var(--text); text-decoration: none; }
.item .summary { margin: 4px 0; color: var(--muted); overflow-wrap: anywhere; }
.item .route { font-size: 12px; }
.tags { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.tags span { color: var(--muted); border-bottom: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); }
.pager a { color: var(--text); text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* Les marques d'un article : hors de France, réservé aux abonnés. */
.item header .flag { color: var(--text); }

/* Les cases des journaux d'une collection : un lien chacune, qui recharge la
   page avec ce journal allumé ou éteint. Carrées, comme l'interrupteur ; la
   case allumée a son carré plein et son filet à l'encre. */
.journals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 13px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.chip .box { width: 9px; height: 9px; border: 1px solid var(--line-strong); }
.chip .n { font-size: 11px; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { color: var(--text); border-color: var(--text); }
.chip.on .box { background: var(--text); border-color: var(--text); }
.shortcut { padding: 5px 4px; font-size: 13px; color: var(--muted); }
.shortcut:hover { color: var(--text); }

/* La table des sources : une ligne par journal ; elle défile seule en colonne étroite. */
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 400; font-size: 12px; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; }

/* ── Les onglets (PLAN_FNM_ONGLETS) ───────────────────────────────────────
   Les couleurs des voix sont vérifiées pour les daltoniens (dataviz, le
   03/12/2026 : bleu la presse, orange l'État, vert d'eau les élus, gris le
   reste), une teinte pour le clair, une pour le sombre ; la grille « qui
   couvre quoi » va du bleu pâle au bleu franc. Le choix actif est un bloc
   plein, jamais souligné ; aucun arrondi, aucune ombre. */
:root {
  --voix-press: #2370cd; --voix-state: #e16c04; --voix-elected: #0f9d8a; --voix-other: #a89c8c;
  --tous: #e16c04;
}
html[data-theme="dark"] {
  --voix-press: #338ced; --voix-state: #ee761e; --voix-elected: #20b39e; --voix-other: #5c5c5c;
  --tous: #ee761e;
}
.blocs { display: flex; flex-wrap: wrap; gap: 4px; }
.blocs a { padding: 6px 12px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); text-decoration: none; }
.blocs a:hover { color: var(--text); border-color: var(--line-strong); }
.blocs a.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs { margin: 16px 0 14px; }
.choix { margin: 16px 0 14px; font-size: 13px; }
.choix a { padding: 4px 10px; }
.set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 0 0 32px; font-size: 13px; }
.set .grp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.set .lab { color: var(--muted); }
.set .blocs a { padding: 3px 10px; }

.bloc { margin: 0 0 44px; }
.bloc h2, .bloc > div > h2 { margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
h2 .aux { font-size: 12px; color: var(--muted); border-bottom: 1px dotted var(--line-strong); cursor: help; }
h2 .plus { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; }
h2 .plus:hover { color: var(--text); text-decoration: none; }
.meta { color: var(--muted); font-size: 12px; }
.note { margin: -6px 0 10px; }
.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.deux > div { min-width: 0; }

.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 40px; }
.figs a, .figs div.f { display: block; border-top: 1px solid var(--line-strong); padding-top: 10px; text-decoration: none; }
.figs a:hover { background: var(--panel-soft); }
.figs .big { display: block; font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.figs .small { display: block; color: var(--muted); font-size: 12px; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -6px 0 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sq { display: inline-block; width: 10px; height: 10px; flex: none; }
.sq.s-press { background: var(--voix-press); }
.sq.s-state { background: var(--voix-state); }
.sq.s-elected { background: var(--voix-elected); }
.sq.s-other { background: var(--voix-other); }
.sq.b { background: var(--text); }
.sq.tous { background: var(--tous); }

/* Les barres : deux formats, le large sur ordinateur, l'étroit sur téléphone. */
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg.chart.etroit { display: none; }
@media (max-width: 600px) { svg.chart.large { display: none; } svg.chart.etroit { display: block; } }
svg.chart text { font-family: inherit; font-size: 11px; fill: var(--muted); }
svg.chart text.dir { fill: var(--text); }
svg.chart line.base { stroke: var(--line-strong); stroke-width: 1; }
svg.chart line.grille { stroke: var(--line); stroke-width: 1; }
svg.chart line.repere { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
svg.chart rect.b { fill: var(--text); }
svg.chart rect.s-press { fill: var(--voix-press); }
svg.chart rect.s-state { fill: var(--voix-state); }
svg.chart rect.s-elected { fill: var(--voix-elected); }
svg.chart rect.s-other { fill: var(--voix-other); }
svg.chart .hit { fill: transparent; }
svg.chart a:hover .hit, svg.chart .hit:hover { fill: var(--line); fill-opacity: 0.5; }

/* Les lignes de barres : un nom, une barre, un nombre. */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 64px; align-items: center; gap: 12px; padding: 5px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
a.row:hover { background: var(--panel-soft); }
.row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .n { text-align: right; }
.row .track { position: relative; height: 12px; }
.row .bar { display: block; height: 12px; background: var(--text); }
.row .tous { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--tous); }

.words { display: flex; flex-wrap: wrap; gap: 6px; }
.words a { padding: 4px 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; text-decoration: none; }
.words a:hover { border-color: var(--line-strong); }
.words .k { color: var(--muted); font-size: 11px; margin-left: 6px; }

table.t td a { text-decoration: none; }
table.t td a:hover { text-decoration: underline; }

/* Les filtres posés sur Articles : chacun en bloc plein, avec sa croix. */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-size: 13px; }
.filters a.on { display: inline-flex; gap: 10px; align-items: center; padding: 4px 10px; background: var(--text); color: var(--bg); text-decoration: none; }
.filters a.on span { color: var(--line-strong); }
.filters .lab { color: var(--muted); }
mark { background: var(--g-hl-fond); color: var(--g-hl-encre); padding: 0 2px; }

.heads { display: flex; flex-direction: column; }
.heads a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 9px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.heads a:hover { background: var(--panel-soft); }
.heads .y { color: var(--muted); }
.method p { max-width: 62ch; margin: 0 0 8px; }
.method h2 { margin-top: 28px; }

@media (max-width: 760px) {
  .deux { grid-template-columns: minmax(0, 1fr); }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(100px, 150px) minmax(0, 1fr) 52px; }
}

/* Le ton (PLAN_FNM_TON) : cinq notes, deux teintes et un gris au milieu, vérifiées pour
   les daltoniens (dataviz, le 03/12/2026, en clair et en sombre) ; une note est toujours
   écrite en chiffres à côté de sa couleur. */
:root { --ton-m2: #b84a06; --ton-m1: #e8853a; --ton-z: #d4cbbf; --ton-p1: #5e9be0; --ton-p2: #1d5bb0; }
html[data-theme="dark"] { --ton-m2: #c94f0c; --ton-m1: #f3a565; --ton-z: #666666; --ton-p1: #86bcf4; --ton-p2: #2a75d6; }
.t-m2 { background: var(--ton-m2); } .t-m1 { background: var(--ton-m1); } .t-z { background: var(--ton-z); }
.t-p1 { background: var(--ton-p1); } .t-p2 { background: var(--ton-p2); }
svg.chart rect.t-m2 { fill: var(--ton-m2); } svg.chart rect.t-m1 { fill: var(--ton-m1); }
svg.chart rect.t-z { fill: var(--ton-z); } svg.chart rect.t-p1 { fill: var(--ton-p1); }
svg.chart rect.t-p2 { fill: var(--ton-p2); }
.figs .big .sq { width: 14px; height: 14px; margin-right: 8px; vertical-align: 2px; }
.split { display: flex; gap: 2px; height: 12px; }
.split span { display: block; height: 12px; min-width: 2px; }
.dv { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 60px 60px; align-items: center; gap: 12px; padding: 5px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
a.dv:hover { background: var(--panel-soft); }
.dv .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv .nm .sous { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.dv .m, .dv .n { text-align: right; }
.dv .n { color: var(--muted); }
.dv.head { color: var(--muted); font-size: 12px; border-bottom-color: var(--line-strong); }
.dv .peu { color: var(--muted); font-size: 12px; }
.item.note { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
.item .score { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 2px; }
.item .score .v { font-size: 22px; line-height: 1; }
.item .score .bar { width: 28px; height: 6px; }
.item .phrase { margin: 6px 0 0; padding: 6px 10px; background: var(--bg); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .dv { grid-template-columns: minmax(100px, 140px) minmax(0, 1fr) 52px 44px; }
}
