/* ==========================================================================
   Item 186 · Hypersensibilités et allergies — palette --spe-pneumo (héritée 188)
   Architecture hybride : classification physiopath multi-entités
   ========================================================================== */

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

  /* Familles de l'item 186 (5 branches mindmap) */
  --fam-classif:  #6b5a3a;             /* terre ocre — physiopath structurelle */
  --fam-demarche: var(--ok);           /* vert — diagnostic */
  --fam-tests:    var(--info);         /* bleu — examens complémentaires */
  --fam-entites:  var(--spe-pneumo);   /* matière référente */
  --fam-pec:      var(--danger);       /* rouge brique — thérapeutique */
}

.content { max-width: 1400px; }

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

.muted  { color: var(--ink-3); }
.danger { color: var(--danger); }
.warn   { color: var(--warn); }
.ok     { color: var(--ok); }

/* ====================== Sec-title ====================== */
.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);
}
.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); }
.rang-tag.rang-aus { color: var(--spe-pneumo); border-color: color-mix(in oklab, var(--spe-pneumo) 40%, var(--rule-2)); font-weight: 600; }
.rang-tag.rang-urg { color: var(--danger); border-color: color-mix(in oklab, var(--danger) 40%, var(--rule-2)); font-weight: 600; }

/* ====================== Mindmap ====================== */
.mmwrap {
  position: relative; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden; height: 780px;
}
.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(--ink); }
.mmwrap svg.canvas .node-title   { fill: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 16px; }
.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 (5 branches) */
.mmwrap svg.canvas .node-card.fam-classif  .node-accent { fill: var(--fam-classif); }
.mmwrap svg.canvas .node-card.fam-demarche .node-accent { fill: var(--fam-demarche); }
.mmwrap svg.canvas .node-card.fam-tests    .node-accent { fill: var(--fam-tests); }
.mmwrap svg.canvas .node-card.fam-entites  .node-accent { fill: var(--fam-entites); }
.mmwrap svg.canvas .node-card.fam-pec      .node-accent { fill: var(--fam-pec); }
.mmwrap svg.canvas .node-card.fam-classif  .node-title  { fill: var(--fam-classif); font-weight: 600; }
.mmwrap svg.canvas .node-card.fam-demarche .node-title  { fill: var(--fam-demarche); font-weight: 600; }
.mmwrap svg.canvas .node-card.fam-tests    .node-title  { fill: var(--fam-tests); font-weight: 600; }
.mmwrap svg.canvas .node-card.fam-entites  .node-title  { fill: var(--fam-entites); font-weight: 600; }
.mmwrap svg.canvas .node-card.fam-pec      .node-title  { fill: var(--fam-pec); font-weight: 600; }

/* ====================== Vignette / Keypoints / Définitions ====================== */
.vignette {
  background: var(--paper-2); border: 1px solid var(--rule); border-left: 4px solid var(--spe-pneumo);
  padding: 22px 26px; border-radius: 4px; margin-bottom: 16px;
}
.vignette .vg-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--spe-pneumo); text-transform: uppercase; }
.vignette p { margin: 8px 0 14px; line-height: 1.6; }
.vignette .vg-trap {
  margin-top: 14px; padding: 14px 16px; background: var(--bg-2); border-radius: 3px;
  border-left: 3px solid var(--warn); font-size: 14px; line-height: 1.55;
}
.keypoints { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 26px 18px 56px; }
.keypoints ol { margin: 0; padding: 0; }
.keypoints li { margin: 10px 0; line-height: 1.55; }
.def-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.def-card {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--spe-pneumo);
  border-radius: 3px; padding: 16px 18px;
}
.def-card h3 { margin: 0 0 4px; font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink); }
.def-card .def-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; }
.def-card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

/* ====================== Schema wrap ====================== */
.schema-wrap {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px; margin: 16px 0; text-align: center;
}
.schema-svg { max-width: 100%; height: auto; }

/* ====================== Tables génériques ====================== */
.classif-block, .distinction-block, .alle-block, .demarche-block, .tests-block,
.physio-block, .respi-card, .pedia-block, .ita-block, .prev-block, .alim-epi, .hymeno-epi {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px 22px; margin: 14px 0;
}
.classif-block h4, .distinction-block h4, .alle-block h4, .demarche-block h4, .tests-block h4,
.physio-block h4, .pedia-block h4, .ita-block h4, .prev-block h4, .alim-epi h4, .hymeno-epi h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 19px; color: var(--ink);
  margin: 0 0 12px; border-bottom: 1px dashed var(--rule); padding-bottom: 6px;
}
.classif-table, .distinction-table, .organes-table, .enfaveur-table, .tropho-table,
.croisees-table, .tests-table, .evict-table, .ita-voies-table, .evol-table {
  width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45;
}
.classif-table thead, .distinction-table thead, .organes-table thead, .enfaveur-table thead,
.tropho-table thead, .croisees-table thead, .tests-table thead, .evict-table thead,
.ita-voies-table thead, .evol-table thead {
  background: var(--bg-2);
}
.classif-table th, .distinction-table th, .organes-table th, .enfaveur-table th,
.tropho-table th, .croisees-table th, .tests-table th, .evict-table th,
.ita-voies-table th, .evol-table th {
  text-align: left; padding: 8px 10px; border: 1px solid var(--rule);
  font-family: var(--font-sans); font-weight: 600; color: var(--ink);
}
.classif-table thead th, .distinction-table thead th, .organes-table thead th,
.enfaveur-table thead th, .tropho-table thead th, .croisees-table thead th,
.tests-table thead th, .evict-table thead th, .ita-voies-table thead th, .evol-table thead th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); background: var(--bg-3);
}
.classif-table td, .distinction-table td, .organes-table td, .enfaveur-table td,
.tropho-table td, .croisees-table td, .tests-table td, .evict-table td,
.ita-voies-table td, .evol-table td {
  padding: 8px 10px; border: 1px solid var(--rule); vertical-align: top;
}
.classif-table tbody tr:nth-child(even), .distinction-table tbody tr:nth-child(even),
.organes-table tbody tr:nth-child(even), .enfaveur-table tbody tr:nth-child(even),
.tropho-table tbody tr:nth-child(even), .croisees-table tbody tr:nth-child(even),
.tests-table tbody tr:nth-child(even), .evict-table tbody tr:nth-child(even),
.ita-voies-table tbody tr:nth-child(even), .evol-table tbody tr:nth-child(even) {
  background: var(--paper-2);
}

.tests-table-wrap { overflow-x: auto; }

/* ====================== Allergènes ====================== */
.alle-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px;
}
.alle-card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 16px;
}
.alle-card h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--spe-pneumo); margin: 0 0 8px;
}
.alle-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.alle-card li { margin: 4px 0; }
.histamino-block { border-left: 3px solid var(--warn); }

/* ====================== Démarche ====================== */
.demarche-block ul { padding-left: 22px; }
.demarche-block li { margin: 5px 0; line-height: 1.5; }

/* ====================== Tests cutanés / bio ====================== */
.tests-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0;
}
.tests-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 16px 18px;
}
.tests-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px; color: var(--ink);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule);
}
.tests-card ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.tests-card-danger { border-left: 3px solid var(--danger); background: #fdf6f3; }

/* ====================== Profils-cards (alim, hymeno, medic) ====================== */
.profils-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; margin: 14px 0;
}
.profil-card {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--spe-pneumo);
  border-radius: 3px; padding: 18px 22px;
}
.profil-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink);
  margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule);
}
.profil-line { margin: 6px 0; font-size: 13px; line-height: 1.5; }
.profil-line b {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); display: inline-block; margin-right: 8px;
}
.profil-line p { margin: 2px 0 0; color: var(--ink-2); display: inline; }
.profil-block { margin-top: 12px; padding: 10px 14px; background: var(--paper-2); border-radius: 3px; }
.profil-block h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--spe-pneumo); margin: 0 0 6px;
}
.profil-block ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }

/* ====================== Respi (renvoi 188) ====================== */
.respi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.respi-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule);
}
.respi-renvoi {
  background: var(--bg-2); border: 1px dashed var(--spe-pneumo); border-radius: 4px;
  padding: 16px 22px; margin: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.respi-renvoi p { margin: 0; flex: 1; font-size: 13.5px; }
.renvoi-btn {
  display: inline-block; padding: 10px 18px; background: var(--spe-pneumo); color: #fff;
  text-decoration: none; border-radius: 3px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .08em; white-space: nowrap;
}
.renvoi-btn:hover { background: color-mix(in oklab, var(--spe-pneumo) 80%, #000); }

/* ====================== Prévention + adré ====================== */
.prev-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0;
}
.prev-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 16px; }
.prev-card h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  margin: 0 0 8px;
}
.prev-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.prev-recos    { border-left: 3px solid var(--ok); }
.prev-recos h5 { color: var(--ok); }
.prev-aeviter  { border-left: 3px solid var(--warn); }
.prev-aeviter h5 { color: var(--warn); }
.prev-inutiles { border-left: 3px solid var(--danger); background: #fdf6f3; }
.prev-inutiles h5 { color: var(--danger); }

.prev-cmei { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; font-style: italic; }

.symp-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0;
}
.symp-card {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 16px;
}
.symp-card h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--spe-pneumo); margin: 0 0 8px;
}
.symp-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.45; }

.adre-block { border-left: 3px solid var(--danger); }
.adre-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0;
}
@media (max-width: 720px) { .adre-grid { grid-template-columns: 1fr; } }
.adre-card { padding: 14px 18px; border-radius: 3px; }
.adre-card h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.adre-abs { background: #fdf6f3; border: 1px solid var(--danger); }
.adre-abs h5 { color: var(--danger); }
.adre-rel { background: var(--paper-2); border: 1px solid var(--warn); }
.adre-rel h5 { color: var(--warn); }
.adre-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.adre-piege {
  margin: 12px 0 0; padding: 10px 14px; background: var(--bg-2); border-radius: 3px;
  font-size: 12.5px; color: var(--ink-2); border-left: 3px solid var(--warn);
}

/* ====================== ITA ====================== */
.ita-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.ita-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 22px; }
.ita-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule);
}
.ita-card ul { margin: 0; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
.ita-ci-block { border-left: 3px solid var(--warn); }
.ita-ci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
@media (max-width: 720px) { .ita-ci-grid { grid-template-columns: 1fr; } }
.ita-ci-card { padding: 14px 18px; border-radius: 3px; }
.ita-ci-card h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.ita-ci-abs { background: #fdf6f3; border: 1px solid var(--danger); }
.ita-ci-abs h5 { color: var(--danger); }
.ita-ci-rel { background: var(--paper-2); border: 1px solid var(--warn); }
.ita-ci-rel h5 { color: var(--warn); }
.ita-ci-card ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.ita-polysensib {
  margin: 14px 0 0; padding: 12px 16px; background: #fdf6f3; border: 1px solid var(--danger);
  border-radius: 3px; font-size: 13px; color: var(--ink); font-weight: 500;
}

/* ====================== Pédiatrie ====================== */
.pedia-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.pedia-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 22px; }
.pedia-card h4 {
  font-family: var(--font-serif); font-weight: 500; font-size: 18px; color: var(--ink);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule);
}
.pedia-card ul { margin: 0; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
.pedia-seipa { border-left: 3px solid var(--danger); background: #fdf6f3; }
.pedia-note { margin-top: 10px; padding: 8px 12px; background: var(--bg-2); border-radius: 3px; font-size: 12.5px; font-style: italic; }

/* ====================== Physiopath ====================== */
.physio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
@media (max-width: 720px) { .physio-grid { grid-template-columns: 1fr; } }
.physio-card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 14px 18px; }
.physio-card h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--spe-pneumo); margin: 0 0 8px; }
.physio-card ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.physio-chronicite { margin: 12px 0 0; font-size: 13px; padding: 8px 14px; background: var(--bg-2); border-radius: 3px; }

/* ====================== Alertes ====================== */
.alert {
  background: #f3dccf; border: 1px solid var(--danger); border-left: 4px solid var(--danger);
  border-radius: 3px; padding: 14px 18px; margin: 14px 0; display: flex; gap: 14px; align-items: flex-start;
}
.alert-icon { font-size: 22px; line-height: 1; }
.alert-body { flex: 1; }
.alert-title { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 600; font-size: 16px; color: var(--danger); }
.alert-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }

/* ====================== Intro ====================== */
.intro {
  font-size: 14px; line-height: 1.6; margin: 0 0 16px;
  padding: 12px 16px; background: var(--paper-2); border-left: 3px solid var(--spe-pneumo);
  border-radius: 3px;
}

/* ====================== Schema placeholder fallback ====================== */
.schema-placeholder {
  background: var(--bg-2); border: 1px dashed var(--rule-2); padding: 18px;
  font-size: 13px; color: var(--ink-3); font-style: italic; text-align: center; border-radius: 3px;
}
