/* Pages publiques : accueil, classement en direct, fiche coureur, statistiques, grand écran. */

.pied { margin-top: 2.5rem; }

.reseau { font-size: .85rem; color: var(--ok); white-space: nowrap; }
.reseau.hors-ligne { color: var(--erreur); }

.masque {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.message-chargement { padding-top: 1.5rem; }

.hero .surtitre + h1 + .discret { max-width: 40rem; font-size: 1.15rem; }

/* --- Accueil : bande terracotta des chiffres du format --- */

.bande-chiffres { background: var(--terracotta); color: #fff; }

.bande-chiffres .conteneur {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.bande-chiffres strong { display: block; font-family: var(--police-titres); font-size: 2rem; font-weight: 800; line-height: 1; }
.bande-chiffres span { font-size: .95rem; color: #fbe7de; }

@media (max-width: 760px) {
  .bande-chiffres .conteneur { grid-template-columns: repeat(2, 1fr); }
}

/* --- Bandeau d'une course : titre et chiffres à gauche, cadran des tours à droite --- */

.hero-course::after { display: none; } /* le cadran vivant remplace le filigrane */

/* Les rangées vides en haut et en bas centrent le texte à côté du cadran. */
.entete-course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas: ". cadran" "titre cadran" "chiffres cadran" "fin cadran" ". cadran";
  column-gap: 2.5rem;
}

.titre-course { grid-area: titre; }
.entete-course .cadran { grid-area: cadran; align-self: center; width: clamp(14rem, 25vw, 18.5rem); }
.entete-course .horloge-course { grid-area: chiffres; }
.entete-course .fin-course { grid-area: fin; justify-self: start; }

/* --- Cadran des tours (24 segments) : le compte à rebours au centre --- */

.cadran { position: relative; aspect-ratio: 1 / 1; }
.cadran svg { display: block; width: 100%; height: 100%; }
.cadran .disque { fill: rgb(20 38 29 / .55); }
.cadran .segment { fill: none; stroke: rgb(255 255 255 / .2); stroke-width: 7; transition: stroke .4s; }
.cadran .segment.passe { stroke: var(--genet); }
.cadran .segment.absent { stroke: rgb(255 255 255 / .06); } /* au-delà du dernier tour (format aux points) */
.cadran .segment.en-cours { stroke: var(--terracotta); stroke-width: 10; animation: segment-en-cours 2s ease-in-out infinite; }
.cadran .temps { fill: none; stroke: var(--genet); stroke-width: 2.5; opacity: .85; }

@keyframes segment-en-cours {
  50% { opacity: .55; }
}

.cadran-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  color: #fff;
  text-align: center;
}

.cadran-libelle {
  font-family: var(--police-titres);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--genet);
}

.cadran-libelle b { color: #fff; font-size: 1.5em; font-weight: 800; letter-spacing: .02em; }

.cadran-centre .decompte {
  font-family: var(--police-titres);
  font-size: clamp(2.6rem, 4.8vw, 3.6rem);
  font-weight: 800;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}

/* Décompte avec les heures (avant le départ) : plus petit, pour tenir dans le cadran. */
.cadran-centre .decompte.long { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.cadran-centre .decompte:empty { display: none; }

/* --- Chiffres clés, sur le bandeau vert : tuiles à filet clair --- */

.horloge-course {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .9rem;
  margin: 1.5rem 0 0;
}

.horloge-course > div {
  display: grid;
  gap: .15rem;
  padding: .8rem 1.1rem .85rem;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: var(--rayon);
  color: #fff;
}

.etiquette {
  font-family: var(--police-titres);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--discret);
}

.horloge-course .etiquette, .ecran-horloge .etiquette { color: var(--genet); }

.horloge-course strong {
  font-family: var(--police-titres);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Le décompte est affiché sur fond vert. À la dernière minute, il bat. */
.decompte.alerte { color: var(--sur-vert-alerte); }
.decompte.urgent { color: var(--sur-vert-urgent); animation: battement 1s ease-in-out infinite; }

@keyframes battement {
  50% { opacity: .55; }
}

.fin-course { font-size: 1.2rem; font-weight: 700; color: var(--ok); }

.hero .fin-course {
  display: inline-block;
  margin: 1.1rem 0 0;
  padding: .4rem 1.1rem;
  border-radius: 999px;
  background: var(--genet);
  color: #1b2620;
  font-family: var(--police-titres);
  font-size: 1.15rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* --- Actu de la course : fil de messages, façon messagerie --- */

.actu { margin-bottom: 1.75rem; }
.actu h2 { margin-top: .25rem; }

.actualites { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .75rem; }

.actualites li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }

.actu-avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--vert);
  color: var(--genet);
  font-family: var(--police-titres);
  font-size: 1.1rem;
  font-weight: 800;
}

.actu-bulle {
  padding: .7rem 1rem;
  border: 1px solid var(--bord);
  border-left: 3px solid var(--genet);
  border-radius: 4px var(--rayon) var(--rayon) var(--rayon);
  background: var(--surface);
}

/* Arrivé pendant la visite : bref halo pour attirer l'œil. */
.actualites li.nouvelle .actu-bulle { animation: halo-actu 2.5s ease-out; }

@keyframes halo-actu {
  from { box-shadow: 0 0 0 4px var(--genet); }
  to { box-shadow: 0 0 0 0 transparent; }
}

.actu-texte { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.actu-signature { margin: .3rem 0 0; font-size: .85rem; font-weight: 600; color: var(--discret); }

/* --- Outils et classement --- */

.outils { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.outils input { flex: 1 1 16rem; }

/* Liens d'outils en pilules, comme celles de la charte. */
.outils a {
  padding: .5rem 1rem;
  border: 2px solid var(--bord);
  border-radius: 999px;
  background: var(--surface);
  color: var(--titre);
  font-family: var(--police-titres);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}

.outils a:hover { border-color: var(--terracotta); color: var(--accent); }
.outils button { border-radius: 999px; }

.classement tr.hors_delai td,
.classement tr.abandon td,
.classement tr.non_partant td,
.classement tr.disqualifie td { color: var(--discret); }

.classement tr.hors_delai a,
.classement tr.abandon a,
.classement tr.non_partant a,
.classement tr.disqualifie a { color: var(--discret); }

/* Le vainqueur : liseré et fond or des genêts. */
.classement tr.vainqueur td { font-weight: 600; background: rgb(227 177 95 / .16); }
.classement tr.vainqueur td:first-child { box-shadow: inset 4px 0 0 var(--genet); }

.etoile {
  min-height: 36px;
  padding: 0 .4rem;
  border: 0;
  background: transparent;
  color: var(--genet);
  font-family: var(--police-texte);
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.etoile:hover:not(:disabled) { filter: none; }
.etoile[aria-pressed="false"] { color: var(--discret); font-weight: 400; opacity: .6; }

.titre-favoris { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.titre-favoris h2 { margin-bottom: .75rem; }
.titre-favoris button { min-height: 40px; }
#notifications[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }

.classement td.coureur { white-space: nowrap; }
.classement td.coureur a { font-weight: 600; text-decoration: none; color: var(--texte); }
.classement td.coureur a:hover { color: var(--accent); text-decoration: underline; }

/* Numéro de dossard en petite étiquette vert bocage. */
.classement .dossard {
  display: inline-block;
  min-width: 2.6em;
  margin-right: .6rem;
  padding: .05rem .4rem;
  border-radius: 5px;
  background: var(--vert);
  color: #fff;
  font-family: var(--police-titres);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Rang et nombre de tours : les chiffres qui comptent, en grand. */
.classement td.nombre { font-family: var(--police-titres); font-size: 1.4rem; font-weight: 800; color: var(--chiffre); }
.classement td.dernier-tour { font-family: var(--police-texte); font-size: .95rem; font-weight: 400; color: var(--discret); }

.classement th, .classement td { padding-left: .6rem; padding-right: .6rem; }

/* Format aux points : colonne des points ; masquée au format classique. */
#contenu:not([data-mode="points"]) .colonne-points { display: none; }
.classement td.colonne-points { color: var(--accent); }

/* Téléphone : le temps du dernier tour reste consultable dans la fiche. */
@media (max-width: 560px) {
  .classement .dernier-tour { display: none; }
}

.statut-sous-nom { display: none; }

/* --- Fiche coureur --- */

.fiche-titre { display: flex; align-items: center; gap: 1.2rem; margin: .5rem 0 1.25rem; }
.fiche-titre h2 { margin: 0; font-size: 2.4rem; font-weight: 800; }
.fiche-identite { display: grid; gap: .4rem; min-width: 0; }
.fiche-etat { display: flex; align-items: center; gap: .5rem; }

/* Le dossard, comme épinglé sur le maillot : carton blanc, deux épingles, gros chiffres. */
.dossard-fiche {
  min-width: 5.5rem;
  padding: .7rem .9rem .35rem;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12px 9px, #9fb0a5 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 12px) 9px, #9fb0a5 3px, transparent 3.5px),
    #fff;
  color: #1b2620;
  border: 2px solid #1b2620;
  box-shadow: var(--ombre);
  font-family: var(--police-titres);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: rotate(-2deg);
}

/* Chiffres clés : cartes blanches, gros chiffres vert bocage. */
.statistiques {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: .9rem;
  margin: 1rem 0 1.5rem;
}

.statistiques div {
  padding: 1rem 1.15rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}

.statistiques dt {
  font-family: var(--police-titres);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--discret);
}

.statistiques dd {
  margin: .2rem 0 0;
  font-family: var(--police-titres);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--chiffre);
}

/* Graphiques posés sur une carte, à largeur bornée : agrandis, les textes seraient démesurés. */
.graphique {
  max-width: 680px;
  margin: 1rem 0;
  padding: 1rem 1.1rem .8rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}

.graphique svg { display: block; width: 100%; height: auto; }
.graphique figcaption { margin-top: .4rem; font-size: .9rem; }
.graphique .barre { fill: var(--graphe); }
.graphique .grille { stroke: var(--bord); stroke-width: 1; }
.graphique .limite { stroke: var(--terracotta); stroke-width: 2; stroke-dasharray: 6 4; }
.graphique text { fill: var(--discret); font-family: var(--police-texte); font-size: 13px; }

/* Courbe d'allure (fiche coureur) : trait de 2 px, points terracotta cerclés du fond. */
.graphique .courbe { fill: none; stroke: var(--graphe); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.graphique .marqueur { fill: var(--terracotta); stroke: var(--surface); stroke-width: 2; }
.graphique .cible { fill: transparent; }
.graphique .point:hover .marqueur { r: 6px; }
.graphique .moyenne { stroke: var(--discret); stroke-width: 1; stroke-dasharray: 2 3; }
.graphique .legende-moyenne { font-size: 11px; }
.graphique .valeur { fill: var(--texte); font-weight: 600; }

/* --- Grand écran (F-22) : tableau d'affichage de nuit, lisible de loin, tout en unités d'écran.
       Sombre quel que soit le thème : c'est l'usage des panneaux de chronométrage. --- */

.ecran {
  --fond: #0b1712;
  --surface: #14261d;
  --texte: #e9eeea;
  --discret: #9fb0a5;
  --titre: #f5f6f2;
  --chiffre: #e3b15f;
  --bande: #1a3125;
  --bord: #2b4d3c;
  --accent: #ec9068;
  --ok: #6fbf8a;
  --alerte: #f0a04b;
  --erreur: #ff8f80;
  --or: #e3b15f;
  min-height: 100vh;
  padding: 1.5vw 2vw;
  display: flex;
  flex-direction: column;
  gap: 1.5vw;
  background: radial-gradient(120% 90% at 70% 0%, #24442f 0%, #14261d 55%, #0b1712 100%);
  color: var(--texte);
  cursor: none;
}

.ecran-haut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--police-titres);
  font-size: 2.6vw;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ecran-actions { display: flex; align-items: center; gap: 1.5vw; font-family: var(--police-texte); text-transform: none; letter-spacing: 0; }
.ecran-haut .reseau { font-size: max(.9rem, 1.1vw); }

/* Discret pendant l'affichage, net dès que la souris bouge. */
.quitter-ecran {
  padding: .35em 1em;
  border: 2px solid var(--bord);
  border-radius: 6px;
  color: var(--texte);
  font-family: var(--police-titres);
  font-size: max(.95rem, 1.15vw);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  opacity: .45;
  transition: opacity .2s, border-color .15s, color .15s;
}

.ecran.actif { cursor: auto; }
.ecran.actif .quitter-ecran, .quitter-ecran:focus-visible { opacity: 1; }
.quitter-ecran:hover { border-color: var(--genet); color: var(--genet); }

/* Aide du grand écran : discrète comme « Quitter ». */
.ecran .lien-aide { width: max(2rem, 2.3vw); height: max(2rem, 2.3vw); border-color: var(--bord); color: var(--texte); font-size: max(.95rem, 1.2vw); opacity: .45; transition: opacity .2s; }
.ecran.actif .lien-aide, .ecran .lien-aide:focus-visible { opacity: 1; }

/* Tour, cadran avec le décompte, en course. */
.ecran-horloge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5vw; }

.ecran-horloge > div:not(.cadran) {
  display: grid;
  align-content: center;
  padding: 1vw 1.5vw;
  border-top: .35vw solid var(--genet);
  border-radius: .8vw;
  background: var(--vert);
  color: #fff;
}

.ecran-horloge .etiquette, .ecran .cadran-libelle { font-size: 1.3vw; }
.ecran .cadran { width: 22vw; }
.ecran .cadran-centre .decompte { font-size: 5.8vw; }
.ecran .cadran-centre .decompte.long { font-size: 4.2vw; }

.ecran-horloge > div:not(.cadran) strong {
  font-family: var(--police-titres);
  font-size: 8.5vw;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ecran .fin-course { font-size: 3vw; text-align: center; margin: 0; }
.ecran .annonce-parcours { font-size: 2.4vw; text-align: center; margin: 0; }

/* Dernier message de l'organisation, en bandeau sous l'horloge. */
.ecran-actu {
  margin: 0;
  padding: .8vw 1.5vw;
  border-left: .5vw solid var(--genet);
  border-radius: .6vw;
  background: var(--bande);
  font-size: 2vw;
  font-weight: 600;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ecran-actu-heure { margin-right: 1vw; color: var(--genet); font-variant-numeric: tabular-nums; }

.ecran-corps { display: grid; grid-template-columns: 2fr 2fr 1.5fr; gap: 1.5vw; flex: 1; }

.ecran h2 {
  margin: 0 0 .8vw;
  font-size: 1.7vw;
  letter-spacing: .1em;
  color: var(--genet);
}

.pastilles { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .6vw; }

.pastille {
  min-width: 4.8vw;
  padding: .3vw .6vw;
  border: 1px solid var(--bord);
  border-radius: .5vw;
  background: var(--surface);
  color: var(--texte);
  font-family: var(--police-titres);
  font-size: 2.6vw;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pastilles.rentres .pastille {
  border-color: var(--ok);
  background: rgb(111 191 138 / .14);
  color: var(--ok);
}

.passages { list-style: none; margin: 0; padding: 0; display: grid; gap: .6vw; font-size: 1.5vw; }
.passages li { padding: .5vw .8vw; border-left: .3vw solid var(--terracotta); border-radius: .5vw; background: var(--bande); }

/* --- Impression du classement (F-92 : « Enregistrer au format PDF » du navigateur) --- */

@media print {
  :root {
    --fond: #fff;
    --surface: #fff;
    --texte: #000;
    --discret: #333;
    --accent: #000;
    --ok: #000;
    --erreur: #000;
    --alerte: #000;
    --or: #000;
    --bord: #999;
    --titre: #000;
    --chiffre: #000;
    --bande: #fff;
    --vert: #fff;
    --genet: #000;
  }

  @page { margin: 1.5cm; }

  body { font-size: 11pt; }

  .entete, .pied-page, .outils, #section-favoris, #section-actu, .horloge-course, .cadran, #vue-fiche, .statut-sous-nom,
  .classement th:first-child, .classement td:first-child { display: none !important; }

  .hero { background: none; color: #000; }
  .hero::after { display: none; }
  .hero > .conteneur { padding: 0; }
  .hero h1 { color: #000; font-size: 24pt; }
  .classement .dossard { border: 1px solid #000; color: #000; }
  .classement .dernier-tour { display: table-cell !important; }
  .classement a { color: inherit; text-decoration: none; }
  .classement tr { break-inside: avoid; }
  .conteneur { max-width: none; padding: 0; }
  .defilant { border: 0; }
  h1 { margin-top: 0; }
}

/* Grand écran ouvert sur un téléphone : décompte en tête, sections empilées sans vides. */
@media (max-width: 800px) {
  .ecran { gap: 1rem; padding: 1rem; }
  /* Nom et actions : les actions passent à la ligne quand la place manque. */
  .ecran-haut { flex-wrap: wrap; row-gap: .5rem; font-size: 1.3rem; }
  .ecran-haut > :first-child { min-width: 0; overflow-wrap: anywhere; }
  .ecran-actions { margin-left: auto; }
  .ecran-horloge { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .ecran-horloge > div:not(.cadran) { padding: .7rem .9rem; border-top-width: 3px; border-radius: 8px; }
  .ecran-horloge > .cadran { grid-column: 1 / -1; order: -1; justify-self: center; width: min(70vw, 16rem); }
  .ecran-horloge .etiquette, .ecran .cadran-libelle, .ecran h2 { font-size: .85rem; }
  .ecran-horloge > div:not(.cadran) strong { font-size: 2.8rem; }
  .ecran .cadran-centre .decompte { font-size: 3.6rem; }
  .ecran .cadran-centre .decompte.long { font-size: 2.6rem; }
  .ecran-corps { grid-template-columns: 1fr; flex: none; gap: 1.25rem; }
  .ecran h2 { margin-bottom: .5rem; }
  .pastilles { gap: .4rem; }
  .pastille { min-width: 3rem; padding: .2rem .5rem; border-radius: 6px; font-size: 1.5rem; }
  .passages { gap: .4rem; font-size: 1rem; }
  .passages li { padding: .45rem .7rem; border-left-width: 3px; border-radius: 6px; }
  .ecran .fin-course, .ecran .annonce-parcours, .ecran-actu { font-size: 1.15rem; }
  .ecran-actu { padding: .6rem .9rem; border-left-width: 4px; border-radius: 8px; }
}

/* --- Téléphone : pages publiques --- */

@media (max-width: 640px) {
  /* Bandeau plus compact : deux tuiles par rangée, chiffres sur une ligne. */
  .hero h1 { font-size: 2.3rem; }
  .horloge-course > div { padding: .55rem .75rem .6rem; }
  .horloge-course strong { font-size: clamp(1.6rem, 7.5vw, 2.2rem); white-space: nowrap; }
  .etiquette { font-size: .78rem; letter-spacing: .1em; }
  .bande-chiffres strong { font-size: 1.6rem; }

  /* Bandeau d'une course : le cadran à gauche, les deux chiffres empilés à sa droite. */
  .entete-course {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "titre titre" "cadran chiffres" "fin fin";
    column-gap: .9rem;
  }

  .entete-course .cadran { width: 10.5rem; }
  .entete-course .horloge-course { grid-template-columns: 1fr; gap: .5rem; margin-top: 0; align-self: center; }
  .cadran-libelle { font-size: .62rem; letter-spacing: .1em; }
  .cadran-centre { gap: .05rem; }
  .cadran-centre .decompte { font-size: 2.2rem; }
  .cadran-centre .decompte.long { font-size: 1.6rem; }

  /* Fiche et statistiques : le bandeau se réduit au nom, à un petit cadran et aux coureurs en course. */
  #contenu:not([data-vue="classement"]) .infos-course { display: none; }
  #contenu:not([data-vue="classement"]) .hero h1 { font-size: 1.6rem; }
  #contenu:not([data-vue="classement"]) .entete-course .cadran { width: 8.5rem; }
  #contenu:not([data-vue="classement"]) .cadran-centre .cadran-libelle:first-child { display: none; }
  #contenu:not([data-vue="classement"]) .horloge-course > div:nth-child(2) { display: none; }

  /* Outils : recherche sur toute la largeur, pilules plus petites ; l'impression n'a pas sa place ici. */
  .outils { gap: .45rem; }
  .outils input { flex-basis: 100%; }
  .outils a { padding: .4rem .8rem; font-size: .92rem; }
  #imprimer { display: none; }

  /* Classement : la colonne Statut disparaît, le statut passe sous le nom. */
  .classement .colonne-statut { display: none; }
  .statut-sous-nom { display: block; margin-top: .25rem; }
  .statut-sous-nom .badge { font-size: .8rem; padding: .08rem .5rem; }
  .classement td.coureur { white-space: normal; }
  .classement th, .classement td { padding-left: .4rem; padding-right: .4rem; }
  .classement .dossard { min-width: 2.2em; margin-right: .4rem; }
  .classement td.nombre { font-size: 1.25rem; }
  .etoile { padding: 0 .15rem; }

  /* Fiche coureur */
  .fiche-titre { gap: .9rem; }
  .fiche-titre h2 { font-size: 1.8rem; }
  .dossard-fiche { min-width: 4.3rem; padding: .6rem .7rem .3rem; font-size: 2.1rem; }
  .statistiques { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .statistiques div { padding: .7rem .8rem; }
  .statistiques dd { font-size: 1.7rem; }
  .graphique { padding: .75rem .5rem .5rem; }

  /* Actu */
  .actualites li { gap: .5rem; }
  .actu-avatar { width: 2.1rem; height: 2.1rem; font-size: .95rem; }
}

/* --- Guide d'utilisation (/aide) --- */

.sommaire { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; margin: 1.5rem 0 .5rem; }

.sommaire a {
  display: grid;
  gap: .2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--texte);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.sommaire a:hover { border-color: var(--terracotta); transform: translateY(-3px); }
.sommaire strong { font-family: var(--police-titres); font-size: 1.3rem; font-weight: 700; text-transform: uppercase; color: var(--titre); }
.sommaire span { font-size: .92rem; color: var(--discret); }

.guide-section {
  margin-top: 1.25rem;
  padding: 1.4rem 1.4rem .9rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  scroll-margin-top: 4.5rem; /* sous l'en-tête collant */
}

.guide-section h2 { margin-top: 0; }
.guide-section h3 { margin: 1.25rem 0 .35rem; font-size: 1.2rem; }
.guide-section ul, .guide-section ol { margin: .4rem 0 .8rem; padding-left: 1.25rem; }
.guide-section li { margin: .35rem 0; line-height: 1.55; }
.guide-section dt { margin-top: .9rem; font-weight: 600; color: var(--titre); }
.guide-section dd { margin: .2rem 0 0; line-height: 1.55; }

@media (max-width: 640px) {
  /* minmax(0, …) et coupure des mots : deux colonnes même si la police de repli, plus large, s'affiche. */
  .sommaire { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .sommaire strong { overflow-wrap: anywhere; }
  .sommaire a { padding: .75rem .85rem; }
  .sommaire strong { font-size: 1.1rem; }
  .sommaire span { display: none; }
  .guide-section { padding: 1.1rem 1rem .6rem; }
}

/* --- Rôles et connexions (/aide/roles) --- */

.cartes-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; margin: .5rem 0 .9rem; }

.carte-role {
  padding: 1rem 1.1rem;
  border: 1px solid var(--bord);
  border-top: 3px solid var(--genet);
  border-radius: var(--rayon);
  background: var(--fond);
  scroll-margin-top: 4.5rem;
}

.carte-role h3 { margin: 0 0 .25rem; font-size: 1.35rem; }
.carte-role p { margin: .35rem 0 0; line-height: 1.5; }
.role-acces { font-family: var(--police-titres); font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

.droits th:not(:first-child), .droits td:not(:first-child) { width: 7.5rem; text-align: center; }
.droits td:not(:first-child) { color: var(--ok); font-weight: 600; }
.droits td.nuance { color: var(--alerte); font-size: .85rem; font-weight: 600; }
.droits th span[aria-hidden] { display: block; font-size: 1.2rem; }

@media (max-width: 640px) {
  /* Colonnes des rôles réduites à leur emoji : les cartes ci-dessus servent de légende. */
  .droits .libelle-role { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .droits th:not(:first-child), .droits td:not(:first-child) { width: 2.6rem; padding-left: .2rem; padding-right: .2rem; }
  .droits td:first-child { font-size: .9rem; }
}
.droits td.non { color: var(--discret); font-weight: 400; }
