/* ==========================================================================
   Item 216 · Syndrome hémorragique d'origine hématologique
   Style self-contained, hérité des patterns 215/213/194.
   Couleur dominante : --spe-interne (cohérence 213/214/215, hémato).
   ========================================================================== */

:root {
  --paper:    var(--bg-card);
  --paper-2:  #fffcf5;
  --rule:     #d7ccb4;
  --rule-2:   var(--accent-dash);
  --bg-2:     #ece5d6;
  --bg-3:     #e4dcc8;
  --ink-2:    #524a3e;
  --ink-3:    #8a8270;
  --ink-4:    #b2a98f;
  --danger:   #a52a1a;
  --warn:     #8a5a12;
  --ok:       #4e6a2f;
  --info:     #2f5e6b;

  /* Familles thématiques 216 */
  --fam-physio: var(--spe-interne);
  --fam-clin:   var(--info);
  --fam-bilan:  var(--info);
  --fam-h1ere:  var(--spe-interne);
  --fam-coag:   var(--warn);
  --fam-civd:   var(--danger);
  --fam-urg:    var(--danger);
}

.content { max-width: 1400px; }

@keyframes hemo-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.content-panel.active { animation: hemo-fadeIn .35s ease-out; }

/* =========================================================
   Sec-title (sous-titres de section)
   ========================================================= */
.sec-title       { display: flex; align-items: baseline; gap: 16px; margin: 36px 0 18px; flex-wrap: wrap; }
.sec-num         { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--ink-3); text-transform: uppercase; }
.sec-title h2    { font-family: var(--font-serif); font-weight: 500; font-size: 30px; letter-spacing: -.01em; margin: 0; line-height: 1; }
.sec-title .rule { flex: 1; height: 1px; background: var(--rule); margin-bottom: 8px; min-width: 40px; }
.sec-title .hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

.rang-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 2px;
  border: 1px solid var(--rule-2); color: var(--ink-2); background: var(--paper);
  vertical-align: middle;
}
.rang-tag.rang-a { color: var(--ok);    border-color: color-mix(in oklab, var(--ok) 40%, var(--rule-2)); }
.rang-tag.rang-b { color: var(--ink-3); border-color: var(--rule-2); }

/* =========================================================
   Lane wrapper
   ========================================================= */
.lane          { background: var(--bg-2); border: 1px solid color-mix(in oklab, var(--fam, var(--ink)) 30%, var(--rule)); border-radius: 4px; padding: 16px 18px; }
.lane + .lane  { margin-top: 16px; }
.lane-h        { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.lane-h .dot   { width: 10px; height: 10px; border-radius: 50%; background: var(--fam, var(--ink)); }
.lane-h h3     { font-family: var(--font-serif); font-weight: 500; font-size: 18px; margin: 0; }
.lane-h .kind  { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }

.fam-physio  { --fam: var(--fam-physio); }
.fam-clin    { --fam: var(--fam-clin); }
.fam-bilan   { --fam: var(--fam-bilan); }
.fam-h1ere   { --fam: var(--fam-h1ere); }
.fam-coag    { --fam: var(--fam-coag); }
.fam-civd    { --fam: var(--fam-civd); }
.fam-urg     { --fam: var(--fam-urg); }

/* =========================================================
   Tables
   ========================================================= */
table.matrix              { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
table.matrix th, table.matrix td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 12.5px; line-height: 1.55; }
table.matrix thead th     { background: var(--bg-2); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
table.matrix tbody th     { font-family: var(--font-serif); font-weight: 500; font-size: 14px; color: var(--ink); border-right: 1px solid var(--rule); }
table.matrix tbody tr:last-child th, table.matrix tbody tr:last-child td { border-bottom: none; }
table.matrix tbody tr:hover td { background: #fff; }

/* =========================================================
   Hbox / hstack
   ========================================================= */
.hstack             { display: flex; flex-direction: column; gap: 10px; }
.hbox {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 16px;
  align-items: baseline;
}
.hbox > .n {
  grid-column: 1; grid-row: 1 / -1; align-self: start; padding-top: 2px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); font-weight: 500;
  word-break: break-word; line-height: 1.3;
}
.hbox > h5 {
  grid-column: 2;
  font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 4px;
}
.hbox > p, .hbox > ul {
  grid-column: 2; margin: 0;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
}
.hbox > ul { padding-left: 18px; }
.hbox > ul li { margin: 6px 0; }

/* =========================================================
   Cat-block
   ========================================================= */
.cat-block       { background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--fam, var(--rule-2)); border-radius: 2px; padding: 8px 12px; margin: 6px 0; }
.cat-label       { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 4px; }
.cat-block p     { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.cat-block.cat-piege { border-left-color: var(--danger); background: #f9e9df; }
.cat-block.cat-piege .cat-label { color: var(--danger); }

/* =========================================================
   Vignettes (2 cas — Willebrand + CIVD)
   ========================================================= */
#vignettes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 22px;
}
.vignette {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--spe-interne);
  border-radius: 4px; padding: 18px 22px;
}
.vignette.vignette-civd { border-left-color: var(--danger); }
.vignette .vg-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  color: var(--spe-interne); text-transform: uppercase; margin-bottom: 10px; font-weight: 500;
}
.vignette.vignette-civd .vg-tag { color: var(--danger); }
.vignette p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.vignette p b { color: var(--ink); }
.vignette .vg-reveal {
  margin-top: 10px; padding: 10px 14px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
}
.vignette .vg-reveal summary {
  cursor: pointer; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--spe-interne);
}
.vignette.vignette-civd .vg-reveal summary { color: var(--danger); }
.vignette .vg-reponse {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule);
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
}

/* =========================================================
   Keypoints
   ========================================================= */
.keypoints {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.kp {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 14px 16px;
}
.kp-num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  color: var(--spe-interne); text-transform: uppercase; margin-bottom: 6px;
}
.kp h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 6px;
  line-height: 1.3;
}
.kp p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* =========================================================
   Définitions
   ========================================================= */
.def-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.def-card {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--spe-interne);
  border-radius: 3px; padding: 14px 16px;
}
.def-card.def-civd  { border-left-color: var(--danger); }
.def-card.def-vwf   { border-left-color: var(--info); }
.def-card.def-hemo  { border-left-color: var(--warn); }
.def-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.def-head h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px; margin: 0; color: var(--ink);
}
.def-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-3); text-transform: uppercase;
}
.def-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

/* =========================================================
   Phase 1 (hémostase 1ère) — 4 étapes
   ========================================================= */
.phys-etapes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px;
}
.phys-step {
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; text-align: center;
  border-top: 3px solid var(--spe-interne);
}
.ps-num {
  font-family: var(--font-serif); font-weight: 600; font-size: 26px;
  color: var(--spe-interne); line-height: 1; margin-bottom: 6px;
}
.phys-step h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; margin: 0 0 6px;
}
.phys-step p {
  margin: 0; font-size: 11.5px; color: var(--ink-2); line-height: 1.45;
}

/* =========================================================
   Cascade SVG animée (phase 2)
   ========================================================= */
.cascade-controls {
  display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap;
}
.cascade-btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  padding: 8px 14px; border-radius: 3px;
  background: var(--spe-interne); color: var(--paper);
  border: 1px solid var(--spe-interne);
  cursor: pointer;
}
.cascade-btn.cascade-reset {
  background: var(--paper); color: var(--spe-interne);
}
.cascade-btn:hover { background: color-mix(in oklab, var(--spe-interne) 80%, #000); }
.cascade-step-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--ink-2);
  padding: 6px 12px; background: var(--paper-2); border-radius: 3px;
  border: 1px solid var(--rule);
  flex: 1; min-width: 200px;
}

.cascade-wrap {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 10px; overflow-x: auto;
}
.cascade-svg {
  width: 100%; max-width: 800px; height: 480px; display: block; margin: 0 auto;
}
.cascade-svg .col-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-anchor: middle; text-transform: uppercase; font-weight: 600;
}
.cascade-svg .col-endo   { fill: var(--info); }
.cascade-svg .col-common { fill: var(--warn); }
.cascade-svg .col-extr   { fill: var(--ok); }

.cascade-box rect {
  fill: var(--paper); stroke: var(--rule-2); stroke-width: 1.5;
  transition: fill .3s, stroke .3s;
}
.cascade-box text {
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 500;
  fill: var(--ink-3);
  transition: fill .3s;
}
.cascade-box.cascade-active rect {
  fill: color-mix(in oklab, var(--fam-cascade, var(--spe-interne)) 25%, var(--paper));
  stroke: var(--fam-cascade, var(--spe-interne));
  stroke-width: 2.5;
}
.cascade-box.cascade-active text {
  fill: var(--ink);
  font-weight: 600;
}
.cascade-box.cascade-endo  { --fam-cascade: var(--info); }
.cascade-box.cascade-extr  { --fam-cascade: var(--ok); }
.cascade-box.cascade-common{ --fam-cascade: var(--warn); }

.cascade-arrow {
  fill: none; stroke: var(--rule-2); stroke-width: 1.5;
  transition: stroke .3s, stroke-width .3s;
}
.cascade-arrow.cascade-active {
  stroke: var(--ink-2); stroke-width: 2.5;
}

/* =========================================================
   Tableau type d'hémorragie + interrogatoire
   ========================================================= */
.type-table thead th { background: var(--info); color: var(--paper); }
.interr-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.interr-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 14px 16px; border-left: 3px solid var(--spe-interne);
}
.interr-card h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 15px;
  margin: 0 0 8px; color: var(--ink);
}
.interr-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.interr-card ul li { margin: 4px 0; }

/* =========================================================
   Bilan (cartes + valeurs + combinatoire)
   ========================================================= */
.bilan-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.bilan-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--info);
  border-radius: 3px; padding: 14px 16px;
}
.bilan-card h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  margin: 0 0 10px; color: var(--ink);
}
.bilan-card .cat-block { --fam: var(--info); }

table.combi-table { font-family: var(--font-mono); }
table.combi-table tbody td:nth-child(1),
table.combi-table tbody td:nth-child(2),
table.combi-table tbody td:nth-child(3) {
  text-align: center; font-size: 13px; font-weight: 600;
}

/* =========================================================
   Profil-tables (Willebrand, hémophilies, IH, hémo acquise)
   ========================================================= */
.entite-head {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--rule); padding-bottom: 10px;
}
.entite-head h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 22px;
  margin: 0; color: var(--ink);
}
.entite-accroche {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--spe-interne); text-transform: uppercase;
}
table.profil-table tbody th { width: 200px; font-size: 13.5px; }

/* =========================================================
   Willebrand types + RIPA
   ========================================================= */
.vw-types-wrap { overflow-x: auto; }
table.vw-types-table { min-width: 760px; }
table.vw-types-table tbody td { font-size: 12px; text-align: center; }
table.vw-types-table tbody th { text-align: left; }

.ripa-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 6px;
}
.ripa-step {
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 10px 14px;
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: baseline;
}
.rs-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--spe-interne);
  background: var(--paper-2); padding: 4px 8px; border-radius: 3px;
  text-align: center;
}
.ripa-step p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* =========================================================
   Hémophilies — sévérité + 5 hématomes graves
   ========================================================= */
table.sev-table tbody tr:first-child { background: #fae6dc; }
table.sev-table tbody tr:first-child th { color: var(--danger); }

.hematomes-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.hematome-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--danger);
  border-radius: 3px; padding: 14px 12px; text-align: center;
}
.hema-emoji { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.hematome-card h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 13px;
  margin: 0 0 6px; line-height: 1.25;
}
.hema-risque {
  margin: 0; font-size: 11.5px; color: var(--danger); font-weight: 600;
  font-family: var(--font-mono); letter-spacing: .04em;
}

/* =========================================================
   CIVD — 6 catégories étiologiques + score ISTH + présentation
   ========================================================= */
.etio-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px;
}
.etio-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; border-left: 3px solid var(--danger);
}
.etio-card h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 14.5px;
  margin: 0 0 6px; color: var(--danger);
}
.etio-card ul { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.etio-card ul li { margin: 3px 0; }

table.isth-table thead th { background: var(--danger); color: var(--paper); }
table.isth-table tbody td:not(:first-child) { text-align: center; font-family: var(--font-mono); }

.presentation-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px;
}
.pres-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 14px 16px;
}
.pres-card.pres-hemo   { border-left: 3px solid var(--danger); }
.pres-card.pres-thromb { border-left: 3px solid var(--warn); }
.pres-card h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 16px;
  margin: 0 0 8px;
}
.pres-card.pres-hemo h5   { color: var(--danger); }
.pres-card.pres-thromb h5 { color: var(--warn); }

/* =========================================================
   Coagulopathies acquises (IH + Vit K + Hémo acquise)
   ========================================================= */
.acquis-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--warn);
  border-radius: 4px; padding: 16px 18px; margin-bottom: 18px;
}
#acquis-ih          { border-left-color: var(--warn); }
#acquis-vitk        { border-left-color: var(--ok); }
#acquis-hemoacquise { border-left-color: var(--danger); }
.acquis-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--rule);
}
.acquis-head h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 20px;
  margin: 0 0 4px; color: var(--ink);
}

/* =========================================================
   Diagnostic différentiel — tableau pivot 15×6
   ========================================================= */
.diff-wrap { overflow-x: auto; }
table.diff-table {
  min-width: 1100px; font-size: 12px;
}
table.diff-table thead th {
  background: var(--spe-interne); color: var(--paper);
  font-size: 11px;
}
table.diff-table thead th:nth-child(3) { background: var(--danger); }
table.diff-table thead th:nth-child(4) { background: var(--warn); }
table.diff-table thead th:nth-child(5) { background: var(--info); }
table.diff-table thead th:nth-child(6) { background: var(--ok); }
table.diff-table tbody td:not(:first-child):not(:nth-child(2)) {
  text-align: center;
}
table.diff-table tbody tr.diff-pivot {
  background: #f9f1de;
  border-left: 3px solid var(--spe-interne);
}
table.diff-table tbody tr.diff-pivot-plaq  { background: #fae6dc; border-left-color: var(--danger); }
table.diff-table tbody tr.diff-pivot-fv    { background: #f0e8d4; border-left-color: var(--warn); }
table.diff-table tbody tr.diff-pivot-fviii { background: #e0e8ec; border-left-color: var(--info); }
table.diff-table tbody tr.diff-pivot-fg    { background: #e8efe1; border-left-color: var(--ok); }
table.diff-table tbody tr.diff-pivot-lyse  { background: #ecdef0; border-left-color: #6b3a5e; }

/* =========================================================
   Anomalies vasculaires (3 cards)
   ========================================================= */
.vasc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.vasc-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--info);
  border-radius: 3px; padding: 14px 16px;
}
.vasc-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 16px;
  margin: 0 0 10px; color: var(--ink);
}
.vasc-card .cat-block { --fam: var(--info); }

/* =========================================================
   Alerte clinique
   ========================================================= */
.alert-clinical {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px;
  background: #f3dccf; border: 1px solid var(--danger); border-left: 4px solid var(--danger);
  border-radius: 3px; padding: 14px 18px;
  margin: 18px 0;
}
.alert-clinical .alert-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-family: var(--font-serif); font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.alert-clinical h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  margin: 0 0 6px; color: var(--danger);
}
.alert-clinical p { margin: 0 0 6px; font-size: 13px; color: var(--ink); line-height: 1.6; }
.alert-clinical p b { color: var(--ink); }

/* =========================================================
   Decision-tree container
   ========================================================= */
.decision-tree-container, .diagtree {
  margin: 20px 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px;
}

/* =========================================================
   Mindmap
   ========================================================= */
.mmwrap {
  position: relative; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 4px; min-height: 600px; overflow: hidden;
}
.mmwrap .canvas { width: 100%; height: 700px; display: block; cursor: grab; }
.mmwrap .canvas:active { cursor: grabbing; }
.mmwrap .zctl { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 5; }
.mmwrap .zctl button {
  width: 32px; height: 32px; border-radius: 3px; background: #fff;
  border: 1px solid var(--rule); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
}
.mmwrap .zctl button:hover { background: var(--paper-2); border-color: var(--spe-interne); color: var(--spe-interne); }
.mmwrap .zhint {
  position: absolute; bottom: 12px; left: 12px; z-index: 5;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3);
  text-transform: uppercase; background: rgba(255, 255, 255, .8); padding: 4px 8px; border-radius: 2px;
}

#mm-svg .ring { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 4,4; opacity: .5; }
#mm-svg .link { fill: none; stroke: var(--rule-2); stroke-width: 1.5; opacity: .7; }
#mm-svg .link.main { stroke: var(--spe-interne); stroke-width: 2; opacity: .85; }
#mm-svg .link.sat  { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3,3; }

#mm-svg .root-circle { fill: var(--ink); stroke: var(--spe-interne); stroke-width: 2; }
#mm-svg .root-text   { fill: var(--paper); font-family: var(--font-serif); }

#mm-svg .node-card { cursor: pointer; transition: transform .2s ease; }
#mm-svg .node-card:hover { transform: translate(0, -3px); }
#mm-svg .node-bg { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
#mm-svg .node-card:hover .node-bg { fill: #fff; stroke: var(--fam, var(--spe-interne)); }
#mm-svg .node-accent { fill: var(--fam, var(--spe-interne)); }
#mm-svg .fam-physio  { --fam: var(--spe-interne); }
#mm-svg .fam-clin    { --fam: var(--info); }
#mm-svg .fam-bilan   { --fam: var(--info); }
#mm-svg .fam-h1ere   { --fam: var(--spe-interne); }
#mm-svg .fam-coag    { --fam: var(--warn); }
#mm-svg .fam-civd    { --fam: var(--danger); }
#mm-svg .fam-urg     { --fam: var(--danger); }
#mm-svg .node-chip { fill: var(--bg-2); stroke: none; }
#mm-svg .node-chip-t { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; fill: var(--ink-3); text-transform: uppercase; }
#mm-svg .node-title { font-family: var(--font-serif); font-size: 16px; font-weight: 500; fill: var(--ink); }
#mm-svg .node-sub   { font-family: var(--font-sans); font-size: 11px; fill: var(--ink-2); }

#mm-svg .node-sat { cursor: pointer; }
#mm-svg .sat-bg { fill: var(--paper-2); stroke: var(--rule-2); stroke-width: 1; }
#mm-svg .node-sat:hover .sat-bg { fill: #fff; stroke: var(--spe-interne); }
#mm-svg .sat-title { font-family: var(--font-serif); font-size: 13px; font-weight: 500; fill: var(--ink); }
#mm-svg .sat-sub   { font-family: var(--font-sans); font-size: 10px; fill: var(--ink-3); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .keypoints { grid-template-columns: 1fr; }
  .def-grid, .interr-grid, .bilan-grid, .vasc-grid, .presentation-grid, .etio-grid { grid-template-columns: 1fr; }
  .phys-etapes { grid-template-columns: repeat(2, 1fr); }
  .hematomes-grid { grid-template-columns: repeat(3, 1fr); }
  #vignettes { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hematomes-grid { grid-template-columns: repeat(2, 1fr); }
  .phys-etapes { grid-template-columns: 1fr; }
}

/* =========================================================
   Mode nuit
   ========================================================= */
body.dark-mode .vignette,
body.dark-mode .kp,
body.dark-mode .def-card,
body.dark-mode .phys-step,
body.dark-mode .interr-card,
body.dark-mode .bilan-card,
body.dark-mode .ripa-step,
body.dark-mode .hematome-card,
body.dark-mode .etio-card,
body.dark-mode .pres-card,
body.dark-mode .vasc-card,
body.dark-mode .acquis-card,
body.dark-mode table.matrix,
body.dark-mode .mmwrap,
body.dark-mode .lane,
body.dark-mode .hbox,
body.dark-mode .cat-block,
body.dark-mode .cascade-wrap {
  background: #2a2520; border-color: #3d3630; color: #d8d2c2;
}
body.dark-mode .alert-clinical { background: #3a1f15; }
body.dark-mode .alert-clinical h4, body.dark-mode .alert-clinical p, body.dark-mode .alert-clinical p b { color: #fae0d4; }
body.dark-mode .vignette p, body.dark-mode .vignette p b { color: #d8d2c2; }
body.dark-mode .vignette p b { color: #f5f0e1; }
body.dark-mode .vignette .vg-reveal { background: #322c25; border-color: #3d3630; }
body.dark-mode .vignette .vg-reponse { color: #d8d2c2; border-color: #3d3630; }
body.dark-mode .kp h5, body.dark-mode .def-head h3, body.dark-mode .interr-card h5, body.dark-mode .bilan-card h5,
body.dark-mode .phys-step h5, body.dark-mode .hematome-card h5, body.dark-mode .pres-card h5, body.dark-mode .vasc-card h4,
body.dark-mode .acquis-head h4, body.dark-mode .entite-head h4, body.dark-mode .hbox > h5, body.dark-mode .lane-h h3 { color: #f5f0e1; }
body.dark-mode .kp p, body.dark-mode .def-card p, body.dark-mode .phys-step p, body.dark-mode .interr-card ul li,
body.dark-mode .bilan-card p, body.dark-mode .ripa-step p, body.dark-mode .vasc-card p, body.dark-mode .acquis-card p,
body.dark-mode table.matrix th, body.dark-mode table.matrix td, body.dark-mode .hbox > p, body.dark-mode .hbox > ul li,
body.dark-mode .cat-block p, body.dark-mode .cat-block li { color: #d8d2c2; }
body.dark-mode .cat-label, body.dark-mode .kp-num, body.dark-mode .def-sub, body.dark-mode .entite-accroche,
body.dark-mode .sec-num, body.dark-mode .sec-title .hint, body.dark-mode .lane-h .kind, body.dark-mode .ps-num,
body.dark-mode .rs-num, body.dark-mode .vg-tag, body.dark-mode .cascade-step-label { color: #b2a98f; }
body.dark-mode table.matrix thead th { background: #3d3630; color: #b2a98f; border-color: #524a3e; }
body.dark-mode table.matrix tbody tr:hover td { background: #322c25; }
body.dark-mode table.matrix tbody th { color: #f5f0e1; border-color: #3d3630; }
body.dark-mode #mm-svg .root-circle { fill: #1a1713; }
body.dark-mode #mm-svg .root-text   { fill: #f5f0e1; }
body.dark-mode #mm-svg .node-bg     { fill: #2a2520; stroke: #3d3630; }
body.dark-mode #mm-svg .node-card:hover .node-bg { fill: #322c25; }
body.dark-mode #mm-svg .node-title  { fill: #f5f0e1; }
body.dark-mode #mm-svg .node-sub    { fill: #d8d2c2; }
body.dark-mode #mm-svg .node-chip   { fill: #3d3630; }
body.dark-mode #mm-svg .sat-bg      { fill: #2a2520; stroke: #524a3e; }
body.dark-mode #mm-svg .sat-title   { fill: #f5f0e1; }
body.dark-mode #mm-svg .sat-sub     { fill: #b2a98f; }
body.dark-mode .mmwrap .zctl button { background: #2a2520; border-color: #3d3630; color: #d8d2c2; }
body.dark-mode .mmwrap .zctl button:hover { background: #322c25; color: #f5f0e1; }
body.dark-mode .mmwrap .zhint { background: rgba(42, 37, 32, .85); color: #b2a98f; }
body.dark-mode .cascade-box rect { fill: #322c25; stroke: #524a3e; }
body.dark-mode .cascade-box text { fill: #b2a98f; }
body.dark-mode .cascade-box.cascade-active text { fill: #f5f0e1; }
body.dark-mode .decision-tree-container, body.dark-mode .diagtree { background: #2a2520; border-color: #3d3630; }
body.dark-mode .cat-block.cat-piege { background: #3a1f15; }
body.dark-mode .pres-card.pres-hemo { background: #3a1f15; }
body.dark-mode table.diff-table tbody tr.diff-pivot-plaq  { background: #3a1f15; }
body.dark-mode table.diff-table tbody tr.diff-pivot-fv    { background: #3a2f1a; }
body.dark-mode table.diff-table tbody tr.diff-pivot-fviii { background: #1f2c33; }
body.dark-mode table.diff-table tbody tr.diff-pivot-fg    { background: #2c3322; }
body.dark-mode table.diff-table tbody tr.diff-pivot-lyse  { background: #2e1f33; }
