/* ==========================================================================
   SkillBridge Institute — English Hub
   Système de design : prune (structure), bleu (actions), ambre (mise en avant).
   Titres en Montserrat, texte en Inter.
   ========================================================================== */
:root {
  --plum-900: #2a2035;
  --plum-800: #382b47;
  --plum: #4b3a5f;
  --plum-soft: #efeaf5;
  --accent: #3d6fd0;          /* actions (boutons, liens) */
  --accent-2: #6f9be6;
  --accent-soft: #e3ecfb;
  --on-accent: #ffffff;
  --amber: #f4b545;           /* mise en avant (étape en cours, séries) */
  --amber-soft: #fdf1d8;
  --amber-ink: #8a5a00;
  --coral: #ef7d5a;
  --coral-soft: #fde7df;
  --teal: #2fa58f;
  --teal-soft: #ddf3ee;

  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-2: #f0eef5;
  --text: #161821;
  --muted: #646b7d;
  --border: #e6e4ee;

  --ok: #1f8a55;
  --ok-soft: #e2f4ea;
  --bad: #c8372d;
  --bad-soft: #fbe6e4;
  --warn: #9a6500;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(42, 32, 53, .06), 0 8px 24px rgba(42, 32, 53, .06);
  --shadow-lg: 0 12px 40px rgba(42, 32, 53, .14);
  --side-w: 248px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: Montserrat, Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --plum-soft: #2b2338;
    --accent: #7aa2f0;
    --accent-2: #9dbcf5;
    --accent-soft: #22304c;
    --on-accent: #0d1526;
    --amber-soft: #3a2f17;
    --amber-ink: #f4c36a;
    --coral-soft: #3a241d;
    --teal-soft: #173229;
    --bg: #14121a;
    --surface: #1d1a25;
    --surface-2: #27232f;
    --text: #ecebf1;
    --muted: #a7a3b3;
    --border: #332e3d;
    --ok: #5cc98a;
    --ok-soft: #183224;
    --bad: #ff8a80;
    --bad-soft: #3b1f1d;
    --warn: #f0b44c;
    --shadow: none;
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 15.5px/1.6 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.04rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- Barre du haut (visiteurs) ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 28px;
  background: var(--plum-900);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand svg { flex: none; }
.brand b { display: block; font-family: var(--font-title); font-weight: 800; font-size: 1.08rem; line-height: 1.1; }
.brand small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .2em; color: var(--amber); }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.topbar nav a, .linklike {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #cfc6dc; font: 600 .94rem var(--font);
  padding: 8px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer;
}
.topbar nav a:hover, .linklike:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.topbar nav a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.topbar nav a[data-nav="login"] { background: var(--amber); color: var(--plum-900); margin-left: 6px; }
.topbar.open nav a[data-nav="login"] { margin-left: 0; }
.topbar nav a[data-nav="login"]:hover { filter: brightness(1.06); color: var(--plum-900); }
.topbar nav .badge { display: inline-block; min-width: 1.5em; padding: 0 6px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .72rem; text-align: center; margin-left: auto; }
.menu-btn { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; place-items: center; }
.menu-btn svg { width: 22px; height: 22px; }
.active-user { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #cfc6dc; }
.active-user select { max-width: 200px; }
.side-foot:empty { display: none; }

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 28px 56px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px; border-top: 1px solid var(--border); }

/* Bouton « Retour » commun à toutes les pages (sauf l'accueil) */
.backbar { width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 28px 0; }
.backbar[hidden] { display: none; }
.backbar:not([hidden]) + main { padding-top: 14px; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 8px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text, inherit); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.back-btn:hover { border-color: var(--accent); color: var(--accent); }
.back-btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.back-btn svg { width: 18px; height: 18px; }
.has-side .backbar { max-width: 1180px; padding: 18px 34px 0; }

/* ---------- Espace connecté : menu latéral ---------- */
body.has-side { padding-left: var(--side-w); }
.has-side .topbar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w);
  flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px;
  padding: 22px 14px 16px; background: var(--plum-900); border: 0; overflow-y: auto;
}
.has-side .brand { color: #fff; padding: 0 8px 18px; }
.has-side .brand small { color: var(--amber); }
.has-side .topbar nav { flex-direction: column; align-items: stretch; gap: 2px; }
.has-side .topbar nav a, .has-side .linklike { color: #cfc6dc; padding: 10px 12px; border-radius: 12px; width: 100%; text-align: left; }
.has-side .topbar nav a:hover, .has-side .linklike:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.has-side .topbar nav a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--amber); }
.has-side .nav-sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 8px; }
.has-side .active-user { margin: 6px 4px 0; flex-direction: column; align-items: stretch; color: #cfc6dc; }
.has-side .active-user select { max-width: none; background: var(--plum-800); color: #fff; border-color: rgba(255, 255, 255, .15); }
.side-foot { margin-top: auto; padding-top: 12px; }
.coach-card { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 14px; font-size: .84rem; color: #cfc6dc; }
.coach-card b { color: #fff; display: block; font-size: .92rem; }
.coach-card a { color: var(--amber); font-weight: 700; text-decoration: none; display: inline-block; margin-top: 6px; }
.has-side main { max-width: 1180px; padding: 30px 34px 56px; }
.has-side .foot { border-top: 0; }

/* Barre d'onglets (élève, téléphone) */
.tabbar { display: none; }

@media (max-width: 900px) {
  body.has-side { padding-left: 0; padding-bottom: 72px; }
  .has-side .topbar {
    position: sticky; top: 0; bottom: auto; width: auto; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; overflow: visible;
  }
  .has-side .brand { padding: 0; }
  .menu-btn { display: grid; }
  .has-side .menu-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; }
  .topbar nav, .topbar .active-user, .topbar .side-foot { display: none; width: 100%; }
  .topbar.open nav { display: flex; flex-direction: column; align-items: stretch; padding: 8px 0 4px; }
  .topbar.open .active-user { display: flex; }
  .topbar.open .side-foot { display: block; }
  main, .has-side main { padding: 22px 16px 40px; }
  .backbar, .has-side .backbar { padding: 14px 16px 0; }
  .backbar:not([hidden]) + main { padding-top: 12px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar[hidden] { display: none; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tabbar a.active { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; }
}

/* ---------- Blocs de base ---------- */
.lead { color: var(--muted); font-size: 1.04rem; max-width: 72ch; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--accent-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card .tag, .tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
.section { margin-top: 32px; }
.section-sm { margin-top: 14px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok-text { color: var(--ok); font-weight: 700; }
.stat { font-family: var(--font-title); font-size: 1.8rem; font-weight: 800; }
.empty { color: var(--muted); padding: 28px; text-align: center; border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.selectable { user-select: all; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* ---------- Boutons et formulaires ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 .93rem var(--font-title); cursor: pointer; text-decoration: none;
  border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent);
  padding: 9px 20px; border-radius: 99px; transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent-soft); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--plum-900); }
.btn.danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 5px 13px; font-size: .84rem; }
a.btn { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px;
}
textarea { width: 100%; min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
label.field, div.field { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; font-weight: 600; color: var(--muted); }
label.field.grow { flex: 1; min-width: 200px; }
.form-error { color: var(--bad); font-size: .9rem; margin: 0; min-height: 1em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table tr:last-child td { border-bottom: 0; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.ko { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--amber-soft); color: var(--amber-ink); }

/* ---------- Pastilles de compétence ---------- */
.dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--plum); }
.dot svg { width: 19px; height: 19px; }
.dot.l { background: var(--accent); } .dot.r { background: var(--coral); } .dot.g { background: var(--plum); }
.dot.v { background: var(--teal); } .dot.t { background: var(--amber); color: var(--plum-900); } .dot.p { background: #5c6bc0; }
.dot.w { background: #b5548b; } .dot.x { background: #9a94a6; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ---------- Leçons ---------- */
.lesson { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.lesson h3 { margin-top: 1.3em; }
.lesson h3:first-child { margin-top: 0; }
.lesson ul { padding-left: 1.2em; }
.lesson li { margin-bottom: 4px; }
.lesson .box { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 14px 18px; margin: 14px 0; }
.lesson table { margin: 12px 0; }

/* ---------- Exercices ---------- */
.ex { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.ex .num { font-size: .74rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .07em; }
.ex .prompt { font-weight: 600; font-size: 1.02rem; margin: 8px 0 14px; }
.ex .context { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 14px; white-space: pre-line; }
.ex .context.mono { font-family: ui-monospace, Consolas, monospace; font-size: .86rem; white-space: pre; overflow-x: auto; line-height: 1.5; }
.options { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  font: 500 1rem var(--font); background: var(--surface); color: var(--text);
  border: 2px solid var(--border); border-radius: 14px; padding: 11px 14px; transition: border-color .12s, background .12s;
}
.opt .letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 800 .92rem var(--font-title); background: var(--surface-2); flex: none; }
.opt:hover:not(:disabled) { border-color: var(--accent-2); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt.selected .letter { background: var(--accent); color: var(--on-accent); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .letter { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }
.gap-input { width: 150px; margin: 0 4px; }
.gap-input.correct { border-color: var(--ok); background: var(--ok-soft); }
.gap-input.wrong { border-color: var(--bad); background: var(--bad-soft); }
.feedback { margin-top: 14px; font-size: .93rem; padding: 12px 16px; border-radius: 14px; border-left: 5px solid; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.feedback.ko { background: var(--amber-soft); color: var(--bad); border-color: var(--amber); }
.feedback .why { color: var(--text); display: block; margin-top: 4px; }
.feedback .why.tr { color: var(--muted); }
.feedback .say-btn { display: flex; width: max-content; margin-top: 8px; }
.feedback .say-btn.playing, .say-mini.playing { background: color-mix(in srgb, var(--amber) 22%, transparent); }
.say-mini { border: 0; background: none; cursor: pointer; font-size: .95em; padding: 0 4px; border-radius: 6px; vertical-align: baseline; }
.say-mini:hover, .say-mini:focus-visible { background: color-mix(in srgb, var(--amber) 22%, transparent); }
.context.tr { font-style: italic; color: var(--muted); }
.listen-hint { margin-bottom: 6px; font-style: normal; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; margin-bottom: 8px; }
.match-row select { width: 100%; }
.model { margin-top: 12px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 18px; white-space: pre-line; }
.photo { display: block; width: auto; max-width: min(100%, 600px); max-height: 440px; height: auto; border-radius: 14px; margin: 4px 0 14px; }
.scene { border: 1.5px dashed var(--border); border-radius: var(--radius-sm); padding: 16px; background: var(--surface-2); font-style: italic; margin-bottom: 12px; }
.audio-btn { display: inline-flex; align-items: center; gap: 6px; }

.scorebar {
  position: sticky; bottom: 12px; margin-top: 22px; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  padding: 10px 12px 10px 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-lg);
}
.scorebar strong { font-size: 1.1rem; }
@media (max-width: 900px) { .has-side .scorebar { bottom: 82px; } }

/* Mode « une question à la fois » */
.focus-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; min-width: 180px; }
.segs button { height: 9px; border-radius: 6px; border: 0; padding: 0; background: var(--border); cursor: pointer; }
.segs button.answered { background: var(--accent-2); }
.segs button.ok { background: var(--ok); }
.segs button.ko { background: var(--bad); }
.segs button.now { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.segs button.now:is(.ok, .ko, .answered) { box-shadow: 0 0 0 3px var(--amber); }
.segs button.now.ok { background: var(--ok); } .segs button.now.ko { background: var(--bad); } .segs button.now.answered { background: var(--accent-2); }
.focus-count { font: 800 .9rem var(--font-title); color: var(--muted); white-space: nowrap; }
.focus-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* ---------- Onglets, minuteur, progression ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 16px 0 24px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 700; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.timer { font: 800 1.05rem var(--font-title); font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 14px; }
.timer:empty { display: none; }
.timer.low { color: var(--bad); border-color: var(--bad); }
.phase { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.progress { display: block; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > * { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

/* ---------- Éditeur de droits d'accès (professeur) ---------- */
.access-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.access-group { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px 12px; margin: 0; min-width: 0; background: var(--surface); }
.access-group legend { padding: 0 6px; font-weight: 700; }
label.check { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; padding: 3px 0; cursor: pointer; }
label.check.sub { padding-left: 22px; color: var(--muted); }
label.check input { flex: none; }

/* ==========================================================================
   Pages publiques
   ========================================================================== */
.hero { padding: 28px 0 8px; }
.eyebrow-pill { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--plum); background: var(--amber-soft); padding: 6px 14px; border-radius: 99px; margin-bottom: 14px; }
.hero-title { font-family: var(--font-title); font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; max-width: 18ch; }
.hero-title span { color: var(--accent); }
.session-banner { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: var(--plum-900); color: #fff; border-radius: var(--radius); padding: 16px 22px; }
.session-banner span { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--amber); font-weight: 700; }
.session-banner b { font-size: 1.15rem; font-family: var(--font-title); }
.session-banner a { margin-left: auto; color: var(--amber); font-weight: 700; }
.perks-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: linear-gradient(135deg, var(--plum-900), var(--plum)); color: #fff; border-radius: 22px; padding: 24px; }
.perks-row div { display: flex; flex-direction: column; gap: 4px; }
.perks-row b { font-family: var(--font-title); }
.perks-row span { font-size: .9rem; color: #d9d0e6; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; margin-top: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.plan.highlight { border: 2px solid var(--amber); box-shadow: var(--shadow-lg); }
.plan h3 { margin: 0; }
.plan p { margin: 0; font-size: .9rem; }
.plan-flag { position: absolute; top: -13px; left: 20px; background: var(--amber); color: var(--plum-900); font-size: .74rem; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.plan-price { font-family: var(--font-title); font-size: 1.6rem; font-weight: 800; margin: 4px 0; }
.plan-per { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan-note { margin-top: -6px !important; }
.plan-features { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 7px; font-size: .92rem; flex: 1; }
.plan-features li { padding-left: 24px; position: relative; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.plan .btn { text-align: center; }
.contact-card { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.contact-block { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; box-shadow: var(--shadow);
  display: grid; gap: 22px; grid-template-columns: minmax(220px, 1fr) 2fr; align-items: center; }
.contact-intro h2 { margin-bottom: 6px; }
.contact-intro p { color: var(--muted); margin: 0; }
.contact-actions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.contact-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--surface-2); border: 1.5px solid transparent; transition: transform .15s, border-color .15s, box-shadow .15s; min-width: 0; }
.contact-tile:hover { transform: translateY(-2px); border-color: var(--accent-2); box-shadow: var(--shadow); }
.contact-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); }
.contact-icon svg { width: 24px; height: 24px; fill: #fff; }
.contact-tile.is-wa .contact-icon { background: #1fae54; }
.contact-tile.is-mail .contact-icon { background: var(--coral); }
.contact-tile.is-form .contact-icon { background: var(--plum); }
.contact-text { display: flex; flex-direction: column; min-width: 0; }
.contact-text b { font-size: 1rem; }
.contact-text span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 720px) { .contact-block { grid-template-columns: 1fr; padding: 20px; } }
/* Page de connexion : formulaire épuré (libellés au-dessus, grands champs arrondis, bouton pilule) */
.login-wrap { max-width: 460px; margin: 24px auto 56px; }
.login-card { display: flex; flex-direction: column; }
.login-card h1 { font: 800 clamp(2rem, 5vw, 2.6rem)/1.1 var(--font-title); text-align: center; margin: 12px 0 8px; color: var(--plum-900); }
.login-sub { text-align: center; color: var(--muted); margin: 0 0 30px; }
.login-info { margin: -12px 0 22px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.login-label { font-weight: 700; margin: 0 0 8px; }
.login-input { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 16px; border: 1.5px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.login-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login-input svg { flex: none; }
.login-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 1.05rem; padding: 14px 0; box-shadow: none; }
.login-input.bad, .login-input.bad:focus-within { border-color: var(--bad); background: var(--bad-soft); }
.login-input.bad:focus-within { box-shadow: 0 0 0 4px var(--bad-soft); }
.login-eye { flex: none; background: none; border: 0; padding: 6px 2px; font: 700 .9rem var(--font); color: var(--text); cursor: pointer; }
.login-eye:hover { text-decoration: underline; }
.login-err { margin: 8px 0 0; color: var(--bad); font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.login-err::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; font-size: .7rem; font-weight: 800; }
.login-input + .login-label, .login-err + .login-label { margin-top: 22px; }
.login-forgot { align-self: flex-end; margin-top: 14px; font-weight: 700; text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.login-help { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.login-submit { margin-top: 30px; min-height: 58px; border: 0; border-radius: 999px; background: var(--plum-900); color: #fff; font: 700 1.1rem var(--font); cursor: pointer; transition: background .15s, transform .1s; }
.login-submit:hover { background: var(--plum); }
.login-submit:active { transform: scale(.99); }
.login-submit:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-card .form-error { text-align: center; margin: 12px 0 0; }
@media (prefers-color-scheme: dark) {
  .login-card h1 { color: var(--text); }
  .login-submit { background: var(--amber); color: #2a2035; }
  .login-submit:hover { background: #f7c56a; }
}
.request.is-new { border-left: 4px solid var(--accent); }
.offer-tabs { display: inline-flex; gap: 10px; margin: 8px 0 16px; flex-wrap: wrap; }
.offer-tabs button { font: 800 1.02rem var(--font-title); border: 2px solid var(--accent); background: var(--surface); color: var(--accent); padding: 12px 24px; border-radius: 99px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.offer-tabs button:hover { background: var(--accent-soft); }
.offer-tabs button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.offer-tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(61, 111, 208, .3); }
@media (max-width: 560px) { .offer-tabs { display: flex; width: 100%; } .offer-tabs button { flex: 1 1 0; padding: 12px 10px; } }
.compare th, .compare td { text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare td.yes { color: var(--ok); font-weight: 800; }
.compare td.no { color: var(--muted); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 20px 68px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--amber); color: var(--plum-900); font: 800 1rem var(--font-title); display: grid; place-items: center; }
.steps span { color: var(--muted); font-size: .92rem; }
.steps .step-link { margin-top: auto; padding-top: 8px; font-weight: 700; text-decoration: none; }
.steps .step-link:hover { text-decoration: underline; }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* ==========================================================================
   Espace apprenant
   ========================================================================== */
.preview-banner { background: var(--amber-soft); color: var(--text); border-radius: 12px; padding: 9px 14px; font-size: .9rem; margin-bottom: 18px; }
.dash-head, .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h1, .page-head h1 { margin-bottom: 4px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.badge-chip.amber { background: var(--amber-soft); border-color: transparent; color: var(--amber-ink); }
.badge-chip svg { width: 15px; height: 15px; }

/* Tableau de bord */
.dash-grid { display: grid; gap: 18px; grid-template-columns: 1.7fr 1fr; }
.hero-card { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(135deg, var(--plum-900), var(--plum) 62%, #5d4a78); text-decoration: none; display: block; }
.hero-card::after { content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 181, 69, .32), transparent 70%); pointer-events: none; }
.hero-card .eyebrow { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.hero-card h2 { font-size: 1.55rem; margin: 8px 0 4px; color: #fff; }
.hero-card p { color: #ddd4ea; margin: 0 0 16px; }
a.hero-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.phases { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.phases li { font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #e6def0; }
.phases li.past { background: rgba(47, 165, 143, .3); color: #c4f2e4; }
.phases li.past::before { content: "✓ "; }
.phases li.now { background: var(--amber); color: var(--plum-900); }
.goal-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.goal-card h2 { align-self: flex-start; }
.gauge { width: 200px; height: 112px; }
.gauge-value { font: 800 2.1rem var(--font-title); margin-top: -50px; line-height: 1.2; }
.gauge-label { font-size: .85rem; color: var(--muted); }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.kpi { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; text-decoration: none; color: inherit; min-width: 0; box-shadow: var(--shadow); }
a.kpi:hover { border-color: var(--accent-2); }
.kpi-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.kpi-ico svg { width: 22px; height: 22px; }
.kpi-ico.l { background: var(--accent-soft); color: var(--accent); }
.kpi-ico.a { background: var(--amber-soft); color: var(--amber-ink); }
.kpi-ico.t { background: var(--teal-soft); color: var(--teal); }
.kpi-ico.c { background: var(--coral-soft); color: var(--coral); }
.kpi-label { display: block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi-value { display: block; font: 800 1.45rem var(--font-title); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-sub { display: block; font-size: .8rem; color: var(--muted); }
.kpi .progress { margin-top: 8px; }
.days { display: flex; gap: 5px; margin-top: 6px; }
.days i { width: 16px; height: 7px; border-radius: 4px; background: var(--border); }
.days i.on { background: var(--amber); }
.three-col { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.two-col { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.todo { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.todo li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: inherit; }
.todo li a:hover { background: var(--accent-soft); }
.todo b { display: block; font-size: .94rem; }
.todo small { color: var(--muted); font-size: .8rem; }
.skill { display: grid; grid-template-columns: 96px 1fr 44px; gap: 10px; align-items: center; font-size: .88rem; margin-bottom: 11px; }
.skill b { text-align: right; font-variant-numeric: tabular-nums; }
.coach-panel { background: var(--plum-soft); border-color: transparent; }
.homework { margin-top: 8px; padding: 10px 12px; background: var(--surface); border-radius: 12px; font-size: .9rem; border-left: 4px solid var(--amber); }
.recent, .mock-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.recent li, .mock-list li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 11px 16px; }
.recent li > span:first-child, .mock-list li > span:first-child { flex: 1; min-width: 0; }
.mock-list li b { font-variant-numeric: tabular-nums; }
.quick .card { display: flex; gap: 14px; align-items: flex-start; }
.quick .card h3 { margin-bottom: 2px; }

/* Parcours : frise par semaines */
.path-layout { display: grid; gap: 26px; grid-template-columns: 1fr 300px; align-items: start; }
.timeline { position: relative; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--border); }
.timeline .fill { position: absolute; left: 11px; top: 10px; width: 3px; border-radius: 3px; background: linear-gradient(var(--ok), var(--ok) calc(100% - 30px), var(--amber)); }
.stage { position: relative; margin-bottom: 28px; }
.stage::before { content: ""; position: absolute; left: -32px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: var(--surface); border: 4px solid var(--border); z-index: 1; }
.stage.done::before { border-color: var(--ok); background: var(--ok); }
.stage.now::before { border-color: var(--amber); box-shadow: 0 0 0 6px var(--amber-soft); }
.stage-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stage-head .wk { font-size: .73rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stage-head h3 { font-size: 1.1rem; margin: 0; }
.stage.now .stage-head h3 { color: var(--plum); }
@media (prefers-color-scheme: dark) { .stage.now .stage-head h3 { color: var(--amber); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 10px 13px; text-align: center; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; align-items: center; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile .dot { width: 54px; height: 54px; margin-bottom: 9px; }
.tile .dot svg { width: 24px; height: 24px; }
.tile b { display: block; font-size: .83rem; line-height: 1.28; }
.tile small { display: block; color: var(--muted); font-size: .74rem; margin-top: 3px; }
.tile .state { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.tile.ok .state { background: var(--ok); color: #fff; }
.tile.started .state { background: var(--amber-soft); color: var(--amber-ink); }
.tile.next { border: 2px solid var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.tile.next .state { background: var(--amber); color: var(--plum-900); }
.tile.locked { opacity: .5; pointer-events: none; }
.milestone { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, var(--plum-900), var(--plum)); color: #fff; border-radius: 16px; padding: 14px 18px; margin-top: 12px; text-decoration: none; }
.milestone .dot { background: var(--amber); color: var(--plum-900); }
.milestone b { display: block; font-family: var(--font-title); }
.milestone small { color: #d6cde3; }
.milestone .go { margin-left: auto; }
.milestone.done { background: linear-gradient(90deg, #1b5e3f, var(--ok)); }
.path-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.aside-head { background: var(--plum-900); color: #fff; margin: -22px -22px 16px; padding: 18px 22px; border-radius: var(--radius) var(--radius) 0 0; }
.aside-head small { color: var(--amber); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; font-size: .7rem; }
.aside-head b { display: block; font: 800 1.3rem var(--font-title); }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mini div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.mini b { display: block; font: 800 1.15rem var(--font-title); }
.mini small { color: var(--muted); font-size: .74rem; }
.tip-card { background: var(--accent-soft); border-color: transparent; }
.tip-card p { color: var(--text); font-size: .9rem; margin-top: 8px; }

/* Page d'activité : Apprendre / S'entraîner / Valider */
.act-head { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.act-head .dot { width: 52px; height: 52px; }
.act-head .dot svg { width: 24px; height: 24px; }
.act-head h1 { margin: 0; }
.step-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 22px 0 24px; padding: 6px; background: var(--surface-2); border-radius: 16px; }
.step-tabs a { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 8px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; }
.step-tabs a b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 .8rem var(--font-title); background: var(--surface); }
.step-tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.step-tabs a.active b { background: var(--amber); color: var(--plum-900); }
.step-tabs a.done b { background: var(--ok); color: #fff; }
.next-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.verdict { margin-bottom: 20px; border-width: 2px; }
.verdict.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.verdict.is-ko { border-color: var(--amber); background: var(--amber-soft); }
.verdict .big { font: 800 2.6rem var(--font-title); line-height: 1; }
main :is(.verdict, .section, #session, #review, .focus-top) { scroll-margin-top: 24px; }

/* Cours, entraînement, tests */
.filters { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.filters input[type=search] { width: 100%; max-width: 540px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 700 .84rem var(--font); padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--plum-900); border-color: var(--plum-900); color: #fff; }
.course { display: flex !important; flex-direction: column; gap: 8px; }
.course-top { display: flex; align-items: center; gap: 12px; }
.course h3 { margin: 0; }
.course .meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
a.mistakes-card { text-decoration: none; color: inherit; background: linear-gradient(135deg, var(--coral-soft), var(--surface) 70%); border-color: transparent; }
a.mistakes-card:hover { transform: translateY(-2px); }
.test-card { border-top: 4px solid var(--amber); }
.meters { display: flex; flex-direction: column; gap: 13px; }
.meter { display: grid; grid-template-columns: minmax(160px, 1.4fr) 2fr 52px auto; gap: 12px; align-items: center; }
.meter a { font-weight: 600; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; }
.meter a .dot { width: 28px; height: 28px; }
.meter a .dot svg { width: 14px; height: 14px; }

/* Guide de bienvenue */
.modal-back { position: fixed; inset: 0; background: rgba(20, 15, 28, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: 22px; max-width: 520px; width: 100%; padding: 30px; box-shadow: var(--shadow-lg); text-align: center; }
.modal .dot { width: 72px; height: 72px; margin: 0 auto 14px; }
.modal .dot svg { width: 32px; height: 32px; }
.modal p { color: var(--muted); }
.modal-dots { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.modal-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.modal-dots i.on { background: var(--amber); width: 22px; border-radius: 6px; }

/* ---------- Écrans moyens et téléphones ---------- */
@media (max-width: 1200px) {
  .three-col { grid-template-columns: 1fr 1fr; }
  .three-col > :last-child:nth-child(3) { grid-column: 1 / -1; }
  .path-layout { grid-template-columns: 1fr 260px; }
}
@media (max-width: 900px) {
  .dash-grid, .path-layout, .three-col { grid-template-columns: 1fr; }
  .path-aside { position: static; order: -1; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .topbar:not(.open) nav { display: none; }
  .menu-btn { display: grid; }
  .kpis { grid-template-columns: 1fr; }
  .step-tabs a { flex-direction: column; gap: 3px; font-size: .82rem; }
  .match-row { grid-template-columns: 1fr; gap: 4px; }
  .meter { grid-template-columns: 1fr 52px; }
  .meter .progress { grid-column: 1 / -1; grid-row: 2; }
  .meter > :last-child { grid-column: 1 / -1; }
  h1 { font-size: 1.45rem; }
  .ex { padding: 18px; }
  .lesson { padding: 20px; }
  .scorebar { border-radius: 18px; }
}

/* ==========================================================================
   Pages réglementaires, questionnaires, attestation
   ========================================================================== */
.foot { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--accent); }
.foot-copy { max-width: 760px; font-size: .74rem; line-height: 1.45; }
.foot-copy a { color: var(--muted); font-weight: 600; }
.legal .card h2 { font-size: 1.05rem; margin: 10px 0 4px; display: flex; align-items: center; gap: 8px; }
.legal .card h2:first-child { margin-top: 0; }
.legal .card p, .legal .card li { color: var(--text); }
.todo-mark { background: var(--amber-soft); color: var(--amber-ink); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.likert { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.likert legend { font-weight: 600; padding: 0 4px; }
.likert label { cursor: pointer; }
.likert input { position: absolute; opacity: 0; }
.likert span { display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--border); font-weight: 700; background: var(--surface); }
.likert input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.likert input:focus-visible + span { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.attestation [contenteditable] { border-bottom: 1px dashed var(--muted); outline: none; }
@media print {
  body.has-side { padding: 0; }
  .topbar, .foot, .tabbar, .no-print, .preview-banner { display: none !important; }
  main, .has-side main { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 0; }
  .attestation [contenteditable] { border: 0; }
}

/* Offres TOEIC */
.offer-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.offer-filter { font-weight: 600; }
.offer-rac { background: var(--ok-soft); color: var(--text); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px !important; }
.offer-legal { margin-top: 22px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.offer-legal p { margin: 0 0 6px; }
.offer-exam { background: var(--amber-soft); color: var(--text); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px !important; }

/* Collège et lycée */
.sco-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px 14px; margin: 6px 0 4px; }
.sco-price .plan-price { margin: 0; }
.sco-credit { color: var(--ok); font-weight: 600; margin: 2px 0 0 !important; }
.sco-teaser { border-color: var(--amber); }

/* Messagerie */
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.msg-list { padding: 6px; max-height: 70vh; overflow: auto; }
.msg-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.msg-item:hover, .msg-item.active { background: var(--surface-2); }
.msg-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; }
.msg-ic svg { width: 18px; height: 18px; }
.msg-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-meta small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread { display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.msg-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.msg-back { display: none; font-size: 1.4rem; text-decoration: none; }
.msg-body { flex: 1; max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.msg { max-width: 78%; background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 10px 12px; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg.mine .msg-foot, .msg.mine .msg-foot .linklike, .msg.mine a { color: rgba(255, 255, 255, .85); }
.msg.annonce { max-width: 100%; align-self: stretch; background: var(--amber-soft); color: var(--text); border: 1px solid var(--amber); border-radius: 14px; }
.msg.annonce .msg-foot, .msg.annonce .msg-foot .linklike { color: var(--muted); }
.msg-text { white-space: normal; overflow-wrap: anywhere; }
.msg-foot { margin-top: 4px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.msg-compose { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.msg-compose textarea { width: 100%; resize: vertical; }
.group-annonce { background: var(--amber-soft); border-radius: 12px; padding: 10px 12px; margin: 10px 0 6px; }
@media (max-width: 899px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-layout.has-thread .msg-list { display: none; }
  .msg-layout:not(.has-thread) .msg-thread { display: none; }
  .msg-back { display: inline; }
  .msg { max-width: 90%; }
}

/* Retours visuels : chargement, bouton en cours, confirmations */
.load-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .2s; overflow: hidden; }
.load-bar.on { opacity: 1; }
.load-bar::before { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, var(--amber), var(--accent)); animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar { 0% { left: -40%; } 100% { left: 100%; } }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { position: relative; cursor: progress !important; opacity: .85; }
.is-busy::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .5em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1001; display: flex; flex-direction: column; gap: 10px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 12px 32px rgba(20, 12, 35, .22); border-left: 5px solid var(--ok); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .22s, transform .22s; }
.toast.in { opacity: 1; transform: none; }
.toast.error { border-left-color: var(--bad); }
.toast.wait, .toast.info { border-left-color: var(--accent); }
.toast-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ok); }
.toast.error .toast-ic { background: var(--bad); }
.toast.wait .toast-ic, .toast.info .toast-ic { background: var(--accent); }
.toast-msg { flex: 1; font-weight: 600; font-size: .95rem; }
.toast-x { border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.confirm-modal p { font-size: 1.05rem; font-weight: 600; margin: 0 0 18px; color: var(--text); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
body.has-tabbar .toast-stack, body:has(.tabbar:not([hidden])) .toast-stack { bottom: 84px; }
@media (prefers-reduced-motion: reduce) { .load-bar::before, .spinner, .is-busy::after { animation-duration: 2.5s; } .toast { transition: none; } }
.boot-loader { min-height: 50vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 600; }
.boot-loader .spinner { width: 1.6em; height: 1.6em; border-width: 3px; color: var(--accent); }
/* Planning */
.zone { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; font: 800 .68rem var(--font-title); color: #fff; margin-left: 2px; }
.zone.zA { background: #e0803a; } .zone.zB { background: #3d9a6a; } .zone.zC { background: #8b5cc4; }
.ferie-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--bad); vertical-align: -1px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.day.vac { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 8px, var(--surface-2) 8px, var(--surface-2) 16px); }
.day.ferie { border-color: var(--bad); }
.day-head { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.day-note { font-size: .72rem; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 3px 6px; }
.day-note.ferie { color: var(--bad); background: var(--bad-soft); font-weight: 700; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); border-radius: 8px; padding: 6px 8px; font: 500 .8rem Inter, system-ui, sans-serif; cursor: pointer; }
.ev.grp { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, var(--surface)); }
.ev.cancelled { opacity: .55; text-decoration: line-through; }
.ev.done { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.ev:hover { filter: brightness(.97); }
.month .mdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; font-size: .78rem; color: var(--muted); text-transform: capitalize; padding: 0 4px 4px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mcell { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-height: 92px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.mcell.out { opacity: .45; }
.mcell.today { border-color: var(--accent); }
.mcell.vac { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 7px, var(--surface-2) 7px, var(--surface-2) 14px); }
.mcell.ferie { border-color: var(--bad); }
.mcell .ev { font-size: .72rem; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhead { display: flex; justify-content: space-between; font-size: .8rem; }
.ev-modal { text-align: center; position: relative; max-width: 560px; }
.ev-close { position: absolute; top: 12px; right: 14px; }
.up-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up-list li { display: grid; grid-template-columns: 190px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.up-list li.cancelled { opacity: .7; }
.up-date { font-weight: 700; font-size: .9rem; }
@media (max-width: 899px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .mgrid, .month .mdays { gap: 3px; }
  .mcell { min-height: 64px; padding: 4px; }
  .mcell .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; }
  .up-list li { grid-template-columns: 1fr; }
}

/* Planning : grille horaire de la semaine (clic sur un créneau = nouveau cours) */
.tgrid { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.tg-heads { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.tg-head { padding: 8px 6px; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px; border-left: 1px solid var(--border); }
.tg-head small { width: 100%; color: var(--muted); font-size: .7rem; }
.tg-head .tg-ferie { color: var(--bad); font-weight: 700; }
.tg-head.today { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tg-head.today b { color: var(--accent); }
.tgrid-body { display: grid; grid-template-columns: 52px 1fr; max-height: 62vh; overflow-y: auto; }
.tg-hours { border-right: 1px solid var(--border); }
.tg-hour { font-size: .7rem; color: var(--muted); text-align: right; padding: 2px 6px 0 0; box-sizing: border-box; }
.tg-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tg-col { position: relative; border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.tg-col.vac { background: repeating-linear-gradient(135deg, transparent, transparent 8px, var(--surface-2) 8px, var(--surface-2) 16px); }
.tg-col.ferie { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.tg-slot { height: 26px; flex: none; border: 0; border-top: 1px solid var(--border); background: transparent; cursor: pointer; padding: 0; }
.tg-slot.half { border-top: 1px dashed color-mix(in srgb, var(--border) 60%, transparent); }
.tg-slot:hover, .tg-slot:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); outline: none; }
.tg-slot:hover::after { content: "+"; color: var(--accent); font-weight: 800; }
.tg-ev { position: absolute; left: 3px; right: 3px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: .74rem; line-height: 1.2; z-index: 1; }
.tg-ev span { font-weight: 600; }
.tg-ev small { color: var(--muted); }
.course-modal { max-width: 640px; max-height: 92vh; overflow-y: auto; position: relative; }
.course-modal .access-group { display: flex; flex-direction: column; gap: 10px; }
.course-modal .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.course-modal .chip.on { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; background: var(--plum); color: #fff; border-radius: 99px; padding: 4px 10px; font-size: .8rem; }
.course-modal .chip.on .linklike { color: #fff; margin-left: 4px; }
.ev-peda { text-align: left; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-size: .9rem; }
.ev-peda p { margin: 4px 0; }
.up-title details { margin-top: 2px; }

/* Assistant d'orientation (visiteurs) */
.assistant { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.as-launch { display: flex; align-items: center; gap: 0; border: 0; background: transparent; cursor: pointer; padding: 0; }
.as-bubble { width: 60px; height: 60px; border-radius: 50%; background: var(--amber); color: var(--plum-900); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(20, 12, 35, .3); transition: transform .2s; }
.as-bubble svg { width: 28px; height: 28px; }
.as-label { max-width: 0; overflow: hidden; white-space: nowrap; background: var(--plum-900); color: #fff; font: 700 .9rem var(--font-title); padding: 12px 0; border-radius: 99px 0 0 99px; margin-right: -14px; transition: max-width .3s, padding .3s; }
.as-launch:hover .as-label, .as-launch:focus-visible .as-label { max-width: 260px; padding: 12px 26px 12px 18px; }
.as-launch:hover .as-bubble { transform: scale(1.06); }
.assistant.open .as-label { display: none; }
.as-panel { display: none; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); background: var(--surface); color: var(--text); border-radius: 20px; box-shadow: 0 18px 50px rgba(20, 12, 35, .35); overflow: hidden; flex-direction: column; }
.assistant.open .as-panel { display: flex; animation: asIn .2s ease-out; }
@keyframes asIn { from { opacity: 0; transform: translateY(10px); } }
.as-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, var(--plum-900), var(--plum)); color: #fff; }
.as-head small { display: block; color: #d8cfe6; font-size: .78rem; margin-top: 2px; }
.as-avatar svg { width: 42px; height: 42px; display: block; }
.as-close { margin-left: auto; border: 0; background: transparent; color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1; align-self: flex-start; }
.as-log { position: relative; flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg, var(--surface-2)); }
.as-cards { display: flex; flex-direction: column; gap: 8px; }
.as-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; font: inherit; }
.as-card:hover { border-color: var(--accent); }
.as-card b { display: block; font-size: .92rem; }
.as-card small { color: var(--muted); font-size: .8rem; }
.as-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--plum); display: grid; place-items: center; }
.as-ic svg { width: 20px; height: 20px; }
.as-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.45; }
.as-msg p { margin: 0; }
.as-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.as-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.as-link { display: block; margin-top: 8px; font-weight: 700; }
.as-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.as-opts button { border: 1px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 99px; padding: 7px 12px; font: 600 .82rem var(--font-title); cursor: pointer; }
.as-opts button:hover { background: var(--accent); color: #fff; }
.as-form { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.as-form input, .as-form textarea { width: 100%; box-sizing: border-box; }
.as-typing { display: inline-flex; gap: 4px; }
.as-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: asDot 1s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asDot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.as-input { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.as-input input { flex: 1; }
.as-input button { border: 0; background: var(--accent); color: #fff; border-radius: 10px; width: 42px; cursor: pointer; font-size: 1rem; }
.as-note { margin: 0; padding: 0 12px 10px; font-size: .72rem; color: var(--muted); }
@media (max-width: 600px) { .assistant { right: 12px; bottom: 12px; } .assistant.open .as-panel { height: calc(100vh - 100px); } }

/* Fiches « Découvrir le TOEIC » */
.gd-banner { display: flex; gap: 14px; align-items: center; margin: 0 0 18px; border-color: var(--amber); }
.gd-banner small { display: block; color: var(--muted); }
.gd-banner .btn { margin-left: auto; }
.gd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gd-card { display: flex; gap: 12px; align-items: center; padding: 14px; text-decoration: none; color: inherit; }
.gd-card small { display: block; color: var(--muted); font-size: .8rem; }
.gd-card.sub { background: var(--surface-2); }
.gd-card .pill { margin-left: auto; }
.gd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; margin-top: 10px; }
.gd-body { padding: 26px 30px; }
.gd-h { display: inline-block; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--plum-900); padding: 6px 18px 6px 12px; border-radius: 0 99px 99px 0; margin: 22px 0 10px -30px; padding-left: 30px; font-size: 1.15rem; }
.gd-table th { width: 32%; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); text-align: left; vertical-align: top; }
.gd-table td { background: color-mix(in srgb, var(--amber) 6%, var(--surface)); }
.gd-qa { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gd-qa li { border-left: 3px solid var(--accent); padding: 4px 10px; }
.gd-qa span { color: var(--muted); font-size: .9rem; }
.gd-tip { border-left: 4px solid var(--coral); background: color-mix(in srgb, var(--coral) 7%, var(--surface)); border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 10px 0; }
.gd-tip b { color: var(--coral); }
.gd-tip p { margin: 4px 0 0; }
.gd-note { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.gd-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.gd-lang { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }

/* ---- Nouveaux types d'exercices (exercises-plus.js) ---- */
.context.listenable .say { cursor: pointer; border-radius: 4px; transition: background .15s; }
.context.listenable .say:hover, .context.listenable .say:focus { background: color-mix(in srgb, var(--amber) 22%, transparent); outline: none; }
.context.listenable .say.on { background: color-mix(in srgb, var(--amber) 45%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 7px 12px; font: inherit; font-size: .95rem; cursor: pointer; box-shadow: 0 1px 0 var(--border); text-align: left; }
.chip:hover:not(:disabled) { border-color: var(--accent-2); }
.chip.selected { border-color: var(--accent); background: var(--accent-soft); }
.chip.used { visibility: hidden; }
.chip.dragging { opacity: .5; }
.chip.correct { border-color: var(--ok); background: var(--ok-soft); }
.chip.wrong { border-color: var(--bad); background: var(--bad-soft); }
.chip:disabled { cursor: default; }
.dd-text { line-height: 2.6; font-size: 1.02rem; white-space: pre-line; }
.slot { display: inline-block; min-width: 110px; min-height: 34px; vertical-align: middle; margin: 0 4px; padding: 3px 10px; border: none; border-bottom: 2px solid var(--muted); background: var(--surface-2); border-radius: 8px 8px 0 0; font: inherit; color: var(--text); cursor: pointer; line-height: 1.4; }
.slot.over, .slot:hover:not(:disabled) { border-bottom-color: var(--accent); background: var(--accent-soft); }
.slot.filled { background: var(--accent-soft); border-bottom-color: var(--accent); font-weight: 600; }
.slot.correct { background: var(--ok-soft); border-bottom-color: var(--ok); }
.slot.wrong { background: var(--bad-soft); border-bottom-color: var(--bad); text-decoration: line-through; }
.fix { color: var(--ok); font-weight: 700; margin: 0 6px 0 2px; font-size: .9rem; }
.fix-in { color: var(--ok); font-weight: 700; font-size: .85rem; }
.pool { min-height: 46px; border-top: none; padding-top: 0; }
.bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.bin { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 10px; min-height: 110px; cursor: pointer; background: var(--surface-2); }
.bin.over { border-color: var(--accent); background: var(--accent-soft); }
.bin-title { font: 700 .92rem var(--font-title); margin-bottom: 8px; }
.bin-drop { display: flex; flex-wrap: wrap; gap: 6px; }
.order-line { min-height: 52px; border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface-2); }
.order-line:empty::before { content: attr(data-empty); color: var(--muted); font-size: .9rem; }
.order-line.blocks, .chips.blocks { flex-direction: column; align-items: stretch; }
.chip.block { width: 100%; line-height: 1.45; }
.order-line.correct { border-color: var(--ok); background: var(--ok-soft); }
.order-line.wrong { border-color: var(--bad); background: var(--bad-soft); }
.tf-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tf-s { flex: 1 1 320px; }
.tf-btns { display: flex; gap: 6px; }
.tf-b { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.tf-b.selected { border-color: var(--accent); background: var(--accent-soft); }
.tf-b.correct { border-color: var(--ok); background: var(--ok-soft); }
.tf-b.wrong { border-color: var(--bad); background: var(--bad-soft); }
.tf-why { flex-basis: 100%; font-size: .88rem; }
.tf-why.ok { color: var(--ok); } .tf-why.ko { color: var(--bad); }
.opt.multi .letter.box { font-size: 1.1rem; }
.fc-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0 10px; }
.fc { width: min(420px, 100%); min-height: 190px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(160deg, var(--accent-soft), var(--surface)); box-shadow: var(--shadow); display: grid; place-items: center; text-align: center; padding: 20px; cursor: pointer; }
.fc.flipped { background: linear-gradient(160deg, var(--amber-soft), var(--surface)); }
.fc-face { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fc-word { font: 800 1.5rem var(--font-title); }
.fc-ex { font-style: italic; color: var(--muted); max-width: 360px; }
.fc-end { text-align: center; padding: 18px; background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); }
.fc-recall { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dict-diff { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.8; }
.w-ok { color: var(--ok); } .w-miss { color: var(--bad); text-decoration: line-through; font-weight: 600; } .w-extra { color: var(--muted); font-style: italic; }
.read-aloud { font-size: 1.08rem; line-height: 1.7; }
.tips { margin: 0 0 10px; padding-left: 20px; color: var(--muted); }
.rec-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.rec-box .btn.rec-on { background: var(--bad); border-color: var(--bad); color: #fff; }
.rec-out { flex-basis: 100%; } .rec-out audio { width: 100%; max-width: 460px; }
.self-eval { margin: 10px 0; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); display: grid; gap: 4px; }
.model-d { margin-top: 10px; } .model-d summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.dlg { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.dlg-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); max-width: 85%; }
.dlg-line.mine { align-self: flex-end; background: var(--accent-soft); }
.dlg-line.now { outline: 2px solid var(--amber); }
.dlg-who { font: 700 .8rem var(--font-title); color: var(--muted); text-transform: uppercase; }
.dlg-res { flex-basis: 100%; font-weight: 700; font-size: .9rem; }
.dlg-res.ok { color: var(--ok); } .dlg-res.ko { color: var(--bad); } .dlg-res .small { font-weight: 400; color: var(--muted); }
.hs-stage { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); user-select: none; }
.hs-stage img { display: block; max-width: 100%; height: auto; }
.hs-mark { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 30%, transparent); pointer-events: none; }
.hs-mark.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 30%, transparent); }
.hs-mark.ko { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 30%, transparent); }
.hs-zone { position: absolute; border: 3px solid var(--ok); border-radius: 6px; background: color-mix(in srgb, var(--ok) 15%, transparent); pointer-events: none; }
.vid-frame { position: relative; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.vid-frame video, .vid-frame iframe, .vid-frame > div { width: 100%; height: 100%; display: block; border: 0; }
.vid-q { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.vid-card { border: 2px solid var(--amber); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.vid-card.past { border-color: var(--border); }
.ev-who { font-style: normal; opacity: .75; }
.skill-tag { display: inline-block; font: 700 .72rem var(--font-title); text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-right: 6px; }
.oral-item { display: grid; gap: 8px; }
.oral-item audio { width: 100%; max-width: 480px; }
.crit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.crit-grid label { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--surface-2); padding: 6px 10px; border-radius: 10px; font-size: .9rem; }
.crit-grid select { width: auto; }
.srs-boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.srs-boxes div { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); font-size: .85rem; }
.srs-boxes b { display: block; font: 800 1.3rem var(--font-title); }
@media (max-width: 640px) {
  .dlg-line { max-width: 100%; }
  .tf-btns { width: 100%; } .tf-b { flex: 1; }
  .slot { min-width: 84px; }
  .srs-boxes { grid-template-columns: repeat(3, 1fr); }
}
.gd-lang span { font-weight: 700; font-size: .9rem; }
.gd-lang button { text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 8px 2px; cursor: pointer; color: var(--muted); font: 600 .92rem var(--font-title); }
.gd-lang button[aria-pressed="true"] { color: var(--coral); }
[data-guide-part] .gd-lang { flex-direction: row; align-items: center; justify-content: flex-end; }
[data-guide-part] .gd-lang button { border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; }
[data-guide-part] .gd-h { margin-left: 0; padding-left: 12px; }
.gd-related { display: flex; flex-direction: column; gap: 6px; padding: 14px; font-size: .88rem; }
.gd-related a { text-decoration: none; }
.gd-related a.on { font-weight: 700; color: var(--coral); }
.gd-next { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; }
.gd-next-info { margin: 0 auto; display: flex; flex-direction: column; text-align: center; }
.gd-next-info small { color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
@media (max-width: 899px) {
  .gd-layout { grid-template-columns: 1fr; }
  .gd-side { position: static; order: -1; }
  .gd-lang { flex-direction: row; align-items: center; }
  .gd-lang button { border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; }
  .gd-body { padding: 18px; }
  .gd-h { margin-left: -18px; padding-left: 18px; }
}

/* Audience */
.aud-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 8px; border-bottom: 1px solid var(--border); }
.aud-bar { flex: 1; min-width: 3px; background: color-mix(in srgb, var(--accent) 25%, var(--surface)); border-radius: 4px 4px 0 0; position: relative; display: flex; align-items: flex-end; }
.aud-bar i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.aud-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.aud-key.v { background: var(--accent); } .aud-key.p { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); }
.aud-list { list-style: none; margin: 0; padding: 0; }
.aud-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
/* Témoignages */
.stars { color: var(--border); letter-spacing: 1px; font-size: 1.05rem; }
.stars .on { color: var(--amber); }
.testi-mod { margin-top: 8px; padding: 8px; border-radius: 10px; background: var(--surface-2); }

/* ---------------------------------------------------------------- éditeur du parcours pédagogique (fiche élève) */
.path-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.path-edit > li { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.path-edit > li.done { background: var(--ok-soft); border-color: transparent; }
.pe-main { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; }
.pe-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 700 .8rem var(--font-title); color: var(--muted); }
.path-edit > li.done .pe-num { background: var(--ok); color: #fff; }
.pe-text { flex: 1; min-width: 0; line-height: 1.5; }
.pe-note { display: block; font-size: .82rem; color: var(--text); margin-top: 2px; }
.pe-btns { display: flex; gap: 4px; flex: none; }
.pe-edit { border-top: 1px dashed var(--border); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.pe-add { display: grid; gap: 10px; background: var(--surface-2); box-shadow: none; }
.pe-tabs { margin: 0; }
.pe-tabs button { font-size: .86rem; padding: 7px 14px; }
.pe-cat { display: grid; gap: 12px; max-height: 340px; overflow: auto; padding-right: 4px; }
.pe-group { display: grid; gap: 4px; }
.pe-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
.pe-item:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.pe-item.in { opacity: .65; cursor: default; }
.pe-plus { font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.pe-task { display: grid; gap: 8px; }
.pe-save { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 2px; align-items: center; }
.pe-save.dirty { border-top: 2px solid var(--amber); }
@media (max-width: 640px) { .pe-main { flex-wrap: wrap; } .pe-btns { width: 100%; justify-content: flex-end; } }

/* ---------------------------------------------------------------- historique de travail */
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: start; font-size: .9rem; }
.history li.h-day { display: block; border: 0; padding: 14px 0 4px; font: 700 .8rem var(--font-title); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.h-ico { font-size: 1.05rem; line-height: 1.4; text-align: center; }
.h-meta { white-space: nowrap; }
@media (max-width: 640px) { .history li { grid-template-columns: 26px 1fr; } .h-meta { grid-column: 2; } }

/* ---------------------------------------------------------------- consignes, échéances et tâches côté élève */
.coach-note { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-soft); border-left: 4px solid var(--amber); font-size: .92rem; }
.tile .tile-due { color: var(--warn); font-weight: 600; }
.tile.late .tile-due { color: var(--bad); }
.tile .tile-note { font-style: italic; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.late { border-color: var(--bad); }
.task-instr { line-height: 1.6; }
.hist-link { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.hist-link small { display: block; color: var(--muted); }
.hist-link:hover { border-color: var(--accent); }

/* Suivi d'un groupe et fiche élève : bulles (connexion + avancement), détail dans une fenêtre */
.as-modal { max-width: 760px; width: min(760px, 96vw); max-height: 92vh; overflow-y: auto; position: relative; text-align: left; }
.as-modal .ev-close { position: absolute; top: 14px; right: 16px; }
.stu-bubbles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.stu-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 14px; text-align: center; font: inherit; color: inherit;
  cursor: pointer; border-radius: 22px; border: 1px solid var(--border); transition: transform .18s ease, box-shadow .18s ease; }
.stu-bubble:hover, .stu-bubble:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stu-bubble:active { transform: scale(.98); }
.stu-bubble:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.stu-ava { position: relative; display: inline-block; flex: none; }
.stu-ini { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--plum-soft); color: var(--plum); font-weight: 800; font-size: 1.05rem; }
.stu-ava .live-dot { position: absolute; right: 1px; bottom: 3px; width: 14px; height: 14px; border: 2px solid var(--surface); }
.stu-ava.lg .stu-ini { width: 76px; height: 76px; font-size: 1.3rem; }
.stu-name { font-size: .95rem; line-height: 1.25; }
.stu-live { min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.stu-prog { display: flex; align-items: center; gap: 8px; width: 100%; }
.stu-prog .progress { flex: 1; min-width: 0; }
.stu-facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stu-facts > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.stu-facts .progress { width: 100%; background: var(--surface); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--border); vertical-align: middle; }
.live-dot.on { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.home-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.home-tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 150px; padding: 16px 18px; text-align: left; font: inherit; color: inherit;
  cursor: pointer; border-radius: 22px; border: 1px solid var(--border); transition: transform .18s ease, box-shadow .18s ease; }
.home-tile:hover, .home-tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.home-tile:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.ht-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.ht-icon svg { width: 20px; height: 20px; }
.ht-icon.tone-b { background: var(--accent-soft); color: var(--accent); }
.ht-icon.tone-t { background: var(--teal-soft); color: var(--teal); }
.ht-title { font-size: 1.05rem; }
.ht-main { font-size: 1.05rem; font-weight: 800; }

/* Rubrique Parcours : parcours types (échelle CECRL, niveaux, tests), éditeur par glisser-déposer, attribution */
.pt-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pt-card { display: flex; flex-direction: column; gap: 10px; border-radius: 22px; }
.pt-card h3 { margin: 0; font: 800 1.08rem/1.3 var(--font-title); }
.pt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pt-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .82rem; color: var(--muted); }
.cefr-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; max-width: 320px; }
.cefr-scale span { text-align: center; font: 800 .74rem var(--font-title); padding: 5px 0; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.cefr-scale .mid { background: var(--accent-soft); color: var(--accent); }
.cefr-scale .from { background: var(--plum); color: #fff; }
.cefr-scale .to { background: var(--amber); color: #2a2035; }
.pt-head { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pt-head .card { display: flex; flex-direction: column; gap: 6px; }
.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.pt-aside { display: grid; gap: 12px; position: sticky; top: 12px; }
.pt-q { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pt-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 16px; }
.pt-timeline::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--border); }
.pt-node { position: relative; padding-left: 54px; }
.pt-node-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.pt-node-head h3 { margin: 0 0 4px; font: 800 1.05rem var(--font-title); }
.pt-badge { position: absolute; left: 0; top: 0; width: 41px; height: 41px; border-radius: 50%; display: grid; place-items: center; background: var(--plum); color: #fff; font: 800 1rem var(--font-title); box-shadow: 0 0 0 5px var(--bg); }
.pt-node.start .pt-badge { background: var(--accent); }
.pt-node.end .pt-badge { background: var(--amber); color: #2a2035; }
.pt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pt-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pt-steps li.locked { opacity: .55; }
.pt-steps li > span:not(.dot) { display: flex; flex-direction: column; min-width: 0; }
.pt-steps li small { color: var(--muted); font-size: .76rem; }
.pt-steps .dot { width: 28px; height: 28px; flex: none; }
.pt-steps .dot svg { width: 15px; height: 15px; }
.pt-test { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--amber-soft); border: 1px solid var(--amber); font-size: .92rem; }
.pt-test > span { display: flex; flex-direction: column; }
.pt-test small { color: var(--muted); }
.pb { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 10px; }
.pb-cat { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 40px); }
.pb-list { overflow: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.pb-markers { display: grid; gap: 8px; }
.pb-mk { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.pb-fam summary { cursor: pointer; padding: 6px 4px; }
.pb-group { margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .03em; font-size: .7rem; }
.pb-item { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: grab; font-size: .84rem; margin-bottom: 4px; }
.pb-item:hover { border-color: var(--accent); }
.pb-item.in { opacity: .55; }
.pb-item > span:not(.dot) { flex: 1; min-width: 0; }
.pb-item .dot { width: 24px; height: 24px; flex: none; }
.pb-item .dot svg { width: 14px; height: 14px; }
.pb-add { flex: none; border: 0; background: var(--accent-soft); color: var(--accent); width: 28px; height: 28px; border-radius: 50%; font-weight: 800; cursor: pointer; }
.pb-add:disabled { background: var(--ok-soft); color: var(--ok); cursor: default; }
.pb-zone { border: 2px dashed transparent; border-radius: 14px; padding: 4px; transition: border-color .15s, background .15s; min-height: 120px; }
.pb-zone.drop-on { border-color: var(--accent); background: var(--accent-soft); }
.pb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pb-steps > li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pb-steps > li.pb-stage { margin-top: 10px; background: var(--plum-soft); border-color: transparent; }
.pb-steps > li.pb-stage:first-child { margin-top: 0; }
.pb-steps > li.pb-test { background: var(--amber-soft); border-color: var(--amber); }
.pb-steps > li.dragging { opacity: .9; box-shadow: var(--shadow-lg); background: var(--accent-soft); position: relative; z-index: 2; }
.pb-steps .pe-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pb-steps .pe-title small { color: var(--muted); font-size: .78rem; }
.pe-btn { flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; }
.pe-btn:hover { background: var(--bad-soft); color: var(--bad); }
.pb-empty { justify-content: center; color: var(--muted); padding: 30px 10px; border: 2px dashed var(--border) !important; list-style: none; }
.grip { flex: none; cursor: grab; touch-action: none; border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.grip:hover, .grip:focus-visible { color: var(--accent); background: var(--accent-soft); }
.grip:active { cursor: grabbing; }
.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.as-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.as-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; padding: 4px 0; }
@media (max-width: 900px) { .pb, .pt-layout { grid-template-columns: minmax(0, 1fr); } .pb-cat, .pt-aside { position: static; } .pb-cat { max-height: 460px; } }

/* ---------------------------------------------------------------- labo oral (lab.js, lab-talk.js) */
.context { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.tutor-msgs { display: flex; flex-direction: column; gap: 10px; min-height: 280px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.tutor-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.tutor-msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.tutor-msg.ai { align-self: flex-start; background: var(--accent-soft); color: var(--text); border-bottom-left-radius: 4px; }
.tutor-msg.typing { opacity: .6; animation: tutorPulse 1.2s ease-in-out infinite; }
@keyframes tutorPulse { 50% { opacity: .3; } }
@media (max-width: 760px) { .tutor-msg { max-width: 92%; } }
.btn.rec-on { background: var(--bad); border-color: var(--bad); color: #fff; }
.hw-rec { gap: 8px; align-items: center; margin-top: 6px; }
.hw-ai { border: 1px dashed var(--accent); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--accent-soft); margin-bottom: 8px; }
.hw-ai summary { cursor: pointer; font-weight: 700; }
.pron-row { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.pron-target { font-weight: 700; }
.pron-ok { color: var(--ok); font-weight: 700; }
.pron-ko { color: var(--bad); font-weight: 700; text-decoration: underline wavy; }
.lab-player { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 8px 10px; margin: 6px 0; }
.lab-wave { position: relative; height: 64px; cursor: pointer; border-radius: 8px; background: var(--surface-2); outline-offset: 2px; }
.lab-wave canvas { display: block; width: 100%; height: 64px; }
.lab-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lab-marks { position: absolute; inset: 0; pointer-events: none; }
.lab-mark { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; border: 0; padding: 0; border-radius: 2px; background: var(--bad); opacity: .85; pointer-events: auto; cursor: pointer; }
.lab-mark.span { margin-left: 0; min-width: 4px; background: color-mix(in srgb, var(--bad) 28%, transparent); border-left: 3px solid var(--bad); }
.lab-mark.ai { background: var(--accent); }
.lab-mark.ai.span { background: color-mix(in srgb, var(--accent) 25%, transparent); border-left-color: var(--accent); }
.lab-ctrl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.lab-ctrl [data-play] { min-width: 42px; }
.lab-time { margin-left: 4px; font-variant-numeric: tabular-nums; }
.lab-speed { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lab-speed select { padding: 2px 4px; }
.lab-studio { border: 2px solid var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.lab-mic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab-mic select { max-width: 240px; }
.lab-meter { flex: 1; min-width: 100px; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.lab-meter i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
.lab-rec { display: flex; align-items: center; gap: 16px; }
.lab-big { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--bad); background: var(--surface); color: var(--bad); font-size: 1.6rem; cursor: pointer; flex: none; }
.lab-big:hover { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.lab-big.on { background: var(--bad); color: #fff; animation: lab-pulse 1.4s ease-in-out infinite; }
@keyframes lab-pulse { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--bad) 18%, transparent); } }
@media (prefers-reduced-motion: reduce) { .lab-big.on { animation: none; } }
.lab-clock { font-size: 1.3rem; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.lab-clock.warn b { color: var(--bad); }
.lab-live { border-left: 3px solid var(--accent-soft); padding-left: 8px; }
.lab-review { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 14px; }
.lab-anns { display: flex; flex-direction: column; gap: 4px; }
.lab-ann, .lab-obs { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.lab-ann { border-left: 3px solid var(--bad); background: var(--surface-2); }
.lab-ann.ai { border-left-color: var(--accent); }
.lab-ann > span, .lab-obs > span { flex: 1; }
.lab-ann.flash { outline: 2px solid var(--amber); }
.lab-at { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 6px; font: inherit; font-size: .85em; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; flex: none; }
.lab-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lab-add select { max-width: 200px; }
.lab-obs { border-top: 1px dashed var(--border); }
.lab-segs { line-height: 1.7; }
.lab-seg { cursor: pointer; border-radius: 4px; padding: 0 1px; }
.lab-seg:hover { background: var(--accent-soft); }
.lab-seg.now { background: var(--amber-soft); }
.lab-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lab-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: .9rem; flex: none; }
.lab-x:hover { color: var(--bad); }
.lab-segs.dialogue { display: flex; flex-direction: column; gap: 3px; }
.lab-seg.ai { color: var(--muted); }
.lab-talk { border: 2px solid var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.lab-talk-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; }
@media (max-width: 760px) { .lab-talk-body { grid-template-columns: 1fr; } .lab-talk-side { order: -1; } }
.lab-talk-chat { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lab-talk-chat .tutor-msgs { min-height: 180px; max-height: 46vh; }
.lab-talk-ctrl { display: flex; gap: 12px; align-items: center; }
.lab-talk-start { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lab-talk-side { border-left: 1px solid var(--border); padding-left: 12px; }
@media (max-width: 760px) { .lab-talk-side { border-left: 0; padding-left: 0; } }
.lab-goals { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; font-size: .9em; }
.lab-goals li { padding-left: 22px; position: relative; }
.lab-goals li::before { content: "○"; position: absolute; left: 2px; color: var(--muted); }
.lab-goals li.done::before { content: "✓"; color: var(--ok); font-weight: 700; }
.lab-goals li.done { color: var(--ok); }
.lab-goals li.miss::before { content: "✗"; color: var(--bad); }
.lab-vocab { display: flex; flex-wrap: wrap; gap: 4px; }
.lab-show { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }
.lab-shadow { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
.lab-shadow .pron-row.on { outline: 2px solid var(--amber); border-radius: 8px; }
.lab-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; padding: 6px; background: var(--surface-2); border-radius: 16px; }
.lab-tabs a { flex: 1 1 180px; text-align: center; padding: 10px 8px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; }
.lab-tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.lab-station { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
@media (max-width: 860px) { .lab-station { grid-template-columns: 1fr; } }
.lab-students { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 12px; max-height: 80vh; overflow-y: auto; }
@media (max-width: 860px) { .lab-students { position: static; flex-direction: row; overflow-x: auto; max-height: none; } .lab-stu { min-width: 180px; } }
.lab-stu { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font: inherit; }
.lab-stu.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.lab-scen { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lab-scen-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; cursor: pointer; }
.lab-scen-card input { position: absolute; opacity: 0; pointer-events: none; }
.lab-scen-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.grade-form h3 { font-size: 1.05rem; }
#tf label.field { min-width: 0; max-width: 100%; } #tf select, #tf input:not([type=radio]):not([type=checkbox]) { max-width: 100%; }

/* Offre promotionnelle (champ promo de content/offres-toeic.json) */
.promo-banner { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; text-decoration: none; color: var(--plum-900); background: linear-gradient(120deg, var(--amber) 0%, #ffd27a 100%); border-radius: 22px; padding: 24px 28px; box-shadow: var(--shadow-lg); transition: transform .15s ease; }
.promo-banner:hover { transform: translateY(-2px); text-decoration: none; }
.promo-text { flex: 1 1 320px; min-width: 0; }
.promo-tag { display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: var(--plum-900); color: var(--amber); padding: 5px 12px; border-radius: 99px; }
.promo-text h2 { margin: 10px 0 6px; font-size: clamp(1.25rem, 3.5vw, 1.7rem); color: var(--plum-900); }
.promo-text p { margin: 0; font-size: .92rem; }
.promo-price { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.promo-price s { font-size: 1.1rem; font-weight: 600; opacity: .7; }
.promo-price b { font-family: var(--font-title); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.promo-price .btn { margin-top: 10px; background: var(--plum-900); color: #fff; }
.plan.promo .plan-flag { background: var(--plum-900); color: var(--amber); }
.price-old { font-size: 1.05rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.promo-cond { color: var(--plum); font-weight: 700; }

/* Avis : la note d'abord, puis les témoignages en petites bulles dépliables */
.testi-score { display: flex; align-items: center; gap: 14px 18px; margin-bottom: 16px; }
.testi-score > div:last-child { min-width: 0; }
.testi-score p { margin: 2px 0 0; }
.testi-note { display: flex; flex-shrink: 0; align-items: baseline; gap: 4px; font-family: var(--font-title); }
.testi-note b { font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--text); }
.testi-note span { font-size: 1.2rem; font-weight: 700; color: var(--muted); }
.testi-score .stars { font-size: 2rem; letter-spacing: 3px; }
.testi-bubbles { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.testi-bubble { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 3px; max-width: min(100%, 300px); background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-size: .86rem; line-height: 1.4; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
.testi-bubble:hover, .testi-bubble:focus-visible { border-color: var(--amber); box-shadow: var(--shadow); }
.testi-bubble[aria-expanded="true"] { max-width: min(100%, 520px); background: var(--surface); border-color: var(--amber); }
.testi-bubble .small-stars { color: var(--amber); font-size: .8rem; letter-spacing: 1px; }
.testi-text { font-style: italic; }
.testi-who { font-size: .76rem; color: var(--muted); font-weight: 600; }
.testi-more { color: var(--accent); }

/* Offres en version courte (accueil) : un clic ouvre la fiche complète au-dessus d'une pile de feuilles */
.plans-mini { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 18px; }
.offer-mini { all: unset; box-sizing: border-box; position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 16px 14px; box-shadow: var(--shadow); color: var(--text); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.offer-mini[hidden] { display: none; }
.offer-mini:hover, .offer-mini:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--amber); }
.offer-mini.promo { border: 2px solid var(--amber); padding-top: 20px; }
.offer-mini.promo .plan-flag { background: var(--plum-900); color: var(--amber); left: 14px; }
.offer-mini .pill { font-size: .7rem; }
.offer-mini-name { font-family: var(--font-title); font-size: 1.05rem; margin-top: 4px; }
.offer-mini-price { font-family: var(--font-title); font-size: 1.3rem; font-weight: 800; margin-top: 4px; }
.offer-mini-price s { font-size: .9rem; font-weight: 600; color: var(--muted); }
.offer-mini-more { margin-top: auto; padding-top: 6px; font-size: .82rem; font-weight: 700; color: var(--accent); }
.offer-pop-back { z-index: 950; animation: popFade .2s ease; overflow-y: auto; }
.offer-pop-back.closing { animation: popFade .18s ease reverse forwards; }
.offer-stack { position: relative; width: min(440px, 100%); margin: auto; animation: popOut .28s cubic-bezier(.2, .9, .3, 1.2); }
.offer-pop-back.closing .offer-stack { animation: popOut .18s ease reverse forwards; }
.offer-stack::before, .offer-stack::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.offer-stack::before { transform: translate(10px, 12px) rotate(2.5deg); opacity: .65; }
.offer-stack::after { transform: translate(5px, 6px) rotate(1.2deg); opacity: .85; }
.offer-stack .plan { z-index: 1; box-shadow: var(--shadow-lg); max-height: calc(100vh - 48px); overflow-y: auto; }
.offer-pop-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; }
.offer-pop-close:hover { border-color: var(--amber); }
@keyframes popFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes popOut { from { opacity: 0; transform: translateY(24px) scale(.88); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .offer-stack, .offer-pop-back, .offer-pop-back.closing, .offer-pop-back.closing .offer-stack { animation: none; } }
.offer-stack .plan-flag { position: static; align-self: flex-start; margin-right: 40px; }

/* Choix de la formule par boutons (inscription) */
.picker { display: grid; gap: 14px; margin-top: 6px; }
.pick-group { display: grid; gap: 8px; }
.pick-label { font: 700 .78rem var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.pick { all: unset; box-sizing: border-box; position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 14px 12px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.pick:hover { transform: translateY(-2px); border-color: var(--amber); }
.pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick b { font-family: var(--font-title); font-size: 1rem; margin-top: 2px; }
.pick small { color: var(--muted); font-size: .78rem; }
.pick .pill { font-size: .68rem; }
.pick-price { font: 800 1.15rem var(--font-title); margin-top: 4px; }
.pick-price s { font-size: .82rem; font-weight: 600; color: var(--muted); }
.pick-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; border: 1.5px solid var(--border); color: transparent; }
.pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.pick[aria-pressed="true"] .pick-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pick.promo, .pick.proposed { padding-top: 22px; }
.pick-flag { position: absolute; top: -9px; left: 12px; font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--plum-900); color: var(--amber); }
.pick.proposed .pick-flag { background: var(--amber); color: var(--plum-900); }
.pick-unsure { flex-direction: column; max-width: 360px; }
.pick-chosen { margin: 0; }
.pick-chosen:empty { display: none; }

/* Programme détaillé d'une formule */
.offer-prog { display: block; text-align: center; margin-top: 8px; font-size: .86rem; font-weight: 700; }
.prog-goals { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prog-price { font: 800 1.4rem var(--font-title); }
.prog-steps summary { cursor: pointer; font-size: .86rem; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.prog-exam { background: var(--ok-soft); border-color: var(--ok); }
.prog-cta { text-align: center; }
.prog-bar { position: sticky; bottom: 12px; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border: 2px solid var(--amber); z-index: 5; }
.prop-hero { background: linear-gradient(135deg, var(--plum-soft), var(--amber-soft)); }
.offer-mini.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
@media (max-width: 900px) { .pt-layout { grid-template-columns: 1fr; } .pt-aside { position: static; } }
@media print { .prog-steps > ul { display: grid !important; } .pt-aside { position: static; } .pt-layout { grid-template-columns: 1fr; } }

/* Contenus hors formule : grisés, verrouillés */
.card.course.locked { opacity: .55; filter: grayscale(.6); cursor: not-allowed; border-style: dashed; }
.card.course.locked:hover { transform: none; }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.lock-tag svg, .lock-ico svg { width: 14px; height: 14px; }
.locked-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.formule-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; border-left: 4px solid var(--amber); }
.prop-line { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.modal.prop-modal { width: min(820px, 100%); max-width: 820px; text-align: left; max-height: calc(100vh - 40px); overflow-y: auto; }
.prop-modal .pick-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.offer-mini .plan-flag { white-space: nowrap; }

/* Inscriptions et règlements : frise des statuts, échéancier, RIB (inscriptions.js) */
.pay-track { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; padding: 0; margin: 12px 0 0; counter-reset: pay; }
.pay-track li { flex: 1 1 120px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); text-align: center; }
.pay-track li span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: grid; place-items: center; font-size: .7rem; position: relative; z-index: 1; }
.pay-track li span::before { counter-increment: pay; content: counter(pay); }
.pay-track li:not(:first-child)::before { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: var(--border); }
.pay-track li.done { color: var(--ok); }
.pay-track li.done span { border-color: var(--ok); background: var(--ok); color: #fff; }
.pay-track li.done span::before { content: "✓"; }
.pay-track li.done::before, .pay-track li.now::before { background: var(--ok) !important; }
.pay-track li.now { color: var(--text); }
.pay-track li.now span { border-color: var(--amber); background: var(--amber-soft); color: var(--amber-ink); box-shadow: 0 0 0 4px var(--amber-soft); }
.pay-table, .rib-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pay-table td, .rib-table td, .rib-table th { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.pay-table td.num { text-align: right; white-space: nowrap; }
.pay-table td.right { text-align: right; }
.pay-table tr.is-paid td { color: var(--ok); }
.rib-table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rib-table td:first-child { color: var(--muted); width: 38%; }
.rib-table code { font-size: .95rem; font-weight: 700; }
.big-amount { font-family: var(--font-title); font-size: 1.25rem; }
.enr-line { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--ok); }
.pay-card .pay-track { margin-top: 10px; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-choice button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--border); font-weight: 600; font-size: .88rem; }
.seg-choice button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.seg-choice button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pay-rules { padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber-ink); }
.pay-rules:empty { display: none; }
.rib-doc { max-width: 720px; }
@media print { .rib-doc { box-shadow: none; border: 1px solid #ccc; } }

/* Bilan du test de niveau envoyé au prospect (#/proposition/<jeton>) : niveau, échelle CECRL, jauge TOEIC, compétences */
.bilan { background: linear-gradient(140deg, var(--plum-800), var(--plum)); color: #fff; border: 0; display: grid; gap: 18px; overflow: hidden; position: relative; }
.bilan::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 181, 69, .28), transparent 70%); pointer-events: none; }
.bilan .muted { color: rgba(255, 255, 255, .65); }
.bilan-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.bilan-badge { flex: none; width: 150px; height: 150px; border-radius: 28px; background: var(--amber); color: #2a2035; display: grid; place-content: center; text-align: center;
  box-shadow: 0 0 0 6px rgba(244, 181, 69, .25), 0 14px 30px rgba(0, 0, 0, .3); animation: bilan-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.bilan-badge small { font: 700 .68rem var(--font); letter-spacing: .14em; text-transform: uppercase; }
.bilan-badge b { font: 900 3.6rem/1 var(--font-title); }
.bilan-badge span { font-size: .74rem; font-weight: 600; padding: 0 8px; }
.bilan-main { flex: 1 1 280px; min-width: 0; display: grid; gap: 10px; }
.bilan-ruler { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bilan-ruler li { text-align: center; padding: 8px 0 6px; border-radius: 12px; background: rgba(255, 255, 255, .08); animation: bilan-rise .5s ease both; animation-delay: var(--d); }
.bilan-ruler li b { display: block; font: 800 1.05rem var(--font-title); }
.bilan-ruler li small { display: block; font-size: .66rem; min-height: 1em; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.bilan-ruler li.past { background: rgba(255, 255, 255, .16); }
.bilan-ruler li.you { background: var(--amber); color: #2a2035; box-shadow: 0 0 0 3px rgba(244, 181, 69, .35); }
.bilan-ruler li.you small { opacity: 1; font-weight: 800; }
.bilan-ruler li.goal { background: transparent; outline: 2px dashed #9fb9ef; outline-offset: -2px; color: #cfdcff; }
.bilan-ruler li.goal small { opacity: 1; font-weight: 800; }
.bilan-toeic { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: .88rem; margin-top: 4px; }
.bilan-toeic b { font: 800 1.6rem var(--font-title); color: var(--amber); }
.bilan-toeic b small { font-size: .8rem; color: rgba(255, 255, 255, .6); }
.bilan-gauge { position: relative; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.bilan-gauge i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #f7c96e, var(--amber)); animation: bilan-grow 1s .3s ease both; transform-origin: left; }
.bilan-gauge em { position: absolute; top: -5px; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: #fff; }
.bilan-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.bilan-skill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-size: .85rem; }
.bilan-skill b { font-size: .74rem; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.bilan-skill.ok b { background: #5cc98a; color: #10301f; }
.bilan-skill.warn b { background: var(--amber); color: #2a2035; }
.bilan-text { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px 16px; font-size: .92rem; line-height: 1.5; }
.bilan-text p { margin: 4px 0; }
.bilan-optin { border: 2px solid var(--amber); background: var(--amber-soft); text-align: center; }
.bilan-optin .btn { font-size: 1rem; padding: 12px 26px; }
.bilan-note { padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); font-size: .88rem; line-height: 1.45; }
.bilan-note.is-optin { background: var(--amber-soft); color: var(--text); }
.mail-btn { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.mail-btn:hover { color: var(--amber-ink); }
.mail-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@keyframes bilan-pop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bilan-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bilan-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .bilan-badge, .bilan-ruler li, .bilan-gauge i { animation: none; } }
@media (max-width: 520px) { .bilan-badge { width: 120px; height: 120px; } .bilan-badge b { font-size: 2.9rem; } .bilan-top { justify-content: center; } }

/* ---------- Statistiques du test de niveau ---------- */
.ts-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ts-seg { display: inline-flex; background: var(--surface-2); border-radius: 99px; padding: 3px; gap: 2px; }
.ts-seg button { border: 0; background: transparent; color: var(--muted); font: 600 .84rem var(--font); padding: 6px 14px; border-radius: 99px; cursor: pointer; }
.ts-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ts-help { margin-top: 12px; }
.ts-help summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .88rem; }
.ts-help p { max-width: 80ch; margin: 8px 0 0; color: var(--muted); }
.ts-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ts-title h2 { margin: 0; }
.ts-title input[type=search] { max-width: 280px; }
.ts-h3 { margin: 0 0 14px; font-size: 1rem; }
.ts-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ts-kpis .card { padding: 16px 18px; }
.ts-kpis .stat { font-size: 1.6rem; margin: 2px 0; }
.ts-alert { border-color: var(--amber); background: var(--amber-soft); }
.ts-funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ts-step-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.ts-step-bar div { height: 100%; background: var(--accent); border-radius: 6px; }
.ts-step:nth-child(n+2) .ts-step-bar div { background: var(--plum); }
.ts-step:last-child .ts-step-bar div { background: var(--ok); }
.ts-step-n { font-family: var(--font-title); font-weight: 800; font-size: 1.35rem; }
.ts-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.ts-cols > .card { min-width: 0; }
.ts-weeks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 170px; align-items: end; }
.ts-week { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.ts-week-n { font-size: .74rem; font-weight: 700; color: var(--muted); }
.ts-week-bar { width: 100%; max-width: 30px; min-height: 2px; background: var(--accent-2); border-radius: 5px 5px 2px 2px; display: flex; align-items: flex-end; overflow: hidden; flex: 0 0 auto; }
.ts-week-bar div { width: 100%; background: var(--plum); }
.ts-week-l { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.ts-nowrap { white-space: nowrap; }
.ts-more { text-align: center; margin-top: 12px; }
.ts-legend { display: flex; gap: 16px; margin-top: 10px; }
.ts-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ts-sw.a { background: var(--accent-2); } .ts-sw.b { background: var(--plum); }
.ts-lvl { display: grid; grid-template-columns: 38px 1fr 78px; gap: 10px; align-items: center; }
.ts-bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ts-bar div { height: 100%; border-radius: 6px; }
.ts-lvl-b { display: inline-block; min-width: 34px; text-align: center; padding: 3px 7px; border-radius: 8px; font-weight: 800; font-size: .8rem; color: #fff; }
.ts-lvl-b.sm { min-width: 0; padding: 1px 6px; font-size: .7rem; }
.lv-A1 { background: #ef7d5a; } .lv-A2 { background: #e0a030; } .lv-B1 { background: #2fa58f; } .lv-B2 { background: #3d6fd0; } .lv-C1 { background: #6a4c8c; }
.ts-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ts-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 600 .84rem var(--font); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.ts-tabs button span { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); font-size: .76rem; text-align: center; }
.ts-tabs button[aria-selected="true"] { background: var(--plum-900); border-color: var(--plum-900); color: #fff; }
.ts-tabs button[aria-selected="true"] span { background: rgba(255, 255, 255, .18); }
.ts-table td { vertical-align: middle; }
.ts-consent { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ts-act { text-align: right; white-space: nowrap; }
.pill.info { background: var(--plum-soft); color: var(--plum); }
.ts-filters { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ts-filters select { width: auto; }
.ts-skills { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ts-skills .card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ts-cmp { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); }
.ts-cmp div { height: 100%; border-radius: 6px; background: var(--accent); }
.ts-cmp i { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--text); border-radius: 2px; }
.ts-cmp.faint { opacity: .45; }
.ts-good { color: var(--ok); font-weight: 700; } .ts-bad { color: var(--bad); font-weight: 700; }
@media (prefers-color-scheme: dark) { .pill.info { color: #cdbde3; } }
@media (max-width: 900px) {
  .ts-cols { grid-template-columns: minmax(0, 1fr); }
  .ts-weeks { gap: 3px; }
  .ts-week:nth-child(even) .ts-week-l { visibility: hidden; }
  .ts-lvl { grid-template-columns: 34px minmax(0, 1fr) 70px; }
  .ts-funnel { grid-template-columns: repeat(2, 1fr); }
  .ts-title input[type=search] { max-width: none; width: 100%; }
}

/* ---------- Forfaits (administrateur) : bulles et panneau d'édition ---------- */
.fx-grid { margin-top: 14px; }
.fx-grid .offer-mini { min-height: 168px; }
.fx-off { opacity: .55; border-style: dashed; }
.fx-marks { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.fx-add { align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--border); box-shadow: none; }
.fx-plus { font: 800 2rem var(--font-title); color: var(--accent); line-height: 1; }
.fx-hidden summary { cursor: pointer; }
.fx-back { align-items: start; overflow-y: auto; }
.fx-panel { background: var(--bg, var(--surface-2)); color: var(--text); border-radius: 22px; width: min(1040px, 100%); margin: 24px auto; padding: 22px 24px 26px; box-shadow: var(--shadow-lg); }
.fx-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.fx-panel-head h2 { margin: 0; font-size: 1.25rem; }
.fx-panel-head .offer-pop-close { position: static; }
.fx-edit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.fx-edit form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.fx-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fx-orig { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 600; color: var(--amber-ink); background: var(--amber-soft); padding: 1px 8px; border-radius: 99px; }
.fx-promo { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 0; }
.fx-promo.on { border-color: var(--amber); background: var(--amber-soft); }
.fx-promo-fields { display: none; margin-top: 10px; }
.fx-promo.on .fx-promo-fields { display: block; }
.fx-promo-fields p { margin: 6px 0 0; }
.fx-fixed { border-top: 1px dashed var(--border); padding-top: 10px; margin: 0; }
.fx-actions { gap: 8px; }
.fx-preview { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.fx-preview-label { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .72rem; }
.fx-mini-wrap .offer-mini { width: 220px; pointer-events: none; }
.fx-card-wrap .plan, .fx-preview .plans { pointer-events: none; }
.fx-preview .plans { grid-template-columns: 1fr; margin: 0; }
.fx-masked { background: var(--surface-2); border: 1px dashed var(--muted); color: var(--muted); border-radius: 12px; padding: 8px 12px; font-size: .86rem; font-weight: 600; }
@media (max-width: 900px) {
  .fx-edit { grid-template-columns: 1fr; }
  .fx-preview { position: static; }
  .fx-panel { padding: 16px; margin: 8px auto; }
  .fx-2 { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------- labo oral en classe (séance en direct) */
.lab-invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber-ink); border: 1px solid var(--amber); }
.lab-dock { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(340px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .9rem; }
.lab-dock-head { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.lab-dock-body { display: grid; gap: 8px; padding: 0 12px 12px; }
.lab-dock.closed .lab-dock-body { display: none; }
.lab-heard { padding: 6px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); font-weight: 700; }
.lab-msg { padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); }
.lab-msg.big { font-size: 1.15rem; margin-top: 10px; }
.lab-timer { font-size: 1.1rem; margin: 8px 0 0; }
.lab-focus { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; text-align: center; padding: 24px;
  background: var(--plum, #263238); color: #fff; }
.lab-focus h2 { color: #fff; font-size: 2rem; margin: 8px 0; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--border); vertical-align: middle; }
.live-dot.ok { background: var(--ok); }
.live-dot.ko { background: var(--bad); }
.live-dot.wait { background: var(--amber); }
.live-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .live-cols { grid-template-columns: 1fr; } }
.live-side { display: grid; gap: 10px; }
.live-panel { display: grid; gap: 8px; padding: 12px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.live-tile { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 10px 8px; border-radius: var(--radius-sm);
  background: var(--surface); border: 2px solid var(--border); }
.live-tile.off { opacity: .55; }
.live-tile.hand { border-color: var(--amber); background: var(--amber-soft); }
.live-tile.heard { border-color: var(--accent); }
.live-tile.sel { box-shadow: 0 0 0 3px var(--accent-soft); }
.live-tile img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.live-name { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.live-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.live-pick { position: absolute; top: 6px; left: 6px; }
.live-page { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-group { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--bg); font-size: .88rem; }
.live-role { padding: 10px 12px; border-left: 4px solid var(--amber); background: var(--amber-soft); border-radius: 8px; margin: 8px 0; }
@media print { .lab-dock, .lab-invite, .lab-focus { display: none !important; } }
/* labo en classe : activités (scripts, jeux de rôle, discussions, prises de parole) */
.live-modal { max-width: 720px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; }
.live-script { display: grid; gap: 4px; margin: 8px 0; }
.live-script > div { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 6px 8px; border-radius: 8px; background: var(--bg); }
.live-script > div.me { background: var(--amber-soft); font-weight: 600; }
.lab-say { border: 0; background: none; cursor: pointer; font: inherit; }
button.pill.lab-say { background: var(--accent-soft); color: var(--accent); }
.live-q { margin: 8px 0; padding-left: 22px; display: grid; gap: 4px; }
.live-goals { display: grid; gap: 4px; margin-top: 4px; }
.live-lib { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.live-act { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.live-act:hover { border-color: var(--accent); }
.live-launch { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.live-edit { display: grid; gap: 8px; }
.live-edit textarea, .live-edit input:not([type=checkbox]), .live-launch input, .live-launch select { width: 100%; }
.live-roles { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 8px; }
/* labo en classe : présentation « téléphone » (widgets arrondis, bulles, pastilles d'app, contrôle segmenté) */
.lv-app { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 1.15rem; line-height: 1; }
.lv-app.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .9rem; }
.lv-app.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 1.6rem; }
.lv-app.tone-b, .lv-ctrl.tone-b .lv-ctrl-ic { background: var(--accent-soft); color: var(--accent); }
.lv-app.tone-t, .lv-ctrl.tone-t .lv-ctrl-ic { background: var(--teal-soft); color: var(--teal); }
.lv-app.tone-a, .lv-ctrl.tone-a .lv-ctrl-ic { background: var(--amber-soft); color: var(--amber-ink); }
.lv-app.tone-c, .lv-ctrl.tone-c .lv-ctrl-ic { background: var(--coral-soft); color: var(--coral); }
.lv-app.tone-p, .lv-ctrl.tone-p .lv-ctrl-ic { background: var(--plum-soft); color: var(--plum); }
/* en-tête de séance */
.lv-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 20px; border-radius: 26px; border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 55%, var(--amber-soft)); box-shadow: var(--shadow); }
.lv-hero-t { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.lv-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center; align-content: center; position: relative;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--border) 0); }
.lv-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.lv-ring b, .lv-ring span { position: relative; line-height: 1; }
.lv-ring b { font-size: 1.5rem; font-weight: 800; }
.lv-ring span { font-size: .72rem; color: var(--muted); }
.lv-ctrls { display: flex; gap: 10px; flex-wrap: wrap; }
.lv-ctrl { display: grid; justify-items: center; gap: 5px; width: 74px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.lv-ctrl-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; transition: transform .15s ease, box-shadow .15s ease; }
.lv-ctrl-ic .ico { width: 22px; height: 22px; }
.lv-ctrl-l { font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.15; }
.lv-ctrl:hover .lv-ctrl-ic { transform: translateY(-2px); box-shadow: var(--shadow); }
.lv-ctrl:active .lv-ctrl-ic { transform: scale(.94); }
.lv-ctrl.on .lv-ctrl-ic { background: var(--amber); color: #3a2a00; box-shadow: 0 0 0 4px var(--amber-soft); }
/* étudiants : bulles avec photo ronde et anneau d'état */
.live-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.live-tile { border: 1px solid var(--border); border-radius: 24px; padding: 16px 10px 12px; gap: 5px; transition: transform .18s ease, box-shadow .18s ease; }
.live-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.live-tile.off { opacity: .6; }
.live-tile.off .lv-ava { filter: grayscale(1); }
.live-tile.hand { border-color: var(--amber); background: linear-gradient(180deg, var(--amber-soft), var(--surface) 70%); }
.live-tile.heard { border-color: var(--accent-2); }
.live-tile.sel { box-shadow: 0 0 0 3px var(--accent-2); }
.live-pick { opacity: .45; }
.live-tile:hover .live-pick, .live-tile.sel .live-pick { opacity: 1; }
.lv-ava { position: relative; width: 66px; height: 66px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--border); }
.live-tile.on .lv-ava { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ok); }
.live-tile.heard .lv-ava { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.live-tile.hand .lv-ava { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--amber); animation: lv-pulse 1.6s ease-in-out infinite; }
@keyframes lv-pulse { 50% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 9px color-mix(in srgb, var(--amber) 35%, transparent); } }
.lv-ava img, .lv-ini { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lv-ini { display: grid; place-items: center; background: var(--plum-soft); color: var(--plum); font-weight: 800; }
.live-tile img { width: 100%; height: 100%; border-radius: 50%; }
.lv-link { position: absolute; right: -1px; bottom: 2px; line-height: 0; }
.lv-link .live-dot { width: 15px; height: 15px; border: 2px solid var(--surface); }
.lv-badge { position: absolute; top: -4px; right: -6px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center;
  font-size: .8rem; background: var(--surface); box-shadow: var(--shadow); }
.lv-badge.rec { color: var(--bad); }
.lv-badge.mic { color: var(--bad); font-weight: 800; }
.live-name { margin-top: 4px; }
.lv-state { color: var(--muted); }
.live-tile.heard .lv-state { color: var(--accent); font-weight: 600; }
.lv-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); }
.lv-chip.act { background: var(--amber-soft); color: var(--amber-ink); }
.live-acts { gap: 6px; margin-top: 2px; }
.lv-round { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center;
  font-size: .95rem; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.lv-round:hover { transform: scale(1.08); border-color: var(--accent-2); }
.lv-round.on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.lv-round.grade { background: var(--accent-soft); border-color: var(--accent-soft); }
/* contrôle segmenté (comme sur un téléphone) */
.lv-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 18px; background: var(--surface-2); }
.lv-seg button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border: 0; border-radius: 14px; background: none; color: var(--muted);
  font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.lv-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lv-seg-ic { font-size: 1.15rem; line-height: 1; }
.lv-seg-dot { position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.lv-panels { display: grid; gap: 10px; }
.live-panel { border-radius: 22px; padding: 14px; }
.lv-ph { display: flex; align-items: center; gap: 10px; }
.lv-ph > span:last-child { display: grid; }
/* bibliothèque : lignes d'apps */
.live-act { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; }
.live-act:hover { background: var(--surface-2); border-color: var(--border); }
.lv-act-t { display: grid; gap: 1px; min-width: 0; flex: 1; }
.lv-act-t b { line-height: 1.25; }
.lv-go { color: var(--muted); line-height: 0; }
.lv-go .ico { width: 16px; height: 16px; }
.lv-act-head { display: flex; align-items: center; gap: 12px; }
/* groupes : avatars superposés */
.live-group { gap: 10px; padding: 8px 10px; border-radius: 16px; }
.lv-stack { display: flex; flex: none; }
.lv-mini { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 800;
  background: var(--plum-soft); color: var(--plum); border: 2px solid var(--surface); overflow: hidden; }
.lv-mini + .lv-mini { margin-left: -10px; }
.lv-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* script façon messagerie */
.live-script { gap: 3px; margin: 12px 0; }
.live-script > div.lv-msg { display: flex; align-items: flex-end; gap: 6px; padding: 0; border-radius: 0; background: none; font-weight: 400; }
.lv-msg.first { margin-top: 8px; }
.lv-msg.r { flex-direction: row-reverse; }
.lv-who { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.lv-msg.first .lv-who { background: var(--plum-soft); color: var(--plum); }
.lv-msg.r.first .lv-who { background: var(--accent-soft); color: var(--accent); }
.lv-msg.me.first .lv-who { background: var(--amber); color: #3a2a00; }
.lv-bub { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 18px; background: var(--surface-2); line-height: 1.4; }
.lv-msg.l .lv-bub { border-bottom-left-radius: 6px; }
.lv-msg.r .lv-bub { border-bottom-right-radius: 6px; background: var(--accent-soft); }
.lv-msg.me .lv-bub { background: var(--amber-soft); color: var(--text); font-weight: 600; }
.lv-bub-n { display: block; font-size: .7rem; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
.lv-msg .lab-say { opacity: .5; padding: 4px; }
.lv-msg:hover .lab-say { opacity: 1; }
/* questions et critères en bulles */
.live-q { list-style: none; padding: 0; counter-reset: q; }
.live-q li { counter-increment: q; display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 16px; background: var(--surface-2); }
.live-q li::before { content: counter(q); width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800;
  background: var(--teal-soft); color: var(--teal); }
.live-goals label { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.live-goals input { accent-color: var(--ok); width: 18px; height: 18px; }
.live-role { border-left: 0; border-radius: 18px; padding: 12px 14px; background: linear-gradient(135deg, var(--amber-soft), var(--surface)); border: 1px solid var(--amber); }
.live-work, .live-me { border-radius: 24px; }
/* panneau permanent : notification flottante */
.lab-dock { border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lab-dock-head { padding: 12px 14px; }
@media (max-width: 640px) { .lv-ctrls { width: 100%; justify-content: space-between; } .lv-ctrl { width: 64px; } }
@media (prefers-reduced-motion: reduce) { .live-tile.hand .lv-ava { animation: none; } .live-tile, .lv-ctrl-ic, .lv-round { transition: none; } }
/* panneau Groupes : une carte par groupe (fiche lue, apprenants, rendus) */
.live-group.lv-gcard { display: grid; gap: 8px; align-items: stretch; padding: 10px; }
.lv-gact { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.lv-gact:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
.lv-gmem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-gmem .lv-mini { width: 28px; height: 28px; flex: none; }
.live-modal { text-align: left; }
