/* Formations ATHP — habillage repris du système de design des formations (design/systeme-design.jsonc). */
@font-face {
  font-family: 'Archivo';
  src: url('/polices/archivo-latin-wdth-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('/polices/archivo-latin-ext-wdth-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: 'IBM Plex Mono'; src: url('/polices/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/polices/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/polices/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --papier: #ffffff;
  --papier2: #f4f3f1;
  --encre: #1c1c1f;
  --texte: #34343a;
  --texte-doux: #63626a;
  --trait: #dad8d5;
  --trait-fort: #b3b0ab;
  --gris: #8f8f8f;
  --accent: #ec1b24;
  --accent-sombre: #ba3434;
  --accent-clair: #ffe3df;
  --succes: #1f7a4d;
  --succes-clair: #e3f3ea;
  --alerte: #965b0a;
  --alerte-clair: #fdf1dc;
  --police: 'Archivo', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --rayon: 6px;
  --ombre: 0 1px 0 rgba(28, 28, 31, 0.04), 0 8px 22px -14px rgba(28, 28, 31, 0.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--police); color: var(--texte); background: var(--papier2); }
#app { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent-sombre); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.plein, .plein svg { fill: currentColor; stroke: none; }
svg.doux { color: var(--trait-fort); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--trait); margin: 22px 0 16px; }
code, pre { font-family: var(--mono); font-size: 13px; background: var(--papier2); border-radius: 3px; }
code { padding: 2px 6px; }
pre { padding: 12px 14px; overflow-x: auto; border: 1px solid var(--trait); user-select: all; }

/* ------------------------------------------------------------------ Connexion */
.page-seule { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.connexion { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 34px 32px 28px; }
.connexion .logo { width: 150px; height: auto; margin-bottom: 6px; }
.connexion h1 { font-size: 32px; }
.connexion p { margin: 0; }
.erreur-formulaire { background: var(--accent-clair); color: var(--accent-sombre); padding: 10px 12px; border-radius: var(--rayon); font-weight: 600; margin: 0; }
.voir { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; font-size: 14px; color: var(--texte-doux); }
.voir input { width: 16px; height: 16px; accent-color: var(--accent); }
.chargement { padding: 70px 20px; text-align: center; color: var(--texte-doux); }

/* ------------------------------------------------------------------ Barre du haut */
.barre { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 26px; padding: 0 28px; min-height: 62px; background: var(--papier); border-bottom: 1px solid var(--trait); }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre); font-weight: 760; font-stretch: 82%; font-size: 20px; }
.marque img { height: 26px; width: auto; }
.navigation { display: flex; gap: 2px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.navigation::-webkit-scrollbar { display: none; }
.navigation a { display: flex; align-items: center; padding: 0 14px; color: var(--texte); text-decoration: none; font-weight: 560; white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.navigation a:hover { color: var(--encre); background: var(--papier2); }
.navigation a.actif { color: var(--accent-sombre); border-bottom-color: var(--accent); font-weight: 680; }
.compte { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.compte a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--rayon); color: var(--texte); text-decoration: none; font-weight: 560; white-space: nowrap; }
.compte a:hover, .compte a.actif { background: var(--papier2); color: var(--encre); }
.pied { padding: 18px 28px; font: 400 12px var(--mono); color: var(--gris); text-align: center; }

/* ------------------------------------------------------------------ Page */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 28px 60px; outline: none; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.retour { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -4px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--texte-doux); }
.retour:hover { color: var(--accent-sombre); }
.retour svg { width: 16px; height: 16px; }
.surtitre { font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-sombre); margin: 0 0 8px; }
h1 { margin: 0; font-size: 36px; line-height: 1.05; font-weight: 780; font-stretch: 80%; letter-spacing: -0.015em; color: var(--encre); }
h2 { margin: 0 0 14px; font-size: 22px; font-weight: 720; font-stretch: 86%; color: var(--encre); }
h3 { margin: 0 0 8px; font-size: 17px; font-weight: 680; color: var(--encre); }
.intro { margin: 10px 0 0; color: var(--texte-doux); max-width: 72ch; font-size: 17px; }
.mono { font-family: var(--mono); }
.doux { color: var(--texte-doux); }
.petit { font-size: 14px; }
.gros { font-size: 20px; font-weight: 600; color: var(--encre); }
.alerte-texte { color: var(--alerte); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pile { display: flex; flex-direction: column; gap: 20px; }
.pile-serree { display: flex; flex-direction: column; gap: 12px; }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.titre-section { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.titre-section h2 { margin: 0; }

.carte { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px 24px; box-shadow: var(--ombre); }
.carte.plate { box-shadow: none; }
.carte > p:first-of-type { margin-top: 0; }
.vide { padding: 36px 24px; text-align: center; color: var(--texte-doux); border: 1px dashed var(--trait-fort); border-radius: var(--rayon); background: var(--papier); }
.vide strong { display: block; color: var(--encre); font-size: 19px; margin-bottom: 6px; }
.vide .actions { justify-content: center; margin-top: 16px; }
.vide-ligne { color: var(--texte-doux); text-align: center; padding: 22px !important; display: block !important; border: 0 !important; }
.bandeau { display: flex; align-items: center; gap: 10px; margin: -8px 0 22px; padding: 10px 14px; background: var(--alerte-clair); color: var(--alerte); border-radius: var(--rayon); font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------------ Boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; min-height: 40px; border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: var(--papier); color: var(--encre); font-weight: 620; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--encre); }
.btn.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.principal:hover { background: var(--accent-sombre); border-color: var(--accent-sombre); }
.btn.discret { border-color: transparent; background: transparent; color: var(--texte-doux); }
.btn.discret:hover { color: var(--encre); background: var(--papier2); }
.btn.danger { color: var(--accent-sombre); }
.btn.danger:hover { border-color: var(--accent-sombre); background: var(--accent-clair); }
.btn.petit { min-height: 32px; padding: 4px 11px; font-size: 14px; }
.btn.large { min-height: 50px; padding: 10px 24px; font-size: 17px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > span { font-size: 14px; font-weight: 620; color: var(--encre); }
input[type='text'], input[type='password'], input[type='search'], input[type='date'], input[type='time'], select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: var(--papier); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px var(--accent-clair); }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.grille-champs .large { grid-column: 1 / -1; }
.barre-outils { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.barre-outils input[type='search'] { max-width: 340px; }
.segments { display: inline-flex; border: 1px solid var(--trait-fort); border-radius: var(--rayon); overflow: hidden; background: var(--papier); }
.segments button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--texte-doux); }
.segments button + button { border-left: 1px solid var(--trait); }
.segments button.actif { background: var(--encre); color: #fff; }
.valider { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.etape-formulaire { margin-bottom: 18px; }
.etape-formulaire h2 { display: flex; align-items: center; gap: 12px; }
.numero { width: 30px; height: 30px; border-radius: 50%; background: var(--encre); color: #fff; display: inline-grid; place-items: center; font: 600 15px var(--mono); flex: none; }

/* ------------------------------------------------------------------ Étiquettes, jauges */
.etiquette { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 13px; font-weight: 620; background: var(--papier2); color: var(--texte-doux); white-space: nowrap; }
.etiquette.rouge { background: var(--accent-clair); color: var(--accent-sombre); }
.etiquette.vert { background: var(--succes-clair); color: var(--succes); }
.etiquette.orange { background: var(--alerte-clair); color: var(--alerte); }
.etiquette.sombre { background: var(--encre); color: #fff; }
.etiquette.barre { text-decoration: line-through; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jauge-texte { display: flex; align-items: center; gap: 10px; min-width: 120px; font: 500 13px var(--mono); color: var(--texte-doux); white-space: nowrap; }
.jauge { flex: 1; min-width: 60px; height: 8px; background: var(--papier2); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--trait); }
.jauge i { display: block; height: 100%; background: var(--encre); border-radius: 4px; transition: width 0.3s; }
.jauge-texte.complet .jauge i { background: var(--succes); }

/* ------------------------------------------------------------------ Stagiaire : mes formations */
.reprise { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 26px 28px; background: var(--encre); color: #e9e8e6; border-radius: var(--rayon); }
.reprise h2 { color: #fff; font-size: 28px; margin-bottom: 6px; }
.reprise p { margin: 0; }
.reprise .surtitre { color: #ff8a80; }
.reprise .doux { color: #b9b8b4; }
.reprise.bravo { background: var(--succes); }
.reprise.bravo .surtitre { color: #c8f0d9; }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.carte-formation { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; min-height: 170px; }
.carte-formation:hover { border-color: var(--encre); }
.carte-formation h3 { font-size: 22px; font-stretch: 86%; font-weight: 720; margin: 0; }
.carte-formation .bas { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------------------------------------------ Une formation, ses étapes */
.avancement { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 18px 22px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: 18px; }
.avancement > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
.avancement b { color: var(--encre); font-size: 18px; }
.avancement.fini { background: var(--succes-clair); border-color: var(--succes); }
.avancement.fini b { color: var(--succes); }
.objectifs-bloc summary { cursor: pointer; font-weight: 680; color: var(--encre); }
.objectifs { margin: 12px 0 0; padding-left: 22px; }
.objectifs li { margin: 4px 0; }
.objectifs li::marker { color: var(--accent); font-weight: 700; }
ol.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.etape { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); text-decoration: none; color: inherit; }
a.etape:hover { border-color: var(--encre); }
.etape.a-faire { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-clair); }
.etape.indisponible { opacity: 0.55; background: transparent; border-style: dashed; }
.rang { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--trait-fort); display: grid; place-items: center; font: 600 14px var(--mono); color: var(--texte-doux); flex: none; }
.rang.fait { background: var(--succes); border-color: var(--succes); color: #fff; }
.rang svg { stroke-width: 2.8; }
.pastille { width: 36px; height: 36px; border-radius: var(--rayon); display: grid; place-items: center; background: var(--papier2); color: var(--encre); flex: none; }
.etape .texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nom { font-weight: 660; color: var(--encre); line-height: 1.25; }
.sous { font-size: 14px; color: var(--texte-doux); }
.etape .apres { display: flex; align-items: center; gap: 12px; }

.entete-etape { margin-bottom: 18px; }
.entete-etape h1 { font-size: 30px; }
.scene { background: #111; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.scene video { display: block; width: 100%; max-height: calc(100vh - 300px); aspect-ratio: 16 / 9; background: #000; }
.scene.cadre { background: var(--papier); border: 1px solid var(--trait); }
.scene iframe { display: block; width: 100%; height: calc(100vh - 330px); min-height: 480px; border: 0; }
.sous-scene { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; min-height: 32px; }
.a-produire { padding: 50px 28px; text-align: center; background: var(--papier); border: 1px dashed var(--trait-fort); border-radius: var(--rayon); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.a-produire h2, .a-produire p { margin: 0; }
.bas-etape { position: sticky; bottom: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 22px -28px -60px; padding: 14px 28px; background: var(--papier); border-top: 1px solid var(--trait); }
.bas-etape > :last-child { justify-self: end; }
.bas-etape > :first-child { justify-self: start; }
.etat { display: inline-flex; align-items: center; gap: 8px; color: var(--texte-doux); font-size: 15px; text-align: center; }
.etat.fait { color: var(--succes); font-weight: 680; }

/* ------------------------------------------------------------------ Formateur : accueil */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tuile { display: flex; align-items: center; gap: 16px; padding: 20px 20px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); text-decoration: none; color: var(--texte); }
.tuile:hover { border-color: var(--accent); }
.tuile:hover .fleche { color: var(--accent); transform: translateX(3px); }
.tuile-icone { width: 48px; height: 48px; border-radius: var(--rayon); background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.tuile-icone svg { width: 24px; height: 24px; }
.tuile > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tuile b { color: var(--encre); font-size: 18px; line-height: 1.2; font-weight: 700; }
.tuile span span { font-size: 14px; color: var(--texte-doux); }
.fleche { color: var(--trait-fort); transition: transform 0.15s; }
.alertes { border-left: 4px solid var(--alerte); }
.alertes svg { color: var(--alerte); }
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li + li { border-top: 1px solid var(--trait); }
.liste.carte { padding: 4px 16px; }
.ligne-lien { display: flex; gap: 14px; align-items: center; padding: 12px 4px; text-decoration: none; color: inherit; }
a.ligne-lien:hover .titre { color: var(--accent-sombre); }
.titre { font-weight: 660; color: var(--encre); }
.ligne-lien .apres { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.date-bloc { flex: none; width: 54px; text-align: center; border: 1px solid var(--trait-fort); border-radius: var(--rayon); overflow: hidden; background: var(--papier); }
.date-bloc b { display: block; font-size: 22px; font-weight: 760; font-stretch: 80%; line-height: 1.25; color: var(--encre); }
.date-bloc span { display: block; font: 500 10px/1.6 var(--mono); text-transform: uppercase; background: var(--encre); color: #fff; letter-spacing: 0.08em; }
.date-bloc.passee span { background: var(--gris); }

/* ------------------------------------------------------------------ Formations (formateur) */
.programme-carte { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 26px; align-items: start; }
.programme-carte h2 { font-size: 25px; margin: 10px 0 6px; }
.programme-carte p { margin: 0 0 4px; }
.programme-carte .actions { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--trait); }
.chiffres-ligne { display: flex; gap: 22px; }
.chiffres-ligne span { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--texte-doux); min-width: 62px; }
.chiffres-ligne b { font-size: 30px; line-height: 1.1; font-weight: 760; font-stretch: 80%; color: var(--encre); }

/* ------------------------------------------------------------------ Tableaux et grille de suivi */
.tableau-cadre, .matrice-cadre { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--papier); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
.tableau th { text-align: left; font-size: 13px; font-weight: 620; color: var(--texte-doux); background: var(--papier2); padding: 10px 16px; white-space: nowrap; }
.tableau td { padding: 12px 16px; border-top: 1px solid var(--trait); vertical-align: middle; }
.tableau tbody tr { cursor: pointer; }
.tableau tbody tr:hover { background: #fffaf9; }
.tableau a { color: var(--encre); text-decoration: none; }
tr.inactif { color: var(--gris); }
tr.inactif a { color: var(--gris); }
.ligne-programme { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 0; }
.ligne-programme > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrice th, .matrice td { border-bottom: 1px solid var(--trait); padding: 7px 6px; text-align: center; }
.matrice thead th { background: var(--papier2); font-size: 13px; font-weight: 620; color: var(--texte-doux); vertical-align: bottom; white-space: nowrap; }
.matrice th.nom, .matrice td.nom { text-align: left; padding-left: 16px; min-width: 190px; position: sticky; left: 0; background: inherit; z-index: 1; }
.matrice td.nom a { color: var(--encre); font-weight: 660; text-decoration: none; }
.matrice tbody tr { background: var(--papier); }
.matrice tbody tr.absent td:not(.nom):not(.presence) { opacity: 0.35; }
.col-etape { font: 600 12px var(--mono); color: var(--encre); }
.col-etape, .col-etape a { display: table-cell; }
.col-etape a, .col-etape > span { color: inherit; text-decoration: none; }
.col-etape a { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border-radius: 4px; }
.col-etape a:hover { background: var(--accent-clair); color: var(--accent-sombre); }
.col-etape svg { width: 15px; height: 15px; display: block; margin: 0 auto 4px; }
.col-etape a svg { margin: 0; }
.case { width: 32px; height: 32px; border: 1.5px solid var(--trait-fort); border-radius: var(--rayon); background: var(--papier); cursor: pointer; display: inline-grid; place-items: center; color: #fff; padding: 0; vertical-align: middle; flex: none; }
.case:hover { border-color: var(--succes); }
.case.fait { background: var(--succes); border-color: var(--succes); }
.case.vide { border-style: dashed; cursor: default; }
.case svg { width: 17px; height: 17px; stroke-width: 2.8; }
.case[disabled] { cursor: not-allowed; }
.presence { white-space: nowrap; }
.presence .segments button { padding: 5px 9px; font-size: 13px; }
.presence .segments button.actif.present { background: var(--succes); }
.presence .segments button.actif.absent { background: var(--accent-sombre); }
.matrice tfoot td { font: 500 13px var(--mono); color: var(--texte-doux); background: var(--papier2); border-bottom: 0; }
.legende-etapes { padding: 0 0 0 26px; margin: 0; columns: 2 320px; column-gap: 30px; }
.legende-etapes li { padding: 4px 0; break-inside: avoid; }
.legende-etapes li::marker { font: 600 13px var(--mono); color: var(--accent-sombre); }
.legende-etapes a { color: var(--encre); font-weight: 620; }
.legende-etapes small { color: var(--texte-doux); font-size: 13px; }
.infos-session { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; margin-bottom: 22px; }
.infos-session > div { padding: 12px 16px; box-shadow: 1px 0 0 var(--trait), 0 1px 0 var(--trait); }
.infos-session span { display: block; font-size: 13px; color: var(--texte-doux); margin-bottom: 2px; }
.infos-session b { font-weight: 660; color: var(--encre); }

/* ------------------------------------------------------------------ Choix (inscrire, sessions) */
.choix-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.choix-carte { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--trait-fort); border-radius: var(--rayon); cursor: pointer; }
.choix-carte:hover { border-color: var(--encre); }
.choix-carte.choisi { border-color: var(--accent); background: #fff8f7; box-shadow: 0 0 0 3px var(--accent-clair); }
.choix-carte input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choix-carte span { display: flex; flex-direction: column; }
.choix-carte b { color: var(--encre); }
.selection-personnes { border: 1px solid var(--trait-fort); border-radius: var(--rayon); max-height: 380px; overflow: auto; background: var(--papier); }
.selection-personnes label { display: flex; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--trait); }
.selection-personnes label:last-child { border-bottom: 0; }
.selection-personnes label:hover { background: var(--papier2); }
.selection-personnes label.deja { cursor: default; color: var(--texte-doux); }
.selection-personnes label .etiquette { margin-left: auto; }
.selection-personnes input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* ------------------------------------------------------------------ Parcours sur mesure */
.etapes-edition { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes-edition li { display: grid; grid-template-columns: 28px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--trait); }
.etapes-edition li:not(.vide-ligne)::before { counter-increment: etape; content: counter(etape, decimal-leading-zero); font: 500 13px var(--mono); color: var(--gris); }
.etapes-edition .btn { min-height: 30px; padding: 2px 7px; }
.choix-formation { border-top: 1px solid var(--trait); padding: 12px 0; }
.choix-formation:first-of-type { border-top: 0; padding-top: 0; }
.choix-formation > div:first-child { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.choix-element { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; }
.choix-element .btn { margin-left: auto; }
.choix-element .pastille { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ Fiche stagiaire, fiche de connexion */
dl.fiche { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; align-items: baseline; }
dl.fiche dt { color: var(--texte-doux); font-size: 14px; }
dl.fiche dd { margin: 0; color: var(--encre); word-break: break-all; }
.fiche-connexion { border: 2px solid var(--succes); margin-bottom: 22px; }
.fiche-connexion h2 { display: flex; align-items: center; gap: 10px; color: var(--succes); }
.fiche-connexion dl { padding: 14px 18px; background: var(--papier2); border-radius: var(--rayon); margin: 14px 0; }
.programme-detail { padding: 0; }
.programme-detail summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; cursor: pointer; }
.programme-detail .etapes-mini { list-style: none; margin: 0; padding: 4px 18px 8px; border-top: 1px solid var(--trait); }
.etapes-mini li { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.etapes-mini .case { width: 26px; height: 26px; }
.programme-detail .actions { padding: 10px 18px 14px; }
.ligne-ajout { display: flex; gap: 10px; margin-top: 12px; padding: 12px; }
.ajout-equipe { display: grid; grid-template-columns: 1fr 1fr 170px auto; gap: 10px; }
.jeton { margin-top: 16px; border-color: var(--succes); border-width: 2px; }

/* ------------------------------------------------------------------ Sessions */
.session-ligne { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; text-decoration: none; color: inherit; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); }
.session-ligne + .session-ligne { margin-top: 8px; }
.session-ligne:hover { border-color: var(--encre); }
.session-ligne .titre { font-size: 17px; }
.session-ligne .infos { font-size: 14px; color: var(--texte-doux); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.session-ligne .apres { display: flex; align-items: center; gap: 8px; }
.session-ligne.annulee { opacity: 0.6; }
.mois { font-size: 14px; font-weight: 680; text-transform: capitalize; color: var(--texte-doux); margin: 22px 0 10px; }
.calendrier { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.calendrier-tete { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--trait); }
.calendrier-tete b { font-size: 19px; font-weight: 720; font-stretch: 86%; text-transform: capitalize; color: var(--encre); }
.jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.jours > div { min-height: 100px; border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait); padding: 6px; font-size: 13px; }
.jours > div:nth-child(7n) { border-right: 0; }
.jours .nom-jour { min-height: 0; font-weight: 620; color: var(--texte-doux); background: var(--papier2); text-align: center; }
.jours .hors { background: #fbfbfa; }
.jours .hors .num { color: var(--trait-fort); }
.jours .num { font: 500 13px var(--mono); color: var(--texte-doux); text-decoration: none; padding: 0 5px; border-radius: 3px; }
.jours .num:hover { background: var(--accent-clair); color: var(--accent-sombre); }
.jours .aujourdhui .num { background: var(--accent); color: #fff; }
.pastille-session { display: block; margin-top: 4px; padding: 3px 6px; border-radius: 3px; background: var(--encre); color: #fff; text-decoration: none; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille-session.realisee { background: var(--succes); }
.pastille-session.annulee { background: var(--gris); text-decoration: line-through; }

/* ------------------------------------------------------------------ Annonces */
#annonces { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.annonce { background: var(--encre); color: #fff; padding: 12px 18px; border-radius: var(--rayon); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45); font-weight: 560; animation: monte 0.25s ease-out; }
.annonce.erreur { background: var(--accent-sombre); }
@keyframes monte { from { transform: translateY(8px); opacity: 0; } }
#impression { display: none; }

/* ------------------------------------------------------------------ Petits écrans */
@media (max-width: 980px) {
  .deux-colonnes, .programme-carte { grid-template-columns: minmax(0, 1fr); }
  .chiffres-ligne { justify-content: flex-start; }
  .ajout-equipe { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1040px) {
  .barre { flex-wrap: wrap; gap: 0 14px; padding: 6px 14px 0; }
  .marque { min-height: 44px; }
  .navigation { order: 3; margin: 0 -14px; padding: 0 6px; width: calc(100% + 28px); border-top: 1px solid var(--trait); }
  .navigation a { padding: 10px 12px; }
}
@media (max-width: 760px) {
  .compte a span, .compte .btn span { display: none; }
  main { padding: 22px 14px 50px; }
  h1 { font-size: 28px; }
  .entete-etape h1 { font-size: 24px; }
  .reprise { padding: 20px; }
  .reprise .btn, .avancement .btn { width: 100%; }
  .etape { padding: 12px; gap: 10px; }
  .etape .pastille { display: none; }
  .etape .apres .doux { display: none; }
  .bas-etape { grid-template-columns: auto 1fr; margin: 18px -14px -50px; padding: 10px 14px; }
  .bas-etape .etat { grid-column: 1 / -1; grid-row: 1; justify-content: center; font-size: 14px; }
  .bas-etape .btn.large { min-height: 46px; padding: 8px 16px; font-size: 16px; }
  .scene iframe { height: calc(100vh - 300px); min-height: 380px; }
  .scene video { max-height: none; }
  .session-ligne { grid-template-columns: 54px minmax(0, 1fr); }
  .session-ligne .apres { grid-column: 1 / -1; }
  .jours > div { min-height: 64px; padding: 3px; }
}

/* ------------------------------------------------------------------ Impression */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  #app, #annonces { display: none !important; }
  #impression { display: block; color: #000; }
  .fiche-imprimee { max-width: 130mm; margin: 20mm auto 0; border: 1px solid #888; padding: 12mm; }
  .fiche-imprimee img { width: 40mm; margin-bottom: 8mm; }
  .fiche-imprimee h1 { font-size: 20pt; margin-bottom: 4mm; }
  .fiche-imprimee dl { margin: 8mm 0; gap: 4mm 8mm; }
  .emargement-tete { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 12px; }
  .emargement-tete img { width: 34mm; }
  .emargement-tete h1 { font-size: 20pt; margin: 0 0 4px; }
  .emargement-infos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px; margin-bottom: 10px; font-size: 10pt; }
  .emargement-infos span { font-size: 8pt; text-transform: uppercase; color: #555; display: block; }
  .emargement-programme { font-size: 9pt; margin: 0 0 12px; padding-left: 18px; columns: 2; }
  table.emargement { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .emargement th, .emargement td { border: 1px solid #888; padding: 6px 8px; text-align: left; }
  .emargement th { background: #eee; font-size: 8pt; text-transform: uppercase; }
  .emargement td { height: 13mm; }
  .emargement-pied { margin-top: 14px; display: flex; justify-content: space-between; font-size: 9pt; }
  .emargement-pied div { width: 45%; border: 1px solid #888; height: 22mm; padding: 4px 8px; }
}
