/* ==========================================================================
   Item 213 · Anémie chez l'adulte et l'enfant
   Architecture : multi-pathologies + arbre décisionnel central
   ========================================================================== */

: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;
  --grey:     #5a6e7e;

  /* Familles thématiques de l'item 213 */
  --fam-dx:    var(--spe-interne);    /* démarche diagnostique · brun-tabac */
  --fam-clin:  var(--ink);            /* clinique · noir */
  --fam-urg:   var(--danger);         /* urgences · rouge */
  --fam-micro: var(--spe-orl);        /* microcytaires · ocre (fer) */
  --fam-macro: var(--spe-neuro);      /* macro/B12/B9 · aubergine */
  --fam-regen: var(--spe-cardio);     /* régénératives · bleu canard */
  --fam-hb:    var(--spe-infectio);   /* hémoglobinopathies · terracotta */
  --fam-ped:   var(--accent-blue);    /* pédiatrie · bleu */
}

/* Élargissement local de la zone de contenu pour les tableaux comparatifs */
.content { max-width: 1400px; }

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

/* Utilitaires textuels */
.mono   { font-family: var(--font-mono); font-feature-settings: "ss01"; }
.serif  { font-family: var(--font-serif); font-optical-sizing: auto; }
.muted  { color: var(--ink-3); }
.danger { color: var(--danger); }
.warn   { color: var(--warn); }
.ok     { color: var(--ok); }
hr.soft { border: none; border-top: 1px dashed var(--rule); margin: 20px 0; }

/* 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; }

/* Tag Rang A / Rang B */
.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); }

/* =========================================================
   Mindmap radiale (template hérité de 194)
   ========================================================= */
.mmwrap {
  position: relative; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden; height: 740px;
}
.mmwrap .zctl        { position: absolute; top: 14px; right: 14px; z-index: 10; display: flex; gap: 4px; }
.mmwrap .zctl button {
  width: 34px; height: 34px; border: 1px solid var(--rule-2); background: var(--paper);
  border-radius: 3px; font-family: var(--font-mono); font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.mmwrap .zctl button:hover { background: var(--bg-2); }
.mmwrap .zhint {
  position: absolute; left: 14px; bottom: 14px; z-index: 10;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
  color: var(--ink-3); background: rgba(255, 252, 245, .85);
  padding: 6px 10px; border-radius: 3px; border: 1px solid var(--rule);
}
.mmwrap svg.canvas {
  width: 100%; height: 100%; display: block; cursor: grab;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.035) 1px, transparent 0);
  background-size: 24px 24px;
}
.mmwrap svg.canvas:active { cursor: grabbing; }
.mmwrap svg.canvas .root-circle  { fill: var(--ink); }
.mmwrap svg.canvas .root-text    { fill: var(--paper); font-family: var(--font-serif); font-weight: 500; }
.mmwrap svg.canvas .node-card    { cursor: pointer; }
.mmwrap svg.canvas .node-card:hover .node-bg { stroke-width: 2; }
.mmwrap svg.canvas .node-bg      { fill: #fff; stroke: var(--rule-2); stroke-width: 1; }
.mmwrap svg.canvas .node-accent  { fill: var(--fam, var(--ink)); }
.mmwrap svg.canvas .node-title   { fill: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 15px; }
.mmwrap svg.canvas .node-sub     { fill: var(--ink-2); font-size: 11px; }
.mmwrap svg.canvas .node-chip    { fill: #fff; stroke: var(--rule); stroke-width: 1; }
.mmwrap svg.canvas .node-chip-t  { fill: var(--ink-2); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.mmwrap svg.canvas path.link     { fill: none; stroke: var(--rule-2); stroke-width: 1.2; stroke-dasharray: 3 4; }
.mmwrap svg.canvas path.link.main   { stroke-width: 1.4; }
.mmwrap svg.canvas path.link.sat    { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 1 5; opacity: .55; }
.mmwrap svg.canvas .ring         { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 5; }
.mmwrap svg.canvas .node-sat                 { cursor: pointer; }
.mmwrap svg.canvas .node-sat:hover .sat-bg   { fill: var(--ink); }
.mmwrap svg.canvas .node-sat:hover .sat-title,
.mmwrap svg.canvas .node-sat:hover .sat-sub  { fill: var(--paper); }
.mmwrap svg.canvas .sat-bg                   { fill: var(--bg-2); stroke: var(--ink); stroke-width: 1; }
.mmwrap svg.canvas .sat-title                { fill: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 13px; }
.mmwrap svg.canvas .sat-sub                  { fill: var(--ink-2); font-size: 9.5px; font-family: var(--font-mono); letter-spacing: .04em; }

/* Couleurs-familles des cartes mindmap */
.mmwrap svg.canvas .node-card.fam-dx     .node-accent { fill: var(--fam-dx); }
.mmwrap svg.canvas .node-card.fam-clin   .node-accent { fill: var(--fam-clin); }
.mmwrap svg.canvas .node-card.fam-urg    .node-accent { fill: var(--fam-urg); }
.mmwrap svg.canvas .node-card.fam-micro  .node-accent { fill: var(--fam-micro); }
.mmwrap svg.canvas .node-card.fam-macro  .node-accent { fill: var(--fam-macro); }
.mmwrap svg.canvas .node-card.fam-regen  .node-accent { fill: var(--fam-regen); }
.mmwrap svg.canvas .node-card.fam-dx     .node-title  { fill: var(--fam-dx); }
.mmwrap svg.canvas .node-card.fam-urg    .node-title  { fill: var(--fam-urg); }
.mmwrap svg.canvas .node-card.fam-micro  .node-title  { fill: var(--fam-micro); }
.mmwrap svg.canvas .node-card.fam-macro  .node-title  { fill: var(--fam-macro); }
.mmwrap svg.canvas .node-card.fam-regen  .node-title  { fill: var(--fam-regen); }

/* =========================================================
   Vignette d'amorçage clinique
   ========================================================= */
.vignette {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--fam-dx);
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.vignette .vg-tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fam-dx); margin-bottom: 8px;
}
.vignette p { font-family: var(--font-serif); font-size: 15px; line-height: 1.55; color: var(--ink); margin: 0; }
.vignette p b { font-weight: 600; }
.vignette .vg-trap {
  margin-top: 14px; padding: 10px 14px; background: var(--bg-2); border-radius: 3px;
  font-family: var(--font-sans); font-size: 12.5px; font-style: italic; color: var(--ink-2);
}

/* Keypoints */
.keypoints { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 22px; }
.keypoints ol { padding-left: 22px; margin: 0; }
.keypoints ol li {
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
  padding: 6px 0; border-bottom: 1px dashed var(--rule);
}
.keypoints ol li:last-child { border-bottom: none; padding-bottom: 0; }
.keypoints ol li b { color: var(--ink); font-weight: 600; }

/* Définitions */
.def-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.def-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--fam-dx); border-radius: 4px;
  padding: 14px 16px;
}
.def-card h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px;
  letter-spacing: -.005em; margin: 0; color: var(--fam-dx);
}
.def-card .def-sub {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin: 4px 0 8px;
}
.def-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.def-card p b { color: var(--ink); }

/* Tableau seuils Hb */
table.matrix              { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule); }
table.matrix th,
table.matrix td           { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 12.5px; }
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; border-bottom: 1px solid var(--rule-2); }
table.matrix tbody th     { font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; 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; }
table.matrix .num-cell { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
table.matrix .key-cell { background: color-mix(in oklab, var(--warn) 10%, var(--paper)); font-weight: 600; }

/* =========================================================
   Bilan martial — tableau comparatif géant (onglet 07)
   ========================================================= */
.bilan-martial {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 0; overflow-x: auto;
}
.bilan-martial table { width: 100%; border-collapse: collapse; min-width: 900px; }
.bilan-martial thead th {
  padding: 12px 14px; background: var(--bg-2); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2); text-align: left;
}
.bilan-martial thead th.col-cm  { color: var(--fam-micro); }
.bilan-martial thead th.col-inf { color: var(--warn); }
.bilan-martial thead th.col-mix { color: var(--ink-2); }
.bilan-martial tbody td,
.bilan-martial tbody th {
  padding: 12px 14px; border-bottom: 1px solid var(--rule); font-size: 13px; vertical-align: top;
}
.bilan-martial tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 14px; color: var(--ink);
  background: color-mix(in oklab, var(--bg-2) 50%, var(--paper));
}
.bilan-martial tbody .def-col { font-size: 11.5px; color: var(--ink-3); font-style: italic; max-width: 200px; }
.bilan-martial tbody .val-cell { font-family: var(--font-mono); font-size: 14px; color: var(--ink); text-align: center; }
.bilan-martial tbody tr.key-row .val-cell { background: color-mix(in oklab, var(--warn) 12%, var(--paper)); font-weight: 600; }
.bilan-martial tbody tr:last-child td,
.bilan-martial tbody tr:last-child th { border-bottom: none; }
.bilan-martial-rule {
  margin-top: 14px; padding: 12px 16px; background: var(--bg-2); border-radius: 3px;
  border-left: 3px solid var(--fam-micro);
  font-family: var(--font-sans); font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
}
.bilan-martial-rule b { color: var(--ink); }

/* =========================================================
   Cartes-pathologies (entités microcytaires, normocytaires, etc.)
   ========================================================= */
.entite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.entite-grid.r-2 { grid-template-columns: repeat(2, 1fr); }
.entite-grid.r-4 { grid-template-columns: repeat(4, 1fr); }
.entite-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--fam, var(--ink)); border-radius: 4px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.entite-card h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  color: var(--fam, var(--ink)); margin: 0; letter-spacing: -.005em;
}
.entite-card .entite-sub {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-top: -6px;
}
.entite-card .ent-block { padding-top: 6px; border-top: 1px dashed var(--rule); }
.entite-card .ent-block:first-of-type { border-top: none; padding-top: 0; }
.entite-card .ent-label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.entite-card ul { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.entite-card ul li { margin: 3px 0; }
.entite-card ul li b { color: var(--ink); font-weight: 600; }

/* Tableau des normocytaires arégénératives */
table.entite-table {
  width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule);
  font-size: 12.5px;
}
table.entite-table th,
table.entite-table td { padding: 10px 13px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.entite-table 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.entite-table tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; color: var(--ink);
  border-right: 1px solid var(--rule);
}

/* =========================================================
   Alertes rouges (encadrés danger)
   ========================================================= */
.alert {
  border-radius: 4px; padding: 14px 18px;
  margin: 18px 0; display: flex; gap: 14px; align-items: flex-start;
}
.alert .alert-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.alert .alert-body { flex: 1; }
.alert .alert-title {
  font-family: var(--font-serif); font-weight: 500; font-size: 16px;
  margin: 0 0 6px; line-height: 1.25;
}
.alert .alert-text { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.alert .alert-text b { color: var(--ink); font-weight: 600; }
.alert-danger {
  background: var(--alert-red-soft);
  border-left: 4px solid var(--danger);
  border: 1px solid color-mix(in oklab, var(--danger) 30%, var(--rule));
}
.alert-danger .alert-title { color: var(--danger); }

/* =========================================================
   Arbre décisionnel SVG géant (onglet 04, le composant phare)
   Calqué sur item-332 mais adapté à l'item 213 (3 niveaux + markers)
   ========================================================= */
.diagtree {
  position: relative; width: 100%; max-width: 1400px;
  margin: 24px auto 0;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 20px;
  overflow-x: auto;
}
.diagtree .dt-svg {
  width: 100%; min-width: 1200px; height: auto;
  display: block;
}
.diagtree .dt-svg-inner { width: 100%; height: 1100px; max-width: 1400px; }

/* Connecteurs (lignes entre nœuds) */
.diagtree .dt-edge {
  fill: none; stroke: var(--accent-dash);
  stroke-width: 1.6; stroke-dasharray: 4 4;
}
.diagtree .dt-edge.ok     { stroke: var(--ok); }
.diagtree .dt-edge.warn   { stroke: var(--warn); }
.diagtree .dt-edge.danger { stroke: var(--danger); }
.diagtree .dt-edge.grey   { stroke: var(--grey); }

.diagtree .dt-edge-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  fill: var(--ink-3); paint-order: stroke;
  stroke: var(--paper); stroke-width: 4; stroke-linejoin: round;
}

/* Boîte commune des nœuds */
.diagtree .dt-node {
  box-sizing: border-box; width: 100%; height: 100%;
  border-radius: 4px; padding: 8px 12px;
  display: flex; flex-direction: column; justify-content: center;
  font-family: var(--font-sans);
  background: var(--paper); border: 1px solid var(--rule);
}
.diagtree .dt-node .dt-title {
  font-family: var(--font-serif); font-weight: 500; font-size: 14px;
  color: var(--ink); line-height: 1.15;
}
.diagtree .dt-node .dt-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--ink-3); margin-top: 4px;
}

/* Racine (encart noir) */
.diagtree .dt-root {
  background: var(--ink); border: 1px solid var(--ink); text-align: center;
}
.diagtree .dt-root .dt-title { color: var(--paper); font-size: 16px; }
.diagtree .dt-root .dt-sub { color: var(--paper); opacity: .75; }

/* Nœuds questions (pivots) */
.diagtree .dt-question {
  background: var(--bg-2); border: 1px dashed var(--accent-dash); align-items: center; text-align: center;
}
.diagtree .dt-question .dt-title { font-size: 13.5px; color: var(--ink); }

/* Nœuds terminaux (étiologies) — couleur selon famille mk-* */
.diagtree .dt-terminal {
  border-left: 4px solid var(--mk, var(--ink)); cursor: pointer;
}
.diagtree .dt-terminal:hover {
  background: var(--paper-2); border-color: var(--mk, var(--ink));
}
.diagtree .dt-terminal .dt-title { color: var(--mk, var(--ink)); font-size: 13.5px; }
.diagtree .dt-terminal .dt-sub { font-size: 10px; }

.diagtree .mk-ok     { --mk: var(--ok); }
.diagtree .mk-warn   { --mk: var(--warn); }
.diagtree .mk-danger { --mk: var(--danger); }
.diagtree .mk-grey   { --mk: var(--grey); }

.diagtree-legend {
  margin-top: 16px; display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-2);
  padding: 10px 14px; background: var(--bg-2); border-radius: 3px;
}
.diagtree-legend .lg {
  display: inline-flex; align-items: center; gap: 6px;
}
.diagtree-legend .lg::before {
  content: ''; display: inline-block; width: 12px; height: 4px; border-radius: 2px;
}
.diagtree-legend .lg-ok::before     { background: var(--ok); }
.diagtree-legend .lg-warn::before   { background: var(--warn); }
.diagtree-legend .lg-danger::before { background: var(--danger); }
.diagtree-legend .lg-grey::before   { background: var(--grey); }

/* =========================================================
   Sémiologie (onglet 05)
   ========================================================= */
.semio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.semio-block {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--fam-clin); border-radius: 4px;
  padding: 14px 16px;
}
.semio-block h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 8px;
  color: var(--ink);
}
.semio-block ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.semio-block ul li { margin: 4px 0; }
.semio-block ul li b { color: var(--ink); }

.triade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.triade-step {
  background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--fam-urg);
  border-radius: 4px; padding: 14px 16px;
}
.triade-step h5 { font-family: var(--font-serif); font-weight: 500; font-size: 16px; margin: 0 0 8px; color: var(--fam-urg); }
.triade-step p { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.triade-step p b { color: var(--ink); }

/* =========================================================
   Urgences & transfusion (onglet 06)
   ========================================================= */
.urg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.urg-block {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--danger);
  border-radius: 4px; padding: 14px 16px;
}
.urg-block h4 { font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 8px; color: var(--danger); }
.urg-block ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.urg-block ul li { margin: 4px 0; }
.urg-block ul li b { color: var(--ink); }
.urg-block.full { grid-column: 1 / -1; }

table.seuils {
  width: 100%; border-collapse: collapse; margin-top: 12px;
  background: var(--paper); border: 1px solid var(--rule);
}
table.seuils th, table.seuils td {
  padding: 10px 13px; border-bottom: 1px solid var(--rule); text-align: left; font-size: 12.5px;
}
table.seuils 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.seuils tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; color: var(--ink);
  border-right: 1px solid var(--rule);
}
table.seuils tbody td.cell-seuil {
  font-family: var(--font-mono); color: var(--danger); font-size: 13px;
}

/* =========================================================
   Carte-mère drépanocytose (onglet 13)
   ========================================================= */
.drep-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 4px solid var(--fam-hb); border-radius: 4px; overflow: hidden;
  margin-bottom: 18px;
}
.drep-head {
  background: color-mix(in oklab, var(--fam-hb) 8%, var(--paper));
  border-bottom: 1px solid var(--rule);
  padding: 14px 20px;
}
.drep-head h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 22px;
  margin: 0; color: var(--fam-hb); letter-spacing: -.005em;
}
.drep-head .drep-sub {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 4px;
}
.drep-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.drep-section { padding: 14px 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.drep-section:nth-child(even) { border-right: none; }
.drep-section.full { grid-column: 1 / -1; border-right: none; }
.drep-section h4 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fam-hb); margin: 0 0 8px;
}
.drep-section ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.drep-section ul li { margin: 4px 0; }
.drep-section ul li b { color: var(--ink); }

/* Tableau récap thalassémies */
.thalas-table {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow-x: auto;
}
.thalas-table table { width: 100%; border-collapse: collapse; min-width: 900px; }
.thalas-table 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;
  padding: 12px; border-bottom: 1px solid var(--rule-2); text-align: left;
}
.thalas-table tbody td {
  padding: 11px 12px; font-size: 12.5px; border-bottom: 1px solid var(--rule); vertical-align: top;
  color: var(--ink-2); line-height: 1.4;
}
.thalas-table tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   AHAI tableau chaud / froid (onglet 12)
   ========================================================= */
.ahai-table { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow-x: auto; }
.ahai-table table { width: 100%; border-collapse: collapse; min-width: 800px; }
.ahai-table thead th {
  background: var(--bg-2); font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 500;
  padding: 12px 14px; border-bottom: 1px solid var(--rule-2); text-align: left;
}
.ahai-table thead th.col-chaud { color: var(--warn); }
.ahai-table thead th.col-froid { color: var(--accent-blue); }
.ahai-table tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; color: var(--ink);
  padding: 11px 14px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg-2) 50%, var(--paper));
  vertical-align: top;
}
.ahai-table tbody td {
  font-size: 12.5px; padding: 11px 14px; border-bottom: 1px solid var(--rule); color: var(--ink-2);
  vertical-align: top; line-height: 1.5;
}
.ahai-table tbody tr:last-child th,
.ahai-table tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   B12 / B9 — cartes-pathologies (onglets 10/11)
   ========================================================= */
.bcard {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--fam-macro); border-radius: 4px;
  margin-bottom: 14px;
}
.bcard-section { padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.bcard-section:last-child { border-bottom: none; }
.bcard-section h4 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fam-macro); margin: 0 0 8px;
}
.bcard-section p { font-size: 13px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.bcard-section p b { color: var(--ink); }
.bcard-section ul { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.bcard-section ul li { margin: 4px 0; }
.bcard-section ul li b { color: var(--ink); }

/* =========================================================
   Schémas SVG natifs (5 schémas pédagogiques)
   ========================================================= */
.schema-svg {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px; margin: 14px 0;
}
.schema-svg svg { width: 100%; height: auto; display: block; }
.schema-svg .schema-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.schema-svg text { font-family: var(--font-sans); fill: var(--ink); }
.schema-svg .lbl { font-size: 11px; fill: var(--ink-2); }
.schema-svg .lbl-title { font-family: var(--font-serif); font-size: 13px; font-weight: 500; fill: var(--ink); }
.schema-svg rect.box { fill: var(--bg-2); stroke: var(--rule-2); stroke-width: 1; }
.schema-svg rect.box-key { fill: color-mix(in oklab, var(--warn) 12%, var(--paper)); stroke: var(--warn); stroke-width: 1.2; }
.schema-svg path.flow { fill: none; stroke: var(--ink-3); stroke-width: 1.5; marker-end: url(#arrow); }
.schema-svg path.flow.danger { stroke: var(--danger); }
.schema-svg path.flow.warn { stroke: var(--warn); }
.schema-svg path.flow.ok { stroke: var(--ok); }

/* =========================================================
   Pédiatrie (onglet 14)
   ========================================================= */
.ped-block {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--fam-ped); border-radius: 4px; padding: 14px 18px; margin-bottom: 14px;
}
.ped-block h4 { font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 8px; color: var(--fam-ped); }
.ped-block ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.ped-block ul li { margin: 4px 0; }
.ped-block ul li b { color: var(--ink); }
.ped-etio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ped-etio-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 3px solid var(--fam-ped); border-radius: 4px; padding: 12px 14px;
}
.ped-etio-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14px; margin: 0 0 6px; color: var(--fam-ped); }
.ped-etio-card ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* Image placeholder (pour les frottis non fournis) */
.img-placeholder {
  background: var(--bg-3); border: 1px dashed var(--rule-2); border-radius: 4px;
  padding: 20px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ink-3); text-transform: uppercase;
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  .mmwrap { height: auto; }
  .mmwrap .zctl, .mmwrap .zhint { display: none !important; }
  .diagtree { overflow: visible; }
  .diagtree .dt-svg { min-width: 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .def-grid,
  .semio-grid,
  .urg-grid,
  .triade-grid,
  .entite-grid,
  .entite-grid.r-2,
  .entite-grid.r-4,
  .ped-etio-grid,
  .drep-body { grid-template-columns: 1fr; }
  .drep-section { border-right: none; }
  .mmwrap { height: 540px; }
}
