/* Al Mouwakib Academy — charte graphique 2026 */
/* Typographie de la charte : Montserrat (textes, et titres en remplacement de Banana), Cairo pour l'arabe. */
@font-face { font-family: "Montserrat"; src: url("/static/fonts/montserrat-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; src: url("/static/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; src: url("/static/fonts/cairo-arabic-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
:root {
  --ink: #211832;        /* violet foncé */
  --deep: #412B6B;       /* violet profond */
  --violet: #5C3E94;     /* violet lumineux */
  --orange: #F25912;
  --orange-dark: #C9450A;   /* orange accessible : petit texte blanc, survol */
  --pale: #EFEAF8;          /* violet pâle : tuiles, puces */
  --orange-pale: #FFF1E8;
  --bg: #F6F3FC;            /* lavande : fonds de section */
  --surface: #FFFFFF;
  --line: #E3DDF0;
  --muted: #5E5873;         /* gris violet : texte secondaire */
  --ok: #1B7A4B;
  --ok-bg: #E4F5EC;
  --warn: #8A5A00;
  --warn-bg: #FFF2D6;
  --bad: #B3261E;
  --bad-bg: #FCE8E6;
  --info-bg: #ECE6F8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(33, 24, 50, .06), 0 6px 20px rgba(33, 24, 50, .06);
  /* Jetons d'usage : ils changent avec le thème ; --ink et --deep restent les couleurs de marque (fonds sombres) */
  --text: #211832;
  --text-accent: #412B6B;
  --link: #5C3E94;
  --surface-2: #F7F4FC;
  --track: #E6DFF3;
  --line-strong: #C9BFE0;
  --glow: #FFFFFF;
  --header-bg: rgba(255, 255, 255, .94);
  color-scheme: light;
}

/* ---------- Mode sombre : choix explicite, ou réglage de l'appareil si aucun choix ---------- */
:root[data-theme="dark"] {
  --paper: #14101D; --ruled: rgba(82, 70, 111, .35); --glow: #2A2142; --header-bg: rgba(30, 24, 48, .94);
  --bg: #14101D; --surface: #1E1830; --surface-2: #251E3A; --line: #3A3052; --line-strong: #52466F; --track: #3A3052;
  --text: #EEE9F8; --text-accent: #D4C6F4; --link: #BFA9F2; --muted: #B5ABCB;
  --pale: #2C2443; --orange-pale: #3B2618; --info-bg: #2A2342;
  --ok: #7FD8A6; --ok-bg: #133021; --warn: #F2C86E; --warn-bg: #3A2D0F; --bad: #F4A49B; --bad-bg: #3D1816;
  --orange-dark: #E0581A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14101D; --ruled: rgba(82, 70, 111, .35); --glow: #2A2142; --header-bg: rgba(30, 24, 48, .94);
  --bg: #14101D; --surface: #1E1830; --surface-2: #251E3A; --line: #3A3052; --line-strong: #52466F; --track: #3A3052;
    --text: #EEE9F8; --text-accent: #D4C6F4; --link: #BFA9F2; --muted: #B5ABCB;
    --pale: #2C2443; --orange-pale: #3B2618; --info-bg: #2A2342;
    --ok: #7FD8A6; --ok-bg: #133021; --warn: #F2C86E; --warn-bg: #3A2D0F; --bad: #F4A49B; --bad-bg: #3D1816;
    --orange-dark: #E0581A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 "Montserrat", "Cairo", "Segoe UI", system-ui, -apple-system, Roboto, Tahoma, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-block: 28px 56px; }
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); font-weight: 800; }
h3 { font-weight: 700; }
[lang="ar"] { font-family: "Cairo", "Montserrat", Tahoma, sans-serif; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text-accent); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }

/* En-tête */
.site-header { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { display: block; width: 200px; height: auto; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-end: auto; }
.main-nav a, .pill { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.main-nav a:hover, .pill:hover { background: var(--pale); color: var(--text-accent); }
.main-nav a[aria-current] { background: var(--violet); color: #fff; }
.user-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count { background: var(--orange-dark); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .8rem; font-weight: 700; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 8px; text-decoration: underline; }
.link-btn:hover { color: var(--text); }
.space-nav { background: var(--deep); }
.space-nav .wrap { display: flex; gap: 2px; align-items: center; overflow-x: auto; padding-block: 6px; scrollbar-width: thin; }
.space-nav a { color: #E4DBF7; text-decoration: none; padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-size: .93rem; }
.space-nav a:hover { background: var(--violet); color: #fff; }
.space-nav a[aria-current] { background: var(--surface); color: var(--text); font-weight: 600; }
.space-role { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--orange-dark); border-radius: 6px; padding: 3px 8px; margin-inline-end: 8px; font-weight: 700; white-space: nowrap; }

/* Pied de page */
.site-footer { background: var(--ink); color: #CFC3EA; padding-block: 40px; font-size: .93rem; }
.footer-logo { display: block; border-radius: 12px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-footer nav { display: grid; gap: 6px; align-content: start; }
.site-footer a { color: #EDE7FA; }
.footer-brand { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.signature { color: var(--orange); font-weight: 600; letter-spacing: .3em; font-size: .75rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid transparent; border-radius: 999px; padding: 10px 24px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 48px; transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
.btn-lg { padding: 13px 28px; font-size: 1.1875rem; min-height: 54px; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 16px; min-height: 40px; font-size: .92rem; }
.btn-primary { background: var(--orange-dark); color: #fff; }
.btn-primary:hover { background: #A93A08; color: #fff; }
.btn-primary.btn-lg { background: var(--orange-dark); }
.btn-primary.btn-lg:hover { background: #A93A08; }
.btn-outline { background: var(--surface); color: var(--orange-dark); border-color: var(--orange); }
.btn-outline:hover { background: var(--orange-pale); color: var(--orange-dark); }
.btn-outline.on-dark { background: transparent; color: #fff; }
.btn-outline.on-dark:hover { background: var(--orange); color: #fff; }
.btn-secondary { background: var(--deep); color: #fff; }
.btn-secondary:hover { background: var(--violet); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text-accent); border-color: var(--violet); }
.btn-ghost:hover { background: var(--pale); }
.btn-light { background: transparent; color: #fff; border-color: #CFC3EA; }
.btn-light:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }

/* Cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.grid-2 > .card + .card { margin-top: 0; }
.grid > .card + .card { margin-top: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.section { margin-top: 32px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }

.course-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; border-top: 5px solid var(--violet); transition: transform .15s, box-shadow .15s; }
a.course-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(65, 43, 107, .16); color: inherit; }
.course-card h3 { margin: 0; }
.course-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.course-card .meta { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; border-inline-start: 5px solid var(--violet); }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--text-accent); }
.stat span { color: var(--muted); font-size: .9rem; }
.stat.accent { border-inline-start-color: var(--orange); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: .8125rem; font-weight: 600; background: var(--pale); color: var(--text-accent); white-space: nowrap; }
.badge-active, .badge-published, .badge-paid, .badge-graded, .badge-free, .badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-pending, .badge-draft, .badge-needs_review, .badge-in_progress, .badge-unpaid, .badge-open { background: var(--warn-bg); color: var(--warn); }
.badge-expired, .badge-suspended, .badge-cancelled, .badge-refunded, .badge-failed, .badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-lock { background: var(--surface-2); color: var(--muted); }

/* Messages et états */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; border: 1px solid; font-weight: 500; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #B5E0C8; }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #F3BDB8; }
.alert-info { background: var(--info-bg); color: var(--text-accent); border-color: #D3C6EE; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.empty p:last-child { margin: 0; }
.state { text-align: center; padding: 56px 16px; max-width: 560px; margin-inline: auto; }
.state-code { font-size: 4rem; font-weight: 800; color: var(--link); margin: 0; line-height: 1; }
.locked { border-top: 5px solid var(--orange); text-align: center; max-width: 620px; margin-inline: auto; }

/* Formulaires */
form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); outline: 3px solid rgba(92, 62, 148, .25); outline-offset: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--violet); flex: none; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.filters .field { margin: 0; flex: 1 1 160px; }
.form-narrow { max-width: 460px; margin-inline: auto; }
.hp { position: absolute; left: -9999px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 14px; }
legend { font-weight: 600; padding-inline: 6px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--text-accent); padding: 6px 0; }
details[open] > summary { margin-bottom: 10px; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); color: var(--text-accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Progression */
progress { width: 100%; height: 10px; border-radius: 999px; overflow: hidden; border: 0; background: var(--track); appearance: none; -webkit-appearance: none; vertical-align: middle; }
progress::-webkit-progress-bar { background: var(--track); }
progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.progress-line progress { flex: 1; }
.chart { width: 100%; height: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }

/* Accueil */
.hero { background: linear-gradient(135deg, var(--ink) 0%, var(--deep) 60%, var(--violet) 100%); color: #fff; border-radius: 22px; padding: clamp(28px, 6vw, 64px); margin-bottom: 36px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 3vw, 3rem); max-width: 18ch; }
.hero p { color: #E4DBF7; max-width: 56ch; font-size: 1.08rem; }
.hero .signature { font-size: .9rem; margin-bottom: 12px; }
.features .card { border-top: 5px solid var(--orange); }
.price { font-size: 1.9rem; font-weight: 800; color: var(--text-accent); line-height: 1.1; }
.price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price s { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan form, .plan .btn { margin-top: auto; }

/* Cours et leçons */
.outline { list-style: none; margin: 0; padding: 0; }
.outline li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.outline li:last-child { border-bottom: 0; }
.outline .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.prose p { max-width: 72ch; }
.prose { font-size: 1.03rem; }
.media { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.media iframe, .media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 12px; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Évaluations */
.question { border-inline-start: 5px solid var(--violet); }
.question.good { border-inline-start-color: var(--ok); }
.question.wrong { border-inline-start-color: var(--bad); }
.question.wait { border-inline-start-color: #D29A00; }
.question h3 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.choices { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.choices label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer; margin: 0; }
.choices label:hover { border-color: var(--violet); }
.choices input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.choices li.is-correct { color: var(--ok); font-weight: 600; }
.choices li.is-picked-wrong { color: var(--bad); }
.note { background: var(--info-bg); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.note.key { background: var(--orange-pale); border: 1px solid #F8C9AE; }
.note p:last-child { margin: 0; }
.timer { position: sticky; top: 8px; z-index: 5; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 600; }
.timer b { font-variant-numeric: tabular-nums; font-size: 1.2rem; color: var(--orange-dark); }
.score { font-size: 2.4rem; font-weight: 800; color: var(--text-accent); line-height: 1; }
.part-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; font-weight: 500; }
code.copy { display: block; padding: 10px; background: var(--surface-2); border-radius: 8px; word-break: break-all; }

@media (max-width: 720px) {
  .bar { gap: 8px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .main-nav a { white-space: nowrap; }
  .user-nav { margin-inline-start: auto; }
  .card { padding: 16px; }
  th, td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .site-footer, .actions, .timer { display: none; } body { background: var(--surface); } }

/* Épreuves : visionneuse, pages manuscrites, espace de correction */
.viewer-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; position: sticky; top: 0; background: var(--surface); padding-block: 6px; z-index: 2; }
.viewer-zoom { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.viewer-count { min-width: 4ch; text-align: center; font-weight: 600; }
.viewer-stage { display: grid; gap: 16px; }
.viewer.is-paged .viewer-stage { overflow: auto; max-height: 80vh; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.viewer-page { margin: 0; }
.viewer-page img, .viewer-page canvas { display: block; width: 100%; max-width: none; height: auto; margin-inline: auto; background: var(--surface); }
.viewer-loading { padding: 40px 16px; text-align: center; color: var(--muted); }
.viewer.is-paged .viewer-page figcaption { padding: 6px 10px; background: var(--surface); position: sticky; left: 0; }
.viewer-page .pdf { height: 70vh; display: block; border: 0; border-radius: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[aria-invalid="true"] { border-color: var(--bad); outline: 3px solid rgba(179, 38, 30, .2); }

.pages { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.page-item { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.page-thumb { flex: none; width: 96px; height: 128px; border-radius: 8px; overflow: hidden; background: var(--track); display: grid; place-items: center; }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdf-thumb { font-weight: 800; color: var(--text-accent); }
.page-info { display: grid; gap: 6px; min-width: 0; }
.page-info .small { overflow-wrap: anywhere; }

.grade-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.grade-docs { display: grid; gap: 16px; position: sticky; top: 8px; }
.grade-form { display: grid; gap: 16px; }
.grade-form > .card + .card, .grade-docs > .card + .card { margin-top: 0; }
.ai-box { border: 1px dashed var(--violet); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-block: 12px; }
.ai-box p { margin-bottom: .4em; }
.ai-box p:last-child { margin-bottom: 0; }
.ai-status { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; border-inline-start: 5px solid var(--violet); }
.ai-status p { margin: 0 0 4px; }
.grade-total { border-top: 5px solid var(--orange); }
details.sub { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.q-list { padding-inline-start: 1.2em; }
.q-list > li { margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.steps li { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.steps li.done { background: var(--ok-bg); color: var(--ok); border-color: #B5E0C8; }
.steps li.done::before { content: "✓ "; }
.steps li.current { background: var(--warn-bg); color: var(--warn); border-color: #F0D9A4; font-weight: 600; }

@media (max-width: 900px) {
  .grade-layout { grid-template-columns: 1fr; }
  .grade-docs { position: static; }
  .viewer.is-paged .viewer-stage { max-height: 60vh; }
  .page-thumb { width: 72px; height: 96px; }
}

/* ===== Page d'accueil ===== */
main.bleed { padding: 0; }
.wrap-alert { max-width: 1128px; margin: 16px auto 0; }
.lp-section { padding-block: clamp(56px, 8vw, 96px); background: var(--surface); }
.lp-tint { background: var(--bg); }
.lp-section h2, .lp-final h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); letter-spacing: -.01em; max-width: 24ch; margin-bottom: .4em; }
.lp-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 10px; }
.lp-eyebrow.on-dark { color: var(--orange); }
.lp-sub { color: var(--muted); font-size: 1.08rem; max-width: 62ch; margin-bottom: 32px; }
.lp-center { text-align: center; margin: 28px 0 0; }
.lp-narrow { max-width: 780px; }
.lp-note { font-size: .92rem; color: var(--muted); margin-top: 14px; }
.lp-note.on-dark { color: #CFC3EA; }

.lp-hero { background: radial-gradient(900px 480px at 85% 10%, #412B6B 0%, rgba(65, 43, 107, 0) 70%), var(--ink); color: #fff; padding-block: clamp(48px, 8vw, 104px); }
.lp-hero-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; }
.lp-hero h1 { color: #fff; font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; margin-bottom: .5em; }
.lp-hero h1 span { display: block; font-weight: 900; }
.lp-hero h1 em { font-style: normal; color: var(--orange); }
.lp-lead { color: rgba(255, 255, 255, .85); font-size: 1.15rem; max-width: 52ch; margin-bottom: 28px; }
.lp-preview { position: relative; padding: 0 0 28px 28px; }
.lp-cell { display: block; width: 100%; height: auto; opacity: .9; }
.lp-preview-card { position: relative; margin: -56px 0 0 -28px; width: min(100%, 360px); background: var(--surface); color: var(--text); border-radius: 16px; padding: 18px 20px; box-shadow: 0 18px 48px rgba(0, 0, 0, .35); }
.lp-preview-tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); margin-bottom: 6px; }
.lp-preview-q { font-weight: 600; margin-bottom: 10px; line-height: 1.35; }
.lp-preview-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.lp-preview-card li { display: flex; gap: 8px; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.lp-preview-card li span { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }

.lp-try { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.lp-try h3 { font-size: 1.15rem; margin-top: 0; }
.lp-try-lesson h3 + .prose, .lp-objectives { margin-bottom: 20px; }
.lp-objectives p { margin: 0 0 6px; padding-inline-start: 26px; position: relative; }
.lp-objectives p::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.lp-try-quiz { border-top: 5px solid var(--orange); scroll-margin-top: 16px; }
.lp-q { border: 0; padding: 0; margin: 0 0 22px; }
.lp-q legend { font-weight: 600; padding: 0; margin-bottom: 10px; line-height: 1.4; }
.lp-q-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--info-bg); color: var(--text-accent); font-size: .85rem; margin-inline-end: 6px; }
.lp-result-q { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 1.05rem; }
#essai, #methode, #cours, #premium { scroll-margin-top: 8px; }

.lp-steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-steps li { border-top: 2px solid var(--ink); padding-top: 20px; }
.lp-steps svg { width: 40px; height: 40px; color: var(--link); }
.lp-step-n { font-size: .8rem; font-weight: 700; color: var(--orange-dark); letter-spacing: .1em; margin: 14px 0 2px; }
.lp-steps h3 { font-size: 1.2rem; letter-spacing: .06em; }
.lp-steps p:last-child { color: var(--muted); margin: 0; }

.lp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.lp-chips a { border-radius: 8px; padding: 7px 14px; text-decoration: none; color: var(--text-accent); font-weight: 600; font-size: .875rem; background: var(--pale); }
.lp-chips a:hover { background: var(--violet); color: #fff; }
.lp-card-top { display: flex; gap: 6px; flex-wrap: wrap; justify-content: space-between; }

.lp-compare { margin-bottom: 32px; }
.lp-compare th[scope=row] { background: var(--surface); text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); white-space: normal; }
.lp-compare thead th:last-child, .lp-compare td:last-child { background: var(--orange-pale); }
.lp-plans { margin-bottom: 24px; }
.lp-plans .plan { gap: 6px; }
.lp-terms { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); max-width: 78ch; }
.lp-terms li { padding-inline-start: 22px; position: relative; }
.lp-terms li::before { content: ""; position: absolute; inset-inline-start: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.lp-terms strong { color: var(--text); }

.lp-trust { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.lp-trust h3 { font-size: 1.05rem; margin-bottom: 6px; }
.lp-trust p { color: var(--muted); margin: 0 0 8px; }
.lp-next .lp-trust { margin-top: 12px; }

.lp-faq { margin: 24px 0 16px; border-top: 1px solid var(--line); }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { padding: 16px 0; font-size: 1.05rem; color: var(--text); }
.lp-faq details p { color: var(--muted); margin: 0 0 16px; max-width: 68ch; }

.lp-final { background: var(--ink); color: #fff; text-align: center; padding-block: clamp(56px, 8vw, 96px); }
.lp-final h2 { color: #fff; margin-inline: auto; max-width: 20ch; }
.lp-final p { color: #E4DBF7; font-size: 1.1rem; margin-bottom: 26px; }
.lp-final .wrap { margin-inline: auto; }

@media (max-width: 860px) {
  .lp-hero-grid, .lp-try { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; gap: 24px; }
  .lp-preview { max-width: 420px; }
}

/* Menu principal sur petit écran : défilement horizontal au doigt, sans barre apparente */
.main-nav { scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }

/* En-tête clair (logo couleur officiel) : ajustements petit écran — largeur minimale du logo horizontal : 180 px */
@media (max-width: 720px) { .brand img { width: 180px; } }

/* En-tête sur deux lignes : logo et boutons, puis menu */
@media all {
  .bar { gap: 8px 16px; }
  .user-nav { margin-inline-start: auto; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; margin-inline-end: 0; }
  .main-nav a { white-space: nowrap; }
}
/* Petit texte orange sur fond lavande : nuance plus sombre pour garder un contraste de 4,5:1 */
.lp-tint .lp-eyebrow, .lp-tint .lp-step-n { color: #B03C08; }
/* Très petit écran : le bouton d'essai de l'en-tête est masqué (il figure juste dessous, dans la bannière) */
@media (max-width: 520px) { .user-nav .btn-outline { display: none; } }

/* ===== Accueil : bannière centrée et aperçu de la plateforme ===== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp-hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 88px) 0;
  background: radial-gradient(circle at 50% 118%, rgba(92, 62, 148, .55) 0 22%, rgba(92, 62, 148, .32) 22% 34%, rgba(92, 62, 148, .18) 34% 46%, rgba(92, 62, 148, 0) 46%), linear-gradient(180deg, #211832 0%, #2C1F48 100%); }
.lp-hero-head { text-align: center; max-width: 860px; }
.lp-hero-head h1 { margin-inline: auto; }
.lp-hero-head .lp-lead { margin-inline: auto; }
.lp-stage { position: relative; margin-top: 48px; padding-bottom: 0; }
.lp-spark { position: absolute; width: 40px; height: 40px; }
.lp-spark-a { top: -12px; right: 14%; }
.lp-spark-b { top: 40%; left: 2%; width: 34px; height: 34px; }

.lp-mock { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) minmax(0, .9fr); gap: 18px; align-items: start; max-width: 1000px; margin: 0 auto; transform: translateY(1px); }
.mock-card { background: var(--surface); color: var(--text); border-radius: 16px; padding: 16px 18px; box-shadow: 0 18px 50px rgba(10, 6, 20, .35); }
.mock-title { font-weight: 700; font-size: .95rem; margin: 0 0 10px; }
.mock-outline { margin-top: 56px; }
.mock-outline ol { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.mock-outline li { display: flex; justify-content: space-between; gap: 6px; padding: 7px 8px; border-radius: 8px; color: var(--muted); }
.mock-outline li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-outline li.is-current { background: var(--violet); color: #fff; font-weight: 600; }
.mock-center { display: grid; gap: 16px; }
.mock-lesson { padding-bottom: 14px; }
.mock-cell { display: block; width: 100%; height: auto; margin: 4px 0 10px; }
.mock-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.mock-pill { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 3px 9px; font-weight: 600; }
.mock-next { border-radius: 16px 16px 0 0; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mock-tile { display: grid; justify-items: center; gap: 6px; background: var(--bg); border-radius: 12px; padding: 12px 6px; font-size: .72rem; text-align: center; color: var(--muted); }
.mock-tile svg { width: 34px; height: 34px; }
.mock-quiz { margin-top: 96px; }
.mock-q { font-weight: 600; font-size: .86rem; line-height: 1.35; margin: 0 0 10px; }
.mock-quiz ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .78rem; }
.mock-quiz li { display: flex; gap: 8px; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.mock-quiz li span { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }

.lp-fact { position: absolute; background: var(--surface); color: var(--text); border-radius: 18px; padding: 16px 20px; width: 230px; box-shadow: 0 18px 50px rgba(10, 6, 20, .35); }
.lp-fact p { margin: 0; font-size: .85rem; color: var(--muted); }
.lp-fact .lp-fact-n { font-size: 1.25rem; font-weight: 800; color: var(--text); margin-bottom: 4px; line-height: 1.2; }
.lp-fact-left { left: 0; top: 230px; }
.lp-fact-right { right: 0; top: 0; }

/* ===== Accueil : lecteur du contenu gratuit ===== */
.lp-player { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.lp-outline, .lesson-outline { position: sticky; top: 12px; padding: 18px; }
.lp-outline h3, .lesson-outline h2 { font-size: 1rem; margin-bottom: 12px; }
.lp-outline-ch, .lesson-outline-ch { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.lp-outline ol, .lesson-outline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lp-outline li, .lesson-outline li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; padding-inline-end: 6px; }
.lp-outline li a, .lesson-outline li a { display: flex; gap: 8px; align-items: baseline; padding: 8px; text-decoration: none; color: var(--text); font-size: .92rem; min-width: 0; flex: 1; }
.lp-outline li:hover, .lesson-outline li:hover { background: var(--bg); }
.lp-outline li.is-current, .lesson-outline li.is-current { background: var(--violet); }
.lp-outline li.is-current a, .lesson-outline li.is-current a { color: #fff; font-weight: 600; }
.lo-icon { flex: none; width: 1.1em; color: var(--link); font-size: .85em; }
li.is-current .lo-icon { color: #fff; }
.tag-free, .tag-lock, .tag-here { flex: none; font-size: .72rem; font-weight: 600; border-radius: 8px; padding: 2px 8px; }
.tag-free { background: var(--ok-bg); color: var(--ok); }
.tag-lock { background: var(--pale); color: var(--muted); }
.tag-here { background: var(--surface); color: var(--link); }
.lp-player-main { display: grid; gap: 24px; }
.lp-player-main > .card + .card { margin-top: 0; }
.lp-lesson { border-top: 5px solid var(--violet); }
.lp-lesson h4 { font-size: .95rem; margin: 18px 0 8px; }
.lp-step-label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--link); margin: 0 0 4px; }
.lp-lesson-head h3 { margin-bottom: 4px; font-size: 1.35rem; }

/* ===== Page de leçon : programme du cours en colonne ===== */
.lesson-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.lesson-main { min-width: 0; }
.lesson-outline .progress-line { margin-bottom: 6px; }
.lesson-outline-cta { margin: 14px 0 0; }
.lesson-next { margin-top: 28px; }
.lesson-next h2 { font-size: 1.1rem; }
.lesson-next-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.lesson-next-tile { display: grid; justify-items: center; gap: 10px; text-align: center; text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; padding: 18px 12px; }
.lesson-next-tile svg { width: 40px; height: 40px; color: var(--link); }
a.lesson-next-tile:hover { border-color: var(--violet); color: var(--text); }

@media (max-width: 1000px) {
  .lp-mock { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .mock-quiz { display: none; }
  .lp-fact-right { top: auto; bottom: 40%; }
}
@media (max-width: 860px) {
  .lp-player, .lesson-layout { grid-template-columns: 1fr; }
  .lp-outline, .lesson-outline { position: static; }
  .lesson-outline { order: 2; }
}
@media (max-width: 720px) {
  .lp-mock { grid-template-columns: 1fr; max-width: 420px; }
  .mock-outline, .lp-spark-b { display: none; }
  .lp-fact { position: static; width: auto; margin: 0 auto 14px; max-width: 420px; }
  .lp-stage { display: flex; flex-direction: column; }
  .lp-fact-left { order: -2; }
  .lp-fact-right { order: -1; }
}

.lo-locked { display: flex; gap: 8px; align-items: baseline; padding: 8px; color: var(--muted); font-size: .92rem; min-width: 0; flex: 1; }
/* Cartes d'information flottantes : placées dans les espaces libres pour ne masquer aucun élément de l'aperçu */
.mock-quiz { margin-top: 176px; }
.lp-fact-left { top: 290px; }
@media (max-width: 1000px) { .lp-fact-right { top: 0; bottom: auto; right: 0; } }
.lesson-next-tile.is-locked { color: var(--muted); }
.lesson-next-tile.is-locked svg { color: #B9AFD0; }

/* Organisation pédagogique : suivi des contenus, programme de l'élève */
.trk { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.trk-a_fournir { background: #FDE7E2; color: #A23A14; }
.trk-a_verifier { background: var(--warn-bg); color: var(--warn); }
.trk-en_preparation { background: var(--surface-2); color: #412B6B; }
.trk-pret { background: #E3EEFB; color: #1F4E8C; }
.trk-publie { background: var(--ok-bg); color: var(--ok); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; }
.tracking td, .tracking th { min-width: 120px; }
.tracking td:first-child { min-width: 220px; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select { max-width: 260px; }
.profile-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chapter-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.chapter-list a { font-weight: 600; }
.search-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.search-inline input { flex: 1 1 220px; }

/* Phase 1 — Leçons interactives */
.player-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.player-speed { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: .9rem; margin: 0; }
.player-speed select { min-height: 44px; width: auto; }
.player-chapters { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.player-chapter { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; text-align: start; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.player-chapter:hover { border-color: var(--violet); }
.player-chapter[aria-current="true"] { background: var(--pale); border-color: var(--violet); font-weight: 600; }
.player-time { font-variant-numeric: tabular-nums; color: var(--link); font-weight: 700; min-width: 4.5ch; }
.checkpoint { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 60px rgba(33, 24, 50, .35); }
.checkpoint::backdrop, .lightbox::backdrop { background: rgba(33, 24, 50, .65); }
.checkpoint-prompt { font-size: 1.1rem; font-weight: 600; margin: 4px 0 14px; white-space: pre-line; }
.checkpoint .choices label { min-height: 44px; }
.checkpoint .choices label.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.checkpoint-feedback { min-height: 1.5em; margin: 12px 0; font-weight: 600; }
.checkpoint-feedback.is-good { color: var(--ok); }
.checkpoint-feedback.is-bad { color: var(--orange-dark); }
.retenir { border-inline-start: 6px solid var(--orange); background: var(--orange-pale); }
.retenir h2 { color: var(--orange-dark); }
.figure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.figure-grid figure { margin: 0; }
.zoomable { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: zoom-in; overflow: hidden; }
.zoomable img { display: block; width: 100%; height: auto; }
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 12px; border: 0; background: transparent; overflow: auto; }
.lightbox img { display: block; max-width: none; width: 100%; height: auto; margin: 48px auto 0; background: var(--surface); border-radius: 8px; touch-action: pinch-zoom; }
.lightbox-close { position: fixed; top: 12px; inset-inline-end: 12px; background: var(--surface); min-height: 44px; }
.sort-list { list-style: none; padding: 0; margin: 0; }
.sort-list > li.is-dragging { opacity: .5; outline: 2px dashed var(--violet); border-radius: 10px; }
.drag-handle { cursor: grab; border: 0; background: none; font-size: 1.1rem; color: var(--muted); min-width: 32px; min-height: 32px; padding: 0 4px; }
.drag-handle:active { cursor: grabbing; }
.move-buttons, .outline .tags form { display: inline-flex; gap: 4px; margin: 0; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.unit-card h3 { margin: 4px 0 8px; }
.unit-chapters { padding-inline-start: 20px; margin: 8px 0 12px; display: grid; gap: 4px; }
.completion { display: inline-flex; gap: 8px; align-items: center; }
.completion { flex-wrap: wrap; }
.completion progress { width: min(140px, 40vw); }
.completion strong { white-space: nowrap; }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; color: var(--link); font-weight: 700; margin: 0; }
/* Un élément masqué (attribut hidden) le reste, quel que soit son style d’affichage */
[hidden] { display: none !important; }

/* ===== Accueil « route vers le National » (parcours en étapes, labo, rythme) ===== */
.hm-hero { position: relative; overflow: hidden; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px,
  radial-gradient(700px 360px at 50% 0%, var(--glow) 0%, transparent 70%), var(--paper);
  padding-block: clamp(48px, 9vw, 120px) clamp(56px, 8vw, 96px); text-align: center; }
.hm-hero-inner { position: relative; z-index: 1; }
.hm-logo { width: clamp(64px, 9vw, 96px); height: auto; margin: 0 auto 12px; display: block; }
.hm-title { font-size: clamp(2.8rem, 1.6rem + 6.5vw, 6.6rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--text); margin: 8px auto 20px; }
.hm-title span { color: var(--link); }
.hm-title em { color: var(--orange); font-style: normal; position: relative; white-space: nowrap; }
.hm-title em::after { content: ""; position: absolute; inset-inline: 4%; bottom: -.08em; height: .12em; border-radius: 99px; background: var(--orange); opacity: .35; }
.hm-lead { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--muted); max-width: 52ch; margin: 0 auto 28px; }
.hm-pill { border-radius: 999px; }
.hm-doodles { position: absolute; inset: 0; pointer-events: none; }
.hm-d { position: absolute; width: clamp(90px, 14vw, 170px); height: auto; opacity: .9; }
.hm-d-text { font: 600 14px "Montserrat", sans-serif; fill: var(--violet); }
.hm-d-small { font: 500 11px "Montserrat", sans-serif; fill: var(--muted); }
.hm-d-line { fill: none; stroke: var(--violet); stroke-width: 2.2; stroke-linecap: round; opacity: .55; }
.hm-d-rung { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.hm-d-accent { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; }
.hm-d1 { top: 8%; left: 4%; transform: rotate(-6deg); }
.hm-d2 { top: 10%; right: 6%; width: clamp(44px, 6vw, 70px); }
.hm-d3 { bottom: 14%; left: 7%; }
.hm-d4 { top: 66%; right: 3%; transform: rotate(4deg); }
.hm-d5 { bottom: 10%; right: 10%; }
.hm-d6 { top: 64%; left: 2%; transform: rotate(-3deg); }
.hm-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); opacity: .55; }
.hm-dot1 { top: 22%; left: 30%; }
.hm-dot2 { top: 30%; right: 26%; background: var(--violet); }
.hm-dot3 { bottom: 22%; left: 40%; width: 7px; height: 7px; }
@media (max-width: 760px) { .hm-d3, .hm-d4, .hm-d6, .hm-dot { display: none; } .hm-d { opacity: .45; } }

.hm-path { list-style: none; margin: 40px 0 0; padding: 0; position: relative; display: grid; gap: 28px; counter-reset: stop; }
.hm-path::before { content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 19px; border-inline-start: 3px dashed #D9CFF0; }
.hm-stop { position: relative; display: grid; gap: 16px; padding-inline-start: 56px; counter-increment: stop; }
.hm-stop::before { content: counter(stop); position: absolute; inset-inline-start: 0; top: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--violet); box-shadow: 0 0 0 6px var(--surface); }
.hm-stop-goal::before { content: "\2605"; background: var(--orange); }
.hm-stop-n { font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--orange-dark); margin: 0 0 4px; }
.hm-stop-text h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin: 0 0 6px; }
.hm-stop-text p { color: var(--muted); max-width: 46ch; }
@media (min-width: 900px) {
  .hm-path::before { inset-inline-start: 50%; transform: translateX(-1.5px); }
  .hm-stop { grid-template-columns: 1fr 1fr; gap: 72px; padding-inline-start: 0; align-items: center; }
  .hm-stop::before { inset-inline-start: 50%; top: 50%; transform: translate(-50%, -50%); }
  .hm-stop:nth-child(even) .hm-stop-text { order: 2; }
  .hm-stop:nth-child(odd) .hm-stop-text { text-align: end; }
  .hm-stop:nth-child(odd) .hm-stop-text p { margin-inline-start: auto; }
  .hm-stop:nth-child(odd) .hm-mini { justify-self: start; }
  .hm-stop:nth-child(even) .hm-mini { justify-self: end; }
}
.hm-mini { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 14px 34px rgba(33, 24, 50, .08); max-width: 420px; width: 100%; }
.hm-mini-tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin: 0 0 6px; }
.hm-mini-title { font-weight: 700; margin: 0 0 12px; }
.hm-mini-video { display: flex; align-items: center; gap: 10px; background: var(--ink); border-radius: 12px; padding: 30px 14px 12px; margin-bottom: 10px; }
.hm-play { color: #fff; font-size: .9rem; }
.hm-bar { flex: 1; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.hm-bar span { display: block; width: 38%; height: 100%; background: var(--orange); }
.hm-mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.hm-mini-list li { padding: 7px 10px; border-radius: 9px; background: var(--bg); }
.hm-mini-list li.is-on { background: var(--pale); font-weight: 600; }
.hm-mini-list b { color: var(--link); margin-inline-end: 8px; font-variant-numeric: tabular-nums; }
.hm-mini-note { border-inline-start: 6px solid var(--orange); background: var(--orange-pale); }
.hm-mini-note .hm-mini-list li { background: var(--surface-2); }
.hm-mini-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.hm-mini-choices li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.hm-mini-choices li span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--violet); flex: none; }
.hm-mini-choices li.is-picked { border-color: var(--violet); background: var(--pale); }
.hm-mini-choices li.is-picked span { background: var(--violet); box-shadow: inset 0 0 0 2px #fff; }
.hm-mini-choices li.is-right { border-color: var(--ok); background: var(--ok-bg); }
.hm-mini-choices li.is-wrong { border-color: #F3B8B2; background: var(--bad-bg); }
.hm-mini-choices b { margin-inline-start: auto; }
.hm-mini-foot { margin: 10px 0 0; font-size: .85rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.hm-chip { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--violet); color: var(--link); font-weight: 600; }
.hm-chip.is-strong { background: var(--violet); color: #fff; }
.hm-mini-score { display: flex; justify-content: space-between; align-items: center; background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 14px 16px; font-weight: 600; }
.hm-mini-score b { font-size: 1.6rem; }
.hm-mini-goal { background: linear-gradient(160deg, var(--ink), var(--deep)); color: #fff; border: 0; }
.hm-mini-goal .hm-mini-tag { color: var(--orange); }
.hm-mini-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hm-mini-years li { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: .9rem; }
.hm-mini-years b { margin-inline-end: auto; font-size: 1.05rem; }
.hm-mini-years span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); }

.hm-lab { padding: clamp(16px, 3vw, 28px); }
.hm-lab-head h3 { margin: 0 0 12px; }
.hm-lab-svg { width: 100%; height: auto; display: block; border-radius: 14px; }
.lab-bg { fill: #FBF9F6; }
.lab-band-a { fill: var(--violet); opacity: .28; }
.lab-band-h { fill: var(--orange); opacity: .45; }
.lab-actin { fill: var(--orange); }
.lab-myosin rect { fill: var(--violet); }
.lab-myosin path { stroke: var(--violet); stroke-width: 3; stroke-linecap: round; fill: none; }
.lab-z { fill: var(--ink); }
.lab-text { font: 700 16px "Montserrat", sans-serif; fill: var(--ink); }
.lab-text-small { font: 500 12px "Montserrat", sans-serif; fill: var(--muted); }
.hm-lab-slider { display: grid; gap: 6px; margin: 16px 0; font-weight: 600; }
.hm-lab-slider span { color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.hm-lab-slider input { width: 100%; min-height: 44px; accent-color: var(--orange); }
.hm-lab-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 18px; }
.hm-lab-read div { background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.hm-lab-read dt { font-size: .82rem; color: var(--muted); }
.hm-lab-read dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-lab-read dd.is-changing { color: var(--orange-dark); }
.hm-lab-quiz fieldset { border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.hm-lab-quiz legend { font-weight: 700; margin-bottom: 8px; }
.hm-lab-quiz label { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; }
.hm-lab-feedback { font-weight: 600; margin: 10px 0 0; }
.hm-lab-feedback.is-good { color: var(--ok); }
.hm-lab-feedback.is-bad { color: var(--orange-dark); }

.hm-rhythm { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.hm-rhythm li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.hm-rhythm h3 { margin: 4px 0 2px; font-size: 1.3rem; }
.hm-rhythm-fr { font-weight: 600; color: var(--link); margin-bottom: 8px; }
.hm-rhythm p:last-child { color: var(--muted); margin: 0; }
.on-dark-link { color: #fff; }
.hm-whatsapp { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 16px; border-radius: 999px; background: #1E8E4E; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.hm-whatsapp svg { width: 26px; height: 26px; }
.hm-whatsapp:hover { background: #17713E; color: #fff; }
@media (max-width: 560px) { .hm-whatsapp span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .hm-whatsapp { padding: 12px; } }
@media (prefers-reduced-motion: no-preference) {
  .hm-d { animation: hm-float 7s ease-in-out infinite; }
  .hm-d2, .hm-d5 { animation-delay: -3s; }
  @keyframes hm-float { 50% { translate: 0 -8px; } }
}

/* ===================================================================================
   Style unifié de l'académie (même esprit que l'accueil) : papier ligné, grands titres,
   croquis de SVT discrets, cartes arrondies et ombrées, pastilles. Appliqué à toutes les pages.
   =================================================================================== */
:root {
  --paper: #FBF9F6;
  --ruled: rgba(227, 221, 240, .55);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(33, 24, 50, .04), 0 14px 34px rgba(33, 24, 50, .07);
  --doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 120'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M18 6c0 18 30 18 30 36S18 60 18 78s30 18 30 36M48 6c0 18-30 18-30 36s30 18 30 36-30 18-30 36' stroke='%235C3E94' stroke-width='2.2' opacity='.5'/%3E%3Cpath d='M23 20h20M21 34h24M23 56h20M21 70h24M23 92h20M21 106h24' stroke='%23F25912' stroke-width='2' opacity='.55'/%3E%3Cpath d='M92 40v40M232 40v40' stroke='%235C3E94' stroke-width='2.4' opacity='.5'/%3E%3Cpath d='M92 52h52M92 68h52M180 52h52M180 68h52' stroke='%23F25912' stroke-width='2' opacity='.55'/%3E%3Cpath d='M126 60h72' stroke='%235C3E94' stroke-width='5' opacity='.45'/%3E%3Ccircle cx='170' cy='18' r='4' fill='%23F25912' opacity='.6'/%3E%3Ccircle cx='246' cy='104' r='3' fill='%235C3E94' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
}
body { background: linear-gradient(var(--ruled) 1px, transparent 1px) 0 0 / 100% 64px, var(--paper); }
main.wrap { padding-block: 32px 72px; }

/* En-tête : navigation en pastilles */
.site-header { background: var(--header-bg); }
.space-nav { background: var(--ink); }
.space-nav a { border-radius: 999px; }

/* Titre de page : grand, gras, souligné d'un trait orange, croquis de SVT à droite */
.page-head { position: relative; margin-bottom: 28px; padding-block: 8px 4px; }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.page-head h1::after { content: ""; display: block; width: 56px; height: 6px; border-radius: 99px; background: var(--orange); margin-top: 12px; }
.page-head p { font-size: 1.02rem; max-width: 70ch; }
main.wrap > .page-head:first-child, main.wrap > .crumbs + .page-head, main.wrap > .alert + .page-head { padding-inline-end: min(28%, 280px); }
main.wrap > .page-head:first-child::before, main.wrap > .crumbs + .page-head::before, main.wrap > .alert + .page-head::before {
  content: ""; position: absolute; inset-inline-end: 0; top: -6px; width: min(26%, 260px); aspect-ratio: 260 / 120; background: var(--doodle) no-repeat center / contain; opacity: .9; pointer-events: none; }
main.wrap > .page-head > :is(.btn, .actions, form, a.btn) { position: relative; z-index: 1; }
@media (max-width: 760px) {
  main.wrap > .page-head:first-child, main.wrap > .crumbs + .page-head, main.wrap > .alert + .page-head { padding-inline-end: 0; }
  main.wrap > .page-head:first-child::before, main.wrap > .crumbs + .page-head::before, main.wrap > .alert + .page-head::before { display: none; }
}

/* Fil d'Ariane en pastille */
.crumbs { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(33, 24, 50, .04); }
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Titres de section et cartes */
h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); letter-spacing: -.01em; }
.card { border-radius: var(--radius); padding: clamp(18px, 2.5vw, 26px); }
.card > h2:first-child, .card > .page-head:first-child h2 { margin-bottom: .6em; }
.section > h2:first-child { display: flex; align-items: center; gap: 10px; }
.section > h2:first-child::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.course-card { border-top: 0; border-radius: var(--radius); position: relative; overflow: hidden; padding-top: 26px; }
.course-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--violet), var(--orange)); }
a.course-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(65, 43, 107, .16); }
.stat { border-radius: var(--radius); border-inline-start: 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 6px; background: var(--violet); }
.stat.accent::before { background: var(--orange); }
.stat b { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }

/* Pastilles, badges, alertes, états vides */
.badge { border-radius: 999px; padding: 3px 11px; }
.alert { border-radius: 14px; }
.empty { border-radius: var(--radius); background: var(--surface-2); border: 2px dashed var(--line-strong); padding: 36px 18px; position: relative; }
.empty::before { content: ""; display: block; width: 92px; aspect-ratio: 260 / 120; margin: 0 auto 10px; background: var(--doodle) no-repeat center / contain; opacity: .8; }
.empty.small::before { display: none; }
.locked { border-top: 0; position: relative; overflow: hidden; }
.locked::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--violet), var(--orange)); }

/* Formulaires : champs arrondis, focus orange */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=tel], input[type=search], input[type=file], select, textarea {
  border-radius: 12px; border-color: #D5CBEA; background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--orange); outline: 3px solid rgba(242, 89, 18, .18); }
fieldset { border-radius: 14px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.filters.card { padding: 14px 16px; }
.form-narrow { margin-top: 12px; }
.form-narrow h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); letter-spacing: -.02em; }
.form-narrow h1::after { content: ""; display: block; width: 48px; height: 6px; border-radius: 99px; background: var(--orange); margin-top: 10px; }

/* Tableaux */
.table-wrap { border-radius: var(--radius); box-shadow: var(--shadow); }
th { background: var(--paper); color: var(--link); font-size: .74rem; letter-spacing: .12em; font-weight: 700; }
tbody tr:hover td { background: var(--surface-2); }

/* Listes de contenus (cours, quiz, documents) */
.outline li { border-bottom-style: dashed; }
details > summary { border-radius: 10px; }

/* Pied de page : même univers que l'accueil */
.site-footer { position: relative; overflow: hidden; border-top: 6px solid var(--orange); }
.site-footer::after { content: ""; position: absolute; inset-inline-end: 4%; bottom: 16px; width: 200px; aspect-ratio: 260 / 120; background: var(--doodle) no-repeat center / contain; opacity: .25; pointer-events: none; }

/* Pages d'état (erreur, accès refusé) */
.state-code { font-size: clamp(4rem, 3rem + 5vw, 7rem); letter-spacing: -.04em; background: linear-gradient(90deg, var(--violet), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Mascotte : le hibou Mouwakib ===== */
.hm-mascot { display: block; width: clamp(150px, 18vw, 230px); height: auto; margin: 0 auto 4px; filter: drop-shadow(0 16px 24px rgba(65, 43, 107, .18)); }
.hm-pill { position: relative; padding-inline-start: 74px; }
.hm-pill-mascot { position: absolute; inset-inline-start: 14px; bottom: -2px; width: 50px; height: auto; transform-origin: bottom center; }
.hm-says { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.hm-says img { width: 78px; height: auto; flex: none; }
.hm-bubble { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 16px; font-weight: 600; color: var(--text-accent); box-shadow: var(--shadow); margin: 0 0 30px; max-width: 34ch; }
.hm-final-mascot { display: block; width: clamp(110px, 14vw, 154px); height: auto; margin: 0 auto 8px; }
.page-head-mascot { justify-content: flex-start; align-items: center; }
.page-head-mascot .head-mascot { width: 72px; height: auto; flex: none; }
main.wrap > .page-head-mascot:first-child { padding-inline-end: 0; }
main.wrap > .page-head-mascot:first-child::before { display: none; }

/* Connexion, inscription, mot de passe : la mascotte au-dessus du formulaire */
.form-narrow { position: relative; margin-top: 84px; }
.form-narrow::before { content: ""; position: absolute; top: -82px; inset-inline-end: 22px; width: 76px; height: 100px; background: url("/static/img/mascotte-sm.webp") no-repeat center bottom / contain; pointer-events: none; }

/* États vides, erreurs, contenus verrouillés */
.empty::before { width: 64px; aspect-ratio: 185 / 240; background: url("/static/img/mascotte-sm.webp") no-repeat center / contain; opacity: 1; }
.state::before { content: ""; display: block; width: 130px; aspect-ratio: 185 / 240; margin: 0 auto 8px; background: url("/static/img/mascotte.webp") no-repeat center / contain; }
.locked { padding-top: 34px; }
.locked > :first-child::before { content: ""; display: block; width: 84px; aspect-ratio: 185 / 240; margin: 0 auto 10px; background: url("/static/img/mascotte-sm.webp") no-repeat center / contain; }
@media (prefers-reduced-motion: no-preference) {
  .hm-mascot { animation: hm-bob 4.5s ease-in-out infinite; }
  .hm-pill:hover .hm-pill-mascot { animation: hm-wiggle .6s ease-in-out; }
  @keyframes hm-bob { 50% { translate: 0 -6px; } }
  @keyframes hm-wiggle { 25% { rotate: -8deg; } 75% { rotate: 8deg; } }
}
@media (max-width: 560px) { .hm-pill { padding-inline-start: 64px; } .hm-pill-mascot { width: 42px; } .page-head-mascot .head-mascot { width: 56px; } }

/* ===== Parcours guidé d'une leçon ===== */
.path-layout { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.path-layout > * { min-width: 0; }
@media (max-width: 959px) { .path-main { order: -1; } }
@media (min-width: 960px) { .path-layout { grid-template-columns: 300px minmax(0, 1fr); } .path-rail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; } }
.path-rail-title { font-size: 1.15rem; margin: 2px 0 10px; }
.path-groups { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.path-group-title { display: flex; gap: 8px; align-items: center; font-weight: 700; margin: 0 0 6px; font-size: .93rem; }
.path-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pale); color: var(--link); font-size: .8rem; font-weight: 800; }
.path-group.is-done .path-num { background: var(--ok); color: #fff; }
.path-group.is-locked { opacity: .55; }
.path-group-end .path-num { background: var(--orange); color: #fff; }
.path-steps { list-style: none; margin: 0 0 0 12px; padding: 0 0 0 20px; border-inline-start: 2px dashed #D9CFF0; display: grid; gap: 2px; }
.path-steps a, .path-steps .is-locked { display: flex; gap: 8px; align-items: center; min-height: 36px; padding: 4px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: .9rem; }
.path-steps a:hover { background: var(--pale); }
.path-steps li.is-done a { color: var(--ok); }
.path-steps li.is-here a { background: var(--violet); color: #fff; font-weight: 700; }
.path-steps .is-locked { color: var(--muted); cursor: not-allowed; }
.path-title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); letter-spacing: -.02em; }
.path-title::after { content: ""; display: block; width: 56px; height: 6px; border-radius: 99px; background: var(--orange); margin-top: 10px; }
.path-card { margin-bottom: 16px; }
.path-actions { display: flex; justify-content: flex-end; margin: 8px 0 20px; }
.path-validate { margin: 0; }
.path-login { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.path-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.path-figure { margin: 0 0 18px; }
.path-figure .zoomable { background: var(--surface); }
.path-q { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }
.path-q.is-solved { border-color: var(--ok); background: var(--ok-bg); }
.path-q.is-wrong { border-color: #F3B8B2; background: var(--bad-bg); }
.path-q-ok { margin: 6px 0 0; color: var(--ok); }
.path-q .choices label.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.path-explain { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--orange-pale); border-inline-start: 4px solid var(--orange); }
.path-score.is-good { color: var(--ok); }
.path-score.is-bad { color: var(--orange-dark); }
.path-finish { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: linear-gradient(160deg, var(--surface), var(--pale)); }
.path-finish img { width: 110px; height: auto; }
.path-locked { max-width: 640px; }
.path-test-result { margin-bottom: 16px; border-inline-start: 6px solid var(--violet); }
.path-mission { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* Texte du cours : titres, équations, encadrés, tableaux */
.prose-course { line-height: 1.65; }
.prose-course p { max-width: 75ch; }
.md-h { font-size: 1.15rem; color: var(--link); margin: 1.2em 0 .5em; }
.md-eq { font-weight: 600; white-space: nowrap; }
.md-eq-block { text-align: center; font-weight: 600; background: var(--orange-pale); border: 1px solid #F8D2BD; border-radius: 12px; padding: 12px 14px; margin: 10px 0 16px; overflow-x: auto; max-width: none !important; }
.md-list, .md-steps { padding-inline-start: 22px; display: grid; gap: 6px; margin: 0 0 1em; }
.md-steps li::marker { color: var(--orange); font-weight: 800; }
.md-table { margin: 6px 0 18px; }
.md-table th[scope="row"] { background: var(--paper); color: var(--text); text-transform: none; letter-spacing: 0; font-size: .9rem; white-space: normal; }
.md-box { border-radius: 14px; padding: 14px 18px; margin: 14px 0 18px; border-inline-start: 5px solid var(--violet); background: var(--pale); }
.md-box > :last-child { margin-bottom: 0; }
.md-box-title { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--link); margin: 0 0 8px; }
.md-retenir { background: var(--surface-2); }
.md-piege { background: var(--orange-pale); border-inline-start-color: var(--orange); }
.md-piege .md-box-title { color: var(--orange-dark); }
.md-astuce { background: var(--warn-bg); border-inline-start-color: #C99A1E; }
.md-astuce .md-box-title { color: #8A6A0F; }
.md-experience { background: var(--surface); border: 1.5px solid var(--line); border-inline-start: 5px solid var(--violet); }
.md-methode { background: var(--surface-2); }

/* Expériences interactives du parcours */
.lab-widget { margin: 12px 0; }
.lab-toggles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.lab-toggles select { width: auto; flex: 1 1 220px; }
.lab-chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--violet); background: var(--surface); color: var(--link); font: inherit; font-weight: 700; cursor: pointer; }
.lab-chip.is-on { background: var(--violet); color: #fff; }
.lab-flow, .lab-chainline { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .lab-flow { grid-template-columns: repeat(3, 1fr); } .lab-chainline { grid-template-columns: repeat(6, 1fr); } }
.lab-stage, .lab-complex { display: grid; gap: 4px; padding: 12px; border-radius: 14px; border: 1.5px dashed #D9CFF0; background: var(--surface); opacity: .5; transition: opacity .3s, border-color .3s, transform .3s; }
.lab-stage.is-on, .lab-complex.is-on { opacity: 1; border-style: solid; border-color: var(--violet); transform: translateY(-2px); }
.lab-complex.is-on.pumps { border-color: var(--orange); background: var(--orange-pale); }
.lab-atp { color: var(--orange-dark); font-size: 1.1rem; }
.lab-counter { font-weight: 800; font-size: 1.15rem; color: var(--text-accent); }
.lab-step-title { font-weight: 800; color: var(--link); }
.lab-molecules { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 18px; border-radius: 14px; background: var(--paper); margin-bottom: 12px; }
.lab-chain { display: flex; }
.lab-atom { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--violet); color: var(--link); background: var(--surface); margin-inline-start: -4px; }
.lab-atom.is-p { border-color: var(--orange); color: var(--orange-dark); background: var(--orange-pale); }
.lab-bar { display: flex; height: 22px; border-radius: 99px; overflow: hidden; background: var(--track); margin: 8px 0; }
.lab-bar-atp { background: var(--orange); transition: width .4s; }
.lab-bar-rest { background: #B8A6DA; transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .lab-stage, .lab-complex, .lab-bar span { transition: none; } }

/* Expériences de l'unité 1 (lait, ATP, mitochondries, Krebs, ATP synthase, bilan, fermentation, levures) */
.lab-tokens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-token { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1.5px solid var(--violet); color: var(--link); background: var(--surface); animation: lab-pop .3s ease-out; }
.lab-token.is-lac { border-color: var(--deep); background: var(--pale); color: var(--text-accent); }
.lab-token.is-glu, .lab-token.is-gal { border-color: var(--violet); }
.lab-token.is-gal { border-style: dashed; }
.lab-token.is-acid { border-color: var(--orange-dark); color: var(--orange-dark); background: var(--orange-pale); }
.lab-token.is-nad { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.lab-token.is-nadh { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.lab-token.is-fad { border-color: var(--ok); color: var(--ok); border-style: dashed; }
.lab-token.is-co2 { border-color: var(--muted); color: var(--muted); }
.lab-token.is-atp, .lab-token.is-made { border-color: var(--orange); background: var(--orange); color: #fff; }
@keyframes lab-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lab-tube { display: grid; gap: 8px; min-height: 70px; padding: 14px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--line); margin-bottom: 12px; }
.lab-gauge { height: 14px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 4px 0 14px; }
.lab-gauge span { display: block; height: 100%; background: linear-gradient(90deg, #F7B48E, var(--orange-dark)); transition: width .5s; }
.lab-atom.is-base { border-color: var(--deep); background: var(--pale); }
.lab-atom.is-sugar { border-color: var(--muted); color: var(--muted); }
.lab-atom.is-coa { width: auto; padding: 0 8px; border-radius: 19px; border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.lab-atom.is-free { margin-inline-start: 0; animation: lab-pop .3s ease-out; }
.lab-bond { align-self: center; font-weight: 800; color: var(--orange-dark); padding: 0 2px 0 6px; }
.lab-gap { width: 18px; }
.lab-made { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-pool { display: grid; gap: 6px; margin: 8px 0 12px; }
.lab-graph-wrap { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px; margin-bottom: 12px; }
.lab-graph { width: 100%; height: auto; display: block; }
.lab-axis { stroke: var(--ink); stroke-width: 1.5; }
.lab-tick { font: 500 11px "Montserrat", sans-serif; fill: var(--muted); }
.lab-tick.is-mark { fill: var(--orange-dark); font-weight: 700; }
.lab-curve { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.lab-mark { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 4; }
.lab-mito { display: grid; border-radius: 16px; overflow: hidden; border: 1.5px solid var(--line); margin-bottom: 12px; }
.lab-compart { display: grid; gap: 8px; padding: 12px; min-height: 76px; align-content: start; }
.lab-compart.is-ims { background: var(--orange-pale); }
.lab-compart.is-matrix { background: var(--pale); }
.lab-compart-name { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lab-proton { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 13px; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; animation: lab-pop .2s ease-out; }
.lab-membrane { display: flex; gap: 4px; padding: 8px; background: repeating-linear-gradient(90deg, #D9CFF0 0 6px, #EDE7F8 6px 12px); overflow-x: auto; }
.lab-membrane span { flex: 1 0 auto; min-width: 38px; text-align: center; padding: 6px 4px; border-radius: 8px; background: var(--violet); color: #fff; font-size: .78rem; font-weight: 800; }
.lab-membrane .is-synthase { background: var(--orange-dark); }
.lab-membrane.is-leaky { background: repeating-linear-gradient(90deg, #D9CFF0 0 6px, transparent 6px 16px); outline: 2px dashed var(--bad); }
.lab-bilan { display: grid; gap: 8px; margin: 10px 0; }
.lab-row { display: grid; gap: 2px; text-align: start; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1.5px dashed #D9CFF0; background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.lab-row span { font-size: .9rem; color: var(--muted); }
.lab-row.is-on { border-style: solid; border-color: var(--orange); background: var(--orange-pale); }
.lab-row.is-on span { color: var(--text); font-weight: 600; }
.lab-stack { display: flex; height: 30px; border-radius: 99px; overflow: hidden; background: var(--track); margin: 8px 0; }
.lab-seg { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; transition: width .4s; }
.lab-seg.is-0 { background: var(--violet); }
.lab-seg.is-1 { background: var(--deep); }
.lab-seg.is-2 { background: var(--orange); }
.lab-flasks { display: grid; gap: 12px; margin: 12px 0; }
@media (min-width: 720px) { .lab-flasks { grid-template-columns: 1fr 1fr; } }
.lab-flask { display: grid; gap: 8px; padding: 14px; min-width: 0; }
.lab-flask.is-aer { border-color: var(--violet); }
.lab-meter { display: grid; gap: 2px; }
.lab-meter .lab-bar { height: 14px; margin: 0; }
.lab-meter .lab-bar span { display: block; height: 100%; }
.lab-bar-cells { background: var(--ok); transition: width .4s; }
.lab-mito-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-mito-svg { width: 92px; height: auto; }
.lab-mito-out { fill: var(--pale); stroke: var(--violet); stroke-width: 2.5; }
.lab-mito-in { fill: #fff; stroke: var(--violet); stroke-width: 1.5; }
.lab-mito-crest { stroke: var(--violet); stroke-width: 3; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .lab-token, .lab-proton, .lab-atom.is-free { animation: none; } .lab-gauge span, .lab-seg, .lab-bar-cells { transition: none; } }

.path-edit { margin-top: 12px; }
.path-edit > summary { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.path-edit-fig { max-height: 220px; width: auto; border: 1px solid var(--line); border-radius: 10px; }
.path-edit-qs { display: grid; gap: 8px; padding-inline-start: 22px; }
.path-edit-qs li { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }

/* ---------- Espace élève guidé : onglets, compte, Cours › Unité › Chapitre ---------- */
.student-tabs a { font-weight: 700; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-list { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 210px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.account-list a, .account-list .link-btn { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; text-align: start; width: 100%; min-height: 44px; }
.account-list a:hover, .account-list .link-btn:hover { background: var(--pale); }
.account-list a[aria-current] { font-weight: 700; color: var(--link); }
.account-list form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }

.sp-continue { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border: 2px solid var(--orange); background: linear-gradient(135deg, var(--surface), var(--orange-pale)); }
.sp-continue h2 { margin: 2px 0 8px; }
.sp-continue > div { flex: 1 1 260px; min-width: 0; }
.sp-unit-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sp-unit-rows a { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.sp-unit-rows a:hover { border-color: var(--violet); }
.sp-unit-rows a > span:first-child { display: grid; gap: 2px; flex: 1 1 240px; min-width: 0; }
.sp-unit-rows .progress-line { flex: 0 1 220px; }

.sp-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 0 0 18px; }
.sp-filters label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.sp-filters select { min-height: 44px; }
.sp-unit-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.sp-unit-card { display: grid; gap: 8px; align-content: start; color: var(--text); text-decoration: none; border: 1.5px solid var(--line); transition: border-color .2s, transform .2s; }
.sp-unit-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.sp-unit-card.is-termine { border-color: var(--ok); }
.sp-unit-card .badge { justify-self: start; }
.sp-unit-title { font-size: 1.1rem; line-height: 1.3; }

.sp-chapters { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.sp-chapter { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.sp-chapter.is-locked { opacity: .7; }
.sp-chapter.is-done { border-color: var(--ok); }
.sp-chapter-icon { font-size: 1.6rem; width: 40px; text-align: center; }
.sp-chapter-body { flex: 1 1 240px; min-width: 0; }
.sp-chapter-title { font-size: 1.1rem; margin: 2px 0 4px; }
.sp-exams.is-locked, .sp-ex.is-locked { background: var(--bg); }

.sp-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sp-steps > li { border-radius: 12px; border: 1px solid transparent; }
.sp-steps > li > a, .sp-step-locked, .sp-step-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; margin: 0; }
.sp-steps > li > a:hover { background: var(--pale); }
.sp-steps > li.is-here { border-color: var(--violet); background: var(--surface); padding-bottom: 8px; }
.sp-steps > li.is-here > .progress-line, .sp-steps > li.is-here > .path-groups { margin-inline: 10px; }
.sp-steps > li.is-locked { opacity: .6; }
.sp-step-icon { flex: 0 0 24px; text-align: center; }
.sp-step-ex { border-top: 1px dashed var(--line) !important; border-radius: 0 !important; padding-top: 4px; }
.sp-stepper { padding: 0; margin-bottom: 14px; }
.sp-stepper summary { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 52px; padding: 12px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.sp-stepper summary::-webkit-details-marker { display: none; }
.sp-stepper[open] summary { border-bottom: 1px solid var(--line); }
.sp-stepper .sp-steps { padding: 8px; }
@media (min-width: 960px) { .sp-stepper { display: none; } }
@media (max-width: 959px) { .sp-rail { display: none; } .sp-chapter-layout .path-main { order: 0; } }
.sp-current h2 { margin: 2px 0 8px; }
.sp-quiz-group h3 { margin-top: 0; }
.outline li.is-locked { opacity: .7; }
.path-test-result.is-good { border-inline-start: 5px solid var(--ok); }
.path-test-result.is-bad { border-inline-start: 5px solid var(--orange); }
.path-threshold { align-items: end; margin: 6px 0 14px; }
.label-spacer { display: block; }
.card-inner { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0; display: grid; gap: 10px; }
.card-inner legend { padding: 0 6px; }
.up-pending:empty { display: none; }
.page-item.has-warn { border-color: var(--warn); background: var(--warn-bg); }
.up-warn { display: block; color: var(--warn); font-weight: 600; font-size: .88rem; margin-top: 4px; }

/* Examen blanc et révision intelligente */
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.sp-chips legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.sp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.sp-chip input:checked + span { border-color: var(--violet); background: var(--violet); color: #fff; }
.sp-chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.sp-chip small { opacity: .75; margin-inline-start: 4px; }
.sp-modes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: 12px; }
.sp-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.sp-mode:has(input:checked) { border-color: var(--violet); background: var(--pale); }
.sp-mode input { margin-top: 4px; accent-color: var(--violet); }
.sp-practice-form h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.sp-practice-form h2:first-of-type { margin-top: 0; }
.sp-mastery { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sp-mastery li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border-inline-start: 5px solid var(--line); }
.sp-mastery li .lab-bar, .sp-mastery li .btn { grid-column: 1 / -1; justify-self: start; }
.sp-mastery li .lab-bar { width: 100%; height: 10px; margin: 0; }
.sp-mastery li .lab-bar span { display: block; height: 100%; }
.sp-mastery .is-good { border-inline-start-color: var(--ok); }
.sp-mastery .is-mid { border-inline-start-color: var(--warn); }
.sp-mastery .is-low { border-inline-start-color: var(--bad); }
.sp-mastery-score { font-size: 1.4rem; font-weight: 800; color: var(--text-accent); }
.sp-today-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.sp-today-row p { margin: 0; flex: 1 1 240px; }
.question-img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.choices .is-correct { color: var(--ok); font-weight: 700; }
.choices .is-wrong { color: var(--bad); text-decoration: line-through; }

/* Formats de questions, assistant, missions, parents */
.q-match, .q-order { display: grid; gap: 8px; margin: 8px 0; }
.q-match-row, .q-order-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.q-match-left { flex: 1 1 160px; font-weight: 600; }
.q-match-row select { flex: 1 1 160px; min-height: 44px; }
.q-order-row select { width: 72px; min-height: 44px; }
.q-numeric { display: flex; gap: 8px; align-items: center; }
.q-numeric input { max-width: 180px; min-height: 44px; font-size: 1.1rem; }
.q-unit { font-weight: 700; }
.hint-bubble { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; padding: 10px 12px; border-radius: 14px; background: var(--pale); }
.hint-bubble p { margin: 0; }
.hint-btn { margin-top: 6px; }
.sp-missions-head { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.sp-missions-head p { margin: 0; }
.sp-streak strong, .sp-countdown strong { font-size: 1.2rem; color: var(--orange-dark); }
.sp-missions { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sp-missions li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.sp-missions li.is-done { border-color: var(--ok); background: var(--ok-bg); }
.sp-mission-check { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; font-weight: 800; }
.is-done .sp-mission-check { background: var(--ok); border-color: var(--ok); }
.sp-mission-text { flex: 1 1 auto; min-width: 0; }
.sp-mission-bar { display: block; height: 8px; margin: 6px 0 0; }
.sp-mission-bar span { display: block; height: 100%; }
.sp-days { list-style: none; display: flex; gap: 4px; padding: 0; margin: 10px 0; }
.sp-days li { flex: 1 1 0; height: 22px; border-radius: 6px; background: var(--track); }
.sp-days li.is-on { background: var(--orange); }
.sp-rank-big { font-size: 1.4rem; margin: 4px 0; }
.sp-rank-big strong { color: var(--orange-dark); font-size: 2rem; }
.sp-code { font-size: 2rem; font-weight: 800; letter-spacing: .15em; color: var(--text-accent); }
.input-code { text-transform: uppercase; letter-spacing: .1em; }
.sp-unit-row-static { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.qcm-result { text-align: center; }
.qcm-result.is-good { border-top: 5px solid var(--ok); }
.qcm-result.is-bad { border-top: 5px solid var(--orange); }
.qcm-score { font-size: 1.4rem; margin: 2px 0 6px; }
.qcm-score strong { font-size: 2.6rem; color: var(--text-accent); }

.sp-test { border: 2px solid var(--violet); }
.sp-test.is-locked { border-color: var(--line); background: var(--bg); }

/* Expériences animées (chaîne respiratoire, ATP synthase, cycle de Krebs) */
.anim-wrap { border-radius: 16px; overflow: hidden; border: 1.5px solid var(--line); margin: 10px 0; background: var(--surface); }
.anim-svg { display: block; width: 100%; height: auto; }
.anim-ims { fill: #FFF1E8; }
.anim-matrix { fill: #EFEAF8; }
.anim-cyto { fill: #FBF9F6; }
.anim-lipid { fill: #C9B8EA; }
.anim-tail { stroke: #C9B8EA; stroke-width: 2; }
.anim-zone { font: 800 12px "Montserrat", sans-serif; fill: #5E5873; text-transform: uppercase; letter-spacing: .04em; }
.anim-complex { fill: #5C3E94; }
.anim-complex.is-small { fill: #7B62AE; }
.anim-mobile { fill: #412B6B; }
.anim-cname { font: 800 13px "Montserrat", sans-serif; fill: #fff; }
.anim-cname.is-light { font-size: 11px; }
.anim-rotor rect { fill: #C9450A; }
.anim-rotor line { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.anim-stalk { fill: #C9450A; }
.anim-head { fill: #F25912; }
.anim-chip rect { fill: #fff; stroke: #5C3E94; stroke-width: 2; }
.anim-chip text { font: 800 11px "Montserrat", sans-serif; fill: #412B6B; }
.anim-chip.is-proton rect { fill: #F25912; stroke: #C9450A; }
.anim-chip.is-proton text { fill: #fff; }
.anim-chip.is-electron rect { fill: #1E88E5; stroke: #1565C0; }
.anim-chip.is-electron text { fill: #fff; }
.anim-chip.is-donor rect, .anim-chip.is-nadh rect { fill: #FFF2D6; stroke: #8A5A00; }
.anim-chip.is-donor text, .anim-chip.is-nadh text { fill: #8A5A00; }
.anim-chip.is-fad rect { fill: #E4F5EC; stroke: #1B7A4B; }
.anim-chip.is-fad text { fill: #1B7A4B; }
.anim-chip.is-co2 rect { fill: #ECEFF1; stroke: #78909C; }
.anim-chip.is-co2 text { fill: #455A64; }
.anim-chip.is-o2 rect { fill: #E3F2FD; stroke: #1E88E5; }
.anim-chip.is-water rect { fill: #BBDEFB; stroke: #1E88E5; }
.anim-chip.is-water text, .anim-chip.is-o2 text { fill: #0D47A1; }
.anim-chip.is-atp rect { fill: #F25912; stroke: #C9450A; }
.anim-chip.is-atp text { fill: #fff; }
.anim-chip.is-adp rect { fill: #FFF1E8; stroke: #F25912; }
.anim-chip.is-stop rect { fill: #FCE8E6; stroke: #B3261E; }
.anim-chip.is-stop text { fill: #B3261E; }
.anim-svg.is-leaky .anim-lipid { fill: #F4A3A3; }
.anim-say { font-weight: 600; min-height: 3em; padding: 10px 14px; border-radius: 12px; background: var(--pale); color: var(--text-accent); }
.anim-gauge-box { display: grid; gap: 4px; margin: 6px 0 10px; }
.anim-gauge { height: 16px; border-radius: 99px; background: var(--track); overflow: hidden; }
.anim-gauge-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #F7B48E, #C9450A); transition: width .25s; }
.anim-mito-out { fill: #E9E1F7; stroke: #5C3E94; stroke-width: 3; }
.anim-mito-in { fill: #F3EEFB; stroke: #7B62AE; stroke-width: 2; stroke-dasharray: 8 6; }
.anim-crest { stroke: #7B62AE; stroke-width: 6; stroke-linecap: round; }
.anim-ring { fill: none; stroke: #C9B8EA; stroke-width: 10; }
.anim-node { fill: #fff; stroke: #5C3E94; stroke-width: 3; }
.anim-node.is-on { fill: #F25912; stroke: #C9450A; }
.anim-mol circle { fill: #fff; stroke: #412B6B; stroke-width: 2.5; }
.anim-mol circle.is-lact { fill: #FFF1E8; stroke: #C9450A; }
.anim-mol text { font: 800 11px "Montserrat", sans-serif; fill: #412B6B; }
.anim-mol .is-coa { fill: #E4F5EC; stroke: #1B7A4B; stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .anim-gauge-fill { transition: none; } }
.anim-label { font: 700 11px "Montserrat", sans-serif; fill: #412B6B; }
.anim-label.is-center { font-size: 13px; fill: #7B62AE; }

/* Expériences du chapitre 2 (muscle) */
.myo-muscle { display: grid; gap: 5px; padding: 12px; border-radius: 40px; background: #F3D2D2; border: 2px solid #C98A8A; margin: 4px 0 10px; }
.myo-fiber { display: block; height: 9px; border-radius: 9px; background: #E8B4B4; transition: background .2s; }
.myo-fiber.is-on { background: #C9450A; }
.myo-fiber.is-pulse { animation: myo-pulse .5s ease-out; }
@keyframes myo-pulse { 0% { transform: scaleX(1); } 40% { transform: scaleX(.92); } 100% { transform: scaleX(1); } }
.myo-stim { fill: #5C3E94; }
.myo-arrow { stroke: #5C3E94; stroke-width: 3; }
.myo-label { font-weight: 700; }
.myo-name { font-size: 1.3rem; font-weight: 800; color: var(--orange-dark); margin: 6px 0; }
.myo-heat { fill: none; stroke: #C9450A; stroke-width: 3; stroke-linejoin: round; }
.myo-tag { font: 800 12px "Montserrat", sans-serif; fill: #C9450A; }
.myo-tag.is-off { fill: #5E5873; }
.myo-lab { display: grid; gap: 16px; grid-template-columns: 120px minmax(0, 1fr); align-items: center; margin: 10px 0; }
@media (max-width: 560px) { .myo-lab { grid-template-columns: 1fr; } }
.myo-icon { height: 120px; display: grid; place-items: center; }
.myo-icon span { display: block; width: 110px; height: 46px; border-radius: 50px; background: linear-gradient(90deg, #C98A8A, #E8B4B4, #C98A8A); border: 2px solid #A35F5F; }
.myo-icon.is-contract span { animation: myo-contract .3s ease-in-out; }
@keyframes myo-contract { 50% { transform: scaleX(.7) scaleY(1.25); } }
.myo-bars { display: grid; gap: 8px; }
.myo-bar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 52px; gap: 8px; align-items: center; }
.myo-track { height: 16px; border-radius: 99px; background: var(--track); overflow: hidden; }
.myo-bar-fill { display: block; height: 100%; transition: width .3s; }
.myo-bar-fill.is-gly { background: #7B62AE; }
.myo-bar-fill.is-lac { background: #F7B48E; }
.myo-bar-fill.is-pc { background: #1B7A4B; }
.myo-bar-fill.is-atp { background: #F25912; }
.sar-band-i { fill: #FFF8EF; }
.sar-band-a { fill: #D9CFF0; }
.sar-band-h { fill: #BFB0E3; }
.sar-actin { stroke: #F25912; stroke-width: 5; stroke-linecap: round; }
.sar-myosin { stroke: #412B6B; stroke-width: 9; stroke-linecap: round; }
.sar-head { stroke: #412B6B; stroke-width: 3; stroke-linecap: round; }
.sar-z { stroke: #211832; stroke-width: 5; }
.sar-m { stroke: #5E5873; stroke-width: 2; stroke-dasharray: 5 4; }
.sar-dim { stroke: #5E5873; stroke-width: 1.5; }
.pt-actin { fill: #F7B48E; stroke: #C9450A; stroke-width: 1.5; }
.pt-site { fill: #412B6B; }
.pt-tropo { fill: none; stroke: #1B7A4B; stroke-width: 6; stroke-linecap: round; opacity: .85; }
.pt-myosin { fill: #412B6B; }
.pt-arm { stroke: #5C3E94; stroke-width: 8; stroke-linecap: round; }
.pt-head { fill: #7B62AE; stroke: #412B6B; stroke-width: 2.5; }
.reg-curve { fill: none; stroke-width: 4; stroke-linejoin: round; }
.reg-curve.is-pc { stroke: #1B7A4B; }
.reg-curve.is-lac { stroke: #F25912; }
.reg-curve.is-res { stroke: #5C3E94; }
.reg-cursor { stroke: #211832; stroke-width: 2; stroke-dasharray: 6 4; }
@media (prefers-reduced-motion: reduce) { .myo-fiber.is-pulse, .myo-icon.is-contract span { animation: none; } .myo-bar-fill { transition: none; } }

/* Physique : ondes */
.ond-rope { fill: none; stroke: #5C3E94; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.ond-dot { fill: #B3261E; stroke: #fff; stroke-width: 2; }
.ond-coil { stroke: #7B62AE; stroke-width: 3; stroke-linecap: round; }
.ond-coil.is-red { stroke: #B3261E; stroke-width: 4; }
.ond-track { stroke: #B3261E; stroke-width: 2; stroke-dasharray: 4 4; opacity: .6; }
.ond-arrow { stroke: #F25912; stroke-width: 3; fill: none; }
.ond-arrow.is-head { fill: #F25912; stroke: none; }
.ond-hand { fill: #F7B48E; stroke: #C9450A; stroke-width: 2; }
.ond-sensor { stroke: #1E88E5; stroke-width: 2; stroke-dasharray: 5 4; }
.ond-clock { font: 800 1.4rem "Montserrat", sans-serif; color: var(--text-accent); font-variant-numeric: tabular-nums; margin: 6px 0; }
.ond-two { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.review-banner { border-inline-start: 5px solid var(--warn); background: var(--warn-bg); }

/* Physique · ondes périodiques */
.ond-dot.is-blue { fill: #1E88E5; }
.anim-svg.ond-dark { background: #1D1530; border-radius: 10px; }
.ond-rope.is-lit { stroke: #F4E9FF; }
.ond-flash { font: 700 12px "Montserrat", sans-serif; fill: #FFD25A; }
.ond-water { fill: #E3F1FB; }
.ond-crest { fill: none; stroke: #1565C0; stroke-width: 3; stroke-linecap: round; }
.ond-barrier { fill: #3B2A5C; }

.ond-prism { fill: rgba(200, 220, 255, .18); stroke: #C9D6F2; stroke-width: 2; }
.ond-flash-dim { stroke: #FFD25A; stroke-width: 2; }

/* Physique · nucléaire */
.ond-grid { stroke: #E4DDF0; stroke-width: 1; }
.nuc-on { fill: #5C3E94; }
.nuc-off { fill: #E4DDF0; }
.lab-curve.is-theory { stroke: #F25912; stroke-width: 2; stroke-dasharray: 6 5; }
.aston-zone { fill: rgba(67, 160, 71, .12); }
.ond-dot.is-click { cursor: pointer; }
.ond-dot.is-click:hover, .ond-dot.is-click:focus { stroke: #F25912; stroke-width: 3; outline: none; }
.anim-svg.nuc-grid { max-width: 260px; margin: 0 auto; }

/* Physique · électricité */
.lab-curve.is-ghost { stroke: #B9B2C8; stroke-width: 2; }
.lab-tangent { stroke: #F25912; stroke-width: 1.5; stroke-dasharray: 5 4; }
.rlc-bars { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--surface-2); margin: 6px 0 10px; }
.rlc-bars span { display: block; height: 100%; width: 0; }
.rlc-e { background: #5C3E94; }
.rlc-m { background: #1E88E5; }
.rlc-j { background: #B9B2C8; }
.rlc-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-left: 8px; }

.lab-curve.is-thin { stroke-width: 1.2; }
.lab-curve.is-env { stroke: #F25912; stroke-width: 2; stroke-dasharray: 6 4; }
.lab-curve.is-det { stroke: #43A047; stroke-width: 2.5; }

/* Physique · mécanique */
.mec-ramp { fill: #EDE7F6; stroke: #7B62AE; stroke-width: 2; }
.mec-block { fill: #F7B48E; stroke: #C9450A; stroke-width: 2; }
.mec-f-p { stroke: #1E88E5; stroke-width: 3; fill: none; }
.mec-f-p.is-head { fill: #1E88E5; stroke: none; }
.mec-f-r { stroke: #43A047; stroke-width: 3; fill: none; }
.mec-f-r.is-head { fill: #43A047; stroke: none; }
.mec-f-f { stroke: #F25912; stroke-width: 3; fill: none; }
.mec-f-f.is-head { fill: #F25912; stroke: none; }
.mec-euler { fill: #F25912; }
.mec-key-euler { background: #F25912; }
.anim-svg.mec-space { background: #120C22; border-radius: 10px; max-width: 360px; margin: 0 auto; }
.mec-orbit { fill: none; stroke: #8A7BB0; stroke-width: 1.5; stroke-dasharray: 4 4; }
.mec-earth { fill: #2E7DD7; stroke: #9CCBFF; stroke-width: 2; }
.mec-spot { fill: #F25912; }
.mec-pulley { fill: #EDE7F6; stroke: #5C3E94; stroke-width: 4; }
.mec-spoke { stroke: #5C3E94; stroke-width: 3; }
.mec-rope { fill: none; stroke: #3B2A5C; stroke-width: 2; }
.mec-spring { fill: none; stroke: #7B62AE; stroke-width: 3; stroke-linejoin: round; }
.mec-level { stroke: #B9B2C8; stroke-width: 2; }
.mec-level.is-on { stroke: #3B2A5C; stroke-width: 3; }
.mec-jump { stroke-width: 6; opacity: .45; }
.mec-bars { display: grid; gap: 6px; margin: 8px 0; }
.mec-row { display: grid; grid-template-columns: 40px 1fr 70px; align-items: center; gap: 8px; font-size: .9rem; }
.mec-track { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.mec-fill { display: block; height: 100%; width: 0; }
.mec-fill.is-ec { background: #1E88E5; }
.mec-fill.is-ep { background: #5C3E94; }
.mec-fill.is-em { background: #F25912; }

/* Chimie */
.chm-ion { fill: #F25912; }
.lab-tangent.is-strong { stroke-width: 2.5; stroke-dasharray: none; }
.chm-acid { fill: #FCE4D6; }
.chm-base { fill: #DCEBFB; }
.chm-label { font: 700 13px "Montserrat", sans-serif; fill: #3B2A5C; }
.chm-zone { fill: rgba(242, 89, 18, .35); }
.chm-tube { width: 60px; height: 90px; margin: 4px auto 10px; border: 3px solid #B9B2C8; border-top: none; border-radius: 0 0 30px 30px; background: var(--surface); }
.chm-sol-zn { fill: #EEF2F5; stroke: #9AA7B3; stroke-width: 2; }
.chm-sol-cu { fill: #CFE6FB; stroke: #6FA5D8; stroke-width: 2; }
.chm-bridge { fill: none; stroke: #D8CBEA; stroke-width: 18; stroke-linejoin: round; }
.chm-zn { fill: #9AA7B3; }
.chm-cu { fill: #C87533; }
.chm-e { fill: #FFD25A; stroke: #C9450A; stroke-width: 1.5; }

/* SVT */
.svt-cell { fill: #FFF6EE; stroke: #C9450A; stroke-width: 2; }
.svt-nucleus { fill: #F1EDF7; stroke: #7B62AE; stroke-width: 2; stroke-dasharray: 4 3; }
.svt-spindle { stroke: #B9B2C8; stroke-width: 1.5; stroke-dasharray: 3 3; }
.svt-tube { fill: #F4F7FB; stroke: #7B8794; stroke-width: 2; }
.svt-band { fill: #5C3E94; }
.svt-seq { display: grid; gap: 6px; margin: 10px 0; overflow-x: auto; }
.svt-seq p { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.svt-seq code { font-size: .95rem; letter-spacing: .04em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.svt-seq code.svt-prot { background: var(--orange-pale); }
.svt-gel { fill: #EAF2F8; stroke: #9AA7B3; }
.svt-well { fill: #3B2A5C; }
.svt-dna { fill: #7B62AE; }
.svt-dna.is-hl { fill: #F25912; }
.svt-grid { overflow-x: auto; margin: 10px 0; }
.svt-table { border-collapse: collapse; margin: 0 auto; font-size: .9rem; }
.svt-table th, .svt-table td { border: 1px solid #D8CBEA; padding: 6px 8px; text-align: center; }
.svt-table th { background: var(--surface-2); text-transform: none; letter-spacing: 0; }
.svt-table td span { display: block; font-weight: 700; }
.svt-table td small { color: #5C3E94; }
.svt-table td.is-ok { color: #2E7D32; font-weight: 700; }
.svt-table td.is-ko { color: #B3261E; font-weight: 700; }
.svt-table td.is-sel { outline: 3px solid #F25912; outline-offset: -3px; }
.svt-inputs { display: flex; gap: 12px; flex-wrap: wrap; }
.svt-num { width: 90px; }
.lab-curve.is-thin2 { stroke-width: 1.8; }
.svt-row { display: grid; grid-template-columns: 1fr auto 24px; gap: 8px; align-items: center; margin: 4px 0; }
.svt-mark.is-ok { color: #2E7D32; }
.svt-mark.is-ko { color: #B3261E; }
.svt-bar { fill: #7B62AE; }
.svt-bar.is-top { fill: #B3261E; }
.svt-sky { fill: #DCEBFB; }
.svt-cont { fill: #D7B98E; stroke: #8D6E45; stroke-width: 1.5; }
.svt-ocean-plate { fill: #6F7F99; stroke: #3E4C63; stroke-width: 1.5; }
.svt-volcano { fill: #B3261E; }
.svt-melt { fill: rgba(242, 89, 18, .55); }
.svt-focus { fill: #FFD25A; stroke: #8D3B00; stroke-width: 1; }
.svt-zone-ecl { fill: rgba(67, 160, 71, .15); }
.svt-zone-bleu { fill: rgba(30, 136, 229, .15); }
.svt-rbc { fill: #E53935; stroke: #8E1B19; stroke-width: 2; }

/* Mathématiques */
.mth-band { fill: rgba(242, 89, 18, .12); }
.mth-web { stroke: #F25912; stroke-width: 1.5; }
.mth-rect { fill: rgba(92, 62, 148, .18); stroke: #7B62AE; stroke-width: 1; }
.mth-vec { stroke: #5C3E94; stroke-width: 3; }
.mth-vec.is-img { stroke: #1E88E5; }
.mth-bar { fill: #7B62AE; }
.mth-bar.is-sim { fill: #F25912; }

.mth-dotB { fill: #B9B2C8; }
.mth-orbit { fill: none; stroke: #5C3E94; stroke-width: 3; stroke-dasharray: 8 5; }

/* ===== Accueil multi-matières : une couleur par matière ===== */
:root { --svt: #1F8A4C; --svt-pale: #E7F5EC; --phys: #1D63C9; --phys-pale: #E6EFFB; --chim: #0B8A93; --chim-pale: #E2F4F5; --math: #C9450A; --math-pale: #FFF1E8; }
/* Fond « papier millimétré » : grands et petits carreaux */
.hm-hero { background:
  linear-gradient(rgba(92, 62, 148, .07) 1px, transparent 1px) 0 0 / 64px 64px,
  linear-gradient(90deg, rgba(92, 62, 148, .07) 1px, transparent 1px) 0 0 / 64px 64px,
  linear-gradient(rgba(92, 62, 148, .035) 1px, transparent 1px) 0 0 / 16px 16px,
  linear-gradient(90deg, rgba(92, 62, 148, .035) 1px, transparent 1px) 0 0 / 16px 16px,
  radial-gradient(760px 380px at 50% 0%, var(--glow) 0%, transparent 70%), var(--paper); }
.hm-d.is-svt { --c: var(--svt); } .hm-d.is-phys { --c: var(--phys); } .hm-d.is-chim { --c: var(--chim); } .hm-d.is-math { --c: var(--math); }
.hm-d .hm-d-text { fill: var(--c, var(--violet)); }
.hm-d .hm-d-line { stroke: var(--c, var(--violet)); }
.hm-d .hm-d-accent { stroke: var(--c, var(--orange)); }
.hm-d .hm-d-rung { stroke: var(--c, var(--orange)); opacity: .45; }
.hm-d-fill { fill: var(--c, var(--violet)); opacity: .7; }
.hm-d1 { top: 9%; left: 5%; width: clamp(44px, 6vw, 70px); transform: none; }
.hm-d2 { top: 8%; right: 6%; width: clamp(80px, 10vw, 130px); }
.hm-d3 { bottom: 12%; left: 6%; }
.hm-d4 { top: 62%; right: 3%; transform: rotate(-3deg); }
.hm-d5 { bottom: 9%; right: 12%; }
.hm-d6 { top: 52%; left: 2%; transform: rotate(-4deg); }
.hm-d7 { top: 34%; right: 15%; transform: rotate(5deg); width: clamp(80px, 10vw, 130px); }
.hm-d8 { top: 30%; left: 15%; transform: rotate(-5deg); width: clamp(80px, 10vw, 130px); }
.hm-dot2 { background: var(--phys); } .hm-dot3 { background: var(--svt); }
@media (max-width: 1100px) { .hm-d7, .hm-d8 { display: none; } }
@media (max-width: 760px) { .hm-d5 { display: none; } }

/* Bandeau des matières sous le titre */
.hm-subjects-strip { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: -8px auto 24px; }
.hm-subjects-strip li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; border: 1.5px solid currentColor; background: var(--surface); }
.is-svt { --c: var(--svt); --cp: var(--svt-pale); } .is-phys { --c: var(--phys); --cp: var(--phys-pale); }
.is-chim { --c: var(--chim); --cp: var(--chim-pale); } .is-math { --c: var(--math); --cp: var(--math-pale); }
.hm-subjects-strip li { color: var(--c); }

/* Cartes des trois matières */
.hm-subjects { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 24px; }
.hm-subject { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; border-top: 6px solid var(--c); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.hm-subject:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(65, 43, 107, .14); color: inherit; }
.hm-subject::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 140px; height: 140px; border-radius: 50%; background: var(--cp); transform: translate(40%, -40%); }
.hm-subject > * { position: relative; }
.hm-subject h3 { color: var(--c); margin: 0; }
.hm-subject-ico { width: 54px; height: 54px; }
.hm-subject-ico .ico-line { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; }
.hm-subject-ico .ico-rung { fill: none; stroke: var(--c); stroke-width: 3; opacity: .45; }
.hm-subject-ico .ico-accent { fill: none; stroke: var(--c); stroke-width: 5; stroke-linecap: round; }
.hm-subject-ico .ico-fill { fill: var(--c); }
.hm-topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.hm-topics li { padding-inline-start: 20px; position: relative; }
.hm-topics li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--c); opacity: .7; }
.hm-tracks { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
.hm-tracks span { font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 6px; background: var(--cp); color: var(--c); }
.hm-subject-go { margin-top: auto; font-weight: 700; color: var(--c); }

/* Labo : onglets par matière (radios + CSS, sans script) */
.hm-labtabs { position: relative; margin-top: 18px; }
.hm-tab-input { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hm-tab-labels { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hm-tab { cursor: pointer; padding: 8px 16px; border-radius: 999px; font-weight: 700; color: var(--c); background: var(--surface); border: 2px solid var(--c); user-select: none; }
.hm-tab:hover { background: var(--cp); }
.hm-tab-panel { display: none; }
#lt-svt:checked ~ .hm-tab-panels .p-svt, #lt-phys:checked ~ .hm-tab-panels .p-phys,
#lt-chim:checked ~ .hm-tab-panels .p-chim, #lt-math:checked ~ .hm-tab-panels .p-math { display: block; }
#lt-svt:checked ~ .hm-tab-labels [for="lt-svt"], #lt-phys:checked ~ .hm-tab-labels [for="lt-phys"],
#lt-chim:checked ~ .hm-tab-labels [for="lt-chim"], #lt-math:checked ~ .hm-tab-labels [for="lt-math"] { background: var(--c); color: #fff; }
#lt-svt:focus-visible ~ .hm-tab-labels [for="lt-svt"], #lt-phys:focus-visible ~ .hm-tab-labels [for="lt-phys"],
#lt-chim:focus-visible ~ .hm-tab-labels [for="lt-chim"], #lt-math:focus-visible ~ .hm-tab-labels [for="lt-math"] { outline: 3px solid var(--orange); outline-offset: 2px; }
.hm-lab.is-phys, .hm-lab.is-chim, .hm-lab.is-math { border-top: 5px solid var(--c); }
.hm-lab-live { margin-top: 8px; }

/* Badge de semestre (S1 / S2) */
.badge-sem { background: var(--orange-pale); color: #B03C08; font-weight: 700; margin-inline-start: 4px; }

/* Filtres : programme fixé de l'élève (niveau et filière) */
.field-scope { display: flex; flex-direction: column; gap: 4px; }
.label-like { font-weight: 600; font-size: .9rem; color: var(--text-accent); }
.scope-pill { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--pale); color: var(--text-accent); font-weight: 700; }

/* Fiche de révision imprimable */
.fiche { max-width: 900px; margin: 0 auto; }
.fiche-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 4px solid var(--orange); padding-bottom: 10px; margin-bottom: 12px; }
.fiche-kicker { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-dark); font-weight: 700; margin: 0; }
.fiche-logo { width: 150px; height: auto; }
.fiche-lesson { margin: 18px 0; break-inside: avoid-page; }
.fiche-lesson h2 { font-size: 1.15rem; color: var(--text-accent); display: flex; gap: 8px; align-items: center; }
.fiche-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet); color: #fff; font-size: .9rem; }
.fiche-block { border: 1px solid var(--line); border-inline-start: 5px solid var(--violet); border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: var(--surface); break-inside: avoid; }
.fiche-block h3 { font-size: .9rem; margin: 0 0 4px; color: var(--text-accent); }
.fiche-formulas { border-inline-start-color: #1D63C9; } .fiche-formulas ul { columns: 2; margin: 0; padding-inline-start: 18px; }
.fiche-piege { border-inline-start-color: #B3261E; } .fiche-astuce { border-inline-start-color: var(--orange); background: var(--orange-pale); }
.fiche-foot { text-align: center; color: var(--muted); margin-top: 20px; }
@media (max-width: 640px) { .fiche-formulas ul { columns: 1; } }
@media print {
  .site-header, .space-nav, .site-footer, header.site, nav, footer, .no-print, .hm-whatsapp { display: none !important; }
  body { background: var(--surface); } .fiche-block { box-shadow: none; } a { color: inherit; text-decoration: none; }
}

/* ---------- Banque d'exercices ---------- */
.bank-method { margin: 12px 0 18px; }
.bank-subject { margin: 18px 0; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bank-card { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.bank-card:hover, .bank-card:focus-visible { border-color: var(--orange); }
.bank-levels, .bank-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bank-tabs { margin: 8px 0 16px; }
.bank-lvl { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; text-decoration: none; }
.bank-lvl-fondamental { background: #e6f4ea; color: #1e6b34; }
.bank-lvl-bac { background: #fff1e0; color: #9a4d00; }
.bank-lvl-excellence { background: #ece6fb; color: #4b2b9a; }
.bank-level { margin: 22px 0; scroll-margin-top: 80px; }
.bank-ex { margin: 12px 0; scroll-margin-top: 80px; }
.bank-ex-head h3 { margin: 0 0 4px; }
.bank-statement { border-left: 4px solid var(--orange); padding-left: 12px; margin: 10px 0; }
.bank-questions { list-style: none; padding-left: 0; }
.bank-questions > li { margin: 12px 0; }
.bank-pts { color: var(--orange-dark); font-weight: 600; }
.bank-sol { margin-top: 6px; border: 1px dashed #c9cfd8; border-radius: 8px; padding: 6px 10px; }
.bank-sol summary { cursor: pointer; font-weight: 600; color: #1e6b34; }
.bank-sol[open] { background: var(--ok-bg); }
.bank-sol-body { margin-top: 6px; }
.bank-self { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid #e5e8ee; padding-top: 10px; margin-top: 10px; }
.bank-self input { width: 90px; }
@media print { .bank-self, .bank-tabs { display: none; } .bank-sol { break-inside: avoid; } }

/* ---------- Conformité : bandeau de consentement, vidéos externes ---------- */
.consent-banner { position: sticky; bottom: 0; z-index: 50; background: var(--surface); border-top: 3px solid var(--violet); box-shadow: 0 -6px 18px rgba(33, 24, 50, .12); }
.consent-inner { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; padding: 12px 0; }
.consent-inner p { margin: 0; flex: 1 1 420px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.media-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; background: var(--pale); border-radius: 12px; }
@media print { .consent-banner { display: none; } }

/* ---------- Thème : champs, logos, liens ---------- */
input, select, textarea { color: inherit; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .fiche-logo { background: #fff; border-radius: 10px; padding: 3px 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .fiche-logo { background: #fff; border-radius: 10px; padding: 3px 8px; } }
@media print { :root { --bg: #fff; --surface: #fff; --text: #211832; } }

/* ---------- En-tête : cloche, avatar, badge XP, sous-menus ---------- */
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; font-size: 1.1rem; border: 1px solid var(--line); background: var(--surface); }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--orange-dark); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.xp-badge { display: inline-flex; gap: 4px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--pale); color: var(--text-accent); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.xp-badge span { font-weight: 500; color: var(--muted); }
details[data-menu] { position: relative; }
details[data-menu] > summary { list-style: none; cursor: pointer; }
details[data-menu] > summary::-webkit-details-marker { display: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: #fff; font-weight: 800; font-size: .9rem; }
.avatar-panel, .nav-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; }
.nav-menu { left: 0; right: auto; }
.avatar-panel a, .nav-menu a, .menu-danger { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; text-align: start; }
.avatar-panel a:hover, .nav-menu a:hover, .avatar-panel a:focus-visible, .nav-menu a:focus-visible { background: var(--pale); }
.nav-menu a[aria-current] { font-weight: 700; background: var(--pale); }
.avatar-id { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
.menu-danger { width: 100%; background: none; border: 0; font: inherit; color: var(--bad); cursor: pointer; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.menu-danger:hover { background: var(--bad-bg); }
.theme-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; }
.theme-switch button { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }
.theme-switch.on-dark { padding: 0 0 10px; color: #CFC3EA; }
.theme-switch.on-dark button { border-color: #6B5A92; }
.space-nav .nav-group { display: inline-block; }
.space-nav .nav-group > summary { color: #E4DBF7; padding: 8px 12px; border-radius: 999px; white-space: nowrap; font-size: .93rem; }
.space-nav .nav-group > summary:hover { background: var(--violet); color: #fff; }
.space-nav .nav-group > summary[aria-current] { background: var(--surface); color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .avatar-panel { position: fixed; left: 12px; right: 12px; top: 72px; }
  .nav-menu { position: fixed; left: 12px; right: 12px; top: auto; }
}

/* Mode sombre : le second :root (papier ligné) est redéfini ici pour passer après lui */
:root[data-theme="dark"] { --paper: #14101D; --ruled: rgba(82, 70, 111, .35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #14101D; --ruled: rgba(82, 70, 111, .35); } }

/* ---------- Gamification : repères, anneau, classement ---------- */
.sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.sp-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: var(--text); }
.sp-stat-n { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.sp-stat-of { font-size: 1rem; color: var(--muted); font-weight: 600; }
.sp-stat progress, .xp-card progress { width: 100%; height: 8px; accent-color: var(--orange); }
.sp-ring { display: flex; align-items: center; gap: 10px; }
.sp-ring > span { display: flex; flex-direction: column; line-height: 1.2; }
.xp-chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--pale); color: var(--text-accent); vertical-align: middle; }
.xp-chip.is-won { background: var(--ok-bg); color: var(--ok); }
.sp-podium { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.sp-podium li { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.sp-podium li.is-me, .ranking tr.is-me td, .ranking tr.is-me th { background: var(--orange-pale); }
.xp-card { display: flex; flex-direction: column; gap: 4px; min-width: 220px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ranking td:first-child { font-size: 1.1rem; width: 64px; text-align: center; }
.rank-me { margin: 12px 0; }
.ring-track, .ring-fill { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--track); }
.ring-fill { stroke: var(--orange); stroke-linecap: round; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
.tabs a[aria-current] { background: var(--deep); border-color: var(--deep); color: #fff; }

/* ---------- Boîte à idées ---------- */
.idea-starters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chip { font: inherit; font-size: .85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--violet); }
.idea { margin: 10px 0; }
.idea-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0; margin: 8px 0; counter-reset: step; }
.idea-steps li { position: relative; padding-top: 12px; font-size: .78rem; color: var(--muted); text-align: center; }
.idea-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 6px; background: var(--track); }
.idea-steps li.is-done::before { background: var(--orange); }
.idea-steps li.is-current { color: var(--text); font-weight: 700; }
.idea-reply { border-inline-start: 3px solid var(--violet); padding: 6px 12px; background: var(--surface-2); border-radius: 8px; }
.h3 { font-size: 1.1rem; }

/* ---------- Messagerie ---------- */
.msg-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 14px; align-items: start; }
.msg-list { display: flex; flex-direction: column; gap: 4px; padding: 12px; max-height: 72vh; overflow-y: auto; }
.msg-contact { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--text); }
.msg-contact:hover, .msg-contact.is-active { background: var(--pale); }
.msg-contact.is-pinned { border: 1px solid var(--line); margin-bottom: 6px; }
.msg-contact-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-contact-text .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-contact .count, .msg-head .count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange-dark); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.msg-thread { display: flex; flex-direction: column; min-height: 60vh; padding: 0; overflow: hidden; }
.msg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msg-head > span:last-child { display: flex; flex-direction: column; }
.msg-back { display: none; text-decoration: none; font-size: 1.3rem; }
.msg-items { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px; overflow-y: auto; max-height: 58vh; background: var(--surface-2); }
.msg { max-width: min(78%, 520px); padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.msg p { margin: 0 0 4px; white-space: pre-wrap; }
.msg.is-mine { align-self: flex-end; background: var(--deep); color: #fff; border-color: var(--deep); }
.msg.is-mine .msg-meta { color: #D9CEF3; }
.msg img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 4px 0; }
.msg audio { display: block; max-width: 260px; margin: 4px 0; }
.msg-meta { display: block; font-size: .7rem; color: var(--muted); text-align: end; }
.msg-day { align-self: center; margin: 8px 0 2px; }
.msg-start { align-self: center; }
.msg-form { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg-form textarea { width: 100%; resize: vertical; min-height: 44px; }
.msg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-tools .btn { margin-inline-start: auto; }
.msg-tools label.icon-btn { cursor: pointer; }
.msg-rec { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.msg-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: rec 1s infinite; }
@keyframes rec { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .msg-rec-dot { animation: none; } }
.msg-empty { margin: auto; padding: 32px; text-align: center; }
.msg-note { margin-top: 10px; }
@media (max-width: 760px) {
  .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-items { max-height: 62vh; }
}

/* ---------- Labo « Étude de fonctions » ---------- */
.fl-input { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.fl-input input[type="text"] { flex: 1 1 260px; font-family: "Cambria Math", Cambria, ui-monospace, monospace; font-size: 1.05rem; }
.fl-keys { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin: 0; }
.fl-keys .chip { font-family: "Cambria Math", Cambria, serif; min-width: 44px; }
.fl-input > p.small { width: 100%; margin: 0; }
.fl-input a[aria-current] { font-weight: 700; }
.fl-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.fl-graph-card { padding: 12px; }
.fl-graph-card:fullscreen { background: var(--surface); overflow: auto; padding: 16px; }
.fl-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fl-toggles { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; }
.fl-toggles label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.fl-zoom { display: flex; gap: 6px; align-items: center; }
.fl-plot { width: 100%; height: auto; display: block; background: var(--surface-2); border-radius: 12px; touch-action: none; cursor: crosshair; }
.fl-grid { stroke: var(--line); stroke-width: 1; }
.fl-axis { stroke: var(--muted); stroke-width: 1.6; }
.fl-tick, .fl-label { font: 600 11px Montserrat, sans-serif; fill: var(--muted); }
.fl-label { fill: var(--text); }
.fl-label-m { fill: var(--orange-dark); font-size: 13px; }
.fl-curve { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linejoin: round; }
.fl-deriv { fill: none; stroke: var(--violet); stroke-width: 2; stroke-dasharray: 6 5; }
.fl-asym { stroke: var(--bad); stroke-width: 1.6; stroke-dasharray: 8 6; }
.fl-tangent { stroke: var(--ok); stroke-width: 2; }
.fl-diag { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.fl-cobweb { fill: none; stroke: var(--violet); stroke-width: 1.8; }
.fl-pt-zero, .fl-pt-ext, .fl-pt-infl { stroke: var(--surface); stroke-width: 2; }
.fl-pt-zero { fill: var(--deep); } .fl-pt-ext { fill: var(--orange-dark); } .fl-pt-infl { fill: var(--ok); }
.fl-m { fill: var(--orange); stroke: #fff; stroke-width: 3; cursor: grab; }
.fl-m:focus-visible { outline: none; stroke: var(--violet); stroke-width: 4; }
.fl-readout { font-variant-numeric: tabular-nums; margin: 8px 0 0; }
.fl-error { color: var(--bad); }
.fl-values summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.fl-steps { padding: 14px; max-height: none; }
.fl-step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fl-step-list summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-weight: 600; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.fl-step-list details[open] > summary { background: var(--pale); }
.fl-pts { font-size: .78rem; color: var(--orange-dark); white-space: nowrap; }
.fl-step-body { padding: 8px 10px 4px; }
.fl-js [data-hidden-until-answer] { display: none; }
.fl-quiz { padding: 8px 10px 0; }
.fl-quiz-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.is-right { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.chip.is-wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.fl-vartable { font-size: .85rem; margin-top: 6px; }
.fl-vartable td, .fl-vartable th { text-align: center; padding: 4px 6px; white-space: nowrap; }
.fl-arrow { font-size: 1.2rem; color: var(--orange-dark); }
.fl-sign { font-weight: 700; }
.fl-u0 { width: 90px; }
.fl-end { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
@media (max-width: 900px) { .fl-layout { grid-template-columns: 1fr; } }

/* ---------- Lives & événements ---------- */
.ev-list { display: grid; gap: 12px; }
.ev-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0; }
.ev-card + .ev-card { margin-top: 0; }
.ev-main { flex: 1 1 260px; min-width: 0; }
.ev-main > * { margin: 0 0 6px; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-badge { background: var(--orange-pale); color: var(--orange-dark); }
.ev-title { margin: 2px 0 4px; overflow-wrap: anywhere; }
.ev-banner { margin: 0 0 16px; border: 2px solid var(--orange); background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.ev-card.is-live { border-color: var(--bad); }
.ev-count { display: flex; gap: 10px; }
.ev-count > span { display: grid; justify-items: center; min-width: 58px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ev-count strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--text); }
.ev-live-dot > span { color: var(--bad); font-weight: 700; }
.ev-row { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ev-row h3 { margin: 0 0 4px; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.ev-when { gap: 10px; }
@media (prefers-reduced-motion: no-preference) { .ev-live-dot > span { animation: ev-pulse 1.6s ease-in-out infinite; } }
@keyframes ev-pulse { 50% { opacity: .45; } }

/* ---------- Catalogue des labos ---------- */
.lab-feature { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; margin-bottom: 16px; border: 2px solid var(--orange); }
.lab-feature > span:last-child { display: grid; gap: 4px; }
.lab-ico { font-size: 2rem; }
.lab-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lab-tile { display: grid; gap: 6px; align-content: start; text-decoration: none; color: inherit; margin: 0; transition: transform .15s ease, border-color .15s ease; }
.lab-tile + .lab-tile { margin-top: 0; }
.lab-tile:hover, .lab-tile:focus-visible { transform: translateY(-2px); border-color: var(--orange); }
.lab-tile.is-locked { opacity: .75; }
.lab-name { color: var(--text); }
.lab-intro { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lab-meta { margin-top: 2px; }

/* ---------- Lecteur vidéo protégé ---------- */
.sv-wrap { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sv-wrap:fullscreen { aspect-ratio: auto; border-radius: 0; }
.sv-fs { position: absolute; z-index: 4; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; cursor: pointer; }
.sv-fs:focus-visible { outline: 3px solid var(--orange); }
.sv-play { position: absolute; z-index: 4; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border: 0; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 28px; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.sv-play:focus-visible { outline: 3px solid #fff; }
.sv-msg { position: absolute; z-index: 4; left: 50%; bottom: 56px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; text-align: center; max-width: 90%; }

/* ---------- Formules Basic / Pro / VIP ---------- */
.pl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.pl-card { position: relative; margin: 0; }
.pl-card + .pl-card { margin-top: 0; }
.pl-card.is-featured { border: 2px solid var(--orange); box-shadow: 0 10px 30px rgba(240, 90, 20, .18); }
@media (min-width: 900px) { .pl-card.is-featured { transform: translateY(-8px); } }
.pl-ribbon { position: absolute; top: -12px; inset-inline-start: 16px; background: var(--orange); color: #fff; font-weight: 700; font-size: .8rem; padding: 4px 12px; border-radius: 999px; }
.pl-period { vertical-align: middle; margin-inline-start: 6px; background: var(--orange-pale); color: var(--orange-dark); font-size: .75rem; }
.pl-features { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 6px; font-size: .92rem; }
.pl-features li { display: flex; gap: 8px; align-items: baseline; }
.pl-features li > span:first-child { flex: 0 0 1.1em; font-weight: 700; }
.pl-features .is-on > span:first-child { color: var(--ok); }
.pl-features .is-off { color: var(--muted); }
.pl-features .is-new { font-weight: 600; }
.pl-features .is-new::after { content: "Nouveau"; margin-inline-start: auto; font-size: .7rem; font-weight: 700; color: var(--orange-dark); background: var(--orange-pale); border-radius: 999px; padding: 1px 8px; }
.pl-all { font-weight: 700; color: var(--text-accent); }
.upgrade-cta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 0; }
.upgrade-cta.is-compact .small { flex: 1 1 160px; }
.msg-locked { padding: 12px; border-top: 1px solid var(--line); }
.btn-whatsapp { background: #1FA855; color: #fff; border-color: #1FA855; }
.btn-whatsapp:hover, .btn-whatsapp:focus-visible { background: #178A45; color: #fff; }
.sub-rights .pl-features { margin-top: 8px; }
