/* =========================================================
   LE NOM — page de tri
   ---------------------------------------------------------
   Une page faite pour PARCOURIR VITE : des vignettes qu'on
   balaie de l'œil et qu'on trie d'un clic. Tout est calibré
   là-dessus — densité, contraste, taille de cible.

   Habillage « carnet » (modèle Dossier Reis, 25/09/2026) :
   bandeau vert sapin, citron, Bricolage Grotesque + Figtree.
   UNIQUEMENT les jetons de carnet.css — le sombre suit seul.

   Cette feuille sert aussi de socle à /selection et à
   /marketing, qui la chargent avant la leur.
   ========================================================= */

/* ---------------------------------------------------------
   Socle des trois pages
   style.css (la feuille générale) passe avant celle-ci et
   pose ses propres règles sur p, a, h1-h3, listes, code.
   On les reprend ici à faible spécificité (:where) : les
   classes de la page gardent toujours la main.
   Tout est limité à <main> — la barre commune n'est jamais
   touchée.
   --------------------------------------------------------- */

body.noms, body.sel, body.mkt {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

:where(body.noms, body.sel, body.mkt) main.wrap {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 36px);
}
:where(body.noms, body.sel, body.mkt) main *,
:where(body.noms, body.sel, body.mkt) main *::before,
:where(body.noms, body.sel, body.mkt) main *::after { box-sizing: border-box; }

:where(body.noms, body.sel, body.mkt) main p { margin: 0 0 14px; max-width: 68ch; }
:where(body.noms, body.sel, body.mkt) main p:last-child { margin-bottom: 0; }

:where(body.noms, body.sel, body.mkt) main :is(h1, h2, h3) {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
  text-wrap: balance;
}
:where(body.noms, body.sel, body.mkt) main h3 {
  display: block;
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

:where(body.noms, body.sel, body.mkt) main strong,
:where(body.noms, body.sel, body.mkt) main b { font-weight: 600; color: inherit; }

:where(body.noms, body.sel, body.mkt) main a {
  color: var(--ink);
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

:where(body.noms, body.sel, body.mkt) main :is(ul, ol) { margin: 0 0 14px; padding-left: 1.25em; max-width: none; }
:where(body.noms, body.sel, body.mkt) main li { margin: 0 0 6px; }
:where(body.noms, body.sel, body.mkt) main li:last-child { margin-bottom: 0; }
:where(body.noms, body.sel, body.mkt) main li::marker { color: var(--accent); }

:where(body.noms, body.sel, body.mkt) main code {
  font-family: var(--mono);
  font-size: .84em;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

:where(body.noms, body.sel, body.mkt) main :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  :where(body.noms, body.sel, body.mkt) main a:hover { color: var(--ink); text-decoration-color: var(--ink); }
}

/* Le gras de la prose : surligné citron, comme sur Reis.
   Jamais dans les vignettes, les tableaux, les boutons, le bandeau. */
.noms .callout p strong,
.fam__i strong,
.sec__i strong,
.c p strong,
.alerte p strong,
.enc-simple p strong {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(transparent 56%, var(--surligne) 56%);
  padding: 0 2px;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

/* ---------------------------------------------------------
   Le bandeau vert sapin — le premier bloc de chaque page
   Pleine largeur même dans la colonne : l'ombre portée
   déborde sur les côtés, le clip-path la coupe en haut et
   en bas (aucun défilement horizontal).
   --------------------------------------------------------- */

.tete {
  margin: 0 0 clamp(28px, 4vw, 40px);
  padding: clamp(28px, 5vw, 48px) 0 clamp(24px, 4vw, 40px);
  /* hauteur arrondie au pixel : sans ça, un écran 1x montre un filet
     clair là où le fond et l'ombre portée se rejoignent */
  padding: round(clamp(28px, 5vw, 48px), 1px) 0 round(clamp(24px, 4vw, 40px), 1px);
  background: var(--band);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
  color: var(--band-ink);
}
.tete__k {
  margin: 0 0 12px;
  max-width: none;
  font: 600 12px/16px var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--citron);
}
.tete__t {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 5.5vw, 48px);
  font-weight: 800;
  line-height: 1.04;
  line-height: round(1.04em, 1px);
  letter-spacing: -.02em;
  text-wrap: balance;
  color: var(--band-ink);
}
.tete__s {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: 17px;
  line-height: 27px;
  color: var(--band-ink-2);
}
.tete__s strong,
.tete__s b { color: var(--band-ink); font-weight: 600; background: none; padding: 0; }
.tete a { color: var(--band-ink); text-decoration-color: var(--citron); }

/* ---------------------------------------------------------
   Les encadrés de la page (« déjà tranché », « le critère »)
   --------------------------------------------------------- */

.noms .callout {
  margin: 0 0 20px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.noms .callout .callout__label {
  margin: 0 0 10px;
  max-width: none;
  font: 600 12px/1.3 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.noms .callout p {
  max-width: 74ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

/* ---------------------------------------------------------
   Les sections et leurs titres (pastille citron, comme Reis)
   --------------------------------------------------------- */

.sec { margin: 0 0 72px; }

.sec__t {
  display: block;
  margin: 0 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
  color: var(--ink);
}
.sec__t::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 11px;
  border-radius: 3px;
  background: var(--citron);
  box-shadow: 0 0 0 2px var(--band);
  vertical-align: .08em;
}
/* Titre numéroté : le numéro reste au-dessus en surtitre, la
   pastille se pose devant le texte du titre. */
.sec__t:has(> .sec__n) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 11px;
  align-items: start;
}
.sec__t:has(> .sec__n)::before { grid-column: 1; grid-row: 2; margin: .42em 0 0; }
.sec__t > .sec__n { grid-column: 1 / -1; grid-row: 1; }
.sec__n {
  display: block;
  margin: 0 0 6px;
  font: 600 12px/1.3 var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.sec__i { margin: 0 0 22px; max-width: 70ch; font-size: 16px; color: var(--ink-2); }

.grand {
  margin: 48px 0 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.grand__n {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 13px/1.4 var(--body);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.grand__i { margin: 0 0 20px; max-width: 74ch; color: var(--ink-2); }

/* Le récapitulatif d'ouverture — « En 4 lignes », fond sapin */
.quatre {
  margin: 0 0 48px;
  padding: 20px 22px 22px;
  border-radius: 14px;
  background: var(--band);
  color: var(--band-ink);
}
.quatre .quatre__k {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 13px/1.5 var(--body);
}
.quatre .quatre__l { margin: 0; padding-left: 1.3em; max-width: 74ch; }
.quatre__l li { margin: 0 0 10px; line-height: 1.6; color: var(--band-ink); }
.quatre__l li:last-child { margin-bottom: 0; }
.quatre__l li::marker { color: var(--citron); font-weight: 700; }
.quatre__l strong { color: var(--citron); font-weight: 600; background: none; padding: 0; }
.quatre__l em { color: var(--band-ink); font-style: italic; }

/* Les cartes de synthèse */
.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.c {
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.c__t {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink);
}
.c p { margin: 0 0 10px; max-width: none; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.c strong { color: var(--ink); font-weight: 600; }

.chiffres {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--surface-2);
}
.chiffres__k {
  margin: 0 0 10px;
  font: 600 12px/1.3 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.chiffres ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chiffres li { margin: 0; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chiffres strong { color: var(--ink); }

.src { margin: 20px 0 0; max-width: none; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.src strong { color: var(--ink); font-weight: 600; }
.src a { color: var(--ink-2); }

/* L'avertissement */
.alerte {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--negatif);
  border-radius: 12px;
}
.alerte p { margin: 0 0 14px; max-width: 80ch; color: var(--ink); }
.alerte p:last-child { margin-bottom: 0; }
.alerte b { color: var(--negatif); }
.alerte__f { padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }

/* ---------------------------------------------------------
   Le sommaire des familles
   --------------------------------------------------------- */

.somm {
  margin: 0 0 40px;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.somm__tete {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.somm .somm__k {
  margin: 0;
  font: 600 12px/1.3 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.somm__b { display: flex; gap: 8px; margin-left: auto; }
.somm__x {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1 var(--body);
  cursor: pointer;
  transition-property: border-color, background-color, transform;
  transition-duration: .15s;
}
.somm__x:active { transform: scale(.97); background: var(--surface-2); }

.somm__liste { display: flex; flex-wrap: wrap; gap: 8px; }
.somm__f {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: 600 14px/1.3 var(--body);
  text-align: left;
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: .15s;
}
.somm__f:active { transform: scale(.98); }
/* Une famille fermée reste lisible mais s'efface : on voit d'un coup
   d'œil ce qui est ouvert. */
.somm__f.est-ferme { background: transparent; color: var(--ink-2); }
.somm__n { font: 600 12px/1 var(--body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.somm__g {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 12px/1.3 var(--body);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .somm__x:hover { border-color: var(--ink-3); }
  .somm__f:hover { background: var(--band); border-color: var(--band); color: var(--band-ink); }
  .somm__f:hover .somm__n { color: var(--band-ink-2); }
}

/* ---------------------------------------------------------
   Les familles — le titre est un bouton qui replie
   La pastille citron de Reis porte ici le chevron : elle
   pivote quand la famille est repliée.
   --------------------------------------------------------- */

.fam { margin: 0 0 40px; }
.fam[hidden] { display: none; }

.fam__t {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-align: left;
  text-wrap: balance;
  cursor: pointer;
  transition-property: color;
  transition-duration: .15s;
}
.fam__t:active { color: var(--accent); }
.fam__t:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.fam__chev {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--citron);
  color: var(--on-citron);
  box-shadow: 0 0 0 2px var(--band);
  font: 700 12px/1 var(--body);
  transition-property: transform;
  transition-duration: .18s;
  transition-timing-function: cubic-bezier(.2, .8, .2, 1);
}
.fam.est-replie .fam__chev { transform: rotate(-90deg); }

.fam__n {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font: 600 12px/1.4 var(--body);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.fam__i { margin: 0 0 16px; max-width: 76ch; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

/* Repliée : on ne garde que le titre. L'intro et la grille disparaissent
   entièrement (display:none) — les masquer en gardant leur hauteur ne
   réglerait rien au défilement, qui est tout le problème. */
.fam.est-replie .fam__i,
.fam.est-replie .grille { display: none; }
.fam.est-replie { margin-bottom: 16px; }

@media (hover: hover) {
  .fam__t:hover { color: var(--accent); }
}

/* ---------------------------------------------------------
   Les vignettes
   --------------------------------------------------------- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 12px;
}

.nm {
  position: relative;
  min-width: 0;
  padding: 16px 16px 68px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: .15s;
}
/* Une vedette : un filet à peine teinté, pas un aplat. */
.nm.est-vedette { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }

.nm__n {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  overflow-wrap: break-word;
}
.nm__o { margin: 4px 0 0; font-size: 13.5px; font-style: italic; line-height: 1.4; color: var(--ink-3); }
.nm__r { margin: 10px 0 0; max-width: none; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.nm__r strong { color: var(--ink); font-weight: 600; }
.nm__x { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--attention); }
.nm__s {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  font: 700 12px/1 var(--body);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.nm__s span { font-size: 10px; opacity: .7; }

/* Les deux boutons de tri, en bas de chaque vignette */
.nm__v {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}
.nm__b {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ground);
  color: var(--ink-2);
  font: 600 16px/1 var(--body);
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: .12s;
}
.nm__b:active { transform: scale(.97); }

@media (hover: hover) {
  .nm:hover { border-color: var(--ink-3); }
  .nm__b--oui:hover { border-color: var(--accent); color: var(--accent); }
  .nm__b--non:hover { border-color: var(--negatif); color: var(--negatif); }
}

/* Gardé : la vignette entière passe au sapin, le nom au citron.
   Le filet citron la détache aussi en sombre, où le sapin est
   proche du fond des cartes. */
.nm.est-oui {
  background: var(--band);
  border-color: var(--citron);
  box-shadow: inset 0 0 0 1px var(--citron);
}
.nm.est-oui .nm__n { color: var(--citron); }
.nm.est-oui .nm__o,
.nm.est-oui .nm__r,
.nm.est-oui .nm__s { color: var(--band-ink-2); }
.nm.est-oui .nm__r strong,
.nm.est-oui .nm__x { color: var(--band-ink); }
.nm.est-oui .nm__b { background: transparent; border-color: var(--band-line); color: var(--band-ink-2); }
.nm.est-oui .nm__b--oui { background: var(--citron); border-color: var(--citron); color: var(--on-citron); }

/* Jeté : la vignette s'efface (fond retiré, filet pointillé, nom
   barré) mais reste lisible — on peut changer d'avis. */
.nm.est-non { background: transparent; border-style: dashed; border-color: var(--ink-3); box-shadow: none; }
.nm.est-non .nm__n {
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-color: var(--negatif);
  text-decoration-thickness: 2px;
}
.nm.est-non .nm__o,
.nm.est-non .nm__r,
.nm.est-non .nm__r strong,
.nm.est-non .nm__x { color: var(--ink-3); }
.nm.est-non .nm__b { background: transparent; }
.nm.est-non .nm__b--non { background: var(--negatif); border-color: var(--negatif); color: var(--surface); }

@media (hover: hover) {
  .nm.est-oui .nm__b--non:hover { border-color: var(--band-ink-2); color: var(--band-ink); }
  .nm.est-non .nm__b--oui:hover { border-color: var(--accent); color: var(--accent); }
}

.nm--plat { padding: 12px 12px 64px; }
.nm--plat .nm__n { font-size: 18px; }

/* ---------------------------------------------------------
   Les noms de formation — affichés en ADRESSE
   Ces noms finiront en nom de domaine : c'est donc l'adresse
   qu'il faut lire en premier, la phrase vient en appui.
   --------------------------------------------------------- */

.grille .nm--dom { padding: 16px 16px 68px; }

.nm__dom {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.nm__dom i { font-style: normal; color: var(--ink-3); }
.nm__n2 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}
/* La disponibilité : l'information qui décide, donc elle se voit. */
.nm__d2 {
  margin: 8px 0 0;
  font: 700 11px/1.3 var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--positif);
}
.nm__dom2 {
  margin: 2px 0 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.nm__dom2 i { font-style: normal; opacity: .7; }
.nm.est-oui .nm__dom { color: var(--citron); }
.nm.est-oui .nm__n2,
.nm.est-oui .nm__d2,
.nm.est-oui .nm__dom2,
.nm.est-oui .nm__dom i { color: var(--band-ink-2); }

/* ---------------------------------------------------------
   Blocs d'appoint (versions précédentes de la page)
   --------------------------------------------------------- */

.deux-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.bloc {
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bloc__t { margin: 0 0 8px; font: 700 19px/1.25 var(--display); color: var(--ink); }
.bloc__i { margin: 0 0 16px; font-size: 15px; color: var(--ink-2); }
.bloc table { width: 100%; min-width: 0; font-size: 15px; }
.bloc td.num,
.bloc th:nth-child(2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.enc-simple {
  margin-bottom: 36px;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--surface-2);
}
.enc-simple p { margin: 0 0 12px; max-width: 80ch; font-size: 15.5px; color: var(--ink-2); }
.enc-simple p:last-child { margin-bottom: 0; }
.enc-simple b { color: var(--accent); }

/* « Ajouté ce soir » : une nouveauté se signale, en tête de page. */
.neuf {
  margin: 0 0 48px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--band);
  color: var(--band-ink);
}
.neuf .neuf__k {
  display: inline-block;
  margin: 0 0 14px;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 13px/1.5 var(--body);
}
.neuf__l { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.neuf__l li { display: grid; gap: 2px; margin: 0; }
.neuf .neuf__l a {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--band-ink);
  text-decoration: none;
}
.neuf__l a b { margin-right: 6px; color: var(--citron); font-weight: 700; }
.neuf__l a em {
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 12px/1.4 var(--body);
  font-style: normal;
  vertical-align: 2px;
}
.neuf__l span,
.neuf .neuf__f { font-size: 15px; color: var(--band-ink-2); }
.neuf .neuf__f { margin: 14px 0 0; }
.neuf__f b { color: var(--citron); }
@media (hover: hover) { .neuf .neuf__l a:hover { color: var(--citron); } }

/* ---------------------------------------------------------
   Le pied de page
   --------------------------------------------------------- */

.pied {
  margin-top: 24px;
  padding: 22px 0 48px;
  border-top: 1px solid var(--line);
  font: 600 12px/1.6 var(--body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* =========================================================
   LE RAIL DE SÉLECTION
   ---------------------------------------------------------
   Étroit, sur le côté, discret. Il accompagne la lecture des
   vignettes sans jamais la traverser. Il se pose SOUS la
   barre commune et sous-navigation (jamais par-dessus).
   ========================================================= */

.rail {
  position: fixed;
  top: calc(var(--carnet-h) + 60px);
  right: 16px;
  z-index: 60;
  width: 228px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;          /* la boîte vide autour de la pastille ne bloque rien */
}
.rail > * { pointer-events: auto; }

/* La pastille : toujours visible, c'est elle qui rend le rail découvrable. */
.rail__on {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 14px/1 var(--body);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition-property: transform, box-shadow;
  transition-duration: .15s;
}
.rail__on:active { transform: scale(.96); }
.rail__on:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rail__coeur { font-size: 14px; }
.rail__n { font: 800 17px/1 var(--display); font-variant-numeric: tabular-nums; }

.rail__corps {
  width: 100%;
  max-height: calc(100vh - var(--carnet-h) - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.rail__corps[hidden] { display: none; }

.rail .rail__k {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  max-width: none;
  font: 600 12px/1.2 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.rail__aide {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: 600 12px/1 var(--body);
  letter-spacing: 0;
  cursor: pointer;
  transition-property: border-color, color;
  transition-duration: .15s;
}
.rail__aide::after { content: ""; position: absolute; inset: -8px; }   /* cible de 40 px */
.rail__aide:active { color: var(--ink); border-color: var(--ink-2); }

/* Les trois groupes du rail : pseudo / formation / entreprise. */
.rail__liste { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.grp { display: flex; flex-wrap: wrap; gap: 6px; }
.rail .grp__t {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font: 600 11px/1.2 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rail .grp:first-child .grp__t { padding-top: 0; border-top: 0; }
.grp__t span {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--on-citron);
  font: 700 12px/1.3 var(--body);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surligne);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-align: left;
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: .12s;
}
.fav span { font: 400 11px/1 var(--body); opacity: .55; }
.fav em { font-style: normal; font-weight: 400; opacity: .6; }
.fav:active { transform: scale(.97); }
/* Un nom de formation s'affiche en adresse : la typo machine le
   distingue d'un pseudo au premier coup d'œil. */
.grp:nth-child(2) .fav { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -.01em; }

.rail .rail__vide { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.rail__vide[hidden] { display: none; }
.rail__vide b { color: var(--accent); }

.rail .rail__aide2 { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.rail__aide2 b { color: var(--ink); }

.rail__b { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.rail__x {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1.2 var(--body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: .12s;
}
.rail__x:active { transform: scale(.98); }
/* Le lien vers « Ma sélection » : c'est une sortie, pas un filtre. */
.rail__x--page { background: var(--citron); border-color: var(--citron); color: var(--on-citron); font-weight: 700; }
.rail__x--fort { background: var(--band); border-color: var(--band-line); color: var(--citron); }
.rail__x.est-actif { background: var(--band); border-color: var(--band-line); color: var(--band-ink); }

.rail .rail__pied {
  margin: 14px 0 0;
  max-width: none;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.rail__pied b { font: 800 14px/1 var(--display); color: var(--negatif); font-variant-numeric: tabular-nums; }
.rail__raz {
  margin: -10px 0;
  padding: 10px 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rail__raz:active { color: var(--negatif); }

.rail .rail__note {
  margin: 12px 0 0;
  max-width: none;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.rail__note[hidden] { display: none; }
.rail__note strong { color: var(--ink); }

@media (hover: hover) {
  .rail__on:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .24); }
  .rail__aide:hover { border-color: var(--ink-2); color: var(--ink); }
  .fav:hover { background: var(--citron); color: var(--on-citron); }
  .fav:hover span { opacity: 1; }
  .rail__x:hover { border-color: var(--ink-3); }
  .rail__x--page:hover { border-color: var(--citron); color: var(--on-citron); filter: brightness(1.04); }
  .rail__x--fort:hover,
  .rail__x.est-actif:hover { background: var(--band-2); }
  .rail__x--fort:hover { color: var(--citron); }
  .rail__x.est-actif:hover { color: var(--band-ink); }
  .rail__raz:hover { color: var(--negatif); }
}

/* Au doigt, les petites commandes du rail prennent leur taille pleine. */
@media (pointer: coarse) {
  .fav { min-height: 40px; }
}

/* Le contenu se pousse pour laisser la place au rail — sinon il recouvre
   la colonne de droite des grilles. */
@media (min-width: 1180px) {
  body.noms main.wrap { padding-right: 264px; }
}

/* Sous 1180 px, le rail se replie en pastille en bas à droite : il n'y
   a plus de marge à lui donner sans amputer la lecture. */
@media (max-width: 1179px) {
  .rail { top: auto; bottom: 16px; right: 16px; width: 260px; }
  .rail__corps { max-height: min(60vh, calc(100vh - var(--carnet-h) - 90px)); }
  /* Le chat occupe déjà ce coin : on le décale au-dessus du rail. */
  body.noms .chat-bulle { bottom: 78px; }
}
@media (max-width: 600px) {
  .rail { left: 16px; right: 16px; width: auto; }
}

/* ---------------------------------------------------------
   Écrans étroits
   --------------------------------------------------------- */

@media (max-width: 700px) {
  .grille { grid-template-columns: minmax(0, 1fr); }
  .nm__n { font-size: 21px; }
  .somm { padding: 16px; }
  .somm__b { width: 100%; margin-left: 0; }
  .somm__x { flex: 1; }
  .noms .callout { padding: 18px; }
  .quatre, .neuf { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .fam__chev, .nm, .nm__b, .fav, .rail__x, .rail__on, .somm__f, .somm__x { transition: none; }
}
