/* Charte de la Méchaîne (docs/charte.md) : la seule feuille de style depuis U5 (27 octobre 2026).
   Police Nunito (licence OFL, static/polices/OFL.txt), embarquée : rien n'est chargé depuis Internet. */
@font-face { font-family: "Nunito"; src: url("/static/polices/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-style: normal; font-display: swap; }
/*
   Principe : un atelier, pas un bureau. Fond crème uni, cadres à trait, la couleur du poste comme fil conducteur,
   boutons de la hauteur d'un pouce, un seul bouton principal par écran. */
:root {
  /* postes (mondes/mechaine.yaml via contexte.ts) */
  --etudes: #0f766e; --magasin: #0284c7; --cnc: #7c3aed; --controle: #ea580c; --soudure: #dc2626;
  --banc_test: #16a34a; --fablab: #ca8a04; --chef_atelier: #475569;
  /* neutres chauds */
  --fond: #faf7f2; --papier: #ffffff; --encre: #26221c; --muet: #6b635a; --trait: #d8d0c4; --trait-fort: #26221c;
  /* actions */
  --fini: #16a34a; --probleme: #ea580c; --danger: #dc2626; --info: #0284c7;
  --fini-pale: #e6f6ea; --probleme-pale: #fdebdd; --danger-pale: #fde3e3; --info-pale: #e3f1fb; --neutre-pale: #f1ece4;
  /* le poste de la personne : redéfini par la page (body[data-poste]) */
  --poste: var(--chef_atelier); --poste-pale: #eef0f3;
  --rayon: 14px; --touche: 56px;
  --police: "Nunito", "SF Pro Rounded", ui-rounded, "Segoe UI", system-ui, sans-serif;
}
body[data-poste="magasin"] { --poste: var(--magasin); --poste-pale: #e3f1fb; }
body[data-poste="etudes"] { --poste: var(--etudes); --poste-pale: #e0f2f0; }
body[data-poste="cnc"] { --poste: var(--cnc); --poste-pale: #ede6fb; }
body[data-poste="controle"] { --poste: var(--controle); --poste-pale: #fdebdd; }
body[data-poste="soudure"] { --poste: var(--soudure); --poste-pale: #fde3e3; }
body[data-poste="banc_test"] { --poste: var(--banc_test); --poste-pale: #e6f6ea; }
body[data-poste="fablab"] { --poste: var(--fablab); --poste-pale: #fbf3d6; }
body[data-poste="chef_atelier"] { --poste: var(--chef_atelier); --poste-pale: #e9ecf0; }

* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: var(--police); background: var(--fond); color: var(--encre); line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1 { font-size: 1.5rem; margin: 0 0 .3rem; line-height: 1.2; } h2 { font-size: 1.1rem; margin: 0 0 .6rem; } h3 { font-size: 1rem; margin: 0 0 .4rem; }
p { margin: 0 0 .6rem; }
.muet { color: var(--muet); } .petit { font-size: .85rem; } .gras { font-weight: 800; }
.ico { width: 1.25em; height: 1.25em; vertical-align: -.3em; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* --- téléphone : cadre centré sur grand écran, plein écran sur téléphone --- */
.tel { max-width: 430px; margin: 0 auto; min-height: 100vh; background: var(--fond); position: relative; padding-bottom: 86px; }
@media (min-width: 500px) { body.cadre { background: #ddd6cb; padding: 24px 0; } body.cadre .tel { border-radius: 28px; border: 10px solid #26221c; min-height: 860px; overflow: hidden; } }

/* --- bandeau à la couleur du poste --- */
.bandeau { background: var(--poste); color: #fff; padding: 14px 18px 16px; }
.bandeau .ou { display: flex; align-items: center; gap: .5rem; font-size: .9rem; opacity: .92; }
.bandeau h1 { color: #fff; margin-top: .2rem; }
.bandeau .moi { float: right; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 800; }

/* --- contenu --- */
.page { padding: 16px 16px 24px; }
.bloc { background: var(--papier); border: 2px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 14px; }
.bloc.poste { border-color: var(--poste); }
.bloc.fini { border-color: var(--fini); background: var(--fini-pale); }
.bloc.probleme { border-color: var(--probleme); background: var(--probleme-pale); }
.bloc.danger { border-color: var(--danger); background: var(--danger-pale); }
.bloc.info { border-color: var(--info); background: var(--info-pale); }
.bloc.maintenant { border-width: 3px; border-color: var(--trait-fort); }
.bloc h2 .ico { margin-right: .3rem; }
.sur { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muet); margin-bottom: .3rem; }
.etiquette { display: inline-block; font-size: .8rem; font-weight: 800; padding: .15rem .6rem; border-radius: 999px; border: 2px solid currentColor; vertical-align: middle; }
.etiquette.fini { color: var(--fini); } .etiquette.probleme { color: var(--probleme); } .etiquette.danger { color: var(--danger); } .etiquette.info { color: var(--info); } .etiquette.muet { color: var(--muet); }
.etiquette.plein { color: #fff; border-color: transparent; } .etiquette.plein.fini { background: var(--fini); } .etiquette.plein.probleme { background: var(--probleme); } .etiquette.plein.danger { background: var(--danger); } .etiquette.plein.poste { background: var(--poste); }

/* --- boutons : un seul .principal par écran --- */
.bouton { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: var(--touche); padding: 0 1.1rem; border-radius: var(--rayon); border: 2px solid var(--trait-fort); background: var(--papier); color: var(--encre); font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer; width: 100%; }
.bouton.principal { background: var(--poste); border-color: var(--poste); color: #fff; font-size: 1.15rem; }
.bouton.fini { background: var(--fini); border-color: var(--fini); color: #fff; }
.bouton.probleme { background: var(--probleme-pale); border-color: var(--probleme); color: #9a3f06; }
.bouton.danger { background: var(--danger-pale); border-color: var(--danger); color: #991b1b; }
.bouton.discret { border-color: var(--trait); font-weight: 700; }
.bouton.auto { width: auto; display: inline-flex; }
.bouton.petit { min-height: 42px; font-size: .95rem; padding: 0 .9rem; }
.boutons { display: flex; flex-direction: column; gap: 10px; } .boutons.ligne { flex-direction: row; flex-wrap: wrap; } .boutons.ligne .bouton { width: auto; flex: 1; }
.lien { background: none; border: 0; font: inherit; color: var(--muet); text-decoration: underline; padding: .5rem 0; cursor: pointer; display: block; text-align: center; width: 100%; }

/* --- listes --- */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--trait); }
.liste li:first-child { border-top: 0; } .liste .fin { margin-left: auto; color: var(--muet); white-space: nowrap; }
.liste .point, .presences .point { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--poste); flex: none; vertical-align: middle; margin-right: .3rem; }
.liste.compacte li { padding: .35rem 0; }

/* --- cases à cocher de la taille d'un pouce --- */
.cases { list-style: none; margin: 0; padding: 0; }
.cases li { display: flex; gap: .8rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--trait); }
.cases li:first-child { border-top: 0; }
.cases .case { width: 30px; height: 30px; border: 2.5px solid var(--trait-fort); border-radius: 9px; flex: none; margin-top: .05rem; display: grid; place-items: center; background: #fff; }
.cases .case.ok { background: var(--fini); border-color: var(--fini); color: #fff; }
.cases .fait { color: var(--muet); text-decoration: line-through; }
.champ { display: block; width: 100%; min-height: var(--touche); border: 2px solid var(--trait); border-radius: var(--rayon); padding: .6rem .8rem; font: inherit; background: #fff; }
textarea.champ { min-height: 4.5rem; }
label.titre { display: block; font-weight: 800; margin: .8rem 0 .35rem; }

/* --- étapes du chemin (points) --- */
.points { display: flex; gap: 6px; align-items: center; margin: .3rem 0 .2rem; }
.points span { flex: 1; height: 10px; border-radius: 999px; background: var(--trait); }
.points span.fait { background: var(--fini); } .points span.courant { background: var(--poste); flex: 2; }
.points span.bloque { background: var(--danger); }

/* --- suivi « comme un colis » --- */
.colis { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; gap: 0; }
.colis li { flex: 1; text-align: center; font-size: .85rem; position: relative; padding-top: 22px; color: var(--muet); }
.colis li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--trait); transform: translateX(-50%); z-index: 1; }
.colis li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--trait); }
.colis li:first-child::after { display: none; }
.colis li.fait { color: var(--encre); } .colis li.fait::before, .colis li.fait::after { background: var(--fini); }
.colis li.courant { color: var(--encre); font-weight: 800; } .colis li.courant::before { background: var(--info); box-shadow: 0 0 0 4px var(--info-pale); } .colis li.courant::after { background: var(--fini); }

/* --- barre d'onglets du téléphone --- */
.onglets { position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto; display: flex; background: var(--papier); border-top: 2px solid var(--trait); padding: 6px 4px 10px; z-index: 5; }
@media (min-width: 500px) { body.cadre .onglets { position: absolute; } }
.onglets a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 800; color: var(--muet); text-decoration: none; padding: 4px 0; border-radius: 10px; }
.onglets a .ico { width: 26px; height: 26px; }
.onglets a.actif { color: var(--poste); background: var(--poste-pale); }
.onglets a .bulle { position: absolute; margin-left: 28px; margin-top: -4px; background: var(--danger); color: #fff; font-size: .68rem; border-radius: 999px; padding: 0 .4rem; }

/* --- écran large (chef, enseignant, collègue) --- */
.page-chef { max-width: 820px; margin: 0 auto; padding: 0 20px 40px; } .page-ens { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; } .page-ens:has(main.large) { max-width: none; } .page-ens .haut .moi .lien { color: var(--muet); } .page-ens .haut .moi { font-size: .95rem; } .page-chef:has(main.large) { max-width: none; } .page-chef .haut .moi .lien { color: var(--muet); }
.large { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }
.tablette { max-width: 800px; }
.haut { display: flex; align-items: center; gap: 1rem; padding: 10px 0; border-bottom: 2px solid var(--trait); margin-bottom: 18px; flex-wrap: wrap; }
.haut .marque { font-weight: 900; font-size: 1.15rem; display: flex; align-items: center; gap: .4rem; }
.haut .marque .ico { color: var(--poste); }
.haut nav { display: flex; gap: 4px; flex-wrap: wrap; }
.haut nav a { text-decoration: none; font-weight: 800; padding: .5rem .8rem; border-radius: 10px; color: var(--muet); }
.haut nav a.actif { color: var(--encre); background: var(--neutre-pale); }
.haut .moi { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-weight: 800; }
.haut .moi .rond { width: 36px; height: 36px; border-radius: 50%; background: var(--poste); color: #fff; display: grid; place-items: center; }
.familles { display: flex; gap: 6px; } .familles a { font-size: 1.05rem; }
.familles a.actif { background: var(--poste); color: #fff; }
.sous { display: flex; gap: 4px; flex-wrap: wrap; margin: -10px 0 18px; }
.sous a { font-weight: 700; text-decoration: none; color: var(--muet); padding: .35rem .7rem; border-radius: 999px; border: 2px solid var(--trait); font-size: .9rem; }
.sous a.actif { color: var(--encre); border-color: var(--trait-fort); }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 16px; }
.entete h1 { font-size: 1.8rem; }
.colonnes { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; } @media (max-width: 760px) { .colonnes { grid-template-columns: 1fr; } }
.decision { display: flex; align-items: center; gap: 1rem; padding: 12px 0; border-top: 1px solid var(--trait); }
.decision:first-of-type { border-top: 0; }
.decision .ico { color: var(--probleme); width: 1.6em; height: 1.6em; } .decision.danger .ico { color: var(--danger); } .decision.info .ico { color: var(--info); }
.decision .quoi { flex: 1; } .decision .quoi strong { display: block; }
.decision .bouton { width: auto; min-height: 44px; }
.postes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tuile { border: 2px solid var(--c); border-radius: var(--rayon); background: var(--papier); padding: 10px 12px; text-decoration: none; display: block; color: var(--encre); }
.tuile h3 { color: var(--c); display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.tuile .qui { font-size: .9rem; min-height: 2.5rem; } .tuile .qui span { display: block; }
.tuile .chiffres { display: flex; gap: .8rem; font-size: .85rem; color: var(--muet); margin-top: .4rem; } .tuile .chiffres b { color: var(--encre); font-size: 1.05rem; }
.tuile.vide { background: var(--probleme-pale); } .tuile.vide .qui { color: var(--probleme); font-weight: 800; }
.tuile.sature h3 .etiquette { font-size: .7rem; }
.choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choix label { border: 2px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; cursor: pointer; display: block; background: #fff; }
.choix label.coche { border-color: var(--poste); background: var(--poste-pale); }
.choix label strong { display: block; } .choix label .petit { display: block; }
.commande { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; } .commande .colis { grid-column: 1 / -1; } .commande h2 a { text-decoration: none; }
.choix label { position: relative; }
.compteur { display: inline-flex; align-items: center; border: 2px solid var(--trait-fort); border-radius: var(--rayon); overflow: hidden; }
.compteur button { width: var(--touche); height: var(--touche); border: 0; background: var(--neutre-pale); font: inherit; font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.compteur output { width: 4.5rem; text-align: center; font-size: 1.4rem; font-weight: 800; }
@media print { .onglets, .haut nav, .bouton { display: none; } }

/* ---------------------------------------------------------------- champs réels (formulaires) */
.cases label { display: flex; gap: .8rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--trait); font-weight: 600; cursor: pointer; }
.cases label:first-child { border-top: 0; }
.cases input[type=checkbox], .cases input[type=radio] { appearance: none; -webkit-appearance: none; width: 30px; height: 30px; border: 2.5px solid var(--trait-fort); border-radius: 9px; flex: none; background: #fff; margin: 0; display: grid; place-items: center; cursor: pointer; }
.cases input[type=radio] { border-radius: 50%; }
.cases input:checked { background: var(--fini); border-color: var(--fini); }
.cases input[type=checkbox]:checked::after { content: ""; width: 13px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -2px); }
.cases input[type=radio]:checked::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.cases.barre label:has(input:checked) span { color: var(--muet); text-decoration: line-through; }
.cases input:focus-visible, .bouton:focus-visible, .champ:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
select.champ { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2326221c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 1.2rem; padding-right: 2.6rem; }
.mesures { width: 100%; border-collapse: collapse; } .mesures td { padding: .45rem 0; border-top: 1px solid var(--trait); vertical-align: middle; } .mesures tr:first-child td { border-top: 0; }
.mesures input { width: 6.5rem; min-height: 48px; border: 2px solid var(--trait); border-radius: 10px; padding: .3rem .5rem; font: inherit; font-size: 1.1rem; text-align: right; }
.mesures .attendu { color: var(--muet); font-size: .9rem; display: block; }
.flash { padding: .8rem 1rem; border-radius: var(--rayon); margin-bottom: 14px; border: 2px solid var(--info); background: var(--info-pale); font-weight: 700; }
.flash-succes { border-color: var(--fini); background: var(--fini-pale); } .flash-erreur { border-color: var(--danger); background: var(--danger-pale); }
details.repli > summary { list-style: none; cursor: pointer; } details.repli > summary::-webkit-details-marker { display: none; }
details.repli[open] > summary .bouton { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.choix-probleme { border: 2px solid var(--probleme); border-top: 0; border-radius: 0 0 var(--rayon) var(--rayon); padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.choix-probleme .bouton { min-height: 48px; font-size: .95rem; text-align: left; justify-content: flex-start; }
.choix-probleme .champ { min-height: 48px; }
.bulle-onglet { position: absolute; margin-left: 30px; margin-top: -2px; background: var(--danger); color: #fff; font-size: .68rem; border-radius: 999px; padding: 0 .4rem; }

/* ---------------------------------------------------------------- composants communs : fiches, tableaux, formulaires classiques, parcours, affiche */
.fiche-poste section { background: var(--papier); border: 2px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 14px; }
.bloc { overflow-x: auto; min-width: 0; } .bloc.attention { border-color: var(--probleme); }
.fiche-poste h2 { color: var(--c); } .securite { border-color: var(--danger); }
.bouton.petit { min-height: 42px; font-size: .95rem; padding: 0 .9rem; } .bouton.auto, .actions .bouton, .entete .bouton { width: auto; display: inline-flex; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .actions .bouton, .entete .bouton, .entete form { width: auto; }
.colonnes > div { min-width: 0; }
.tableau { width: 100%; border-collapse: collapse; background: var(--papier); border: 2px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.tableau th, .tableau td { padding: .5rem .6rem; text-align: left; border-bottom: 1px solid var(--trait); vertical-align: top; } .tableau th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muet); } .tableau tr:last-child td { border-bottom: 0; }
.etiquette.niveau-acquis, .etiquette.niveau-expert { color: var(--fini); } .etiquette.niveau-en_cours { color: var(--probleme); } .etiquette.niveau-non_acquis { color: var(--danger); } .etiquette { white-space: nowrap; }
.fiche-infos { display: grid; grid-template-columns: 1fr; gap: .15rem 1rem; margin: 0; } .fiche-infos dt { color: var(--muet); font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-top: .6rem; } .fiche-infos dt:first-child { margin-top: 0; } .fiche-infos dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.formulaire label { display: block; margin-bottom: .8rem; font-weight: 800; }
.formulaire input:not([type=checkbox]):not([type=radio]), .formulaire select, .formulaire textarea { display: block; width: 100%; margin-top: .3rem; min-height: var(--touche); padding: .6rem .8rem; font: inherit; border: 2px solid var(--trait); border-radius: var(--rayon); background: #fff; }
.formulaire textarea { min-height: 5rem; } .formulaire .ligne { display: grid; grid-template-columns: 1fr; gap: 0; } .formulaire .case { font-weight: 600; } .formulaire .case input { width: 24px; height: 24px; margin-right: .6rem; vertical-align: middle; }
.inline { display: inline; } .inline input { min-height: 44px; padding: .3rem .6rem; font: inherit; border: 2px solid var(--trait); border-radius: 10px; max-width: 10rem; }
.ok { color: var(--fini); font-weight: 800; } .ko { color: var(--danger); font-weight: 800; }
.presences { list-style: none; padding: 0; margin: 0; } .presences li { padding: .45rem 0; border-top: 1px solid var(--trait); } .presences li:first-child { border-top: 0; }
code { background: var(--neutre-pale); padding: 0 .3em; border-radius: 6px; font-size: .92em; }
.escalier { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .marche { min-width: 0; border-top: 6px solid var(--c); border-radius: 10px; background: var(--neutre-pale); padding: .5rem .6rem; font-weight: 700; font-size: .95rem; }
.marche.habilite { background: var(--fini-pale); } .marche.accessible { background: var(--probleme-pale); } .marche.verrouille { opacity: .55; } .marche small { display: block; font-weight: 400; color: var(--muet); }
.mini-escalier { display: flex; align-items: flex-end; gap: 4px; margin: .2rem 0 .8rem; }
.mini-escalier .mini-marche { display: inline-flex; align-items: flex-end; justify-content: center; flex: 1 1 0; max-width: 2.4rem; min-width: 1.2rem; border-radius: 4px 4px 0 0; color: #fff; font-weight: 800; font-size: .85rem; padding-bottom: .15rem; background: var(--c); }
.mini-escalier .mini-marche:nth-child(1) { height: 1.4rem; } .mini-escalier .mini-marche:nth-child(2) { height: 1.8rem; } .mini-escalier .mini-marche:nth-child(3) { height: 2.2rem; } .mini-escalier .mini-marche:nth-child(4) { height: 2.6rem; }
.mini-escalier .mini-marche:nth-child(5) { height: 3rem; } .mini-escalier .mini-marche:nth-child(6) { height: 3.4rem; } .mini-escalier .mini-marche:nth-child(7) { height: 3.8rem; } .mini-escalier .mini-marche:nth-child(8) { height: 4.2rem; }
.mini-escalier .mini-marche.accessible { opacity: .55; } .mini-escalier .mini-marche.verrouille { opacity: .2; } .mini-escalier small { margin-left: .5rem; }
.aptitudes { list-style: none; padding: 0; margin: 0; } .aptitudes li { padding: .4rem 0; border-top: 1px solid var(--trait); } .aptitudes li:first-child { border-top: 0; }
.aptitudes li.fermee { color: var(--muet); } .aptitudes .cadenas { display: inline-block; width: 1.4rem; } .aptitudes li.ouverte .cadenas { color: var(--fini); font-weight: 800; } .aptitudes small { display: block; margin-left: 1.4rem; }
.grille-competences { display: grid; grid-template-columns: 1fr; gap: 10px; } .trace { margin: 0 .15rem; color: var(--muet); }
.tuile-poste { background: var(--papier); border: 2px solid var(--c); border-radius: var(--rayon); padding: 12px 14px; color: var(--encre); display: block; text-decoration: none; margin-bottom: 10px; } .tuile-poste h2 { color: var(--c); margin-bottom: .2rem; } .tuile-poste .chiffres { display: flex; gap: 1rem; color: var(--muet); font-size: .9rem; }
.grille-postes { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 10px; }
main.affiche { max-width: none; padding: 2rem 3rem; min-height: 100vh; background: #fff; } .affiche h1 { font-size: 3rem; margin: 0; } .affiche h2 { font-size: 2rem; margin-top: 2rem; } .affiche li { font-size: 1.7rem; margin-bottom: .6rem; }
.affiche .bandeau { background: var(--danger); color: #fff; padding: 1rem 2rem; border-radius: 12px; font-size: 1.5rem; font-weight: 800; margin-top: 1rem; }
.affiche .epi { display: flex; gap: 1rem; flex-wrap: wrap; padding: 0; } .affiche .epi li { list-style: none; background: var(--probleme-pale); border: 3px solid var(--probleme); border-radius: 12px; padding: .8rem 1.4rem; } .affiche .retour { position: fixed; bottom: 1rem; right: 1rem; width: auto; }
/* Affiche à QR d'une station (réseau du collège) : une page A4 par station. */
.affiche .station { max-width: 46rem; margin: 0 auto 3rem; text-align: center; } .affiche .station h1 { font-size: 2.6rem; } .affiche .station h2 { font-size: 1.5rem; margin: 1.6rem 0 .6rem; }
.station .sous-titre { font-size: 1.2rem; color: var(--muet); margin: .4rem 0 1rem; } .station .qr-station svg { width: 9cm; height: 9cm; } .station .consigne { font-size: 1.3rem; font-weight: 700; margin: .6rem 0 .2rem; } .station .adresse { font-size: .85rem; color: #555; word-break: break-all; margin: 0; }
.table-station { width: 100%; border-collapse: collapse; font-size: 1.25rem; text-align: left; } .table-station th, .table-station td { border: 2px solid #333; padding: .45rem .7rem; } .table-station th { background: #eee; } .station .note { font-size: 1.05rem; text-align: left; margin: .5rem 0 0; }
@media print { @page { size: A4; margin: 1.2cm; } .affiche .station { break-after: page; margin: 0 auto; } .affiche .station:last-of-type { break-after: auto; } main.affiche { padding: 0; min-height: 0; } }
@media print { .affiche .retour, .bandeau-eleve, .onglets, .haut, .sous, .flash { display: none; } body { background: #fff; } .bloc { border-color: #999; break-inside: avoid; } }

/* ---------------------------------------------------------------- étiquettes d'état, kanban, affectations, habilitations, rotation, compétences, entretiens, usine */
.etiquette.statut-deposee { color: var(--probleme); } .statut-acceptee, .statut-en_etude, .etude-en_cours { color: var(--etudes); } .statut-en_production { color: var(--info); } .statut-livree, .etude-validee { color: var(--fini); } .statut-refusee { color: var(--danger); } .etude-a_valider { color: var(--probleme); }
.verdict-valide { color: var(--fini); } .verdict-renvoye { color: var(--probleme); } .verdict-bloque { color: var(--danger); } .verdict-en_cours { color: var(--info); }
.role-admin { color: var(--chef_atelier); } .role-eleve { color: var(--info); } .role-collegue { color: var(--etudes); }
.chemin { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1rem 0; } .chemin span { padding: .3rem .7rem; border-radius: 999px; background: var(--neutre-pale); color: var(--muet); font-size: .9rem; } .chemin span.fait { background: var(--fini-pale); color: var(--fini); } .chemin span.courant { background: var(--c, var(--poste)); color: #fff; font-weight: 800; } .chemin span.bloque { background: var(--danger-pale); color: var(--danger); }
.verdicts { display: flex; gap: .6rem; flex-wrap: wrap; } .verdicts label { flex: 1; min-width: 12rem; border: 2px solid var(--trait); border-radius: 10px; padding: .7rem; cursor: pointer; font-weight: 800; } .verdicts label:has(input:checked) { border-color: var(--poste); background: var(--poste-pale); } .verdicts input { margin-right: .5rem; }
.formulaire .ligne { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.bouton.danger { background: var(--danger-pale); border-color: var(--danger); color: #991b1b; }
.carte-connexion { background: var(--papier); padding: 2rem; border-radius: 18px; border: 2px solid var(--trait); width: 100%; max-width: 24rem; } .carte-connexion h1 { font-size: 1.6rem; } .carte-connexion .sous-titre { color: var(--muet); margin: .2rem 0 1.2rem; } .carte-connexion label { display: block; font-weight: 800; margin: .8rem 0 .3rem; } .carte-connexion .champ { margin-bottom: .2rem; } main.connexion { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
a { color: var(--poste); text-decoration: none; }
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.indic { background: var(--papier); border-radius: var(--rayon); box-shadow: none; padding: .9rem 1rem; }
.indic .valeur { display: block; font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.indic .legende { color: var(--muet); }
.indic.alerte .valeur { color: var(--danger); }
.flux { margin-bottom: 1.2rem; }
.flux-barres { display: flex; gap: .5rem; flex-wrap: wrap; }
.flux-etape { flex: 1; min-width: 7rem; background: var(--papier); border-top: 5px solid var(--c); border-radius: var(--rayon); box-shadow: none; padding: .6rem .8rem; color: var(--encre); }
.flux-etape .n { font-size: 1.6rem; font-weight: 700; display: block; }
.flux-etape .l { font-size: .85rem; color: var(--muet); }
.flux-etape:hover { text-decoration: none; transform: translateY(-2px); }
.kanban-outils { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.kanban-outils label { font-size: .85rem; color: var(--muet); display: block; }
.kanban-outils select { font: inherit; padding: .35rem .5rem; border-radius: 6px; border: 1px solid var(--trait); }
.kanban { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; min-height: 70vh; }
.colonne { flex: 0 0 15rem; background: var(--neutre-pale); border-radius: var(--rayon); padding: .5rem; border-top: 6px solid var(--c); min-height: 12rem; }
.colonne.survol { background: var(--info-pale); outline: 2px dashed var(--poste); }
.colonne h2 { font-size: 1rem; display: flex; justify-content: space-between; margin: .2rem .3rem .6rem; }
.colonne h2 .n { background: #fff; border-radius: 999px; padding: 0 .55rem; font-size: .85rem; }
.ck { background: #fff; border-radius: 8px; box-shadow: none; padding: .5rem .6rem; margin-bottom: .5rem; border-left: 5px solid var(--cc, #9ca3af); position: relative; }
.ck[draggable=true] { cursor: grab; }
.ck.glisse { opacity: .4; }
.ck .num { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.ck .num a { color: var(--encre); }
.ck .meta { font-size: .8rem; color: var(--muet); display: flex; justify-content: space-between; gap: .4rem; margin-top: .2rem; }
.ck .eleve { font-size: .85rem; margin-top: .2rem; }
.ck .eleve::before { content: "👤 "; }
.ck .motif { font-size: .82rem; color: var(--danger); margin-top: .2rem; }
.ck .liens { font-size: .78rem; display: flex; gap: .3rem; margin-top: .25rem; }
.ck .liens a { background: var(--neutre-pale); border-radius: 4px; padding: 0 .35rem; color: var(--muet); }
.ck .liens a:hover { background: var(--poste); color: #fff; text-decoration: none; }
.ck.vieux .meta .temps { color: var(--probleme); font-weight: 600; }
.ck.urgent .num::after { content: " ⚠"; color: var(--danger); }
.ck.valide::after { content: "✓ validée"; position: absolute; bottom: .3rem; right: .5rem; font-size: .72rem; color: var(--fini); font-weight: 700; }
dialog { border: 0; border-radius: 12px; padding: 1.2rem 1.4rem; max-width: 28rem; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog textarea { width: 100%; min-height: 4rem; font: inherit; padding: .5rem; border: 1px solid var(--trait); border-radius: 8px; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--encre); color: #fff; padding: .7rem 1.2rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; max-width: 36rem; }
.toast.erreur { background: var(--danger); }
.affectations td select { font: inherit; padding: .3rem; border-radius: 6px; border: 1px solid var(--trait); }
.capacites { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.capacites span { padding: .25rem .6rem; border-radius: 999px; background: #fff; border: 2px solid var(--c); font-size: .9rem; }
.capacites span.plein { background: var(--c); color: #fff; }
.capacites span.trop { background: var(--danger); border-color: var(--danger); color: #fff; }
details.repli summary { cursor: pointer; font-weight: 600; }
details.repli { margin-bottom: .6rem; }
.habilitations td, .habilitations th { text-align: center; }
.habilitations td:first-child, .habilitations th:first-child { text-align: left; }
.habilitations .point, .rotation .point, .grille-competences .point { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; }
.habilitations td.etat-habilite { background: var(--fini-pale); color: #166534; font-weight: 700; }
.habilitations td.etat-habilite small { font-weight: 400; color: #166534; }
.habilitations td.etat-accessible { background: var(--probleme-pale); }
.habilitations td.etat-verrouille { color: var(--muet); }
.habilitations button.retirer { color: var(--danger); font-size: 1rem; margin-left: .3rem; }
.rotation-grille { overflow-x: auto; margin-bottom: 1.2rem; }
.rotation td, .rotation th { font-size: .88rem; padding: .4rem .5rem; }
.rotation tr.courante td { background: var(--info-pale); }
.rotation tr.appliquee td { background: var(--neutre-pale); color: var(--muet); }
.rotation td.trop { background: var(--danger-pale); }
.rotation .pl { display: inline-block; background: #fff; border: 1px solid var(--trait); border-radius: 6px; padding: 0 .35rem; margin: .1rem .15rem .1rem 0; white-space: nowrap; }
.rotation .pl.manuel { border-color: var(--poste); border-style: dashed; }
.grille-competences td { text-align: center; font-size: .85rem; }
.grille-competences td:first-child { text-align: left; font-size: .95rem; }
.grille-competences td.hors { background: var(--neutre-pale); }
.grille-competences .niv { font-weight: 600; display: block; }
.grille-competences .traces { display: block; font-size: .75rem; }
.trace { margin: 0 .15rem; color: var(--muet); }
.trace.ok { color: var(--fini); }
.trace.ko { color: var(--danger); }
.auto td, .auto th { text-align: center; }
.auto td:first-child, .auto th:first-child { text-align: left; }
.auto input[type=radio] { width: 1.2rem; height: 1.2rem; }
.entretien .bloc h2 { margin-bottom: .6rem; }
.signatures { display: flex; gap: 2rem; margin-top: 1rem; }
.signatures div { flex: 1; border-top: 1px solid var(--trait); padding-top: .4rem; }
.usine-indics { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .8rem; color: var(--muet); }
.usine-indics strong { color: var(--encre); font-size: 1.2rem; }
.usine-indics .alerte strong { color: var(--danger); }
.usine-scene { display: flex; gap: 1rem; align-items: flex-start; position: relative; background: #fff; }
.usine-scene:fullscreen { background: #fff; padding: 1rem; }
.usine-scene canvas { display: block; background: linear-gradient(#fff, var(--neutre-pale)); border-radius: var(--rayon); box-shadow: none; flex: 1; }
.usine-panneau { width: 20rem; flex: 0 0 20rem; background: var(--papier); border-radius: var(--rayon); box-shadow: none; padding: 1rem 1.2rem; max-height: 80vh; overflow: auto; }
.usine-panneau .point { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .4rem; }
.usine-bulle { position: absolute; z-index: 5; background: var(--encre); color: #fff; padding: .45rem .7rem; border-radius: 8px; font-size: .85rem; pointer-events: none; max-width: 20rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.usine-bulle .ko { color: #fca5a5; }
.usine-page .usine-scene { position: relative; }
.usine-scene.simulation canvas { outline: 4px solid #f59e0b; outline-offset: -4px; }
.taches { list-style: none; padding: 0; margin: 0; }
.taches li { padding: .35rem 0 .35rem .8rem; border-left: 4px solid var(--trait); margin-bottom: .3rem; }
.taches li.urgent { border-left-color: var(--danger); }
.taches small { display: block; }
.usine-fait strong { color: var(--encre); }
.flux-etape small { display: block; margin-top: .2rem; }
.usine-tableau { margin-top: 1.2rem; }
.etude-a_valider { background: var(--probleme-pale); color: #92400e; }
.etude-validee { background: var(--fini-pale); color: #166534; }
.incident { padding: .5rem 0; border-bottom: 1px dashed var(--trait); }
.incident:last-child { border-bottom: 0; }
.incident form { margin-top: .3rem; }

/* ---------------------------------------------------------------- l'écran de l'atelier : rejeu, simulation, bilan */
.usine-sim-form .ligne { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.usine-sim-form label { display: block; font-weight: 700; margin-bottom: .6rem; }
.usine-sim-form input { display: block; width: 100%; margin-top: .2rem; padding: .4rem .5rem; font: inherit; border: 2px solid var(--trait); border-radius: 10px; }
.usine-sim-form .aide { display: block; font-weight: 400; color: var(--muet); font-size: .85rem; }
.usine-sim-form p .bouton { display: inline-flex; width: auto; }
.usine-bandeau { margin-bottom: .6rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .45rem .8rem; border-radius: 10px; background: var(--probleme-pale); border: 2px solid var(--probleme); color: var(--encre); font-size: .92rem; }
.usine-bandeau[hidden], .usine-sim-form[hidden] { display: none; }
.usine-bandeau strong { letter-spacing: .12em; font-size: 1rem; } .usine-bandeau .bouton { width: auto; min-height: 40px; }
.usine-bandeau progress { width: 9rem; } .usine-bandeau select { font: inherit; padding: .15rem .3rem; border-radius: 6px; border: 1px solid var(--probleme); background: #fff; }
.usine-scene.simulation canvas { outline: 4px solid var(--probleme); outline-offset: -4px; }
.bilan-sim { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .4rem 0 .8rem; }
.bilan-sim th, .bilan-sim td { padding: .25rem .35rem; border-bottom: 1px solid var(--trait); text-align: right; } .bilan-sim th:first-child, .bilan-sim td:first-child { text-align: left; }
.bilan-sim tr.goulot td { background: var(--danger-pale); font-weight: 700; } .bilan-sim tr.sous-charge td { background: var(--fini-pale); }
.usine-scene canvas { border: 2px solid var(--trait); border-radius: var(--rayon); background: #fff; }
.entete .actions .bouton, .entete .actions form { width: auto; }

/* ---- éditeur de monde (étape 5) */
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.35; white-space: pre; }
.cases-inline .case { display: inline-block; margin: 0 .6rem .3rem 0; }
details.bloc > summary { cursor: pointer; list-style: none; }
details.bloc > summary::before { content: "▸ "; color: var(--muet); }
details.bloc[open] > summary::before { content: "▾ "; }
details.bloc[open] > summary { margin-bottom: .6rem; }

/* ---- aide : tutoriels et guides */
.grille-aide { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0 22px; }
.carte-aide { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.carte-aide:hover { border-color: var(--info); }
article.guide { line-height: 1.6; }
article.guide h1 { font-size: 1.6rem; } article.guide h2 { margin-top: 1.6em; } article.guide pre { background: #f1efe9; padding: 10px 12px; border-radius: 8px; overflow: auto; font-size: .85rem; }
article.guide table { border-collapse: collapse; width: 100%; } article.guide th, article.guide td { border: 1px solid var(--trait); padding: 6px 8px; text-align: left; vertical-align: top; }
article.guide code { font-size: .9em; background: #f1efe9; padding: 0 .25em; border-radius: 4px; }

/* ---- la bulle « Un bug ? » */
.retour-bouton { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--trait); background: #fff; color: var(--encre, #26221c); box-shadow: 0 4px 14px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .85; }
.retour-bouton:hover, .retour-bouton[aria-expanded="true"] { opacity: 1; border-color: var(--info); }
.retour-bouton .ico { width: 22px; height: 22px; }
body.eleve .retour-bouton { bottom: 92px; right: 12px; width: 40px; height: 40px; }
/* La bulle flotte au-dessus du contenu : une marge basse pour que la fin de la page défile au-dessus d'elle (en 375 px, elle cachait la dernière ligne de la checklist). */
body:has(.retour-bouton) main { padding-bottom: 72px; }
body.eleve:has(.retour-bouton) main.page { padding-bottom: 64px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.retour-panneau { position: fixed; right: 16px; bottom: 72px; z-index: 41; width: min(360px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; border: 2px solid var(--trait); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; }
.retour-panneau[hidden], .retour-panneau [hidden] { display: none !important; }
body.eleve .retour-panneau { bottom: 142px; right: 12px; }
.retour-tete { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--trait); }
.retour-tete strong { flex: 1; }
.retour-tete .lien { width: auto; padding: 0 4px; }
.retour-fil { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.bulle-msg { max-width: 85%; padding: 7px 10px; border-radius: 12px; font-size: .92rem; line-height: 1.35; white-space: pre-wrap; }
.bulle-msg .qui { display: block; font-size: .72rem; font-weight: 700; opacity: .7; margin-bottom: 2px; }
.bulle-msg.equipe { align-self: flex-start; background: #eef2f6; }
.bulle-msg.personne { align-self: flex-end; background: #e6f0fb; }
.bulle-msg.erreur { background: #fdecea; }
.retour-saisie { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--trait); }
.retour-saisie textarea { flex: 1; resize: none; font: inherit; border: 2px solid var(--trait); border-radius: 10px; padding: 6px 8px; }
.retour-saisie .bouton { width: auto; min-height: 0; padding: 0 12px; }
.fil-retour { display: flex; flex-direction: column; gap: 8px; }
section.retour.corrige { opacity: .75; }
@media print { .retour-bouton, .retour-panneau { display: none; } }

/* Les données d'un objet sur sa carte (lieu, élèves, prix) : libellé et valeur sur une ligne. */
.donnees-objet { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: 0; }
.donnees-objet dt { color: var(--muet, #6b6459); font-size: .9rem; }
.donnees-objet dd { margin: 0; font-weight: 600; text-align: right; }

/* Un bloc repliable dont le titre est un h2 : la flèche reste sur la ligne du titre. */
details.bloc > summary:has(> h2) { display: flex; align-items: center; gap: .3rem; }
/* Éditeur, réglages du site : une règle = des champs en grille ; un groupe de paramètres encadré. */
.champs-regle { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .2rem 1rem; align-items: center; }
.groupe-regle { border: 1px solid var(--trait, #d1d5db); border-radius: 10px; padding: .4rem .8rem; margin: .4rem 0; }
.groupe-regle legend { font-weight: 700; padding: 0 .3rem; }
.ordre-espaces { margin: .2rem 0 .6rem 1.2rem; padding: 0; } .ordre-espaces li { margin: .2rem 0; }
.etapes-parcours select.champ { width: auto; display: inline-block; }
/* Éditeur, simulation d'un scénario : le bilan, puis le fil coloré par genre de ligne. */
.simulation-scenario { border: 2px dashed var(--probleme, #f59e0b); border-radius: 12px; padding: .6rem 1rem; margin: .6rem 0; background: rgba(254, 243, 199, .35); }
.bilan-simulation { list-style: none; padding: 0; margin: .3rem 0 .6rem; } .bilan-simulation li { margin: .2rem 0; }
.fil-simulation li.fil-decision { font-weight: 700; } .fil-simulation li.fil-points { color: var(--fini); } .fil-simulation li.fil-mauvais { color: var(--danger); }
.essai-parcours { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: -.4rem 0 1rem; } .essai-parcours .bouton { width: auto; }
.usine-scene.editeur-plan { flex-direction: column; align-items: stretch; gap: .3rem; }
.fil-simulation { margin: .3rem 0 .6rem; padding: 0; list-style: none; } .fil-simulation li { margin: .15rem 0; }
.question-modele { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; margin: .3rem 0; } .question-modele input[type=checkbox] { width: 24px; height: 24px; } .question-modele .champ { margin: 0; }

/* Trajets des paquets (réseau du collège, convention 25) : la carte rejouée et la liste. */
.carte-trajets #carte-trajets { width: 100%; height: auto; max-height: 70vh; display: block; }
.carte-trajets .lien-reseau { stroke: #94a3b8; stroke-width: 4; }
.carte-trajets .noeud-reseau rect { fill: var(--fond-bloc, #fff); stroke: #475569; stroke-width: 1.5; }
.carte-trajets .noeud-reseau.pilotage rect { stroke-dasharray: 4 3; }
.carte-trajets .noeud-reseau text { font-size: 14px; font-weight: 600; text-anchor: middle; fill: currentColor; }
.carte-trajets .puce-paquet { transition: opacity .2s; }
.liste.trajets li { align-items: flex-start; }

/* --- l'élève sur tablette et sur ordinateur (essai du 06/11/2026 : la vue restait une colonne de téléphone de 430 px) ---
   Téléphone : rien ne change. Tablette (700 px et plus) : la colonne s'élargit, les onglets restent en bas, icône et libellé
   côte à côte. Ordinateur et iPad en paysage (1000 px et plus) : le bandeau en haut, les onglets en colonne à gauche, le contenu à droite. */
@media (min-width: 700px) {
  body.eleve .tel, body.eleve .onglets { max-width: 760px; }
  body.eleve .bandeau { padding: 18px 28px 20px; }
  body.eleve main.page { padding: 24px 28px 32px; }
  body.eleve .onglets a { flex-direction: row; justify-content: center; gap: .5rem; font-size: .9rem; padding: 10px 0; }
  body.eleve .onglets a .ico { width: 22px; height: 22px; }
  body.eleve .bulle-onglet { position: static; margin: 0; order: 3; }
}
@media (min-width: 1000px) {
  body.eleve .tel { max-width: none; padding-bottom: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  body.eleve .bandeau { grid-column: 1 / -1; padding: 18px 40px 20px; }
  body.eleve .onglets { grid-column: 1; grid-row: 2; position: sticky; top: 0; align-self: start; flex-direction: column; gap: 4px; max-width: none; margin: 0; padding: 20px 14px; border-top: 0; background: transparent; z-index: auto; }
  body.eleve .onglets a { justify-content: flex-start; gap: .7rem; font-size: 1rem; padding: 12px 14px; }
  body.eleve main.page { grid-column: 2; grid-row: 2; width: 100%; max-width: 980px; padding: 28px 40px 64px; border-left: 2px solid var(--trait); min-height: calc(100vh - 90px); }
  body.eleve .retour-bouton { bottom: 16px; right: 16px; width: 46px; height: 46px; }
  body.eleve .retour-panneau { bottom: 72px; right: 16px; }
}

/* Mission de découverte (« Mission carte ») : un tuto pas à pas, la chaîne, la progression, les étapes TP et Méchaîne. */
.mission-chaine { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.mission-chaine li { padding: .25rem .6rem; border: 1px solid var(--trait); border-radius: 999px; background: var(--papier); }
.mission-chaine li + li::before { content: "→ "; color: var(--muet); }
.mission-chaine li.moi { border-color: var(--poste); background: var(--poste-pale); font-weight: 700; }
.mission-chaine li.valide { border-color: var(--fini); background: var(--fini-pale); }
.mission-barre { height: .55rem; border-radius: 999px; background: var(--neutre-pale); overflow: hidden; }
.mission-barre span { display: block; height: 100%; background: var(--fini); }
.mission-etapes { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.mission-etapes a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .65rem; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--papier); color: var(--encre); text-decoration: none; }
.mission-etapes a.actif { border-color: var(--poste); box-shadow: 0 0 0 2px var(--poste-pale); font-weight: 700; }
.mission-etapes a.faite .numero { background: var(--fini); color: #fff; }
.mission-etapes .numero { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--neutre-pale); font-weight: 800; font-size: .85rem; }
.mission-etapes .genre { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .05rem .35rem; border-radius: 4px; background: var(--neutre-pale); color: var(--muet); }
.mission-etapes .genre.mechaine { background: var(--info-pale); color: var(--info); }
.mission-gestes { margin: .4rem 0 .6rem; padding-left: 1.3rem; } .mission-gestes li { margin: .25rem 0; }
.mission-reussite { margin: 0 0 .6rem; padding: .55rem .7rem; border-left: 4px solid var(--fini); background: var(--fini-pale); border-radius: 4px; }
.mission-repli { margin-top: .5rem; border-top: 1px solid var(--trait); padding-top: .4rem; } .mission-repli summary { cursor: pointer; font-weight: 700; } .mission-repli p { margin: .4rem 0 0; }
/* Suivi des missions (admin/missions.njk) : un élève par ligne repliable, l'entretien de sortie dedans. */
.mission-suivi { border-top: 1px solid var(--trait, #ddd); padding: .5rem 0; }
.mission-suivi > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mission-suivi .entretien-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 .2rem; }
.mission-suivi .entretien-form input[name="note"] { flex: 1 1 14rem; width: auto; height: auto; min-height: 0; padding: .45rem .7rem; }
.mission-suivi .entretien-form .bouton { width: auto; flex: 0 0 auto; }
/* Les compétences visées du poste, une par ligne : son code, son nom, son niveau (entretien noté directement). */
.mission-suivi .competences-notees { flex: 1 1 100%; margin: 0; padding: .4rem .7rem .6rem; border: 1px solid var(--trait, #d8d2c4); border-radius: 10px; display: grid; gap: .3rem; }
.mission-suivi .competences-notees legend { padding: 0 .3rem; }
.mission-suivi .competences-notees label { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.mission-suivi .competences-notees select { flex: 0 0 8.5rem; width: 8.5rem; }
.evaluer-form { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.evaluer-form .sur { flex: 1 1 100%; margin: 0; }
.evaluer-form .bouton { width: auto; }
.mission-suivi .entretien-form select { width: auto; }

/* Dans le panneau « La Méchaîne à côté » (page de mission) : la page seule, sans bandeau, onglets ni bulle. */
.dans-cadre .bandeau, .dans-cadre header.haut, .dans-cadre nav.onglets, .dans-cadre .retour-bouton, .dans-cadre .retour-panneau { display: none !important; }
.dans-cadre main { padding-top: 12px; }

/* Le créneau de la classe (« Affectations ») : les boutons sur une ligne. */
.creneau-form .creneaux { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.creneau-form .creneaux .bouton { width: auto; flex: 0 0 auto; }
