[hidden] { display: none !important; }
/* Copie double : papier quadrillé, encre bleue, correction rouge. Mode sombre : tableau noir. */
:root {
  --paper: #fdfdfb;
  --grid: #dfe7f1;
  --ink: #1d2c5e;
  --ink-soft: #52608a;
  --text: #1a1f2e;
  --margin: #d6453d;
  --ok: #1f7a4d;
  --ok-bg: #e5f3ea;
  --bad: #c0362c;
  --bad-bg: #fbe9e7;
  --card: #ffffffee;
  --line: #cfd8e6;
  --key-bg: #fff6d6;
  --key-line: #e2c24e;
  --shadow: 0 1px 0 #cfd8e6, 0 6px 18px -12px #1d2c5e55;
  --sea: #e6eef7; --land: #c9d3c0; --land-hover: #a9b89c; --neutral: #dcdcd6;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f2b27; --grid: #2a3833; --ink: #e8eee3; --ink-soft: #a9b8ad; --text: #e8eee3;
    --margin: #e8837a; --ok: #7fd3a1; --ok-bg: #26402f; --bad: #f09a8f; --bad-bg: #472b28;
    --card: #24322ded; --line: #3a4a44; --key-bg: #33392a; --key-line: #c9b25a;
    --shadow: 0 1px 0 #3a4a44; color-scheme: dark;
    --sea: #1a2622; --land: #4a5c55; --land-hover: #637a71; --neutral: #3a4541;
  }
}
* { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px); }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 17px; line-height: 1.5; color: var(--text);
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
}
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--margin); outline-offset: 2px; border-radius: 3px; }

/* En-tête */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 18px; background: var(--paper); border-bottom: 2px solid var(--ink);
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.brand-sign { color: var(--margin); font-size: 1.3em; }
.top nav { display: flex; gap: 4px; overflow-x: auto; }
.top nav a { text-decoration: none; padding: 6px 10px; border-radius: var(--radius); color: var(--ink-soft); white-space: nowrap; }
.top nav a.active { color: var(--ink); background: var(--grid); font-weight: 700; }

main { max-width: 760px; margin: 0 auto; padding: 24px 18px 80px; outline: none; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 600; }
h1 { font-size: 2rem; margin: 8px 0 6px; }
h2 { font-size: 1.4rem; margin: 32px 0 10px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.lead { color: var(--ink-soft); margin: 0 0 20px; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 4px; }
.crumbs a { color: var(--ink-soft); }

/* Boutons et formulaires */
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: var(--radius); text-decoration: none; display: inline-block; text-align: center;
}
button.ghost, .btn.ghost { background: transparent; color: var(--ink); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.small { padding: 4px 10px; font-size: .9rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 700; margin: 14px 0 4px; color: var(--ink); }
input, select { font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); }
input:focus, select:focus { border-color: var(--ink); outline: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 160px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: auto; }
.error { color: var(--bad); font-weight: 700; margin-top: 10px; }
.muted { color: var(--ink-soft); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.login { max-width: 400px; margin: 10vh auto 0; }
.login h1 { text-align: center; }

/* Tableau de bord */
.levels { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.levels li { border-bottom: 1px solid var(--line); }
.level-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 4px; text-decoration: none; color: var(--text); background: var(--card); }
.level-link:hover { background: var(--grid); }
.level-link strong { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.level-link .sub { color: var(--ink-soft); font-size: .92rem; grid-column: 1; }
.level-link .count { grid-row: 1 / 3; grid-column: 2; align-self: center; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.level-link.upcoming { opacity: .55; pointer-events: none; }
.bar { display: block; height: 6px; background: var(--grid); border-radius: 3px; overflow: hidden; grid-column: 1 / -1; }
.bar span { display: block; height: 100%; background: var(--ok); }

.chapter { margin-top: 28px; }
.notions { list-style: none; padding: 0; margin: 0; }
.notions a { display: flex; justify-content: space-between; gap: 12px; padding: 12px; text-decoration: none; color: var(--text); border-bottom: 1px dashed var(--line); background: var(--card); }
.notions a:hover { background: var(--grid); }
.status { font-size: .85rem; white-space: nowrap; color: var(--ink-soft); }
.status.ok { color: var(--ok); font-weight: 700; }

/* Matières */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.subject-card { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.subject-card:hover { background: var(--grid); }
.subject-card strong { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.subject-card .sub { color: var(--ink-soft); font-size: .92rem; }
.subject-card .count { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .9rem; margin-top: 6px; }
.subject-card.upcoming { opacity: .55; pointer-events: none; border-top-color: var(--line); }
.subject-card[data-subject="geo"] { border-top-color: var(--ok); }
.subject-icon { font-size: 1.8rem; line-height: 1; color: var(--margin); }
.small { font-size: .85rem; }

/* Drapeaux */
.fi.flag { width: 1.6em; height: 1.2em; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); display: inline-block; vertical-align: -0.2em; }
.q-text .fi.flag { display: block; width: 9rem; height: 6.75rem; margin: 10px 0 4px; }
.flag-choices { grid-template-columns: repeat(2, 1fr); }
.flag-choices .fi.flag { width: 6rem; height: 4.5rem; }
.flag-choices .choice { align-items: center; }
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; font-family: var(--sans); }
.flag-card { margin: 0; text-align: center; font-size: .85rem; }
.flag-card .fi.flag { width: 5rem; height: 3.75rem; display: block; margin: 0 auto 4px; }
.geo-table td { vertical-align: middle; font-family: var(--sans); }

/* Cartes */
.geo-map { display: block; margin: 10px 0; }
.geo-map svg { width: 100%; height: auto; max-height: 60vh; background: var(--sea); border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.geo-map path { fill: var(--land); stroke: var(--paper); stroke-width: .4; transition: fill .15s; }
.geo-map.clickable path, .geo-map.explore path { cursor: pointer; }
.geo-map.clickable path:hover, .geo-map path.hover { fill: var(--land-hover); }
.geo-map path.hl, .geo-map path.sel { fill: var(--ink); }
.geo-map path.neutre { fill: var(--neutral); pointer-events: none; }
.geo-map path.target { fill: var(--ok); }
.geo-map path.given { fill: var(--bad); }
.geo-map .ring { fill: none; stroke-width: 1.2; }
.geo-map .ring.hl { stroke: var(--ink); }
.geo-map .ring.target { stroke: var(--ok); }
.geo-map .ring.given { stroke: var(--bad); }
.map-caption { font-family: var(--sans); font-weight: 700; color: var(--ink); margin-top: 6px; min-height: 1.5em; }

/* Fiche de cours : la marge rouge de la copie double */
.sheet {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 20px 20px 52px; position: relative; font-family: var(--serif); font-size: 1.08rem; line-height: 1.7;
}
.sheet::before { content: ''; position: absolute; top: 0; bottom: 0; left: 34px; border-left: 2px solid var(--margin); opacity: .8; }
.sheet p { margin: 0 0 12px; }
.sheet ul { padding-left: 20px; margin: 0 0 12px; }
.sheet li { margin-bottom: 6px; }
.sheet b { color: var(--ink); }
.sheet .key { background: var(--key-bg); border-left: 4px solid var(--key-line); padding: 10px 14px; margin-left: -14px; border-radius: 0 var(--radius) var(--radius) 0; }
.example { margin-top: 16px; }
.example .enonce::before { content: 'Exemple — '; font-weight: 600; color: var(--margin); }
.example details { margin-top: 6px; }
.example summary { cursor: pointer; font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: .95rem; }
.example .solution { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.proof { margin: 18px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--paper); }
.proof summary { cursor: pointer; font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: .95rem; }
.proof ol { margin: 10px 0 0; padding-left: 22px; }
.proof li { margin-bottom: 8px; }
.tag { font-family: var(--sans); font-size: .75rem; font-weight: 700; color: var(--ink); background: var(--key-bg); border: 1px solid var(--key-line); border-radius: 3px; padding: 1px 6px; vertical-align: 2px; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.sheet, .q-text, .choice { overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* QCM */
.quiz-head { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 5; background: var(--paper); padding: 8px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.timer.urgent { color: var(--bad); }
.question { margin: 22px 0; }
.q-num { font-family: var(--serif); color: var(--margin); font-weight: 600; }
.q-text { font-family: var(--serif); font-size: 1.1rem; margin: 4px 0 10px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; font-weight: 400; margin: 0; color: var(--text); }
.choice input { width: auto; margin-top: 5px; accent-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--grid); }
.choice.right { border-color: var(--ok); background: var(--ok-bg); }
.choice.wrong { border-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; text-decoration-color: var(--bad); }
.expl { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.expl::before { content: '✎ '; color: var(--margin); }

/* Note façon copie corrigée */
.grade { font-family: var(--serif); color: var(--margin); font-size: 3rem; font-weight: 600; transform: rotate(-4deg); display: inline-block; border: 3px solid var(--margin); border-radius: 50%; padding: 6px 22px; margin: 10px 0; }
.grade small { font-size: 1.4rem; }
.verdict { font-weight: 700; }
.verdict.ok { color: var(--ok); }
.verdict.bad { color: var(--bad); }

/* Défis */
.challenges { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.challenge { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; }
.challenge.done { border-left-color: var(--ok); }
.challenge.closed { border-left-color: var(--line); }
.challenge .meta { color: var(--ink-soft); font-size: .92rem; margin: 2px 0 10px; }
.challenge .row { justify-content: space-between; }
.challenge .row > * { flex: 0 0 auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { color: var(--ink); font-family: var(--serif); border-bottom: 2px solid var(--ink); }
tr.me td { background: var(--key-bg); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .check { border: 1px solid var(--line); padding: 6px 10px; border-radius: var(--radius); background: var(--card); margin: 0; }

.ai-q { border-bottom: 1px dashed var(--line); padding: 14px 0; }
.ai-q ol { margin: 6px 0; }
.ai-q li.good { color: var(--ok); font-weight: 700; }

#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: var(--radius); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  main { padding: 16px 14px 70px; }
  .top { padding: 8px 12px; }
  .brand-text { display: none; }
  .sheet { padding: 16px 14px 16px 36px; font-size: 1.02rem; }
  .sheet::before { left: 22px; }
  .sheet .key { margin-left: -8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Gamification */
.gami-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 18px; display: grid; gap: 10px; }
.gami-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lvl { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.gami-stats { display: flex; gap: 14px; font-family: var(--sans); font-weight: 700; font-size: 1.1rem; }
.gami-stats a { text-decoration: none; color: var(--ink); }
.streak { color: #c2410c; }
.gami-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gami-actions .btn, .gami-actions button { flex: 1 1 auto; text-align: center; }
.gami-actions b { background: var(--margin); color: #fff; border-radius: 999px; padding: 0 8px; margin-left: 4px; font-size: .9em; }
.gains { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px 14px; margin: 12px 0; display: grid; gap: 8px; }
.gains-line { display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline; font-family: var(--sans); }
.xp-pop { font-weight: 800; font-size: 1.3rem; color: var(--ok); animation: pop .5s ease-out; }
.up { color: var(--ok); }
.new-badge { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius); background: var(--ok-bg); animation: pop .6s ease-out; font-family: var(--sans); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.badge-icon { font-size: 1.6rem; line-height: 1; min-width: 1.6em; text-align: center; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-family: var(--sans); }
.badge.locked { opacity: .45; filter: grayscale(1); }
.badge .got { color: var(--ok); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.stats-grid div { display: grid; }
.stats-grid b { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.stats-grid span { color: var(--ink-soft); font-size: .88rem; font-family: var(--sans); }
.chip { border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; background: var(--card); text-decoration: none; color: var(--ink); font-family: var(--sans); font-size: .9rem; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.challenge.daily { border-left-color: #d97706; background: linear-gradient(90deg, #fff7e6, var(--card) 40%); }
@media (prefers-color-scheme: dark) { .challenge.daily { background: linear-gradient(90deg, #3a2e17, var(--card) 40%); } }
.sprint-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sprint-pick { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-top: 4px solid #d97706; }
.sprint-pick b { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.sprint-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; font-family: var(--sans); }
.sprint-timer { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.sprint-timer.urgent { color: var(--bad); }
.sprint-score { font-size: 1.6rem; color: var(--ok); }
.sprint-bar span { transition: width .2s linear; background: #d97706; }
#sq { border-radius: var(--radius); margin-top: 12px; }
#sq .locked { pointer-events: none; }
.flash-ok { animation: flashok .45s; }
.flash-bad { animation: flashbad .6s; }
@keyframes flashok { 0% { box-shadow: 0 0 0 4px var(--ok); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes flashbad { 0%, 50% { box-shadow: 0 0 0 4px var(--bad); transform: translateX(-4px); } 25%, 75% { transform: translateX(4px); } 100% { box-shadow: none; transform: none; } }
@media (prefers-reduced-motion: reduce) { .xp-pop, .new-badge, .flash-ok, .flash-bad { animation: none; } }

/* Anatomie */
.schema { display: block; margin: 10px 0; }
.schema svg { max-height: 70vh; margin: 0 auto; width: 100%; height: auto; display: block; background: var(--card, #fff); border: 1px solid var(--line, #d6dde8); border-radius: 8px; }
.anat { --bone: #e3d3ad; --bone-line: #9c8a66; --hl: #f59e0b; --hl-ok: #16a34a; --hl-bad: #7c3aed; }
.anat.os path:not(.t), .anat.os ellipse, .anat.os circle, .anat.os rect { fill: var(--bone); stroke: var(--bone-line); stroke-width: 1; }
.anat .t { fill: none; stroke: #cdb788; stroke-linecap: round; stroke-width: 5; }
.anat .t.fin { stroke-width: 2.6; } .anat .t.moyen { stroke-width: 6; } .anat .t.epais { stroke-width: 10; } .anat .t.tres-epais { stroke-width: 13; }
.anat.os .decor * { fill: var(--card, #fff) !important; stroke: var(--bone-line); pointer-events: none; }
.anat .pauvre:not(.t) { fill: #7d9cc9; stroke: #50709e; } .anat .riche:not(.t) { fill: #cf6f65; stroke: #9e4a42; }
.anat .t.pauvre { stroke: #7d9cc9; } .anat .t.riche { stroke: #cf6f65; }
.anat .t.vaisseau { stroke-width: 18; } .anat .t.vaisseau-fin { stroke-width: 10; }
.anat .muscle path { fill: #efc4b6; stroke: #b98474; stroke-width: 1.5; pointer-events: none; } .anat .muscle-fonce { fill: #dca390; stroke: #b98474; }
.anat .t.valve { stroke: #fffaf0; stroke-width: 4.5; }
.anat.cerveau path:not(.t) { stroke: #7d7390; stroke-width: 1.5; }
.anat .l-frontal { fill: #cfe3f7; } .anat .l-parietal { fill: #f7e1c6; } .anat .l-temporal { fill: #d6efd0; } .anat .l-occipital { fill: #ead5f2; }
.anat .l-cervelet { fill: #f3cfcf; } .anat .l-tronc { fill: #e3d9c6; }
.anat .gyrus path { fill: none !important; stroke: #00000022 !important; stroke-width: 1.5; pointer-events: none; }
.anat .t.sillon { stroke: #4b4263; stroke-width: 3.5; }
.anat [data-id] { cursor: pointer; }
.anat .hl :not(.t), .anat .hl:not(.t), .anat .sel :not(.t) { fill: var(--hl) !important; }
.anat .hl .t, .anat .sel .t { stroke: var(--hl) !important; }
.anat .target :not(.t) { fill: var(--hl-ok) !important; } .anat .target .t { stroke: var(--hl-ok) !important; }
.anat .given :not(.t) { fill: var(--hl-bad) !important; } .anat .given .t { stroke: var(--hl-bad) !important; }
.anat .hover:not(.t), .anat .hover :not(.t) { fill: var(--hl) !important; } .anat .hover .t { stroke: var(--hl) !important; }



.map-caption .muted { font-weight: 400; }
.q-text .schema svg { max-height: 46vh; }
@media (prefers-color-scheme: dark) { .anat.os .decor * { fill: var(--card) !important; } }

.anat .decor { pointer-events: none; }
.anat .l-poumon { fill: #f4c2c9; stroke: #b77b85; stroke-width: 1.5; }
.anat .l-muscle { fill: #d98c7a; stroke: #a35a49; }
.anat .l-voie { fill: #f1d0c4; stroke: #b98474; }
.anat .l-cartilage { fill: #e3e8f0; stroke: #8a96aa; }
.anat .t.conduit { stroke: #b8c3d4; stroke-width: 11; } .anat .t.conduit.fin2 { stroke-width: 9; }
.anat .scissure path { fill: none; stroke: #b77b85; stroke-width: 1.5; }
.anat .bronchioles path { fill: none; stroke: #c98f99; stroke-width: 2; }
.anat .anneaux path { fill: none; stroke: #8a96aa; stroke-width: 1.3; }
.anat .loupe path { stroke: #9aa3b2; stroke-dasharray: 4 3; fill: none; } .anat .loupe circle { fill: #fff; stroke: #9aa3b2; }
.anat.resp [data-id="alveoles"] circle { fill: #f4c2c9; stroke: #b77b85; }
.anat .l-pancreas { fill: #f1d7a3; stroke: #b9985a; }
.anat .t.tube-large { stroke: #e2ad96; stroke-width: 22; } .anat .t.tube { stroke: #ecbfa8; stroke-width: 11; } .anat .t.tube-fin { stroke: #e2ad96; stroke-width: 5; }
.anat .l-foie { fill: #b5654f; stroke: #7d3f30; } .anat .l-vesicule { fill: #7fb069; stroke: #4f7a3d; } .anat .l-estomac { fill: #eaa596; stroke: #b56b5d; }
.anat .l-rein { fill: #b9574a; stroke: #7e3329; } .anat .l-surrenale { fill: #e7c16b; stroke: #a88630; }
.anat .t.conduit-fin { stroke: #e4c46a; stroke-width: 6; } .anat .l-vessie { fill: #f0d98a; stroke: #b99a3e; } .anat .t.petit-vaisseau { stroke-width: 6; }
.anat .l-cortex { fill: #d98a73; stroke: #9c5040; stroke-width: 2; } .anat .l-pyramide { fill: #b8574a; stroke: #8a3a30; } .anat .l-calice { fill: #f3e3a8; stroke: #b99a3e; }
.anat.reincoupe .t.conduit { stroke: #e4c46a; }
.anat .l-vitre { fill: #eef5f8; } .anat .l-nerf { fill: #f0dc8c; stroke: #b99a3e; } .anat .l-aqueuse { fill: #d7ecf7; }
.anat .t.couche { stroke-width: 6; } .anat .t.retine { stroke: #e79a9a; } .anat .t.choroide { stroke: #8b4a45; } .anat .t.sclere { stroke: #d9d6ca; stroke-width: 8; } .anat .t.cornee { stroke: #8fc1dc; stroke-width: 4; }
.anat .l-ciliaire { fill: #b76e5a; } .anat .l-cristallin { fill: #f7e3a9; stroke: #c4a55a; } .anat .t.iris { stroke: #4d6a8c; stroke-width: 6; }
.anat .l-pupille { fill: #1f2937; } .anat .l-papille { fill: #f3d36b; stroke: #b99a3e; } .anat .l-fovea { fill: #7a2e2e; }
.anat .zonules path { stroke: #c9b27a; stroke-width: 1; fill: none; }
.anat .t.dendrite { stroke: #9c7bb8; stroke-width: 4; } .anat .t.axone { stroke: #9c7bb8; stroke-width: 5; }
.anat.neurone [data-id="myeline"] rect { fill: #f3e3b0; stroke: #c0a462; } .anat.neurone [data-id="noeud-ranvier"] rect { fill: #6b4f8a; }
.anat .l-corps { fill: #c9addf; stroke: #7f5c9c; } .anat .l-noyau { fill: #6b4f8a; } .anat .l-bouton { fill: #c9addf; stroke: #7f5c9c; }

.anat .t.halo, .anat .hl .t.halo, .anat .sel .t.halo, .anat .target .t.halo, .anat .given .t.halo, .anat .hover .t.halo { stroke: var(--card, #fff) !important; stroke-width: 25; pointer-events: none; }


.anat.muscles .peau * { fill: #f6e4d6; stroke: #cfae96; stroke-width: 1.2; }
.anat.muscles [data-id] path:not(.t) { fill: #d27a6e; stroke: #9e4a42; stroke-width: 1; }
.anat .t.bande { stroke: #e59a8c; stroke-width: 6; } .anat .t.tendon { stroke: #eee3c8; stroke-width: 4; }
.anat .intersections path { stroke: #9e4a42; stroke-width: 1; fill: none; }
.anat .legende text { font: 600 15px system-ui, sans-serif; fill: #556; text-anchor: middle; }
.anat .l-peau { fill: #f1c9b3; stroke: #b98474; } .anat .l-conduit { fill: #f6ddd0; stroke: #b98474; }
.anat .l-caisse { fill: #f7f1e8; stroke: #b8a58a; } .anat .l-tympan { fill: #e7c8a6; stroke: #a8865e; }
.anat .l-osselet { fill: #e3d3ad; stroke: #9c8a66; } .anat .t.etrier { stroke: #c9b385; stroke-width: 3.5; }
.anat .t.conduit-oreille { stroke: #f0c9b8; stroke-width: 10; } .anat .t.canal { stroke: #a8c8e0; stroke-width: 6; }
.anat .l-labyrinthe { fill: #a8c8e0; stroke: #6f93b0; } .anat .t.spirale { stroke: #7fa8c9; stroke-width: 8; }
.anat .l-trou, .anat.os .l-trou { fill: #4a3f33 !important; } .anat .t.suture { stroke: #7a6a4f; stroke-width: 2.2; stroke-dasharray: 5 3; }
.anat .l-oreillette { fill: #e3a092; stroke: #a35a49; } .anat .l-ventricule { fill: #d98c7a; stroke: #a35a49; } .anat .l-ventricule-g { fill: #cf7f6c; stroke: #a35a49; }
.anat .l-auricule { fill: #dfa090; stroke: #a35a49; }
.anat .t.coronaire { stroke: #b3261e; stroke-width: 4.5; } .anat .t.coronaire.epaisse { stroke-width: 6.5; }
.anat .t.halo-art { stroke: #fff6ee !important; stroke-width: 9; pointer-events: stroke; }
.anat .zones path { stroke: #9aa3b2; stroke-dasharray: 6 4; } .anat .zones text { font: 12px system-ui, sans-serif; fill: #778; }
.anat .t.tube-n { stroke: #e9c46a; stroke-width: 10; } .anat .t.tube-n.collecteur { stroke: #d9a93e; stroke-width: 13; }
.anat .t.art-afferente { stroke-width: 9; } .anat .t.art-efferente { stroke-width: 6; }
.anat .t.capsule { stroke: #8fb1cf; stroke-width: 7; } .anat .l-glom { fill: #cf6f65; stroke: #9e4a42; }
/* Petites structures : zone de clic élargie, dessin inchangé */
.anat.oeil [data-id="fovea"] circle, .anat.oeil [data-id="pupille"] rect, .anat.neurone [data-id="noeud-ranvier"] rect { stroke: transparent; stroke-width: 12; }

/* Personnages célèbres */
.nowrap { white-space: nowrap; }
.perso-table td { font-family: var(--sans); vertical-align: top; }
.perso-table td.perso { width: 42%; }
.perso-table .dates { display: block; color: var(--ink-soft); font-size: .82rem; font-variant-numeric: tabular-nums; }
.subject-card[data-subject="physique"] { border-top-color: #2563eb; }
.subject-card[data-subject="chimie"] { border-top-color: #7c3aed; }
.subject-card[data-subject="personnages"] { border-top-color: #d97706; }
.subject-card[data-subject="anatomie"] { border-top-color: #b3261e; }

code.lien { display: block; word-break: break-all; padding: 8px; margin-top: 6px; background: var(--grid); border-radius: 6px; font-size: .9rem; }
