/* Design system du portfolio charleszogoue.ci, appliqué à TriCV.

   Seul fichier de style du site : jetons (couleurs, polices), fondations,
   puis composants dans l'ordre de la page (bandeau, notice, sections,
   critères, dépôt, classement, pied, manuel), et enfin l'écran étroit.

   Signature visuelle, identique à Rapprochement Facile : bandeau marine
   quadrillé fermé par un filet ambre de 8 px, filets marine de 3 px au-dessus
   des blocs, liens d'action soulignés d'ambre (.go), bande brume, puces à
   coins de 8 px, AUCUNE OMBRE, pied marine.

   ÉTAPE E2 : jetons, fondations, bandeau, notice, en-têtes de section, pied.
   Les composants des critères, du dépôt et du classement arrivent à l'étape
   E5, à la place marquée plus bas. */

@import url("../vendor/fonts/polices.css");

/* ── Jetons ──────────────────────────────────────────────────────────── */
/* Une VARIABLE CSS se déclare avec deux tirets et se lit avec var(). C'est
   l'équivalent d'une constante de module en Python : la couleur est écrite
   une fois ici, et toute la feuille s'y réfère. Changer le marine se fait
   donc en un seul endroit. */
:root {
  /* Repris tels quels du portfolio. L'indigo #4F46E5 de la maquette Streamlit
     n'en fait pas partie : ce n'était pas la couleur de la famille. */
  --navy: #123249;
  --navy-deep: #0b2233;
  --sky: #2c668f;
  --amber: #f2a31b;
  --amber-pale: #fbe3b3;
  --paper: #ffffff;
  --mist: #edf2f6;
  --rule: #d3dde6;
  --ink: #14222d;
  --muted: #566776;
  --on-navy: #d5e2ec;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* États et fonds pâles des messages, lisibles sur blanc. */
  --ok: #1d7a4f;
  --alert: #b23a2e;
  --amber-wash: #fdf3df;   /* fond d'avertissement, dérivé de l'ambre */
  --alert-wash: #f9e7e4;   /* fond d'erreur, dérivé de --alert */
  --ok-wash: #e7f3ec;      /* fond de confirmation, dérivé de --ok */

  /* Bandes de score du classement. Les valeurs de seuil (70 et 40) sont dans
     le JavaScript ; ici, seulement les teintes. Elles qualifient la
     correspondance aux mots-clés, pas le candidat. */
  --score-haut: #e7f3ec;
  --score-haut-texte: #14603c;
  --score-moyen: #fdf3df;
  --score-moyen-texte: #8a5a08;
  --score-bas: #f9e7e4;
  --score-bas-texte: #8e2c22;

  /* Thème clair imposé : le site n'a qu'un rendu, même si le système est en
     sombre. Un outil qui affiche des couleurs de score n'a pas deux palettes. */
  color-scheme: light;
}

/* ── Fondations ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.6;
  /* Chiffres de largeur fixe : indispensable pour que les scores d'une
     colonne s'alignent. */
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); font-size: .9em; }

/* Focus clavier : contour ambre de 3 px, comme le portfolio. Ne jamais le
   retirer — c'est le seul repère de qui navigue au clavier. */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Masqué à l'écran, mais lu par les lecteurs d'écran et utilisable au clavier. */
.visuellement-masque {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Colonne centrée, commune à toutes les sections. */
.cadre { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ── Bandeau marine ──────────────────────────────────────────────────── */
.bandeau {
  background-color: var(--navy);
  /* Quadrillage : deux dégradés d'un pixel, répétés en lignes et en colonnes. */
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 100% 44px, 116px 100%;
  color: var(--paper);
  border-bottom: 8px solid var(--amber);
}
.barre-haut {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 8px 28px; padding: 22px 0;
}
.marque {
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  text-decoration: none;
}
.marque b { color: var(--amber); }
.navigation {
  display: flex; flex-wrap: wrap; gap: 4px 26px;
  font-size: .94rem; font-weight: 600;
}
.navigation a {
  color: var(--on-navy); text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.navigation a:hover,
.navigation a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--amber); }

.surtitre {
  font-family: var(--display); font-weight: 700; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--amber);
  margin-top: 18px;
}
.bandeau h1 {
  /* clamp(min, souhaité, max) : le titre grandit avec la largeur de l'écran,
     sans jamais sortir de ces bornes. Évite une règle par taille d'écran. */
  font-size: clamp(2.9rem, 8vw, 5.6rem); font-weight: 800; line-height: .88;
  letter-spacing: -0.045em; margin: 10px 0 0 -0.04em;
}
.accroche {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px 56px; align-items: end;
  padding: 28px 0 44px;
}
.accroche__phrase {
  font-family: var(--display); font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.02em; color: var(--amber);
  margin-bottom: 12px; max-width: 24ch;
}
.accroche__texte { max-width: 54ch; color: var(--on-navy); }

/* La notice courte de confidentialité, dans le bandeau. */
.prive {
  border-left: 3px solid var(--amber); padding-left: 16px; color: var(--on-navy);
  font-size: .95rem; max-width: 42ch;
}
.prive strong { display: block; color: var(--paper); font-weight: 800; }

/* Page du manuel : bandeau réduit (titre plus petit, ni surtitre ni accroche). */
body[data-page="manuel"] .bandeau h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 44px; }

/* ── Notice intégrale, dépliable ─────────────────────────────────────── */
.notice { padding-top: 32px; }
.notice details {
  border: 1px solid var(--rule); border-top: 3px solid var(--navy);
  background: var(--mist);
}
.notice summary {
  font-family: var(--display); font-weight: 800; padding: 14px 20px; cursor: pointer;
}
.notice summary:hover { color: var(--navy); }
.notice__corps {
  display: grid; gap: 12px; padding: 4px 20px 20px; max-width: 76ch;
  color: var(--muted);
}

/* ── Sections, liens d'action, puces, messages ───────────────────────── */
.section { padding-top: 72px; }
.section__tete {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 12px 40px; margin-bottom: 36px;
}
.section__tete h2 {
  font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em;
}
.section__tete p { max-width: 52ch; color: var(--muted); }

/* Lien d'action souligné d'ambre (bouton ou lien, même allure). */
.go {
  display: inline-block; font-weight: 800; color: var(--navy); background: none;
  border: 0; padding: 0 0 2px; border-bottom: 3px solid var(--amber);
  cursor: pointer; text-decoration: none;
}
.go:hover { background: var(--amber-pale); }

/* Puce à coins de 8 px : modèle de poste, état d'un fichier, signalement. */
.puce {
  display: inline-block; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 8px; padding: 3px 10px; font-weight: 700; font-size: .86rem;
  line-height: 1.4; white-space: nowrap;
}
.puce--marine { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.puce--ambre { background: var(--amber-wash); border-color: var(--amber); color: #8a5a08; }
.puce--ciel { background: var(--mist); border-color: var(--sky); color: var(--sky); }

/* Messages. L'avertissement méthodologique du classement en est un, et il
   n'est jamais repliable ni masquable (garde-fou n°3 du §4 du cadrage). */
.alerte {
  border-left: 4px solid var(--sky); background: var(--mist);
  padding: 14px 18px; margin: 0;
}
.alerte--avertissement { border-left-color: var(--amber); background: var(--amber-wash); }
.alerte--erreur { border-left-color: var(--alert); background: var(--alert-wash); }
.alerte--succes { border-left-color: var(--ok); background: var(--ok-wash); }

/* Texte d'attente des zones encore vides (étape E2 uniquement). */
.vide {
  border: 1px dashed var(--rule); color: var(--muted); padding: 22px;
  text-align: center; font-size: .95rem;
}

/* ── Texte d'aide ────────────────────────────────────────────────────── */
.aide { color: var(--muted); font-size: .92rem; max-width: 76ch; margin-top: 8px; }

/* ── Barre de progression (jauge de poids, analyse, détail d'un critère) ─ */
.progression {
  height: 10px; background: var(--mist); border: 1px solid var(--rule);
  overflow: hidden;
}
.progression__barre {
  height: 100%; width: 0; background: var(--amber);
  transition: width .18s linear;
}
/* Au-delà de 100 points attribués : le dépassement se voit. */
.progression__barre--trop { background: var(--alert); }

/* ── Choix du modèle de poste ────────────────────────────────────────── */
.modeles { margin-bottom: 32px; }
.modeles__intitule {
  font-family: var(--display); font-weight: 800; margin-bottom: 10px;
}
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce--choix { cursor: pointer; font-family: var(--body); }
.puce--choix:hover { border-color: var(--navy); }
.puce--active { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.puce--neutre { color: var(--muted); }
.puce--neutre.puce--active { color: var(--paper); }

/* ── Jauge de poids ──────────────────────────────────────────────────── */
.jauge {
  border-top: 3px solid var(--navy); background: var(--mist);
  padding: 16px 20px; margin-bottom: 24px;
}
.jauge__tete {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-bottom: 10px;
}
.jauge__intitule { font-family: var(--display); font-weight: 800; }
.jauge__valeur { font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.jauge__note { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* ── Carte de critère ────────────────────────────────────────────────── */
.critere {
  border: 1px solid var(--rule); border-top: 3px solid var(--navy);
  padding: 18px 20px 20px; margin-bottom: 16px; background: var(--paper);
}
.critere__tete { display: flex; gap: 14px; align-items: flex-end; }
.critere__nom {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px;
  border: 1px solid var(--rule); background: var(--paper);
  font-family: var(--display); font-weight: 700;
}
.critere__poids { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.critere__etiquette { font-size: .82rem; font-weight: 700; color: var(--muted); }
.critere__poids input {
  width: 6.5rem; padding: 9px 10px; border: 1px solid var(--rule);
  background: var(--paper); font-variant-numeric: tabular-nums;
}
.critere__supprimer {
  flex: 0 0 auto; width: 40px; height: 40px; background: none;
  border: 1px solid var(--rule); color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1;
}
.critere__supprimer:hover { border-color: var(--alert); color: var(--alert); background: var(--alert-wash); }
.critere__mots {
  width: 100%; margin-top: 14px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--rule); background: var(--paper); line-height: 1.5;
}
.critere__apercu {
  margin-top: 8px; font-size: .86rem; color: var(--sky); font-weight: 700;
}
.critere__apercu:empty { display: none; }
.actions-critere { margin: 18px 0 0; }

/* ── Règles d'exclusion ──────────────────────────────────────────────── */
.exclusions {
  margin-top: 36px; border: 1px solid var(--rule); background: var(--mist);
}
.exclusions summary {
  font-family: var(--display); font-weight: 800; padding: 14px 20px; cursor: pointer;
}
.exclusions summary:hover { color: var(--navy); }
.exclusions__corps { padding: 0 20px 20px; }
.exclusions__corps .critere { background: var(--paper); }

/* ── Zone de dépôt ───────────────────────────────────────────────────── */
.depot {
  display: block; border: 2px dashed var(--rule); background: var(--mist);
  padding: 44px 24px; text-align: center; cursor: pointer;
}
.depot:hover, .depot--survol { border-color: var(--navy); background: var(--paper); }
.depot:focus-within { outline: 3px solid var(--amber); outline-offset: 3px; }
.depot__titre {
  display: block; font-family: var(--display); font-weight: 800; font-size: 1.15rem;
}
.depot__limites { display: block; margin-top: 8px; color: var(--muted); font-size: .9rem; }

/* ── Liste des fichiers déposés ──────────────────────────────────────── */
.fichiers { list-style: none; margin: 18px 0 0; padding: 0; }
.fichier {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--rule); border-left: 3px solid var(--sky);
  padding: 10px 14px; margin-bottom: 8px;
}
.fichier--refuse { border-left-color: var(--alert); background: var(--alert-wash); }
.fichier__texte { flex: 1 1 auto; min-width: 0; }
.fichier__nom { display: block; font-weight: 700; word-break: break-word; }
.fichier__taille { display: block; color: var(--muted); font-size: .86rem; }
.fichier__erreur { display: block; color: var(--alert); font-size: .88rem; margin-top: 4px; }
.fichier__retirer {
  flex: 0 0 auto; width: 32px; height: 32px; background: none;
  border: 1px solid var(--rule); color: var(--muted); cursor: pointer; line-height: 1;
}
.fichier__retirer:hover { border-color: var(--alert); color: var(--alert); }

/* ── Boutons pleins ──────────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 800;
  background: var(--navy); color: var(--paper); border: 0;
  padding: 14px 26px; cursor: pointer;
}
.btn:hover { background: var(--navy-deep); }
.btn:disabled { background: var(--rule); color: var(--muted); cursor: not-allowed; }
.btn--lancer { display: block; width: 100%; margin-top: 24px; font-size: 1.1rem; }
.btn--marine { background: var(--navy); }

/* ── Zone d'analyse ──────────────────────────────────────────────────── */
.analyse {
  margin-top: 28px; border: 1px solid var(--rule); border-top: 3px solid var(--amber);
  padding: 18px 20px; background: var(--mist);
}
.analyse .progression { margin-top: 16px; }
.analyse__etat {
  margin-top: 10px; font-weight: 700; font-size: .92rem; word-break: break-word;
}
.analyse--terminee { border-top-color: var(--ok); }
.analyse--terminee .progression__barre { background: var(--ok); }

/* ── Compteurs du classement ─────────────────────────────────────────── */
.blocs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0;
}
.bloc { border: 1px solid var(--rule); border-top: 3px solid var(--navy); padding: 16px 18px; }
.bloc__nombre {
  font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1;
}
.bloc__titre { margin-top: 6px; color: var(--muted); font-size: .88rem; }

/* ── Tableau de classement ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.classement { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.classement th, table.classement td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
table.classement th {
  background: var(--navy); color: var(--paper); font-family: var(--display);
  font-weight: 700; font-size: .86rem; white-space: nowrap;
}
table.classement tbody tr:nth-child(even) { background: var(--mist); }
.classement__rang { color: var(--muted); font-weight: 700; width: 1%; }
.classement__nom { font-weight: 700; overflow-wrap: anywhere; }
.classement__fichier { color: var(--muted); font-size: .86rem; word-break: break-all; }
.classement__score { width: 1%; }
.lien-contact {
  color: var(--sky); text-decoration: none; border-bottom: 1px solid var(--rule);
  /* Une adresse longue doit pouvoir se couper : sans cela, elle dépasse de
     la page sur un écran étroit et fait apparaître un défilement latéral. */
  overflow-wrap: anywhere;
}
.lien-contact:hover { border-bottom-color: var(--sky); }

/* Bandes de couleur du score. Elles qualifient la correspondance aux
   mots-clés, pas le candidat : la note sous le tableau le dit, et elle n'est
   pas une précaution de style. */
.score {
  display: inline-block; min-width: 3.2rem; text-align: center;
  padding: 4px 10px; border-radius: 8px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score--haut { background: var(--score-haut); color: var(--score-haut-texte); }
.score--moyen { background: var(--score-moyen); color: var(--score-moyen-texte); }
.score--bas { background: var(--score-bas); color: var(--score-bas-texte); }

/* ── Détail par candidat ─────────────────────────────────────────────── */
.details { margin-top: 44px; }
.details__titre { font-size: 1.3rem; font-weight: 800; margin-bottom: 14px; }
.candidat { border: 1px solid var(--rule); margin-bottom: 8px; background: var(--paper); }
.candidat__tete {
  font-family: var(--display); font-weight: 700; padding: 12px 16px; cursor: pointer;
}
.candidat__tete:hover { background: var(--mist); }
.candidat__corps { padding: 4px 16px 18px; }
.critere-detail { margin-top: 18px; }
.critere-detail__tete { font-weight: 700; margin-bottom: 8px; }
.critere-detail__mots {
  font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: 6px;
  word-break: break-word;
}
.candidat__corps .alerte { margin-top: 18px; }
.candidat__corps .alerte p + p { margin-top: 8px; }

/* ── À examiner manuellement ─────────────────────────────────────────── */
.illisibles { margin-top: 48px; border-top: 3px solid var(--navy); padding-top: 20px; }
.illisibles__titre { font-size: 1.3rem; font-weight: 800; margin-bottom: 14px; }
.illisibles .alerte { margin-bottom: 18px; }

/* ── Actions finales et dialogue ─────────────────────────────────────── */
.actions-finales {
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 44px;
}
.actions-finales__note { margin-top: 12px; }
.dialogue {
  border: 1px solid var(--rule); border-top: 8px solid var(--amber);
  padding: 28px; max-width: 46ch; background: var(--paper); color: var(--ink);
}
.dialogue::backdrop { background: rgb(18 50 73 / .55); }
.dialogue h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; }
.dialogue__actions {
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin-top: 24px;
}

/* ── Page du manuel ──────────────────────────────────────────────────── */
/* Une colonne de lecture étroite : au-delà d'environ 75 caractères, l'œil
   perd la ligne suivante en revenant à la marge. */
.manuel { max-width: 75ch; padding-top: 56px; }
.manuel > :first-child { margin-top: 0; }
.manuel h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin: 48px 0 16px; }
.manuel h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 48px 0 16px;
  padding-bottom: 8px; border-bottom: 3px solid var(--navy);
}
.manuel h3 { font-size: 1.2rem; font-weight: 800; margin: 32px 0 12px; }
.manuel p, .manuel ul, .manuel ol { margin: 14px 0; }
.manuel ul, .manuel ol { padding-left: 24px; }
.manuel li { margin: 6px 0; }
.manuel strong { font-weight: 800; }
.manuel hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }
.manuel code {
  background: var(--mist); padding: 1px 5px; border-radius: 4px; font-size: .88em;
}
/* Les encadrés « À retenir » du manuel, écrits en citation Markdown. */
.manuel blockquote {
  margin: 20px 0; padding: 14px 18px; border-left: 4px solid var(--amber);
  background: var(--amber-wash);
}
.manuel blockquote p { margin: 8px 0; }
.manuel blockquote > :first-child { margin-top: 0; }
.manuel blockquote > :last-child { margin-bottom: 0; }
.manuel table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .92rem; }
.manuel th, .manuel td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.manuel th { background: var(--navy); color: var(--paper); font-family: var(--display); }
.manuel tbody tr:nth-child(even) { background: var(--mist); }

/* Page du manuel : le bandeau se réduit (ni surtitre, ni accroche). */
body[data-page="manuel"] .surtitre { display: none; }
body[data-page="manuel"] .bandeau h1 { margin-bottom: 44px; }

/* ── Pied marine ─────────────────────────────────────────────────────── */
.pied {
  margin-top: 96px; background: var(--navy-deep); color: var(--on-navy);
  border-top: 8px solid var(--amber); padding: 44px 0 52px;
}
.pied__marque {
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--paper);
}
.pied__marque b { color: var(--amber); }
.pied__texte { max-width: 62ch; margin-top: 12px; font-size: .95rem; }
.pied__liens { margin-top: 18px; font-weight: 700; }
.pied__liens a { color: var(--amber); text-decoration: none; border-bottom: 2px solid transparent; }
.pied__liens a:hover { border-bottom-color: var(--amber); }

/* ── Écran étroit ────────────────────────────────────────────────────── */
/* Une REQUÊTE DE MÉDIA applique des règles sous une certaine largeur. C'est
   ce que Streamlit ne faisait pas : l'application actuelle est inutilisable
   au téléphone. */
@media (max-width: 700px) {
  .cadre { padding: 0 16px; }
  .barre-haut { padding: 16px 0; gap: 10px 18px; }
  .navigation { gap: 2px 18px; font-size: .9rem; }
  .accroche { grid-template-columns: 1fr; gap: 20px; padding: 22px 0 34px; }
  .prive { max-width: none; }
  .section { padding-top: 48px; }
  .section__tete { margin-bottom: 24px; }
  .pied { margin-top: 64px; padding: 32px 0 40px; }

  /* Le poids passe sous le nom : côte à côte, le champ de nom devient trop
     étroit pour qu'on lise ce qu'on tape. */
  .critere__tete { flex-wrap: wrap; }
  .critere__nom { flex: 1 1 100%; }
  .critere__poids { flex: 1 1 auto; }
  .critere__poids input { width: 100%; }

  .depot { padding: 32px 16px; }
  .blocs { grid-template-columns: repeat(2, 1fr); }
  .bloc__nombre { font-size: 1.9rem; }

  /* LE TABLEAU DEVIENT UNE LISTE DE CARTES.

     C'est le point que la version Streamlit ne traitait pas. Sept colonnes
     sur 375 px ne se lisent pas, et les faire défiler latéralement est une
     fausse solution : on perd la colonne « Candidat » dès qu'on va voir le
     score. Chaque ligne devient donc une carte, et chaque cellule affiche
     l'intitulé de sa colonne, repris de l'attribut data-intitule. */
  .table-wrap { overflow-x: visible; }
  table.classement thead { display: none; }
  table.classement, table.classement tbody, table.classement tr, table.classement td {
    display: block; width: 100%;
  }
  table.classement tr {
    border: 1px solid var(--rule); border-top: 3px solid var(--navy);
    margin-bottom: 12px; padding: 6px 0;
  }
  table.classement tbody tr:nth-child(even) { background: var(--paper); }
  table.classement td {
    display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 12px;
    border-bottom: 0; padding: 6px 14px;
  }
  table.classement td::before {
    content: attr(data-intitule);
    font-weight: 700; color: var(--muted); font-size: .82rem;
  }
  .classement__rang, .classement__score { width: auto; }

  .actions-finales { gap: 14px; }
  .dialogue { padding: 20px; margin: 16px; }

  /* Les tableaux du manuel ont deux ou trois colonnes de texte : ils tiennent
     mieux en défilement horizontal qu'en cartes, le contenu d'une cellule
     étant une phrase entière et non une valeur. */
  .manuel { padding-top: 36px; }
  .manuel table { display: block; overflow-x: auto; white-space: normal; }
  .manuel th, .manuel td { min-width: 10rem; }
}
