/* =====================================================================
   NR FORMATION — Charte visuelle (inspirée des maquettes SchoolHub)
   Palette pastel, cartes arrondies, sidebar claire.
   ===================================================================== */

/* Police arrondie « Baloo 2 » (SIL OFL 1.1, Ek Type) — auto-hébergée.
   Utilisée UNIQUEMENT dans l'espace candidat mobile (voir plus bas). Variable 400→800. */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/baloo2-latin.woff2) format('woff2');
}

:root {
  --bg:          #F4F6FB;
  --card:        #FFFFFF;
  --ink:         #1E2430;
  --ink-soft:    #4A5266;
  --muted:       #8A93A6;
  --line:        #EBEEF4;

  --brand:       #3B5BFF;
  --brand-dark:  #2E49D6;
  --brand-soft:  #EAF0FF;

  --purple:      #B9AEF3;   --purple-soft: #EFEBFF;
  --yellow:      #FBD85D;   --yellow-soft: #FEF6D8;
  --sky:         #BFE3F5;   --sky-soft:    #E7F5FC;

  --green:  #2FBF71;  --green-soft:  #E4F7ED;
  --red:    #F4586A;  --red-soft:    #FDE7EA;
  --orange: #F5A623;  --orange-soft: #FDF0DA;

  --input-bg:  #FFFFFF;
  --btn-bg:    #EEF1F6;
  --toast-bg:  #1E2430;
  --topbar-bg: rgba(244, 246, 251, .85);

  --radius:    18px;
  --radius-sm: 12px;

  /* Hauteur unique de TOUS les contrôles (boutons, champs, selects) :
     c'est ce qui garantit qu'un bouton posé à côté d'un champ est aligné. */
  --ctrl-h:    42px;
  --ctrl-h-sm: 34px;
  --ctrl-r:    11px;
  --ctrl-r-sm: 9px;
  --ctrl-minw: 132px;   /* largeur mini des boutons d'une barre d'actions */
  --shadow:    0 8px 24px rgba(30, 40, 70, 0.06);
  --shadow-sm: 0 2px 8px rgba(30, 40, 70, 0.05);
  --sidebar-w: 250px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Thème sombre ---------- */
:root[data-theme="dark"] {
  --bg:        #101623;
  --card:      #171F2E;
  --ink:       #E8ECF5;
  --ink-soft:  #B4BDD0;
  --muted:     #7A869E;
  --line:      #263043;
  --input-bg:  #0E1420;
  --btn-bg:    #232D42;
  --toast-bg:  #2A3548;
  --topbar-bg: rgba(16, 22, 35, .85);

  --brand:      #5A78FF;
  --brand-dark: #4A66E8;
  --brand-soft: #1E2A4D;

  --purple-soft: #26224A;
  --yellow-soft: #3A3117;
  --sky-soft:    #16303F;
  --green-soft:  #14342A;
  --red-soft:    #3A1D24;
  --orange-soft: #3A2A14;

  --shadow:    0 8px 24px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
}
/* Lisibilité des pastilles sur fonds sombres */
:root[data-theme="dark"] .badge.paid, :root[data-theme="dark"] .badge.ok,
:root[data-theme="dark"] .stat-ic.sky, :root[data-theme="dark"] .cal-ev.ok,
:root[data-theme="dark"] .acc-box-ic .ico-svg { color: #6FC7EE; }
:root[data-theme="dark"] .badge.pending, :root[data-theme="dark"] .stat-ic.yellow,
:root[data-theme="dark"] .cal-ev.pending, :root[data-theme="dark"] .jf-orange { color: #E8C468; }
:root[data-theme="dark"] .badge.overdue, :root[data-theme="dark"] .badge.ko,
:root[data-theme="dark"] .cal-ev.overdue, :root[data-theme="dark"] .jf-red,
:root[data-theme="dark"] .acc-box.off .acc-box-ic .ico-svg { color: #FF8494; }
:root[data-theme="dark"] .renta-alert, :root[data-theme="dark"] .auth-warning { color: #E8C468; }
:root[data-theme="dark"] .cal-ev { color: #6FC7EE; }
/* Le logo est noir : on l'éclaircit sur fond sombre */
:root[data-theme="dark"] .brand-logo, :root[data-theme="dark"] .brand-logo-sidebar { filter: invert(1) brightness(1.7); }

* { box-sizing: border-box; }
/* La règle globale des champs plus bas est très spécifique (6 × :not()) et
   écraserait le `display:none` implicite de [hidden]. On le réaffirme ici. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
/* Garde-fou : aucun défilement horizontal de la page (une valeur trop large ne
   doit jamais décaler toute l'interface — critique en SPA où l'offset persiste).
   `clip` n'établit pas de conteneur de défilement → la topbar sticky reste OK. */
html { overflow-x: clip; }
/* Aucun pan/rebond horizontal de la page (iOS compris) : l'app reste fixe.
   Les carrousels internes (.cand-train-scroll, .path-switch) gardent leur scroll-x. */
html, body { overscroll-behavior-x: none; }
body { overflow-x: clip; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================================
   ESPACE CANDIDAT & ÉVALUATIONS EN DIRECT
   ===================================================================== */
.candidate-access-card { padding: 18px; border: 1px solid var(--brand-soft); border-radius: 16px; background: linear-gradient(135deg, var(--card), var(--brand-soft)); }
.candidate-access-info { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.candidate-access-info > span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; color: var(--brand); border-radius: 11px; background: var(--brand-soft); }
.candidate-access-info b, .candidate-access-info small { display: block; }
.candidate-access-info small { margin-top: 2px; color: var(--muted); }
.candidate-access-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Carte admin « Entraînement sur l'app » (engagement candidat) */
.engage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 12px; }
.engage-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: center; }
.engage-stat b { font-size: 17px; color: var(--ink); }
.engage-stat small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.engage-ic { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px; }
.engage-ic .ico-svg { width: 18px; }
.engage-ic.xp { color: #4562f2; background: color-mix(in srgb, #4562f2 12%, var(--card)); }
.engage-ic.streak { color: #ff7d55; background: color-mix(in srgb, #ff7d55 12%, var(--card)); }
.engage-ic.runs { color: #20c3b0; background: color-mix(in srgb, #20c3b0 12%, var(--card)); }
.engage-ic.bdg { color: #d3a24a; background: color-mix(in srgb, #d3a24a 14%, var(--card)); }
.engage-last { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 560px) { .engage-grid { grid-template-columns: repeat(2, 1fr); } }

/* Liste admin des mains courantes (fiche stagiaire) */
.mc-adm-list { display: grid; gap: 8px; }
.mc-adm-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.mc-adm-main { flex: 1; min-width: 160px; }
.mc-adm-main b { display: block; font-size: 14px; color: var(--ink); }
.mc-adm-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.mc-adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-adm-actions .ico-svg { width: 15px; }

/* Constructeur de modèle de main courante (Réglages) */
.mct-h { margin: 22px 0 8px; font-size: 14px; color: var(--ink); }
.mct-list { display: flex; flex-direction: column; gap: 8px; }
.mct-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.mct-move { display: flex; flex-direction: column; gap: 2px; flex: none; }
.mct-move button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0; line-height: .8; height: 14px; }
.mct-move .ico-svg { width: 15px; }
.mct-move [data-mv=up] .ico-svg { transform: rotate(-90deg); }
.mct-move [data-mv=down] .ico-svg { transform: rotate(90deg); }
.mct-label { flex: 1; min-width: 150px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; }
.mct-type { height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; }
.mct-options { flex: 1 1 100%; height: 32px; padding: 0 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; }
.mct-en-wrap { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.mct-badge { font-size: 10px; font-weight: 800; color: var(--muted); background: var(--line); padding: 3px 8px; border-radius: 99px; }
.mct-del { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--red, #e5484d) 12%, transparent); color: var(--red, #e5484d); cursor: pointer; }
.mct-del .ico-svg { width: 15px; }
.activation-link-box { margin: 12px 0; padding: 13px; border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line)); border-radius: 12px; background: var(--green-soft); }
.activation-link-box > span, .activation-link-box small { display: block; color: var(--ink-soft); font-size: 12px; }
.activation-link-box > div { display: flex; gap: 8px; margin: 7px 0; }
.activation-link-box input { min-width: 0; flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.activation-link-box > b.cand-login-chip { margin: 4px 0 10px; }
.activation-link-box > #candidate-copy-msg { margin: 2px 0 8px; }
/* Identifiant de connexion candidat (prenom.nom) */
.cand-login-chip { display: inline-block; padding: 2px 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; }
.cand-login-chip.big { font-size: 16px; padding: 5px 12px; }
.activation-login-box { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); text-align: center; }
.activation-login-box span, .activation-login-box small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.activation-login-box b { display: block; margin: 4px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; color: var(--brand); letter-spacing: .01em; }
.expl-candidate { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 19px; height: 19px; border: 2px solid var(--card); border-radius: 50%; color: #fff; background: var(--green); }
.expl-candidate svg { width: 10px; height: 10px; }

.live-launch-head { display: flex; gap: 13px; align-items: center; margin-bottom: 18px; }
.live-launch-head h2, .live-launch-head p { margin: 0; }
.live-launch-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; color: var(--brand); background: var(--brand-soft); }
.live-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.live-mode-choice { position: relative; display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); cursor: pointer; }
.live-mode-choice input { position: absolute; opacity: 0; }
.live-mode-choice > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-soft); background: var(--bg); }
.live-mode-choice b { align-self: end; color: var(--ink); }
.live-mode-choice small { align-self: start; color: var(--muted); font-weight: 500; }
.live-mode-choice.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.live-mode-choice.selected > span { color: var(--brand); background: var(--brand-soft); }
.live-mode-choice.disabled { opacity: .48; cursor: not-allowed; }
.live-time-input { position: relative; max-width: 220px; }
.live-time-input input { padding-right: 85px !important; }
.live-time-input span { position: absolute; right: 14px; top: 19px; color: var(--muted); font-weight: 500; }
.live-roster-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 18px; padding: 10px 12px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.live-question-pick { max-height: 260px; overflow: auto; margin-bottom: 12px; }
.live-question-pick .chk { display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 9px; }

.live-present { overflow: auto; background: #f4f7fd; color: #162033; }
.live-board { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 15% 0, #e9efff 0, transparent 35%), #f6f8fc; }
.live-board-top { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto auto auto; gap: 16px; align-items: center; min-height: 76px; padding: 12px 28px; border-bottom: 1px solid #e3e8f2; background: rgba(255,255,255,.92); }
.live-board-top img { display: block; width: 156px; height: 44px; object-fit: contain; object-position: left center; }
.live-board-kicker { color: #315af5; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.live-board-progress { font-weight: 700; color: #5c667c; }
.live-board-join { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #cfd9ff; border-radius: 11px; color: #315af5; background: #eef2ff; white-space: nowrap; }
.live-board-join small { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.live-board-join b { font-size: 17px; letter-spacing: .14em; }
.live-timer-track { height: 6px; background: #e2e7f0; }
.live-timer-track span { display: block; height: 100%; background: #315af5; transition: width .3s linear; }
.live-lobby { flex: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(30px, 7vw, 100px); align-items: center; width: min(1120px, calc(100% - 64px)); margin: auto; padding: 50px 0; }
.live-step { display: inline-flex; margin-bottom: 18px; padding: 7px 11px; border-radius: 999px; color: #315af5; background: #e9efff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.live-lobby h1 { max-width: 720px; margin: 0; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -.04em; }
.live-lobby-copy > p { max-width: 620px; margin: 18px 0; color: #69758c; font-size: 18px; }
.live-code { display: inline-block; margin: 24px 0 4px; color: #315af5; font-size: clamp(48px, 7vw, 92px); font-weight: 900; letter-spacing: .16em; line-height: 1; }
.live-connected { display: flex; align-items: center; gap: 9px; width: fit-content; margin-top: 25px; padding: 12px 16px; border: 1px solid #dce3ef; border-radius: 12px; background: #fff; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #2fbe71; box-shadow: 0 0 0 5px #e2f8ec; }
.live-qr-card { display: flex; flex-direction: column; align-items: center; padding: 28px; border: 1px solid #e0e6f0; border-radius: 24px; background: #fff; box-shadow: 0 24px 60px rgba(37,53,89,.12); text-align: center; }
.live-qr { width: min(280px, 100%); aspect-ratio: 1; padding: 12px; margin-bottom: 15px; border-radius: 18px; background: #fff; }
.live-qr svg { width: 100%; height: 100%; }
.live-qr-card > b { font-size: 20px; }
.live-qr-card > span { margin: 5px 0 20px; color: #778197; }
.live-qr-url { display: block; width: 100%; margin: -8px 0 14px; overflow-wrap: anywhere; color: #8b94a6; font-size: 10px; }
.live-qr-card .btn { width: 100%; }

.live-question-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 26px; width: min(1180px, calc(100% - 64px)); margin: auto; padding: 38px 0; }
.live-question-card { align-self: center; }
.live-question-meta { display: flex; align-items: center; gap: 10px; color: #748097; }
.live-question-card h1 { max-width: 950px; margin: 16px 0 28px; font-size: clamp(30px, 3.5vw, 52px); line-height: 1.12; letter-spacing: -.035em; }
.live-question-card ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.live-question-card li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; min-height: 58px; padding: 8px 14px 8px 9px; border: 1px solid #dfe5ef; border-radius: 13px; background: #fff; box-shadow: 0 2px 8px rgba(28,42,75,.03); }
.live-question-card li > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #315af5; background: #ebf0ff; font-size: 17px; font-weight: 800; }
.live-question-card li b { font-size: clamp(15px, 1.35vw, 19px); }
.live-question-side { align-self: center; display: grid; gap: 12px; }
.live-time, .live-response-count, .live-online { padding: 18px; border: 1px solid #e0e6f0; border-radius: 16px; background: #fff; }
.live-time span, .live-response-count > span { display: block; color: #748097; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.live-time b { display: block; margin-top: 3px; color: #315af5; font-size: 46px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.live-time.urgent b { color: #ef3f57; }
.live-response-count > b { display: block; margin: 5px 0 10px; font-size: 30px; }
.live-response-count > div { height: 7px; overflow: hidden; border-radius: 99px; background: #e9edf5; }
.live-response-count > div span { display: block; height: 100%; border-radius: inherit; background: #2fbe71; transition: width .25s; }
.live-online { display: flex; align-items: center; gap: 8px; color: #5f6a80; }
.live-question-side .btn { width: 100%; height: auto; min-height: 48px; white-space: normal; }
.live-finished { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; }
.live-finished-check { display: grid; place-items: center; width: 86px; height: 86px; margin-bottom: 22px; border-radius: 50%; color: #fff; background: #2fbe71; box-shadow: 0 14px 30px rgba(47,190,113,.25); }
.live-finished-check svg { width: 40px; height: 40px; }
.live-finished h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); }
.live-finished > p { color: #748097; font-size: 18px; }
.live-finished-stats { display: flex; gap: 12px; margin: 24px 0; }
.live-finished-stats > div { min-width: 150px; padding: 16px 24px; border: 1px solid #e0e6f0; border-radius: 14px; background: #fff; }
.live-finished-stats span, .live-finished-stats b { display: block; }
.live-finished-stats span { color: #748097; font-size: 12px; text-transform: uppercase; }
.live-finished-stats b { font-size: 28px; }
.live-finished-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.live-board-actions { display: flex; align-items: center; gap: 8px; }
.live-correction-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 26px; width: min(1320px, calc(100% - 72px)); min-height: 0; margin: auto; padding: 28px 0; }
.live-correction-question { align-self: center; min-width: 0; }
.live-correction-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.live-correction-heading .live-step { margin: 0; }
.live-correction-score { padding: 9px 12px; border-radius: 10px; color: #5f6b80; background: #fff; border: 1px solid #dfe5ef; font-size: 12px; }
.live-correction-score b { color: #315af5; font-size: 18px; }
.live-correction-score.perfect { color: #168552; border-color: #bde8d2; background: #effaf4; }
.live-correction-score.perfect b { color: #168552; }
.live-correction-question h1 { margin: 16px 0 22px; font-size: clamp(28px, 3.2vw, 48px); line-height: 1.12; letter-spacing: -.035em; }
.live-correction-question ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.live-correction-question li { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; min-height: 58px; padding: 8px 13px 8px 8px; border: 1px solid #dfe5ef; border-radius: 13px; background: #fff; }
.live-correction-question li > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #315af5; background: #eaf0ff; font-size: 17px; font-weight: 800; }
.live-correction-question li > b { font-size: 16px; }
.live-correction-question li > em { display: inline-flex; align-items: center; gap: 5px; color: #168552; font-size: 11px; font-style: normal; font-weight: 800; }
.live-correction-question li > em svg { width: 15px; height: 15px; }
.live-correction-question li.good { border-color: #30b979; background: #eaf9f1; box-shadow: 0 0 0 2px rgba(47,190,113,.08); }
.live-correction-question li.good > span { color: #fff; background: #2fbe71; }
.live-correction-question li.explainable { cursor: pointer; }
.live-correction-question li.explainable:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(34,126,84,.12); }
.live-correction-roster { min-width: 0; max-height: calc(100vh - 150px); overflow: hidden; align-self: center; border: 1px solid #dfe5ef; border-radius: 18px; background: #fff; box-shadow: 0 15px 38px rgba(31,45,78,.08); }
.live-correction-roster-head { padding: 16px 18px; border-bottom: 1px solid #e7ebf2; background: #f8f9fc; }
.live-correction-roster-head span, .live-correction-roster-head b { display: block; }
.live-correction-roster-head span { color: #315af5; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.live-correction-roster-head b { margin-top: 3px; font-size: 15px; }
.live-correction-list { display: grid; gap: 7px; max-height: calc(100vh - 230px); overflow-y: auto; padding: 10px; }
.live-correction-person { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 8px 10px; border: 1px solid #e5e9f0; border-radius: 12px; }
.live-correction-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #315af5; background: #eaf0ff; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.live-correction-person-text { min-width: 0; }
.live-correction-person-text b, .live-correction-person-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-correction-person-text b { font-size: 13px; }
.live-correction-person-text small { margin-top: 2px; color: #778197; font-size: 11px; }
.live-correction-person > strong { padding: 5px 8px; border-radius: 99px; font-size: 10px; }
.live-correction-person.correct { border-color: #bce7d0; background: #f2fbf6; }
.live-correction-person.correct > strong { color: #168552; background: #daf4e6; }
.live-correction-person.wrong { border-color: #f3c4cc; background: #fff5f6; }
.live-correction-person.wrong > strong { color: #c62c45; background: #fde4e8; }
.live-correction-person.empty > strong { color: #727d91; background: #eef1f5; }

.eval-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eval-modal-head h2 { margin: 4px 0 3px; font-size: 25px; }
.eval-modal-head p, .eval-list-head p { margin: 0; color: var(--muted); font-size: 13px; }
.eval-kicker { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .09em; }
.eval-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 24px; }
.eval-summary > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.eval-summary span, .eval-summary b { display: block; }
.eval-summary span { color: var(--muted); font-size: 12px; }
.eval-summary b { margin-top: 3px; font-size: 25px; }
.eval-list-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.eval-list-head h3 { margin: 0 0 3px; }
.eval-candidate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: min(52vh, 560px); overflow-y: auto; padding: 1px; }
.eval-candidate-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; min-height: 72px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--card); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.eval-candidate-card:hover { transform: translateY(-1px); border-color: var(--brand); box-shadow: 0 8px 25px rgba(49,90,245,.1); }
.eval-candidate-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.eval-candidate-copy { min-width: 0; }
.eval-candidate-copy b, .eval-candidate-copy small, .eval-card-score b, .eval-card-score small { display: block; }
.eval-candidate-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.eval-candidate-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.eval-card-score { min-width: 65px; text-align: right; }
.eval-card-score b { color: var(--brand); font-size: 17px; }
.eval-card-score small { color: var(--muted); font-size: 10px; }
.eval-card-score.good b { color: var(--green); }
.eval-card-score.mid b { color: var(--orange); }
.eval-card-score.low b { color: var(--red); }
.eval-card-arrow { color: var(--muted); font-size: 24px; }
.eval-modal-actions { align-items: center; }
.eval-actions-spacer { flex: 1; }
.eval-back { display: inline-flex; align-items: center; gap: 7px; margin: -4px 0 16px; padding: 6px 0; border: 0; color: var(--brand); background: none; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.eval-back svg { width: 15px; height: 15px; }
.eval-candidate-hero { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, var(--brand-soft), var(--card)); }
.eval-candidate-hero .eval-candidate-avatar { width: 58px; height: 58px; border-radius: 17px; font-size: 17px; }
.eval-candidate-hero > div > span { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.eval-candidate-hero h2 { margin: 3px 0 2px; font-size: 23px; }
.eval-candidate-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.eval-candidate-score { min-width: 145px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); text-align: right; }
.eval-candidate-score b, .eval-candidate-score span { display: block; }
.eval-candidate-score b { color: var(--brand); font-size: 26px; }
.eval-candidate-score span { color: var(--muted); font-size: 10px; }
.eval-candidate-score.good b { color: var(--green); }
.eval-candidate-score.mid b { color: var(--orange); }
.eval-candidate-score.low b { color: var(--red); }
.eval-history-list { display: grid; gap: 10px; }
.eval-history-card { display: grid; grid-template-columns: 48px minmax(180px, 1fr) auto 112px; gap: 16px; align-items: center; width: 100%; min-height: 84px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--card); font: inherit; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.eval-history-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 10px 28px rgba(49,90,245,.09); }
.eval-history-card.active { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--orange-soft) 42%, var(--card)), var(--card) 38%); }
.eval-history-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--brand); background: var(--brand-soft); }
.eval-history-icon svg { width: 22px; height: 22px; }
.eval-history-copy { min-width: 0; }
.eval-history-copy > span, .eval-history-copy > b, .eval-history-copy > small { display: block; }
.eval-history-title { margin-bottom: 2px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.eval-history-copy > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.eval-history-copy > small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.eval-history-metrics { display: grid; grid-template-columns: repeat(3, 82px); gap: 7px; }
.eval-history-metrics > span { padding: 8px 10px; border-radius: 11px; background: var(--bg); text-align: center; }
.eval-history-metrics b, .eval-history-metrics small { display: block; }
.eval-history-metrics b { font-size: 15px; }
.eval-history-metrics small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.eval-history-side { display: grid; grid-template-columns: auto auto 16px; gap: 5px 8px; align-items: center; justify-items: end; }
.eval-history-side .badge { grid-column: 1 / -1; }
/* Date sur sa propre ligne : elle n'est plus recouverte par le bouton ZIP */
.eval-history-side > small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; white-space: nowrap; }
.eval-history-arrow { color: var(--brand); font-size: 24px; line-height: 1; }
.eval-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 11px; }
.eval-detail-toolbar h3 { margin: 0; }
.eval-detail-list { display: grid; gap: 10px; max-height: min(50vh, 560px); overflow-y: auto; padding-right: 3px; }
.eval-detail-question { padding: 14px 16px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 13px; background: var(--card); }
.eval-detail-question.correct { border-left-color: var(--green); }
.eval-detail-question.wrong { border-left-color: var(--red); }
.eval-detail-question.empty { border-left-color: var(--muted); }
.eval-detail-qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eval-detail-qhead span { color: var(--brand); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.eval-detail-qhead b { padding: 4px 8px; border-radius: 99px; font-size: 10px; }
.eval-detail-question.correct .eval-detail-qhead b { color: var(--green); background: var(--green-soft); }
.eval-detail-question.wrong .eval-detail-qhead b { color: var(--red); background: var(--red-soft); }
.eval-detail-question.empty .eval-detail-qhead b { color: var(--muted); background: var(--bg); }
.eval-detail-question h3 { margin: 8px 0 11px; font-size: 14px; }
.eval-detail-answer { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.eval-detail-answer + .eval-detail-answer { margin-top: 7px; }
.eval-detail-answer span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.eval-detail-answer strong { font-size: 12px; }
.eval-detail-answer.expected strong { color: var(--green); }

/* Typo de l'app mobile candidat UNIQUEMENT : on redéfinit --font sur les racines
   candidat + overlays → tous les var(--font) internes (y compris les raccourcis font:)
   basculent sur Baloo 2 par héritage de la custom property. L'admin/le login gardent
   la police système (--font global inchangé). */
.candidate-shell, .cand-confirm, .cand-viewer, .pc-ui {
  --font: 'Baloo 2', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--font);
}

.candidate-shell { min-height: 100vh; background: radial-gradient(circle at 20% 0, #e9efff, transparent 38%), #f5f7fb; color: #172033; }
.candidate-shell > header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 12px clamp(18px, 4vw, 48px); border-bottom: 1px solid #e2e7f0; background: rgba(255,255,255,.9); }
.candidate-shell > header img { width: 150px; height: 42px; object-fit: contain; object-position: left; }
.candidate-shell > header > span { color: #657086; font-weight: 700; }
.candidate-question-header { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.candidate-logout { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 0; border-radius: 9px; color: #657086; background: transparent; font: inherit; cursor: pointer; }
.candidate-home { width: min(600px, calc(100% - 32px)); margin: auto; padding: clamp(50px, 8vh, 90px) 0; text-align: center; }
.candidate-kicker { color: #315af5; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.candidate-home > h1 { margin: 8px 0 5px; font-size: clamp(34px, 8vw, 50px); }
.candidate-home > p { margin: 0 auto 28px; color: #707b91; }
.candidate-join-card { padding: 25px; border: 1px solid #e0e6f0; border-radius: 22px; background: #fff; box-shadow: 0 18px 45px rgba(35,50,85,.1); text-align: left; }
.candidate-join-card h2, .candidate-join-card > p { text-align: center; }
.candidate-join-card > p { color: #707b91; }
.candidate-join-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 15px; color: #315af5; background: #e9efff; }
.candidate-join-card #cr-code { height: 58px; text-align: center; color: #315af5; font-size: 28px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.candidate-security-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 20px; color: #7b8497; font-size: 12px; }
.candidate-resources { margin-top: 24px; padding: 20px; border: 1px solid #e0e6f0; border-radius: 18px; background: rgba(255,255,255,.78); text-align: left; }
.candidate-resources > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.candidate-resources h2 { margin: 0; font-size: 18px; }
.candidate-resources > div > span { color: #7b8497; font-size: 12px; }
.candidate-resource-row { display: grid; grid-template-columns: 40px 1fr 20px; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #e6eaf1; }
.candidate-resource-row > span:first-child { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #315af5; background: #e9efff; }
.candidate-resource-row b, .candidate-resource-row small { display: block; }
.candidate-resource-row small, .candidate-resource-empty { color: #7b8497; font-size: 12px; }
.candidate-resource-row > svg { color: #7b8497; }
.candidate-resource-empty { margin: 0; padding: 10px 0; text-align: center; }
/* ---------- Portail candidat : expérience d'apprentissage ---------- */
.candidate-app-shell { min-height:100dvh; background:linear-gradient(145deg,#f6f8ff 0%,#eef3ff 44%,#fbfcff 100%); }
.candidate-app-shell > header { position:sticky; top:0; z-index:5; min-height:64px; padding:10px clamp(20px,5vw,56px); background:rgba(255,255,255,.76); backdrop-filter:blur(16px); }
.candidate-app-shell > header img { width:130px; height:38px; }
.candidate-header-tag { padding:6px 10px; border-radius:999px; color:#3d59e8; background:#e9eeff; font-size:10px; font-weight:800; letter-spacing:.09em; }
.candidate-hub { width:min(760px,calc(100% - 36px)); margin:0 auto; padding:34px 0 116px; }
.candidate-hub-hero { position:relative; overflow:hidden; padding:10px 4px 28px; }
.candidate-hub .candidate-kicker, .candidate-page-title > div > span, .candidate-section-head span, .candidate-profile-hero > span { color:#4562f2; font-size:11px; font-weight:900; letter-spacing:.1em; }
.candidate-hub-hero h1 { position:relative; margin:7px 0; font-size:clamp(33px,7vw,49px); letter-spacing:-.045em; line-height:1; }
.candidate-hub-hero p { position:relative; max-width:410px; margin:0; color:#73809b; font-size:16px; line-height:1.45; }
.candidate-hero-orb { position:absolute; border-radius:50%; pointer-events:none; filter:blur(1px); }
.orb-one { width:94px; height:94px; right:20px; top:-20px; background:linear-gradient(135deg,#8aa1ff,#d9e0ff); opacity:.42; }
.orb-two { width:54px; height:54px; right:91px; top:55px; background:#9eece1; opacity:.45; }
.candidate-quest-card { position:relative; display:grid; grid-template-columns:116px 1fr; gap:18px; align-items:center; overflow:hidden; margin-bottom:28px; padding:18px; border-radius:24px; color:#fff; background:linear-gradient(135deg,#465cf3,#7985f6); box-shadow:0 16px 34px rgba(67,89,230,.24); }
.candidate-quest-card > div:last-child { position:relative; z-index:1; }
.candidate-quest-card span, .candidate-course-banner small { font-size:10px; font-weight:900; letter-spacing:.09em; }
.candidate-quest-card h2 { margin:5px 0; font-size:19px; line-height:1.15; }
.candidate-quest-card p { margin:0 0 9px; color:#e6e9ff; font-size:12px; }
.candidate-quest-art { position:relative; display:grid; place-items:center; width:106px; height:106px; overflow:hidden; border-radius:21px; background:linear-gradient(135deg,#20d3c1,#5be3d6); box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); }
.candidate-quest-art span { position:relative; z-index:2; display:grid; place-items:center; width:54px; height:54px; border-radius:18px; color:#3557ea; background:#fff; font-size:28px; box-shadow:0 10px 20px rgba(27,104,170,.2); }
.candidate-quest-art i,.candidate-quest-art b,.candidate-course-visual i,.candidate-course-visual b,.candidate-course-banner-art i,.candidate-course-banner-art b { position:absolute; border-radius:50%; content:""; }
.candidate-quest-art i { width:84px;height:84px;left:-34px;top:-24px;background:#bff8ed;opacity:.8; }.candidate-quest-art b {width:55px;height:55px;right:-15px;bottom:-10px;background:#3474ed;opacity:.45;}
.candidate-link-btn,.candidate-text-btn { display:inline-flex; align-items:center; gap:5px; padding:0; border:0; color:inherit; background:none; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.candidate-link-btn .ico-svg { width:15px; height:15px; }
.candidate-section { margin:30px 0; }
.candidate-section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:13px; }
.candidate-section-head h2 { margin:3px 0 0; font-size:21px; letter-spacing:-.025em; }
.candidate-text-btn { color:#4562f2; }
.candidate-course-preview { display:grid; grid-template-columns:118px 1fr; overflow:hidden; border:1px solid #e2e8f8; border-radius:22px; background:#fff; box-shadow:0 10px 26px rgba(40,58,106,.06); }
.candidate-course-visual,.candidate-course-banner-art { position:relative; display:grid; place-items:center; overflow:hidden; background:linear-gradient(145deg,#8ca3ff,#c7d0ff); }
.candidate-course-visual span,.candidate-course-banner-art span { position:relative; z-index:1; display:grid; place-items:center; width:48px; height:48px; border-radius:16px; color:#4562f2; background:#fff; box-shadow:0 10px 22px rgba(52,82,182,.2); }
.candidate-course-visual i,.candidate-course-banner-art i { width:110px;height:110px;right:-45px;top:-38px;background:#64e1d1;opacity:.8; }.candidate-course-visual b,.candidate-course-banner-art b {width:72px;height:72px;left:-32px;bottom:-32px;background:#556bf5;opacity:.75;}
.candidate-course-copy { padding:17px 16px; }
.candidate-course-copy small { color:#4562f2; font-size:10px; font-weight:900; letter-spacing:.08em; }.candidate-course-copy h3 { margin:4px 0 7px; font-size:17px; }.candidate-course-copy p { margin:0; color:#77829a; font-size:12px; }.candidate-course-copy p strong { color:#2fc7b6; }
.candidate-mini-progress { height:6px; margin-top:13px; overflow:hidden; border-radius:50px; background:#edf0f7; }.candidate-mini-progress i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#20d1c0,#6fe2d3); transition:width .3s; }
.candidate-live-card { display:grid; grid-template-columns:46px 1fr; gap:12px; margin:26px 0; padding:18px; border:1px solid #e0e7fa; border-radius:22px; background:#fff; box-shadow:0 12px 28px rgba(37,59,112,.06); }
.candidate-live-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:15px; color:#fff; background:linear-gradient(135deg,#ff7d77,#ffab7d); }.candidate-live-icon .ico-svg { width:21px; }
.candidate-live-card > div:nth-child(2) span { color:#f27570; font-size:10px; font-weight:900; letter-spacing:.08em; }.candidate-live-card h2 { margin:3px 0; font-size:17px; }.candidate-live-card p { margin:0; color:#7d879d; font-size:12px; }
.candidate-code-label { grid-column:1/-1; margin-top:5px; }.candidate-code-label > span { display:block; margin-bottom:6px; color:#76819a; font-size:11px; font-weight:700; }.candidate-code-label input { height:48px; margin:0; border-color:#dce4f6; border-radius:13px; text-align:center; color:#4562f2; font-size:21px; font-weight:900; letter-spacing:.18em; }
.candidate-live-card #cr-err { grid-column:1/-1; }.candidate-live-card .btn { grid-column:1/-1; display:flex; align-items:center; justify-content:center; gap:7px; border-radius:13px; }.candidate-live-card .btn .ico-svg { width:17px; }
.candidate-home-library { padding:18px; border:1px solid #e3e9f7; border-radius:22px; background:rgba(255,255,255,.72); }.candidate-home-library .candidate-section-head { margin-bottom:7px; }.candidate-home-library .candidate-section-head h2 { font-size:18px; }
.candidate-resource-mini .candidate-resource-row { padding:10px 0; }.candidate-resource-row { text-decoration:none; color:inherit; }
.candidate-bottom-nav { position:fixed; z-index:20; right:0; bottom:0; left:0; display:flex; justify-content:center; gap:8px; padding:10px max(18px,env(safe-area-inset-right)) calc(11px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); border-top:1px solid rgba(218,226,244,.9); background:rgba(255,255,255,.92); box-shadow:0 -8px 24px rgba(53,69,109,.07); backdrop-filter:blur(18px); }
.candidate-bottom-nav button { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:3px; max-width:130px; padding:5px 8px; border:0; border-radius:13px; color:#6f7a92; background:none; font:inherit; font-size:10px; font-weight:700; cursor:pointer; }.candidate-bottom-nav .ico-svg { width:21px; height:21px; }.candidate-bottom-nav button.active { color:#4562f2; background:#eef1ff; }.candidate-bottom-nav button.active .ico-svg { filter:drop-shadow(0 4px 6px rgba(69,98,242,.2)); }
.candidate-page-title { display:flex; align-items:center; gap:13px; margin:2px 0 25px; }.candidate-backless { display:grid; place-items:center; width:42px; height:42px; border:0; border-radius:14px; color:#4562f2; background:#e9eeff; }.candidate-backless .ico-svg { width:21px; }.candidate-page-title h1 { margin:4px 0 0; font-size:27px; line-height:1.05; }
.candidate-course-banner { display:grid; grid-template-columns:104px 1fr; overflow:hidden; border-radius:23px; color:#fff; background:linear-gradient(135deg,#273fbc,#6377f3); box-shadow:0 17px 34px rgba(52,76,190,.21); }.candidate-course-banner-art { min-height:142px; background:linear-gradient(145deg,#5f74ef,#9aa9ff); }.candidate-course-banner > div:last-child { padding:18px 17px 16px 0; }.candidate-course-banner h2 { margin:6px 0; font-size:19px; line-height:1.1; }.candidate-course-banner p { margin:0; color:#e1e6ff; font-size:12px; line-height:1.4; }
.candidate-training-stack { display:grid; gap:10px; }.candidate-training-stack .candidate-practice-row { border:0; border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(42,61,105,.07); }.candidate-practice-row { text-align:left; }.candidate-practice-row > span:nth-child(2) small,.candidate-practice-row > span:nth-child(2) em { display:block; }.candidate-practice-row > span:nth-child(2) small { color:#74829c; font-size:10px; font-style:normal; font-weight:800; letter-spacing:.06em; }.candidate-practice-row > span:nth-child(2) b { margin:3px 0; font-size:14px; }.candidate-practice-row > span:nth-child(2) em { color:#8790a5; font-size:11px; font-style:normal; }.candidate-practice-row .btn { display:flex; align-items:center; gap:4px; padding:8px 10px; border-radius:10px; font-size:11px; }.candidate-practice-row .btn .ico-svg { width:14px; }.course-tone-1 .candidate-practice-icon { color:#d35d9d; background:#ffe9f4; }.course-tone-2 .candidate-practice-icon { color:#27a88f; background:#e4fbf4; }
.candidate-library-full { padding:20px; border:1px solid #e2e8f7; border-radius:23px; background:#fff; }.candidate-library-full .candidate-resource-row:last-child { border-bottom:0; }
.candidate-profile-hero { padding:21px 0 30px; text-align:center; }.candidate-avatar-lg { display:grid; place-items:center; width:82px; height:82px; margin:0 auto 15px; border:6px solid #f4f6ff; border-radius:30px; color:#fff; background:linear-gradient(135deg,#5268f3,#9aa7ff); box-shadow:0 14px 28px rgba(72,96,230,.22); font-size:24px; font-weight:900; }.candidate-profile-hero h1 { margin:6px 0 4px; font-size:27px; }.candidate-profile-hero p { margin:0; color:#7e879c; font-size:13px; }.candidate-profile-card { overflow:hidden; border:1px solid #e2e8f7; border-radius:23px; background:#fff; box-shadow:0 10px 28px rgba(35,50,85,.06); }.candidate-profile-card button { display:grid; grid-template-columns:42px 1fr 18px; gap:12px; align-items:center; width:100%; padding:16px; border:0; border-bottom:1px solid #edf0f7; color:#273148; background:none; text-align:left; font:inherit; }.candidate-profile-card button:last-child { border-bottom:0; }.candidate-profile-card button > .ico-svg { width:18px; color:#9ba5b8; }.candidate-setting-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:13px; color:#2fc5b6; background:#e4fbf4; }.candidate-setting-icon.purple { color:#586cf1; background:#eef0ff; }.candidate-setting-icon.coral { color:#ed7b72; background:#fff0ed; }.candidate-setting-icon .ico-svg { width:20px; }.candidate-profile-card b,.candidate-profile-card small { display:block; }.candidate-profile-card b { margin-bottom:3px; font-size:14px; }.candidate-profile-card small { color:#7f899f; font-size:11px; }.candidate-logout-wide { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:25px; padding:13px; border:0; color:#e05e68; background:none; font:inherit; font-size:12px; font-weight:900; letter-spacing:.04em; }.candidate-logout-wide .ico-svg { width:18px; }
.candidate-practice { margin-top: 24px; padding: 20px; border: 1px solid #dfe6f4; border-radius: 18px; background: #fff; text-align: left; box-shadow: 0 10px 28px rgba(35,50,85,.06); }
.candidate-practice > div:first-child { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin-bottom:12px; }
.candidate-practice h2 { margin:0; font-size:18px; display:flex; align-items:center; gap:8px; }
.candidate-practice h2 svg { color:#315af5; width:19px; }
.candidate-practice > div > span, .candidate-practice-hint, .candidate-practice-foot { color:#7b8497; font-size:12px; }
.candidate-practice-row { display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px 0; border-top:1px solid #e6eaf1; }
.candidate-practice-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:10px; color:#315af5; background:#e9efff; }
.candidate-practice-row b, .candidate-practice-row small { display:block; }
.candidate-practice-row small { color:#7b8497; font-size:12px; margin-top:3px; }
.candidate-practice-top { display:flex; justify-content:space-between; color:#315af5; font-size:13px; font-weight:800; }
.candidate-practice-progress { height:6px; margin:18px 0 30px; border-radius:10px; background:#e7ebf5; overflow:hidden; }
.candidate-practice-progress i { display:block; height:100%; border-radius:inherit; background:#315af5; transition:width .2s ease; }
.candidate-practice-options { display:grid; gap:10px; margin:24px 0; text-align:left; }
.candidate-practice-option { display:flex; align-items:center; gap:12px; width:100%; padding:13px; border:1px solid #dfe6f4; border-radius:14px; background:#fff; color:#172033; font:inherit; text-align:left; cursor:pointer; transition:.15s; }
.candidate-practice-option:hover, .candidate-practice-option.selected { border-color:#315af5; background:#eef2ff; }
.candidate-practice-option strong { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; color:#315af5; background:#e9efff; }
.candidate-practice-option.selected strong { color:#fff; background:#315af5; }
.candidate-practice-shell .candidate-home { padding-top:clamp(34px,7vh,72px); }
.candidate-finished-check { display:grid; place-items:center; width:72px; height:72px; margin:24px auto; border-radius:50%; color:#fff; background:#2bbf72; box-shadow:0 12px 25px rgba(43,191,114,.22); }
.candidate-finished-check svg { width:32px; height:32px; }
.candidate-score-card { display:flex; flex-direction:column; gap:5px; margin:28px auto; padding:22px; border:1px solid #dfe6f4; border-radius:18px; background:#fff; box-shadow:0 12px 30px rgba(35,50,85,.08); }
.candidate-score-card small { color:#7b8497; font-size:11px; font-weight:800; letter-spacing:.08em; }
.candidate-score-card strong { font-size:42px; line-height:1.1; color:#315af5; }
.candidate-score-card b { color:#2bbf72; font-size:18px; }
@media (max-width:700px) { .candidate-practice > div:first-child { display:block; } .candidate-practice > div:first-child > span { display:block; margin-top:5px; } .candidate-practice-row { grid-template-columns:34px minmax(0,1fr); } .candidate-practice-row .btn { grid-column:2; justify-self:start; margin-top:3px; } .candidate-practice-shell .candidate-home { padding-top:28px; } }
@media (max-width:700px) {
  .candidate-practice-shell { height:100dvh; min-height:0; overflow:hidden; }
  .candidate-practice-shell > header { flex:0 0 62px; box-sizing:border-box; }
  .candidate-practice-shell .candidate-home { box-sizing:border-box; display:flex; flex-direction:column; width:calc(100% - 28px); height:calc(100dvh - 62px); min-height:0; padding:15px 0 7px; overflow:hidden; }
  .candidate-practice-shell .candidate-kicker { flex:none; font-size:12px; }
  .candidate-practice-top { flex:none; margin-top:6px; font-size:12px; }
  .candidate-practice-progress { flex:none; height:5px; margin:10px 0 12px; }
  .candidate-practice-shell .candidate-home > h1 { flex:none; margin:0 0 4px; font-size:clamp(27px,7.5vw,38px); line-height:1.05; }
  .candidate-practice-hint { flex:none; margin:0 0 5px; font-size:12px; }
  .candidate-practice-options { flex:1 1 auto; min-height:0; grid-auto-rows:minmax(0,1fr); gap:5px; margin:5px 0 7px; }
  .candidate-practice-option { min-height:0; padding:6px 9px; border-radius:12px; gap:9px; font-size:14px; line-height:1.1; }
  .candidate-practice-option strong { width:30px; height:30px; flex:none; border-radius:9px; }
  .candidate-practice-shell #cp-err { flex:none; }
  .candidate-practice-shell #cp-next { flex:0 0 46px; min-height:46px; margin:0; }
  .candidate-practice-foot { flex:none; margin:5px 0 0; font-size:11px; }
  .candidate-practice-shell.practice-long .candidate-home > h1 { font-size:clamp(22px,5.8vw,30px); line-height:1.03; }
  .candidate-practice-shell.practice-long .candidate-practice-option { font-size:12px; line-height:1.05; }
  .candidate-practice-shell.response-scroll .candidate-practice-options { display:flex; flex-direction:column; flex:1 1 auto; min-height:120px; overflow-y:auto; overscroll-behavior:contain; padding:2px 3px 2px 0; }
  .candidate-practice-shell.response-scroll .candidate-practice-option { flex:0 0 auto; min-height:48px; height:auto; padding:8px 9px; }
  .candidate-practice-shell.response-scroll .candidate-practice-option span { overflow:visible; white-space:normal; }
}
.candidate-correction-shell { min-height:100vh; }
.candidate-correction-shell .candidate-home { max-width:720px; text-align:left; padding-top:42px; }
.candidate-correction-shell .candidate-kicker, .candidate-correction-shell .candidate-home > h1, .candidate-correction-shell .candidate-home > p, .candidate-correction-shell .candidate-finished-check, .candidate-correction-shell .candidate-score-card { text-align:center; }
.candidate-correction-shell .candidate-finished-check { margin-left:auto; margin-right:auto; }
.practice-results-list { display:grid; gap:14px; margin:28px 0; }
.practice-result-card { padding:18px; border:1px solid #dfe6f4; border-left:5px solid #ef596d; border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(35,50,85,.06); }
.practice-result-card.is-correct { border-left-color:#2bbf72; }
.practice-result-head { display:flex; justify-content:space-between; gap:12px; color:#ef596d; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.practice-result-card.is-correct .practice-result-head { color:#239b5c; }
.practice-result-card h3 { margin:10px 0 14px; font-size:17px; line-height:1.3; }
.practice-result-line { padding:10px 12px; border-radius:10px; background:#fff1f3; }
.practice-result-line.correct-line { margin-top:8px; background:#eafaf1; }
.practice-result-line small, .practice-result-explanation small { display:block; color:#7b8497; font-size:10px; font-weight:800; letter-spacing:.07em; }
.practice-result-line p, .practice-result-explanation p { margin:4px 0 0; font-size:14px; line-height:1.4; }
.practice-result-explanation { margin-top:10px; padding:10px 12px; border-radius:10px; background:#eef2ff; color:#394a83; }
@media (max-width:700px) { .candidate-correction-shell .candidate-home { width:calc(100% - 28px); padding-top:28px; } .practice-result-card { padding:14px; } .practice-result-card h3 { font-size:15px; } }
.candidate-live-dot { display: inline-flex; align-items: center; gap: 7px; color: #299d60 !important; }
.candidate-live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2fbe71; }
.candidate-live-dot.is-reconnecting { color: #c88312 !important; }
.candidate-live-dot.is-reconnecting::before { background: #f0ad35; animation: candidatePulse .8s infinite alternate; }
.candidate-wait { display: flex; min-height: calc(100vh - 70px); flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.candidate-wait-pulse, .candidate-finished-check { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 20px; border-radius: 50%; color: #fff; background: #315af5; box-shadow: 0 0 0 13px #e6ecff; }
.candidate-wait h1 { margin: 0; font-size: clamp(32px, 10vw, 48px); }
.candidate-wait p { max-width: 480px; color: #707b91; font-size: 17px; }
.candidate-wait-count { margin-top: 15px; padding: 9px 13px; border-radius: 99px; color: #315af5; background: #e9efff; font-weight: 700; }
.candidate-finished-check { background: #2fbe71; box-shadow: 0 0 0 13px #e2f8ec; }
.candidate-final-score { display: grid; gap: 2px; min-width: 210px; margin: 18px 0 8px; padding: 18px; border: 1px solid #dce3ed; border-radius: 17px; background: #fff; }
.candidate-final-score span { color: #707b91; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.candidate-final-score b { font-size: 38px; }
.candidate-final-score strong { color: #2fbe71; font-size: 18px; }
.candidate-remote-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.candidate-remote-shell .candidate-wait { flex: 1; min-height: 0; overflow: hidden; }
.candidate-pad { width: min(680px, calc(100% - 28px)); margin: auto; padding: clamp(22px, 5vh, 48px) 0 35px; text-align: center; }
.candidate-remote-shell .candidate-pad { box-sizing: border-box; display: flex; flex: 1; flex-direction: column; min-height: 0; margin: 0 auto; overflow: hidden; }
.candidate-pad-top { display: flex; align-items: center; justify-content: center; }
.candidate-phone-timer { padding: 8px 12px; border-radius: 10px; color: #315af5; background: #e9efff; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.candidate-phone-timer.urgent { color: #e83e55; background: #fde8ec; animation: candidatePulse .8s infinite alternate; }
@keyframes candidatePulse { to { transform: scale(1.04); } }
.candidate-pad h1 { margin: 25px 0 3px; font-size: clamp(28px, 8vw, 42px); }
.candidate-pad-help { margin: 0 0 24px; color: #707b91; }
.remote-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.candidate-remote-shell .remote-answers { grid-auto-rows: minmax(0, 1fr); flex: 1; min-height: 0; }
.remote-answers button { min-height: clamp(92px, 18vh, 140px); border: 2px solid #dce3ed; border-radius: 20px; color: #315af5; background: #fff; box-shadow: 0 5px 16px rgba(30,43,75,.05); font: 900 clamp(38px, 12vw, 64px)/1 var(--font); cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.candidate-remote-shell .remote-answers button { height: 100%; min-height: 0; }
.remote-answers button:active { transform: scale(.97); }
.remote-answers button.selected { border-color: #315af5; color: #fff; background: #315af5; box-shadow: 0 12px 25px rgba(49,90,245,.24); }
.remote-answers button.submitted { border-color: #2fbe71; color: #fff; background: #2fbe71; box-shadow: 0 12px 25px rgba(47,190,113,.23); }
.remote-answers button:disabled { cursor: not-allowed; opacity: .65; }
.candidate-validate { width: 100%; min-height: 56px; margin-top: 18px; border: 0; border-radius: 14px; color: #fff; background: #315af5; font: 700 16px var(--font); cursor: pointer; }
.candidate-validate.validated { background: #2fbe71; }
.candidate-validate:disabled { opacity: .58; cursor: not-allowed; }
.candidate-answer-state { min-height: 21px; margin: 8px 0 0; color: #707b91; font-size: 13px; }

.trainer-candidate-list { display: grid; gap: 8px; }
.trainer-candidate-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.trainer-candidate-index { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.trainer-candidate-name { color: var(--ink); font-size: 15px; }
.trainer-candidate-name b { margin-right: 4px; }

@media (max-width: 760px) {
  .live-mode-grid, .eval-candidate-grid { grid-template-columns: 1fr; }
  .eval-summary { grid-template-columns: 1fr 1fr; }
  .live-board-top { grid-template-columns: 1fr auto auto; gap: 8px; padding: 10px 15px; }
  .live-board-top img { width: 125px; }
  .live-board-kicker, .live-board-progress { display: none; }
  .live-board-join { padding: 5px 8px; gap: 5px; }
  .live-board-join small { display: none; }
  .live-board-join b { font-size: 13px; }
  .live-lobby { grid-template-columns: 1fr; width: min(520px, calc(100% - 30px)); gap: 25px; padding: 28px 0; text-align: center; }
  .live-lobby-copy > p, .live-connected { margin-left: auto; margin-right: auto; }
  .live-question-stage { grid-template-columns: 1fr; width: calc(100% - 28px); padding: 25px 0; }
  .live-question-side { grid-template-columns: 1fr 1fr; }
  .live-question-side .btn, .live-online { grid-column: 1 / -1; }
  .live-correction-stage { grid-template-columns: 1fr; width: calc(100% - 28px); overflow-y: auto; padding: 22px 0; }
  .live-correction-roster { max-height: none; }
  .live-correction-list { max-height: 360px; }
  .live-board-actions #live-results { display: none; }
  .eval-candidate-hero { grid-template-columns: 54px 1fr; }
  .eval-candidate-hero .eval-candidate-avatar { width: 52px; height: 52px; }
  .eval-candidate-score { grid-column: 1 / -1; text-align: left; }
  .eval-modal-actions { align-items: stretch; }
  .eval-actions-spacer { display: none; }
  .eval-modal-actions .btn { width: 100%; }
  .candidate-shell > header { min-height: 62px; }
  .candidate-shell > header img { width: 128px; }
  .candidate-logout { font-size: 0; }
  .candidate-logout svg { width: 20px; height: 20px; }
  .candidate-wait { min-height: calc(100vh - 62px); }
  .candidate-access-actions .btn { width: 100%; }
  .activation-link-box > div { flex-direction: column; }
  .eval-history-card { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; min-height: 76px; padding: 11px; }
  .eval-history-icon { width: 40px; height: 40px; border-radius: 12px; }
  .eval-history-metrics { grid-column: 2 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .eval-history-metrics > span { padding: 6px 5px; }
  .eval-history-side { grid-column: 3; grid-row: 1; align-self: start; }
  .eval-history-side > small, .eval-history-arrow { display: none; }

  .candidate-remote-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .candidate-remote-shell > header { flex: 0 0 56px; min-height: 56px; padding: 7px 14px; }
  .candidate-remote-shell > header img { width: 112px; height: 34px; }
  .candidate-remote-shell .candidate-pad { box-sizing: border-box; display: flex; flex: 1; flex-direction: column; width: calc(100% - 20px); min-height: 0; margin: 0 auto; padding: 10px 0 max(8px, env(safe-area-inset-bottom)); overflow: hidden; }
  .candidate-remote-shell .candidate-pad-top { flex: none; }
  .candidate-remote-shell .candidate-pad h1 { flex: none; margin: 8px 0 1px; font-size: clamp(20px, 6vw, 28px); line-height: 1.05; }
  .candidate-remote-shell .candidate-pad-help { flex: none; margin: 0 0 7px; font-size: 11px; line-height: 1.25; }
  .candidate-remote-shell .remote-answers { grid-auto-rows: minmax(0, 1fr); flex: 1; min-height: 0; gap: 7px; }
  .candidate-remote-shell .remote-answers button { height: 100%; min-height: 0; border-radius: 14px; font-size: clamp(30px, 10vw, 50px); }
  .candidate-remote-shell .candidate-validate { flex: none; min-height: 46px; margin-top: 8px; border-radius: 12px; }
  .candidate-remote-shell .candidate-answer-state { flex: none; min-height: 14px; margin: 4px 0 0; font-size: 10px; line-height: 1.2; }
  .candidate-remote-shell .candidate-wait { flex: 1; min-height: 0; overflow: hidden; }
}

@media (max-width: 900px) and (max-height: 520px) {
  .candidate-remote-shell > header { flex-basis: 48px; min-height: 48px; padding-block: 4px; }
  .candidate-remote-shell > header img { width: 104px; height: 30px; }
  .candidate-remote-shell .candidate-pad { padding-top: 5px; }
  .candidate-remote-shell .candidate-pad h1 { margin-top: 4px; font-size: 18px; }
  .candidate-remote-shell .candidate-pad-help { display: none; }
  .candidate-remote-shell .remote-answers { gap: 5px; }
  .candidate-remote-shell .remote-answers button { border-radius: 11px; font-size: 30px; }
  .candidate-remote-shell .candidate-validate { min-height: 38px; margin-top: 5px; }
  .candidate-remote-shell .candidate-answer-state { margin-top: 2px; }
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  height: var(--ctrl-h); padding: 0 18px; border-radius: var(--ctrl-r); white-space: nowrap;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20,26,40,.05);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--bg); border-color: var(--muted); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.btn .ico-svg { width: 17px; height: 17px; }

.btn-primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(59,91,255,.28);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 4px 12px rgba(59,91,255,.34); }

.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg); border-color: transparent; color: var(--ink); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 2px 6px rgba(244,88,106,.28); }
.btn-danger:hover { background: #e04456; border-color: #e04456; }

.btn-sm { height: var(--ctrl-h-sm); padding: 0 14px; font-size: 13px; border-radius: var(--ctrl-r-sm); }
.btn-sm .ico-svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }

/* Barres d'actions : tous les boutons à la même largeur mini, donc au même gabarit.
   `a.btn` inclus (le lien Factur-X) pour qu'il ne détonne pas dans la rangée. */
.page-actions .btn, .modal-actions .btn, .de-actions .btn,
.page-actions a.btn, .modal-actions a.btn, .de-actions a.btn { min-width: var(--ctrl-minw); }
.modal-actions .btn-sm, .page-actions .btn-sm, .de-actions .btn-sm { min-width: 0; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 15px; }
/* `.bare` : échappatoire pour un champ qui vit dans son propre habillage
   (barre de recherche…). Sans ça, impossible d'annuler fond/bordure : cette
   règle est trop spécifique pour être battue par une simple classe. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not(.bare),
select:not(.bare), textarea {
  display: block; width: 100%; margin-top: var(--field-mt, 7px); padding: 0 14px;
  /* Gabarit pilotable par variable : cette règle est très spécifique (6 x :not()),
     un simple `.machin input { height }` ne la battrait pas. Un conteneur qui veut
     des champs plus compacts pose --field-h / --field-fs et tout suit. */
  height: var(--field-h, var(--ctrl-h));
  border: 1px solid var(--line); border-radius: var(--ctrl-r);
  font: inherit; font-size: var(--field-fs, 14px); color: var(--ink); background: var(--input-bg);
  transition: border-color .15s, box-shadow .15s;
}
/* Le textarea grandit avec son contenu : hauteur libre, mais mêmes marges internes */
textarea { height: auto; min-height: var(--ctrl-h); padding: 11px 14px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { line-height: 1.5; }
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A93A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
/* La règle générique des champs ci-dessus (même spécificité, `background` et `padding`
   raccourcis) effaçait la flèche : on la repose pour toutes les listes déroulantes. */
select:not(.bare) {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A93A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type=file] {
  width: 100%; margin-top: 7px; font: inherit; font-size: 13px; color: var(--ink-soft);
  height: var(--ctrl-h); padding: 0 12px; display: flex; align-items: center;
  border: 1px dashed var(--line); border-radius: var(--ctrl-r); background: var(--bg); cursor: pointer;
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 13px; margin-right: 12px; padding: 7px 12px;
  border: none; border-radius: 8px; background: var(--brand-soft); color: var(--brand); cursor: pointer;
}

/* ---------- Champ fichier habillé ----------
   L'input natif est rendu invisible mais reste cliquable par-dessus toute la
   zone : on maîtrise ainsi le libellé (le « Aucun fichier choisi » du
   navigateur n'est ni traduisible ni stylable, et débordait des modales). */
.filefield {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin-top: 7px; padding: 0 12px; min-height: var(--ctrl-h);
  border: 1px dashed var(--line); border-radius: var(--ctrl-r);
  background: var(--bg); cursor: pointer; overflow: hidden;
}
.filefield input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: none; background: none; opacity: 0; cursor: pointer; z-index: 1;
}
.ff-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.ff-btn .ico-svg { width: 15px; height: 15px; }
.ff-name {
  font-size: 13px; color: var(--ink); font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ff-name[data-empty] { color: var(--muted); font-weight: 500; }
.filefield:hover { border-color: var(--brand); }
.filefield:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* =====================================================================
   AUTHENTIFICATION (login / 2FA / install)
   ===================================================================== */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 15% -10%, var(--purple-soft), transparent 60%),
              radial-gradient(1000px 500px at 100% 110%, var(--sky-soft), transparent 55%),
              var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border-radius: 22px; box-shadow: var(--shadow); padding: 36px 32px;
}
.auth-brand { font-size: 20px; font-weight: 800; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 46px; width: auto; max-width: 100%; }
.brand-logo-sidebar { height: 48px; width: auto; max-width: 100%; }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 800;
}
.auth-card h1 { font-size: 21px; }
.auth-note { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.auth-hint { color: var(--muted); font-size: 12px; margin: -4px 0 16px; }
.acc-cible { font-weight: 600; font-size: 14px; margin: -10px 0 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-error { background: var(--red-soft); color: var(--red); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.auth-warning { background: var(--yellow-soft); color: #8A6D00; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin: 16px 0; }
.code-block, .secret-key {
  background: #0E1220; color: #E6EAF5; padding: 12px 14px; border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
  word-break: break-all; margin: 8px 0 18px;
}
.secret-key { text-align: center; font-size: 20px; letter-spacing: 3px; }
.qr-box { display: flex; justify-content: center; margin: 4px 0 16px; }
.qr-box svg { width: 200px; height: 200px; border: 8px solid #fff; border-radius: 12px; box-shadow: var(--shadow-sm); }
.qr-manual { margin-bottom: 14px; }
.qr-manual summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.qr-manual summary::-webkit-details-marker { color: var(--muted); }
.otp-inputs { display: flex; gap: 8px; justify-content: space-between; margin: 8px 0 18px; }
.otp-inputs input {
  width: 46px; text-align: center; font-size: 20px; padding: 12px 0; margin: 0;
}

/* =====================================================================
   SHELL APPLICATIF (sidebar + topbar + contenu)
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
/* La zone principale ne s'élargit jamais au-delà de l'écran : un tableau trop large
   défile dans sa carte au lieu de pousser toute la page (coupée à droite). */
.app > main { min-width: 0; }
.card:has(> table.tbl) { overflow-x: auto; }

.sidebar {
  background: var(--card); border-right: 1px solid var(--line);
  padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; padding: 4px 8px 26px; }
.nav-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; cursor: pointer; margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--sky-soft); color: var(--brand); }
.nav-item .ico { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav-item.active .ico { opacity: 1; }

.topbar {
  display: flex; align-items: center; gap: 18px; padding: 18px 30px;
  position: sticky; top: 0; background: var(--topbar-bg); backdrop-filter: blur(8px); z-index: 5;
}
/* `flex: 0 1 520px` et non `flex: 1` : le .topbar-spacer est lui aussi en
   flex:1 et se partageait la place à parts égales, d'où un champ trop étroit
   dont le texte d'aide était tronqué. */
.search-wrap { position: relative; flex: 0 1 520px; min-width: 180px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 8px 0 16px; height: 44px; color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search:hover { border-color: var(--muted); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input {
  border: none; background: none; margin: 0; padding: 0; flex: 1; height: 100%;
  font-size: 14.5px; color: var(--ink); min-width: 0;
}
.search input:focus { box-shadow: none; outline: none; }
.search input::placeholder { color: var(--muted); }
.search .s-ico { display: flex; color: var(--muted); flex: none; }
.search .s-ico .ico-svg { width: 18px; height: 18px; }
.search:focus-within .s-ico { color: var(--brand); }
/* Indice « Entrée » : discret, à l'intérieur du champ, visible seulement à la saisie */
.search kbd {
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted);
  background: var(--bg); border: none; border-radius: 999px; padding: 4px 10px; flex: none;
  opacity: 0; transition: opacity .15s;
}
.search:focus-within kbd { opacity: 1; }
.search-res {
  position: absolute; top: 52px; left: 0; right: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  z-index: 30; overflow: hidden; max-height: 420px; overflow-y: auto;
}
.search-res.hidden { display: none; }
.sr-group { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }
.sr-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 14px; border: none; background: none; font: inherit; cursor: pointer; }
.sr-item:hover, .sr-item.on { background: var(--brand-soft); }
.sr-ic { display: flex; color: var(--brand); flex: none; }
.sr-txt { min-width: 0; }
.sr-label { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-empty { padding: 18px 14px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 700px) { .search kbd { display: none; } }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-soft);
}
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }
.user-chip { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.user-chip .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--purple-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.user-chip .u-name { font-weight: 700; font-size: 14px; line-height: 1.1; }
.user-chip .u-role { color: var(--muted); font-size: 12px; text-transform: capitalize; }

.content { padding: 8px 30px 40px; }
.page-title { font-size: 24px; margin: 10px 4px 22px; }

/* ---------- Cartes / grilles ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink); box-shadow: var(--shadow-sm);
}
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px; }
.stat-ic .ico-svg { width: 22px; height: 22px; }
.stat-ic.purple { background: var(--purple-soft); color: var(--brand); }
.stat-ic.sky    { background: var(--sky-soft);    color: #2B8CBE; }
.stat-ic.yellow { background: var(--yellow-soft); color: #A9820C; }
.stat-ic.green  { background: var(--green-soft);  color: var(--green); }
.stat .stat-val { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat .stat-label { color: var(--muted); font-weight: 600; margin-top: 4px; font-size: 14px; }

.panels { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.panel-empty { color: var(--muted); text-align: center; padding: 50px 20px; }

/* ---------- Badges de statut ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.paid, .badge.ok { background: var(--sky-soft); color: #2B8CBE; }
.badge.pending { background: var(--yellow-soft); color: #A9820C; }
.badge.overdue, .badge.ko { background: var(--red-soft); color: var(--red); }

/* ---------- Loaders / toasts ---------- */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(59,91,255,.25); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { min-height: 100vh; display: grid; place-items: center; }

#toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast {
  background: var(--toast-bg); color: #fff; padding: 13px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: toastin .25s ease;
  max-width: 340px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

.fade-in { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.hidden { display: none !important; }

/* ---------- Catalogue ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 4px 22px; }
.page-head .page-title { margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.fcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease; border: 1px solid var(--line); }
.fcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.fcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fcode { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; letter-spacing: .03em; padding: 4px 10px; border-radius: 8px; }
.fcat { font-size: 12px; color: var(--muted); font-weight: 600; margin: 8px 0 2px; }
.fcard-title { font-weight: 700; font-size: 16px; margin-bottom: 12px; min-height: 2.4em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-lg { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.chip-x { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12px; padding: 0; line-height: 1; display: inline-flex; }
.chip-x .ico-svg { width: 13px; height: 13px; }
/* Saisie d'une nouvelle compétence : champ + bouton alignés */
.cp-add { display: flex; gap: 8px; align-items: center; max-width: 520px; }
.cp-add input { margin-top: 0; }
.cp-add .btn { flex: none; }
.fcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; font-weight: 600; }
.fcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fprice { font-weight: 800; }
.fcard-actions { display: flex; gap: 6px; }
.icon-mini {
  width: var(--ctrl-h-sm); height: var(--ctrl-h-sm); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--ctrl-r-sm); border: 1px solid var(--line);
  background: var(--card); cursor: pointer; color: var(--ink-soft);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-mini .ico-svg { width: 16px; height: 16px; }
.icon-mini:hover { background: var(--bg); border-color: var(--muted); }
.icon-mini.danger:hover { background: var(--red-soft); color: var(--red); border-color: var(--red-soft); }
.icon-mini:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }

/* Icône + libellé sur une même ligne (méta de fiche, badges, alertes) */
.meta-i { display: inline-flex; align-items: center; gap: 6px; }
.meta-i .ico-svg { width: 16px; height: 16px; flex: none; opacity: .9; }
.badge .ico-svg, .renta-alert .ico-svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-weight: 600; font-size: 14px; margin-top: 8px; }
.mod-list { display: flex; flex-direction: column; gap: 8px; }
.mod-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); }
.mod-name { font-weight: 600; min-width: 0; }
/* L'e-mail ne doit ni passer sur 2 lignes ni disparaître quand il est vide :
   dans les deux cas la hauteur des lignes devenait irrégulière. */
.mod-name .muted { display: block; min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-counts { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Modale ---------- */
.modal-ov { position: fixed; inset: 0; background: rgba(20,26,40,.45); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 200; overflow-y: auto; }
.modal-ov.show { display: flex; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; width: 100%; max-width: 540px; margin: auto; }
.modal h2 { font-size: 20px; margin-bottom: 18px; }
/* Variante large : pour les contenus tabulaires (tarifs négociés…) */
.modal.modal-lg { max-width: 900px; }
.modal.modal-xl { max-width: 1040px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-row { display: flex; gap: 14px; }
.form-row > label { flex: 1; min-width: 0; }
.modal textarea { resize: vertical; }
#imp-result { margin: 16px 0; }
#imp-result .auth-error ul { margin: 8px 0 0; padding-left: 18px; }
.imp-form { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.imp-mods { margin: 10px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; }
.imp-mods li { margin-bottom: 3px; }
.imp-mods em { color: var(--muted); font-style: normal; }
#imp-file { margin-bottom: 6px; }

@media (max-width: 560px) { .form-row { flex-direction: column; gap: 0; } }

/* ---------- Tableaux ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr:hover { background: var(--bg); }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--purple-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.chip { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 7px; }
.muted { color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.search-inline input { margin: 0; width: 240px; border-radius: 999px; padding: 9px 16px; }

/* ---------- Sélecteurs multiples / listes ---------- */
.checks { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; margin: 8px 0 14px; padding: 4px; }
.chk { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.chk input { width: auto; margin: 0; }

/* ---------- Interrupteur à bascule (réglages on/off) ---------- */
.switch { position: relative; display: inline-block; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; background: var(--btn-bg); border-radius: 999px; transition: background .15s; }
.switch-track::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Carte d'état (modale Accès) ---------- */
.acc-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 14px; border-radius: var(--radius-sm); background: var(--sky-soft); transition: background .15s; }
.acc-box.off { background: var(--red-soft); }
.acc-box-ic { display: flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); }
.acc-box-ic .ico-svg { width: 18px; height: 18px; color: #2B8CBE; }
.acc-box.off .acc-box-ic .ico-svg { color: var(--red); }
.acc-box-txt { flex: 1; min-width: 0; }
.acc-box-lab { font-weight: 700; font-size: 14px; }
.acc-box-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.menu-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
/* inline-flex obligatoire : .ico-svg est en display:block, sans ça l'icône
   se place AU-DESSUS du libellé au lieu d'être à côté. */
.menu-btn { display: flex; align-items: center; gap: 11px; text-align: left; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.menu-btn .ico-svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.menu-btn:hover .ico-svg { color: var(--brand); }
.menu-btn.danger .ico-svg { color: var(--red); }
.menu-btn:hover { background: var(--bg); }
.menu-btn.danger { color: var(--red); }
.menu-btn.danger:hover { background: var(--red-soft); }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin: 6px 0; }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; font-weight: 600; text-align: left; }
.pick:hover { background: var(--brand-soft); border-color: var(--brand); }
.enr-search { margin-bottom: 10px; }

/* ---------- Inscription groupée (fenêtre « Inscrire des candidats ») ---------- */
.enr-tabs { margin: 0 0 14px; flex-wrap: wrap; }
.enr-n:not(:empty) { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.enr-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.enr-tools .enr-search { flex: 1; margin: 0; }
.enr-tools .chk { flex: none; white-space: nowrap; }
.enr-list { max-height: 340px; }
.enr-pick { justify-content: flex-start; font-weight: 600; margin: 0; color: var(--ink); }
.enr-pick input { width: auto; margin: 0; flex: none; }
.enr-pick:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.enr-pick.is-done { cursor: default; opacity: .6; }
.enr-pick.is-done:hover { background: var(--card); border-color: var(--line); }
.enr-pick .badge { margin-left: auto; }
.enr-who { display: flex; flex-direction: column; min-width: 0; }
.enr-who small { font-size: 12px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enr-table-wrap { overflow-x: auto; }
.enr-table { min-width: 620px; --field-h: 38px; --field-mt: 0; --field-fs: 13.5px; }
.enr-row { display: grid; grid-template-columns: 1fr 1fr 1.5fr 1fr .9fr 32px; gap: 6px; align-items: center; }
.enr-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 2px 6px; }
.enr-line { padding: 3px 0; }
/* !important : la règle générique des champs (6 x :not()) est plus spécifique. */
.enr-line.is-invalid input[data-f="prenom"]:placeholder-shown, .enr-line.is-invalid input[data-f="nom"]:placeholder-shown { border-color: var(--red) !important; background: var(--red-soft) !important; }
.enr-row-warn { margin: 5px 2px 4px; padding: 7px 10px; border-radius: 10px; background: var(--orange-soft); color: var(--ink); font-size: 12.5px; font-weight: 500; }
.enr-row-warn .linkish { font-size: 12.5px; margin-left: 4px; }
.enr-new-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
#enr-paste textarea { margin-top: 8px; font-size: 13px; }
.enr-common { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.enr-common .chk { margin-top: -4px; }
.enr-warn-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--orange-soft); color: var(--ink); font-size: 13px; font-weight: 500; }
.enr-foot { align-items: center; }
.enr-sum { margin-right: auto; font-size: 13px; color: var(--ink-soft); }
.enr-sum .is-over { color: var(--red); font-weight: 700; }
.enr-access { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; margin-top: 12px; }
.enr-access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; }
.enr-access-row .enr-who small { margin-top: 4px; }
.enr-access-row .btn.is-copied { color: var(--green); border-color: var(--green); }
@media (max-width: 640px) {
  .modal .enr-tabs { flex-wrap: wrap; overflow: visible; }
  .enr-tabs .tab { padding: 8px 12px; }
  .enr-tools { flex-wrap: wrap; }
  .enr-foot { flex-wrap: wrap; }
  .enr-sum { width: 100%; }
  /* Une carte par candidat : prénom / nom, e-mail, téléphone / date */
  .enr-table { min-width: 0; }
  .enr-head { display: none; }
  .enr-line { padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; }
  .enr-row { grid-template-columns: 1fr 1fr 32px; }
  .enr-row [data-f="email"] { grid-column: 1 / 3; grid-row: 2; }
  .enr-row [data-f="phone"] { grid-column: 1; grid-row: 3; }
  .enr-row [data-f="birth_date"] { grid-column: 2; grid-row: 3; }
  .enr-row .icon-mini.danger { display: inline-flex; grid-column: 3; grid-row: 1; } /* simple retrait de ligne : reste visible */
}

/* ---------- Détail session ---------- */
.det-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.det-head h2 { font-size: 19px; }
.det-section { margin-top: 20px; }
.det-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.det-sec-head h3 { margin: 0; font-size: 15px; }
.insc-ctrl { display: flex; align-items: center; gap: 8px; flex: none; }
/* les deux selects d'une ligne d'inscrit restent compacts et alignés */
.insc-ctrl select {
  --field-h: var(--ctrl-h-sm); --field-fs: 13px; --field-mt: 0;
  border-radius: var(--ctrl-r-sm);
  padding: 0 28px 0 10px; background-position: right 8px center;
}
/* largeur FIXE (et non auto) : c'est ce qui aligne les colonnes d'une ligne à
   l'autre, quel que soit le libellé du financement ou du statut. */
.insc-ctrl select[data-fin] { width: 150px; }
.insc-ctrl select[data-insc] { width: 124px; }
@media (max-width: 560px) {
  .mod-row { flex-wrap: wrap; }
  .insc-ctrl { width: 100%; }
  .insc-ctrl select { flex: 1; width: auto; }
}

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-label { font-weight: 700; font-size: 16px; min-width: 150px; text-align: center; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.cal-dow div { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { min-height: 92px; min-width: 0; background: var(--bg); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.empty { background: transparent; }
.cal-cell.today { outline: 2px solid var(--brand); outline-offset: -2px; }
.cal-num { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.cal-ev { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--sky-soft); color: #2B8CBE; }
.cal-ev.pending { background: var(--yellow-soft); color: #A9820C; }
.cal-ev.overdue { background: var(--red-soft); color: var(--red); }
.cal-ev.ok { background: var(--green-soft); color: var(--green); }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 600; }
@media (max-width: 700px) { .cal-cell { min-height: 64px; } .search-inline input { width: 150px; } }

/* ---------- Icônes ---------- */
/* inline-block (et non block) : dans un conteneur non-flex, une icône en
   display:block se place au-dessus du texte au lieu d'être à côté. C'est la
   cause du piège n°2 — corrigée ici une bonne fois pour toutes. Les conteneurs
   flex ne sont pas affectés : leurs enfants sont blockifiés de toute façon. */
.ico-svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: none; }
/* Icônes Stratis : chaque tracé porte son propre fill/stroke (currentColor) */
.nav-item .ico { display: flex; align-items: center; justify-content: center; }
.icon-btn .ico-svg { width: 20px; height: 20px; }
a.icon-mini { display: grid; place-items: center; text-decoration: none; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 8px; margin: 0 4px 18px; }
.tab { border: none; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--brand-soft); color: var(--brand); }
.tab:hover:not(.active) { background: var(--bg); }

/* ---------- Éditeur de lignes (devis/factures) ---------- */
.lines { margin: 8px 0 14px; }
.ln-tbl { width: 100%; border-collapse: collapse; }
.ln-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 6px 6px; }
.ln-tbl td { padding: 3px; vertical-align: middle; }
.ln-tbl input { margin: 0; padding: 8px 10px; }
.ln-tbl .l-qte, .ln-tbl .l-pu, .ln-tbl .l-tva { width: 78px; text-align: right; }
.ln-tbl .l-mt { text-align: right; font-weight: 600; white-space: nowrap; font-size: 13px; }
.totals { display: flex; justify-content: flex-end; gap: 20px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); align-items: baseline; }
.totals b { color: var(--ink); margin-left: 4px; }
.totals .ttc { font-size: 17px; font-weight: 800; color: var(--ink); }
.totals .ttc b { color: var(--brand); }
.inline-sel { margin: 0; width: auto; padding: 9px 32px 9px 12px; }

/* ---------- Statut (modale détail devis/facture) ---------- */
.doc-status-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc-status-lab { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.doc-status-row .inline-sel { margin: 0; }

/* ---------- Carte récapitulative (modale détail devis/facture) ---------- */
.doc-totals { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0 auto; padding: 14px 18px; width: 100%; max-width: 280px; border-radius: var(--radius-sm); background: var(--bg); }
.dt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--ink-soft); }
.dt-row b { font-weight: 700; color: var(--ink); }
.dt-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.dt-total span { font-weight: 700; color: var(--ink); }
.dt-total b { font-size: 19px; font-weight: 800; color: var(--brand); }
.tbl th.r, .tbl td.r { text-align: right; }
@media (max-width: 560px) { .ln-tbl .l-qte, .ln-tbl .l-pu, .ln-tbl .l-tva { width: 56px; } }

/* ---------- Notifications ---------- */
.notif-wrap { position: relative; }
.notif-panel { position: absolute; top: 52px; right: 0; width: 344px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 20; overflow: hidden; border: 1px solid var(--line); }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.link-btn { background: none; border: none; color: var(--brand); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--brand-soft); }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-msg { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.notif-time { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* ---------- Agenda (dashboard) ---------- */
.agenda { display: flex; flex-direction: column; gap: 10px; }
.agenda-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; transition: background .15s; }
.agenda-item:hover { background: var(--brand-soft); }
.agenda-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--card); flex: none; box-shadow: var(--shadow-sm); }
.ad-day { font-weight: 800; font-size: 16px; line-height: 1; }
.ad-mon { font-size: 10px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.agenda-info { flex: 1; min-width: 0; }
.agenda-title { font-weight: 600; font-size: 14px; }
.agenda-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rev-total { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.rev-total .muted { font-size: 13px; font-weight: 500; }

@media (max-width: 560px) {
  .notif-panel { position: fixed; top: 74px; left: 10px; right: 10px; width: auto; max-height: 70vh; overflow-y: auto; }
}

/* ---------- Workflow IPSO ---------- */
.jf { display: inline-block; font-weight: 800; font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.jf-red { background: var(--red-soft); color: var(--red); }
.jf-orange { background: var(--orange-soft); color: #A9660C; }
.jf-green { background: var(--green-soft); color: var(--green); }
.jf-past { background: var(--bg); color: var(--muted); }
.dossier-line { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; font-size: 14px; }

.docs-wrap { display: inline-flex; align-items: center; gap: 8px; }
.docs-bar { display: inline-block; width: 64px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.docs-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.docs-fill.ok { background: var(--green); }
.docs-fill.mid { background: var(--orange); }
.docs-fill.low { background: var(--red); }
.docs-pct { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.docs-list { display: flex; flex-direction: column; gap: 6px; }
.docs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.docs-row select { margin: 0; width: auto; padding: 5px 28px 5px 10px; font-size: 13px; background-position: right 8px center; }

.calc-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 15px; }
.calc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.calc-row b { font-size: 15px; color: var(--brand); }
.calc-row em { font-style: normal; color: var(--muted); font-size: 12px; }
.chk-inline { display: flex; gap: 8px; margin-top: 7px; }
.chk-inline .chk { margin: 0; }

.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fin-cell { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fin-cell span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-cell b { font-size: 17px; }
.fin-cell em { font-style: normal; font-size: 11px; color: var(--muted); }
.fin-cell.hl { background: var(--brand-soft); }
.fin-cell.hl b, .fin-cell.hl em { color: var(--brand); }
.fact-flags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.fact-flags .chk { margin: 0; }
.fact-signal { margin-top: 12px; background: var(--yellow-soft); }

.renta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.renta-cell { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.renta-cell span { font-size: 12px; color: var(--muted); font-weight: 600; }
.renta-cell b { font-size: 20px; font-weight: 800; }
.renta-cell em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.renta-cell.hl { background: var(--green-soft); }
.renta-cell.hl b, .renta-cell.hl em { color: var(--green); }
.renta-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.renta-cols h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tbl.mini td { padding: 7px 8px; font-size: 13px; }
.s-dates { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Accent discret au survol d'une ligne de session (rafraîchissement visuel) */
.tbl tbody tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.renta-alert { margin-top: 16px; background: var(--yellow-soft); color: #8A6D00; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; }
@media (max-width: 700px) { .renta-cols { grid-template-columns: 1fr; } }

/* ---------- Diapos : outils, présentation, gestion ---------- */
.slide-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.present-ov { position: fixed; inset: 0; background: var(--card); z-index: 300; display: flex; flex-direction: column; }
.present-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.present-mod { font-weight: 700; color: var(--brand); }
/* Sélecteur de module en présentation : reprend le bleu du titre de module */
.present-modsel select {
  margin: 0; width: auto; max-width: 46vw; min-width: 180px;
  --field-h: 40px; --field-fs: 14px; --field-mt: 0;
  font-weight: 700; color: var(--brand); border-color: var(--line);
  background-color: var(--brand-soft); border-radius: 999px; padding: 0 40px 0 16px;
}
.present-modsel select:hover { border-color: var(--brand); }
.present-count { color: var(--muted); font-weight: 600; }
.present-close { display: inline-flex; align-items: center; gap: 8px; border: none; background: var(--bg); border-radius: 10px; padding: 9px 15px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink-soft); }
.present-close .ico-svg { width: 16px; height: 16px; }
.present-close:hover { background: var(--red-soft); color: var(--red); }
.present-stage { flex: 1; display: grid; place-items: center; padding: 40px 90px; overflow-y: auto; }
.present-slide { max-width: 900px; width: 100%; }
.present-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); font-size: 30px; line-height: 1; color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; }
.present-nav:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.present-nav.prev { left: 24px; } .present-nav.next { right: 24px; }
.present-nav:disabled { opacity: .3; cursor: default; }

.sl-num { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 10px; }
.sl-title { font-size: 30px; color: var(--ink); margin: 0 0 18px; letter-spacing: -.02em; line-height: 1.15; }
.present-stage .sl-title { font-size: 38px; }
.sl-obj { font-weight: 600; font-size: 18px; color: var(--ink-soft); margin: 0 0 14px; }
.sl-intro { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 16px; }
.sl-points { font-size: 17px; line-height: 1.9; padding-left: 22px; margin: 0; }
.sl-points li { margin-bottom: 6px; }
/* Tableaux & mise en forme dans le contenu pédagogique */
.sl-intro table, .sl-points table, .sl-focus table, .present-slide table, .sl-preview table {
  width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; display: table;
}
.sl-intro th, .sl-intro td, .sl-points th, .sl-points td, .present-slide th, .present-slide td, .sl-preview th, .sl-preview td {
  border: 1px solid var(--line); padding: 8px 11px; text-align: left; vertical-align: top; line-height: 1.5;
}
.sl-intro th, .sl-points th, .present-slide th, .sl-preview th { background: var(--bg); font-weight: 700; color: var(--ink); }
.present-slide table { font-size: 15px; }
.sl-media { margin: 16px 0; }
.sl-media img, .sl-media video { max-width: 100%; max-height: 46vh; border-radius: 12px; display: block; margin: 0 auto; box-shadow: var(--shadow-sm); }
.sl-focus { margin-top: 22px; background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 16px 18px; border-radius: 12px; font-size: 16px; line-height: 1.6; }
.sl-focus-type { display: block; font-weight: 800; font-size: 12px; letter-spacing: .06em; color: var(--brand); margin-bottom: 6px; }

/* ================= Présentation — mise en page éditoriale (v2.15) =================
   Classes .pv-* dédiées : ne PAS réutiliser .present-slide/.sl-* (partagés QCM). */
.pv-prog { height: 3px; background: var(--line); flex: none; }
.pv-prog > i { display: block; height: 100%; background: var(--brand); transition: width .3s; }

.pv-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 30px; border-bottom: 1px solid var(--line); }
.pv-modsel { position: relative; display: inline-flex; align-items: center; }
.pv-modsel .mod-ic { position: absolute; left: 15px; width: 16px; height: 16px; color: var(--brand); pointer-events: none; }
.pv-modsel select {
  margin: 0; width: auto; min-width: 200px; --field-h: 40px; --field-fs: 13.5px; --field-mt: 0;
  font-weight: 700; color: var(--brand); background-color: var(--brand-soft);
  border: 1px solid transparent; border-radius: 999px; padding: 0 38px 0 41px; cursor: pointer;
}
.pv-modsel select:hover { border-color: var(--brand); }
.pv-modsel.static { gap: 9px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; height: 40px; padding: 0 18px 0 41px; }
.pv-modsel.static .mod-ic { left: 16px; }
.pv-bar-actions { display: inline-flex; align-items: center; gap: 8px; }
.pv-quit { display: inline-flex; align-items: center; gap: 8px; border: none; background: var(--bg); border-radius: 10px; padding: 9px 15px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink-soft); }
.pv-quit .ico-svg { width: 16px; height: 16px; }
.pv-quit:hover { background: var(--red-soft); color: var(--red); }
.pv-edit { display: inline-flex; align-items: center; gap: 8px; border: none; background: var(--brand-soft); border-radius: 10px; padding: 9px 15px; cursor: pointer; font: inherit; font-weight: 700; font-size: 13.5px; color: var(--brand); }
.pv-edit .ico-svg { width: 16px; height: 16px; }
.pv-edit:hover { background: var(--brand); color: #fff; }
@media (max-width: 640px) { .pv-edit { display: none; } }   /* mobile = consultation */

.pv-body { flex: 1; overflow-y: auto; padding: 32px 60px 18px; }
.pv-inner { max-width: 1200px; margin: 0 auto; }

.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.pv-head-txt { min-width: 0; }
.pv-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.pv-title { font-size: 33px; line-height: 1.14; letter-spacing: -.02em; color: var(--ink); margin: 0; max-width: 42ch; }
.pv-obj { display: inline-flex; align-items: center; gap: 9px; margin-top: 15px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 14px; padding: 8px 16px 8px 13px; border-radius: 10px; }
.pv-obj .ico-svg { width: 16px; height: 16px; flex: none; }
.pv-logo { flex: none; height: 40px; margin-top: 2px; }
:root[data-theme="dark"] .pv-logo { filter: invert(1) brightness(1.7); }

.pv-rule { height: 1px; background: var(--line); margin: 22px 0 26px; }

.pv-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 44px; align-items: start; }
.pv-grid.solo { grid-template-columns: 1fr; max-width: 860px; }
.pv-col-main { min-width: 0; }

.pv-intro { font-size: 17px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 20px; }
.pv-intro strong, .pv-points strong { color: var(--ink); font-weight: 700; }
.pv-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.pv-points li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.pv-points li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.pv-aside { display: flex; flex-direction: column; gap: 18px; }
.pv-focus { border: 1px solid var(--line); border-left: 3px solid var(--fc); background: var(--fc-soft); border-radius: 12px; padding: 15px 17px; }
.pv-focus-h { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .07em; color: var(--fc); margin-bottom: 8px; text-transform: uppercase; }
.pv-focus-h .ico-svg { width: 15px; height: 15px; }
.pv-focus-b { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.pv-focus-b strong { color: var(--ink); }
.pv-focus.fc-important { --fc: var(--brand); --fc-soft: var(--brand-soft); }
.pv-focus.fc-attention { --fc: var(--orange); --fc-soft: var(--orange-soft); }
.pv-focus.fc-exemple { --fc: var(--green); --fc-soft: var(--green-soft); }
.pv-focus.fc-loi { --fc: #8B7BE8; --fc-soft: var(--purple-soft); }
.pv-focus.fc-saviez { --fc: #2B8CBE; --fc-soft: var(--sky-soft); }
:root[data-theme="dark"] .pv-focus.fc-saviez { --fc: #6FC7EE; }
:root[data-theme="dark"] .pv-focus.fc-loi { --fc: #B0A4F5; }

.pv-figure { margin: 0; }
.pv-figure img, .pv-figure video { width: 100%; display: block; border-radius: 14px; box-shadow: var(--shadow); }
/* Tableaux dans le contenu pédagogique (repris de .sl-*) */
.pv-intro table, .pv-points table, .pv-focus-b table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; display: table; }
.pv-intro th, .pv-intro td, .pv-points th, .pv-points td, .pv-focus-b th, .pv-focus-b td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; vertical-align: top; line-height: 1.5; }
.pv-intro th, .pv-points th, .pv-focus-b th { background: var(--bg); font-weight: 700; color: var(--ink); }

.pv-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 60px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pv-foot .pv-num { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pv-hint { display: inline-flex; align-items: center; gap: 11px; font-size: 12px; color: var(--muted); }
.pv-hint .sep { opacity: .5; }
.pv-hint kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); font: inherit; font-size: 11px; font-weight: 700; color: var(--ink-soft); }

.pv-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); font-size: 24px; line-height: 1; color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; z-index: 310; }
.pv-nav:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }
.pv-nav:disabled { opacity: .3; cursor: default; }
.pv-nav.prev { left: 16px; } .pv-nav.next { right: 16px; }

@media (max-width: 820px) {
  .pv-bar, .pv-body, .pv-foot { padding-left: 20px; padding-right: 20px; }
  .pv-grid { grid-template-columns: 1fr; gap: 22px; }
  .pv-title { font-size: 26px; }
  .pv-hint { display: none; }
  .pv-nav { width: 42px; height: 42px; }
}

.sl-manage { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; margin: 6px 0; }
.sl-group-h { font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.sl-items { display: flex; flex-direction: column; }
.sl-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font: inherit; font-size: 14px; margin-bottom: 6px; }
.sl-item:hover { background: var(--brand-soft); border-color: var(--brand); }
.sl-item.dragging { opacity: .4; }
.sl-drag { cursor: grab; color: var(--muted); font-size: 15px; letter-spacing: -2px; flex: none; padding: 0 2px; }
.sl-drag:active { cursor: grabbing; }
.sl-item-n { display: inline-block; min-width: 26px; color: var(--muted); font-weight: 700; font-size: 12px; flex: none; }
.sl-item-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-item-act { display: flex; gap: 5px; flex: none; opacity: 0; transition: opacity .15s; }
.sl-item:hover .sl-item-act, .sl-item:focus-within .sl-item-act { opacity: 1; }
@media (hover: none) { .sl-item-act { opacity: 1; } }
.sl-add {
  display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 4px; padding: 9px 14px;
  border: 1px dashed var(--line); border-radius: 10px; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 13.5px; color: var(--brand);
}
.sl-add .ico-svg { width: 16px; height: 16px; }
.sl-add:hover { border-color: var(--brand); background: var(--brand-soft); }

/* Éditeur de la checklist documents (Paramètres) */
#dcl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.dcl-row { display: flex; align-items: center; gap: 8px; }
.dcl-row .dcl-label { flex: 1; margin: 0; }
.dcl-row .dcl-del { flex: none; }

/* ---------- Paramètres : menu latéral ---------- */
.set-layout { display: grid; grid-template-columns: 232px 1fr; gap: 20px; align-items: start; }
.set-menu { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; }
.set-menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; border: none; background: none; font: inherit; font-weight: 600; font-size: 14px;
  color: var(--ink-soft); padding: 11px 14px; border-radius: var(--radius-sm); cursor: pointer;
}
.set-menu-item .ico { display: flex; flex: none; }
.set-menu-item:hover { background: var(--bg); }
.set-menu-item.active { background: var(--brand-soft); color: var(--brand); }
.set-sec { display: none; }
.set-sec.on { display: block; animation: fadein .2s ease; }
.set-sec h3:first-child { margin-top: 0; }
.set-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; }
  .set-menu { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; gap: 6px; }
  .set-menu-item { white-space: nowrap; flex: none; }
}

/* ---------- Éditeur pleine page (devis / facture) ---------- */
.doc-editor { position: fixed; inset: 0; background: var(--bg); z-index: 250; display: flex; flex-direction: column; }
.de-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.de-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.de-title strong { font-size: 16px; }
.de-num { color: var(--brand); font-weight: 700; font-size: 13px; background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }
.de-saved { color: var(--muted); font-size: 12px; }
.de-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.de-body { flex: 1; display: grid; grid-template-columns: minmax(380px, 460px) 1fr; overflow: hidden; }
.de-form { overflow-y: auto; padding: 22px; border-right: 1px solid var(--line); background: var(--card); }
.de-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.de-block-h { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.de-client-info { background: var(--bg); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.de-legal { background: var(--bg); }

/* Une ligne d'article = une petite carte : désignation au-dessus, chiffres en dessous */
.de-line {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 10px; background: var(--bg);
}
.de-line + .de-line { margin-top: 0; }
.dl-top { display: flex; gap: 8px; align-items: center; }
.dl-top .dl-form { margin-top: 0; flex: 1; min-width: 0; }
.de-line .dl-des { margin-top: 8px; }
.de-line .dl-des[hidden] { display: none; }

.dl-nums { display: grid; grid-template-columns: 74px 104px 74px 1fr; gap: 8px; align-items: end; margin-top: 10px; }
.dl-nums label { margin-bottom: 0; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.dl-nums input { margin-top: 4px; text-align: right; }
.dl-sum { text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.dl-sum b { display: block; margin-top: 4px; font-size: 15px; color: var(--ink); text-transform: none; letter-spacing: 0; line-height: var(--ctrl-h); }

/* Rappel de la règle « plus de N candidats = forfait groupe » */
.dl-hint {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px;
  background: var(--yellow-soft); color: #8A6D00; border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; line-height: 1.45;
}
.dl-hint[hidden] { display: none; }
.dl-hint .ico-svg { width: 15px; height: 15px; flex: none; }
.dl-hint .dl-apply { margin-left: auto; }
:root[data-theme="dark"] .dl-hint { color: #E8C468; }

@media (max-width: 560px) {
  .dl-nums { grid-template-columns: 1fr 1fr; }
  .dl-sum { grid-column: 1 / -1; text-align: left; }
}
.de-tot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-soft); }
.de-tot div { display: flex; justify-content: space-between; }
.de-tot b { color: var(--ink); }
.de-tot .big { font-size: 16px; font-weight: 800; margin-top: 4px; }
.de-tot .big b { color: var(--brand); }

/* L'aperçu du document (.de-paper / .dp-*) vit dans css/document.css :
   ce fichier est partagé avec la fenêtre d'impression pour que l'aperçu
   soit fidèle au PDF. Ne pas redéfinir ces règles ici. */
.de-preview { overflow-y: auto; padding: 28px; display: flex; justify-content: center; align-items: flex-start; background: var(--bg); }

@media (max-width: 1000px) {
  .de-body { grid-template-columns: 1fr; }
  .de-form { border-right: none; border-bottom: 1px solid var(--line); }
  .de-preview { padding: 16px; }
}

/* ---------- Barres de filtres ---------- */
/* ---------- Barre de filtres (identique sur tous les écrans) ----------
   Tous les contrôles sont au gabarit « petit » (--ctrl-h-sm) : la barre est
   une boîte à outils secondaire, elle ne doit pas concurrencer les actions
   principales de la page, mais tout doit s'y aligner au pixel. */
.filters {
  --field-h: var(--ctrl-h-sm);   /* tous les champs de la barre au gabarit compact */
  --field-fs: 13px;
  --field-mt: 0;                 /* pas de décalage : la barre aligne au centre */
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.filters-ic { display: flex; flex: none; color: var(--muted); margin: 0 2px 0 2px; }
.filters-ic .ico-svg { width: 17px; height: 17px; }
.filters select,
.filters .search-inline input { margin: 0; border-radius: var(--ctrl-r-sm); }
.filters select { width: auto; min-width: 158px; padding: 0 32px 0 12px; background-position: right 10px center; }
.filters .search-inline input { width: 250px; padding: 0 14px; border-radius: 999px; }
.filters .search-inline { flex: 1 1 200px; max-width: 320px; }
.filters .search-inline input { width: 100%; }
/* Un filtre actif se repère d'un coup d'œil */
.filters .on { border-color: var(--brand); background-color: var(--brand-soft); color: var(--brand); font-weight: 600; }
.filters-count { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: auto; white-space: nowrap; }

@media (max-width: 700px) {
  .filters { gap: 8px; }
  .filters .search-inline { flex: 1 1 100%; max-width: none; }
  .filters select { flex: 1 1 140px; min-width: 0; }
  .filters-count { margin-left: 0; width: 100%; }
}

/* ---------- Alerte de conservation (RGPD) ---------- */
.retention-card { margin-top: 18px; border-left: 4px solid var(--orange); }
.ret-block { margin: 12px 0; font-size: 14px; }
.ret-block ul { margin: 6px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

/* ---------- Visualiseur de documents (plein écran) ---------- */
.doc-viewer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 26, 40, .72); backdrop-filter: blur(3px);
  display: flex; flex-direction: column; padding: 26px;
}
.dv-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0; padding: 14px 18px;
}
.dv-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dv-title .ico-svg { width: 22px; height: 22px; flex: none; color: var(--brand); }
.dv-title strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.dv-actions { display: flex; gap: 8px; flex: none; }
.dv-body {
  flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto;
  background: #2A3141; border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); padding: 0;
}
/* color-scheme: light => un .txt/.csv reste noir sur blanc même si l'OS est en
   thème sombre (sinon le navigateur applique sa propre feuille sombre au document). */
.dv-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; color-scheme: light; }
/* fond blanc : un scan PNG avec transparence reste lisible sur le fond sombre */
.dv-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; background: #fff; }
/* Fichiers texte / CSV : rendus par l'app, sur une « feuille » lisible */
.dv-text {
  align-self: stretch; justify-self: stretch; width: 100%; min-height: 100%; margin: 0;
  background: #fff; color: #1E2430; padding: 28px 32px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; overflow: auto;
}
.dv-fallback {
  text-align: center; color: var(--ink); background: var(--card);
  padding: 40px 32px; border-radius: var(--radius); margin: 24px; max-width: 460px;
}
.dv-fallback .ico-svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--muted); }
.dv-fallback h3 { margin: 0 0 8px; font-size: 17px; }
.dv-fallback p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
body.no-scroll { overflow: hidden; }
/* Aperçu d'un devis/facture : la feuille est centrée et défile dans le cadre */
.dv-paper { display: block; padding: 26px; }
.dv-paper .de-paper { margin: 0 auto; max-width: 760px; }

/* Un titre de tableau qui se comporte comme un lien */
.linkish {
  background: none; border: none; padding: 0; font: inherit; color: var(--brand);
  font-weight: 600; cursor: pointer; text-align: left;
}
.linkish:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .doc-viewer { padding: 0; }
  .dv-head { flex-wrap: wrap; border-radius: 0; }
  .dv-body { border-radius: 0; }
  .dv-actions { width: 100%; }
  .dv-actions .btn { flex: 1; }
}

/* ---------- Bloc RGPD ---------- */
.rgpd-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 6px 0 15px; }
.rgpd-h { font-weight: 700; font-size: 13px; color: var(--ink-soft); }

/* ---------- Médias de diapo (édition) ---------- */
.media-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 6px; }
.media-slot { position: relative; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; min-height: 110px; display: grid; place-items: center; overflow: hidden; }
.media-slot img, .media-slot video { width: 100%; max-height: 150px; object-fit: contain; display: block; background: #000; }
.media-add { display: grid; place-items: center; width: 100%; min-height: 110px; margin: 0; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; padding: 10px; }
.media-add:hover { color: var(--brand); background: var(--brand-soft); }
.media-x { position: absolute; top: 6px; right: 6px; }
@media (max-width: 560px) { .media-box { grid-template-columns: 1fr; } }

/* ---------- QCM / QCU ---------- */
.quiz-toolbar { display:flex; align-items:center; gap:10px; margin:12px 0 10px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.quiz-toolbar label { margin:0; color:var(--ink-soft); font-size:12px; font-weight:700; }
.quiz-toolbar select { flex:1; min-width:0; margin:0; }
.quiz-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.quiz-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.quiz-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.quiz-main { flex: 1; min-width: 0; }
.quiz-q { font-weight: 600; font-size: 14px; }
.quiz-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
/* ---------- Session QCM (projection) ---------- */
.qz-timer { height: 8px; background: var(--line); }
.qz-timer-fill { height: 100%; background: var(--brand); transition: width 1s linear, background .2s; }
.qz-timer-fill.urgent { background: var(--red); }
/* Grand chrono voyant dans la barre du haut */
.qz-chrono {
  display: inline-flex; align-items: baseline; gap: 2px; min-width: 62px; justify-content: center;
  font-size: 26px; font-weight: 800; line-height: 1; color: var(--brand);
  background: var(--brand-soft); padding: 7px 14px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.qz-chrono small { font-size: 13px; font-weight: 700; }
.qz-chrono.urgent { color: #fff; background: var(--red); animation: chronoflash .5s ease-in-out infinite; }
@keyframes chronoflash { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.qz-opts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.qz-opts li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 14px; font-size: 18px; background: var(--card); }
.qz-opts li.good { border-color: var(--green); background: var(--green-soft); }
.qz-opts li.explainable { cursor: pointer; box-shadow: 0 0 0 0 rgba(36,151,106,0); transition: box-shadow .18s ease, transform .18s ease; }
.qz-opts li.explainable:hover, .qz-opts li.explainable:focus { outline: none; box-shadow: 0 0 0 4px rgba(36,151,106,.16); transform: translateY(-1px); }
.qz-let { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 15px; }
.qz-opts li.good .qz-let { background: var(--green); color: #fff; }
.qz-txt { flex: 1; }
.qz-ok { color: var(--green); font-weight: 800; font-size: 20px; }
.qz-explain-hint { margin: 14px 2px 0; color: var(--green); font-size: 14px; font-weight: 700; text-align: center; }
.qz-explanation-ov { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:24px; background:rgba(20,26,40,.58); backdrop-filter:blur(3px); }
.qz-explanation-card { position:relative; width:min(660px, 100%); max-height:min(680px, calc(100vh - 48px)); overflow:auto; padding:28px; border:1px solid rgba(36,151,106,.18); border-radius:22px; background:var(--card); box-shadow:0 24px 70px rgba(17,24,39,.28); }
.qz-explanation-kicker { display:block; margin-bottom:14px; color:var(--green); font-size:11px; font-weight:800; letter-spacing:.1em; }
.qz-explanation-answer { display:flex; align-items:flex-start; gap:12px; padding:15px 16px; border:1px solid rgba(36,151,106,.22); border-radius:14px; background:linear-gradient(135deg, var(--green-soft), rgba(255,255,255,.7)); }
.qz-explanation-check { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:10px; color:#fff; background:var(--green); }
.qz-explanation-check .ico-svg { width:18px; height:18px; }
.qz-explanation-answer span:not(.qz-explanation-check) { display:block; margin-bottom:3px; color:var(--green); font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.qz-explanation-answer strong { display:block; color:var(--ink); font-size:16px; line-height:1.45; }
.qz-explanation-question { margin:16px 0 12px; color:var(--ink-soft); font-size:14px; font-weight:600; line-height:1.5; }
.qz-explanation-content { padding:17px 18px; border-left:4px solid var(--brand); border-radius:0 12px 12px 0; background:var(--bg); color:var(--ink); font-size:16px; line-height:1.65; }
.qz-explanation-content-title { display:block; margin-bottom:6px; color:var(--brand); font-size:12px; font-weight:800; letter-spacing:.04em; }
.qz-explanation-close { position:absolute; top:15px; right:15px; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:50%; color:var(--ink-soft); background:var(--bg); cursor:pointer; }
.qz-explanation-close:hover { color:var(--red); background:var(--red-soft); }
.quiz-end { text-align: center; max-width: 520px; }
.quiz-end h1 { font-size: 32px; }
.quiz-end-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 700px) { .qz-opts li { font-size: 15px; padding: 12px 14px; } .qz-let { width: 28px; height: 28px; font-size: 13px; } .qz-explanation-ov { padding:14px; } .qz-explanation-card { padding:24px 20px; } .qz-explanation-answer { padding:13px; } .qz-explanation-answer strong { font-size:14px; } }

.qopt { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.qopt input[type=radio], .qopt input[type=checkbox] { width: auto; margin: 0; flex: none; }
.qopt .qopt-txt { margin: 0; }
.qopt .qopt-del { flex: none; }

@media (max-width: 700px) {
  .present-stage { padding: 24px 16px; }
  .present-nav { width: 44px; height: 44px; font-size: 24px; }
  .present-nav.prev { left: 8px; } .present-nav.next { right: 8px; }
  .sl-title { font-size: 24px; } .present-stage .sl-title { font-size: 26px; }
  .sl-obj, .sl-intro, .sl-points { font-size: 15px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 30; width: var(--sidebar-w); max-width: 82vw; height: 100vh;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim.show { display: block; }
  .panels { grid-template-columns: 1fr; }
  /* padding bas = hauteur de la barre d'onglets + zone home iPhone */
  .content { padding: 8px 16px calc(80px + env(safe-area-inset-bottom)); }
  .topbar { padding: 14px 16px; gap: 12px; }
}
.menu-toggle { display: none; }
.sidebar-scrim { position: fixed; inset: 0; background: rgba(20,26,40,.45); z-index: 25; display: none; }

/* ============================ Barre d'onglets (mobile) ============================ */
.botnav { display: none; }
.plus-sheet, .sheet-scrim { display: none; }
@media (max-width: 900px) {
  .botnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    gap: 2px; padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -3px 16px rgba(20, 30, 60, .06);
  }
  .plus-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
    background: var(--card); border-radius: 22px 22px 0 0; max-height: 82vh; overflow-y: auto;
    padding: 6px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(101%); transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    box-shadow: 0 -10px 34px rgba(20, 30, 60, .20);
  }
  .plus-sheet.open { transform: translateY(0); }
  .sheet-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(20, 26, 40, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sheet-scrim.show { opacity: 1; pointer-events: auto; }
}
.botnav-item {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px 2px; font: inherit;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.botnav-ic { display: grid; place-items: center; padding: 4px 16px; border-radius: 999px; transition: background .15s, color .15s; }
.botnav-ic .ico-svg { width: 23px; height: 23px; }
.botnav-lab { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botnav-item.active { color: var(--brand); }
.botnav-item.active .botnav-ic { background: var(--brand-soft); }
.botnav-item:active .botnav-ic { transform: scale(.92); }

.sheet-handle { width: 42px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 16px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 6px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); text-align: center;
}
.sheet-item .sheet-ic { display: grid; place-items: center; color: var(--ink-soft); }
.sheet-item .sheet-ic .ico-svg { width: 24px; height: 24px; }
.sheet-item.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.sheet-item.active .sheet-ic { color: var(--brand); }
.sheet-item:active { background: var(--bg); }
.sheet-actions { border-top: 1px solid var(--line); padding-top: 10px; }
.sheet-line { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 8px; border: none; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); border-radius: 12px; }
.sheet-line .sheet-ic .ico-svg { width: 20px; height: 20px; }
.sheet-line.danger { color: var(--red); }
.sheet-line:active { background: var(--bg); }

@media (max-width: 560px) {
  .topbar { gap: 10px; }
  .topbar-spacer { display: none; }
  .search-wrap { flex: 1 1 auto; min-width: 0; }
  .user-chip > div:not(.avatar) { display: none; }
  .page-title { font-size: 20px; margin: 6px 2px 16px; }
}

/* =========================================================================
   RESPONSIVE Phase 2 — écrans de consultation
   ========================================================================= */

/* Tableau → cartes empilées sur téléphone. Activé par la classe .tbl-cards ;
   chaque <td> porte un data-label affiché à gauche de sa valeur. */
@media (max-width: 640px) {
  .tbl-cards, .tbl-cards tbody { display: block; }
  .tbl-cards thead { display: none; }
  .tbl-cards tbody { display: flex; flex-direction: column; gap: 10px; }
  .tbl-cards tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); padding: 6px 14px; }
  .tbl-cards tbody tr:hover { background: var(--card); }
  .tbl-cards tr.clickable:active { background: var(--bg); }
  /* flow-root = contient le libellé flottant ; overflow-wrap = les valeurs
     longues et insécables (email, SIRET, URL) reviennent à la ligne au lieu de
     déborder l'écran. Bloc (pas flex) = supporte n'importe quel contenu de cellule. */
  .tbl-cards td { display: flow-root; width: auto; padding: 8px 0; border: none; border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; word-break: break-word; }
  .tbl-cards tr td:last-child { border-bottom: none; }
  .tbl-cards td::before { content: attr(data-label); float: left; margin-right: 14px; max-width: 45%; font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; }
  .tbl-cards td.r { text-align: right; }
  /* La 1re cellule (identifiant) fait office de titre de carte */
  .tbl-cards td:first-child { font-size: 15px; padding-top: 3px; }
  /* Colonne d'actions : icônes groupées à droite (certaines listes n'ont pas
     de clic sur la ligne, il faut garder l'accès aux actions). */
  .tbl-cards td.row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 11px; }
  .tbl-cards td.row-actions::before { content: none; }
}

/* Consultation seule sur mobile : on masque tout ce qui crée / modifie / supprime.
   On garde : naviguer, ouvrir, consulter, télécharger. */
@media (max-width: 640px) {
  .page-head .page-actions:not(.cal-nav) { display: none; }   /* boutons « + Nouveau… » */
  .ses-hero .page-actions { display: none; }                  /* Modifier / Générer (fiche session) */
  .hide-actions-mobile td.row-actions { display: none; }      /* actions des listes d'entités */
  .expl-actions { display: none; }                            /* Nouveau dossier / Déposer */
  .det-sec-head .btn, .det-sec-head .btn-sm { display: none; }/* créer/lier (onglet Finances…) */
  .icon-mini.danger,                                          /* supprimer (partout) */
  .icon-mini[data-edit], .icon-mini[data-menu], .icon-mini[data-hab], .icon-mini[data-cata],
  .expl-x [data-dmove], .expl-x [data-docdel], .expl-x [data-dren], .expl-x [data-ddel] { display: none; }
}

/* Filtres : passage à la ligne propre sur mobile */
@media (max-width: 640px) {
  .filters { flex-wrap: wrap; }
  .filters select, .filters .search-inline { flex: 1 1 100%; max-width: none; min-width: 0; }
  .filters .search-inline input { width: 100%; }
  .filters-count { margin-left: 0; width: 100%; }
}

/* Tableau de bord */
@media (max-width: 640px) {
  .grid-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .content { padding-top: 4px; }
}

/* Page Session (hero + onglets + méta) */
@media (max-width: 700px) {
  .ses-hero-top { flex-direction: column; }
  .ses-hero .page-actions { width: 100%; }
  .ses-hero .page-actions .btn { flex: 1 1 auto; min-width: 0; }
  .ses-nom { font-size: 22px; }
  /* Onglets défilables horizontalement plutôt que serrés/coupés */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; white-space: nowrap; }
}

/* Fiche formation / détails */
@media (max-width: 560px) {
  .fdet-nom { font-size: 20px; }
  .det-sec-head { flex-wrap: wrap; gap: 6px; }
}

/* Conteneur à défilement horizontal pour un tableau qui ne peut pas devenir carte
   (ex. lignes d'un devis/facture dans la modale détail). */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll > .tbl { min-width: 380px; }

/* Modales : moins de marges internes sur téléphone */
@media (max-width: 560px) {
  .modal-ov { padding: 12px 8px; }
  .modal { padding: 20px 16px; border-radius: 16px; }
  .modal h2 { font-size: 18px; }
  .dv-paper { padding: 12px; }
  .doc-totals { max-width: none; }
}

/* Planning — vue agenda (mobile) : liste de sessions cliquables */
.cal-agenda-card { padding: 8px !important; }
.agenda { display: flex; flex-direction: column; }
.agenda-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 14px 8px; cursor: pointer; font: inherit; color: var(--ink);
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item:active { background: var(--bg); border-radius: 12px; }
.ag-date { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; background: var(--brand-soft); border-radius: 12px; }
.ag-date b { font-size: 20px; font-weight: 800; color: var(--brand); line-height: 1; }
.ag-date span { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; margin-top: 2px; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ag-title { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.ag-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ag-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ag-chev { flex: none; color: var(--muted); font-size: 24px; line-height: 1; }

/* Planning : grille du mois resserrée pour rester lisible sur téléphone */
@media (max-width: 560px) {
  .cal-dow, .cal-body { gap: 3px; }
  .cal-cell { min-height: 56px; padding: 4px 3px; gap: 2px; border-radius: 8px; }
  .cal-num { font-size: 11px; }
  .cal-ev { font-size: 9px; padding: 2px 4px; border-radius: 4px; }
  .cal-more { font-size: 9px; }
  .cal-dow div { font-size: 10px; }
  .cal-label { min-width: 0; font-size: 14px; }
  .cal-nav { gap: 6px; }
}

/* ---------- Aide aux balises de modèles ----------
   Colonnes larges et libellé SOUS la balise : en disposition côte à côte, les
   descriptions se cassaient sur 3-4 lignes et la liste devenait illisible. */
.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.bal-grp { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.bal-titre {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.bal-row { display: block; margin-bottom: 10px; }
.bal-row:last-child { margin-bottom: 0; }
.bal-row span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.bal-tag {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: var(--brand-soft); color: var(--brand); padding: 3px 9px; border-radius: 6px;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: border-color .15s, transform .1s;
}
.bal-tag:hover { border-color: var(--brand); }
.bal-tag:active { transform: translateY(1px); }

/* ---------- Page session (plein écran, à onglets) ---------- */
/* ---------- En-tête de la page session ---------- */
.ses-back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.ses-back:hover { color: var(--brand); }
/* la flèche pointe vers la gauche (icône « logout » réutilisée) */
.ses-back .ico-svg { width: 17px; height: 17px; }

.ses-hero {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px 24px; margin-bottom: 20px;
}
.ses-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ses-hero-txt { min-width: 0; flex: 1; }
.ses-hero-sur { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ses-dossier { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.ses-nom { margin: 8px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.ses-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ses-hero .page-actions { flex: none; }

.ses-meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
}
.ses-meta .ico-svg { color: var(--muted); }

@media (max-width: 700px) {
  .ses-hero { padding: 18px; }
  .ses-nom { font-size: 21px; }
  .ses-hero .page-actions { width: 100%; }
  .ses-hero .page-actions .btn { flex: 1; min-width: 0; }
}

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.info-grid > div { background: var(--bg); border-radius: var(--radius-sm); padding: 11px 14px; }
.info-grid span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.info-grid b { font-size: 14px; }

/* ---------- Explorateur de dossiers ---------- */
.expl-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.fil-ariane { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.fil-sep { color: var(--muted); }
.fil-cur { font-weight: 700; }
.expl-actions { display: flex; gap: 8px; flex: none; }

.expl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.expl-dir {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.expl-dir:hover { border-color: var(--brand); background: var(--brand-soft); }
.expl-ic { display: flex; flex: none; position: relative; }
.expl-ic .ico-svg { width: 22px; height: 22px; color: var(--brand); }
.expl-doc .expl-ic .ico-svg { color: var(--muted); }
.expl-lock {
  position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--red); border: 2px solid var(--card);
}
.expl-lock .ico-svg { width: 8px; height: 8px; color: #fff; }
.expl-txt { flex: 1; min-width: 0; }
.expl-nom { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expl-info { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expl-x { display: flex; gap: 5px; flex: none; opacity: 0; transition: opacity .15s; }
.expl-dir:hover .expl-x, .expl-dir:focus-within .expl-x { opacity: 1; }
@media (hover: none) { .expl-x { opacity: 1; } }

/* ---------- Menu contextuel (clic droit) ---------- */
.ctx-menu {
  position: fixed; z-index: 400; min-width: 210px; padding: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: none; border-radius: 8px; background: none;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  text-align: left; cursor: pointer;
}
.ctx-item:hover { background: var(--brand-soft); color: var(--brand); }
.ctx-item .ico-svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.ctx-item:hover .ico-svg { color: var(--brand); }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger .ico-svg { color: var(--red); }
.ctx-item.danger:hover { background: var(--red-soft); color: var(--red); }

/* ---------- Glisser-déposer dans l'explorateur ---------- */
.expl-dir[draggable="true"] { cursor: grab; }
.expl-dir.drag { opacity: .45; }
.expl-dir.drop { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.fil-ariane .drop { background: var(--brand-soft); border-radius: 6px; box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Formulaire en sections (éditeur de session) ---------- */
.fset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 16px; }
.fset-h { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.fset > label:last-child, .fset > .form-row:last-child > label { margin-bottom: 0; }
.fset-sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 4px 0 10px; }

/* Matin / après-midi : le libellé de la demi-journée, puis « De » et « à » */
.horaires-grid { display: grid; grid-template-columns: 92px 1fr 1fr; gap: 10px 12px; align-items: center; }
.horaires-grid .hg-lab { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.horaires-grid label { margin-bottom: 0; display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.horaires-grid label input, .horaires-grid label select { margin-top: 0; }
@media (max-width: 560px) {
  .horaires-grid { grid-template-columns: 1fr 1fr; }
  .horaires-grid .hg-lab { grid-column: 1 / -1; margin-top: 4px; }
}

/* ---------- Numéro de version (pied de la barre latérale) ---------- */
.app-version {
  margin-top: 10px; padding: 6px 14px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); opacity: .7; user-select: text;
}

/* ---------- Colonne « Rattaché à » ---------- */
.doc-lien { display: block; }
.doc-lien-sous { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
/* Emplacement réservé quand l'oeil n'a pas lieu d'être */
.icon-mini-vide { display: inline-block; width: var(--ctrl-h-sm); height: var(--ctrl-h-sm); flex: none; }

/* ---------- Fiche formation (modale) ---------- */
.fdet-hero { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.fdet-sur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fdet-nom { margin: 10px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.fdet-public { margin-top: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.fdet-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.fdet-chiffres > div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 13px; }
.fdet-chiffres span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.fdet-chiffres b { font-size: 14.5px; }

/* Le programme peut être long : il défile dans son propre cadre */
.fdet-modules { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.fdet-mod { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); transition: box-shadow .12s, opacity .12s; }
.fdet-mod.drag { opacity: .5; box-shadow: 0 6px 18px rgba(20,26,40,.15); }
.fdet-grip { flex: none; display: flex; color: var(--muted); cursor: grab; touch-action: none; }
.fdet-grip .ico-svg { width: 16px; height: 16px; transform: rotate(90deg); }
.fdet-mact { flex: none; display: flex; gap: 5px; opacity: 0; transition: opacity .12s; }
.fdet-mod:hover .fdet-mact { opacity: 1; }
@media (hover: none) { .fdet-mact { opacity: 1; } }
.fdet-num {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 800;
}
.fdet-mtitre { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.fdet-mcount { display: flex; gap: 5px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
/* Actions de contenu en tuiles alignées, plutôt qu'une rangée de boutons épars */
.act-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.act-tile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer; font: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s, transform .08s;
}
.act-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.act-tile:active { transform: translateY(1px); }
.act-ic {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.act-ic .ico-svg { width: 19px; height: 19px; }
.act-txt { min-width: 0; display: flex; flex-direction: column; }
.act-txt b { font-size: 14px; font-weight: 600; }
.act-txt span { font-size: 12px; color: var(--muted); margin-top: 1px; }
.act-tile.primary { background: var(--brand); border-color: var(--brand); }
.act-tile.primary .act-ic { background: rgba(255,255,255,.2); color: #fff; }
.act-tile.primary .act-txt b { color: #fff; }
.act-tile.primary .act-txt span { color: rgba(255,255,255,.85); }
.act-tile.primary:hover { background: var(--brand-dark); box-shadow: 0 4px 14px rgba(59,91,255,.32); }

/* Pied de la fiche : mêmes tuiles que « Contenu pédagogique » */
.fdet-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
/* Tuile destructive : icône rouge, survol rouge */
.act-tile.danger .act-ic { background: var(--red-soft); color: var(--red); }
.act-tile.danger .act-txt b { color: var(--red); }
.act-tile.danger:hover { border-color: var(--red); box-shadow: 0 2px 8px rgba(244,88,106,.18); }
@media (max-width: 560px) {
  .fdet-mod { flex-wrap: wrap; }
  .fdet-mcount { width: 100%; justify-content: flex-start; padding-left: 36px; }
}

/* ---------- Catalogue & tarifs d'un client ---------- */
.cc-table { max-height: 46vh; overflow-y: auto; }
.cc-head, .cc-row { display: grid; grid-template-columns: 1fr 150px 150px 150px; gap: 10px; align-items: center; }
.cc-head { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
.cc-row { padding: 8px 12px; border-radius: var(--radius-sm); }
.cc-row + .cc-row { margin-top: 4px; }
.cc-row:nth-child(even) { background: var(--bg); }
.cc-row.on { background: var(--brand-soft); }
.cc-nom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; min-width: 0; }
.cc-base { font-size: 13px; color: var(--muted); }
.cc-row input { --field-h: var(--ctrl-h-sm); --field-fs: 13px; --field-mt: 0; text-align: right; }
.fprice.nego { color: var(--brand); }
@media (max-width: 820px) {
  .cc-head { display: none; }
  .cc-row { grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 12px; }
  .cc-nom, .cc-base { grid-column: 1 / -1; }
  .cc-row input { width: 100%; }
  .cc-row input::placeholder { font-size: 12px; }
}

/* ---------- Lanceur QCM : cases modules ---------- */
.qr-mods { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 7px; }
.qr-mods .chk { margin-bottom: 0; padding: 5px 4px; }
.qr-mods .qr-all { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; font-weight: 700; }

/* ---------- Popup fin de module (présentation) ---------- */
.pres-prompt { position: absolute; inset: 0; background: rgba(20,26,40,.55); display: grid; place-items: center; z-index: 10; }
.pres-prompt-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 30px; max-width: 420px; width: calc(100% - 40px); text-align: center; }
.pp-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); }
.pp-ic .ico-svg { width: 26px; height: 26px; }
.pres-prompt-card h3 { margin: 0 0 8px; font-size: 19px; }
.pres-prompt-card p { margin: 0 0 20px; color: var(--ink-soft); line-height: 1.5; }
.pp-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .pp-actions { flex-direction: column-reverse; } .pp-actions .btn { width: 100%; } }

/* ---------- Écran « préparez-vous » avant le QCM ---------- */
.quiz-ready { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 20px; }
.qr-phrase { font-size: clamp(20px, 3.4vw, 30px); font-weight: 700; color: var(--ink); max-width: 640px; line-height: 1.3; }
.qr-count {
  width: clamp(120px, 20vw, 180px); height: clamp(120px, 20vw, 180px); border-radius: 50%;
  display: grid; place-items: center; font-size: clamp(56px, 10vw, 92px); font-weight: 800; color: var(--brand);
  background: var(--brand-soft); animation: qrpulse 1s ease-in-out infinite;
}
@keyframes qrpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.qr-sub { color: var(--muted); font-weight: 600; font-size: 15px; }

/* =====================================================================
   ESPACE CANDIDAT v2.25 — application ludique (accueil, parcours, profil,
   paramètres), quiz gamifié et écrans de résultat. Palette scopée pour un
   mode sombre réel.
   ===================================================================== */
.candidate-app2, .candidate-quiz, .candidate-result, .candidate-mc {
  --c-bg: #eef2fb; --c-surface: #ffffff; --c-ink: #1b2338; --c-ink2: #6b7690;
  --c-line: #e6ebf5; --c-primary: #4562f2; --c-teal: #1fc7b4; --c-coral: #ff6a6a;
  --c-amber: #f5a623; --c-chip: #eef1ff; --c-muted-bg: #f3f6fc;
  min-height: 100dvh; color: var(--c-ink);
  background: radial-gradient(120% 60% at 50% -10%, #e7edff 0%, transparent 55%), var(--c-bg) !important;
}
[data-theme="dark"] .candidate-app2, [data-theme="dark"] .candidate-quiz, [data-theme="dark"] .candidate-result, [data-theme="dark"] .candidate-mc {
  --c-bg: #0f1524; --c-surface: #182131; --c-ink: #e9edf6; --c-ink2: #9aa6be;
  --c-line: #26314a; --c-chip: #20293d; --c-muted-bg: #141d2c;
  --c-teal: #58cc02; /* vert Duolingo : éclatant sur fond sombre (défaut clair : #1fc7b4) */
  background: radial-gradient(120% 60% at 50% -10%, #1c2740 0%, transparent 55%), var(--c-bg) !important;
}
/* Sélection de réponse plus lumineuse en sombre (le mix 14 % reste trop discret). */
[data-theme="dark"] .quiz-opt.selected { background: color-mix(in srgb, var(--c-teal) 24%, var(--c-surface)); }

/* ---- structure ---- */
.candidate-app2 { display: flex; flex-direction: column; }
.candidate-hub2 { flex: 1; width: min(680px, 100%); margin: 0 auto; padding: 0 clamp(15px, 5vw, 26px) 118px; }
.cand-appbar { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 14px 2px 6px; position: sticky; top: 0; z-index: 6; }
/* Fond opaque derrière tout le titre (le contenu qui défile ne transparaît plus), fondu doux de 16 px sous la barre. */
.cand-appbar::before { content: ""; position: absolute; inset: -14px -30px -16px; background: var(--c-bg); -webkit-mask: linear-gradient(#000 calc(100% - 16px), transparent); mask: linear-gradient(#000 calc(100% - 16px), transparent); z-index: -1; pointer-events: none; }
.cand-appbar-title { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.cand-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; color: var(--c-ink2); }
.cand-brand .ico-svg { width: 20px; color: var(--c-primary); }
.cand-icon-btn { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--c-surface); color: var(--c-ink2); box-shadow: 0 4px 14px rgba(40,58,106,.08); cursor: pointer; }
.cand-icon-btn .ico-svg { width: 21px; }
.cand-icon-btn.cand-back { margin-left: 0; margin-right: 2px; }
.cand-back .ico-svg { transform: rotate(180deg); }

/* ---- héros / salutation ---- */
.cand-hero { padding: 8px 2px 14px; }
.cand-hero .cand-hi { font-size: clamp(27px, 7vw, 36px); font-weight: 800; letter-spacing: -.03em; display: block; }
.cand-hero > p { margin: 4px 0 0; color: var(--c-ink2); font-size: 15px; }
.cand-hero.slim { padding-top: 0; }
.cand-hero.slim p { font-size: 14px; }

/* ---- tuiles de stats ---- */
.cand-stat-wrap { margin-top: 16px; min-height: 20px; }
.cand-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cand-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 8px 20px rgba(40,58,106,.05); }
.cand-tile b { font-size: 20px; }
.cand-tile small { color: var(--c-ink2); font-size: 11px; }
.cand-tile-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; margin-bottom: 4px; }
.cand-tile-ic .ico-svg { width: 20px; }
.cand-tile-ic.xp { color: #4562f2; background: #e9edff; }
.cand-tile-ic.streak { color: #ff7d55; background: #ffeee6; }
.cand-tile-ic.tbadge { color: #b07d12; background: #f7ead0; }
[data-theme="dark"] .cand-tile-ic.xp { background: rgba(69,98,242,.18); }
[data-theme="dark"] .cand-tile-ic.streak { background: rgba(255,125,85,.16); }
[data-theme="dark"] .cand-tile-ic.tbadge { background: rgba(211,162,74,.16); }

/* ---- carte niveau (profil) ---- */
.cand-stat-wrap.profile { margin-top: 6px; }
.cand-level-card { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 12px; border-radius: 20px; background: linear-gradient(135deg, #4a60f3, #7b86f6); color: #fff; box-shadow: 0 16px 30px rgba(67,89,230,.28); }
.cand-level-ring { position: relative; flex: none; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--pct) * 1%), rgba(255,255,255,.28) 0); }
.cand-level-ring span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #4a60f3; font-weight: 900; font-size: 20px; }
.cand-level-info { flex: 1; min-width: 0; }
.cand-level-tag { font-size: 10px; font-weight: 900; letter-spacing: .1em; opacity: .85; }
.cand-level-info b { display: block; margin: 2px 0 8px; font-size: 15px; }
.cand-level-info small { color: rgba(255,255,255,.85); font-size: 11px; }
.cand-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.28); overflow: hidden; }
.cand-level-card .cand-bar i { display: block; height: 100%; border-radius: inherit; background: #fff; }

/* ---- logo header ---- */
.cand-logo { height: 30px; width: auto; max-width: 62%; object-fit: contain; object-position: left center; }
[data-theme="dark"] .cand-logo { filter: invert(1) brightness(1.9); }

/* ---- recherche ---- */
.cand-search { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 0 16px; height: 52px; border-radius: 16px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 8px 20px rgba(40,58,106,.05); cursor: text; }
.cand-search-ic { display: grid; place-items: center; flex: none; }
.cand-search-ic .ico-svg { width: 20px; color: var(--c-ink2); }
.cand-search input { flex: 1; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--c-ink); font: inherit; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; }
.cand-search input::placeholder { color: var(--c-ink2); }
.cand-search input::-webkit-search-decoration, .cand-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- objectif du jour ---- */
.cand-daily { margin-top: 14px; }
.cand-daily-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-radius: 20px; text-align: left; cursor: pointer; color: #fff; background: linear-gradient(135deg, #1fc7b4, #37d9c9); box-shadow: 0 16px 30px rgba(31,199,180,.28); }
.cand-daily-card.done { background: linear-gradient(135deg, #4a60f3, #7b86f6); box-shadow: 0 16px 30px rgba(67,89,230,.28); }
.cand-daily-ring { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--pct) * 1%), rgba(255,255,255,.3) 0); }
.cand-daily-ring i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #1fc7b4; font-style: normal; font-weight: 800; font-size: 13px; }
.cand-daily-card.done .cand-daily-ring i { background: #4a60f3; }
.cand-daily-ring i .ico-svg { width: 20px; }
.cand-daily-txt { flex: 1; min-width: 0; }
.cand-daily-txt small { font-size: 10px; font-weight: 900; letter-spacing: .08em; opacity: .9; }
.cand-daily-txt b { display: block; font-size: 16px; margin: 2px 0; }
.cand-daily-txt em { font-style: normal; font-size: 12px; opacity: .9; }
.cand-daily-card > .ico-svg { width: 22px; flex: none; opacity: .9; }

/* ---- viewer de fiches ---- */
/* Le viewer est un overlay ajouté au <body>, hors des conteneurs .candidate-* :
   il doit donc porter lui-même toute la palette (clair + sombre), sinon les
   couleurs (titres, tableaux, encadrés) ne se résolvent pas. */
.cand-viewer {
  --c-bg: #eef2fb; --c-surface: #ffffff; --c-ink: #1b2338; --c-ink2: #6b7690;
  --c-line: #e6ebf5; --c-primary: #4562f2; --c-teal: #1fc7b4; --c-coral: #ff6a6a;
  --c-amber: #f5a623; --c-chip: #eef1ff; --c-muted-bg: #f3f6fc; --pacc: #4562f2;
}
[data-theme="dark"] .cand-viewer {
  --c-bg: #0f1524; --c-surface: #182131; --c-ink: #e9edf6; --c-ink2: #9aa6be;
  --c-line: #26314a; --c-chip: #20293d; --c-muted-bg: #141d2c; --pacc: #6f86f5;
}
.cand-viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--c-bg, #eef2fb); }
.cand-viewer-bar { display: flex; align-items: center; gap: 12px; padding: 12px clamp(14px, 4vw, 24px); border-bottom: 1px solid var(--c-line); background: var(--c-surface); }
.cand-viewer-bar b { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-ink); }
.cand-viewer-close { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--c-muted-bg); color: var(--c-ink); cursor: pointer; }
.cand-viewer-close .ico-svg { width: 22px; }
.cand-viewer-body { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.cand-viewer-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.cand-viewer-body.cand-viewer-scroll { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cand-fiche-text { max-width: 720px; margin: 0 auto; padding: clamp(20px, 6vw, 40px) clamp(18px, 6vw, 30px) 64px; font-size: 16.5px; line-height: 1.72; color: var(--c-ink); white-space: normal; word-wrap: break-word; }
/* Titre de section : gros, marqué, avec barre d'accent colorée. */
.cand-fiche-text h2 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 34px 0 14px; padding-left: 14px; border-left: 5px solid var(--pacc, var(--c-primary)); }
.cand-fiche-text h2:first-child { margin-top: 4px; }
/* Sous-titre : coloré, avec une pastille. */
.cand-fiche-text h3 { font-size: 18.5px; font-weight: 800; margin: 24px 0 8px; color: var(--pacc, var(--c-primary)); display: flex; align-items: center; gap: 9px; }
.cand-fiche-text h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pacc, var(--c-primary)); flex: none; }
.cand-fiche-text h4 { font-size: 13px; font-weight: 900; margin: 18px 0 6px; color: var(--c-ink2); text-transform: uppercase; letter-spacing: .06em; }
.cand-fiche-text p { margin: 10px 0; }
.cand-fiche-text ul, .cand-fiche-text ol { margin: 10px 0 16px; padding: 0; list-style: none; }
.cand-fiche-text ol { counter-reset: fli; }
.cand-fiche-text li { position: relative; margin: 9px 0; padding-left: 30px; }
.cand-fiche-text ul > li::before { content: ""; position: absolute; left: 6px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pacc, var(--c-primary)); opacity: .85; }
.cand-fiche-text ol > li { counter-increment: fli; }
.cand-fiche-text ol > li::before { content: counter(fli); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--pacc, var(--c-primary)) 15%, var(--c-surface)); color: var(--pacc, var(--c-primary)); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.cand-fiche-text strong { font-weight: 800; color: var(--c-ink); }
.cand-fiche-text hr { border: 0; border-top: 1px solid var(--c-line); margin: 22px 0; }
/* Encadrés : À retenir (ambre) · Exemple (bleu) · Attention (rouge), avec icône. */
.fiche-callout { --cc: var(--c-amber); margin: 18px 0; padding: 14px 16px 14px 15px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--cc) 40%, var(--c-line)); border-left: 4px solid var(--cc); background: color-mix(in srgb, var(--cc) 11%, var(--c-surface)); }
.fiche-callout.is-ex { --cc: var(--c-primary); }
.fiche-callout.is-warn { --cc: var(--c-coral); }
.fiche-callout.is-ok { --cc: var(--c-teal); }
.fiche-callout.is-info { --cc: var(--c-primary); }
.fiche-callout > b { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--cc) 62%, #000); margin-bottom: 6px; }
.fiche-callout .fcx-ic { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--cc); color: #fff; }
.fiche-callout .fcx-ic svg { width: 14px; height: 14px; }
.fiche-callout > div { font-size: 15.5px; line-height: 1.65; }
/* Panneaux colorés :::type (success / info / warn / danger / tip / note) */
.fiche-panel { --cc: var(--c-primary); margin: 18px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--cc) 35%, var(--c-line)); border-left: 5px solid var(--cc); background: color-mix(in srgb, var(--cc) 9%, var(--c-surface)); }
.fiche-panel.is-ok { --cc: var(--c-teal); }
.fiche-panel.is-info { --cc: var(--c-primary); }
.fiche-panel.is-warn { --cc: var(--c-amber); }
.fiche-panel.is-danger { --cc: var(--c-coral); }
.fiche-panel.is-tip { --cc: #8a6cf0; }
.fiche-panel.is-note { --cc: var(--c-amber); }
.fiche-panel > b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; color: color-mix(in srgb, var(--cc) 62%, #000); margin-bottom: 6px; }
.fiche-panel .fpx-ic { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--cc); color: #fff; }
.fiche-panel .fpx-ic svg { width: 15px; height: 15px; }
.fiche-panel .fpx-body > :first-child { margin-top: 0; }
.fiche-panel .fpx-body > :last-child { margin-bottom: 0; }
/* Pastilles de couleur en ligne {{couleur|texte}} */
.f-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1.5; white-space: nowrap; color: #fff; }
.f-pill.f-green { background: var(--c-teal); }
.f-pill.f-red { background: var(--c-coral); }
.f-pill.f-orange { background: var(--c-amber); color: #4a3a12; }
.f-pill.f-blue { background: var(--c-primary); }
.f-pill.f-purple { background: #8a6cf0; }
.f-pill.f-teal { background: var(--c-teal); }
.f-pill.f-gray { background: var(--c-muted-bg); color: var(--c-ink2); border: 1px solid var(--c-line); }
/* Images dans une fiche */
.fiche-img { margin: 18px 0; text-align: center; }
.fiche-img img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--c-line); }
.fiche-img figcaption { margin-top: 7px; font-size: 12.5px; color: var(--c-ink2); }

/* ---- Classement / niveaux — vue ADMIN (fiche session) ---- */
.rank-grid { display: grid; margin-top: 6px; }
.rank-row { display: grid; grid-template-columns: 40px 1fr 74px 62px 58px; gap: 10px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rank-row:last-child { border-bottom: 0; }
.rank-row.rank-head { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rank-pos { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--btn-bg); color: var(--ink-soft); font-weight: 800; font-size: 12px; }
.rank-pos.rank-p1 { background: #f5c518; color: #5a4500; }
.rank-pos.rank-p2 { background: #ccd3dd; color: #33383f; }
.rank-pos.rank-p3 { background: #e0a06a; color: #4a2c10; }
.rank-name { font-weight: 700; color: var(--ink); }
.rank-lvl { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.rank-xp { font-weight: 800; color: var(--brand); }
.rank-runs { color: var(--muted); }

/* ---- Classement — vue CANDIDAT (profil) ---- */
.cand-rank-sess { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--c-ink2); margin: 10px 2px 6px; text-transform: uppercase; }
.cand-rank-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 14px; background: var(--c-surface); margin-bottom: 8px; box-shadow: 0 4px 12px rgba(20,16,40,.06); }
.cand-rank-row.me { box-shadow: 0 0 0 2px var(--c-primary); }
.cand-rank-pos { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-muted-bg); color: var(--c-ink2); font-weight: 800; font-size: 13px; }
.cand-rank-pos.rank-p1 { background: #f5c518; color: #5a4500; }
.cand-rank-pos.rank-p2 { background: #ccd3dd; color: #33383f; }
.cand-rank-pos.rank-p3 { background: #e6a26a; color: #5a3010; }
.cand-rank-name { font-weight: 700; color: var(--c-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-rank-name em { font-style: normal; color: var(--c-primary); font-weight: 800; font-size: 12px; }
.cand-rank-lvl { padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c-primary) 14%, var(--c-surface)); color: var(--c-primary); font-size: 12px; font-weight: 800; white-space: nowrap; }
.cand-rank-xp { font-weight: 800; color: var(--c-ink2); font-size: 13px; white-space: nowrap; }
.cand-fiche-text .fiche-table { margin: 16px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-line); border-radius: 14px; }
.cand-fiche-text table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cand-fiche-text thead th { text-align: left; font-weight: 800; color: #fff; background: var(--pacc, var(--c-primary)); padding: 10px 12px; white-space: nowrap; }
.cand-fiche-text thead th:not(:last-child) { border-right: 1px solid color-mix(in srgb, #fff 25%, var(--pacc, var(--c-primary))); }
.cand-fiche-text tbody td { padding: 9px 12px; border-top: 1px solid var(--c-line); vertical-align: top; }
.cand-fiche-text tbody td:not(:last-child) { border-right: 1px solid var(--c-line); }
.cand-fiche-text tbody tr:nth-child(even) { background: color-mix(in srgb, var(--pacc, var(--c-primary)) 5%, var(--c-surface)); }
/* Cartes de fiches dans l'onglet Cours */
.cand-fiche-card { display: grid; grid-template-columns: 52px 1fr 22px; gap: 14px; align-items: center; width: 100%; text-align: left; margin: 0 0 12px; padding: 15px 16px; border: 0; border-radius: 18px; background: var(--c-surface); box-shadow: 0 6px 18px rgba(20,16,40,.08); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.cand-fiche-card:active { transform: scale(.99); }
.cand-fiche-card .cfc-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: color-mix(in srgb, var(--fc) 14%, var(--c-surface)); color: var(--fc); }
.cand-fiche-card .cfc-ic .ico-svg { width: 26px; }
.cand-fiche-card .cfc-ic .cfc-emoji { font-size: 27px; line-height: 1; }
.cand-fiche-card .cfc-txt { min-width: 0; }
.cand-fiche-card .cfc-txt b { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; color: var(--c-ink); }
.cand-fiche-card .cfc-txt small { color: var(--c-ink2); font-size: 12.5px; }
.cand-fiche-card .cfc-go { display: grid; place-items: center; color: var(--fc); }
.cand-fiche-card .cfc-go .ico-svg { width: 20px; }

/* ---------- Podcasts (onglet Cours candidat) ---------- */
.cand-seg { display: flex; gap: 6px; margin: 4px 0 18px; padding: 5px; border-radius: 16px; background: var(--c-muted-bg); }
.cand-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; color: var(--c-ink2); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; transition: background .15s, color .15s; }
.cand-seg button .ico-svg { width: 19px; height: 19px; }
.cand-seg button.active { background: var(--c-surface); color: var(--c-primary); box-shadow: 0 4px 12px rgba(20,16,40,.08); }
.cand-seg-n:not(:empty) { min-width: 21px; padding: 1px 7px; border-radius: 999px; background: var(--c-primary); color: #fff; font-size: 12px; line-height: 19px; }
.cand-pod-hint { margin: -4px 0 14px; color: var(--c-ink2); font-size: 13px; }
.pod-card { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; width: 100%; text-align: left; margin: 0 0 12px; padding: 13px 16px 13px 13px; border: 2px solid transparent; border-radius: 18px; background: var(--c-surface); box-shadow: 0 6px 18px rgba(20,16,40,.08); cursor: pointer; font: inherit; color: var(--c-ink); transition: transform .1s, border-color .15s; }
.pod-card:active { transform: scale(.99); }
.pod-card.is-current { border-color: color-mix(in srgb, var(--fc) 55%, transparent); }
.pod-art { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: color-mix(in srgb, var(--fc) 14%, var(--c-surface)); }
.pod-art .cfc-emoji { font-size: 27px; line-height: 1; }
.pod-art-btn { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 27px; height: 27px; border: 3px solid var(--c-surface); border-radius: 50%; background: var(--fc); color: #fff; }
.pod-art-btn .ico-svg { width: 13px; height: 13px; }
.pod-info { min-width: 0; }
.pod-info b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pod-info small { display: block; margin-top: 2px; color: var(--c-ink2); font-size: 12.5px; }
.pod-card.is-done .pod-info small { color: var(--c-teal); font-weight: 700; }
.pod-card.is-current .pod-info small { color: var(--fc); font-weight: 700; }
.pod-bar { display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--c-muted-bg); overflow: hidden; }
.pod-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fc); transition: width .4s linear; }
.pod-card.is-done:not(.is-current) .pod-bar i { background: var(--c-teal); }

/* Le lecteur vit sur <body>, hors des conteneurs .candidate-* : il porte sa palette. */
.pc-ui {
  --c-bg: #eef2fb; --c-surface: #ffffff; --c-ink: #1b2338; --c-ink2: #6b7690;
  --c-line: #e6ebf5; --c-primary: #4562f2; --c-muted-bg: #f3f6fc; --fc: #4562f2;
  color: var(--c-ink);
}
[data-theme="dark"] .pc-ui { --c-bg: #0f1524; --c-surface: #182131; --c-ink: #e9edf6; --c-ink2: #9aa6be; --c-line: #26314a; --c-muted-bg: #141d2c; }
#pc-audio { display: none; }
.pc-mini { position: fixed; z-index: 21; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; max-width: 660px; margin: 0 auto; padding: 8px 8px 8px 8px; border-radius: 18px; background: var(--c-surface); box-shadow: 0 10px 30px rgba(20,24,50,.22); overflow: hidden; }
.pc-mini.has-nav { bottom: calc(76px + env(safe-area-inset-bottom)); }
.pc-mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c-muted-bg); }
.pc-mini-bar i { display: block; height: 100%; width: 0; background: var(--fc); transition: width .45s linear; }
.pc-mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pc-mini-art { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--fc) 16%, var(--c-surface)); font-size: 22px; }
.pc-mini-txt { min-width: 0; }
.pc-mini-txt b { display: block; font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-mini-txt small { color: var(--c-ink2); font-size: 12px; font-variant-numeric: tabular-nums; }
.pc-mini-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--fc); color: #fff; cursor: pointer; }
.pc-mini-btn .ico-svg { width: 20px; height: 20px; }
.pc-mini-x { width: 36px; height: 36px; background: none; color: var(--c-ink2); }
.pc-mini-x .ico-svg { width: 18px; height: 18px; }
body.pc-mini-on .candidate-hub2 { padding-bottom: 190px; }

.pc-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,16,32,.45); }
.pc-sheet-card { width: min(560px, 100%); max-height: 100dvh; overflow-y: auto; padding: 14px max(22px, env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); border-radius: 26px 26px 0 0; background: var(--c-surface); text-align: center; }
.pc-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; color: var(--c-ink2); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pc-icon-sp { width: 44px; }
.pc-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--c-ink); cursor: pointer; }
.pc-icon .ico-svg { width: 24px; height: 24px; }
.pc-icon.big .ico-svg { width: 32px; height: 32px; }
.pc-icon:disabled { opacity: .3; cursor: default; }
.pc-sheet-top .pc-icon { background: var(--c-muted-bg); }
.pc-cover { position: relative; display: grid; place-items: center; width: min(250px, 62vw); aspect-ratio: 1; margin: 0 auto 20px; border-radius: 28px; background: linear-gradient(145deg, color-mix(in srgb, var(--fc) 80%, #fff), var(--fc)); box-shadow: 0 18px 40px color-mix(in srgb, var(--fc) 35%, transparent); }
.pc-cover .cfc-emoji { font-size: min(96px, 24vw); line-height: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.18)); }
.pc-cover > .ico-svg { position: absolute; right: 16px; bottom: 16px; width: 26px; height: 26px; color: rgba(255,255,255,.85); }
.pc-title { margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.pc-sub { margin: 0 0 18px; color: var(--c-ink2); font-size: 13.5px; }
.pc-seek { margin: 0 2px 8px; }
.pc-seek input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 10px 0 6px; border-radius: 6px; background: linear-gradient(to right, var(--fc) var(--pct, 0%), var(--c-muted-bg) var(--pct, 0%)); cursor: pointer; }
.pc-seek input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--fc); border: 3px solid var(--c-surface); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pc-seek input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--fc); border: 3px solid var(--c-surface); }
.pc-times { display: flex; justify-content: space-between; color: var(--c-ink2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-ctrl { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 3vw, 16px); margin: 8px 0 10px; }
.pc-play { display: grid; place-items: center; width: 74px; height: 74px; flex: none; border: 0; border-radius: 50%; background: var(--fc); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--fc) 40%, transparent); cursor: pointer; }
.pc-play .ico-svg { width: 32px; height: 32px; }
.pc-play:active, .pc-mini-btn:active { transform: scale(.95); }
.pc-extra { display: flex; justify-content: center; }
.pc-rate { min-width: 64px; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--c-muted-bg); color: var(--c-ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.pc-desc { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--c-line); color: var(--c-ink2); font-size: 14.5px; line-height: 1.55; text-align: left; white-space: pre-line; }
.pc-spin { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: pc-spin .8s linear infinite; }
@keyframes pc-spin { to { transform: rotate(360deg); } }

/* Admin : gestion des podcasts */
.pod-rows .icon-mini:disabled { opacity: .35; cursor: default; }
.pod-rows .pod-up .ico-svg { transform: rotate(180deg); }
#pod-preview { width: 100%; margin-top: 12px; }
.pod-upload { margin: 6px 0 4px; }
.pod-upload-bar { height: 8px; border-radius: 8px; background: var(--brand-soft, #eef1ff); overflow: hidden; }
.pod-upload-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand, #4562f2); transition: width .2s; }
.pod-upload small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
/* Rubriques de l'onglet Cours (catégories de fiches). */
.cand-res-group + .cand-res-group { margin-top: 20px; }
.cand-res-cat { margin: 4px 4px 12px; font-size: 12.5px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: var(--c-ink2, #6b7690); }
/* Gestionnaire de fiches de synthèse (admin) */
.fic-rows { display: grid; gap: 2px; margin: 4px 0 2px; }
.fic-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--c-line); }
.fic-row:last-child { border-bottom: 0; }
.fic-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c-muted-bg); color: var(--c-ink2); }
.fic-ic .ico-svg { width: 18px; }
.fic-txt { min-width: 0; }
.fic-txt b { display: block; font-size: 14px; }
.fic-txt small { color: var(--c-ink2); font-size: 12px; }
.fic-act { display: flex; gap: 6px; }

/* ---- carte objectif (quest) ---- */
.cand-quest { display: flex; align-items: center; gap: 14px; width: 100%; margin: 18px 0; padding: 16px; border: 0; border-radius: 20px; text-align: left; cursor: pointer; color: #fff; background: linear-gradient(135deg, #1fc7b4, #37d9c9); box-shadow: 0 16px 30px rgba(31,199,180,.28); }
.cand-quest-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 15px; background: rgba(255,255,255,.22); }
.cand-quest-ic .ico-svg { width: 24px; }
.cand-quest-txt { flex: 1; min-width: 0; }
.cand-quest-txt small { font-size: 10px; font-weight: 900; letter-spacing: .09em; opacity: .9; }
.cand-quest-txt b { display: block; font-size: 17px; margin: 2px 0; }
.cand-quest-txt em { font-style: normal; font-size: 12px; opacity: .9; }
.cand-quest > .ico-svg { width: 22px; flex: none; }

/* ---- carte évaluation en direct ---- */
.cand-live-card { display: grid; grid-template-columns: 46px 1fr; gap: 12px; margin: 18px 0; padding: 18px; border-radius: 20px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 10px 24px rgba(40,58,106,.06); }
.cand-live-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #ff7d77, #ffab7d); }
.cand-live-ic .ico-svg { width: 22px; }
.cand-live-head span { color: #f27570; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.cand-live-head h2 { margin: 3px 0 0; font-size: 17px; }
.cand-live-card > #cr-err, .cand-code, .cand-live-card > .btn { grid-column: 1 / -1; }
.cand-code > span { display: block; margin: 4px 0 6px; color: var(--c-ink2); font-size: 11px; font-weight: 700; }
.cand-code input { width: 100%; height: 50px; margin: 0; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-muted-bg); text-align: center; color: var(--c-primary); font-size: 22px; font-weight: 900; letter-spacing: .2em; }
.cand-live-card > .btn { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; }
.cand-live-card > .btn .ico-svg { width: 18px; }

/* ---- blocs / sections ---- */
.cand-block { margin: 22px 0; }
.cand-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cand-block-head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.cand-link { border: 0; background: none; color: var(--c-primary); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }

/* ---- cartes d'entraînement ---- */
.cand-train-scroll { display: flex; gap: 13px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.cand-train-scroll::-webkit-scrollbar { display: none; }
.cand-train-scroll .cand-train-card { flex: 0 0 76%; max-width: 280px; scroll-snap-align: start; }
.cand-train-stack { display: grid; gap: 12px; }
.cand-train-card { position: relative; display: flex; flex-direction: column; padding: 16px; border-radius: 20px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 10px 24px rgba(40,58,106,.06); }
.cand-train-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 14px; color: var(--c-primary); background: var(--c-chip); }
.cand-train-ic .ico-svg { width: 22px; }
.cand-train-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink2); }
.cand-train-card b { margin: 3px 0; font-size: 16px; }
.cand-train-card > small { color: var(--c-ink2); font-size: 12px; }
.cand-train-card .cand-play { margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cand-train-card .cand-play .ico-svg { width: 16px; }
.cand-fav { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 11px; background: var(--c-muted-bg); color: #c3ccdb; cursor: pointer; }
.cand-fav .ico-svg { width: 18px; }
.cand-fav.on { color: var(--c-amber); }
.course-tone-1 .cand-train-ic { color: #d35d9d; background: #ffe9f4; }
.course-tone-2 .cand-train-ic { color: #27a88f; background: #e4fbf4; }
[data-theme="dark"] .course-tone-1 .cand-train-ic { background: rgba(211,93,157,.18); }
[data-theme="dark"] .course-tone-2 .cand-train-ic { background: rgba(39,168,143,.18); }

/* ---- fiches (ressources) ---- */
.cand-res-list.card { padding: 6px 16px; border-radius: 18px; background: var(--c-surface); border: 1px solid var(--c-line); }
.cand-res-row { display: grid; grid-template-columns: 42px 1fr 20px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; color: inherit; }
.cand-res-list.card .cand-res-row:last-child { border-bottom: 0; }
.cand-res-list:not(.card) .cand-res-row { padding: 13px 15px; margin-bottom: 8px; border: 1px solid var(--c-line); border-radius: 15px; background: var(--c-surface); }
.cand-res-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--c-primary); background: var(--c-chip); }
.cand-res-ic .ico-svg { width: 20px; }
.cand-res-txt b { display: block; font-size: 14px; }
.cand-res-txt small { display: block; color: var(--c-ink2); font-size: 12px; margin-top: 2px; }
.cand-res-row > .ico-svg { width: 19px; color: var(--c-ink2); }
.candidate-resource-empty { margin: 0; padding: 16px 4px; text-align: center; color: var(--c-ink2); font-size: 13px; }

/* ---- segments (parcours) ---- */
.cand-seg { display: flex; gap: 6px; padding: 5px; margin: 4px 0 18px; border-radius: 15px; background: var(--c-muted-bg); }
.cand-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 0; border-radius: 11px; background: none; color: var(--c-ink2); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.cand-seg button .ico-svg { width: 15px; }
.cand-seg button.active { background: var(--c-surface); color: var(--c-primary); box-shadow: 0 4px 12px rgba(40,58,106,.08); }

/* ---- profil ---- */
.cand-profile-hero { padding: 10px 0 18px; text-align: center; }
.cand-avatar { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #5268f3, #9aa7ff); box-shadow: 0 14px 28px rgba(72,96,230,.28); font-size: 26px; font-weight: 900; }
.cand-profile-hero h1 { margin: 4px 0 2px; font-size: 24px; }
.cand-profile-hero p { margin: 0; color: var(--c-ink2); font-size: 13px; }
.cand-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cand-badge { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 12px 16px; border-radius: 18px; background: var(--c-surface); border: 1px solid var(--c-line); text-align: center; box-shadow: 0 8px 20px rgba(40,58,106,.05); }
.cand-badge-medal { position: relative; display: grid; place-items: center; width: 72px; height: 82px; margin-bottom: 12px; }
.cand-badge-medal img { width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 6px 10px rgba(40,58,106,.18)); }
.cand-badge b { font-size: 13px; }
.cand-badge small { color: var(--c-ink2); font-size: 11px; line-height: 1.3; }
.cand-badge.locked .cand-badge-medal img { filter: grayscale(1) opacity(.32); }
.cand-badge.locked b { color: var(--c-ink2); }
.cand-badge-lock { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink2); box-shadow: 0 3px 8px rgba(40,58,106,.15); }
.cand-badge-lock .ico-svg { width: 14px; }
.cand-row-btn { display: grid; grid-template-columns: 44px 1fr 18px; gap: 12px; align-items: center; width: 100%; margin-top: 14px; padding: 15px; border: 1px solid var(--c-line); border-radius: 18px; background: var(--c-surface); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.cand-row-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--c-primary); background: var(--c-chip); }
.cand-row-ic .ico-svg { width: 21px; }
.cand-row-txt b { display: block; font-size: 14px; }
.cand-row-txt small { display: block; color: var(--c-ink2); font-size: 12px; margin-top: 2px; }
.cand-row-btn > .ico-svg { width: 18px; color: var(--c-ink2); }
/* ---- carte « Revoir mes erreurs » (façon Duolingo) ---- */
.cand-errors-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; width: 100%; margin: 14px 0 2px; padding: 14px 15px; border: 1px solid var(--c-line); border-radius: 18px; background: var(--c-surface); color: inherit; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 8px 20px rgba(40,58,106,.05); transition: transform .1s ease; }
.cand-errors-card:disabled { cursor: default; }
.cand-errors-card.has-errors:active { transform: scale(.99); }
.cand-errors-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #ff9600, #ff7a2f); box-shadow: 0 6px 14px rgba(255,140,0,.35); }
.cand-errors-ic .ico-svg { width: 24px; }
.cand-errors-card:disabled:not(.has-errors) .cand-errors-ic { background: var(--c-chip); color: var(--c-ink2); box-shadow: none; }
.cand-errors-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cand-errors-txt small { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--c-ink2); }
.cand-errors-txt b { font-size: 15px; }
.cand-errors-txt em { font-style: normal; font-size: 12px; color: var(--c-ink2); }
.cand-errors-count { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 99px; background: #ff4b4b; color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 4px 10px rgba(255,75,75,.35); }

.cand-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 22px 0 8px; padding: 14px; border: 0; border-radius: 15px; background: none; color: #e05e68; font: inherit; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
.cand-logout .ico-svg { width: 19px; }

/* ---- paramètres ---- */
.cand-set-group { margin: 18px 0; }
.cand-set-label { display: block; margin: 0 4px 8px; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--c-ink2); }
.cand-set-card { border: 1px solid var(--c-line); border-radius: 18px; background: var(--c-surface); overflow: hidden; }
.cand-set-line { display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px; border: 0; border-bottom: 1px solid var(--c-line); background: none; color: inherit; text-align: left; font: inherit; }
.cand-set-card > .cand-set-line:last-child, .cand-set-card.cand-pass { border-bottom: 0; }
.cand-set-line.as-btn { cursor: pointer; }
.cand-set-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; color: var(--c-primary); background: var(--c-chip); }
.cand-set-ic .ico-svg { width: 20px; }
.cand-set-txt { flex: 1; min-width: 0; }
.cand-set-txt small { display: block; color: var(--c-ink2); font-size: 11px; }
.cand-set-txt b { display: block; font-size: 14px; }
.cand-set-line.as-btn > .ico-svg { width: 18px; color: var(--c-ink2); }
.cand-pass { padding: 16px; display: grid; gap: 12px; }
.cand-field span { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--c-ink2); }
.cand-field input { width: 100%; height: 46px; margin: 0; padding: 0 13px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-muted-bg); color: var(--c-ink); font: inherit; }
.cand-hint { margin: 0; color: var(--c-ink2); font-size: 12px; }

/* ---- navigation basse (surcharge sombre + surface) ---- */
.candidate-app2 ~ .candidate-bottom-nav, .candidate-app2 .candidate-bottom-nav { }
.candidate-bottom-nav { background: var(--c-surface, rgba(255,255,255,.95)) !important; border-top: 1px solid var(--c-line, #e6ebf5) !important; }
.candidate-bottom-nav button { color: var(--c-ink2, #6f7a92); }
.candidate-bottom-nav button.active { color: var(--c-primary, #4562f2); background: var(--c-chip, #eef1ff); }

/* =====================================================================
   QUIZ (entraînement)
   ===================================================================== */
/* ---- Main courante (candidat) ---- */
.mc-actions { display: grid; gap: 10px; margin-bottom: 12px; }
.mc-start { display: grid; grid-template-columns: 44px 1fr 18px; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); color: var(--c-ink); text-align: left; cursor: pointer; box-shadow: 0 8px 20px rgba(40,58,106,.05); }
.mc-start .ico-svg { width: 18px; color: var(--c-ink2); }
.mc-start-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--c-primary); background: var(--c-chip); }
.mc-start-ic .ico-svg { width: 22px; color: var(--c-primary); }
.mc-start-tx b { display: block; font-size: 15px; }
.mc-start-tx small { display: block; margin-top: 1px; color: var(--c-ink2); font-size: 12px; }
.mc-start.exam .mc-start-ic { color: #d98a1f; background: color-mix(in srgb, #f5a623 18%, var(--c-surface)); }
.mc-start.exam .mc-start-ic .ico-svg { color: #d98a1f; }
.mc-list { display: grid; gap: 8px; }
.mc-item { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); color: var(--c-ink); text-align: left; cursor: pointer; }
.mc-item .ico-svg { width: 16px; color: var(--c-ink2); }
.mc-item-main b { display: block; font-size: 14px; }
.mc-item-main small { display: block; color: var(--c-ink2); font-size: 12px; }
.mc-item-tags { display: flex; gap: 6px; }
.mc-tag { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--c-chip); color: var(--c-ink2); }
.mc-tag.exam { background: color-mix(in srgb, #f5a623 20%, var(--c-surface)); color: #b5751a; }
.mc-tag.done { background: color-mix(in srgb, #22c55e 20%, var(--c-surface)); color: #1a8f43; }
.mc-tag.draft { background: color-mix(in srgb, var(--c-primary) 16%, var(--c-surface)); color: var(--c-primary); }

.candidate-mc { display: flex; flex-direction: column; }
.mc-top { display: flex; align-items: center; gap: 10px; padding: 12px clamp(14px,4vw,22px); position: sticky; top: 0; z-index: 5; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.mc-top h1 { flex: 1; margin: 0; font-size: 18px; }
.mc-top .quiz-close .ico-svg { transform: rotate(180deg); }
.mc-mode-tag { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--c-chip); color: var(--c-ink2); }
.mc-mode-tag.exam { background: color-mix(in srgb, #f5a623 20%, var(--c-surface)); color: #b5751a; }
.mc-num { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--c-primary) 14%, var(--c-surface)); color: var(--c-primary); }
.mc-main { flex: 1; width: min(680px,100%); margin: 0 auto; padding: 14px clamp(14px,4vw,22px) 120px; }
.mc-locked { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 11px 14px; border-radius: 12px; background: color-mix(in srgb, #22c55e 14%, var(--c-surface)); color: #1a8f43; font-weight: 700; font-size: 13px; }
.mc-locked .ico-svg { width: 18px; }
.mc-head-card { display: grid; gap: 10px; padding: 14px; margin-bottom: 16px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); }
.mc-field { display: block; }
.mc-field > span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--c-ink2); }
.mc-field input, .mc-field textarea, .mc-field select { width: 100%; padding: 11px 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-muted-bg); color: var(--c-ink); font: inherit; font-size: 15px; }
.mc-field textarea { resize: vertical; min-height: 48px; }
.mc-field input:focus, .mc-field textarea:focus, .mc-field select:focus { outline: none; border-color: var(--c-primary); }
.mc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-mat-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-check-inline { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 10px 13px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); cursor: pointer; transition: border-color .12s, background .12s; }
.mc-check-inline input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--c-line); border-radius: 7px; background: var(--c-bg); cursor: pointer; position: relative; }
.mc-check-inline input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.mc-check-inline input:checked::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.mc-check-inline span { font-size: 13.5px; font-weight: 600; color: var(--c-ink); line-height: 1.25; }
.mc-check-inline:has(input:checked) { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 9%, var(--c-surface)); }
@media (max-width: 480px) { .mc-mat-checks { grid-template-columns: 1fr; } }
.mc-check { display: flex; align-items: flex-start; gap: 10px; padding: 4px 2px; cursor: pointer; }
.mc-check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--c-primary); }
.mc-check span { font-size: 13px; color: var(--c-ink2); line-height: 1.35; }
.mc-events-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.mc-events-head h2 { margin: 0; font-size: 16px; }
.mc-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--c-primary); color: #fff; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.mc-add .ico-svg { width: 16px; }
.mc-events { display: grid; gap: 12px; }
.mc-event { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-surface); }
.mc-event-head { display: flex; align-items: center; gap: 10px; }
.mc-event-no { font-weight: 800; font-size: 13px; color: var(--c-ink2); }
.mc-event-no b { color: var(--c-primary); }
.mc-h { flex: 1; max-width: 130px; padding: 9px 11px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-muted-bg); color: var(--c-ink); font: inherit; font-weight: 700; }
.mc-del { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: color-mix(in srgb, #ef4444 12%, var(--c-surface)); color: #ef4444; cursor: pointer; }
.mc-del .ico-svg { width: 17px; }
.mc-empty { margin: 6px 2px; color: var(--c-ink2); font-size: 13px; }
.mc-foot { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px clamp(14px,4vw,22px) calc(12px + env(safe-area-inset-bottom)); background: var(--c-bg); border-top: 1px solid var(--c-line); }
.mc-foot .btn { flex: 1; }
.mc-foot .mc-delete { flex: 0 0 auto; color: #ef4444; }

.candidate-quiz { display: flex; flex-direction: column; height: 100dvh; }
.quiz-top { display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 5vw, 30px); }
.quiz-close { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--c-surface); color: var(--c-primary); box-shadow: 0 4px 14px rgba(40,58,106,.08); cursor: pointer; }
.quiz-close .ico-svg { width: 22px; }
.quiz-progress { flex: 1; height: 12px; border-radius: 99px; background: var(--c-line); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1fc7b4, #4fe0cf); transition: width .3s ease; }
/* Centrage vertical uniquement quand il y a de la place : margin:auto reste
   scrollable depuis le HAUT quand la question + options dépassent l'écran
   (corrige le haut de question coupé / la dernière option masquée). */
.quiz-main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 6px clamp(16px, 5vw, 30px) 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.quiz-card { width: min(560px, 100%); margin: auto 0; padding: clamp(18px, 3vh, 30px) clamp(18px, 4vw, 30px); border-radius: 28px; background: var(--c-surface); box-shadow: 0 24px 60px rgba(40,58,106,.12); }
.quiz-count { display: block; text-align: center; color: var(--c-ink2); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.quiz-card h1 { margin: 12px 0 20px; text-align: center; font-size: clamp(20px, 5vw, 28px); line-height: 1.25; letter-spacing: -.02em; }
.quiz-options { display: grid; gap: 12px; }
.quiz-opt { display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px; border: 1.5px solid var(--c-line); border-radius: 16px; background: var(--c-surface); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; transition: .15s; }
.quiz-opt strong { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; color: var(--c-ink2); background: var(--c-muted-bg); font-weight: 800; }
.quiz-opt span { flex: 1; min-width: 0; }
.quiz-opt em { display: none; color: #fff; }
.quiz-opt em .ico-svg { width: 20px; }
.quiz-opt:hover { border-color: var(--c-teal); }
.quiz-opt.selected { border-color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 14%, var(--c-surface)); }
.quiz-opt.selected strong { color: #fff; background: var(--c-teal); }
.quiz-opt.selected em { display: block; }
.quiz-foot { padding: 12px clamp(16px, 5vw, 30px) calc(16px + env(safe-area-inset-bottom)); }
.quiz-hint { margin: 0 0 8px; text-align: center; color: var(--c-ink2); font-size: 12px; }
.quiz-continue { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border-radius: 16px; font-size: 15px; font-weight: 800; }
.quiz-continue .ico-svg { width: 18px; }
.quiz-error { text-align: center; }
.quiz-error h1 { margin: 0 0 8px; font-size: 22px; }
.quiz-error p { margin: 0 0 18px; color: var(--c-ink2); }

/* =====================================================================
   RÉSULTAT / CÉLÉBRATION
   ===================================================================== */
.candidate-result { display: flex; flex-direction: column; overflow: hidden; }
.candidate-result .quiz-close { position: absolute; top: 16px; left: 16px; z-index: 4; }
.result-main { flex: 1; width: min(460px, 100%); margin: 0 auto; padding: clamp(40px, 9vh, 90px) clamp(20px, 6vw, 34px) calc(30px + env(safe-area-inset-bottom)); text-align: center; overflow-y: auto; }
.result-ring { position: relative; width: 184px; height: 184px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--rc) calc(var(--pct) * 1%), var(--c-line) 0); }
.result-ring.ok { --rc: var(--c-teal); }
.result-ring.low { --rc: var(--c-coral); }
.result-ring-in { width: 146px; height: 146px; border-radius: 50%; background: var(--c-bg); display: grid; place-items: center; align-content: center; box-shadow: inset 0 0 0 1px var(--c-line); }
.result-ring-in b { font-size: 42px; letter-spacing: -.02em; }
.result-ring-in small { color: var(--c-ink2); font-size: 14px; }
.result-xp { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 2px; padding: 8px 16px; border-radius: 99px; color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 15%, var(--c-surface)); font-weight: 900; font-size: 16px; }
.result-xp .ico-svg { width: 18px; }
.result-main h1 { margin: 12px 0 6px; font-size: clamp(26px, 7vw, 34px); letter-spacing: -.02em; }
.result-main > p { margin: 0 auto; max-width: 340px; color: var(--c-ink2); font-size: 15px; }
.result-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.result-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px 6px 7px; border-radius: 99px; font-size: 13px; font-weight: 800; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 6px 16px rgba(40,58,106,.08); }
.result-badge img { width: 26px; height: 26px; object-fit: contain; }
.result-actions { display: grid; gap: 10px; margin-top: 26px; }
.result-actions .btn { height: 52px; border-radius: 16px; font-weight: 800; }
.result-actions .btn-primary { display: flex; align-items: center; justify-content: center; gap: 7px; }
.result-actions .btn .ico-svg { width: 17px; }
.result-correction { margin-top: 30px; text-align: left; }
.corr-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 14px; }
.corr-title h2 { font-size: 19px; margin: 0; }
.corr-score { font-size: 12px; font-weight: 800; color: var(--c-ink2); }
.corr-card { padding: 16px; margin-bottom: 12px; border-radius: 18px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 6px 16px rgba(40,58,106,.05); }
.corr-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.corr-status { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; color: #fff; }
.corr-card.ok .corr-status { background: var(--c-teal); }
.corr-card.ko .corr-status { background: var(--c-coral); }
.corr-status .ico-svg { width: 20px; }
.corr-head small { font-size: 10px; font-weight: 900; letter-spacing: .08em; color: var(--c-ink2); }
.corr-head b { display: block; font-size: 14px; }
.corr-card.ok .corr-head b { color: var(--c-teal); }
.corr-card.ko .corr-head b { color: var(--c-coral); }
.corr-card h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.35; }
.corr-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.corr-opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--c-line); background: var(--c-muted-bg); }
.corr-letter { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--c-surface); color: var(--c-ink2); font-weight: 800; font-size: 12px; }
.corr-otext { flex: 1; min-width: 0; font-size: 14px; }
.corr-mark { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; color: #fff; }
.corr-mark .ico-svg { width: 15px; }
.corr-opt.good { border-color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 12%, var(--c-surface)); }
.corr-opt.good .corr-letter, .corr-opt.good .corr-mark { background: var(--c-teal); color: #fff; }
.corr-opt.bad { border-color: var(--c-coral); background: color-mix(in srgb, var(--c-coral) 12%, var(--c-surface)); }
.corr-opt.bad .corr-letter, .corr-opt.bad .corr-mark { background: var(--c-coral); color: #fff; }
/* Marqueur « Ta réponse » : liseré bleu marque sur l'option cochée par le candidat. */
.corr-opt.picked { border-color: var(--c-primary); box-shadow: 0 0 0 1.5px var(--c-primary); }
.corr-tag { flex: none; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.corr-tag.ok { background: var(--c-teal); color: #fff; }
.corr-tag.ko { background: var(--c-coral); color: #fff; }
.corr-tag.muted { background: var(--c-muted-bg); color: var(--c-ink2); border: 1px solid var(--c-line); }
.corr-none { margin: 8px 0 0; font-size: 12px; color: var(--c-coral); font-weight: 700; }
.corr-expl { display: flex; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-amber) 12%, var(--c-surface)); border: 1px solid color-mix(in srgb, var(--c-amber) 30%, transparent); }
.corr-expl > span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; color: #fff; background: var(--c-amber); }
.corr-expl > span .ico-svg { width: 16px; }
.corr-expl p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--c-ink); }

.badge-celebrate .result-main { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.celebrate-badge { position: relative; display: grid; place-items: center; width: 172px; height: 172px; margin-bottom: 16px; animation: candPop .55s cubic-bezier(.2,1.3,.4,1); }
.celebrate-badge img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 28px rgba(40,58,106,.28)); }
.celebrate-glow { position: absolute; inset: -16%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bc, #f5a623) 42%, transparent) 0%, transparent 66%); animation: celebPulse 2.4s ease-in-out infinite; }
@keyframes celebPulse { 0%,100% { transform: scale(.9); opacity: .65; } 50% { transform: scale(1.1); opacity: 1; } }
.celebrate-kicker { font-size: 12px; font-weight: 900; letter-spacing: .12em; color: var(--c-ink2); }
.badge-celebrate h1 { margin: 6px 0 8px; font-size: clamp(28px, 8vw, 38px); }
.badge-celebrate p { margin: 0 auto 26px; max-width: 320px; color: var(--c-ink2); }
.badge-celebrate .btn { width: min(320px, 100%); height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }

@keyframes candPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---- confettis ---- */
.cand-confetti { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.cand-confetti i { position: absolute; top: -12%; border-radius: 2px; opacity: .95; animation-name: candFall; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: forwards; }
@keyframes candFall { 0% { transform: translateY(-12vh) rotate(0); } 100% { transform: translateY(114vh) rotate(700deg); } }
@media (prefers-reduced-motion: reduce) { .cand-confetti { display: none; } .celebrate-badge, .celebrate-glow { animation: none; } }

@media (max-width: 700px) {
  .cand-badges { gap: 8px; }
  .quiz-card { border-radius: 24px; }
  .result-ring { width: 168px; height: 168px; }
  .result-ring-in { width: 132px; height: 132px; }
}

/* =====================================================================
   CHEMIN DE PROGRESSION (façon Duolingo) — onglet Parcours
   ===================================================================== */
.cand-path { padding: 4px 0 20px; }
.cand-path-empty { text-align: center; padding: 48px 20px; color: var(--c-ink2); }
.cand-path-empty > span { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px; border-radius: 20px; color: var(--c-primary); background: var(--c-chip); }
.cand-path-empty > span .ico-svg { width: 32px; }
.cand-path-empty h2 { margin: 0 0 6px; color: var(--c-ink); font-size: 18px; }
.cand-path-empty p { margin: 0 auto; max-width: 260px; font-size: 14px; }

.path-switch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.path-switch::-webkit-scrollbar { display: none; }
.path-switch button { flex: none; padding: 8px 15px; border: 1px solid var(--c-line); border-radius: 99px; background: var(--c-surface); color: var(--c-ink2); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.path-switch button.active { background: var(--c-primary); color: #fff; border-color: transparent; }

.path-head { text-align: center; margin: 2px 0 8px; }
.path-head > b { display: block; font-size: 15px; }
.path-progress { height: 10px; max-width: 280px; margin: 8px auto 4px; border-radius: 99px; background: var(--c-line); overflow: hidden; }
.path-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #58cc02, #8ee000); transition: width .4s; }
.path-head small { color: var(--c-ink2); font-size: 12px; }

.path-unit { margin-bottom: 10px; }
.path-banner { margin: 24px 0 8px; padding: 15px 18px; border-radius: 18px; color: #fff; background: var(--uc, var(--c-primary)); box-shadow: 0 6px 0 var(--ucd, #2e49d6); }
.path-banner span { font-size: 11px; font-weight: 900; letter-spacing: .08em; opacity: .92; }
.path-banner h2 { margin: 3px 0 0; font-size: 19px; line-height: 1.15; }

.path-track { display: flex; flex-direction: column; align-items: center; padding: 8px 0; }
.path-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 16px 0; transform: translateX(var(--dx, 0)); }
.path-bubble { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border: 0; border-radius: 50%; color: #fff; background: var(--uc, var(--c-primary)); box-shadow: 0 6px 0 var(--ucd, #2e49d6); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.path-bubble .ico-svg { width: 34px; }
.path-bubble:not(:disabled):active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ucd, #2e49d6); }
.path-bubble.loading { opacity: .6; pointer-events: none; }
.state-locked .path-bubble { background: var(--c-line); color: var(--c-ink2); box-shadow: 0 6px 0 rgba(0,0,0,.14); cursor: default; }
[data-theme="dark"] .state-locked .path-bubble { box-shadow: 0 6px 0 rgba(0,0,0,.4); }
.state-current .path-bubble { animation: pathBounce 1.7s ease-in-out infinite; }
.state-current .path-bubble::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 4px solid var(--uc, var(--c-primary)); opacity: .3; }
.path-stars { display: flex; gap: 3px; }
.path-stars span { color: var(--c-line); line-height: 0; }
.path-stars span .ico-svg { width: 15px; }
.path-stars span.on { color: #ffc800; }
.path-stars span.on .ico-svg path { fill: #ffc800; }
.path-pop { position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); padding: 8px 14px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); text-align: center; white-space: nowrap; box-shadow: 0 12px 26px rgba(40,58,106,.16); z-index: 3; animation: pathPop .3s ease; }
.path-pop b { display: block; font-size: 12px; color: var(--c-ink); }
.path-pop span { font-size: 12px; font-weight: 900; color: var(--c-primary); }
.path-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--c-surface); }
.state-reward .path-bubble.reward { background: linear-gradient(135deg, #ffc800, #ff9600); box-shadow: 0 6px 0 #e08600; cursor: default; }
.state-reward small { font-size: 11px; font-weight: 800; color: var(--c-ink2); }

@keyframes pathBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pathPop { from { opacity: 0; transform: translateX(-50%) translateY(6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@media (prefers-reduced-motion: reduce) { .state-current .path-bubble { animation: none; } }

/* ---- menu bas plus ludique ---- */
.candidate-bottom-nav button { border-radius: 16px; transition: transform .1s ease, background .15s; }
.candidate-bottom-nav button .ico-svg { transition: transform .14s ease; }
.candidate-bottom-nav button:active { transform: scale(.88); }
.candidate-bottom-nav button.active { color: var(--c-primary, #4562f2); background: var(--c-chip, #eef1ff); }
.candidate-bottom-nav button.active .ico-svg { transform: translateY(-2px) scale(1.14); filter: drop-shadow(0 4px 6px rgba(69,98,242,.28)); }
.candidate-bottom-nav button span { transition: font-weight .1s; }
.candidate-bottom-nav button.active span { font-weight: 800; }

/* =====================================================================
   CHEMIN v2 — style « coding app » (Mimo-like) : grille pointillée,
   nœuds carrés arrondis, anneau de progression, connecteurs en coude.
   ===================================================================== */
.cand-path { --pacc: #8b5cf6; --pacc-deep: #6d28d9; --pacc-soft: #c4b5fd; --pdot: rgba(60,50,110,.07); --pconn: #e2ddf5; --ring-track: rgba(30,40,70,.1);
  position: relative; padding: 2px 0 28px;
  background-image: radial-gradient(var(--pdot) 1.7px, transparent 1.7px); background-size: 24px 24px; }
[data-theme="dark"] .cand-path { --pacc: #a78bfa; --pacc-deep: #7c5ce6; --pacc-soft: #cdbcff; --pdot: rgba(255,255,255,.055); --pconn: #34304f; --ring-track: rgba(255,255,255,.13); }
.cand-path-inner { width: 100%; }

.cand-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 8px; }
.cand-topbar-stats { display: flex; gap: 10px; }
.cand-coin, .cand-flame { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; background: var(--c-surface); border: 1px solid var(--c-line); font-weight: 800; font-size: 14px; }
.cand-coin { color: #f5a623; } .cand-flame { color: #ff7d55; }
.cand-coin .ico-svg, .cand-flame .ico-svg { width: 18px; }

.path-hero { position: sticky; top: 8px; z-index: 6; margin: 0 0 8px; padding: 16px 18px; border-radius: 20px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: 0 10px 24px rgba(20,16,40,.16); }
.path-hero small { color: var(--c-ink2); font-size: 13px; }
.path-hero h2 { margin: 4px 0 12px; font-size: 20px; letter-spacing: -.01em; }
.path-hero-bar { height: 12px; border-radius: 99px; background: var(--c-muted-bg); overflow: hidden; }
.path-hero-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pacc), var(--pacc-soft)); transition: width .4s; }

.path-sec-label { text-align: center; margin: 22px 0 2px; }
.path-sec-label span { display: block; font-size: 11px; font-weight: 900; letter-spacing: .09em; color: var(--uc, var(--pacc)); }
.path-sec-label b { font-size: 14px; color: var(--c-ink2); font-weight: 700; }

/* Carte « examen final » en bas du parcours. */
.path-final { margin: 26px 0 8px; }
.path-final-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--c-surface); border: 1.5px solid var(--c-line); box-shadow: 0 10px 24px rgba(20,16,40,.14); }
.path-final:not(.locked) .path-final-card { border-color: var(--pacc); box-shadow: 0 0 0 1.5px var(--pacc), 0 12px 26px rgba(20,16,40,.18); }
.path-final-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--c-muted-bg); color: var(--c-ink2); }
.path-final:not(.locked) .path-final-ic { background: var(--pacc); color: #fff; }
.path-final-ic .ico-svg { width: 24px; }
.path-final-txt { flex: 1; min-width: 0; }
.path-final-txt small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .09em; color: var(--pacc); }
.path-final-txt b { display: block; font-size: 16px; margin: 1px 0 3px; }
.path-final-txt span { font-size: 12.5px; color: var(--c-ink2); }
.path-final-go { flex: none; }
.path-final.locked .path-final-card { opacity: .75; }

.ptrack { position: relative; margin: 8px auto 4px; }
.ptrack-svg { position: absolute; top: 0; left: 0; pointer-events: none; }
.pnode { position: absolute; width: 88px; height: 88px; padding: 0; border: 0; border-radius: 26px; display: grid; place-items: center; cursor: pointer; transform: translateX(-50%); transition: transform .08s, box-shadow .08s; animation: pnodeIn .35s both; animation-delay: calc(var(--pni, 0) * .05s); }
.pnode.loading { opacity: .6; pointer-events: none; }
.pnode-ic { display: grid; place-items: center; }
.pnode-ic .ico-svg { width: 38px; }
.pnode.state-done { background: var(--uc, var(--pacc)); color: #fff; box-shadow: 0 6px 0 var(--ucd, var(--pacc-deep)); }
.pnode.state-done:not(:disabled):active { transform: translateX(-50%) translateY(3px); box-shadow: 0 3px 0 var(--ucd, var(--pacc-deep)); }
.pnode.state-current { background: var(--c-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--uc, var(--pacc)) 45%, transparent), 0 8px 16px rgba(20,16,40,.14); animation: pnodeIn .35s both, pnodePulse 1.9s ease-in-out infinite 1.2s; }
.pnode.state-current:not(:disabled):active { transform: translateX(-50%) translateY(3px); }
.pnode.state-locked { background: var(--c-muted-bg); color: var(--c-ink2); box-shadow: 0 6px 14px rgba(20,16,40,.10); cursor: default; }
.pnode.state-locked .pnode-ic .ico-svg { width: 32px; opacity: .8; }
/* QCM récapitulatif de fin d'unité : identité dorée (trophée). */
.pnode.is-recap { border-radius: 30px; }
.pnode.is-recap .pnode-ic .ico-svg { width: 42px; }
.pnode.is-recap.state-current { color: var(--c-amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-amber) 55%, transparent), 0 8px 16px rgba(20,16,40,.16); }
.pnode.is-recap.state-done { background: var(--c-amber); color: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--c-amber) 60%, #000); }
.pring { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--uc, var(--pacc)) calc(var(--pct) * 1%), var(--ring-track) 0); }
.pring b { width: 46px; height: 46px; border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--c-ink); }
@keyframes pnodePulse { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }
@keyframes pnodeIn { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .pnode { animation: none; } .pnode.state-current { animation: none; } }

/* ---- page Évaluation ---- */
/* Bannière statut de session (candidat) */
.cand-session-banner { display: flex; align-items: center; gap: 11px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--c-line); background: var(--c-surface); }
.cand-session-banner .csb-ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; }
.cand-session-banner .csb-ic .ico-svg { width: 20px; }
.cand-session-banner .csb-tx b { display: block; font-size: 14px; color: var(--c-ink); }
.cand-session-banner .csb-tx small { display: block; margin-top: 1px; color: var(--c-ink2); font-size: 12px; }
.cand-session-banner.is-active { border-color: color-mix(in srgb, #22c55e 45%, var(--c-line)); background: color-mix(in srgb, #22c55e 10%, var(--c-surface)); }
.cand-session-banner.is-active .csb-ic { color: #1a8f43; background: color-mix(in srgb, #22c55e 20%, var(--c-surface)); }
.cand-session-banner.is-wait .csb-ic { color: var(--c-primary); background: var(--c-chip); }

.cand-page-intro { padding: 8px 2px 14px; }
.cand-page-intro h1 { margin: 0 0 4px; font-size: 26px; }
.cand-page-intro p { margin: 0; color: var(--c-ink2); font-size: 14px; }

/* ---- quiz : meta + confirmation maison ---- */
.quiz-count-top { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--c-ink2); }
.quiz-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.quiz-badge { padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #fff; }
.quiz-badge.qcu { background: var(--c-primary); }
.quiz-badge.qcm { background: #8a6cf0; }
.quiz-meta .quiz-count { color: var(--c-ink2); font-size: 12px; font-weight: 800; }
.quiz-xp { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 900; color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 14%, var(--c-surface)); }
.quiz-xp .ico-svg { width: 13px; }

.cand-confirm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(15,18,30,.55); backdrop-filter: blur(3px); animation: candFadeIn .15s ease; }
.cand-confirm-box { width: min(360px, 100%); padding: 22px; border-radius: 22px; background: var(--c-surface, #fff); box-shadow: 0 24px 60px rgba(15,18,30,.4); }
.cand-confirm-box p { margin: 0 0 18px; font-size: 15px; font-weight: 600; color: var(--c-ink, #1b2338); text-align: center; }
.cand-confirm-actions { display: flex; gap: 10px; }
.cand-confirm-actions .btn { flex: 1; height: 46px; border-radius: 14px; font-weight: 800; }
@keyframes candFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Paramètres → Compte de test */
.tst-sec { max-width: 600px; margin-top: 24px; padding-top: 6px; border-top: 1px solid var(--line); }
.tst-sec h4 { margin: 18px 0 6px; font-size: 14px; }
.tst-sec .auth-hint { margin: 0 0 8px; }

/* Session → Podcasts : suivi d'écoute (candidats × podcasts) */
.ps-scroll { overflow-x: auto; margin: 4px -4px 0; }
.ps-tbl th { text-transform: none; letter-spacing: 0; font-size: 12.5px; vertical-align: bottom; }
.ps-tbl th.ps-c { min-width: 110px; max-width: 150px; }
.ps-h { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-weight: 700; line-height: 1.3; }
.ps-tbl th small { display: block; margin-top: 3px; font-weight: 600; color: var(--muted); font-size: 11.5px; }
.ps-tbl td { padding: 11px 14px; }
.ps-tbl th.ps-c, .ps-tbl td.ps-c { text-align: center; }
.ps-noacc { display: block; color: var(--muted); font-size: 12px; }
.ps { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.ps .ico-svg { width: 16px; height: 16px; }
.ps.done { background: var(--green-soft); color: var(--green); }
.ps.part { background: var(--orange-soft); color: #b8741a; }
.ps.none { color: var(--muted); }
.ps-tot { font-weight: 700; color: var(--muted); }
.ps-tot.full { color: var(--green); }
.ps-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }
.ps-legend .ps { margin-left: 8px; }
.ps-legend .ps:first-child { margin-left: 0; }
.pod-listens { display: block; margin-top: 2px; }

/* Évaluations : téléchargement des fiches PDF (ZIP) depuis l'historique */
.eval-history-zip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--brand); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.eval-history-zip .ico-svg { width: 15px; height: 15px; }
.eval-history-zip em { font-style: normal; }
.eval-history-zip:hover { background: var(--brand-soft); border-color: var(--brand); }
.eval-history-zip.is-busy { opacity: .5; pointer-events: none; }

/* Liste des sessions : inscrits / capacité, rouge en sureffectif */
.s-insc { font-weight: 700; white-space: nowrap; }
.s-insc small { font-weight: 500; color: var(--muted); }
.s-insc.over, .s-insc.over small { color: #e5484d; }
.fprice.fprice-none { color: var(--muted); font-weight: 500; font-size: 13px; }

/* Tableau de bord : CA encaissé sur 6 mois */
.rev-chart { display: flex; align-items: stretch; gap: 10px; height: 150px; margin-top: 16px; }
.rev-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.rev-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.rev-bar { width: min(56%, 48px); min-height: 2px; border-radius: 5px 5px 0 0; background: var(--brand); }
.rev-col > span { font-size: 11px; color: var(--muted); }
@media (min-width: 900px) { .s-form { min-width: 210px; } }
/* Écrans moyens (portables) : la liste des sessions tient sans défilement horizontal */
@media (min-width: 900px) and (max-width: 1399px) {
  #ses-table .s-dates { white-space: normal; display: inline-block; min-width: 92px; }
  #ses-table .s-form { min-width: 170px; }
  #ses-table .docs-bar { width: 40px; }
  #ses-table th, #ses-table td { padding-left: 8px; padding-right: 8px; }
}

/* ---------- Structure : carte du compte, ✕ des fenêtres, sous-titres de page ---------- */
.icon-btn { padding: 0; font: inherit; }
.side-user {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s;
}
.side-user:hover { background: var(--bg); }
.side-user .avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 700; }
.side-user-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.side-user-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-txt small { font-size: 12px; color: var(--muted); }
.side-user-more { display: flex; color: var(--muted); }
.side-user-more .ico-svg { width: 16px; height: 16px; }
.modal { position: relative; }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.modal-x:hover { background: var(--bg); color: var(--ink); }
.modal-x .ico-svg { width: 18px; height: 18px; }
.modal > h2:first-of-type { padding-right: 40px; }
.page-title-wrap { min-width: 0; margin: 10px 4px 22px; }
.page-title-wrap .page-title { margin: 0; }
.page-head .page-title-wrap { margin: 0; }
.page-desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Liste des sessions : formation + infos secondaires, échéance en clair, chevron */
.ses-list .s-form-t > span:last-child { font-weight: 600; }
.s-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.s-ech { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.s-ech.urgent { color: var(--red); }
.s-ech.warn { color: #B7791F; }
.s-ech.live { color: var(--brand); }
:root[data-theme="dark"] .s-ech.warn { color: #E8C468; }
.ses-list .s-go { width: 28px; padding-left: 0; text-align: right; color: var(--muted); }
.ses-list .s-go .ico-svg { width: 16px; height: 16px; vertical-align: middle; }
.ses-list tr.clickable:hover .s-go { color: var(--ink); }
@media (max-width: 900px) { .ses-list .s-go { display: none; } }

/* ---------- Fiche session (refonte) ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.crumb-link { display: inline-flex; align-items: center; gap: 6px; margin-left: -6px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; }
.crumb-link:hover { color: var(--ink); background: var(--bg); }
.crumb-link .ico-svg { width: 15px; height: 15px; }
.crumb-sep { opacity: .6; }
.crumb-cur { color: var(--ink); font-weight: 500; }
.ses-hero-sur .s-ech { display: inline; margin: 0; }
.s-over { color: var(--red); font-weight: 600; }
.ses-info-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ses-info-main, .ses-info-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1100px) { .ses-info-layout { grid-template-columns: 1fr; } }
.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin: 4px 0 0; }
.kv-grid dt { margin-bottom: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kv-grid dd { margin: 0; font-size: 14px; font-weight: 500; }
@media (max-width: 700px) { .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ses-instr { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ses-instr span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ses-instr p { margin: 4px 0 0; font-size: 14px; white-space: pre-line; }
.people { display: flex; flex-direction: column; }
.person-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.people .person-row { padding: 9px 0; }
.people .person-row + .person-row { border-top: 1px solid var(--line); }
.avatar-sm { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; }
.person-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.person-txt b, .person-txt .linkish { font-size: 14px; font-weight: 600; text-align: left; }
.person-txt small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.empty-sm { padding: 22px 12px; text-align: center; color: var(--muted); }
.empty-sm .ico-svg { width: 22px; height: 22px; opacity: .7; }
.empty-sm p { margin: 8px 0 12px; font-size: 13.5px; }
.danger-zone .auth-hint { margin: 0 0 12px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; }
.card-desc { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cand-tbl { --field-h: 30px; --field-mt: 0; --field-fs: 13px; }
.cand-tbl select.sel-sm { width: 100%; max-width: 210px; }
.cand-tbl th:last-child, .cand-tbl td:last-child { width: 44px; }
.test-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-soft); }
.test-note > .ico-svg { width: 16px; height: 16px; color: var(--muted); }
.test-note > span { flex: 1; min-width: 220px; }
.cand-tbl .icon-mini { border-color: transparent; background: transparent; color: var(--muted); }
/* Onglet Évaluations : historique en tableau */
.tbl th.c, .tbl td.c { text-align: center; }
.eval-tbl .row-acts { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.eval-tbl .s-go { display: inline-flex; color: var(--muted); }
.eval-tbl .s-go .ico-svg { width: 16px; height: 16px; }
.eval-tbl .icon-mini { border-color: transparent; background: transparent; color: var(--muted); }
.eval-tbl .avatar-sm .ico-svg { width: 15px; height: 15px; }
.ses-info-side .danger-zone, #ses-pane > .danger-zone { border-color: color-mix(in srgb, var(--red) 25%, var(--line)); }
#ses-pane > .card + .card { margin-top: 20px; }
/* En-tête de carte : le texte prend la place, les actions restent à droite */
.card-head { flex-wrap: nowrap; }
.card-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.card-head > .card-actions { flex: none; }
@media (max-width: 700px) { .card-head { flex-wrap: wrap; } }
/* En-tête de fenêtre avec avatar + fiche d'inscription sur deux colonnes */
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-right: 40px; }
.modal-head h2 { margin: 0; }
.modal-head .avatar-sm { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.modal-desc { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.fi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
.fi-col > .det-section:first-child { margin-top: 0; }
@media (max-width: 860px) { .fi-grid { grid-template-columns: 1fr; } .fi-col + .fi-col { margin-top: 20px; } }

/* ---------- Tableau de bord (refonte) ---------- */
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { display: flex; align-items: center; gap: 14px; text-align: left; font: inherit; color: inherit; }
.stat .stat-ic { margin: 0; flex: none; }
.stat-txt { flex: 1; min-width: 0; }
.stat-txt .stat-label { margin-top: 2px; }
.stat-link { cursor: pointer; transition: border-color .15s, background .15s; }
.stat-link:hover { border-color: var(--brand); }
.stat-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.stat-go { display: flex; color: var(--muted); opacity: 0; transition: opacity .15s; }
.stat-go .ico-svg { width: 16px; height: 16px; }
.stat-link:hover .stat-go { opacity: 1; }
.tbl.mini thead th { padding-top: 0; }
.renta-alert { display: flex; align-items: center; gap: 8px; }
.renta-alert .ico-svg { flex: none; }
.stat { position: relative; }
.stat-go { position: absolute; top: 12px; right: 12px; }
button.agenda-item { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; }
.agenda-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.agenda-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Calendrier (refonte) ---------- */
.cal-nav { gap: 10px; }
.cal-step { display: inline-flex; align-items: center; gap: 4px; }
.cal-next .ico-svg { transform: scaleX(-1); }
.cal-label { min-width: 140px; font-size: 15px; }
.cal-cell { cursor: default; }
.cal-cell.today { outline: 0; }
.cal-num span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; }
.cal-cell.today .cal-num span { background: var(--brand); color: #fff; }
.cal-cell.weekend { background: transparent; border: 1px dashed var(--line); }
.cal-cell.weekend .cal-num { color: var(--muted); font-weight: 500; }
.cal-cell.weekend .cal-ev { opacity: .45; }
.cal-ev { font-weight: 500; }
.cal-ev b { font-weight: 700; }
.cal-ev:hover { filter: brightness(.96); }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; padding: 0 4px; font-size: 12.5px; color: var(--ink-soft); }
.cal-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.cal-legend .lg-pending { background: var(--yellow); }
.cal-legend .lg-ok { background: var(--green); }
.cal-legend .lg-overdue { background: var(--red); }
.cal-legend .muted { margin-left: auto; }

/* ---------- Catalogue : regroupement par catégorie ---------- */
.cat-groups { display: flex; flex-direction: column; gap: 28px; }
.cat-group-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; font-size: 15px; font-weight: 600; }
.cat-group-h span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.fcard:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Fiche formation (refonte) ---------- */
.fdet-desc { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.fdet-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .fdet-layout { grid-template-columns: 1fr; } }
.fdet-modules { max-height: none; }
.act-list { display: flex; flex-direction: column; gap: 2px; }
.act-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.act-row:hover { background: var(--bg); }
.act-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.act-row .act-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.act-row .act-ic .ico-svg { width: 17px; height: 17px; }
.act-row .act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.act-row .act-txt b { font-size: 13.5px; font-weight: 600; }
.act-row .act-txt span { font-size: 12px; color: var(--muted); }
.act-row .act-go { display: flex; color: var(--muted); opacity: 0; transition: opacity .15s; }
.act-row .act-go .ico-svg { width: 15px; height: 15px; }
.act-row:hover .act-go { opacity: 1; }
.modal-actions .spacer { flex: 1; }
.btn-del { color: var(--red) !important; }
.btn-del:hover { background: var(--red-soft) !important; }

/* ---------- Gestion des questions (QCM / QCU) ---------- */
.modal-sub { margin: -10px 0 16px; font-size: 13.5px; color: var(--muted); }
.qm-toolbar { --field-mt: 0; --field-h: 34px; display: flex; gap: 8px; margin-bottom: 12px; }
.qm-toolbar .search-inline { flex: 1; }
.qm-toolbar .search-inline input { width: 100%; }
.qm-toolbar select { width: auto; max-width: 45%; }
.qm-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 0; }
.qm-row:last-child { border-bottom: 0; }
.qm-row:hover { background: var(--bg); }
.qm-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand-soft); }
.qm-row > .badge { flex: none; margin-top: 1px; }
.qm-main { flex: 1; min-width: 0; }
.qm-q { font-size: 14px; font-weight: 500; line-height: 1.4; }
.qm-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.qm-row .icon-mini { flex: none; border-color: transparent; background: transparent; color: var(--muted); }
.qm-row .icon-mini:hover { background: var(--red-soft); color: var(--red); }
#qz-list { max-height: min(56vh, 560px); overflow-y: auto; gap: 0; }
/* Éditeur de question : la règle générique des champs ajoutait une marge haute (radio décalé) */
.qopt { --field-mt: 0; }
.qopt-let { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--bg); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.qopt .qopt-del { border-color: transparent; background: transparent; color: var(--muted); }

/* Cellule d'actions des tableaux : reste une vraie cellule (le flex cassait la ligne de séparation) */
@media (min-width: 901px) {
  td.row-actions { display: table-cell; text-align: right; white-space: nowrap; width: 1%; }
  td.row-actions > * { vertical-align: middle; }
  td.row-actions > * + * { margin-left: 4px; }
}
.person-name { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge:not(.ok):not(.pending):not(.overdue):not(.ko):not(.paid) { background: var(--bg); color: var(--muted); }

/* ---------- Grilles de formulaire ---------- */
.fgrid { display: grid; gap: 0 16px; }
.fgrid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid-addr { grid-template-columns: minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 760px) { .fgrid-3, .fgrid-addr { grid-template-columns: 1fr; } }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.stg-form .fset:last-of-type { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Écarts réguliers entre les cartes empilées des fiches (session, stagiaire, formateur…) */
#ses-pane > * + *, #stg-pane > * + *, #fmt-pane > * + *, #cl-pane > * + * { margin-top: 20px; }
.card > .det-section:first-child { margin-top: 0; }
/* États vides des listes */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 460px; margin: 0 auto; padding: 44px 20px; text-align: center; }
.empty-state > .ico-svg { width: 26px; height: 26px; margin-bottom: 6px; color: var(--muted); opacity: .8; }
.empty-state b { font-size: 15px; font-weight: 600; color: var(--ink); }
.empty-state span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Paramètres → Main courante et Checklist : une ligne par champ.
   La règle générique des champs (largeur 100 %, marge haute) les empilait. */
.mct-row, .dcl-row { --field-mt: 0; --field-h: 34px; --field-fs: 14px; }
.mct-row .mct-label { flex: 1 1 220px; width: auto !important; min-width: 0; }
.mct-row .mct-type { flex: 0 0 170px; width: auto !important; }
.mct-row .mct-options { flex: 1 1 100%; width: auto !important; }
.mct-row { flex-wrap: wrap; }
.mct-badge { font-weight: 600; text-transform: none; }
.dcl-row .dcl-del { border-color: transparent; background: transparent; color: var(--muted); }
.mct-row .mct-en-wrap { margin: 0; } .mct-row .mct-badge { margin-left: auto; }
.set-menu-h { padding: 14px 12px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.set-menu-h:first-child { padding-top: 0; }
/* Recherche globale : libellé et précision l'un sous l'autre */
.sr-txt { display: flex; flex-direction: column; line-height: 1.35; }
.cell-stack { display: flex; flex-direction: column; line-height: 1.35; }
.cell-stack small { font-size: 12.5px; color: var(--muted); }
.avatar-sm .ico-svg { width: 15px; height: 15px; }
/* Fiche formation : compteurs sous le titre du module */
.fdet-mtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.fdet-mtxt .fdet-mtitre { white-space: normal; }
.fdet-mtxt .fdet-mcount { display: block; font-size: 12.5px; color: var(--muted); }

/* Retour vers la fenêtre précédente */
.modal-back { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 12px -6px; padding: 5px 8px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.modal-back:hover { background: var(--bg); color: var(--ink); }
.modal-back .ico-svg { width: 15px; height: 15px; transform: none !important; }
/* Résultats d'une évaluation */
.eval-res-tbl { margin-top: 18px; }
.eval-res-tbl .s-go { display: inline-flex; color: var(--muted); }
.eval-res-tbl .s-go .ico-svg { width: 16px; height: 16px; }
.eval-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.eval-pct.good { color: var(--green); }
.eval-pct.mid { color: #D9822B; }
.eval-pct.low { color: var(--red); }
.eval-pct.none { color: var(--muted); font-weight: 500; }
.eval-modal-actions { flex-wrap: wrap; }
.eval-res-tbl td { vertical-align: middle; } .eval-res-tbl .s-go { vertical-align: middle; }
