/* ==========================================================================
   Item 337 · Intoxications aiguës — composants spécifiques
   Hérite des variables/composants de la plateforme (styles.css)
   et reprend les patterns urgence-mir de item-332.css.
   ========================================================================== */

:root {
  /* Alias / extensions de palette repris du 332 */
  --bg:        var(--bg-cream);
  --bg-2:      #ece5d6;
  --bg-3:      #e4dcc8;
  --ink-2:     #524a3e;
  --ink-3:     #8a8270;
  --ink-4:     #b2a98f;
  --rule:      #d7ccb4;
  --rule-2:    var(--accent-dash);
  --paper:     var(--bg-card);
  --paper-2:   #fffcf5;

  --danger:  #a52a1a;
  --warn:    #8a5a12;
  --ok:      #4e6a2f;

  --shadow-s: 0 1px 0 rgba(0,0,0,.02);
  --shadow-m: 0 6px 18px -8px rgba(0,0,0,.15);
  --shadow-l: 0 14px 40px -14px rgba(0,0,0,.28);

  /* === 7 branches mindmap (couleurs sémantiques) === */
  --urg:      #a52a1a;  --urg-bg:    #f3dccf;
  --toxi:     #c27a2c;  --toxi-bg:   #f1e0c4;
  --toxq:     #8a4a7f;  --toxq-bg:   #ead8e4;
  --decon:    #2f5e6b;  --decon-bg:  #cfdde0;
  --anti:     #6b7a3a;  --anti-bg:   #dde6c2;
  --psy:      #b8472c;  --psy-bg:    #f3dccf;
  --ped:      #6b5e45;  --ped-bg:    #e4dcc8;

  /* === 7 toxidromes (couleurs sémantiques pour le tableau pivot) === */
  --tox-morph: #6b5e45;  --tox-morph-bg: #e4dcc8;
  --tox-myor:  #4e6a2f;  --tox-myor-bg:  #dde6c2;
  --tox-anti:  #b8472c;  --tox-anti-bg:  #f3dccf;
  --tox-adre:  #c27a2c;  --tox-adre-bg:  #f1e0c4;
  --tox-sero:  #a52a1a;  --tox-sero-bg:  #f3dccf;
  --tox-nico:  #2f5e6b;  --tox-nico-bg:  #cfdde0;
  --tox-musc:  #8a4a7f;  --tox-musc-bg:  #ead8e4;

  /* === 5 profils toxiques === */
  --prof-para:   #c27a2c;  --prof-para-bg:   #f1e0c4;
  --prof-co:     #b8472c;  --prof-co-bg:     #f3dccf;
  --prof-cardio: #8a4a7f;  --prof-cardio-bg: #ead8e4;
  --prof-psy:    #2f5e6b;  --prof-psy-bg:    #cfdde0;
  --prof-fum:    #a52a1a;  --prof-fum-bg:    #f3dccf;

  /* === Sémantique pupilles / TA / température dans le tableau === */
  --pup-myo:    #2f5e6b;
  --pup-myd:    #c27a2c;
  --ta-up:      #a52a1a;
  --ta-down:    #4e6a2f;
  --t-up:       #a52a1a;
  --t-down:     #2f5e6b;
}

/* Élargissement local de la zone de contenu (mindmap + tableau 7 colonnes) */
.content { max-width: 1500px; }

/* Fade léger au changement d'onglet */
@keyframes intox-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.content-panel.active { animation: intox-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); }

/* =========================================================
   Sous-titres de section (numéro · titre · règle · hint)
   ========================================================= */
.sec-title       { display: flex; align-items: baseline; gap: 16px; margin: 36px 0 18px; }
.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; }
.sec-title .hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

.sub-h           { font-family: var(--font-serif); font-weight: 500; font-size: 20px; margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); color: var(--ink); }

/* =========================================================
   Familles de couleur (mindmap + composants colorés)
   ========================================================= */
.fam-urg    { --fam: var(--urg);    --fam-bg: var(--urg-bg); }
.fam-toxi   { --fam: var(--toxi);   --fam-bg: var(--toxi-bg); }
.fam-toxq   { --fam: var(--toxq);   --fam-bg: var(--toxq-bg); }
.fam-decon  { --fam: var(--decon);  --fam-bg: var(--decon-bg); }
.fam-anti   { --fam: var(--anti);   --fam-bg: var(--anti-bg); }
.fam-psy    { --fam: var(--psy);    --fam-bg: var(--psy-bg); }
.fam-ped    { --fam: var(--ped);    --fam-bg: var(--ped-bg); }

/* Familles toxidromes */
.fam-morph  { --fam: var(--tox-morph); --fam-bg: var(--tox-morph-bg); }
.fam-myor   { --fam: var(--tox-myor);  --fam-bg: var(--tox-myor-bg); }
.fam-anti.tx{ --fam: var(--tox-anti);  --fam-bg: var(--tox-anti-bg); }
.fam-adre   { --fam: var(--tox-adre);  --fam-bg: var(--tox-adre-bg); }
.fam-sero   { --fam: var(--tox-sero);  --fam-bg: var(--tox-sero-bg); }
.fam-nico   { --fam: var(--tox-nico);  --fam-bg: var(--tox-nico-bg); }
.fam-musc   { --fam: var(--tox-musc);  --fam-bg: var(--tox-musc-bg); }

/* Familles profils */
.fam-para   { --fam: var(--prof-para);   --fam-bg: var(--prof-para-bg); }
.fam-co     { --fam: var(--prof-co);     --fam-bg: var(--prof-co-bg); }
.fam-cardio { --fam: var(--prof-cardio); --fam-bg: var(--prof-cardio-bg); }
.fam-psy.profil-card { --fam: var(--prof-psy);  --fam-bg: var(--prof-psy-bg); }
.fam-fum    { --fam: var(--prof-fum);    --fam-bg: var(--prof-fum-bg); }

/* Sémantique cellules toxidromes */
.pup-myo  { color: var(--pup-myo); }
.pup-myd  { color: var(--pup-myd); }
.ta-up    { color: var(--ta-up); }
.ta-down  { color: var(--ta-down); }
.t-up     { color: var(--t-up); }
.t-down   { color: var(--t-down); }
.trap-flag {
  display: inline-block; margin-top: 4px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em;
  background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 2px;
}

.swatch {
  width: 12px; height: 12px; border-radius: 2px; flex: 0 0 auto;
  background: var(--fam, var(--ink));
  display: inline-block; vertical-align: middle;
}

/* =========================================================
   Mindmap radiale (template repris du 332/194)
   ========================================================= */
.mmwrap {
  position: relative; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden; height: 860px;
}
.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.child  { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 4; opacity: .75; }
.mmwrap svg.canvas path.link.sat    { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 1 5; opacity: .5; }
.mmwrap svg.canvas path.link.active { stroke: var(--ink); stroke-dasharray: none; stroke-width: 1.8; opacity: 1; }
.mmwrap svg.canvas .ring         { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 5; }
.mmwrap svg.canvas .node-kid                 { cursor: pointer; }
.mmwrap svg.canvas .node-kid:hover .kid-bg   { stroke: var(--fam, var(--ink)); stroke-width: 1.5; }
.mmwrap svg.canvas .kid-bg                   { fill: var(--paper); stroke: var(--rule-2); stroke-width: 1; }
.mmwrap svg.canvas .kid-accent               { fill: var(--fam, var(--ink)); }
.mmwrap svg.canvas .kid-title                { fill: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 13px; }
.mmwrap svg.canvas .kid-sub                  { fill: var(--ink-2); font-size: 10px; font-family: var(--font-mono); letter-spacing: .02em; }
.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,
.mmwrap svg.canvas .node-sat:hover .sat-icon { fill: var(--paper); }
.mmwrap svg.canvas .sat-bg                   { fill: var(--bg-2); stroke: var(--ink); stroke-width: 1; transition: fill .15s ease; }
.mmwrap svg.canvas .sat-title                { fill: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 13.5px; transition: fill .15s ease; }
.mmwrap svg.canvas .sat-sub                  { fill: var(--ink-2); font-size: 9.5px; font-family: var(--font-mono); letter-spacing: .04em; transition: fill .15s ease; }
.mmwrap svg.canvas .sat-icon                 { fill: var(--ink-2); font-family: var(--font-serif); font-size: 14px; transition: fill .15s ease; }

/* Drawer de détail */
.mmdetail {
  position: absolute; top: 14px; left: 14px; z-index: 9;
  width: 360px; max-height: calc(100% - 28px);
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px;
  overflow: auto; box-shadow: var(--shadow-m);
  transform: translateX(-380px); transition: transform .3s cubic-bezier(.2,.7,.2,1);
  padding: 16px 18px;
}
.mmdetail.open       { transform: translateX(0); }
.mmdetail .close     { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: none; background: none; font-size: 18px; color: var(--ink-3); cursor: pointer; }
.mmdetail .close:hover { color: var(--ink); }
.mmdetail .famtag    { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mmdetail .famtag .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fam, var(--ink)); }
.mmdetail h3         { font-family: var(--font-serif); font-weight: 500; font-size: 24px; letter-spacing: -.005em; margin: 6px 0 10px; }
.mmdetail h4         { font-family: var(--font-serif); font-weight: 500; font-size: 14px; margin: 14px 0 6px; color: var(--ink); }
.mmdetail .kv        { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; font-size: 12.5px; margin: 8px 0; }
.mmdetail .kv .k     { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.mmdetail .kv .v     { color: var(--ink-2); }
.mmdetail ul         { margin: 6px 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.mmdetail ul li      { margin: 3px 0; }
.mmdetail .pill      { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; padding: 2px 7px; border: 1px solid var(--rule-2); border-radius: 2px; margin-right: 4px; margin-bottom: 4px; }
.mmdetail .pill.ok   { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 40%, var(--rule-2)); }
.mmdetail .pill.warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 40%, var(--rule-2)); }

/* =========================================================
   Vignette + Keypoints + Définitions (onglet 03)
   ========================================================= */
.vignette-card {
  background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--urg);
  border-radius: 4px; padding: 22px 26px; line-height: 1.55; font-size: 14px;
}
.vignette-card p { margin: 0 0 10px; }
.vignette-card p:last-child { margin-bottom: 0; }
.vignette-trap {
  margin-top: 14px; background: #f3dccf; border: 1px solid var(--danger);
  border-radius: 4px; padding: 14px 18px; font-size: 13px; color: var(--ink);
  line-height: 1.55;
}

.keypoints-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px;
}
.keypoint {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--urg);
  border-radius: 3px; padding: 14px 16px; position: relative;
}
.keypoint .kn {
  position: absolute; top: -10px; left: 14px; background: var(--ink); color: var(--paper);
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
}
.keypoint h5 { font-family: var(--font-serif); font-weight: 500; font-size: 16px; margin: 6px 0 6px; }
.keypoint p  { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }

.def-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px;
}
.def-card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px;
}
.def-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.def-card p  { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* =========================================================
   Drapeaux rouges + ABCDE (onglet 04)
   ========================================================= */
.abcde-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 14px 0 24px;
}
.abcde-step {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 14px 16px; position: relative; padding-left: 56px;
}
.abcde-step .ab-letter {
  position: absolute; top: 12px; left: 12px; width: 36px; height: 36px;
  background: var(--urg); color: #fff; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-family: var(--font-serif);
  font-weight: 600; font-size: 18px;
}
.abcde-step h5 { font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.abcde-step ul { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.abcde-step li { margin: 3px 0; line-height: 1.4; }
.abcde-step p  { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }

.echelles-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
.echelle-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 14px 16px; }
.echelle-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 15px; margin: 0 0 8px; }
.echelle-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.echelle-tbl th { text-align: left; padding: 6px 10px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); border-bottom: 1px solid var(--rule); width: 70px; }
.echelle-tbl td { padding: 6px 10px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }

/* =========================================================
   Encadrés d'information / d'alerte
   ========================================================= */
.info-block {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.55;
  margin: 14px 0;
}
.info-block b { color: var(--ink); }
.info-block ul, .info-block ol { margin: 6px 0; padding-left: 20px; }
.info-block li { margin: 3px 0; }
.info-warn { background: #f1e0c4; border-color: var(--warn); }
.info-warn b { color: var(--warn); }

.alert-red {
  background: #f3dccf; border: 1px solid var(--danger); border-left: 4px solid var(--danger);
  border-radius: 3px; padding: 14px 18px; margin: 18px 0;
}
.alert-red .ar-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--danger); text-transform: uppercase; font-weight: 600; margin-bottom: 8px;
}
.alert-red p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.55; }
.alert-red ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink); }
.alert-red li { margin: 4px 0; line-height: 1.45; }
.alert-red .ar-foot { margin-top: 10px; font-size: 12px; color: var(--ink-2); font-style: italic; }

/* =========================================================
   Épidémiologie (onglet 05)
   ========================================================= */
.stats-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0 24px;
}
.stat-card {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--urg);
  border-radius: 3px; padding: 16px;
}
.stat-num {
  font-family: var(--font-serif); font-weight: 600; font-size: 26px;
  color: var(--urg); line-height: 1; letter-spacing: -.02em;
}
.stat-lbl { font-family: var(--font-serif); font-size: 14px; margin-top: 6px; color: var(--ink); font-weight: 500; }
.stat-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }

.med-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.med-row {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 10px 14px; display: grid; grid-template-columns: 30px 200px 1fr; gap: 14px;
  align-items: center;
}
.med-n {
  background: var(--ink); color: var(--paper); width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
}
.med-row b { font-family: var(--font-serif); font-weight: 500; font-size: 14px; color: var(--ink); }
.med-row p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }

.circ-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.circ-card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px;
}
.circ-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14px; margin: 0 0 4px; color: var(--ink); }
.circ-card p  { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }

/* =========================================================
   Hstack (composant horizontal réutilisable, déjà patron 332)
   ========================================================= */
.hstack {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 14px 0;
}
.hbox {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; display: grid; grid-template-columns: 1fr; gap: 6px;
  position: relative;
}
.hbox .n {
  position: absolute; top: -10px; left: 14px; background: var(--paper);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-3); text-transform: uppercase; padding: 0 8px;
}
.hbox h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14.5px; margin: 4px 0 4px; color: var(--ink); }
.hbox p  { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.hbox ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.hbox li { margin: 3px 0; line-height: 1.4; }

/* =========================================================
   Tableau matrix (utilisé dans plusieurs onglets)
   ========================================================= */
table.matrix {
  width: 100%; border-collapse: collapse; background: var(--paper);
  border: 1px solid var(--rule); margin: 12px 0;
}
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; color: var(--ink-2);
}
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: 14px;
  color: var(--ink); border-right: 1px solid var(--rule); width: 28%;
}
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.matrix-tight th,
table.matrix.matrix-tight td { padding: 9px 11px; font-size: 12px; }

/* =========================================================
   TOXIDROMES — Tableau pivot 7×9 (onglet 07)
   ========================================================= */
.tox-comp-wrap { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.tox-comp-scroll { overflow-x: auto; max-width: 100%; }
.tox-comp { min-width: 1200px; }
.tox-head { display: grid; grid-template-columns: 180px repeat(7, minmax(120px, 1fr)); border-bottom: 1px solid var(--rule); background: var(--bg-2); }
.tox-ch {
  padding: 12px 12px; font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  border-right: 1px solid var(--rule);
}
.tox-ch:last-child { border-right: 0; }
.tox-ch .cname {
  font-family: var(--font-serif); font-size: 14px; letter-spacing: -.005em;
  color: var(--ink); font-weight: 500; text-transform: none; margin-top: 4px;
  display: flex; align-items: center; gap: 6px; line-height: 1.2;
}
.tox-ch .swatch { width: 10px; height: 10px; }
.tox-ch.tox-mech { background: var(--ink); color: var(--paper); }
.tox-ch.tox-mech .cname { color: var(--paper); }

/* En-tête colonnes : couleur de fond légère */
.tox-ch.fam-morph { background: color-mix(in oklab, var(--tox-morph) 12%, var(--bg-2)); }
.tox-ch.fam-myor  { background: color-mix(in oklab, var(--tox-myor) 12%, var(--bg-2)); }
.tox-ch.fam-anti  { background: color-mix(in oklab, var(--tox-anti) 12%, var(--bg-2)); }
.tox-ch.fam-adre  { background: color-mix(in oklab, var(--tox-adre) 12%, var(--bg-2)); }
.tox-ch.fam-sero  { background: color-mix(in oklab, var(--tox-sero) 12%, var(--bg-2)); }
.tox-ch.fam-nico  { background: color-mix(in oklab, var(--tox-nico) 12%, var(--bg-2)); }
.tox-ch.fam-musc  { background: color-mix(in oklab, var(--tox-musc) 12%, var(--bg-2)); }

.tox-row { display: grid; grid-template-columns: 180px repeat(7, minmax(120px, 1fr)); border-bottom: 1px solid var(--rule); }
.tox-row:last-child { border-bottom: 0; }
.tox-row:nth-child(odd) .tox-cell { background: var(--paper-2); }
.tox-row .tox-rh {
  padding: 11px 13px; font-family: var(--font-serif); font-size: 13.5px;
  color: var(--ink); border-right: 1px solid var(--rule); background: var(--bg-2);
  font-weight: 500;
}
.tox-row .tox-rh .sub {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  color: var(--ink-3); display: block; margin-top: 2px; text-transform: uppercase;
}
.tox-row .tox-cell {
  padding: 10px 12px; font-size: 11.5px; color: var(--ink-2);
  border-right: 1px solid var(--rule); line-height: 1.4;
}
.tox-row .tox-cell:last-child { border-right: 0; }
.tox-row .tox-cell b { color: var(--ink); font-weight: 600; }
.tox-row .tox-cell .pup-myo { color: var(--pup-myo); }
.tox-row .tox-cell .pup-myd { color: var(--pup-myd); }
.tox-row .tox-cell .ta-up   { color: var(--ta-up); }
.tox-row .tox-cell .ta-down { color: var(--ta-down); }
.tox-row .tox-cell .t-up    { color: var(--t-up); }
.tox-row .tox-cell .t-down  { color: var(--t-down); }

.tox-toxiques {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin-top: 12px;
}
.toxiq-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--fam, var(--ink));
  border-radius: 3px; padding: 12px 14px;
}
.toxiq-card h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14px; margin: 0 0 4px; color: var(--fam, var(--ink)); }
.toxiq-card p  { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }

/* =========================================================
   ESM (onglet 08) — Schémas SVG inline
   ========================================================= */
.schema-block {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 14px 16px; margin: 14px 0;
}
.schema-block h5 {
  font-family: var(--font-serif); font-weight: 500; font-size: 15px;
  margin: 0 0 10px; color: var(--ink);
}
.schema-block svg.schema-svg {
  width: 100%; height: auto; max-height: 420px; display: block;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
}
.schema-block p.muted {
  margin-top: 8px; font-size: 11px; color: var(--ink-3);
  font-family: var(--font-mono); letter-spacing: .04em;
}
.schemas-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px;
}
@media (min-width: 1100px) {
  .schemas-grid { grid-template-columns: repeat(2, 1fr); }
}

.cat-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.cat-step {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; padding-left: 56px; position: relative;
}
.cat-step .cat-n {
  position: absolute; top: 12px; left: 12px; width: 32px; height: 32px;
  background: var(--ink); color: var(--paper); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px;
}
.cat-step h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14px; margin: 0 0 4px; color: var(--ink); }
.cat-step p  { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }

/* =========================================================
   Décontamination (onglet 11) — Frise temporelle + mnémo
   ========================================================= */
.mnemo-block {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--anti); border-radius: 3px;
  padding: 14px 16px; margin: 14px 0;
}
.mnemo-block .mnemo-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--anti); text-transform: uppercase;
}
.mnemo-block h5 {
  font-family: var(--font-serif); font-weight: 600; font-size: 18px;
  margin: 6px 0 12px; color: var(--ink);
}
.mnemo-block .letters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
}
.mnemo-block .lt {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.mnemo-block .lt .l {
  font-family: var(--font-serif); font-weight: 600; font-size: 22px;
  color: var(--anti); width: 32px; text-align: center; flex: 0 0 auto;
}
.mnemo-block .lt .t { font-size: 12px; color: var(--ink-2); line-height: 1.4; }

.frise-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; margin: 14px 0;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: 14px;
}
.frise-step {
  border-radius: 3px; padding: 10px 12px; text-align: center;
  border: 1px solid var(--rule); background: var(--paper-2);
}
.frise-step .frise-t {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; font-weight: 600;
}
.frise-step .frise-l { font-size: 11px; color: var(--ink-2); line-height: 1.4; }
.frise-urg    { background: #f3dccf; border-color: var(--danger); }
.frise-urg .frise-t { color: var(--danger); }
.frise-optim  { background: #dde6c2; border-color: var(--ok); }
.frise-optim .frise-t { color: var(--ok); }
.frise-accept { background: #f1e0c4; border-color: var(--warn); }
.frise-accept .frise-t { color: var(--warn); }
.frise-late   { background: var(--bg-2); }

/* =========================================================
   ANTIDOTES — Cartes (onglet 12)
   ========================================================= */
.anti-legend {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--ink-2); margin-bottom: 14px;
}
.rang-chip {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; padding: 2px 7px; border-radius: 2px; letter-spacing: .08em;
}
.rang-chip.rang-A { background: var(--danger); color: #fff; }
.rang-chip.rang-B { background: var(--warn); color: #fff; }

.anti-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.anti-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.anti-card.rang-A { border-left: 4px solid var(--danger); background: #fff; }
.anti-card.rang-B { border-left: 3px solid var(--warn); }
.anti-head { display: flex; align-items: center; justify-content: space-between; }
.anti-stars { font-size: 14px; letter-spacing: -1px; }
.anti-card h4 {
  font-family: var(--font-serif); font-weight: 600; font-size: 18px;
  margin: 0; color: var(--ink); letter-spacing: -.005em;
}
.anti-cible {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--danger); text-transform: uppercase; font-weight: 600;
}
.anti-cible b { color: var(--danger); }
.anti-section { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.anti-section h5 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ink-3); text-transform: uppercase; margin: 0 0 4px; font-weight: 500;
}
.anti-section p { margin: 0; }
.anti-section.anti-ci { background: #f3dccf; padding: 8px 10px; border-radius: 3px; }
.anti-section.anti-ci h5 { color: var(--danger); }
.anti-section.anti-ci p  { color: var(--ink); }

.trap-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.trap {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--danger);
  border-radius: 3px; padding: 12px 14px;
}
.trap .tn {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  color: var(--danger); text-transform: uppercase; margin-bottom: 4px; font-weight: 600;
}
.trap h5 { font-family: var(--font-serif); font-weight: 500; font-size: 14.5px; margin: 0 0 4px; }
.trap p  { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.trap p b { color: var(--ink); }

.trap-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0;
}

/* =========================================================
   PROFILS DES 5 TOXIQUES (onglet 13) — PIVOT 3
   ========================================================= */
.profil-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 5px solid var(--fam, var(--ink));
  border-radius: 4px; padding: 18px 22px; margin-bottom: 22px;
}
.profil-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.profil-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--fam, var(--ink)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 600; font-size: 22px;
  flex: 0 0 auto;
}
.profil-head h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 24px;
  margin: 0; letter-spacing: -.005em; color: var(--ink);
}
.profil-type {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ink-3); text-transform: uppercase; margin-top: 4px;
}
.profil-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
@media (min-width: 1000px) {
  .profil-grid { grid-template-columns: repeat(2, 1fr); }
  .profil-grid .profil-manif,
  .profil-grid .profil-sub,
  .profil-grid .profil-image { grid-column: 1 / -1; }
}
.profil-section {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px;
}
.profil-section h5 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--fam, var(--ink-3));
  margin: 0 0 8px; font-weight: 600;
}
.profil-section ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.profil-section li { margin: 4px 0; line-height: 1.45; }
.profil-section.profil-tt { background: #dde6c2; border-color: var(--ok); }
.profil-section.profil-tt h5 { color: var(--ok); }
.profil-section.profil-pieges { background: #f3dccf; border-color: var(--danger); border-left: 3px solid var(--danger); }
.profil-section.profil-pieges h5 { color: var(--danger); }

.manif-list { display: flex; flex-direction: column; gap: 6px; }
.manif-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--rule); font-size: 12.5px;
}
.manif-row:last-child { border-bottom: 0; }
.manif-row b { color: var(--fam, var(--ink)); font-family: var(--font-serif); font-size: 13px; }
.manif-row span { color: var(--ink-2); line-height: 1.45; }

.sub-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
@media (min-width: 800px) {
  .sub-grid { grid-template-columns: repeat(2, 1fr); }
}
.sub-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; border-left: 3px solid var(--fam, var(--ink));
}
.sub-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sub-head .sub-n {
  background: var(--ink); color: var(--paper); width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; flex: 0 0 auto;
}
.sub-head h6 {
  font-family: var(--font-serif); font-weight: 500; font-size: 14.5px;
  margin: 0; color: var(--ink);
}
.sub-card ul { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); }
.sub-card li { margin: 3px 0; line-height: 1.45; }

.profil-image figure { margin: 0; }
.profil-image img {
  max-width: 360px; width: 100%; height: auto; display: block;
  border: 1px solid var(--rule); border-radius: 3px; margin-bottom: 8px;
}
.profil-image figcaption {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.45;
  font-family: var(--font-mono); letter-spacing: .03em;
}

/* =========================================================
   Pédiatrie / NRBC (onglets 14, 15)
   ========================================================= */
/* Réutilise hstack + info-block + alert-red */

/* =========================================================
   Items transversaux EDN (onglet 17)
   ========================================================= */
.items-lies-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px; margin: 14px 0;
}
.item-lie {
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--ink); border-radius: 3px; padding: 12px 14px;
}
.item-lie .il-num {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; letter-spacing: .12em; padding: 2px 7px;
  background: var(--ink); color: var(--paper); border-radius: 2px;
  text-transform: uppercase; margin-bottom: 6px;
}
.item-lie .il-titre {
  font-family: var(--font-serif); font-weight: 500; font-size: 14.5px;
  color: var(--ink); margin: 4px 0 6px;
}
.item-lie .il-lien {
  font-size: 12px; color: var(--ink-2); line-height: 1.45;
}

/* Liens externes dans les sources */
.profil-section a, .info-block a, ul a {
  color: var(--urg); text-decoration: underline;
}
.profil-section a:hover, .info-block a:hover, ul a:hover {
  color: var(--danger);
}

/* =========================================================
   Sources & légende
   ========================================================= */
.muted.mono {
  font-size: 11px; color: var(--ink-3); margin-top: 16px;
  letter-spacing: .04em;
}
