/* ==========================================================
   Site MSPC — feuille de style commune
   ========================================================== */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6676;
  --border: #dde2e8;
  --primary: #0b6bcb;
  --primary-ink: #ffffff;
  --accent: #e8590c;
  --ok: #2b8a3e;
  --ko: #c92a2a;
  --tag-2: #6741d9;
  --tag-1: #0b7285;
  --tag-t: #c2255c;
  --serie: #0b6bcb;      /* couleur des graphiques (vérifiée : contraste, daltonisme) */
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151b;
    --surface: #1a2029;
    --text: #e6e9ee;
    --muted: #9aa4b2;
    --border: #2c3542;
    --primary: #4dabf7;
    --primary-ink: #0b1220;
    --accent: #ff922b;
    --ok: #69db7c;
    --ko: #ff8787;
    --tag-2: #9775fa;
    --tag-1: #3bc9db;
    --tag-t: #f06595;
    --serie: #339af0;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
/* Options des listes déroulantes lisibles en mode sombre comme en mode clair */
select option, select optgroup { background: var(--surface); color: var(--text); }
/* « hidden » l'emporte toujours (même sur .card, .btn ou un élément SVG) */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--primary); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 60px; flex-wrap: wrap;
}
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg); color: var(--text); }

/* ---------- Héros ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 60ch; }

/* ---------- Cartes ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding: 16px 0 48px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.card h2, .card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.entry-card { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.entry-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.entry-card .icon { font-size: 2.2rem; }
.entry-card h2 { font-size: 1.4rem; }

/* ---------- Étiquettes ---------- */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.tag.niv-2MPMIA { color: var(--tag-2); border-color: currentColor; }
.tag.niv-1MSPC  { color: var(--tag-1); border-color: currentColor; }
.tag.niv-TMSPC  { color: var(--tag-t); border-color: currentColor; }
.tag.statut-dev { color: var(--accent); border-color: currentColor; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
  border: 1px solid var(--primary); border-radius: 8px;
  padding: 8px 14px; font-weight: 600; font-size: .95rem;
}
.btn.secondary { background: transparent; color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Filtres ---------- */
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px;
}
.filters input, .filters select {
  font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.filters input { flex: 1; min-width: 180px; }
.filters select { max-width: 100%; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

.empty { color: var(--muted); text-align: center; padding: 32px; grid-column: 1 / -1; }

/* ---------- Encadrés ---------- */
.notice {
  border-left: 4px solid var(--accent); background: var(--surface);
  padding: 12px 16px; border-radius: 8px; margin: 16px 0; color: var(--muted);
}

/* ---------- Applications ---------- */
.app { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 16px 0 48px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select {
  font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.result { font-size: 1.3rem; font-weight: 700; margin-top: 16px; }
.ok { color: var(--ok); }
.ko { color: var(--ko); }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; padding: 24px 0; }

/* ---------- Composants des applications (QCM, cartes, ordre) ---------- */
.choix { display: grid; gap: 8px; margin-top: 16px; }
.choix button, .liste-ordre li {
  font: inherit; text-align: left; padding: 12px 16px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.choix button { cursor: pointer; }
.choix button.bon, .liste-ordre li.bon { border-color: var(--ok); color: var(--ok); font-weight: 700; }
.choix button.faux, .liste-ordre li.faux { border-color: var(--ko); color: var(--ko); }
.progression { color: var(--muted); font-size: .9rem; }
.explication { margin-top: 16px; color: var(--muted); }
.barre-outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.correction { margin-top: 12px; padding: 12px 16px; border-radius: 8px; background: var(--bg); white-space: pre-line; }

/* ---------- GRAFCET (assets/js/grafcet.js) ---------- */
.g-trait { stroke: var(--text); stroke-width: 2; fill: none; }
.g-etape { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.g-etape.active { fill: var(--primary); }
.g-num { fill: var(--text); font: 700 15px system-ui; text-anchor: middle; dominant-baseline: central; }
.g-num.active { fill: var(--primary-ink); }
.g-jeton { fill: var(--accent); }
.g-action { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.g-action.active { stroke: var(--ok); stroke-width: 3; }
.g-txt { fill: var(--text); font: 600 13px system-ui; dominant-baseline: central; }
.g-recep { fill: var(--muted); font: 600 13px system-ui; dominant-baseline: central; }
.g-recep.vraie { fill: var(--ok); }
.g-barre { stroke: var(--text); stroke-width: 4; }
.g-barre.franchissable { stroke: var(--accent); stroke-width: 6; animation: g-clignote 1s ease-in-out infinite; }
.g-recep.franchissable { fill: var(--accent); font-weight: 800; }
@keyframes g-clignote { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .g-barre.franchissable { animation: none; } }
.g-fleche { fill: var(--text); }
/* Trous des exercices « Compléter un GRAFCET » */
.g-recep.trou, .g-txt.trou { fill: var(--accent); font-weight: 800; }
.g-action.trou { stroke: var(--accent); stroke-dasharray: 4 3; }
.g-recep.trou.rempli, .g-txt.trou.rempli { fill: var(--text); }
.g-action.trou.rempli { stroke: var(--text); }
.g-recep.trou.ok, .g-txt.trou.ok { fill: var(--ok); }
.g-action.trou.ok { stroke: var(--ok); stroke-dasharray: none; stroke-width: 2.5; }
.g-recep.trou.ko, .g-txt.trou.ko { fill: var(--ko); }
.g-action.trou.ko { stroke: var(--ko); stroke-dasharray: none; stroke-width: 2.5; }

/* ---------- Cours ---------- */
.cours-page { max-width: 860px; }
.fil-ariane { margin: 20px 0 0; }
.cours-entete h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 12px 0 6px; }
.cours-desc { color: var(--muted); font-size: 1.1rem; margin: 0 0 16px; }
.identite { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 12px; }
.identite > div, .sommaire, .encadre {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
}
.identite ul, .sommaire ol { margin: 0; padding-left: 20px; }
.encadre-titre { font-weight: 800; margin: 0 0 6px; }
.sommaire { margin: 16px 0; }
.cours-corps { font-size: 1.05rem; }
.cours-corps h2 { margin-top: 36px; padding-bottom: 6px; border-bottom: 2px solid var(--border); scroll-margin-top: 80px; }
.cours-corps h3 { margin-top: 24px; }
.cours-corps table { border-collapse: collapse; width: 100%; margin: 12px 0; display: block; overflow-x: auto; }
.cours-corps th, .cours-corps td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.cours-corps th { background: var(--bg); }
.cours-corps pre { overflow-x: auto; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.cours-corps pre code { border: 0; padding: 0; background: none; }
.cours-corps code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.cours-corps img { max-width: 100%; height: auto; }
.encadre { margin: 16px 0; border-left-width: 5px; }
.encadre > p:last-child, .encadre > ul:last-child { margin-bottom: 0; }
.encadre-situation { border-left-color: var(--tag-1); }
.encadre-definition { border-left-color: var(--primary); }
.encadre-retenir { border-left-color: var(--ok); }
.encadre-attention { border-left-color: var(--ko); }
.encadre-exemple { border-left-color: var(--tag-2); }
.encadre-methode { border-left-color: var(--accent); }
.carte-flash { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin: 8px 0; }
.question-flash {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--text);
  font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.question-flash .indice { color: var(--primary); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.question-flash[aria-expanded="true"] { border-bottom: 1px dashed var(--border); }
.reponse-flash { margin: 0; padding: 10px 14px; color: var(--ok); font-weight: 600; }
.entrainement { margin-top: 24px; }
.figure-grafcet { margin: 16px 0; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.figure-grafcet svg { display: block; width: 100%; height: auto; }
.cours-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 24px 0 48px; }

@media print {
  .site-header, .site-footer, .no-print, .fil-ariane { display: none !important; }
  body { background: #fff; color: #000; }
  .carte-flash { break-inside: avoid; }
  .reponse-flash[hidden] { display: block !important; }
  .encadre, .identite > div { break-inside: avoid; }
}

/* Filtres de la page des cours */
/* Barre de filtres des pages Cours et Exercices */
.barre-filtres { flex-direction: column; align-items: stretch; gap: 12px; }
.ligne-filtres { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.ligne-filtres input[type=search] { flex: 1 1 260px; min-width: 0; }
.champ-filtre { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; flex: 0 1 auto; min-width: 0; }
.champ-filtre select { min-width: 0; max-width: 100%; font-weight: 400; }
.champ-filtre.large { flex: 1 1 320px; }
.champ-filtre.large select { flex: 1; }
.ligne-filtres .btn { margin-left: auto; }
.chips-domaines .chip { font-size: .95rem; }
.volet-profs { border-top: 1px solid var(--border); padding-top: 10px; }
.volet-profs summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.volet-profs[open] summary { margin-bottom: 10px; }
#compte { margin: 12px 0 0; }
.groupe-domaine h2 { margin: 24px 0 0; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.compte-groupe { font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }
.groupe-domaine .grid { padding-bottom: 8px; }
@media (max-width: 600px) {
  .champ-filtre { flex: 1 1 100%; justify-content: space-between; }
  .champ-filtre select { flex: 1; }
  .ligne-filtres .btn { margin-left: 0; }
}
.tag.code { font-family: ui-monospace, Consolas, monospace; color: var(--primary); border-color: currentColor; }
.tag.type-cours { color: var(--accent); border-color: currentColor; }
.referentiel-cours { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 12px; }
.referentiel-cours > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.referentiel-cours ul { margin: 0; padding-left: 20px; }
.referentiel-cours .avertissement { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }

/* Choix des codes du référentiel (outils enseignants) */
.codes-grille { grid-column: 1 / -1; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choix-codes select { max-width: 100%; }
.choix-codes .tags { margin-top: 6px; }
.tag .retirer { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0 0 0 4px; line-height: 1; }
.tag .retirer:hover { color: var(--accent); }

/* Message de suivi (résultat enregistré, invitation à se connecter) */
.suivi-message {
  position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 150%);
  max-width: min(560px, calc(100% - 32px)); padding: 10px 16px; border-radius: 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: transform .25s ease; z-index: 20;
}
.suivi-message.visible { transform: translate(-50%, 0); }
@media print { .suivi-message { display: none; } }

/* ---------- Mon espace ---------- */
.espace-formulaires form { display: flex; flex-direction: column; gap: 12px; }
.espace-formulaires h2, #espace .card h2, #vue-oubli h2 { margin: 0 0 4px; font-size: 1.2rem; }
#espace .result { font-size: 1rem; margin: 0; }
#espace .aide { color: var(--muted); font-size: .9rem; font-weight: 400; }
.case { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }
.donnees { margin-top: 20px; }
.donnees h2 { font-size: 1.1rem; margin: 0 0 6px; }
.donnees ul { margin: 0; padding-left: 20px; }
.code-recup { font: 700 1.5rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .05em; padding: 12px; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; text-align: center; overflow-wrap: anywhere; }
.espace-entete { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 12px; }
.espace-entete p { margin: 0; font-size: 1.1rem; }
.espace-entete label { display: flex; gap: 6px; align-items: center; }
.espace-entete select, #periode { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.boutons-entete { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.lien-bouton { align-self: flex-start; margin-top: 4px; font-size: .9rem; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }
/* Formulaires de Mon espace : tous de la même largeur (une colonne sur deux),
   même hauteur sur une ligne, champs pleine largeur, boutons alignés en bas */
.espace-formulaires, .compte-grille { grid-template-columns: 1fr; align-items: stretch; padding-bottom: 16px; }
@media (min-width: 760px) {
  .espace-formulaires, .compte-grille { grid-template-columns: repeat(2, 1fr); }
  .formulaire-etroit { max-width: calc((100% - 16px) / 2); }
}
#espace .card { gap: 12px; }
#espace .card p { flex: none; margin: 0; }
#f-oubli, #f-reinit, #f-supprimer, .compte-grille form, .compte-grille section { display: flex; flex-direction: column; gap: 12px; flex: 1; }
#espace .card .actions { margin-top: auto; padding-top: 4px; }
#espace .card .actions.haut { margin-top: 0; padding-top: 0; }
#espace .field input, #espace .field select { width: 100%; min-height: 42px; }
#espace .card h2 { font-size: 1.15rem; line-height: 1.3; }
.masque { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#vue-eleve > .card { margin-top: 16px; }
.btn.danger { color: var(--ko); border-color: var(--ko); }

.tuiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 16px; }
.tuile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tuile-titre { color: var(--muted); font-size: .85rem; }
.tuile strong { font-size: 1.7rem; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* Graphiques : une seule série, couleur --serie ; grille et axes discrets */
.courbe { display: block; max-width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.courbe:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.courbe .grille { stroke: var(--border); stroke-width: 1; }
.courbe .axe { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.courbe .trait { fill: none; stroke: var(--serie); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe .point { fill: var(--serie); stroke: var(--surface); stroke-width: 2; }
.courbe .viseur { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.valeurs { margin-top: 8px; }
.valeurs summary { cursor: pointer; color: var(--primary); font-size: .9rem; }

.barres { display: flex; flex-direction: column; gap: 4px; }
.barre-ligne { display: grid; grid-template-columns: 4.5em 1fr 3.5em; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 6px; color: var(--text); text-decoration: none; }
.barre-ligne:hover, .barre-ligne:focus-visible { background: var(--bg); }
.barre-code { font: 600 .9rem ui-monospace, Consolas, monospace; }
.barre-piste { height: 12px; }
.barre { display: block; height: 100%; background: var(--serie); border-radius: 0 4px 4px 0; }
.barre-ligne:hover .barre, .barre-ligne:focus-visible .barre { filter: brightness(1.15); }
.barre-valeur { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }

.infobulle { position: absolute; z-index: 30; pointer-events: none; display: flex; flex-direction: column; gap: 2px; max-width: 280px;
  padding: 8px 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: .85rem; }
.infobulle strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.infobulle span { color: var(--muted); }
.infobulle[hidden] { display: none; }

.liste-liens { margin: 6px 0; padding-left: 20px; }
.liste-liens li { margin: 4px 0; }
.tableau-defile { overflow-x: auto; }
table.historique { width: 100%; border-collapse: collapse; font-size: .95rem; }
.historique th, .historique td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.historique th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.historique td:first-child, .historique td:nth-child(n+3) { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Pages de texte (conditions d'utilisation) */
.texte-legal { max-width: 820px; padding-bottom: 48px; }
.texte-legal h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.texte-legal table { margin: 8px 0; }
.a-completer { background: #fff3bf; color: #5c3c00; padding: 0 4px; border-radius: 4px; }
.site-footer a { color: inherit; }

/* Signaler un bug */
.lien-discret { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.dialogue-bug { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0; width: min(520px, calc(100% - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dialogue-bug::backdrop { background: rgba(0, 0, 0, .45); }
.form-bug { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.form-bug h2 { margin: 0; font-size: 1.2rem; }
.form-bug label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.form-bug select, .form-bug textarea, .form-bug input { font: inherit; font-weight: 400; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.aide-bug { margin: 0; color: var(--muted); font-size: .88rem; }
.retour-bug { margin: 0; font-weight: 600; }
.retour-bug.ok { color: var(--ok); }
.retour-bug.ko { color: var(--ko); }
.actions-bug { display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .lien-discret { display: none; } }

/* Mon espace : bloc plan de formation */
.plan-espace { border: 2px solid var(--primary); }
.plan-tete { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.plan-tete h2 { margin: 0; }
.barre-plan { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.barre-plan span { display: block; height: 100%; background: var(--ok); }
.plan-suivante { margin: 4px 0 0; line-height: 2; }
.plan-suivante .btn { margin-left: 6px; padding: 5px 12px; }

/* Page ouverte depuis le plan de formation : retour au plan et étape suivante */
.fil-parcours { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.fil-parcours .retour-plan { font-weight: 700; }
.fil-parcours .etape-suivante { padding: 5px 12px; }
.prerequis .coche-prerequis { color: var(--muted); font-size: .9em; }
.prerequis .prerequis-fait .coche-prerequis { color: var(--ok); font-weight: 700; }

/* Texte lu par les lecteurs d'écran seulement */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lien-lexique { margin: 0 0 12px; }
