/* ==========================================================================
   Item 64 · Trouble bipolaire — styles spécifiques
   Charge après styles.css + components.css + item-63.css (réutilisé pour les
   composants psy partagés : sec-title, lane, hbox, etiogrid, matrix,
   mmwrap, alert-clinical, dt-svg, record-banner, dsm-card, piège-card...).
   Ne définit que les composants propres au 64 :
   • grille 4 axes arguments bipolarité (depbip-grid)
   • table TB I vs TB II (matrix-tbtb)
   • grille spécifications (cards-3col)
   • encart riche LITHIUM (lithium-wrap)
   • arbre thérapeutique 3 colonnes (th-svg)
   • bloc pronostic split (pronostic-grid)
   • bloc 3 réflexes EDN (reflexes-wrap)
   ========================================================================== */

/* Confort de lecture · panneau plus large pour le contenu dense */
.content { max-width: 1400px; }

/* ============================================================
   Cards triple colonne (utilisé pour comportements induits + spécifications)
   ============================================================ */
.ci-grid.cards-3col {
  grid-template-columns: repeat(3, 1fr);
}

/* Spécifications · numérotation visible */
.specif-card .specif-n {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--col, var(--ink));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 12px; font-weight: 500;
  text-align: center; line-height: 22px;
  margin-right: 6px;
}

/* ============================================================
   Onglet 08 · Grille des 4 axes d'arguments bipolarité
   ============================================================ */
.depbip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 14px 0;
}
.depbip-axis {
  background: var(--paper, #fffcf5);
  border: 1px solid var(--rule, #d7ccb4);
  border-left: 5px solid var(--fam-psy);
  border-radius: 6px;
  padding: 18px 20px;
}
.depbip-axis .da-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.depbip-axis .da-icon {
  font-size: 36px;
  line-height: 1;
  text-align: center;
  background: var(--bg-2, #ece5d6);
  border-radius: 50%;
  width: 60px; height: 60px;
  display: grid; place-items: center;
}
.depbip-axis .da-n {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fam-psy);
  font-weight: 600;
  margin-bottom: 4px;
}
.depbip-axis h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.005em;
  margin: 0;
  color: var(--fam-psy);
  line-height: 1.1;
}
.depbip-axis .da-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2, #524a3e);
  margin-top: 2px;
}
.depbip-axis ul {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink-2, #524a3e);
  line-height: 1.55;
}
.depbip-axis ul li {
  margin: 5px 0;
}
.depbip-axis ul li b {
  color: var(--ink, #1a1713);
  font-weight: 600;
}

/* ============================================================
   Onglet 11 · Table TB I vs TB II
   ============================================================ */
table.matrix-tbtb tbody tr.tbtb-alert th {
  background: #fbeee8;
  color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger);
  padding-left: 18px;
}
table.matrix-tbtb tbody tr.tbtb-alert td {
  background: #fbeee8;
  font-weight: 500;
}
table.matrix-tbtb tbody tr.tbtb-alert td.tdp-schizo {
  border-left: 3px solid var(--danger);
}
table.matrix-tbtb tbody tr.tbtb-alert td.tdp-tdp {
  border-left: 3px solid var(--danger);
}

/* ============================================================
   Onglet 15 · ENCART RICHE LITHIUM
   ============================================================ */
.lithium-wrap {
  background: linear-gradient(135deg, #f9f5ee 0%, #efe4eb 100%);
  border: 2px solid var(--fam-psy);
  border-radius: 8px;
  padding: 24px 26px;
  margin: 18px 0;
  box-shadow: 0 4px 16px -8px rgba(110, 63, 102, .25);
}
.lithium-head {
  border-bottom: 1px dashed var(--fam-psy);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.lithium-head h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--fam-psy);
  margin: 0 0 6px;
  line-height: 1.1;
}
.lithium-head p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2, #524a3e);
  margin: 0;
}
.lithium-head p b {
  font-style: normal;
  font-weight: 600;
  color: var(--ink, #1a1713);
}

.lithium-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.lithium-bloc {
  background: #fff;
  border: 1px solid var(--rule, #d7ccb4);
  border-left: 4px solid var(--fam-psy);
  border-radius: 4px;
  padding: 14px 16px;
}
.lithium-bloc .lit-h {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 16px;
  color: var(--fam-psy);
  margin-bottom: 8px;
  line-height: 1.2;
}
.lithium-bloc ul {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--ink-2, #524a3e);
  line-height: 1.55;
}
.lithium-bloc ul li {
  margin: 4px 0;
}
.lithium-bloc ul li b {
  color: var(--ink, #1a1713);
  font-weight: 600;
}

/* CI absolues = bloc 6 · accent rouge */
.lithium-bloc:nth-child(6) {
  border-left-color: var(--danger, #a52a1a);
  background: #fbeee8;
}
.lithium-bloc:nth-child(6) .lit-h {
  color: var(--danger, #a52a1a);
}

/* Interactions · bloc 7 · accent orange */
.lithium-bloc:nth-child(7) {
  border-left-color: var(--orange, #c46a2c);
  background: #fdf2e3;
}
.lithium-bloc:nth-child(7) .lit-h {
  color: var(--orange, #c46a2c);
}

/* ============================================================
   Onglet 14 · Arbre thérapeutique SVG (3 colonnes)
   ============================================================ */
.th-svg .th-col-head rect {
  stroke: none;
}
.th-svg .th-col-head.th-danger rect { fill: var(--danger, #a52a1a); }
.th-svg .th-col-head.th-warn rect   { fill: var(--orange, #c46a2c); }
.th-svg .th-col-head.th-ok rect     { fill: var(--ok, #4e6a2f); }

.th-svg .th-h {
  fill: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.005em;
}
.th-svg .th-s {
  fill: rgba(255, 255, 255, .85);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.th-svg .th-fo-head {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: var(--font-sans);
  color: #fff;
}
.th-svg .th-fo-head-h {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.005em;
  color: #fff;
  margin-bottom: 4px;
}
.th-svg .th-fo-head-s {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: rgba(255, 255, 255, .85);
}

.th-svg .th-step .th-bg {
  fill: #fff;
  stroke: var(--rule, #d7ccb4);
  stroke-width: 1;
}
.th-svg .th-step.th-danger .th-accent { fill: var(--danger, #a52a1a); }
.th-svg .th-step.th-danger .th-bg     { fill: #fbeee8; }
.th-svg .th-step.th-warn .th-accent   { fill: var(--orange, #c46a2c); }
.th-svg .th-step.th-warn .th-bg       { fill: #fdf2e3; }
.th-svg .th-step.th-ok .th-accent     { fill: var(--ok, #4e6a2f); }
.th-svg .th-step.th-ok .th-bg         { fill: #f0f3e3; }

.th-svg .th-fo {
  font-family: var(--font-sans);
  color: var(--ink-2, #524a3e);
}
.th-svg .th-fo-n {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3, #8a8270);
  margin-bottom: 4px;
}
.th-svg .th-fo-h {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink, #1a1713);
  margin-bottom: 6px;
  line-height: 1.2;
}
.th-svg .th-fo-b {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2, #524a3e);
}
.th-svg .th-fo-b b {
  color: var(--ink, #1a1713);
  font-weight: 600;
}

.th-svg .th-alert rect {
  fill: #fbeee8;
  stroke: var(--danger, #a52a1a);
  stroke-width: 2;
}
.th-svg .th-alert-fo {
  font-family: var(--font-sans);
  color: var(--ink-2, #524a3e);
}
.th-svg .th-alert-h {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--danger, #a52a1a);
  margin-bottom: 4px;
}
.th-svg .th-alert-b {
  font-size: 12px;
  line-height: 1.45;
}
.th-svg .th-alert-b b {
  color: var(--ink, #1a1713);
  font-weight: 600;
}

/* ============================================================
   Onglet 16 · Pronostic split (bon vs mauvais)
   ============================================================ */
.pronostic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.pronostic-bloc {
  background: var(--paper, #fffcf5);
  border: 1px solid var(--rule, #d7ccb4);
  border-radius: 4px;
  padding: 16px 18px;
}
.pronostic-bloc.bloc-bon {
  border-left: 4px solid var(--ok, #4e6a2f);
  background: #f0f3e3;
}
.pronostic-bloc.bloc-mauvais {
  border-left: 4px solid var(--danger, #a52a1a);
  background: #fbeee8;
}
.pronostic-bloc h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: -.005em;
}
.pronostic-bloc.bloc-bon h4     { color: var(--ok, #4e6a2f); }
.pronostic-bloc.bloc-mauvais h4 { color: var(--danger, #a52a1a); }

.pronostic-bloc table.matrix-bon {
  background: transparent;
  border: none;
  width: 100%;
}
.pronostic-bloc table.matrix-bon tbody th,
.pronostic-bloc table.matrix-bon tbody td {
  border-bottom: 1px dashed var(--rule, #d7ccb4);
  padding: 8px 10px;
  font-size: 12.5px;
  background: transparent;
}
.pronostic-bloc table.matrix-bon tbody tr:last-child th,
.pronostic-bloc table.matrix-bon tbody tr:last-child td {
  border-bottom: none;
}
.pronostic-bloc.bloc-mauvais ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-2, #524a3e);
  line-height: 1.6;
}
.pronostic-bloc.bloc-mauvais ul li {
  margin: 5px 0;
}
.pronostic-bloc.bloc-mauvais ul li b {
  color: var(--ink, #1a1713);
  font-weight: 600;
}

/* ============================================================
   Onglet 16 · Bloc 3 réflexes EDN
   ============================================================ */
.reflexes-wrap {
  background: linear-gradient(135deg, #dde2c8 0%, #f0f3e3 100%);
  border: 2px solid var(--ok, #4e6a2f);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 14px 0;
}
.reflexes-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--ok, #4e6a2f);
  padding-bottom: 12px;
}
.reflexes-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ok, #4e6a2f);
  font-weight: 600;
}
.reflexes-head h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ok, #4e6a2f);
  margin: 0;
  line-height: 1.1;
}
.reflexes-list {
  margin: 0;
  padding-left: 24px;
  list-style: decimal;
  font-size: 14px;
  color: var(--ink, #1a1713);
  line-height: 1.6;
}
.reflexes-list li {
  margin: 8px 0;
  padding-left: 4px;
}
.reflexes-list li b {
  color: var(--ok, #4e6a2f);
  font-weight: 600;
}

/* ============================================================
   Onglet 12 · DD orga · accent record (toxique/iatrogène mis en avant)
   ============================================================ */
.fam-record h5 {
  color: var(--fam-record);
}
.fam-record {
  border-left-color: var(--fam-record) !important;
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 1100px) {
  .depbip-grid                { grid-template-columns: 1fr; }
  .ci-grid.cards-3col         { grid-template-columns: repeat(2, 1fr); }
  .lithium-grid               { grid-template-columns: 1fr; }
  .pronostic-grid             { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ci-grid.cards-3col         { grid-template-columns: 1fr; }
  .reflexes-head              { flex-direction: column; gap: 4px; align-items: flex-start; }
  .depbip-axis .da-head       { grid-template-columns: 50px 1fr; gap: 10px; }
  .depbip-axis .da-icon       { width: 46px; height: 46px; font-size: 26px; }
  .depbip-axis h4             { font-size: 18px; }
}
