/* SAFE ACADEMY · complements a la charte de la plateforme EFFISAFE (charte.css).
   Aucune couleur de marque nouvelle : gris nuit, bleu, beige dore, et les trois etats metier.
   Composants ajoutes pour les ecrans de formation : etapes, frise, etats de competence,
   barres de repartition, fil d'exercice, fenetre modale, regie. */

:root {
  --acquis: #27703D;  --acquis-bg: #E7F1EA;
  --encours: #875C17; --encours-bg: #F6EEDF;
  --nonacquis: #C0392B; --nonacquis-bg: #F7E7E4;
  --nonevaluable: #5C6570; --nonevaluable-bg: #EEF0F2;
}
a { color: var(--bleu); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--sunk); padding: 1px 6px; border-radius: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.droite { margin-left: auto; }
.rangee { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pile { display: flex; flex-direction: column; gap: var(--gap); }
.discret { color: var(--muted); }
.fort { font-weight: 600; }
.nowrap { white-space: nowrap; }
.content { max-width: 1240px; margin: 0 auto; width: 100%; }
.content--etroit { max-width: 860px; }
.topbar__titre .sous { margin: 0 0 2px; }
.topbar__titre .sous a { color: var(--muted); text-decoration: none; }
.topbar__titre .sous a:hover { color: var(--bleu); }
.btn--danger { color: var(--bad); }
.btn--danger:hover { border-color: var(--bad); color: var(--bad); }
.btn--lien { border: 0; background: none; padding: 0; color: var(--bleu); font-weight: 600; cursor: pointer; font-size: 12.5px; }
.btn--lien:hover { text-decoration: underline; color: var(--bleu-sombre); }
.btn--large { padding: 10px 18px; font-size: 13px; }

/* ---------- Bandeaux d'information ---------- */
.bandeau {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-radius: var(--radius); padding: 11px 14px; font-size: 12.5px;
  background: var(--sunk); color: var(--muted2); border: 1px solid var(--line);
}
.bandeau strong { color: var(--ink); }
.bandeau--ok { background: var(--ok-bg); border-color: #CFE3D5; color: #24572F; }
.bandeau--warn { background: var(--warn-bg); border-color: #EBDDBF; color: #6E4D14; }
.bandeau--bad { background: var(--bad-bg); border-color: #EDCFC9; color: #8E2A20; }
.bandeau--info { background: rgba(36,99,148,.07); border-color: rgba(36,99,148,.2); color: var(--bleu-sombre); }
.bandeau .btn { margin-left: auto; }

/* ---------- Pastille aux initiales ---------- */
.av {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(36,99,148,.1); color: var(--bleu);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
}
.qui { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qui__nom { font-weight: 600; }
.qui__sous { font-size: 11.5px; color: var(--muted); }

/* ---------- Tableaux : complements ---------- */
.table td { vertical-align: middle; }
.table tr.is-alerte td { background: var(--bad-bg); }
.table tr.is-attention td { background: var(--warn-bg); }
.table tr.is-choisi td { background: rgba(36,99,148,.07); }
.table tr.table__groupe td { background: var(--sunk); font-weight: 600; font-size: 12px; color: var(--nuit); padding-top: 7px; padding-bottom: 7px; }
.table .col-accent { background: rgba(46,125,70,.05); }
.table th.col-accent { color: var(--ok); }
.table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--bleu); }
.table .suite { color: var(--muted); font-size: 12px; }
.vide { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- Formulaires ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form--3 { grid-template-columns: repeat(3, 1fr); }
.form .plein { grid-column: 1 / -1; }
.ctl input, .ctl select, .ctl textarea { width: 100%; }
.ctl__aide { font-size: 11.5px; color: var(--muted); }
.ctl__lbl small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.form__pied { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 16px; }
input[type="date"], input[type="time"], input[type="tel"] {
  font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 11px; font-family: var(--font);
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); color: var(--muted2); font-size: 12.5px; font-weight: 600;
  padding: 8px 14px; cursor: pointer; border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button.is-active { background: var(--bleu); color: #FFF; }

/* ---------- Etapes numerotees ---------- */
.etapes { display: flex; align-items: center; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; box-shadow: var(--shadow); }
.etape { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.etape__n { width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; }
.etape.is-active { color: var(--ink); font-weight: 600; }
.etape.is-active .etape__n { background: var(--nuit); color: #FFF; }
.etape.is-faite .etape__n { background: var(--ok-bg); color: var(--ok); }
.etapes__trait { flex: 1; height: 1px; background: var(--line); margin: 0 14px; min-width: 18px; }

/* ---------- Frise du calendrier d'une session ---------- */
.frise { position: relative; margin: 6px 6px 0; padding: 44px 0 40px; }
.frise__ligne { position: absolute; left: 0; right: 0; top: 62px; height: 6px; border-radius: 3px; background: var(--sunk); }
.frise__plage { position: absolute; top: 62px; height: 6px; border-radius: 3px; }
.frise__plage--posi { background: rgba(46,125,70,.35); }
.frise__plage--eval { background: rgba(36,99,148,.35); }
.frise__pt { position: absolute; top: 0; transform: translateX(-50%); text-align: center; width: 92px; }
.frise__j { font-size: 11px; font-weight: 600; color: var(--nuit); }
.frise__d { font-size: 10.5px; color: var(--muted); }
.frise__rond { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--bleu); background: var(--surface); margin: 13px auto 0; position: relative; z-index: 2; }
.frise__pt--posi .frise__rond { border-color: var(--beige); }
.frise__pt--posi .frise__j { color: #8A6D3B; }
.frise__pt--jour .frise__rond { background: var(--nuit); border-color: var(--nuit); }
.frise__pt--passe .frise__rond { opacity: .55; }
.frise__l { font-size: 11px; color: var(--muted2); margin-top: 12px; }
.frise--auj { padding-bottom: 52px; }
.frise__pt--auj .frise__rond { border-color: var(--bad); opacity: 1; }
.frise__ici { display: block; font-size: 10px; font-weight: 600; color: var(--bad); }
.frise__auj { position: absolute; top: 36px; bottom: 30px; width: 0; border-left: 2px dashed var(--bad); z-index: 1; }
.frise__auj span { position: absolute; top: -16px; left: -30px; width: 60px; text-align: center; font-size: 10px; font-weight: 600; color: var(--bad); }

/* ---------- Etats de competence ---------- */
.etat { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.etat--acquis { background: var(--acquis-bg); color: var(--acquis); }
.etat--en_cours { background: var(--encours-bg); color: var(--encours); }
.etat--non_acquis { background: var(--nonacquis-bg); color: var(--nonacquis); }
.etat--non_evaluable { background: var(--nonevaluable-bg); color: var(--nonevaluable); }
.etat--mini { width: 22px; height: 22px; padding: 0; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; }
.code-c { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 4px; background: var(--nuit); color: #FFF; font-size: 10.5px; font-weight: 600; }
.barre { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sunk); min-width: 150px; }
.barre > span { display: block; height: 100%; }
.barre .b-acquis { background: var(--acquis); }
.barre .b-en_cours { background: #D9A441; }
.barre .b-non_acquis { background: var(--nonacquis); }
.barre .b-non_evaluable { background: #B9C0C7; }
.jauge { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin-top: 10px; position: relative; }
.jauge > span { display: block; height: 100%; background: var(--bleu); border-radius: 4px; }
.jauge--ok > span { background: var(--ok); }
.jauge__cible { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--nuit); }
.sens--progres { color: var(--ok); font-weight: 600; }
.sens--recul { color: var(--bad); font-weight: 600; }
.sens--stable { color: var(--muted); }

/* ---------- Grands chiffres ---------- */
.kpi__val small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.kpi--ok { border-top: 3px solid var(--ok); }
.kpi--bad { border-top: 3px solid var(--bad); }
.kpis--6 { grid-template-columns: repeat(6, 1fr); }
.kpis--2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Fil d'un exercice (journal lu par le formateur) ---------- */
.fil { display: flex; flex-direction: column; gap: 8px; }
.fil__phase { display: flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.fil__phase::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fil__msg { display: flex; gap: 10px; align-items: flex-start; max-width: 86%; }
.fil__msg--moi { align-self: flex-end; flex-direction: row-reverse; }
.fil__bulle { background: var(--sunk); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.55; position: relative; }
.fil__msg--moi .fil__bulle { background: rgba(36,99,148,.09); }
.fil__qui { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.fil__geste { font-style: italic; color: var(--muted2); }
.fil__narr { align-self: center; font-style: italic; color: var(--muted); font-size: 12px; text-align: center; max-width: 80%; }
.fil__moteur { align-self: center; font-size: 11px; color: #8A6D3B; background: rgba(209,181,139,.2); border-radius: 4px; padding: 3px 10px; }
.fil__t { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 8px; font-weight: 400; }
.fil__n { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; align-self: center; flex: none; width: 22px; text-align: center; }
.fil__msg.is-preuve .fil__bulle { box-shadow: inset 3px 0 0 var(--ok); }
.fil__msg.is-cible .fil__bulle { outline: 2px solid var(--beige); }
mark { background: rgba(209,181,139,.45); color: inherit; border-radius: 2px; padding: 0 1px; }
.preuve { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; font-size: 12.5px; }
.preuve--constate { border-left-color: var(--ok); }
.preuve--manque { border-left-color: var(--bad); }
.preuve--non_observable, .preuve--non_applicable { border-left-color: #B9C0C7; }
.preuve__cit { font-style: italic; color: var(--muted2); }
.deux-col { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--gap); align-items: start; }
.colle { position: sticky; top: 0; }

/* ---------- Fenetre modale et messages ---------- */
.modale { position: fixed; inset: 0; background: rgba(27,32,38,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; overflow-y: auto; }
.modale__boite { background: var(--surface); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.25); width: 100%; max-width: 560px; padding: 22px 24px; }
.modale__boite--large { max-width: 860px; }
.modale h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.modale__pied { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--nuit); color: #FFF; padding: 10px 16px; border-radius: 6px; font-size: 12.5px; box-shadow: 0 6px 18px rgba(0,0,0,.2); max-width: 420px; }
.toast--bad { background: var(--bad); }
.toast--ok { background: var(--ok); }

/* ---------- Ecran d'entree : comptes d'exemple ---------- */
.demo__titre { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 8px; display: flex; align-items: center; gap: 10px; }
.demo__titre::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.demo__liste { display: flex; flex-direction: column; gap: 6px; }  /* pas de defilement interne : c'est l'ecran qui defile */
.demo__compte { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; cursor: pointer; font-size: 12.5px; }
.demo__compte:hover { border-color: var(--bleu); }
.demo__compte .pill { margin-left: auto; }
.acces__pied a { font-weight: 600; }

/* ---------- Regie de demonstration ---------- */
.horloge-decalee { background: var(--warn-bg); color: #6E4D14; font-size: 12px; font-weight: 500; padding: 6px 24px; border-bottom: 1px solid #EBDDBF; }
.regie__ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sunk); font-size: 12.5px; }
.regie__ligne:last-child { border-bottom: 0; }

/* ---------- Divers ---------- */
.apercu-mail { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--paper); }
.liste-modeles { display: flex; flex-direction: column; gap: 6px; }
.liste-modeles button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; cursor: pointer; }
.liste-modeles button:hover { border-color: var(--bleu); }
.liste-modeles button.is-active { border-color: var(--bleu); box-shadow: inset 3px 0 0 var(--beige); }
.liste-modeles .t { font-size: 12.5px; font-weight: 600; display: block; }
.liste-modeles .s { font-size: 11.5px; color: var(--muted); }
.jetons { display: flex; gap: 6px; flex-wrap: wrap; }
.jeton { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: rgba(36,99,148,.08); color: var(--bleu-sombre); border-radius: 10px; padding: 2px 9px; cursor: pointer; border: 0; }
.depot { border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.depot:hover, .depot.is-dessus { border-color: var(--bleu); color: var(--bleu); }
.points { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.points li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; }
.coche { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.coche--oui { background: var(--ok-bg); color: var(--ok); }
.coche--non { background: var(--sunk); color: var(--muted); }
.qr { display: flex; gap: 18px; align-items: center; }
.qr img { width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #FFF; }
.liste-plate { list-style: none; display: flex; flex-direction: column; }
.liste-plate li { padding: 8px 0; border-bottom: 1px solid var(--sunk); font-size: 12.5px; }
.liste-plate li:last-child { border-bottom: 0; }
.citation { border-left: 3px solid var(--beige); padding: 2px 0 2px 12px; font-size: 12.5px; color: var(--muted2); margin: 6px 0; }
.charge { padding: 40px; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 1080px) { .form, .form--3, .deux-col { grid-template-columns: 1fr; } .kpis--6 { grid-template-columns: repeat(3, 1fr); } }
@media print {
  .sidebar, .topbar__actions, .sousnav, .horloge-decalee, .toasts { display: none !important; }
  body, .shell { overflow: visible; height: auto; display: block; }
  .vue { overflow: visible; }
}

/* Liens habilles en boutons, en onglets ou en puces : jamais soulignes */
a.btn, a.chip, a.sousnav__item, .card a.btn--lien, .rangee > a.btn--lien { text-decoration: none; }
.frise__auj span { top: auto; bottom: -16px; }
/* Fiche entreprise : ses referents */
.ref-ligne { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--sunk); }
.ref-ligne__nom { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; }
.ref-ligne__nom .discret { overflow-wrap: anywhere; }
.ref-form { background: var(--sunk); border-radius: 6px; padding: 10px; }
/* Recapitulatif : une entreprise par ligne */
.recap-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

