:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-2: #263449;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --ok: #22c55e;
  --danger: #f87171;
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --radius: 14px;
  --hh: 52px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: #a5b4fc; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 18px; }

/* ---------- En-tête (barre unique : marque, sections, compte) ---------- */
.site-header { border-bottom: 1px solid var(--border); background: rgba(15, 23, 42, .94); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(8px); }
.hbar { width: min(1400px, 100%); margin-inline: auto; padding: 0 16px; min-height: var(--hh); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; }
.brand-text { font-size: .9rem; line-height: 1.3; min-width: 0; }
.brand-sub { display: block; color: var(--muted); font-size: .75rem; }
.hactions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-box { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.in-app .hbar { height: var(--hh); }
.in-app .brand-long, .in-app .brand-sub { display: none; }
.in-app .brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Icônes */
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ic-sm { width: 1em; height: 1em; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--card-2); }
.icon-btn .ic { width: 18px; height: 18px; }
.menu-btn { display: none; }
.btn .ic { margin-right: 6px; }
.btn-primary.next .ic { margin-right: 0; margin-left: 6px; }

/* ---------- Composants ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.btn { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 600; cursor: pointer; transition: transform .12s, filter .12s, background .12s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--card-2); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }

label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text);
}
input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }
.form-error { color: var(--danger); font-size: .88rem; min-height: 1.3em; margin-bottom: 8px; }
.notice { background: rgba(139, 92, 246, .15); border: 1px solid var(--secondary); border-radius: 10px; padding: 10px 12px; font-size: .88rem; margin-bottom: 14px; }
.pill { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); }
.pill.live { color: #c7d2fe; border-color: var(--primary); }
.pill.done { color: #bbf7d0; border-color: var(--ok); }

/* ---------- Authentification ---------- */
.auth { padding: 44px 0 60px; display: grid; gap: 24px; justify-items: center; }
.reassure { text-align: center; max-width: 640px; }
.reassure h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.25; }
.reassure p { margin-top: 8px; color: #c7d2fe; font-weight: 600; }
.auth-card { width: min(440px, 100%); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg); padding: 4px; border-radius: 10px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; }
.tab.active { background: var(--grad); color: #fff; }

/* ---------- Espace élève : tout tient dans l'écran ---------- */
body.in-app { height: 100vh; height: 100dvh; overflow: hidden; }
.app-shell { height: calc(100vh - var(--hh) - 1px); height: calc(100dvh - var(--hh) - 1px); display: flex; flex-direction: column; }
.app-wrap { width: min(1400px, 100%); margin-inline: auto; padding-inline: 16px; }

.main-nav { display: flex; gap: 6px; }
.nav-btn { border: 1px solid transparent; background: transparent; border-radius: 999px; height: 30px; padding: 0 14px; color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-btn:hover { color: var(--text); }
.nav-btn.active { background: var(--card); color: var(--text); border-color: var(--primary); }

/* Progression : une seule ligne fine */
.progress-strip { flex: none; display: flex; align-items: center; gap: 12px; height: 38px; }
.pct { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3ch; }
.bar { flex: 1; height: 6px; background: var(--card); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .7s cubic-bezier(.22, 1, .36, 1); }
.counts { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.badge { display: flex; align-items: center; gap: 6px; color: #c7d2fe; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-ic { width: 18px; height: 18px; color: #a5b4fc; }
.badge.pop { animation: pop .5s ease; }

/* Corps : lecteur à gauche, programme à droite */
.app-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; padding-bottom: 12px; grid-template-rows: minmax(0, 1fr); }
.app-body > #pane-learn, .app-body > #pane-cert { grid-column: 1; grid-row: 1; min-height: 0; }
.app-body > .drawer { grid-column: 2; grid-row: 1; min-height: 0; }
.app-body > #pane-cert { overflow-y: auto; }
.stage { overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; }
.stage-inner { --off: 258px; width: min(100%, calc((100vh - var(--off)) * 16 / 9)); width: min(100%, calc((100dvh - var(--off)) * 16 / 9)); min-width: min(100%, 420px); }

.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); --plyr-color-main: #6366f1; --plyr-video-control-background-hover: #6366f1; --plyr-control-radius: 8px; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.player .plyr { position: absolute; inset: 0; width: 100%; height: 100%; }
.player .plyr__video-wrapper { height: 100%; }
.player .plyr video { position: static; width: 100%; height: 100%; }
.player-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; color: var(--muted); padding: 20px; background: radial-gradient(circle at 50% 40%, #1e1b4b, #0b1020); }
.player-empty strong { color: var(--text); font-size: 1rem; }

.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions .btn { height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 0; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.actions .btn-primary { flex: 1; min-width: 0; }
.actions .btn-primary.next { background: var(--ok); color: #052e16; }

.lesson { margin-top: 12px; }
.player-module { color: #a5b4fc; font-size: .78rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson h2 { font-size: 1.1rem; line-height: 1.3; margin-top: 4px; }
.player-obj { color: var(--muted); font-size: .82rem; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.level { margin-left: 0; padding: 1px 8px; font-size: .72rem; }

/* Programme (barre latérale sur PC, tiroir à droite sur mobile) */
.drawer { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 14px; font-size: .85rem; color: var(--muted); }
.drawer-head .icon-btn { display: none; }
.drawer-extra { display: none; }
.sidebar { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; }
.scrim { display: none; }
.app-body.is-cert { grid-template-columns: minmax(0, 1fr); }
.app-body.is-cert > .drawer { display: none; }

.module { border-radius: 10px; }
.module + .module { margin-top: 2px; }
.module-head { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 9px 8px; cursor: pointer; }
.module-head:hover { background: var(--card-2); }
.module-num { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.module.unlocked .module-num { background: var(--grad); border-color: transparent; color: #fff; }
.module.complete .module-num { background: var(--ok); color: #052e16; }
.module-title { flex: 1; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.module-meta { font-size: .76rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.module.locked .module-title { color: var(--muted); }
.module.locked .module-meta { color: #c4b5fd; }
.videos { list-style: none; margin: 2px 0 8px 16px; padding: 0 0 0 8px; border-left: 1px solid var(--border); }
.video-item { width: 100%; display: flex; align-items: flex-start; gap: 8px; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px; color: var(--muted); font-size: .84rem; line-height: 1.35; cursor: pointer; }
.video-item:hover { background: var(--card-2); color: var(--text); }
.video-item.active { background: rgba(99, 102, 241, .18); color: var(--text); }
.video-item .mark { flex: none; width: 18px; display: grid; place-items: center; height: 1.35em; }
.video-item.done .mark { color: var(--ok); }

/* ---------- Pop-ups d'encouragement ---------- */
#toast-zone { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: grid; gap: 10px; z-index: 50; }
.toast { background: var(--card); border: 1px solid var(--primary); border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); animation: rise .3s ease; }
.toast.error { border-color: var(--danger); }
.toast.big { border-color: var(--secondary); background: linear-gradient(135deg, #1e1b4b, #2e1065); }
.toast strong { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.toast strong .ic { color: #c4b5fd; }
.toast p { color: var(--muted); font-size: .9rem; }
.toast .btn { margin-top: 10px; }

/* ---------- Dialogue d'achat ---------- */
dialog { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: min(440px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(2, 6, 23, .75); }
dialog h3 { margin-bottom: 6px; }
.price { font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; }
#buy-instructions { margin-bottom: 14px; font-size: .9rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Certification ---------- */
.cert-locked { text-align: center; padding: 48px 20px; margin-bottom: 50px; }
.cert-locked .big { color: var(--muted); } .cert-locked .big .ic { width: 44px; height: 44px; }
.cert-locked p { color: var(--muted); margin-top: 6px; }
.cert-wrap { display: grid; gap: 16px; justify-items: center; padding-bottom: 50px; }
.certificate {
  width: min(820px, 100%); padding: 40px 36px; text-align: center; border-radius: 18px; position: relative;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box;
  border: 3px solid transparent;
}
.certificate .org { color: #a5b4fc; font-weight: 700; letter-spacing: .02em; }
.certificate h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 10px 0 18px; }
.certificate .who { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 6px 0; word-break: break-word; }
.certificate .desc { max-width: 560px; margin: 8px auto 0; color: var(--muted); }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-top: 28px; text-align: left; flex-wrap: wrap; }
.cert-foot dl { margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.cert-foot dt { color: var(--muted); font-size: .78rem; }
.cert-foot dd { margin: 0; font-weight: 600; word-break: break-all; }
.qr { background: #fff; padding: 8px; border-radius: 10px; text-align: center; color: #0f172a; font-size: .7rem; }
.qr img { display: block; width: 128px; height: 128px; image-rendering: pixelated; }

/* ---------- Vérification ---------- */
.verify { padding: 50px 0; max-width: 560px; }
.verify .card { text-align: center; }
.verify h1 { font-size: 1.4rem; margin: 8px 0; }
.verify .icon .ic { width: 48px; height: 48px; }
.verify .ok { color: var(--ok); }
.verify .ko { color: var(--danger); }

/* ---------- Animations ---------- */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --hh: 48px; }
  .main-nav, .hbar .user-box, .hbar .js-pass { display: none; }
  .menu-btn { display: inline-grid; }
  .hbar { padding: 0 12px; gap: 10px; }
  .brand-sub { display: none; }
  .app-wrap { padding-inline: 0; }
  .progress-strip { padding-inline: 12px; height: 34px; gap: 10px; }
  .count-mod, .badge-label { display: none; }
  .app-body { display: block; padding-bottom: 0; overflow-y: auto; }
  .app-body > #pane-cert { padding: 0 12px 24px; }
  .stage { overflow: visible; display: block; }
  .stage-inner { --off: 0px; width: 100%; min-width: 0; }
  .player { border-radius: 0; border-inline: 0; }
  .actions { padding-inline: 12px; margin-top: 8px; }
  .lesson { padding: 10px 12px 20px; margin-top: 0; }
  .lesson h2 { font-size: 1rem; }
  .player-obj { display: none; }
  .pill.level { display: none; }

  .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); z-index: 60; border-radius: 14px 0 0 14px; border-right: 0; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .drawer.open { transform: none; visibility: visible; transition-delay: 0s; box-shadow: -16px 0 40px rgba(0, 0, 0, .5); }
  .drawer-head { padding: 12px 12px 8px 16px; color: var(--text); font-size: 1rem; }
  .drawer-head .icon-btn { display: inline-grid; }
  .drawer-extra { display: grid; gap: 8px; padding: 0 12px 8px; }
  .drawer-foot { padding: 8px 12px 12px; border-top: 1px solid var(--border); }
  .drawer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .drawer-nav .nav-btn { justify-content: center; border-color: var(--border); }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(2, 6, 23, .7); display: block; }
  .app-body.is-cert > .drawer { display: flex; }
}
@media (max-width: 420px) {
  .actions .btn-ghost .lbl { display: none; }
  .actions .btn-ghost .ic { margin-right: 0; }
  .actions .btn-ghost { padding: 0 12px; }
}
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .progress-strip { display: none; }
  .stage-inner { width: min(100%, calc((100dvh - 60px) * 16 / 9)); margin-inline: auto; }
}

/* ---------- Impression du certificat ---------- */
@media print {
  @page { margin: 12mm; }
  body * { visibility: hidden; }
  #cert-card, #cert-card * { visibility: visible; }
  #cert-card { position: absolute; left: 0; top: 0; width: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* ======================================================================
   Académie Câbles Neuronaux — ajouts (tarifs, programme, achats, admin)
   ====================================================================== */
.reassure .reassure-sub { margin-top: 4px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.public-block { width: min(900px, 100%); text-align: center; }
.public-block h2 { font-size: 1.25rem; margin-bottom: 4px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 10px; display: grid; gap: 2px; }
.price-card strong { font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-card span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.price-card.best { border-color: var(--secondary); box-shadow: 0 0 0 1px var(--secondary) inset; }
.prog-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; text-align: left; }
.prog { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.prog-n { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; }
.prog > div { flex: 1; min-width: 0; }
.prog h3 { font-size: .92rem; margin-bottom: 2px; }
.prog p { font-size: .8rem; color: var(--muted); }
.prog .pill { flex: none; }

.module-level { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.video-item.locked { opacity: .75; }
.video-item.locked .mark { color: #c4b5fd; }
.video-item.exercise .mark { color: #fbbf24; }
.buy-row { width: 100%; text-align: left; display: flex; align-items: center; gap: 6px; background: rgba(139, 92, 246, .15); border: 1px dashed var(--secondary); border-radius: 8px; padding: 7px 10px; font-size: .82rem; cursor: pointer; color: #ddd6fe; margin-bottom: 4px; }
.buy-row:hover { background: rgba(139, 92, 246, .28); }

.opts { display: grid; gap: 8px; margin: 12px 0; }
.opt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text); }
.opt:has(input:checked) { border-color: var(--primary); background: rgba(99, 102, 241, .14); }
.opt input[type="radio"] { width: auto; margin: 0; padding: 0; accent-color: var(--primary); }
.opt-body { flex: 1; min-width: 0; }
.opt-body strong { display: block; font-size: .92rem; }
.opt-body small { color: var(--muted); font-size: .78rem; }
.opt-price { font-weight: 800; white-space: nowrap; }

@media (max-width: 700px) {
  .price-grid { grid-template-columns: 1fr; }
  .prog-list { grid-template-columns: 1fr; }
}

/* ---------- Administration ---------- */
.admin { padding: 28px 0 60px; }
.admin h1 { font-size: 1.4rem; margin-bottom: 14px; }
.admin-login { display: flex; gap: 10px; align-items: end; margin-bottom: 18px; flex-wrap: wrap; }
.admin-login label { margin: 0; flex: 1; min-width: 220px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
td .btn + .btn { margin-left: 6px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.vmod { margin-bottom: 18px; }
.vmod h3 { font-size: 1rem; margin-bottom: 8px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.vslot { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; font-size: .82rem; display: grid; gap: 6px; }
.vslot.ok { border-color: var(--ok); }
.vslot .vt { color: var(--text); }
.vslot .vs { color: var(--muted); font-size: .76rem; }
.vslot progress { width: 100%; height: 8px; }
.vslot input[type="file"] { display: none; }
.sum { color: var(--muted); margin-bottom: 12px; }

/* ---------- Connexion : Google + code e-mail ---------- */
.g-btn { display: flex; justify-content: center; min-height: 44px; margin-bottom: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 14px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.hint { color: var(--muted); font-size: .85rem; margin: -4px 0 12px; line-height: 1.45; }
.code-title { font-size: 1.15rem; margin-bottom: 8px; }
.code-input { text-align: center; font-size: 1.9rem; font-weight: 800; letter-spacing: .35em; padding: 14px 10px; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.code-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: #a5b4fc; cursor: pointer; font-size: .88rem; text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
/* ---------- Page de connexion : accroche ---------- */
.reassure h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.reassure .reassure-lead { margin-top: 10px; color: var(--muted); font-weight: 500; font-size: 1rem; line-height: 1.5; }
.reassure .cert-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--secondary); background: rgba(139, 92, 246, .16); color: #ddd6fe; font-size: .85rem; font-weight: 700; }
.reassure .cert-tag .ic { color: #c4b5fd; }
/* ---------- Pages statiques (À propos, CGU, CGV, Confidentialité) ---------- */
.brand-link { text-decoration: none; color: inherit; }
.page-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; }
.page-nav a { color: var(--muted); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.page-nav a:hover { color: var(--text); }
.page-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }
.legal { max-width: 820px; padding: 36px 0 56px; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.25; margin-bottom: 6px; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; color: #e0e7ff; }
.legal p { margin: 10px 0; color: #cbd5e1; }
.legal .lead { font-size: 1.05rem; color: var(--text); margin-top: 14px; }
.legal ul, .legal ol { margin: 10px 0; padding-left: 22px; color: #cbd5e1; }
.legal li { margin: 6px 0; }
.legal ul.plain, .legal ol.plain { padding-left: 20px; }
.legal .pill { margin-left: 6px; }
.legal .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.legal .cta .btn { text-decoration: none; display: inline-block; }
.site-footer { border-top: 1px solid var(--border); margin-top: 24px; padding: 18px 0 26px; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }
.auth .site-footer { width: 100%; }
@media (max-width: 700px) {
  .page .hbar { flex-wrap: wrap; padding-block: 8px; }
  .page-nav { margin-left: 0; width: 100%; }
  .page .brand-long { display: none; }
}
.drawer-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; justify-content: center; }
.drawer-legal a { color: var(--muted); }

/* ---------- Titre de module bien visible + leçon verrouillée ---------- */
.player-module { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 12px; border: 1px solid var(--secondary); background: rgba(139, 92, 246, .16); color: #ddd6fe; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.player-module .pill.level { background: rgba(2, 6, 23, .35); border-color: transparent; color: #c4b5fd; font-weight: 600; }
.lesson h2 { margin-top: 8px; }
.btn.is-disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }
.player-empty.locked .ic { width: 40px; height: 40px; margin: 0 auto 4px; color: #c4b5fd; }
.lock-note { margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--secondary); border-radius: 12px; background: rgba(139, 92, 246, .1); }
.lock-title { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: #ddd6fe; font-weight: 600; margin-bottom: 6px; line-height: 1.25; }
.lock-title .ic { width: 14px; height: 14px; flex: none; }
.lock-opts { display: grid; grid-template-columns: 1fr; gap: 5px; }
.lock-opt { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-size: .8rem; line-height: 1.25; transition: border-color .12s, background .12s; }
.lock-opt > * { grid-column: 1; min-width: 0; }
.lock-opt:hover { border-color: var(--primary); background: var(--card-2); }
.lock-opt.best { border-color: var(--secondary); background: rgba(139, 92, 246, .14); }
.lock-opt strong { font-size: .82rem; }
.lock-opt small { color: var(--muted); font-size: .7rem; }
.lock-opt .lock-wait { color: #fbbf24; }
.lock-price { grid-column: 2 !important; grid-row: 1 / span 3; text-align: right; font-weight: 800; font-size: .92rem; white-space: nowrap; }
.lock-price s { display: block; color: var(--muted); font-weight: 500; font-size: .68rem; margin: 0; }
.lock-save { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--ok); color: #052e16; font-size: .66rem; font-weight: 800; vertical-align: 1px; }
@media (min-width: 700px) { .lock-opts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
@media (max-width: 900px) { .lock-note { margin: 8px 12px 0; } }

.player.is-locked { aspect-ratio: 3 / 1; }
@media (max-width: 900px) { .player.is-locked { aspect-ratio: 2 / 1; } }
/* ---------- Paiement : choix du moyen, code USSD, attente ---------- */
dialog { padding: 18px; max-height: calc(100dvh - 24px); overflow-y: auto; }
.opts { margin: 10px 0; gap: 6px; }
.opt { padding: 8px 10px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 0 0 12px; }
.pm { display: block; margin: 0; cursor: pointer; }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm span { display: block; text-align: center; padding: 9px 6px; border: 1px solid var(--border); border-radius: 10px; font-size: .85rem; font-weight: 600; color: var(--text); }
.pm input:checked + span { border-color: var(--primary); background: rgba(99, 102, 241, .18); }
.pm input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ussd { display: grid; gap: 2px; text-align: center; margin: 12px 0; padding: 12px; border: 1px dashed var(--secondary); border-radius: 12px; background: rgba(139, 92, 246, .1); }
.ussd strong { font-size: 1.05rem; letter-spacing: .02em; word-break: break-all; user-select: all; }
.pay-warn { font-size: .8rem; margin: 8px 0 12px; }
#buy-step2 .btn { display: block; width: 100%; text-align: center; }
.pay-dial { margin-bottom: 4px; }
.pay-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; color: var(--muted); font-size: .88rem; }
.pay-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: payspin .8s linear infinite; }
@keyframes payspin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { dialog { padding: 14px; } .dialog-actions .btn { flex: 1; } }

/* ---------- Moyens de paiement : couleurs de marque + correctifs ---------- */
dialog { overflow-x: hidden; }
.pm { position: relative; }
.pm input { width: 0; height: 0; margin: 0; padding: 0; border: 0; }
.pay-methods { grid-template-columns: 1fr 1fr; }
.pm span { padding: 11px 8px; font-size: .9rem; font-weight: 800; border-width: 2px; transition: box-shadow .12s, transform .12s; }
/* Orange Money : blanc + orange */
.pm-orange span { background: #fff; color: #ff7900; border-color: #ffd1a6; }
.pm-orange input:checked + span { border-color: #ff7900; box-shadow: 0 0 0 3px rgba(255, 121, 0, .35); }
/* MVola : jaune + vert */
.pm-mvola span { background: #ffd400; color: #0b7a3b; border-color: #e6bf00; }
.pm-mvola input:checked + span { border-color: #0b7a3b; box-shadow: 0 0 0 3px rgba(11, 122, 59, .4); }
.pm input:not(:checked) + span { opacity: .78; }
/* Bouton de paiement aux couleurs du moyen choisi */
#buy-dialog[data-method="orange"] #buy-submit { background: #ff7900; border-color: #ff7900; color: #fff; }
#buy-dialog[data-method="mvola"] #buy-submit { background: #ffd400; border-color: #ffd400; color: #0b5d2e; }
#buy-dialog[data-method] #buy-submit:disabled { opacity: .6; }
/* Note de vérification du numéro */
.pay-note { margin: -6px 0 12px; padding: 9px 12px; border-left: 4px solid #22c55e; border-radius: 8px; background: rgba(34, 197, 94, .14); color: #bbf7d0; font-size: .85rem; font-weight: 700; }
/* Confirmation du numéro */
.pc-number { margin: 12px 0; padding: 14px; text-align: center; border: 1px dashed #ffd400; border-radius: 12px; background: rgba(255, 212, 0, .08); font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; }
#pc-input { margin: 12px 0; font-size: 1.2rem; text-align: center; font-weight: 700; }