/*
 * La page publique des « candidats dans la presse ».
 *
 * Les couleurs du site (theme.css) ; la palette des candidats est celle vérifiée pour
 * les daltoniens (dataviz : 8 teintes, ordre fixe, claires et sombres choisies pour
 * chaque fond) ; le ton : bleu pour, beige neutre, rouge contre (la maquette).
 * Règles de Saad : le choix actif en bloc plein, jamais souligné ; aucun arrondi,
 * aucune ombre, aucune majuscule espacée.
 */
:root {
  --serie-1: #257de0; --serie-2: #f47230; --serie-3: #00b894; --serie-4: #f2a600;
  --serie-5: #ee7fac; --serie-6: #008a17; --serie-7: #6a4ce2; --serie-8: #ec4647;
  --autres: #a89c8c;
  --ton-pour: #2370cd; --ton-neutre: #e8e2d8; --ton-contre: #dc3c3d;
  --n1: #cce3fd; --n2: #9dc8f7; --n3: #6aabf1; --n4: #338ced; --n5: #1b64be;
  --n-texte-fort: #ffffff;
  --statut-bon: #0aac23; --statut-haut: #f2a600; --statut-bas: #dc3c3d;
}
html[data-theme="dark"] {
  --serie-1: #338ced; --serie-2: #e76624; --serie-3: #00a888; --serie-4: #d28e05;
  --serie-5: #e24d8b; --serie-6: #0aac23; --serie-7: #9887ef; --serie-8: #eb6263;
  --autres: #5c5c5c;
  --ton-pour: #338ced; --ton-neutre: #383838; --ton-contre: #eb6263;
  --n1: #0e3d7e; --n2: #1757ac; --n3: #2370cd; --n4: #338ced; --n5: #6aabf1;
  --n-texte-fort: #000000;
  --statut-bon: #0aac23; --statut-haut: #d28e05; --statut-bas: #eb6263;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--g-fond);
  color: var(--g-encre);
  font-family: "OCR A Std Regular", "OCR A", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--g-encre); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px; }
header.site { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 28px; }
header.site a { text-decoration: none; font-size: 30px; line-height: 1.2; }

/* Les choix : un bloc plein pour l'actif, jamais un soulignement. */
.blocs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.blocs a { padding: 6px 12px; color: var(--g-encre-douce); text-decoration: none; border: 1px solid var(--g-filet); }
.blocs a:hover { color: var(--g-encre); border-color: var(--g-filet-fort); }
.blocs a.actif { background: var(--g-encre); color: var(--g-fond); border-color: var(--g-encre); }
/* Le clavier : un cadre net autour de ce qui a le focus, même sur un bloc plein. */
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ton-pour); outline-offset: 2px;
}
.onglets { margin-bottom: 16px; }
.reglages { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 28px; font-size: 13px; }
.reglages .blocs a { padding: 4px 10px; }
.choix { margin-bottom: 24px; font-size: 13px; }

main { display: block; }
h2 { margin: 0 0 12px; font-size: 16px; font-weight: 400; }
h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 400; color: var(--g-encre-douce); }
.note, .legende, .meta { color: var(--g-encre-douce); font-size: 12px; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 8px; }
.legende .entree { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.vide, .en-attente { color: var(--g-encre-douce); font-size: 12px; }

.bloc { margin-bottom: 36px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.deux > * { min-width: 0; }  /* un tableau large défile dans son cadre, la colonne ne s'élargit pas */

.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 36px; }
.chiffres div { border-top: 1px solid var(--g-filet-fort); padding-top: 10px; }
.chiffres .grand { display: block; font-size: 26px; line-height: 1.2; }
.chiffres .petit { color: var(--g-encre-douce); font-size: 12px; }

.pastille { display: inline-block; width: 10px; height: 10px; vertical-align: middle; flex: none; }
.pastille.motif { background-image: repeating-linear-gradient(45deg, transparent 0 2px, var(--g-fond) 2px 4px) !important; }
.pastille.ton-pour { background: var(--ton-pour); }
.pastille.ton-neutre { background: var(--ton-neutre); }
.pastille.ton-contre { background: var(--ton-contre); }

/* Les graphiques SVG. */
.graphique { display: block; width: 100%; height: auto; overflow: visible; }
.format-etroit { display: none; }
.graphique .grille { stroke: var(--g-filet); stroke-width: 1; }
.graphique .grille.axe { stroke: var(--g-filet-fort); }
.graphique .axe-texte, .graphique .direct { fill: var(--g-encre-douce); font-size: 11px; font-family: inherit; }
.graphique .direct { fill: var(--g-encre); }
.graphique .trait { fill: none; stroke-width: 2; }
.graphique .cible { fill: transparent; }
.graphique .cible:hover { fill: var(--g-filet-fort); }
.graphique .repere line { stroke: var(--g-encre-douce); stroke-dasharray: 2 3; }
.graphique .repere rect { fill: var(--g-encre-douce); }
.graphique .part path, .graphique .part circle { stroke: var(--g-fond); stroke-width: 2; }
.graphique .hachure { stroke: var(--g-fond); stroke-width: 2; }
.camembert { max-width: 220px; }
.nuage { max-width: 560px; }
.nuage .diagonale { stroke: var(--g-filet-fort); stroke-width: 1; }
.nuage .point circle { stroke: var(--g-fond); stroke-width: 2; }
.nuage .axe-texte, .nuage .direct { font-size: 13px; }
.nom-court { display: none; }
.statut { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.statut.dans { background: var(--statut-bon); }
.statut.dessus { background: var(--statut-haut); }
.statut.dessous { background: var(--statut-bas); }
.repere-legende { display: inline-block; width: 8px; height: 8px; background: var(--g-encre-douce); }
.camembert-et-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.parts { list-style: none; margin: 0; padding: 0; }
.parts li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }

/* Les rangées : un nom, une barre, une valeur. */
.rangs { list-style: none; margin: 0; padding: 0; }
.rangs li { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--g-filet); }
.rangs.simples li { grid-template-columns: minmax(140px, 1fr) auto; }
.rangs .nom { display: flex; align-items: center; gap: 8px; }
.valeur { color: var(--g-encre-douce); font-size: 12px; white-space: nowrap; }
.barre-ton { display: flex; height: 14px; gap: 2px; }
.barre-ton span { display: block; height: 100%; min-width: 0; }
.barre-ton .pour, .bande-ton .pour { background: var(--ton-pour); }
.barre-ton .neutre, .bande-ton .neutre { background: var(--ton-neutre); }
.barre-ton .contre, .bande-ton .contre { background: var(--ton-contre); }
.jauge { position: relative; display: block; height: 14px; border-left: 1px solid transparent; }
.jauge::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 1px solid var(--g-filet-fort); }
.jauge span { position: absolute; top: 0; bottom: 0; }
.jauge .plus { background: var(--ton-pour); }
.jauge .moins { background: var(--ton-contre); }
.bande-ton { display: flex; align-items: stretch; gap: 2px; height: 60px; }
.bande-ton .tranche { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; background: var(--g-surface-2); min-width: 2px; }
.bande-ton .tranche span { display: block; }

/* Les tableaux, la grille, le calendrier : les larges défilent dans leur cadre. */
.table-wrap { overflow-x: auto; border: 1px solid var(--g-filet); }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--g-filet); white-space: nowrap; }
thead th { color: var(--g-encre-douce); font-weight: 400; background: var(--g-surface-2); }
th.nombre, td.nombre { text-align: right; }
.grille td.case { text-align: right; min-width: 44px; }
.n1 { background: var(--n1); } .n2 { background: var(--n2); } .n3 { background: var(--n3); }
.n4 { background: var(--n4); color: var(--n-texte-fort); } .n5 { background: var(--n5); color: var(--n-texte-fort); }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--g-encre-douce); font-size: 12px; }
.calendrier { display: grid; grid-template-columns: repeat(auto-fill, minmax(12px, 1fr)); gap: 2px; }
.calendrier .jour { aspect-ratio: 1; background: var(--g-surface-2); }
.calendrier .jour.n1 { background: var(--n1); } .calendrier .jour.n2 { background: var(--n2); }
.calendrier .jour.n3 { background: var(--n3); } .calendrier .jour.n4 { background: var(--n4); }
.calendrier .jour.n5 { background: var(--n5); }

.classement { margin: 0; padding-left: 22px; }
.classement li { padding: 4px 0; }
ul.classement { list-style: none; padding: 0; }

/* Les journaux en mosaïque. */
.mosaique { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px; }
.mosaique a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--g-filet); text-decoration: none; }
.mosaique a:hover { border-color: var(--g-filet-fort); }
.mosaique a.actif { background: var(--g-encre); color: var(--g-fond); border-color: var(--g-encre); }
.mosaique a.actif .valeur { color: var(--g-fond); }

/* Le face-à-face : deux barres en miroir autour du nom du journal. */
.face-choix, .filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 24px; }
.filtres .groupe, .face-choix label { display: inline-flex; align-items: center; gap: 8px; }
.champ { height: 34px; padding: 0 8px; background: var(--g-surface); color: var(--g-encre); border: 1px solid var(--g-filet); font: inherit; font-size: 13px; }
.bouton { height: 34px; padding: 0 14px; background: var(--g-encre); color: var(--g-fond); border: 1px solid var(--g-encre); font: inherit; font-size: 13px; cursor: pointer; }
.miroir { list-style: none; margin: 0; padding: 0; }
.miroir li { display: grid; grid-template-columns: 1fr 140px 1fr; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--g-filet); }
.miroir .gauche, .miroir .droite { display: flex; align-items: center; gap: 6px; }
.miroir .gauche { justify-content: flex-end; }
.miroir .barre { display: block; height: 14px; }
.miroir .journal { text-align: center; font-size: 12px; }

/* Les articles. */
.articles { list-style: none; margin: 0; padding: 0; }
.articles > li { padding: 12px 0; border-bottom: 1px solid var(--g-filet); }
.articles p { margin: 0 0 4px; }
.articles .titre a { text-decoration: none; font-size: 15px; }
.articles .titre a:hover { text-decoration: underline; }
.avis { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--g-encre-douce); }
.avis li { margin: 2px 0; }
.ton { display: inline-block; min-width: 64px; padding: 0 6px; text-align: center; color: var(--g-encre); border: 1px solid var(--g-filet); }
.ton.pour { background: var(--ton-pour); border-color: var(--ton-pour); color: #fff; }
.ton.contre { background: var(--ton-contre); border-color: var(--ton-contre); color: #fff; }
.ton.neutre { background: var(--ton-neutre); border-color: var(--ton-neutre); }
q { font-style: italic; }
.pages { align-items: center; margin-top: 20px; }

.methode { max-width: 720px; }
.methode p { margin: 0 0 22px; }

@media (max-width: 760px) {
  .wrap { padding: 16px; }
  header.site a { font-size: 22px; }
  .deux { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .rangs li { grid-template-columns: 1fr auto; }
  .rangs li > .barre-ton, .rangs li > .jauge, .rangs li > .en-attente { grid-column: 1 / -1; grid-row: 2; }
  .miroir li { grid-template-columns: 1fr 90px 1fr; }
  .format-large { display: none; }
  .format-etroit { display: block; }
  .nom-long { display: none; }
  .nom-court { display: inline; }
}
