/* ==========================================================================
   Item 190 · Fièvre prolongée — styles spécifiques
   Charge après styles.css + components.css. Reprend les composants
   structurels canoniques (sec-title, lane, hbox, etiogrid, matrix, mmwrap,
   diagtree-svg) et ajoute les composants propres :
   - cascade-svg (arbre cascade temporelle 4 étages)
   - tableau étiologique géant 4×2
   - cartes profils causes (12)
   - cartes identité maladies rares (3)
   - frise temporelle définition
   ========================================================================== */

:root {
  /* Tokens locaux (alignés sur les autres items) */
  --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;

  /* Familles sémantiques pour cet item (palette terre du projet) */
  --fam-dx:        var(--spe-cardio);     /* bleu canard · démarche / diagnostic */
  --fam-infect:    var(--spe-infectio);   /* terracotta · infectieuses */
  --fam-hemato:    var(--spe-onco);       /* rose vif · néoplasies */
  --fam-rhumato:   var(--spe-orl);        /* ocre · inflammatoires/rhumato */
  --fam-warn:      var(--warn);           /* sable warning · divers/pièges */
  --fam-interne:   var(--spe-interne);    /* brun-tabac · médecine interne / focus rares */
  --fam-th:        var(--spe-pneumo);     /* vert olive · thérapeutique */
}

.content { max-width: 1400px; }

/* Fade léger au changement d'onglet */
@keyframes fp-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.content-panel.active { animation: fp-fadeIn .35s ease-out; }

/* ----- Familles utilitaires ----- */
.fam-dx       { --fam: var(--fam-dx);       --fam-bg: #cfdde0; }
.fam-infect   { --fam: var(--fam-infect);   --fam-bg: #f1d8cd; }
.fam-hemato   { --fam: var(--fam-hemato);   --fam-bg: #f1d3df; }
.fam-rhumato  { --fam: var(--fam-rhumato);  --fam-bg: #f1e0c4; }
.fam-warn     { --fam: var(--fam-warn);     --fam-bg: #f3e9cc; }
.fam-interne  { --fam: var(--fam-interne);  --fam-bg: #ede1ce; }
.fam-th       { --fam: var(--fam-th);       --fam-bg: #dde2c8; }

/* ============================================================
   Sec-title (recopie 152/194 pour cohérence)
   ============================================================ */
.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); }

/* ============================================================
   Mindmap radiale (template 152/194) — 6 branches 21 satellites
   ============================================================ */
.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);
}
.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; }

/* ============================================================
   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);
}
.vignette .vg-trap b { font-style: normal; }

/* ============================================================
   Keypoints (6 cards alignées en 3 cols)
   ============================================================ */
.keypoints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.keypoint  {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px;
  display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start;
}
.keypoint .kp-n {
  font-family: var(--font-serif); font-style: italic; font-size: 26px; line-height: 1; color: var(--fam-dx);
}
.keypoint p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.keypoint p b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Cartes définitions (8 cartes en grille 2 colonnes)
   ============================================================ */
.def-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.def-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 4px solid var(--fam, var(--ink));
  border-radius: 4px; padding: 18px 20px;
}
.def-card .def-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.def-card h3 { font-family: var(--font-serif); font-weight: 500; font-size: 20px; letter-spacing: -.005em; margin: 0; color: var(--fam, var(--ink)); }
.def-card .def-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.def-card p { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 0 0 10px; }
.def-card p b { color: var(--ink); }
.def-card .def-pillar {
  margin-top: 12px; padding: 10px 12px; background: var(--bg-2);
  border-radius: 3px; font-family: var(--font-sans); font-size: 12px;
  letter-spacing: .01em; color: var(--ink); font-style: italic;
}
.def-card .def-pillar b { font-weight: 600; font-style: normal; }

/* ============================================================
   Frise temporelle "Définition fièvre prolongée" (SVG horizontal)
   ============================================================ */
.frise-def {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 22px 28px; margin-bottom: 24px;
}
.frise-def svg { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; }
.frise-def .fz-axis    { stroke: var(--ink-3); stroke-width: 1.2; }
.frise-def .fz-tick    { stroke: var(--ink-3); stroke-width: 1; }
.frise-def .fz-band-up { fill: var(--fam-dx); opacity: .15; }
.frise-def .fz-band-low{ fill: var(--warn); opacity: .15; }
.frise-def .fz-cs      { fill: var(--paper); stroke: var(--fam-dx); stroke-width: 1.4; }
.frise-def .fz-label   { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; fill: var(--ink-2); text-transform: uppercase; }
.frise-def .fz-htitle  { font-family: var(--font-serif); font-size: 14px; font-weight: 500; fill: var(--ink); }
.frise-def .fz-tag-up  { font-family: var(--font-mono); font-size: 11px; fill: var(--fam-dx); font-weight: 600; }
.frise-def .fz-tag-low { font-family: var(--font-mono); font-size: 11px; fill: var(--warn); font-weight: 600; }

/* ============================================================
   Démarche diagnostique (interrogatoire + examen + bilan blocs)
   ============================================================ */
.demarche-bloc {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 16px 18px; margin-bottom: 18px;
  border-left: 4px solid var(--fam, var(--fam-dx));
}
.demarche-bloc h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px;
  margin: 0 0 10px; color: var(--fam, var(--fam-dx));
}
.demarche-bloc ul { margin: 4px 0 0; padding-left: 22px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.demarche-bloc ul li { margin: 5px 0; }
.demarche-bloc ul li b { color: var(--ink); font-weight: 600; }

.bilan1-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.bilan1-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 14px 16px; position: relative;
}
.bilan1-card .b-icon {
  position: absolute; top: -10px; left: 14px; background: var(--paper);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--fam-dx); text-transform: uppercase; padding: 0 8px;
}
.bilan1-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 16px; margin: 2px 0 8px; color: var(--ink); }
.bilan1-card ul { margin: 4px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.bilan1-card ul li { margin: 4px 0; }
.bilan1-card ul li b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Encadrés ALERTE (cf. règle B CLAUDE.md)
   ============================================================ */
.alert-clinical {
  background: #f3dccf; border: 1px solid var(--danger);
  border-radius: 4px; padding: 16px 20px;
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  margin: 18px 0;
}
.alert-clinical .alert-icon {
  font-family: var(--font-serif); font-size: 32px; line-height: 1;
  color: var(--danger); font-style: italic; font-weight: 500;
}
.alert-clinical h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px;
  letter-spacing: -.005em; color: var(--danger); margin: 0 0 8px;
}
.alert-clinical ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.alert-clinical ul li { margin: 4px 0; }
.alert-clinical ul li b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Arbre décisionnel cascade temporelle SVG (onglet 04)
   4 étages superposés verticalement avec markers + foreignObject
   ============================================================ */
.cascade-wrap {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 4px; padding: 22px 18px;
}
.cascade-wrap .cascade-svg {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: auto;
  margin: 0 auto;
}

/* Markers (arrowheads colorées) */
.cascade-svg .mh-ok     { fill: var(--ok); }
.cascade-svg .mh-warn   { fill: var(--warn); }
.cascade-svg .mh-grey   { fill: var(--ink-3); }
.cascade-svg .mh-danger { fill: var(--danger); }

/* Bandeau "timing" (J0-J3, J3-J7, etc) */
.cascade-svg .cs-timing-bg { fill: var(--bg-2); stroke: var(--rule); }
.cascade-svg .cs-timing-t  {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  fill: var(--ink-3); text-transform: uppercase; font-weight: 500;
}

/* Bloc d'entrée (racine, noir) */
.cascade-svg .cs-entry rect { fill: var(--ink); stroke: var(--ink); }
.cascade-svg .cs-fo-entry { color: var(--paper); font-family: var(--font-sans); }
.cascade-svg .cs-fo-entry .cs-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-dash); margin-bottom: 4px;
}
.cascade-svg .cs-fo-entry .cs-htitle {
  font-family: var(--font-serif); font-size: 17px; font-weight: 500;
  margin: 0 0 4px; line-height: 1.2;
}
.cascade-svg .cs-fo-entry .cs-sub { font-size: 12.5px; line-height: 1.4; opacity: .85; }

/* Blocs étage 1 (boîtes parallèles biol/microbio/imagerie) */
.cascade-svg .cs-bloc rect { fill: #fff; stroke: var(--rule); }
.cascade-svg .cs-bloc.acc-dx rect { stroke: var(--fam-dx); stroke-width: 1.4; }
.cascade-svg .cs-bloc-accent { fill: var(--fam-dx); }
.cascade-svg .cs-fo-bloc { font-family: var(--font-sans); color: var(--ink-2); }
.cascade-svg .cs-fo-bloc .cs-htitle {
  font-family: var(--font-serif); font-size: 14px; font-weight: 500;
  color: var(--fam-dx); margin: 0 0 6px;
}
.cascade-svg .cs-fo-bloc ul {
  margin: 2px 0 0; padding-left: 16px; font-size: 11.5px; line-height: 1.4;
}
.cascade-svg .cs-fo-bloc ul li { margin: 2px 0; }
.cascade-svg .cs-fo-bloc ul li b { color: var(--ink); font-weight: 600; }

/* Étage 2 - pistes orientées */
.cascade-svg .cs-piste rect {
  fill: var(--paper-2); stroke: var(--rule); stroke-width: 1;
}
.cascade-svg .cs-piste-accent { fill: var(--ok); }
.cascade-svg .cs-fo-piste { font-family: var(--font-sans); color: var(--ink-2); font-size: 11.5px; line-height: 1.35; }
.cascade-svg .cs-fo-piste .cs-piste-label {
  font-family: var(--font-serif); font-weight: 500; color: var(--ok);
  font-size: 12.5px; display: block; margin-bottom: 2px;
}

/* Étage 3 - TEP-FDG */
.cascade-svg .cs-tep rect { fill: var(--accent-orange-soft); stroke: var(--warn); stroke-width: 1.4; }
.cascade-svg .cs-fo-tep { font-family: var(--font-sans); color: var(--ink-2); }
.cascade-svg .cs-fo-tep .cs-htitle {
  font-family: var(--font-serif); font-size: 16px; font-weight: 500;
  color: var(--warn); margin: 0 0 4px;
}
.cascade-svg .cs-fo-tep .cs-sub { font-size: 12px; line-height: 1.4; }

/* Étage 4 - décision finale (2 sorties) */
.cascade-svg .cs-final-grey rect { fill: var(--bg-2); stroke: var(--ink-3); stroke-width: 1.2; }
.cascade-svg .cs-final-danger rect { fill: var(--danger); stroke: var(--danger); }
.cascade-svg .cs-fo-final-grey { font-family: var(--font-sans); color: var(--ink-2); }
.cascade-svg .cs-fo-final-grey .cs-final-label {
  font-family: var(--font-serif); font-weight: 500; color: var(--ink);
  font-size: 14px; display: block; margin-bottom: 4px;
}
.cascade-svg .cs-fo-final-danger { font-family: var(--font-sans); color: #fff; }
.cascade-svg .cs-fo-final-danger .cs-final-label {
  font-family: var(--font-serif); font-weight: 500; color: #fff;
  font-size: 14px; display: block; margin-bottom: 4px;
}
.cascade-svg .cs-fo-final-danger ul {
  margin: 4px 0 0; padding-left: 16px; font-size: 11px; line-height: 1.4;
}
.cascade-svg .cs-fo-final-danger ul li { margin: 2px 0; }
.cascade-svg .cs-fo-final-grey p,
.cascade-svg .cs-fo-final-danger p { font-size: 11.5px; margin: 0 0 4px; line-height: 1.4; }

/* Flèches */
.cascade-svg .cs-arrow path { fill: none; stroke-width: 2; }
.cascade-svg .arr-grey   path { stroke: var(--ink-3); }
.cascade-svg .arr-warn   path { stroke: var(--warn); }
.cascade-svg .arr-ok     path { stroke: var(--ok); }
.cascade-svg .arr-danger path { stroke: var(--danger); }

.cascade-svg .cs-lbl-bg { fill: #fff; stroke: var(--rule); stroke-width: 0.8; }
.cascade-svg .cs-lbl    {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  font-weight: 500; text-transform: uppercase;
}
.cascade-svg .arr-ok     .cs-lbl { fill: var(--ok); }
.cascade-svg .arr-warn   .cs-lbl { fill: var(--warn); }
.cascade-svg .arr-danger .cs-lbl { fill: var(--danger); }
.cascade-svg .arr-grey   .cs-lbl { fill: var(--ink-3); }

@media (max-width: 768px) {
  .cascade-wrap { padding: 10px; overflow-x: auto; }
  .cascade-wrap .cascade-svg { min-width: 760px; }
}

/* ============================================================
   Tableau étiologique géant (4 lignes × 2 colonnes)
   ============================================================ */
.tableau-eg {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  overflow: hidden;
}
.tableau-eg-head {
  display: grid; grid-template-columns: 220px 1fr 1.2fr; gap: 0;
  background: var(--bg-2); border-bottom: 1px solid var(--rule);
}
.tableau-eg-head > div {
  padding: 14px 18px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  font-weight: 500;
}
.tableau-eg-head .h-cat { background: var(--bg-3); }
.tableau-eg-head .h-freq { border-left: 1px solid var(--rule); }
.tableau-eg-head .h-rare { border-left: 1px solid var(--rule); }

.tableau-eg-row {
  display: grid; grid-template-columns: 220px 1fr 1.2fr; gap: 0;
  border-bottom: 1px solid var(--rule);
}
.tableau-eg-row:last-child { border-bottom: none; }
.tableau-eg-row > div { padding: 16px 18px; }
.tableau-eg-row .te-cat {
  background: color-mix(in oklab, var(--fam, var(--ink)) 15%, var(--paper));
  border-right: 1px solid var(--rule);
  border-left: 4px solid var(--fam, var(--ink));
}
.tableau-eg-row .te-cat h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px;
  margin: 0 0 4px; color: var(--fam, var(--ink));
}
.tableau-eg-row .te-cat .te-pct {
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  color: var(--fam, var(--ink));
}
.tableau-eg-row .te-cat .te-pct-label {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-top: 2px;
}
.tableau-eg-row .te-freq {
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
}
.tableau-eg-row .te-rare { background: var(--paper); }
.tableau-eg-row ul {
  margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2);
  line-height: 1.6;
}
.tableau-eg-row ul li { margin: 5px 0; }
.tableau-eg-row ul li b { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .tableau-eg-head, .tableau-eg-row { grid-template-columns: 1fr; }
  .tableau-eg-row .te-cat,
  .tableau-eg-row .te-freq { border-right: none; border-bottom: 1px solid var(--rule); }
}

/* ============================================================
   Cartes profils causes (12 cartes, 5+4+3) — gabarit identique
   ============================================================ */
.profil-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.profil-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--fam, var(--ink));
  border-radius: 4px; padding: 16px 18px;
}
.profil-card .pc-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.profil-card .pc-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fam, var(--ink));
  background: var(--paper-2); border: 1px solid var(--fam, var(--rule));
  padding: 2px 6px; border-radius: 2px;
}
.profil-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px;
  letter-spacing: -.005em; margin: 0; color: var(--ink);
}
.profil-card .pc-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--rule);
  font-size: 12px; color: var(--ink-2); line-height: 1.5;
}
.profil-card .pc-row:first-of-type { border-top: none; padding-top: 0; }
.profil-card .pc-row .pc-lbl {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 2px;
}
.profil-card .pc-row ul { margin: 0; padding-left: 16px; }
.profil-card .pc-row ul li { margin: 2px 0; }
.profil-card .pc-row b { color: var(--ink); font-weight: 600; }
.profil-card .pc-piege {
  margin-top: 10px; padding: 10px 12px; background: #f3dccf;
  border-left: 3px solid var(--danger); border-radius: 3px;
  font-size: 12px; color: var(--ink-2); line-height: 1.5;
}
.profil-card .pc-piege::before {
  content: 'Piège QCM'; display: block;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em;
  color: var(--danger); text-transform: uppercase; margin-bottom: 4px;
}
.profil-card .pc-piege b { color: var(--ink); font-weight: 600; }

.zone-rares {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-3); border-radius: 3px;
  padding: 14px 18px; margin-top: 18px;
}
.zone-rares h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 16px;
  margin: 0 0 8px; color: var(--ink-2);
}
.zone-rares ul { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.zone-rares ul li { margin: 3px 0; }

@media (max-width: 900px) {
  .profil-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Cartes d'identité maladies rares (3 cartes Whipple/Still/FMF)
   Gabarit enrichi avec champs structurés
   ============================================================ */
.identite-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.identite-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-top: 5px solid var(--fam, var(--ink));
  border-radius: 4px; padding: 22px 26px;
}
.identite-card .id-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 14px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px dashed var(--rule);
}
.identite-card h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 26px;
  letter-spacing: -.005em; margin: 0; color: var(--fam, var(--ink));
}
.identite-card .id-sub {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}

.identite-card .id-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 14px 22px;
  padding: 12px 0; border-bottom: 1px dashed var(--rule);
}
.identite-card .id-row:last-child { border-bottom: none; }
.identite-card .id-row .id-lbl {
  font-family: var(--font-serif); font-weight: 500; font-size: 14px;
  color: var(--fam, var(--ink)); padding-top: 2px;
}
.identite-card .id-row .id-val {
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
}
.identite-card .id-row .id-val ul,
.identite-card .id-row .id-val ol { margin: 0; padding-left: 22px; }
.identite-card .id-row .id-val ul li,
.identite-card .id-row .id-val ol li { margin: 4px 0; }
.identite-card .id-row .id-val b { color: var(--ink); font-weight: 600; }
.identite-card .id-row .id-val i { font-style: italic; }

@media (max-width: 700px) {
  .identite-card .id-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   Cartes pièges & "divers" (5 cartes)
   ============================================================ */
.pieges-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.piege-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--fam, var(--warn));
  border-radius: 4px; padding: 16px 18px;
}
.piege-card .pg-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fam, var(--warn));
  display: inline-block; padding: 2px 6px;
  background: color-mix(in oklab, var(--fam, var(--warn)) 12%, var(--paper));
  border-radius: 2px; margin-bottom: 6px;
}
.piege-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  margin: 0 0 10px; color: var(--ink);
}
.piege-card ul { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }
.piege-card ul li { margin: 5px 0; }
.piege-card ul li b { color: var(--ink); font-weight: 600; }

@media (max-width: 700px) {
  .pieges-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Synthèse EDN (checklist 7⭐ + pièges classiques)
   ============================================================ */
.synthese-intro {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 4px solid var(--fam-dx); border-radius: 3px;
  padding: 14px 18px; margin-bottom: 18px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.synthese-intro b { color: var(--ink); font-weight: 600; }

.checklist-table {
  width: 100%; border-collapse: collapse; background: var(--paper);
  border: 1px solid var(--rule);
}
.checklist-table th, .checklist-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--rule);
  vertical-align: top; font-size: 12.5px;
}
.checklist-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;
  border-bottom: 1px solid var(--rule-2);
}
.checklist-table tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 14px; color: var(--ink);
  border-right: 1px solid var(--rule);
}
.checklist-table tbody tr:last-child th, .checklist-table tbody tr:last-child td { border-bottom: none; }
.checklist-table .ch-stars {
  font-family: var(--font-mono); font-size: 13px; color: var(--warn);
  letter-spacing: .04em; white-space: nowrap;
}
.checklist-table .ch-stars-7 { color: var(--danger); font-weight: 600; }

.pieges-classiques {
  margin-top: 22px;
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--danger); border-radius: 3px;
  padding: 16px 22px;
}
.pieges-classiques h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  color: var(--danger); margin: 0 0 10px;
}
.pieges-classiques ol { margin: 0; padding-left: 22px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.pieges-classiques ol li { margin: 6px 0; }
.pieges-classiques ol li b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Tableau seuils (matrix-like)
   ============================================================ */
table.seuils {
  width: 100%; border-collapse: collapse;
  background: var(--paper); border: 1px solid var(--rule);
  margin-top: 14px;
}
table.seuils th, table.seuils td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--rule); vertical-align: top; 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: 14px;
  color: var(--ink); border-right: 1px solid var(--rule);
}
table.seuils tbody td b { color: var(--ink); font-weight: 600; }

/* ============================================================
   Tableau comparatif DD Whipple/Still/FMF (onglet 09)
   3 colonnes maladie × N lignes critères
   ============================================================ */
.dd-rares-wrap {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px 22px; overflow-x: auto;
}
.dd-rares-table {
  width: 100%; border-collapse: collapse; min-width: 720px;
}
.dd-rares-table th, .dd-rares-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--rule); vertical-align: top;
  font-size: 12.5px; line-height: 1.55;
}
.dd-rares-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;
  border-bottom: 1px solid var(--rule-2);
}
.dd-rares-table thead .dd-th-row {
  background: var(--bg-3); width: 160px;
}
.dd-rares-table thead .dd-th-col {
  font-family: var(--font-serif); font-size: 14px;
  font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--fam, var(--ink));
  border-bottom: 3px solid var(--fam, var(--ink-2));
}
.dd-rares-table tbody th {
  font-family: var(--font-serif); font-weight: 500; font-size: 13.5px;
  color: var(--ink); background: var(--paper-2);
  border-right: 1px solid var(--rule);
  width: 160px;
}
.dd-rares-table tbody td {
  color: var(--ink-2); background: var(--paper);
}
.dd-rares-table tbody td b { color: var(--ink); font-weight: 600; }
.dd-rares-table tbody tr:hover td { background: #fff; }

/* ============================================================
   Items EDN connexes (bloc bas synthèse)
   ============================================================ */
.items-connexes {
  margin-top: 28px;
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--fam-interne); border-radius: 3px;
  padding: 18px 22px;
}
.items-connexes h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  color: var(--fam-interne); margin: 0 0 4px;
}
.items-connexes .ic-sub {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 14px;
}
.ic-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.ic-card {
  display: grid; grid-template-columns: 50px 1fr 24px;
  gap: 12px; align-items: center;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 3px; padding: 10px 14px;
  color: inherit; text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.ic-card:hover {
  background: #fff;
  border-color: var(--fam-interne);
}
.ic-card .ic-num {
  font-family: var(--font-serif); font-style: italic;
  font-size: 26px; line-height: 1; color: var(--fam-interne);
  text-align: center;
}
.ic-card .ic-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ic-card .ic-titre {
  font-family: var(--font-serif); font-weight: 500; font-size: 14px;
  color: var(--ink);
}
.ic-card .ic-ctx {
  font-size: 11.5px; color: var(--ink-2); line-height: 1.4;
}
.ic-card .ic-arrow {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-3);
  text-align: center;
}
.ic-card:hover .ic-arrow { color: var(--fam-interne); }

@media (max-width: 700px) {
  .ic-list { grid-template-columns: 1fr; }
}

/* ============================================================
   Mobile · adaptations
   ============================================================ */
@media (max-width: 900px) {
  .keypoints,
  .def-grid,
  .bilan1-grid                  { grid-template-columns: 1fr; }
  .mmwrap                       { height: 560px; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .mmwrap .zctl, .mmwrap .zhint { display: none !important; }
  .content-panel { display: block !important; page-break-after: always; animation: none; }
  body { background: #fff; }
}
