/* SAFE ACADEMY · espace du stagiaire
   Charte EFFISAFE (jetons de la plateforme) : gris nuit, bleu, beige dore, Poppins.
   Pense pour le telephone (390 px), colonne centree de 720 px sur ordinateur.
   Cibles tactiles de 44 px au minimum. Aucune zone de saisie a defilement interne. */
@import url('/static/css/jetons.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: calc(15px * var(--texte, 1)); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button, input, select, textarea { font-family: var(--font); font-size: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--bleu); }

/* ---------- En-tete, gris nuit, filet beige dore ---------- */
.entete {
  background: var(--nuit); border-bottom: 3px solid var(--beige); color: #FFF;
  position: sticky; top: 0; z-index: 30;
}
.entete__dedans {
  max-width: 720px; margin: 0 auto; height: 64px; padding: 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.entete__logo { width: 150px; height: auto; display: block; flex: none; }
/* Taille du texte (BL-130) : un bouton toujours visible, trois tailles gardees sur l'appareil.
   Toutes les tailles de cette feuille sont multipliees par --texte. */
.entete__texte {
  flex: none; min-width: 44px; min-height: 44px; padding: 0 8px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 8px; background: transparent; color: #FFF; font-size: 15px; font-weight: 600; line-height: 1;
}
.entete__texte small { font-size: 11px; font-weight: 500; opacity: .85; margin-left: 3px; }
/* Lecture de la consigne a voix haute (BL-130) */
.ecouter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--bleu);
  font-weight: 600; font-size: calc(13.5px * var(--texte, 1));
}
.ecouter svg { width: 20px; height: 20px; flex: none; }
.ecouter.is-on { background: var(--bleu); border-color: var(--bleu); color: #FFF; }
.entete__espace { flex: 1; }
.entete__compte {
  display: flex; align-items: center; gap: 9px; background: transparent; border: 0; color: #FFF;
  min-height: 44px; padding: 0 2px; font-size: calc(13px * var(--texte, 1)); font-weight: 500;
}
.entete__compte span.nom { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bleu); color: #FFF;
  display: inline-flex; align-items: center; justify-content: center; font-size: calc(12.5px * var(--texte, 1)); font-weight: 600;
  letter-spacing: .02em;
}
.pastille--grande { width: 42px; height: 42px; font-size: calc(14px * var(--texte, 1)); }
.menu {
  position: absolute; right: 12px; top: 60px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(27,32,38,.16);
  min-width: 210px; padding: 6px; z-index: 40;
}
.menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px;
  padding: 12px 12px; min-height: 44px; font-size: calc(14px * var(--texte, 1)); font-weight: 500;
}
.menu button:hover { background: var(--sunk); }

/* ---------- Page ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 18px 16px 56px; display: flex; flex-direction: column; gap: 12px; }
.titre { padding: 4px 0 2px; }
.titre .sur {
  font-size: calc(11px * var(--texte, 1)); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #8A6D3B;
}
.titre h1 { font-size: calc(21px * var(--texte, 1)); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin-top: 2px; }
.titre p { color: var(--muted); font-size: calc(13.5px * var(--texte, 1)); margin-top: 4px; }
.retour-lien {
  align-self: flex-start; background: none; border: 0; color: var(--bleu); font-weight: 600; font-size: calc(13.5px * var(--texte, 1));
  min-height: 44px; padding: 0 2px; display: inline-flex; align-items: center; gap: 6px;
}
.retour-lien svg { width: 18px; height: 18px; flex: none; }

.carte {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.carte--accent { border-left: 3px solid var(--bleu); }
.carte__titre {
  font-size: calc(14px * var(--texte, 1)); font-weight: 600; display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
}
/* La ligne biseautee de la charte, devant les titres d'encart */
.carte__titre::before {
  content: ''; width: 4px; height: 14px; flex: none; background: var(--beige);
  clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 78%);
}
.carte__titre .droite { margin-left: auto; }
.hint { font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); }
.texte { font-size: calc(14.5px * var(--texte, 1)); }
.texte + .texte { margin-top: 8px; }

/* ---------- Boutons ---------- */
.btn {
  min-height: 46px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: calc(14.5px * var(--texte, 1));
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.btn:hover { border-color: var(--bleu); color: var(--bleu); }
.btn--primaire { background: var(--bleu); border-color: var(--bleu); color: #FFF; }
.btn--primaire:hover { background: var(--bleu-sombre); border-color: var(--bleu-sombre); color: #FFF; }
.btn--large { width: 100%; min-height: 52px; font-size: calc(15.5px * var(--texte, 1)); }
.btn--discret { border-color: transparent; background: transparent; color: var(--bleu); }
.btn--petit { min-height: 44px; padding: 8px 12px; font-size: calc(13px * var(--texte, 1)); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--line); color: var(--ink); }
.btn--primaire:disabled:hover { background: var(--bleu); border-color: var(--bleu); color: #FFF; }
.btn svg { width: 18px; height: 18px; flex: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 140px; }

/* ---------- Champs ---------- */
.champ { display: flex; flex-direction: column; gap: 5px; }
.champ + .champ { margin-top: 12px; }
.champ label { font-size: calc(11px * var(--texte, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="password"], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid #CDD2D8; border-radius: 8px;
  padding: 11px 13px; font-size: calc(16px * var(--texte, 1)); min-height: 46px;
}
textarea { resize: none; overflow: hidden; line-height: 1.5; display: block; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(36,99,148,.32); border-color: var(--bleu); }
.case { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 6px 0; font-size: calc(14.5px * var(--texte, 1)); }
.case input { width: 24px; height: 24px; flex: none; margin-top: 1px; accent-color: var(--bleu); }

/* ---------- Messages ---------- */
.bandeau {
  border-radius: 8px; padding: 11px 14px; font-size: calc(13.5px * var(--texte, 1)); font-weight: 500;
  background: var(--sunk); color: var(--muted2);
}
.bandeau--info { background: rgba(36,99,148,.09); color: var(--bleu-sombre); }
.bandeau--ok { background: var(--ok-bg); color: var(--ok); }
.bandeau--attention { background: var(--warn-bg); color: var(--warn); }
.bandeau--erreur { background: var(--bad-bg); color: var(--bad); }
.toast {
  position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 90;
  background: var(--nuit-fonce); color: #FFF; padding: 12px 18px; border-radius: 8px; font-size: calc(14px * var(--texte, 1));
  box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); text-align: center;
}
.toast--erreur { background: var(--bad); }

/* ---------- Etats (reserves au metier) ---------- */
.etat {
  display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--texte, 1)); font-weight: 600;
  padding: 4px 10px; border-radius: 5px; background: var(--sunk); color: var(--muted); white-space: nowrap;
}
.etat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.etat--acquis, .etat--ok { background: var(--ok-bg); color: var(--ok); }
.etat--en_cours, .etat--attention { background: var(--warn-bg); color: var(--warn); }
.etat--non_acquis, .etat--erreur { background: var(--bad-bg); color: var(--bad); }
.etat--bleu { background: rgba(36,99,148,.1); color: var(--bleu); }

/* ---------- Connexion ---------- */
.connexion { max-width: 440px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.comptes { display: flex; flex-direction: column; gap: 8px; }
.compte-ex {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 56px;
}
.compte-ex:hover { border-color: var(--bleu); }
.compte-ex b { display: block; font-size: calc(14px * var(--texte, 1)); font-weight: 600; }
.compte-ex span.rep { display: block; font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); line-height: 1.35; }

/* ---------- Accueil ---------- */
.session-infos { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: calc(13.5px * var(--texte, 1)); }
.session-infos dt { color: var(--muted); }
.session-infos dd { font-weight: 500; }
.mesure { border-top: 1px solid var(--sunk); padding-top: 12px; margin-top: 12px; }
.mesure__tete { display: flex; align-items: flex-start; gap: 10px; }
.mesure__tete h3 { font-size: calc(14px * var(--texte, 1)); font-weight: 600; flex: 1; min-width: 0; padding-top: 2px; }
.mesure__tete .etat { margin-left: auto; flex: none; }
.mesure p { font-size: calc(13px * var(--texte, 1)); color: var(--muted); margin-top: 4px; }
.mesure .btn { margin-top: 10px; }
.choix { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
@media (min-width: 520px) { .choix { grid-template-columns: 2fr 1fr; } }

/* ---------- Information sur les donnees ---------- */
.points { display: flex; flex-direction: column; gap: 12px; }
.point h3 { font-size: calc(13.5px * var(--texte, 1)); font-weight: 600; display: flex; gap: 9px; align-items: baseline; }
.point h3::before {
  content: ''; flex: none; width: 9px; height: 9px; border: 2px solid var(--beige); border-radius: 50%;
  transform: translateY(-1px);
}
.point p { font-size: calc(13.5px * var(--texte, 1)); color: var(--muted2); margin: 3px 0 0 18px; }

/* ---------- Signature ---------- */
.signature {
  border: 2px dashed #B9C0C8; border-radius: 8px; background: var(--surface); touch-action: none;
  width: 100%; height: 200px; display: block;
}

/* ---------- Equipe ---------- */
.equipe { display: flex; flex-direction: column; gap: 10px; }
.membre { display: flex; gap: 12px; align-items: flex-start; }
.membre b { font-size: calc(14px * var(--texte, 1)); font-weight: 600; }
.membre div span { display: block; font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); line-height: 1.4; }
.modalites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modalite { background: var(--sunk); border-radius: 8px; padding: 10px 8px; text-align: center; font-size: calc(12.5px * var(--texte, 1)); }
.modalite b { display: block; font-size: calc(13.5px * var(--texte, 1)); }
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chiffre { background: var(--sunk); border-radius: 8px; padding: 10px 12px; }
.chiffre b { display: block; font-size: calc(17px * var(--texte, 1)); font-weight: 600; color: var(--bleu); }
.chiffre span { font-size: calc(12px * var(--texte, 1)); color: var(--muted); }

/* ---------- Pieces ---------- */
.pieces { display: flex; flex-direction: column; gap: 8px; }
.piece {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 56px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.piece:hover { border-color: var(--bleu); }
.piece__ico {
  flex: none; width: 36px; height: 36px; border-radius: 8px; background: rgba(209,181,139,.24); color: #8A6D3B;
  display: inline-flex; align-items: center; justify-content: center;
}
.piece__ico svg { width: 19px; height: 19px; }
.piece b { display: block; font-size: calc(14px * var(--texte, 1)); font-weight: 600; }
.piece span { display: block; font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); line-height: 1.35; }
.piece.is-vue { border-left: 3px solid var(--ok); }
.visionneuse {
  position: fixed; inset: 0; z-index: 80; background: var(--surface); display: flex; flex-direction: column;
}
.visionneuse__tete {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px;
  background: var(--nuit); color: #FFF; border-bottom: 3px solid var(--beige); min-height: 60px;
}
.visionneuse__tete b { flex: 1; font-size: calc(14.5px * var(--texte, 1)); font-weight: 600; }
.visionneuse__tete button {
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3);
  background: transparent; color: #FFF; font-weight: 600; font-size: calc(14px * var(--texte, 1));
}
.visionneuse__corps { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
/* Un plan reste lisible sur telephone : il garde une largeur minimale et se parcourt au doigt. */
.visionneuse__corps svg { display: block; width: 100%; min-width: 640px; height: auto; max-width: 900px; margin: 0 auto; }
.visionneuse__corps--page { position: relative; overflow: hidden; }
.visionneuse__corps--page iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.visionneuse__corps img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.visionneuse__corps object { display: block; width: 100%; height: 70vh; border: 0; }
.visionneuse__lien { padding: 12px 16px; text-align: center; }
.visionneuse__note { flex: none; padding: 8px 16px; font-size: calc(12px * var(--texte, 1)); background: var(--warn-bg); color: var(--warn); }

/* ---------- Compte a rebours ---------- */
.rebours { display: flex; align-items: center; gap: 12px; }
.rebours b { font-size: calc(26px * var(--texte, 1)); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--bleu); }
.jauge { flex: 1; height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--bleu); border-radius: 4px; transition: width .9s linear; }

/* ---------- Mise en situation ---------- */
.scene { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 67px); }
.scene__barre {
  position: sticky; top: 67px; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 10px 16px 9px;
}
.phases { display: flex; gap: 4px; }
.phases i { flex: 1; height: 5px; border-radius: 3px; background: var(--sunk); }
.phases i.is-faite { background: var(--beige); }
.phases i.is-courante { background: var(--bleu); }
.scene__ligne { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: calc(12.5px * var(--texte, 1)); }
.scene__ligne b { font-weight: 600; font-size: calc(13px * var(--texte, 1)); }
.scene__ligne .chrono { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted2); }
.scene__ligne .chrono.is-depasse { color: var(--warn); }
.bascule {
  min-height: 44px; min-width: 44px; border: 0; background: none; color: var(--muted); display: inline-flex;
  align-items: center; justify-content: center; border-radius: 8px; margin: -8px -6px -8px 0;
}
.bascule svg { width: 21px; height: 21px; }
.bascule.is-on { color: var(--bleu); }

.fil { flex: 1; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.fil__narration {
  align-self: center; text-align: center; font-style: italic; font-size: calc(13.5px * var(--texte, 1)); color: var(--muted2);
  max-width: 92%; padding: 2px 6px;
}
.fil__evenement {
  align-self: center; text-align: center; font-style: italic; font-size: calc(13.5px * var(--texte, 1)); font-weight: 500;
  color: #7A5B28; background: rgba(209,181,139,.2); border-radius: 8px; padding: 7px 14px; max-width: 92%;
}
.fil__phase {
  align-self: stretch; display: flex; align-items: center; gap: 10px; font-size: calc(10.5px * var(--texte, 1)); font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 4px 0;
}
.fil__phase::before, .fil__phase::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fil__trace { align-self: flex-end; font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); font-style: italic; text-align: right; max-width: 88%; }
.replique { display: flex; gap: 10px; align-items: flex-start; max-width: 94%; }
.replique__corps { min-width: 0; }
.replique__nom { font-size: calc(12px * var(--texte, 1)); font-weight: 600; color: var(--muted2); display: flex; align-items: center; gap: 6px; }
.replique__bulle {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px;
  padding: 9px 13px; margin-top: 3px; font-size: calc(14.5px * var(--texte, 1)); box-shadow: var(--shadow);
}
.replique__geste { font-style: italic; color: var(--muted2); font-size: calc(13.5px * var(--texte, 1)); }
.replique__bulle .replique__geste + .replique__texte { margin-top: 3px; }
.signaler {
  min-width: 44px; min-height: 44px; margin: -12px -10px; border: 0; background: none; color: #A7AEB6;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
}
.signaler:hover { color: var(--bad); }
.signaler svg { width: 15px; height: 15px; }
.signaler.is-fait { color: var(--bad); }
.moi { align-self: flex-end; max-width: 88%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.moi__mention { font-size: calc(10.5px * var(--texte, 1)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.moi__bulle {
  background: var(--bleu); color: #FFF; border-radius: 12px 4px 12px 12px; padding: 9px 13px; font-size: calc(14.5px * var(--texte, 1));
  white-space: pre-wrap; word-break: break-word;
}
.moi__bulle--fait { background: var(--surface); color: var(--ink); border: 1px solid var(--bleu); font-style: italic; }
.attente { display: flex; align-items: center; gap: 10px; font-size: calc(13px * var(--texte, 1)); color: var(--muted); font-style: italic; padding: 2px 0; }
.attente span { display: inline-flex; gap: 4px; }
.attente i { width: 7px; height: 7px; border-radius: 50%; background: var(--beige); animation: pulse 1.1s infinite ease-in-out; }
.attente i:nth-child(2) { animation-delay: .18s; }
.attente i:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.saisie {
  position: sticky; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(27,32,38,.06);
}
.saisie__erreur { margin-bottom: 8px; }
.saisie__champ { display: flex; align-items: flex-start; gap: 8px; }
.saisie__champ + .saisie__champ { margin-top: 7px; }
.saisie__champ label {
  flex: 0 0 62px; padding-top: 13px; font-size: calc(10.5px * var(--texte, 1)); font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.saisie__champ textarea { min-height: 46px; padding: 10px 12px; }
.saisie__outils { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.outil {
  min-height: 52px; min-width: 56px; padding: 5px 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: calc(10.5px * var(--texte, 1)); font-weight: 600; color: var(--muted2);
}
/* en grande taille de texte, le libelle d'un outil passe sur deux lignes plutot que de sortir du bouton */
.outil span { white-space: normal; text-align: center; line-height: 1.2; }
.outil--envoyer { flex: none; }
.outil svg { width: 19px; height: 19px; flex: none; }
.outil:hover { border-color: var(--bleu); color: var(--bleu); }
.outil:disabled { opacity: .4; }
.outil--micro.is-actif { background: var(--bad); border-color: var(--bad); color: #FFF; }
.outil--envoyer { margin-left: auto; background: var(--bleu); border-color: var(--bleu); color: #FFF; padding: 0 16px; font-size: calc(14px * var(--texte, 1)); flex-direction: row; }
.outil--envoyer:hover { background: var(--bleu-sombre); color: #FFF; }
.saisie__micro { font-size: calc(12.5px * var(--texte, 1)); color: var(--muted); margin-top: 6px; }

/* ---------- Feuille du bas (pieces, signalement, pause) ---------- */
.voile { position: fixed; inset: 0; z-index: 70; background: rgba(27,32,38,.5); display: flex; align-items: flex-end; justify-content: center; }
.feuille {
  background: var(--surface); width: 100%; max-width: 720px; border-radius: 14px 14px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 86vh; overflow: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.feuille h2 { font-size: calc(16px * var(--texte, 1)); font-weight: 600; }
@media (min-width: 760px) {
  .voile { align-items: center; }
  .feuille { border-radius: 12px; max-width: 520px; }
}

/* ---------- Auto-evaluation ---------- */
.notes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.note {
  min-height: 52px; border: 1px solid #CDD2D8; background: var(--surface); border-radius: 8px;
  font-size: calc(17px * var(--texte, 1)); font-weight: 600; color: var(--muted2);
}
.note.is-choisie { background: var(--bleu); border-color: var(--bleu); color: #FFF; }
.notes-legende { display: flex; justify-content: space-between; font-size: calc(12px * var(--texte, 1)); color: var(--muted); margin-top: 5px; }
.attente-retour { text-align: center; padding: 26px 10px; }
.attente-retour .attente { justify-content: center; margin-top: 10px; }

/* ---------- Retour ---------- */
.grille { display: flex; flex-direction: column; }
.grille__ligne { padding: 12px 0; border-top: 1px solid var(--sunk); }
.grille__ligne:first-child { border-top: 0; padding-top: 2px; }
.grille__tete { display: flex; align-items: flex-start; gap: 10px; }
.grille__tete b { font-size: calc(14px * var(--texte, 1)); font-weight: 600; flex: 1; min-width: 0; }
.grille__tete b small { display: inline-block; font-size: calc(11px * var(--texte, 1)); font-weight: 600; color: var(--muted); margin-right: 6px; }
.grille__expl { font-size: calc(13.5px * var(--texte, 1)); color: var(--muted2); margin-top: 5px; }
.grille__corrige { font-size: calc(12px * var(--texte, 1)); color: var(--bleu); font-weight: 600; margin-top: 4px; }
.desaccord {
  background: none; border: 0; color: var(--muted); font-size: calc(12.5px * var(--texte, 1)); font-weight: 500; text-decoration: underline;
  min-height: 44px; padding: 0; margin-top: 2px; text-align: left;
}
.desaccord:hover { color: var(--bleu); }
.desaccord-fait { font-size: calc(12.5px * var(--texte, 1)); color: var(--bleu); font-weight: 600; margin-top: 8px; display: block; }
.items { display: flex; flex-direction: column; gap: 14px; }
.item h3 { font-size: calc(14px * var(--texte, 1)); font-weight: 600; }
.item blockquote {
  border-left: 3px solid var(--beige); padding: 4px 0 4px 12px; margin: 6px 0; font-style: italic;
  color: var(--muted2); font-size: calc(14px * var(--texte, 1));
}
.item p { font-size: calc(13.5px * var(--texte, 1)); color: var(--muted2); margin-top: 4px; }
.item p b { color: var(--ink); font-weight: 600; }
.repere {
  align-self: stretch; border-radius: 8px; padding: 8px 12px; font-size: calc(13px * var(--texte, 1)); font-weight: 500;
  display: flex; gap: 9px; align-items: flex-start;
}
.repere::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: currentColor; }
.repere--fort { background: var(--ok-bg); color: var(--ok); }
.repere--piste { background: var(--warn-bg); color: var(--warn); }
.fil--relu { padding: 4px 0 0; }
.progression { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--texte, 1)); }
.progression th {
  text-align: left; font-size: calc(10.5px * var(--texte, 1)); font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 6px 6px 8px 0; border-bottom: 1px solid var(--line);
}
.progression td { padding: 9px 6px 9px 0; border-bottom: 1px solid var(--sunk); vertical-align: middle; }
.progression td:first-child { font-weight: 500; }
.progression .sens { font-weight: 600; white-space: nowrap; }
.progression .sens--progres { color: var(--ok); }
.progression .sens--recul { color: var(--bad); }
.progression .sens--stable { color: var(--muted); }
.replier {
  width: 100%; min-height: 46px; background: none; border: 0; display: flex; align-items: center; gap: 9px;
  font-size: calc(14px * var(--texte, 1)); font-weight: 600; text-align: left; padding: 0;
}
.replier::before {
  content: ''; width: 4px; height: 14px; flex: none; background: var(--beige);
  clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 78%);
}
.replier::after { content: '+'; margin-left: auto; font-size: calc(20px * var(--texte, 1)); font-weight: 400; color: var(--muted); }
.replier[aria-expanded="true"]::after { content: '\2212'; }

/* ---------- Historique ---------- */
.histo { display: flex; flex-direction: column; gap: 10px; }
.histo__ligne { border-top: 1px solid var(--sunk); padding-top: 12px; }
.histo__ligne:first-child { border-top: 0; padding-top: 0; }
.histo__tete { display: flex; gap: 10px; align-items: flex-start; }
.histo__tete b { flex: 1; font-size: calc(14px * var(--texte, 1)); font-weight: 600; }
.histo__etats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.puce {
  font-size: calc(11px * var(--texte, 1)); font-weight: 600; padding: 3px 7px; border-radius: 4px; background: var(--sunk); color: var(--muted);
}
.puce--acquis { background: var(--ok-bg); color: var(--ok); }
.puce--en_cours { background: var(--warn-bg); color: var(--warn); }
.puce--non_acquis { background: var(--bad-bg); color: var(--bad); }

.pied { text-align: center; font-size: calc(11.5px * var(--texte, 1)); color: var(--muted); padding-top: 10px; }

/* ---------- Ordinateur ---------- */
@media (min-width: 760px) {
  .page { padding-top: 26px; }
  .titre h1 { font-size: calc(24px * var(--texte, 1)); }
  .carte { padding: 20px 22px; }
  .modalites { gap: 12px; }
  .saisie { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 12px 12px 0 0; }
  .fil { padding-left: 4px; padding-right: 4px; }
  .scene__barre { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (max-width: 380px) {
  .entete__compte span.nom { display: none; }
  .saisie__champ label { flex-basis: 54px; }
  .outil--icone { min-width: 46px; }
  .outil--icone span { display: none; }
}
