.sante-tab { padding: 0; height: 100%; display: flex; flex-direction: column; }

.sante-toolbar {
  display: flex; gap: .7rem; align-items: center;
  padding: .55rem .9rem;
  min-height: 3.15rem;
  background: rgba(24, 24, 27, .22);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.sante-toolbar .sante-title {
  color: var(--p-base);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.sante-toolbar .sante-spacer { flex: 1; }
.sante-toolbar .sante-view-label {
  color: var(--p-light);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .15rem .55rem;
  border: 1px solid rgba(var(--p-base-rgb), .25);
  border-radius: 4px;
  background: rgba(var(--p-base-rgb), .08);
}
/* toolbar icon buttons — standard icon-action-btn (no override needed) */

/* ===== Layout : sidebar (sous-vues) + main (contenu) ===== */
.sante-layout {
  display: grid; grid-template-columns: 240px 1fr;
  flex: 1; min-height: 0;
  transition: grid-template-columns .2s;
}
.sante-layout.sidebar-hidden { grid-template-columns: 0 1fr; }
.sante-layout.sidebar-hidden #sante-sidebar { visibility: hidden; border-right: none; }

#sante-sidebar {
  background: rgba(20, 20, 23, .25);
  border-right: 1px solid rgba(255, 255, 255, .1);
  overflow-y: auto;
  min-height: 0;
}
#sante-tree { list-style: none; margin: 0; padding: .4rem 0; }
#sante-tree .sn-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .85rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s, border-color .12s, color .12s;
  font-size: .82rem;
  letter-spacing: .03em;
  font-weight: 500;
  color: #d4d4d8;
}
#sante-tree .sn-item:hover { background: rgba(var(--p-base-rgb), .07); }
#sante-tree .sn-item.active {
  background: rgba(var(--p-glow-rgb), .12);
  box-shadow: inset 2px 0 0 var(--p-base);
}
#sante-tree .sn-item.active .sn-label { color: var(--p-base); font-weight: 600; }
#sante-tree .sn-icon {
  flex-shrink: 0; opacity: .75;
  width: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--p-base);
}
#sante-tree .sn-item:hover .sn-icon { opacity: .95; }
#sante-tree .sn-item.active .sn-icon { opacity: 1; }
#sante-tree .sn-label { color: #e4e4e7; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#sante-main {
  display: flex; flex-direction: column;
  background: transparent;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
#sante-main .sidebar-handle {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 64px;
  background: rgba(39, 39, 42, .55);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: none; border-radius: 0 4px 4px 0;
  cursor: pointer; font-size: .82rem;
  display: flex; align-items: center; gap: .25rem;
  z-index: 5;
  transition: background .15s, color .15s;
}
#sante-main .sidebar-handle:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); }

#sante-content {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.sante-empty { color: #64748b; font-style: italic; text-align: center; padding: 2rem 0; }

/* ===== Card chrome .card-pri ===== */
.sante-card {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  border-top:    1px solid rgba(var(--card-rgb), .4);
  border-right:  1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left:   2px solid rgba(var(--card-rgb), .9);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb), .1) 0%, rgba(var(--card-rgb), .03) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
  padding: .9rem 1.1rem;
}
.sante-card.empty-card { padding: 1.5rem 1.6rem; }
.sante-card .sn-view-title {
  margin: 0 0 .4rem;
  color: var(--p-base);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}
.sante-card .sn-tag {
  display: inline-block;
  font-size: .72rem;
  color: #94a3b8;
  font-family: 'Menlo', 'Consolas', monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .25rem .65rem;
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 4px;
  margin: .2rem 0 .9rem;
}
.sante-card .sn-hint { font-size: .85rem; color: #cbd5e1; line-height: 1.55; margin: 0; }
.sante-card code { background: rgba(var(--p-base-rgb), .12); padding: 0 .3rem; border-radius: 3px; font-family: 'Menlo','Consolas',monospace; font-size: .8em; }

/* ===== Suivi : KPI grid ===== */
.suivi-toolbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .15rem .25rem .4rem;
}
.suivi-toolbar .suivi-info {
  font-size: .72rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .08em;
}
.kpi-grid {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.kpi-card {
  --card-rgb: var(--p-base-rgb);
  display: flex; flex-direction: column;
  padding: .75rem .9rem;
  gap: .25rem;
}
.kpi-card .kpi-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.kpi-card .kpi-label {
  font-size: .72rem; color: var(--p-light); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.kpi-card .kpi-age {
  font-size: .65rem; color: #64748b;
  font-family: 'Menlo','Consolas',monospace;
}
.kpi-card .kpi-value-row {
  display: flex; align-items: baseline; gap: .35rem;
  margin: .15rem 0 .1rem;
}
.kpi-card .kpi-value {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.5rem; font-weight: 700;
  color: #e4e4e7;
  line-height: 1.1;
}
.kpi-card .kpi-unit {
  font-size: .8rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
}
.kpi-card .kpi-spark-wrap {
  color: var(--p-base);
  margin: .15rem 0;
  height: 32px;
}
.kpi-card .kpi-spark-wrap svg { display: block; }
.kpi-card .kpi-foot {
  font-size: .65rem; color: #64748b;
  font-family: 'Menlo','Consolas',monospace;
  text-align: right;
}

/* Variantes couleur par type (override --card-rgb local et color sparkline) */
.kpi-card.kpi-weight   { --card-rgb: 168, 85, 247; }   /* violet */
.kpi-card.kpi-hr       { --card-rgb: 239, 68, 68; }    /* rouge FC */
.kpi-card.kpi-hrv      { --card-rgb: 16, 185, 129; }   /* vert HRV */
.kpi-card.kpi-spo2     { --card-rgb: 14, 165, 233; }   /* bleu SpO2 */
.kpi-card.kpi-sleep    { --card-rgb: 99, 102, 241; }   /* indigo */
.kpi-card.kpi-stress   { --card-rgb: 251, 146, 60; }   /* orange */
.kpi-card.kpi-bb       { --card-rgb: 234, 179, 8; }    /* jaune */
.kpi-card.kpi-steps    { --card-rgb: 6, 182, 212; }    /* cyan */
.kpi-card.kpi-cal      { --card-rgb: 244, 114, 182; }  /* rose */
.kpi-card.kpi-dist     { --card-rgb: 132, 204, 22; }   /* lime */
.kpi-card.kpi-weight  .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-hr      .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-hrv     .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-spo2    .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-sleep   .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-stress  .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-bb      .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-steps   .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-cal     .kpi-spark-wrap { color: rgb(var(--card-rgb)); }
.kpi-card.kpi-dist    .kpi-spark-wrap { color: rgb(var(--card-rgb)); }

/* ===== Action bar / forms ===== */
.sn-action-bar { display: flex; gap: .5rem; padding: 0 .25rem; }
.t-btn {
  background: rgba(39, 39, 42, .5); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 6px;
  padding: .35rem .8rem; font-size: .82rem; cursor: pointer;
}
.t-btn:hover:not(:disabled) { background: rgba(63, 63, 70, .65); border-color: rgba(var(--p-base-rgb), .3); }
.t-btn.primary {
  background: linear-gradient(135deg, rgba(var(--p-base-rgb), .85), rgba(var(--p-glow-rgb), .75));
  color: var(--p-text-on); border-color: rgba(var(--p-soft-rgb), .8); font-weight: 600;
}
.t-btn:disabled { opacity: .4; cursor: not-allowed; }

.form-card { background: rgba(24, 24, 27, .65) !important; }
.sante-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
  margin-top: .7rem;
}
.sante-form label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .76rem; color: var(--p-light);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.sante-form label.full { grid-column: 1 / -1; }
.sante-form input, .sante-form select, .sante-form textarea {
  background: rgba(20, 20, 23, .6); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px;
  padding: .35rem .55rem; font-size: .85rem;
  font-family: inherit;
}
.sante-form input:focus, .sante-form select:focus, .sante-form textarea:focus {
  outline: none; border-color: var(--p-base); background: rgba(20, 20, 23, .85);
}
.sante-form .form-actions {
  grid-column: 1 / -1;
  display: flex; gap: .5rem; justify-content: flex-end;
  margin-top: .35rem;
}

/* ===== Médicaments ===== */
.med-card { padding: .75rem .95rem; }
.med-card.inactive { opacity: .55; }
.med-head { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .3rem; }
.med-name { color: var(--p-base); font-weight: 600; font-size: .95rem; }
.med-dosage { color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; font-size: .82rem; }
.med-tag {
  font-size: .65rem; padding: .05rem .35rem;
  border: 1px solid rgba(148,163,184,.4); border-radius: 3px;
  color: #94a3b8; text-transform: uppercase; letter-spacing: .04em;
  margin-left: auto;
}
.med-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .25rem .8rem;
  font-size: .8rem; color: #d4d4d8;
  font-family: 'Menlo','Consolas',monospace;
}
.med-body .k { color: #64748b; }
.med-notes { margin-top: .5rem; padding-top: .4rem; border-top: 1px solid rgba(255,255,255,.06); font-size: .82rem; color: #cbd5e1; line-height: 1.4; }

/* ===== Carnet ===== */
.journal-entry { padding: .7rem .95rem; }
.je-head { display: flex; gap: .55rem; align-items: baseline; margin-bottom: .25rem; }
.je-date { color: var(--p-base); font-family: 'Menlo','Consolas',monospace; font-size: .8rem; font-weight: 600; }
.je-cat {
  font-size: .65rem; padding: .05rem .35rem;
  border: 1px solid rgba(var(--p-base-rgb),.3); border-radius: 3px;
  color: var(--p-light); text-transform: uppercase; letter-spacing: .04em;
  font-family: 'Menlo','Consolas',monospace;
}
.je-title { color: #e4e4e7; font-weight: 600; font-size: .9rem; margin-bottom: .15rem; }
.je-body { color: #cbd5e1; font-size: .85rem; line-height: 1.4; white-space: pre-wrap; }

/* ============================================================================
   Vue d'ensemble (overview), barre chrono, KPI mini, 3 colonnes
   ============================================================================ */

/* Header card avec stats */
.sante-header-card {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  border-top: 1px solid rgba(var(--card-rgb), .4);
  border-right: 1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left: 2px solid rgba(var(--card-rgb), .9);
  background: linear-gradient(135deg, rgba(var(--card-rgb), .12) 0%, rgba(24, 24, 27, .55) 100%);
  padding: 1rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.hc-title h2 {
  margin: 0; color: var(--p-base);
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: .02em;
}
.hc-period { color: #94a3b8; font-size: .78rem; margin-top: .2rem; font-family: 'Menlo','Consolas',monospace; }
.hc-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hc-stat { text-align: center; min-width: 80px; }
.hc-stat .hcs-label { display: block; font-size: .65rem; color: var(--p-light); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hc-stat .hcs-value { display: block; color: #e4e4e7; font-family: 'Menlo','Consolas',monospace; font-size: 1.05rem; font-weight: 700; margin-top: .15rem; }

/* Chrono bar : standalone version (fallback inline) */
.chrono-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .5rem .85rem;
  background: rgba(20, 20, 23, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
}
/* Quand mounté DANS .sante-toolbar : hérite du conteneur, wrap si filtres dépassent */
.sante-toolbar > .chrono-bar {
  padding: 0; background: transparent; border: 0; border-radius: 0;
  width: 100%; flex-wrap: wrap; gap: .55rem .7rem;
  min-height: 1.65rem;
}
.sante-toolbar > .chrono-bar .chrono-filters:empty { display: none; }
.chrono-periods { display: flex; gap: .25rem; flex-wrap: wrap; }
.period-btn {
  background: rgba(39, 39, 42, .45);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: .22rem .55rem;
  font-size: .82rem; font-family: 'Menlo','Consolas',monospace;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  line-height: 1.2;
}
.period-btn:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); border-color: rgba(var(--p-base-rgb), .35); }
.period-btn.active {
  background: rgba(var(--p-base-rgb), .25);
  color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .55);
  font-weight: 700;
}
.chrono-filters {
  display: flex; align-items: center; gap: .25rem;
  margin-left: auto;
}
.chrono-filters .imag-type-btn {
  padding: .15rem .4rem;
  font-size: .6rem;
}
.chrono-dates { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.chrono-lbl { font-size: .7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; font-family: 'Menlo','Consolas',monospace; }
.chrono-input {
  background: rgba(39, 39, 42, .45); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px;
  padding: .22rem .45rem; font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  line-height: 1.2;
}
.chrono-filters { margin-left: auto; display: flex; align-items: center; gap: .5rem; padding-right: .15rem; }
#chrono-filters-interventions { margin-left: auto; margin-right: 1.5rem; }
#chrono-filters-journal { margin-left: auto; margin-right: 1.5rem; gap: .8rem; }
#chrono-filters-historique { margin-left: auto; margin-right: .4rem; }
.interv-analyze-btn-lit {
  opacity: 1 !important;
  color: var(--p-base) !important;
  font-size: .78rem;
  gap: .3rem;
  text-shadow: 0 0 8px rgba(var(--p-base-rgb), .4);
}
.chrono-filters label { font-size: .82rem; color: #d4d4d8; display: flex; align-items: center; gap: .3rem; }

/* Boutons filtres Médical (spécialités, zones) — palette --p-base */
.med-filter-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .22rem .6rem;
  background: rgba(var(--p-base-rgb), .12);
  color: var(--p-base);
  border: 1px solid rgba(var(--p-base-rgb), .35);
  border-radius: 6px;
  font-size: .82rem;
  line-height: 1.2;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.med-filter-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .22);
  border-color: rgba(var(--p-base-rgb), .6);
  color: var(--p-glow);
  box-shadow: 0 0 12px rgba(var(--p-glow-rgb), .25);
}
.med-filter-btn:disabled { opacity: .35; cursor: not-allowed; }
.med-filter-btn .med-filter-count {
  background: rgba(var(--p-base-rgb), .55);
  color: var(--p-text-on);
  padding: .05rem .4rem;
  border-radius: 9px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
}
.med-filter-btn .med-filter-all {
  color: rgba(var(--p-base-rgb), .65);
  font-size: .78rem;
}
.med-filter-btn .med-filter-chev {
  color: rgba(var(--p-base-rgb), .55);
  font-size: .7rem;
  margin-left: .1rem;
}

/* Popover commun (spec + zone) */
#med-filter-popover .med-pop-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .3rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .15);
}
#med-filter-popover .med-pop-action {
  background: rgba(var(--p-base-rgb), .12);
  border: 1px solid rgba(var(--p-base-rgb), .3);
  color: var(--p-base);
  border-radius: 4px;
  padding: .18rem .55rem;
  font-size: .72rem;
  cursor: pointer;
  transition: background .12s;
}
#med-filter-popover .med-pop-action:hover {
  background: rgba(var(--p-base-rgb), .22);
  color: var(--p-glow);
}
#med-filter-popover .med-pop-group {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
  font-weight: 600;
}
#med-filter-popover .med-pop-group-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
#med-filter-popover .med-pop-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .18rem .25rem;
  cursor: pointer;
  font-size: .78rem;
  color: #d4d4d8;
  border-radius: 3px;
  transition: background .1s;
}
#med-filter-popover .med-pop-item:hover { background: rgba(255, 255, 255, .04); }
#med-filter-popover .med-pop-count {
  color: #64748b;
  margin-left: auto;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .7rem;
}

/* === En-têtes Médical — fond uniforme uni, sans effet ni cadre ===
   Background plat couleur principale transparente, pas de gradient, pas de blur,
   pas de box-shadow, pas de border-radius. Hauteur alignée via grid row stretch. */
.med-section-head {
  padding: .6rem .8rem;
  flex-shrink: 0;
  background: rgba(var(--p-base-rgb), .06);
  /* Saturate amplifie les couleurs de fond traversantes (gradients body) */
  backdrop-filter: saturate(140%);
  -webkit-backdrop-filter: saturate(140%);
  /* flex column pour permettre titre haut + bandeau bas (header timeline) */
  display: flex;
  flex-direction: column;
}
/* Pousse le bandeau mensuel intégré tout en bas du header (même hauteur que viewer head) */
.med-section-head-spacer { flex: 1; }

/* Bandeau mensuel courant — intégré en bas de l'entête timeline.
   Mis à jour dynamiquement via scroll listener (le mois du 1er groupe visible). */
.med-tl-month-banner {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .7rem;
  color: var(--p-base);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  padding: .35rem .8rem;
  margin: .5rem -.8rem -.6rem -.8rem;   /* étend jusqu'aux bords du header (compense padding parent) */
  /* PAS de background ni backdrop-filter ici : le parent .med-section-head gère
     tout l'effet (rgba .06 + saturate 140%). Si on les redéfinit, ils se
     superposent et créent une teinte différente. Le bandeau hérite simplement
     visuellement du header parent — header et bandeau ne font alors qu'un. */
}
.med-section-title {
  color: var(--p-base);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* === Cards timeline Médical — REPRODUIT PIXEL-PERFECT le pattern .kpi-score-card ===
   Vincent 2026-05-01 : computed depuis Chrome DevTools sur kpi cards dashboard.
   Pattern :
   - Default : border-width 1px 1px 1px 2px solid rgba(card,.4 .4 .4 .85)
   - box-shadow EXACT : inset glow gauche + highlight haut + ombre externe
   - Hover : border passe à .65/.65/.65/1.0 + inset glow renforcé + halo extérieur 24px
   - Selected (.tl-active) = hover AMPLIFIÉ : border .8/.8/.8/1.0 + halo 36px + fond moins transparent.
   Sans transform (le pattern kpi-card n'en a pas), sans ring 0 0 0 1px (pas dans le pattern non plus). */
.med-tl-card {
  position: relative;
  transition: border .2s, background .2s, box-shadow .2s !important;
  border-width: 1px 1px 1px 2px !important;
  border-style: solid !important;
  border-color: rgba(var(--card-rgb, var(--p-base-rgb)), .4)
                rgba(var(--card-rgb, var(--p-base-rgb)), .4)
                rgba(var(--card-rgb, var(--p-base-rgb)), .4)
                rgba(var(--card-rgb, var(--p-base-rgb)), .85) !important;
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb, var(--p-base-rgb)), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb, var(--p-base-rgb)), .10) 0%,
                            rgba(var(--card-rgb, var(--p-base-rgb)), .03) 50%,
                            rgba(24, 24, 27, .50) 100%) !important;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb, var(--p-base-rgb)), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
}
.med-tl-card:hover {
  border-color: rgba(var(--card-rgb, var(--p-base-rgb)), .65)
                rgba(var(--card-rgb, var(--p-base-rgb)), .65)
                rgba(var(--card-rgb, var(--p-base-rgb)), .65)
                rgba(var(--card-rgb, var(--p-base-rgb)), 1) !important;
  box-shadow:
    inset 8px 0 16px -8px rgba(var(--card-rgb, var(--p-base-rgb)), .7),
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 0 24px rgba(var(--card-rgb, var(--p-base-rgb)), .25),
    0 4px 18px rgba(0, 0, 0, .30) !important;
}
/* Selected (.tl-active) = pattern v.27 (luminosité max + effet poli + tranche de verre épaisse)
   + SURCOUCHE bordure néon (outline blanc semi-transparent superposé sur le contour). */
.med-tl-card.tl-active {
  border-color: rgba(var(--card-rgb, var(--p-base-rgb)), .9)
                rgba(var(--card-rgb, var(--p-base-rgb)), .9)
                rgba(var(--card-rgb, var(--p-base-rgb)), .9)
                rgba(var(--card-rgb, var(--p-base-rgb)), 1) !important;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .04) 25%, transparent 55%),
    radial-gradient(circle at top right, rgba(var(--card-rgb, var(--p-base-rgb)), .40), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb, var(--p-base-rgb)), .30) 0%,
                            rgba(var(--card-rgb, var(--p-base-rgb)), .12) 50%,
                            rgba(24, 24, 27, .80) 100%) !important;
  box-shadow:
    inset 10px 0 22px -8px rgba(var(--card-rgb, var(--p-base-rgb)), 1),  /* tranche de verre gauche épaisse */
    inset 0 1px 0 rgba(255, 255, 255, .12),                              /* ridge haut subtil */
    0 0 8px rgba(var(--card-rgb, var(--p-base-rgb)), .65),
    0 0 14px rgba(var(--card-rgb, var(--p-base-rgb)), .35),
    0 6px 22px rgba(0, 0, 0, .40) !important;
}
/* Surbordure blanche asymétrique POSITIONNÉE PAR-DESSUS la border colorée
   (via pseudo-élément absolute avec offset négatif = même pixels que le border CSS).
   Les 2 layers se superposent vraiment au lieu de se côtoyer. */
.med-tl-card.tl-active::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  left: -2px;                                     /* couvre la border 2px gauche */
  border: 1px solid rgba(255, 255, 255, .50);
  border-left-width: 2px;
  border-left-color: rgba(255, 255, 255, .60);
  border-radius: 8px;                             /* match .sante-card */
  pointer-events: none;
  z-index: 1;
}
.med-tl-card.tl-active:hover {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .05) 25%, transparent 55%),
    radial-gradient(circle at top right, rgba(var(--card-rgb, var(--p-base-rgb)), .48), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb, var(--p-base-rgb)), .35) 0%,
                            rgba(var(--card-rgb, var(--p-base-rgb)), .15) 50%,
                            rgba(24, 24, 27, .82) 100%) !important;
  box-shadow:
    inset 10px 0 24px -8px rgba(var(--card-rgb, var(--p-base-rgb)), 1),
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 0 10px rgba(var(--card-rgb, var(--p-base-rgb)), .75),
    0 0 18px rgba(var(--card-rgb, var(--p-base-rgb)), .45),
    0 6px 22px rgba(0, 0, 0, .42) !important;
}
.med-tl-card.tl-active:hover::after {
  border-color: rgba(255, 255, 255, .65);
  border-left-color: rgba(255, 255, 255, .75);
}
.med-tl-item:hover .med-tl-dot {
  box-shadow: 0 0 0 3px rgba(var(--card-rgb, var(--p-base-rgb)), .35),
              0 0 14px rgba(var(--card-rgb, var(--p-base-rgb)), .65) !important;
}

/* === Texte synthèse / praticien — taille et couleur claude-automation === */
.med-tl-card .tl-praticien {
  font-size: 12px;        /* claude-automation .tl-row2 */
  color: #e4e4e7;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.med-tl-card .tl-title-secondary {
  font-size: 10.5px;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.med-tl-card .tl-summary {
  font-size: 11px;        /* claude-automation .tl-row3 */
  color: #94a3b8;          /* texte secondaire (gris ardoise 400) */
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* KPI mini (vue d'ensemble) */
.kpi-row {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.kpi-mini {
  --card-rgb: var(--p-base-rgb);
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 3px solid rgba(var(--card-rgb), .8);
  background: rgba(20, 20, 23, .35);
  display: flex; flex-direction: column; gap: .2rem;
}
.kpi-mini.kpi-weight   { --card-rgb: 168, 85, 247; }
.kpi-mini.kpi-hr       { --card-rgb: 239, 68, 68; }
.kpi-mini.kpi-hrv      { --card-rgb: 16, 185, 129; }
.kpi-mini.kpi-spo2     { --card-rgb: 14, 165, 233; }
.kpi-mini.kpi-sleep    { --card-rgb: 99, 102, 241; }
.kpi-mini.kpi-stress   { --card-rgb: 251, 146, 60; }
.kpi-mini.kpi-bb       { --card-rgb: 234, 179, 8; }
.kpi-mini.kpi-steps    { --card-rgb: 6, 182, 212; }
.kpi-mini.kpi-cal      { --card-rgb: 244, 114, 182; }
.kpi-mini.kpi-dist     { --card-rgb: 132, 204, 22; }
.kpi-mini.kpi-intensity { --card-rgb: 245, 158, 11; }
.kpi-mini.kpi-floors   { --card-rgb: 168, 162, 158; }
.kpi-mini .km-label { font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-mini .km-value {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.15rem; font-weight: 700; color: #e4e4e7;
  display: flex; align-items: baseline; gap: .25rem;
  line-height: 1.05;
}
.kpi-mini .km-unit { font-size: .7rem; color: #94a3b8; }
.kpi-mini .km-spark { color: rgb(var(--card-rgb)); margin-top: .15rem; }
.kpi-mini .km-spark svg { display: block; }

/* 3 colonnes Analyse/Etat/Reco */
.three-cols-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
}
.sn-section-title {
  margin: 0 0 .55rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.sn-section-title.accent-blue   { color: #93c5fd; border-bottom: 1px solid rgba(147, 197, 253, .25); padding-bottom: .25rem; }
.sn-section-title.accent-teal   { color: #5eead4; border-bottom: 1px solid rgba(94, 234, 212, .25); padding-bottom: .25rem; }
.sn-section-title.accent-orange { color: #fdba74; border-bottom: 1px solid rgba(253, 186, 116, .25); padding-bottom: .25rem; }
.analysis-card,
.etat-card,
.reco-card     { --card-rgb: var(--p-base-rgb); }
.analysis-card p, .etat-card p, .reco-card p { font-size: .85rem; color: #d4d4d8; line-height: 1.55; margin: 0 0 .5rem; }
.analysis-card code, .etat-card code, .reco-card code { background: rgba(var(--p-base-rgb), .12); padding: 0 .3rem; border-radius: 3px; font-size: .8em; }

/* Biom grid (état courant) */
.biom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem; }
.biom-item { display: flex; flex-direction: column; }
.biom-label { font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.biom-value {
  font-family: 'Menlo','Consolas',monospace;
  font-weight: 700; font-size: .95rem; color: #5eead4;
  display: flex; align-items: baseline; gap: .25rem;
}
.biom-unit { font-size: .68rem; color: #94a3b8; }
.biom-source { font-size: .68rem; color: #64748b; margin-top: .55rem !important; font-style: italic; }

/* Reco list */
.reco-list { display: flex; flex-direction: column; gap: .55rem; }
.reco-item {
  font-size: .82rem; color: #d4d4d8; line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.reco-bullet {
  position: absolute; left: 0; top: .35rem;
  width: 8px; height: 8px; border-radius: 50%;
}
.reco-bullet.ok    { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,.6); }
.reco-bullet.warn  { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,.6); }
.reco-bullet.crit  { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,.6); }
.reco-item b { color: #e4e4e7; }

/* sn-list */
.sn-list { font-size: .82rem; color: #cbd5e1; line-height: 1.6; padding-left: 1.4rem; margin: .35rem 0; }
.sn-list li { margin-bottom: .15rem; }

/* Suivi info-card / kpi-avg */
.suivi-info-card {
  padding: .35rem .85rem; font-size: .72rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
}
.kpi-card .kpi-foot { display: flex; justify-content: space-between; }
.kpi-card .kpi-avg { color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; font-size: .68rem; }

/* Doc type pill */
.doc-type-pill {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 10px;
  font-size: .68rem; font-weight: 600;
  background: rgba(var(--p-base-rgb), .15);
  color: var(--p-light);
  border: 1px solid rgba(var(--p-base-rgb), .3);
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ===== Tables ===== */
.sante-table {
  width: 100%; border-collapse: collapse;
  margin-top: .5rem;
  font-size: .8rem;
}
.sante-table th, .sante-table td {
  padding: .35rem .55rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sante-table th {
  color: var(--p-light); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: .68rem;
  background: rgba(var(--p-base-rgb), .07);
}
.sante-table td { color: #d4d4d8; font-family: 'Menlo','Consolas',monospace; }
.sante-table tr:hover td { background: rgba(var(--p-base-rgb), .04); }


/* ============================================================================
   ANALYSES SANG v2 — refonte 2026-05-01
   - Suppression head INDICATEURS CLÉS (KPI cards directes)
   - Bloc Synthèse Claude pattern dash-synthesis (claude-systeme adapté)
   - Charts cards refondus : titre+unité, description+lecture, graph last/max/min, badge domaine
   ============================================================================ */
.blood-view {
  display: flex; flex-direction: column;
  gap: 1rem;
  padding: .25rem 0 1rem;
}

/* === Section 1 : 6 KPI cards (utilise .kpi-card.kpi-score-card du portal.css global) ===
   Layout fixe (hauteur uniforme ~7.5rem comme KPI dashboard) :
   - kpi-head     : title abrégé (gros) + score (value + unit tronquée >6 chars) à droite
   - kpi-norms    : min X · max Y SOUS la mesure (alignés à droite)
   - kpi-foot     : date dernier point à gauche + flèche trend dans le coin bottom-right
*/
.blood-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .65rem;
}
.blood-kpi-card.kpi-card.kpi-score-card {
  min-height: 7.5rem;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: .35rem;
  overflow: hidden;
}
/* Title : sans border-bottom (suffit) */
.blood-kpi-card .kpi-head {
  border-bottom: none;
  padding-bottom: 0;
}
.blood-kpi-card .kpi-title {
  font-size: 1.05rem;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
/* Jauge position dans la norme : labels min/max + barre avec marqueur position relative */
.blood-kpi-card .kpi-gauge {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .35rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .62rem;
  color: rgba(34,197,94,.75);
  line-height: 1.2;
}
.blood-kpi-card .kg-lbl { white-space: nowrap; color: rgba(var(--gauge-rgb),.7); }
.blood-kpi-card .kg-lbl--min { text-align: left; }
.blood-kpi-card .kg-lbl--max { text-align: right; }
.blood-kpi-card .kg-bar {
  position: relative;
  height: 4px;
  background: linear-gradient(to right,
    rgba(var(--gauge-rgb),.12) 0%,
    rgba(var(--gauge-rgb),.30) 8%,
    rgba(var(--gauge-rgb),.30) 92%,
    rgba(var(--gauge-rgb),.12) 100%);
  border-radius: 2px;
  overflow: visible;
}
.blood-kpi-card.score-ok   { --gauge-rgb: 74,222,128; }
.blood-kpi-card.score-warn { --gauge-rgb: 251,146,60; }
.blood-kpi-card.score-crit { --gauge-rgb: 239,68,68; }
.blood-kpi-card .kg-marker {
  position: absolute;
  top: 50%; transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.55);
  box-shadow: 0 0 4px rgba(0,0,0,.45);
}
.blood-kpi-card .kg-marker--ok   { background: #4ade80; }
.blood-kpi-card .kg-marker--warn { background: #fb923c; }
.blood-kpi-card .kg-marker--crit { background: #ef4444; }
.blood-kpi-card .kg-marker--out  { box-shadow: 0 0 6px rgba(239,68,68,.7); }
/* Borne unique (ex cible <1.5 g/L) : centré italique */
.blood-kpi-card .kpi-gauge--single {
  display: flex; justify-content: center;
}
.blood-kpi-card .kg-lbl-single {
  font-style: italic;
  color: rgba(var(--gauge-rgb),.7);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem;
}
/* Pas de norme : afficher min/max observés (si dispo) ou tiret */
.blood-kpi-card .kpi-gauge--empty {
  display: flex; justify-content: center;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem;
  color: rgba(255,255,255,.35);
  font-style: italic;
}
/* Foot : date à gauche, flèche trend bottom-right corner */
.blood-kpi-card .kpi-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: .65rem;
  margin-top: auto;
}
.blood-kpi-card .kpi-foot .bk-meta { color: rgba(255,255,255,.5); }
.bk-trend-corner {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
  margin: 0;
}
.bk-trend-ok   { color: #4ade80; }
.bk-trend-warn { color: #fb923c; }
.bk-trend-crit { color: #ef4444; }
/* Responsive KPI : 6 colonnes sur desktop (>= 1100px), dégradation progressive */
@media (max-width: 1280px) {
  .blood-kpi-grid { gap: .5rem; }
  .blood-kpi-card .kpi-title { font-size: .92rem; }
  .blood-kpi-card .kpi-score .ks-value { font-size: 1.4rem; }
  .blood-kpi-card .kpi-score .ks-unit  { font-size: .75rem; }
  .blood-kpi-card .kpi-norms { font-size: .62rem; }
}
@media (max-width: 1100px) {
  .blood-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .blood-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .blood-kpi-card.kpi-card.kpi-score-card { min-height: 7rem; }
  .blood-kpi-card .kpi-title { font-size: .9rem; }
  .bk-trend-corner { font-size: 1rem; }
}
/* Charts : grid auto-fit gère seul le passage 2→1 col selon largeur (minmax 500px). */

/* === Section 2 : Bloc Synthèse Claude (pattern dash-synthesis) === */
.blood-synthesis {
  padding: .85rem 1rem;
  border-top: 1px solid rgba(var(--p-base-rgb), .4);
  border-right: 1px solid rgba(var(--p-base-rgb), .4);
  border-bottom: 1px solid rgba(var(--p-base-rgb), .4);
  border-left: 2px solid rgba(var(--p-base-rgb), .9);
  background:
    radial-gradient(circle at top right, rgba(var(--p-base-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--p-base-rgb), .1) 0%, rgba(var(--p-base-rgb), .03) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--p-base-rgb), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
  border-radius: 8px;
}
.bs-head {
  display: flex; align-items: baseline; gap: .65rem;
  flex-wrap: wrap; margin-bottom: .35rem;
}
.bs-title {
  font-size: .92rem; color: var(--p-base);
  font-family: 'Menlo','Consolas',monospace;
  font-weight: 600; letter-spacing: .03em;
  display: inline-flex; align-items: center; gap: .35rem;
}
.bs-resume {
  display: inline-flex; gap: .35rem; flex-wrap: wrap; align-items: baseline;
}
/* Cluster badges + score aligné à droite, sur la même baseline */
.bs-right-cluster {
  margin-left: auto;
  display: inline-flex; align-items: baseline; gap: .65rem;
  flex-wrap: nowrap;
}
.bs-badges {
  display: inline-flex; gap: .35rem; flex-wrap: wrap; align-items: baseline;
}
.bs-cnt {
  font-size: .65rem; padding: .1rem .4rem; border-radius: 3px; border: 1px solid;
  font-family: 'Menlo','Consolas',monospace; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.bs-cnt.critical { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,.12); }
.bs-cnt.high     { color: #fb923c; border-color: #fb923c; background: rgba(251,146,60,.12); }
.bs-cnt.medium   { color: #eab308; border-color: #eab308; background: rgba(234,179,8,.10); }
.bs-cnt.low      { color: #38bdf8; border-color: #38bdf8; background: rgba(56,189,248,.10); }
.bs-cnt.total    { color: #94a3b8; border-color: #64748b; background: rgba(100,116,139,.06); }

/* Trigger badge audit Claude (DB principle #90) */
.bsc-trigger-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .72rem;
  font-weight: 500;
  padding: .12rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--p-base-rgb, 148,163,184), .35);
  background: rgba(var(--p-base-rgb, 148,163,184), .08);
  color: var(--p-base, #94a3b8);
  white-space: nowrap;
  margin-left: .4rem;
  letter-spacing: 0;
}

.bs-score-slot {
  margin-left: auto;
  align-self: baseline;
  display: inline-flex; align-items: baseline;
}
.bs-score-big {
  display: inline-flex; align-items: baseline; gap: .05rem;
  font-family: 'Menlo','Consolas',monospace; line-height: 1;
}
.bsb-value { font-size: 1.85rem; font-weight: 700; line-height: 1; }
.bsb-unit  { font-size: 1rem; font-weight: 600; opacity: .75; }
.bs-score-big.score-ok   { color: #4ade80; }
.bs-score-big.score-warn { color: #fb923c; }
.bs-score-big.score-crit { color: #ef4444; }

.bs-meta {
  color: #94a3b8; font-size: .72rem; font-family: 'Menlo','Consolas',monospace;
  margin-bottom: .55rem;
}

/* Spinner refresh / launch */
@keyframes bs-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.bs-spinner {
  margin-left: .35rem; width: 28px; height: 28px; vertical-align: middle;
}
.bs-spinner.is-running {
  opacity: 1; cursor: default;
  animation: bs-spin 1.4s linear infinite;
  color: var(--p-base) !important;
  filter: drop-shadow(0 0 6px rgba(var(--p-base-rgb), .5));
}
.bs-spinner.is-running:hover { transform: none; filter: none; }

/* Combo profondeur + modèle — aligné sur pattern claude-systeme dashboard .dsy-* (2026-05-05) */
.bs-combo-row {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  margin: .35rem 0 .55rem;
  font-size: .76rem; color: #94a3b8;
}
.bs-combo-row label,
.bs-combo {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; color: #94a3b8;
}
.bs-depth, .bs-model, .gs-depth, .gs-model, .stats-depth, .stats-model, .etat-depth, .etat-model, .reco-depth, .reco-model, .cl-combo-depth, .cl-combo-model {
  background: rgba(0, 0, 0, .35); color: #e4e4e7;
  border: 1px solid rgba(var(--p-base-rgb), .35);
  border-radius: 4px; padding: .2rem .5rem;
  font-size: .76rem; font-family: inherit; cursor: pointer;
}
.bs-depth:focus, .bs-model:focus, .gs-depth:focus, .gs-model:focus, .stats-depth:focus, .stats-model:focus, .etat-depth:focus, .etat-model:focus, .reco-depth:focus, .reco-model:focus, .cl-combo-depth:focus, .cl-combo-model:focus {
  outline: none; border-color: var(--p-base);
}
.bs-depth:disabled, .bs-model:disabled, .gs-depth:disabled, .gs-model:disabled, .stats-depth:disabled, .stats-model:disabled, .etat-depth:disabled, .etat-model:disabled, .reco-depth:disabled, .reco-model:disabled, .cl-combo-depth:disabled, .cl-combo-model:disabled {
  opacity: .5; cursor: not-allowed;
}
.bs-model optgroup, .gs-model optgroup, .stats-model optgroup, .etat-model optgroup, .reco-model optgroup, .cl-combo-model optgroup {
  background: rgba(24, 24, 27, .95);
  color: var(--p-base);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .04em;
}
.bs-model option, .gs-model option, .stats-model option, .etat-model option, .reco-model option, .cl-combo-model option {
  background: rgba(24, 24, 27, .95);
  color: #e4e4e7;
  font-weight: 500;
}

/* Erreur banner */
.bs-error-banner {
  margin: .25rem 0 .55rem;
  padding: .5rem .75rem;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.35);
  border-left: 3px solid #ef4444;
  border-radius: 5px;
  color: #fecaca;
  font-size: .82rem;
  line-height: 1.5;
}
.bs-error-banner strong { color: #ef4444; }

/* Empty / no data */
.bs-empty {
  padding: .7rem .85rem;
  background: rgba(255,255,255,.025);
  border: 1px dashed rgba(var(--p-base-rgb), .25);
  border-radius: 5px;
  color: #94a3b8;
  font-size: .85rem;
  font-style: italic;
}
.bs-empty strong { color: var(--p-base); font-style: normal; }

/* Summary markdown */
.bs-summary {
  display: block;
  white-space: normal;
  margin-bottom: .55rem;
  color: #d4d4d8; font-size: .85rem; line-height: 1.55;
  padding: .55rem .75rem;
  background: rgba(0, 0, 0, .15);
  border-left: 2px solid rgba(var(--p-base-rgb), .35);
  border-radius: 0 4px 4px 0;
}
.bs-summary strong { color: var(--p-base); font-weight: 600; }
.bs-summary code {
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 3px;
  padding: 0 .3rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82em;
  color: var(--p-light);
}
.bs-summary .bs-md-ul {
  margin: .25rem 0 .25rem 1.1rem; padding: 0; list-style: disc;
}
.bs-summary .bs-md-ul li {
  margin: .15rem 0; line-height: 1.5;
}
.bs-summary .bs-md-ul li::marker { color: var(--p-base); }
.bs-summary .bs-md-para { height: .55rem; }

/* Findings block (collapsable) */
.bs-findings-block {
  margin-top: .35rem;
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 5px;
  background: rgba(0, 0, 0, .15);
}
.bs-findings-summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .6rem;
  cursor: pointer; list-style: none;
  font-size: .8rem;
}
.bs-findings-summary::-webkit-details-marker { display: none; }
.bs-fb-chev {
  display: inline-block; color: var(--p-base);
  transition: transform .12s; font-size: .8rem;
}
.bs-findings-block[open] .bs-fb-chev { transform: rotate(90deg); }
.bs-fb-title {
  font-weight: 600; color: var(--p-base);
  text-transform: uppercase; letter-spacing: .06em; font-size: .72rem;
}
.bs-fb-counts {
  display: inline-flex; gap: .35rem; margin-left: auto; align-items: center;
}
.bs-fb-c {
  font-size: .65rem; padding: .08rem .4rem; border-radius: 3px; border: 1px solid;
  font-family: 'Menlo','Consolas',monospace; font-weight: 600;
}
.bs-fb-c.open  { color: #fb923c; border-color: rgba(251,146,60,.4); background: rgba(251,146,60,.1); }
.bs-fb-c.acc   { color: #4ade80; border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.bs-fb-c.total { color: #94a3b8; border-color: rgba(148,163,184,.3); background: rgba(100,116,139,.08); }

.bs-findings-block[open] .bs-findings-list {
  display: block;
  padding: .25rem .55rem .55rem;
  border-top: 1px solid rgba(var(--p-base-rgb), .12);
}
.bs-finding {
  background: rgba(0, 0, 0, .15); border-radius: 4px;
  border-left: 2px solid transparent;
  margin-bottom: .35rem;
  font-size: .82rem;
  transition: background .12s;
}
.bs-finding[open] { background: rgba(var(--p-base-rgb), .04); padding-bottom: .55rem; }
.bs-finding.lvl-critical { border-left-color: #ef4444; }
.bs-finding.lvl-high     { border-left-color: #fb923c; }
.bs-finding.lvl-medium   { border-left-color: #eab308; }
.bs-finding.lvl-low      { border-left-color: #38bdf8; }
.bs-finding.is-accepted,
.bs-finding.bs-finding--accepted { opacity: .55; }
.bs-finding summary {
  display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap;
  padding: .35rem .55rem;
  cursor: pointer; user-select: none; list-style: none;
}
.bs-finding summary::-webkit-details-marker { display: none; }
.bsf-axe {
  flex-shrink: 0; min-width: 100px;
  font-size: .65rem; font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--p-light); font-weight: 600;
}
.bsf-level {
  flex-shrink: 0; min-width: 60px; text-align: center;
  font-size: .62rem; font-weight: 700;
  padding: .1rem .35rem; border-radius: 3px; border: 1px solid;
  font-family: 'Menlo','Consolas',monospace;
}
.bsf-level-critical { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,.12); }
.bsf-level-high     { color: #fb923c; border-color: #fb923c; background: rgba(251,146,60,.12); }
.bsf-level-medium   { color: #eab308; border-color: #eab308; background: rgba(234,179,8,.10); }
.bsf-level-low      { color: #38bdf8; border-color: #38bdf8; background: rgba(56,189,248,.10); }
.bsf-title {
  flex: 1; min-width: 0; color: #e4e4e7;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bsf-acc-tag, .bsf-followup-tag {
  flex-shrink: 0; font-size: .6rem;
  padding: .05rem .35rem; border-radius: 3px; border: 1px solid;
  font-family: 'Menlo','Consolas',monospace;
}
.bsf-acc-tag { color: #4ade80; border-color: rgba(74,222,128,.35); }
.bsf-followup-tag { color: #a1a1aa; border-color: rgba(161,161,170,.3); }
.bsf-body {
  padding: .25rem .85rem .25rem 1.1rem;
  display: flex; flex-direction: column; gap: .45rem;
  font-size: .82rem; color: #d4d4d8;
}
.bsf-row {
  display: grid; grid-template-columns: 110px 1fr; gap: .65rem;
  align-items: baseline;
}
.bsf-lbl {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem; text-transform: uppercase; letter-spacing: .05em;
  color: rgba(var(--p-base-rgb), .9); font-weight: 600;
}
.bsf-val { line-height: 1.45; }
.bsf-recos {
  margin: 0; padding-left: 1rem; display: flex; flex-direction: column; gap: .2rem;
  line-height: 1.4;
}
.bsf-markers code {
  background: rgba(0,0,0,.4); border: 1px solid rgba(var(--p-base-rgb), .25);
  padding: .05rem .35rem; border-radius: 3px;
  font-size: .72rem; color: var(--p-light); margin-right: .25rem;
}
.bsf-actions {
  display: none;
}

/* === Section 3 : Charts evolution refondus (v2) ===
   - Pattern carte standard portail (border-left épaisse + gradient teinté selon status)
   - Titre plus gros, unité simple à côté
   - Badge domaine en haut à droite, pilule transparente colorée
   - Filtres catégorie aussi en pilules transparentes colorées
   - Pas de footer redondant
*/
.blood-charts-toolbar {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  padding: .55rem 0 .35rem;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .15);
}
.blood-charts-title {
  margin: 0;
  font-family: 'Menlo','Consolas',monospace;
  color: var(--p-base);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.blood-charts-filter {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-left: auto;
}
/* Filtres catégorie en pilules transparentes colorées par domaine.
   Largeur fixe alignée sur les pilules domaine des cartes (.bcc-domaine-pill min-width 92px)
   pour cohérence visuelle (cf principle #79). */
.blood-cat-pill {
  background: rgba(var(--pill-rgb, 148,163,184), .12);
  border: 1px solid rgba(var(--pill-rgb, 148,163,184), .35);
  color: rgb(var(--pill-rgb, 148,163,184));
  padding: .2rem .65rem;
  border-radius: 12px;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  min-width: 92px;
  text-align: center;
  white-space: nowrap;
}
.blood-cat-pill:hover {
  background: rgba(var(--pill-rgb, 148,163,184), .22);
  filter: brightness(1.15);
}
.blood-cat-pill--active {
  background: rgba(var(--pill-rgb, 148,163,184), .35);
  border-color: rgb(var(--pill-rgb, 148,163,184));
  filter: brightness(1.1);
  box-shadow: 0 0 8px rgba(var(--pill-rgb, 148,163,184), .35);
}

/* Chart card v2 : pattern carte standard portail (comme synthesis card)
   2 colonnes (≈ 50% pleine page) tant qu'une card peut faire ≥ 500px.
   En dessous, auto-fit bascule en 1 colonne pleine largeur (cf principle #79). */
.blood-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem;
  margin-top: .55rem;
}
.blood-chart-card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  /* Pattern carte standard portail : border-left épaisse colorée selon status */
  border-top: 1px solid rgba(var(--chart-rgb, 34,197,94), .4);
  border-right: 1px solid rgba(var(--chart-rgb, 34,197,94), .4);
  border-bottom: 1px solid rgba(var(--chart-rgb, 34,197,94), .4);
  border-left: 2px solid rgba(var(--chart-rgb, 34,197,94), .85);
  background:
    radial-gradient(circle at top right, rgba(var(--chart-rgb, 34,197,94), .12), transparent 60%),
    linear-gradient(135deg, rgba(var(--chart-rgb, 34,197,94), .08) 0%, rgba(var(--chart-rgb, 34,197,94), .025) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--chart-rgb, 34,197,94), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
}
.blood-chart-card.score-warn {
  border-left-color: rgba(var(--chart-rgb), .9);
}
.blood-chart-card.score-crit {
  border-left-color: rgba(var(--chart-rgb), .95);
}

/* Header chart card : titre+unité à gauche, pilule domaine à droite (largeur fixe) */
.bcc-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .85rem;
  padding: .85rem 1.1rem .45rem;
  flex-wrap: nowrap;
  text-align: left;
}
.bcc-title-line {
  display: inline-flex; align-items: baseline; gap: .45rem;
  flex: 1; min-width: 0;
  flex-wrap: wrap;
}
.bcc-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.15;
}
.bcc-unit {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}
/* Pilule domaine : largeur uniforme (min-width fixe), transparente colorée */
.bcc-domaine-pill {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .62rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  text-align: center;
  background: rgba(var(--dom-rgb, 148,163,184), .15);
  border: 1px solid rgba(var(--dom-rgb, 148,163,184), .45);
  color: rgb(var(--dom-rgb, 148,163,184));
  flex-shrink: 0;
  min-width: 92px;  /* uniformise la largeur entre toutes les pilules */
}
.bcc-body {
  padding: .25rem .35rem .15rem;
}
.blood-chart {
  width: 100%; height: auto; max-height: 250px; display: block;
  overflow: hidden;
}
.blood-chart-empty {
  text-align: center; padding: 1.6rem;
  color: rgba(255,255,255,.4);
  font-size: .8rem; font-style: italic;
}
/* Footer text : description + lecture sous le graph, full-width left-align.
   Hauteur réservée pour ~3 lignes au total (1 description + 1-2 lecture) — uniformise les cards. */
.bcc-footer-text {
  padding: .55rem 1.1rem 1rem;
  border-top: 1px dashed rgba(var(--chart-rgb, 148,163,184), .15);
  margin-top: .35rem;
  min-height: 4.4rem;  /* ≈ 3 lignes (description + 2 lignes lecture) */
  display: flex; flex-direction: column;
  gap: .35rem;
}
.bcc-description {
  font-size: .82rem; color: #d4d4d8;
  margin: 0; max-width: 100%;
  line-height: 1.45;
}
.bcc-reading {
  font-size: .74rem; color: rgba(255,255,255,.6);
  margin: 0; max-width: 100%;
  line-height: 1.5; font-style: italic;
}
.bcc-empty {
  color: rgba(255,255,255,.3);
  font-style: italic;
}
.blood-chart-tick {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 10px; fill: rgba(255,255,255,.55);
}
/* Labels right-side : valeurs last/max/min + normes min/max empilées à droite hors plot */
.blood-chart-rlbl {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 11.5px; font-weight: 600;
  paint-order: stroke;
  stroke: rgba(0,0,0,.6); stroke-width: 1.5; stroke-linejoin: round;
}
.blood-chart-rlbl--bold {
  font-size: 13.5px; font-weight: 800;
  stroke-width: 2;
}
/* Responsive : sur petit écran, header chart wrap sur 2 lignes (titre puis pilule) */
@media (max-width: 680px) {
  .bcc-header { flex-wrap: wrap; gap: .35rem; }
  .bcc-title { font-size: 1.1rem; }
  .bcc-unit  { font-size: .75rem; }
  .bcc-domaine-pill,
  .blood-cat-pill { min-width: 80px; font-size: .58rem; }
  .blood-chart-rlbl { font-size: 10.5px; }
  .blood-chart-rlbl--bold { font-size: 12px; }
}


/* ============================================================================
   VUE IMAGERIE — mannequin anatomique X-ray cliquable + liste docs filtrée par zone
   25% gauche : silhouette + squelette détaillé. 75% droite : grille de cards docs.
   ============================================================================ */
.imag-view {
  display: flex; flex-direction: column;
  gap: 1rem;
  padding: .25rem 0 1rem;
}
.imag-grid {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);  /* 25% / 75% */
  gap: .85rem;
  align-items: start;
}
@media (max-width: 900px) {
  .imag-grid { grid-template-columns: 1fr; }
}

/* Panneau gauche : mannequin */
.imag-mannequin-panel {
  position: relative;
  padding: .65rem .8rem;
}
.imag-layer-btns {
  display: flex; gap: .35rem;
  margin-bottom: .5rem;
}
.imag-layer-btn {
  flex: 1;
  padding: .3rem .4rem;
  border: 1px solid rgba(var(--p-base-rgb), .3);
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,.6);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.imag-layer-btn:hover {
  color: var(--p-base);
  background: rgba(var(--p-base-rgb), .08);
  border-color: rgba(var(--p-base-rgb), .5);
}
.imag-layer-btn--active {
  color: var(--p-base);
  background: rgba(var(--p-base-rgb), .15);
  border-color: rgba(var(--p-base-rgb), .6);
  box-shadow: 0 0 8px rgba(var(--p-base-rgb), .2);
}
/* Toggle 2D / 3D */
.imag-mode-toggle {
  display: inline-flex;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(108,200,255,.25);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.imag-mode-btn {
  background: transparent;
  border: none;
  color: rgba(108,200,255,.55);
  padding: .25rem .55rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .15s;
}
.imag-mode-btn:hover { color: rgba(108,200,255,.9); background: rgba(108,200,255,.08); }
.imag-mode-btn--active {
  background: rgba(108,200,255,.18);
  color: rgba(180,230,255,1);
  box-shadow: inset 0 0 8px rgba(108,200,255,.25);
}
.imag-mannequin {
  display: flex; justify-content: center;
  margin-bottom: .55rem;
}
.imag-mannequin svg.anat-mannequin {
  width: 100%;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(108,200,255,0.15));
}
/* Mode 2D PNG+SVG : stack PNG anatomique en fond + SVG overlay inline zones cliquables.
   IMPORTANT : aspect-ratio aligné sur le SVG (1024/2048) pour que les coordonnées des zones
   correspondent EXACTEMENT au visuel rendu. Le PNG (736/1441) est étiré dans le stack via
   object-fit: fill (ratio quasi-identique 0.500 vs 0.511 → écart imperceptible).
*/
.imag-mannequin--2d .anat-stack {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 736 / 1441;  /* ratio aligné sur SVG viewBox + PNG intégrés */
  filter: drop-shadow(0 0 14px rgba(108,200,255,0.18));
}
/* .anat-bg supprimé — images intégrées dans le SVG */
.imag-mannequin--2d .anat-overlay-wrap {
  position: relative;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}
.imag-mannequin--2d .anat-overlay-svg {
  width: 100%; height: 100%;
  display: block;
}
.imag-mannequin--2d .anat-loading {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  color: rgba(108,200,255,.5);
  font-style: italic;
}
/* Mode 3D : iframe Sketchfab responsive aspect ratio 1:1 ou 3:4 */
.imag-mannequin--3d {
  display: block;
  margin: 0;
}
.sketchfab-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;     /* portrait ratio cohérent avec corps humain */
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(108,200,255,.18);
  box-shadow: inset 0 0 30px rgba(108,200,255,.08), 0 4px 18px rgba(0,0,0,.4);
}
.sketchfab-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.imag-3d-credit {
  margin: .55rem 0 0;
  font-size: .62rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  font-style: italic;
  font-family: 'Menlo','Consolas',monospace;
  line-height: 1.5;
}
.imag-3d-credit a {
  color: rgba(108,200,255,.7);
  text-decoration: none;
}
.imag-3d-credit a:hover { color: rgba(108,200,255,1); text-decoration: underline; }
/* Zones cliquables */
.anat-zone {
  cursor: pointer;
  transition: fill .2s, stroke .2s, opacity .2s;
}
.anat-zone:hover {
  fill: rgba(108,200,255,0.18) !important;
  stroke: rgba(108,200,255,0.7) !important;
  stroke-width: 1.5 !important;
}
.anat-zone--has:hover { filter: brightness(1.2); }
.anat-zone--active {
  stroke-width: 2 !important;
  filter: brightness(1.3);
}
/* Légende */
.imag-legend {
  display: flex; justify-content: center; gap: .85rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .35rem;
}
.imag-leg-item { display: inline-flex; align-items: center; gap: .3rem; }
.imag-leg-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.imag-leg-dot--low { background: rgba(108,140,255,0.85); box-shadow: 0 0 6px rgba(108,140,255,0.5); }
.imag-leg-dot--mid { background: rgba(255,140,66,0.9); box-shadow: 0 0 6px rgba(255,140,66,0.55); }
.imag-leg-dot--hi  { background: rgba(255,87,87,0.95); box-shadow: 0 0 6px rgba(255,87,87,0.6); }

.imag-unmapped {
  margin-top: .55rem;
  padding: .45rem .65rem;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.15);
  border-radius: 5px;
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  text-align: center;
}
.imag-unmapped strong { color: var(--p-base); }
.imag-unmapped-link {
  color: var(--p-base);
  text-decoration: underline;
  cursor: pointer;
  margin-left: .25rem;
}
.imag-unmapped-link:hover { color: var(--p-glow); }

/* Panneau droit : liste docs */
.imag-docs-panel {
  overflow: visible;
  padding: .65rem .8rem;
}
.imag-docs-header {
  padding: .65rem 1rem;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .15);
  display: flex; align-items: center; justify-content: space-between;
  gap: .85rem;
}
.imag-docs-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
}
.imag-docs-title strong { color: var(--p-base); }
.imag-clear-filter {
  display: inline-flex; align-items: center; gap: .25rem;
  background: transparent;
  border: 1px solid rgba(var(--p-base-rgb), .35);
  color: var(--p-base);
  padding: .15rem .55rem;
  border-radius: 6px;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem;
  cursor: pointer;
  transition: all .15s;
}
.imag-clear-filter:hover {
  background: rgba(var(--p-base-rgb), .15);
  color: var(--p-light);
}
.imag-docs-list { padding: .55rem; }

/* ── Imagerie: filter bar ── */
.imag-filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap;
}
.imag-docs-count {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .78rem; color: rgba(255,255,255,.85);
  letter-spacing: .04em;
}
.imag-docs-count strong { color: var(--p-base); }
.imag-type-filters { display: flex; gap: .25rem; }
.imag-type-btn {
  padding: .2rem .5rem;
  border: 1px solid rgba(var(--p-base-rgb), .25);
  border-radius: 5px;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  cursor: pointer; transition: all .15s;
}
.imag-type-btn:hover { color: var(--p-base); background: rgba(var(--p-base-rgb), .06); border-color: rgba(var(--p-base-rgb), .4); }
.imag-type-btn--active { color: var(--p-base); background: rgba(var(--p-base-rgb), .12); border-color: rgba(var(--p-base-rgb), .5); }
.imag-type-btn--disabled { opacity: .3; cursor: not-allowed; border-color: rgba(255,255,255,.08); }
.imag-type-btn small { opacity: .6; font-size: .6rem; }

/* ── Imagerie: split timeline + viewer ── */
.imag-split {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 0;
  min-height: 700px;
  border-top: 1px solid rgba(var(--p-base-rgb), .1);
}

/* Timeline verticale */
.imag-timeline {
  border-right: 1px solid rgba(var(--p-base-rgb), .12);
  overflow-y: auto;
  max-height: 750px;
  padding: .4rem 0;
}
.imag-tl-track {
  display: flex; flex-direction: column;
}
.imag-tl-year {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .5rem; font-weight: 700;
  color: var(--p-base);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .4rem .2rem .15rem;
  opacity: .8;
}
.imag-tl-point {
  display: flex; align-items: center; gap: .25rem;
  padding: .3rem .25rem;
  cursor: pointer;
  transition: background .12s;
  border-left: 2px solid transparent;
}
.imag-tl-point:hover {
  background: rgba(var(--p-base-rgb), .06);
}
.imag-tl-point--active {
  background: rgba(var(--p-base-rgb), .1);
  border-left-color: var(--p-base);
}
.imag-tl-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(var(--p-base-rgb), .4);
  flex-shrink: 0;
  transition: all .15s;
}
.imag-tl-point--active .imag-tl-dot {
  background: var(--p-base);
  box-shadow: 0 0 6px rgba(var(--p-base-rgb), .5);
}
.imag-tl-point:hover .imag-tl-dot {
  background: var(--p-base);
}
.imag-tl-info { display: flex; flex-direction: column; min-width: 0; }
.imag-tl-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem; color: rgba(255,255,255,.5);
  letter-spacing: .02em;
}
.imag-tl-point--active .imag-tl-date { color: var(--p-base); }
.imag-tl-name {
  font-size: .6rem; color: rgba(255,255,255,.4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.imag-tl-ext {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .5rem; font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  letter-spacing: .02em;
}
.imag-tl-point--active .imag-tl-ext { color: rgba(var(--p-base-rgb), .7); }

/* Viewer */
.imag-viewer-unsup {
  text-align: center; padding: 2rem;
  color: rgba(255,255,255,.5);
}
.imag-viewer-label {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .85rem; color: rgba(255,255,255,.7);
  margin-bottom: .5rem;
}
.imag-viewer-hint {
  font-size: .75rem; color: rgba(255,255,255,.35);
}
.imag-open-btn {
  display: inline-block;
  margin-top: .75rem;
  padding: .4rem .9rem;
  background: rgba(var(--p-base-rgb), .15);
  border: 1px solid rgba(var(--p-base-rgb), .3);
  border-radius: 6px;
  color: var(--p-light);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .75rem; font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.imag-open-btn:hover {
  background: rgba(var(--p-base-rgb), .25);
  border-color: rgba(var(--p-base-rgb), .5);
}

/* ── Imagerie: viewer header Medical-style ── */
.imag-vw-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: .6rem .8rem;
  background: rgba(var(--p-base-rgb), .06);
  border-bottom: 1px solid rgba(var(--p-base-rgb), .1);
  backdrop-filter: saturate(140%);
  gap: .5rem;
}
.imag-vw-meta { flex: 1; min-width: 0; }
.imag-vw-top {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-bottom: .25rem;
}
.imag-vw-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem; color: rgba(255,255,255,.6);
  letter-spacing: .02em;
}
.imag-vw-badge {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  padding: .1rem .4rem;
  border-radius: 4px;
  background: rgba(var(--p-base-rgb), .12);
  color: var(--p-light);
  border: 1px solid rgba(var(--p-base-rgb), .2);
}
.imag-vw-badge--pro {
  background: rgba(100,200,150,.12);
  border-color: rgba(100,200,150,.25);
  color: rgba(100,200,150,.9);
}
.imag-vw-title {
  font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.imag-vw-facility {
  font-size: .68rem; color: rgba(255,255,255,.4);
  margin-top: .15rem;
}
.imag-vw-actions {
  display: flex; align-items: center; gap: .3rem;
  flex-shrink: 0;
}
.imag-vw-body {
  flex: 1; display: flex; align-items: center; gap: .25rem;
  min-height: 0;
}
.imag-viewer {
  display: flex; flex-direction: column;
  background: rgba(0,0,0,.2);
  min-height: 700px;
  min-width: 500px;
  border-radius: 0 0 6px 0;
}
.imag-viewer-iframe {
  width: 100%; flex: 1; min-height: 680px;
  border: none; border-radius: 0 0 6px 0;
  background: #fff;
}
.imag-viewer-imgwrap {
  flex: 1; display: flex; align-items: center; gap: .25rem;
  padding: 1rem;
}
.imag-viewer-img {
  max-width: 100%; max-height: 680px;
  object-fit: contain;
  border-radius: 4px;
}

.imag-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .55rem;
}
.imag-doc-card {
  padding: .55rem .8rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(var(--p-base-rgb), .15);
  border-left: 2px solid rgba(var(--p-base-rgb), .65);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.imag-doc-card:hover {
  background: rgba(var(--p-base-rgb), .08);
  border-left-color: var(--p-base);
  transform: translateY(-1px);
}
.imag-doc-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  color: var(--p-light);
  margin-bottom: .2rem;
  letter-spacing: .04em;
}
.imag-doc-title {
  font-size: .82rem;
  color: #e4e4e7;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .25rem;
}
.imag-doc-meta {
  display: flex; gap: .4rem; flex-wrap: wrap;
  font-size: .65rem;
  color: rgba(255,255,255,.55);
  font-family: 'Menlo','Consolas',monospace;
}
.imag-doc-prof, .imag-doc-fac {
  background: rgba(var(--p-base-rgb), .1);
  padding: .05rem .35rem;
  border-radius: 3px;
  border: 1px solid rgba(var(--p-base-rgb), .2);
  letter-spacing: .03em;
}


/* ══════════════════════════════════════════════════════════
   INTERVENTIONS VIEW
   ══════════════════════════════════════════════════════════ */
.interv-view {
  position: relative;
}
.interv-grid {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
}

.interv-content {
  padding-top: .65rem;
  display: flex; flex-direction: column; gap: .65rem;
  overflow: hidden;
}

/* Section headers */
.interv-section-head {
  display: flex; align-items: baseline; gap: .75rem;
  margin-bottom: .5rem;
}
.interv-section-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .85rem; font-weight: 700;
  color: var(--p-base);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.interv-section-count {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.45);
}

/* ── Horizontal scrollable timeline ── */
.interv-timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .25rem;
  scrollbar-width: none;
}
.interv-timeline-scroll::-webkit-scrollbar { display: none; }
.interv-frise-card { padding: .6rem .75rem !important; }

/* Model selector in chrono-bar */
.interv-model-select {
  background: rgba(39,39,42,.45);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: .2rem .4rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  cursor: pointer;
  max-width: 200px;
}

/* Zone highlight in charts */
.interv-zone-row--active {
  background: rgba(var(--p-base-rgb), .12);
  border-radius: 4px;
}
.interv-zone-row--active .interv-zone-name {
  color: rgba(255,255,255,.9);
  font-weight: 600;
}
.interv-timeline-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;
  padding: .5rem 0 .25rem;
  position: relative;
}
.interv-timeline-track::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 0; right: 0;
  height: 2px;
  background: rgba(var(--p-base-rgb), .15);
  z-index: 0;
}
.interv-tl-year {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem; font-weight: 700;
  color: var(--p-base);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  background: rgba(var(--p-base-rgb), .08);
  border-radius: 4px;
  margin: 0 .25rem;
  z-index: 1;
  align-self: center;
  flex-shrink: 0;
}
.interv-tl-event {
  display: flex; flex-direction: column; align-items: center;
  gap: .25rem;
  min-width: 140px; max-width: 170px;
  padding: .5rem .4rem .6rem;
  cursor: pointer;
  z-index: 1;
  flex-shrink: 0;
  transition: transform .12s;
  border-radius: 8px;
}
.interv-tl-event:hover {
  background: rgba(var(--p-base-rgb), .08);
  transform: translateY(-2px);
}
.interv-tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(var(--p-base-rgb), .5);
  border: 2px solid rgba(var(--p-base-rgb), .25);
  transition: all .15s;
  flex-shrink: 0;
}
.interv-tl-event:hover .interv-tl-dot {
  background: var(--zone-rgb, var(--p-base));
  box-shadow: 0 0 10px rgba(var(--zone-rgb, var(--p-base-rgb)), .6);
  border-color: rgba(var(--zone-rgb, var(--p-base-rgb)), .8);
  transform: scale(1.2);
}
.interv-tl-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  font-weight: 500;
}
.interv-tl-label {
  font-size: .5rem;
  color: rgba(255,255,255,.4);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.2;
  max-height: 1.2em;
}
.interv-tl-name {
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  max-width: 160px;
}
.interv-tl-chirurgien {
  font-size: .5rem;
  color: rgba(255,255,255,.45);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.interv-tl-docs {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .45rem;
  color: rgba(255,255,255,.35);
}
.interv-tl-zone {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .45rem;
  padding: .1rem .35rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .03em;
  border: 1px solid transparent;
}

/* ── KPI cards row (portal .sante-card) ── */
.interv-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}
.interv-kpi {
  padding: .6rem .75rem !important;
}
.interv-kpi-value {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.3rem; font-weight: 700;
  color: rgb(var(--card-rgb));
  line-height: 1;
  margin-bottom: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.interv-kpi-label {
  font-size: .6rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.interv-kpi-sub {
  font-size: .55rem;
  color: rgba(255,255,255,.35);
  margin-top: .15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail cards row (portal .sante-card) */
.interv-detail-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: .5rem;
}
.interv-detail-card {
  min-width: 0;
  overflow: hidden;
  padding: .6rem .75rem !important;
  min-height: 200px;
  max-height: 200px;
  display: flex;
  flex-direction: column;
}
.interv-detail-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem; font-weight: 600;
  color: var(--p-base);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Pie chart + legend */
.interv-pie-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .8rem;
  gap: .3rem;
  flex: 1;
  min-height: 0;
}
.interv-pie-chart { flex-shrink: 0; }
.interv-zone-legend { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.interv-zone-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Year bars mini chart */
.interv-year-bars {
  display: flex;
  align-items: flex-end;
  gap: .35rem;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .15rem;
}
.interv-year-bars::-webkit-scrollbar { display: none; }
.interv-year-bar-col {
  display: flex; flex-direction: column; align-items: center;
  gap: .15rem;
  flex-shrink: 0;
}
.interv-year-bar {
  width: 28px;
  background: linear-gradient(to top, rgba(var(--p-base-rgb), .3), rgba(var(--p-base-rgb), .6));
  border-radius: 3px 3px 0 0;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .55rem;
  color: var(--p-base);
  text-align: center;
  padding-top: .1rem;
}
.interv-year-bar--empty {
  background: rgba(var(--p-base-rgb), .06);
  border-radius: 2px;
}
.interv-year-label {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .5rem;
  color: rgba(255,255,255,.4);
}
.interv-year-bar-col { cursor: default; }
.interv-year-bar-col:hover .interv-year-bar:not(.interv-year-bar--empty) {
  background: linear-gradient(to top, rgba(var(--p-base-rgb), .5), rgba(var(--p-base-rgb), .85));
  box-shadow: 0 0 6px rgba(var(--p-base-rgb), .4);
}
.interv-year-bar-col:hover .interv-year-label { color: var(--p-base); }

/* Year bar tooltip */
.interv-year-tip {
  position: absolute;
  z-index: 200;
  background: rgba(20,20,30,.95);
  border: 1px solid rgba(var(--p-base-rgb), .25);
  border-radius: 8px;
  padding: .5rem .65rem;
  min-width: 160px;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  pointer-events: none;
}
.interv-year-tip-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  font-weight: 700;
  color: var(--p-base);
  margin-bottom: .3rem;
}
.interv-year-tip-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .6rem;
  color: rgba(255,255,255,.8);
  padding: .1rem 0;
}

/* Zone breakdown list */
.interv-zone-list {
  display: flex; flex-direction: column; gap: .2rem;
}
.interv-zone-row {
  display: flex; align-items: center; gap: .35rem;
  padding: .15rem .2rem;
  border-radius: 4px;
}
.interv-zone-name {
  font-size: .6rem;
  color: rgba(255,255,255,.6);
  flex: 1;
}
.interv-zone-count {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem; font-weight: 700;
}

/* ── Intervention table (expandable rows) ── */
.interv-table-card { padding: .6rem .75rem !important; }
.interv-table {
  display: flex; flex-direction: column; gap: .2rem;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--p-base-rgb), .2) transparent;
}
.interv-table::-webkit-scrollbar { width: 4px; }
.interv-table::-webkit-scrollbar-track { background: transparent; }
.interv-table::-webkit-scrollbar-thumb { background: rgba(var(--p-base-rgb), .2); border-radius: 2px; }
.interv-table::-webkit-scrollbar-thumb:hover { background: rgba(var(--p-base-rgb), .35); }
.interv-row { border-radius: 6px; }
.interv-row[open] { background: rgba(var(--p-base-rgb), .04); }
.interv-row-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .5rem;
  cursor: pointer;
  border-radius: 6px;
  list-style: none;
  transition: background .1s;
  font-size: .7rem;
}
.interv-row-head::-webkit-details-marker { display: none; }
.interv-row-head::marker { content: ''; }
.interv-row-head:hover { background: rgba(var(--p-base-rgb), .06); }
.interv-row-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.interv-row-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
  width: 5.5rem;
}
.interv-row-name {
  flex: 1;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.interv-row-zone {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .55rem;
  text-transform: uppercase;
  flex-shrink: 0;
}
.interv-row-chirurgien {
  font-size: .6rem;
  color: rgba(255,255,255,.4);
  flex-shrink: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.interv-row-docs-count {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .55rem;
  color: rgba(255,255,255,.35);
  flex-shrink: 0;
}
.interv-row-body {
  padding: .25rem .5rem .5rem 1.5rem;
}
.interv-row-desc {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  margin-bottom: .4rem;
  line-height: 1.4;
}
.interv-row-docs-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .3rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.interv-doc-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .2rem .35rem;
  border-radius: 4px;
  font-size: .65rem;
  transition: background .1s;
}
.interv-doc-item:hover { background: rgba(var(--p-base-rgb), .06); }
.interv-doc-role {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .5rem;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  flex-shrink: 0;
  width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.interv-doc-title {
  flex: 1;
  color: rgba(255,255,255,.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.interv-doc-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .55rem;
  color: rgba(255,255,255,.35);
  flex-shrink: 0;
}
.interv-doc-empty {
  font-size: .6rem;
  color: rgba(255,255,255,.3);
  padding: .2rem;
  font-style: italic;
}

/* Popup actions row */
.interv-popup-actions {
  display: flex; justify-content: flex-end;
  margin-top: .3rem;
  padding-top: .3rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Analyze modal */
.interv-analyze-modal { max-width: 520px; }
.interv-analyze-desc {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}
.interv-analyze-desc p { margin: 0 0 .5rem; }
.interv-analyze-desc ul {
  margin: 0 0 .5rem;
  padding-left: 1.2rem;
}
.interv-analyze-desc li {
  margin-bottom: .2rem;
  color: rgba(255,255,255,.6);
}
.interv-analyze-desc strong { color: var(--p-base); }
.interv-analyze-warn {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .6rem;
  border-radius: 6px;
  background: rgba(234,179,8,.08);
  border: 1px solid rgba(234,179,8,.2);
  color: rgb(234,179,8);
  font-size: .7rem;
}
.interv-analyze-model-row {
  display: flex; align-items: center; gap: .6rem;
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.interv-analyze-model-row label {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}
.interv-edit-foot {
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: .6rem .8rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.interv-analyze-cancel {
  padding: .35rem .8rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: rgba(255,255,255,.5);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
}
.interv-analyze-cancel:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
}
.interv-analyze-confirm {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .35rem .9rem;
  border-radius: 6px;
  border: 1px solid rgba(var(--p-base-rgb), .3);
  background: rgba(var(--p-base-rgb), .15);
  color: var(--p-base);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.interv-analyze-confirm:hover {
  background: rgba(var(--p-base-rgb), .25);
  border-color: rgba(var(--p-base-rgb), .5);
  box-shadow: 0 0 12px rgba(var(--p-base-rgb), .2);
}

/* ── Popup overlay ── */
.interv-popup {
  position: absolute;
  z-index: 200;
  pointer-events: auto;
}
.interv-popup-inner {
  background: rgba(24,24,32,.95);
  border: 1px solid rgba(var(--p-base-rgb), .25);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 560px;
  width: 90vw;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.interv-popup-close {
  position: absolute; top: .5rem; right: .75rem;
  background: none; border: none;
  color: rgba(255,255,255,.5);
  font-size: 1.4rem; cursor: pointer;
  line-height: 1;
}
.interv-popup-close:hover { color: #fff; }
.interv-popup-date {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .75rem;
  color: var(--p-base);
  margin-bottom: .25rem;
}
.interv-popup-title {
  font-size: 1rem; font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.interv-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .75rem;
  margin-bottom: .75rem;
}
.interv-popup-field {
  display: flex; flex-direction: column; gap: .1rem;
}
.interv-popup-field--wide { grid-column: 1 / -1; }
.interv-popup-label {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .55rem;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.interv-popup-field span:last-child {
  font-size: .78rem;
  color: rgba(255,255,255,.75);
}
.interv-popup-summary {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
  margin-bottom: .5rem;
  padding: .5rem;
  background: rgba(var(--p-base-rgb), .04);
  border-radius: 6px;
  border-left: 2px solid rgba(var(--p-base-rgb), .2);
}
.interv-popup-conclusion {
  font-size: .72rem;
  color: rgba(var(--p-base-rgb), .8);
  line-height: 1.4;
  margin-bottom: .5rem;
  font-style: italic;
}
.interv-popup-actions {
  display: flex; gap: .5rem; margin-top: .75rem;
}
.interv-popup-link, .interv-popup-btn-edit {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem;
  padding: .3rem .6rem;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.interv-popup-link {
  color: var(--p-base);
  border: 1px solid rgba(var(--p-base-rgb), .25);
  background: transparent;
}
.interv-popup-link:hover {
  background: rgba(var(--p-base-rgb), .1);
  border-color: rgba(var(--p-base-rgb), .5);
}
.interv-popup-btn-edit {
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
}
.interv-popup-btn-edit:hover {
  color: #fff;
  border-color: rgba(255,255,255,.3);
}

/* Fix: mannequin behind content */

.interv-content {
  padding-top: .65rem; position: relative; z-index: 2; }

/* Fix: constrain mannequin in interventions panel */


.interv-popup-docs-count {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .6rem;
  color: rgba(255,255,255,.4);
  margin-top: .5rem;
  padding-top: .4rem;
  border-top: 1px solid rgba(255,255,255,.06);
}


/* ── Edit modal ── */
.interv-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.interv-edit-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.interv-edit-inner {
  position: relative;
  background: rgba(15, 15, 25, .98);
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 12px;
  width: 580px; max-width: 92vw;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.interv-edit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.interv-edit-head h3 {
  margin: 0; font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.85);
}
.interv-edit-close { opacity: .6; }
.interv-edit-close:hover { opacity: 1; }
.interv-edit-body {
  padding: 1rem 1.2rem;
  overflow-y: auto; flex: 1;
}
.interv-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem .8rem;
}
.interv-edit-field {
  display: flex; flex-direction: column; gap: .2rem;
}
.interv-edit-field--wide {
  grid-column: 1 / -1;
}
.interv-edit-field label {
  font-size: .6rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: rgba(255,255,255,.45);
}
.interv-edit-field input,
.interv-edit-field textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  color: rgba(255,255,255,.85);
  padding: .35rem .5rem;
  font-size: .75rem;
  font-family: inherit;
  transition: border-color .15s;
}
.interv-edit-field input:focus,
.interv-edit-field textarea:focus {
  outline: none;
  border-color: rgba(var(--p-base-rgb), .4);
}
.interv-edit-foot {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.interv-edit-delete {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #f87171;
  padding: .3rem .7rem;
  border-radius: 5px;
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.interv-edit-delete:hover {
  background: rgba(239, 68, 68, .2);
  border-color: rgba(239, 68, 68, .5);
}
.interv-edit-cancel {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
  padding: .3rem .7rem;
  border-radius: 5px;
  font-size: .65rem;
  cursor: pointer;
}
.interv-edit-cancel:hover { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.2); }
.interv-edit-save {
  background: rgba(var(--p-base-rgb), .15);
  border: 1px solid rgba(var(--p-base-rgb), .35);
  color: var(--p-base);
  padding: .3rem .9rem;
  border-radius: 5px;
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.interv-edit-save:hover {
  background: rgba(var(--p-base-rgb), .25);
  border-color: rgba(var(--p-base-rgb), .5);
}

/* -- Medicaments view v4 -- */
.med-section-title {
  margin: 0 0 .5rem; color: var(--p-base); font-size: 1rem;
  font-weight: 600; display: flex; align-items: center; gap: .4rem;
}
.med-empty {
  padding: .8rem; text-align: center; color: #64748b; font-style: italic;
  border: 1px dashed rgba(255,255,255,.1); border-radius: 6px; font-size: .82rem;
}
.med-toolbar {
  display: flex; justify-content: flex-end; margin-bottom: .4rem;
}
.med-toolbar-check {
  font-size: .72rem; color: #94a3b8; display: flex; align-items: center; gap: .3rem; cursor: pointer;
}
.med-toolbar-check input { accent-color: var(--p-base); }

/* Treatment block */
.med-treatment-head {
  cursor: pointer; display: flex; align-items: center; gap: .4rem;
  padding: .5rem .7rem; background: rgba(var(--p-base-rgb), .05);
  border: 1px solid rgba(var(--p-base-rgb), .12); border-radius: 6px;
  margin-bottom: .35rem; transition: background .15s;
}
.med-treatment-head:hover { background: rgba(var(--p-base-rgb), .09); }
.med-treatment-block[open] > .med-treatment-head { border-color: rgba(var(--p-base-rgb), .3); background: rgba(var(--p-base-rgb), .08); }
.med-treatment-label { color: #e4e4e7; font-weight: 600; font-size: .88rem; line-height: 1.3; }
.med-treatment-meta { color: #94a3b8; font-size: .7rem; margin-top: .1rem; }

/* Medication row — 3 lignes compactes */
.med-row { border-bottom: 1px solid rgba(255,255,255,.04); }
.med-row:last-child { border-bottom: none; }
.med-row--hidden { opacity: .45; }
.med-row-main {
  display: flex; align-items: flex-start; gap: .35rem; padding: .4rem .3rem;
  transition: background .12s;
}
.med-row:hover .med-row-main { background: rgba(var(--p-base-rgb), .04); }
.med-row-chevron {
  background: none; border: none; color: var(--p-light); cursor: pointer;
  font-size: .7rem; padding: .15rem .1rem; line-height: 1; flex-shrink: 0; opacity: .5; margin-top: .1rem;
}
.med-row-chevron:hover { opacity: 1; }
.med-row-content { flex: 1; min-width: 0; }
.med-row-line1 { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.med-row-name { font-weight: 600; font-size: .82rem; color: #e4e4e7; }
.med-row-dosage { color: var(--p-light); font-size: .7rem; font-family: Menlo, monospace; }
.med-row-line2 { color: #b0b0b0; font-size: .7rem; margin-top: .1rem; line-height: 1.3; }
.med-row-line3 {
  color: #94a3b8; font-size: .68rem; margin-top: .08rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.med-row-actions { display: flex; gap: .1rem; flex-shrink: 0; margin-left: auto; align-items: center; }

/* Row detail */
.med-row-detail { padding: .3rem .5rem .45rem 1.5rem; font-size: .72rem; line-height: 1.5; }
.med-detail-line { color: #d4d4d8; margin-bottom: .1rem; }
.med-detail-label {
  color: #94a3b8; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em;
  margin-right: .3rem; font-weight: 600;
}
.med-detail-notes { color: #94a3b8; font-style: italic; margin-top: .15rem; line-height: 1.4; }

/* Medication row action buttons — standard icon-action-btn, reduced size for inline context */
.med-row-actions .icon-action-btn { width: 24px; height: 24px; }
.med-row-actions .icon-action-btn svg { width: 14px; height: 14px; }
/* Draft validate/reject/reset — standard icon-action-btn, reduced for inline */
.med-draft-validate, .med-draft-reject, .med-draft-reset { width: 26px; height: 26px; }
.med-draft-validate { color: #22c55e; }
.med-draft-validate:hover:not(:disabled) {
  color: #4ade80;
  filter: drop-shadow(0 0 6px rgba(34,197,94,.9)) drop-shadow(0 0 14px rgba(34,197,94,.5));
}


/* Claude card inline */
.med-claude-loading { color: var(--p-light); font-size: .72rem; display: flex; align-items: center; gap: .3rem; padding: .2rem 0; }
.med-claude-card {
  background: rgba(var(--p-base-rgb), .05); border: 1px solid rgba(var(--p-base-rgb), .18);
  border-radius: 6px; padding: .45rem .6rem; margin-top: .3rem;
  font-size: .72rem; line-height: 1.5;
}
.mcc-header { color: var(--p-base); font-weight: 600; margin-bottom: .2rem; font-size: .78rem; }
.mcc-desc { color: #d4d4d8; margin-bottom: .25rem; }
.mcc-line { color: #d4d4d8; margin-bottom: .15rem; }
.mcc-label { color: var(--p-light); font-weight: 600; margin-right: .25rem; }
.mcc-warn .mcc-label { color: var(--c-state-alert); }
.mcc-danger .mcc-label { color: var(--c-state-alarm); }
.mcc-alert { color: var(--c-state-alarm); font-weight: 600; margin-top: .2rem; display: flex; align-items: flex-start; gap: .3rem; }

/* Modal Claude */
.med-modal-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.med-modal {
  background: #1c1c1e; border: 1px solid rgba(var(--p-base-rgb), .3);
  border-radius: 10px; width: min(520px, 92vw); max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.med-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem .85rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.med-modal-title { font-weight: 600; font-size: .95rem; color: var(--p-base); }
.med-modal-close {
  background: none; border: none; color: #94a3b8; font-size: 1.2rem;
  cursor: pointer; padding: 0 .2rem; line-height: 1;
}
.med-modal-close:hover { color: #e4e4e7; }
.med-modal-body { padding: .65rem .85rem; }
.med-modal-select {
  width: 100%; padding: .35rem .5rem; background: #2a2a2e; border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px; color: #e4e4e7; font-size: .78rem; font-family: inherit;
}
.med-modal-input {
  width: 100%; padding: .35rem .5rem; background: #2a2a2e; border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px; color: #e4e4e7; font-size: .78rem; font-family: inherit;
}
.med-modal-input:focus, .med-modal-select:focus { outline: none; border-color: var(--p-base); }
.med-modal-foot {
  padding: .5rem .85rem; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: flex-end;
}
.med-modal-btn {
  background: rgba(var(--p-base-rgb), .2); border: 1px solid rgba(var(--p-base-rgb), .5);
  color: var(--p-base); padding: .4rem .8rem; border-radius: 5px; cursor: pointer;
  font-size: .8rem; font-weight: 600; transition: background .15s;
}
.med-modal-btn:hover { background: rgba(var(--p-base-rgb), .35); }
#med-modal-result { padding: .5rem .85rem; max-height: 40vh; overflow-y: auto; }

.spin-dot {
  display: inline-block; width: .5rem; height: .5rem;
  border-radius: 50%; border: 2px solid var(--p-base);
  border-top-color: transparent; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Praticiens collapsed compact */
.med-treatment-block:not([open]) { padding: .35rem .6rem; }
.med-treatment-block:not([open]) .med-treatment-head { margin-bottom: 0; padding: .25rem .4rem; }

/* ── Praticiens view ── */
.prat-spec-pill {
  font-size: .58rem; text-transform: uppercase; letter-spacing: .04em;
  font-family: 'Menlo','Consolas',monospace;
  color: var(--pill-color, #94a3b8);
  border: 1px solid var(--pill-color, rgba(148,163,184,.4));
  background: color-mix(in srgb, var(--pill-color, #94a3b8) 12%, transparent);
  padding: .05rem .35rem; border-radius: 3px;
}
.prat-zone-badge {
  display: inline-block; font-size: .55rem; text-transform: uppercase; letter-spacing: .03em;
  font-family: 'Menlo','Consolas',monospace;
  color: var(--pill-color, #94a3b8);
  background: color-mix(in srgb, var(--pill-color, #94a3b8) 10%, transparent);
  border: 1px solid var(--pill-color, rgba(148,163,184,.25));
  padding: .02rem .3rem; border-radius: 10px; margin-left: .2rem;
}
.prat-field-label { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; color: #94a3b8; }
.prat-input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px; padding: .4rem .5rem; color: inherit; font-size: .8rem;
  font-family: inherit;
}
.prat-input:focus { border-color: var(--p-base, #60a5fa); outline: none; }
.prat-save-btn {
  background: var(--p-base, #60a5fa); color: #fff; border: none;
  padding: .4rem 1rem; border-radius: 4px; font-size: .8rem; cursor: pointer;
}
.prat-save-btn:hover { opacity: .9; }

/* Chrono filters slot flex */
.chrono-filters { display: flex; align-items: center; gap: .4rem; }

/* ── Standard: Chart dot pulse animation (points hors-norme) ── */
@keyframes chart-pulse {
  0% { r: 3; opacity: .85; }
  50% { r: 7; opacity: .3; }
  100% { r: 3; opacity: .85; }
}
.chart-dot-pulse {
  animation: chart-pulse 2s ease-in-out infinite;
}

/* ── Standard: Chart point click popup ── */
.chart-point-popup {
  position: absolute; z-index: 9999;
  background: rgba(20, 20, 28, .95);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: .6rem .8rem;
  min-width: 180px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  font-size: .78rem;
  color: #e2e8f0;
}
.cpp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.cpp-marker { font-family: Menlo, Consolas, monospace; font-size: .7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.cpp-status { font-size: .65rem; font-weight: 600; padding: .1rem .35rem; border-radius: 4px; }
.dot-status-ok { color: #22c55e; background: rgba(34,197,94,.12); }
.dot-status-warn { color: #ef4444; background: rgba(239,68,68,.12); }
.cpp-value { font-size: 1.3rem; font-weight: 700; color: #f8fafc; margin: .15rem 0; }
.cpp-unit { font-size: .7rem; font-weight: 400; color: #94a3b8; }
.cpp-date { font-size: .7rem; color: #64748b; margin-bottom: .5rem; }
.cpp-actions { display: flex; gap: .4rem; }
/* chart point popup actions — standard icon-action-btn */
.cpp-actions .icon-action-btn { width: 28px; height: 28px; }

/* ── Med stats cards ── */
.med-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; }
.med-stat-card {
  padding: .7rem .8rem;
  border-left: 3px solid rgb(var(--card-rgb, 148,163,184));
  background: rgba(var(--card-rgb, 148,163,184), .04);
}
.med-stat-title {
  font-size: .78rem; font-weight: 600; color: #e2e8f0;
  margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .03em;
}
.mstat-bars { display: flex; align-items: flex-end; gap: 3px; min-height: 80px; padding-top: .3rem; }
.mstat-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; }
.mstat-bar {
  width: 100%; border-radius: 3px 3px 0 0;
  font-size: .6rem; color: #f8fafc; text-align: center; padding-top: 2px;
  transition: height .3s;
}
.mstat-bar-label { font-size: .55rem; color: #64748b; margin-top: 2px; }
.mstat-top { display: flex; flex-direction: column; gap: .25rem; }
.mstat-top-row { display: flex; align-items: center; gap: .4rem; }
.mstat-top-name { font-size: .68rem; color: #cbd5e1; width: 150px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mstat-top-bar-bg { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.mstat-top-bar {
  height: 100%;
  background: linear-gradient(to right, rgba(var(--p-base-rgb),.75), rgba(var(--p-base-rgb),.45));
  box-shadow: 0 0 6px rgba(var(--p-base-rgb),.25);
  border-radius: 2px;
}
.mstat-top-count { font-size: .65rem; color: #94a3b8; min-width: 20px; text-align: right; font-family: Menlo, monospace; }
.mstat-classes { display: flex; flex-direction: column; gap: .2rem; }
.mstat-classe-row { display: flex; align-items: center; gap: .35rem; }
.mstat-classe-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mstat-classe-name { font-size: .68rem; color: #cbd5e1; flex: 1; }
.mstat-classe-pct { font-size: .6rem; color: #94a3b8; font-family: Menlo, monospace; min-width: 28px; text-align: right; }
.mstat-classe-n { font-size: .6rem; color: #64748b; font-family: Menlo, monospace; min-width: 16px; text-align: right; }

/* ── Responsive fixes — Imagerie + global ── */
@media (max-width: 900px) {
  .imag-split {
    grid-template-columns: 60px minmax(0, 1fr);
    min-height: 400px;
  }
  .imag-split .imag-timeline { max-height: 450px; }
  .imag-viewer-iframe { height: 500px !important; }
}
@media (max-width: 680px) {
  .imag-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .imag-timeline {
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid rgba(var(--p-base-rgb), .12);
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .2rem;
  }
  .imag-tl-track { flex-direction: row; }
  .imag-viewer { min-height: 350px; }
  .imag-viewer-iframe { height: 400px !important; }
}

/* Blood/Bio charts responsive */
@media (max-width: 680px) {
  .blood-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .blood-charts-grid { grid-template-columns: 1fr !important; }
  .blood-chart-card .bcc-body svg { min-height: 120px; }
  .med-stats-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .blood-kpi-grid { grid-template-columns: 1fr !important; }
}

/* Interventions responsive */
@media (max-width: 900px) {
  .interv-grid { grid-template-columns: 1fr !important; }
  .interv-detail-row { grid-template-columns: 1fr !important; flex-direction: column !important; }
  .interv-pie-wrap { flex-direction: row !important; }
}
@media (max-width: 680px) {
  .interv-kpi-row { grid-template-columns: repeat(2, 1fr) !important; }
  .interv-timeline-scroll { max-height: 250px; }
}

/* Praticiens responsive */
@media (max-width: 680px) {
  .prat-row-item .med-row-content { font-size: .72rem; }
  .prat-spec-pill { font-size: .5rem; }
  .prat-zone-badge { font-size: .48rem; }
}

/* Chart popup responsive */
@media (max-width: 480px) {
  .chart-point-popup { min-width: 150px; max-width: 220px; }
  .chart-point-popup .cpp-value { font-size: 1rem; }
}

/* ── Standard global : modale Analyse Claude (.cl-analyze-*) ── */
.cl-analyze-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.cl-analyze-inner {
  position: relative;
  background: rgba(15, 15, 25, .98);
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 12px;
  width: min(520px, 92vw);
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
}
.cl-analyze-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cl-analyze-head h3 {
  margin: 0; font-size: .9rem; font-weight: 700;
  color: rgba(255,255,255,.85);
  display: flex; align-items: center; gap: .4rem;
}
.cl-analyze-close {
  background: none; border: none; color: rgba(255,255,255,.4);
  font-size: 1.4rem; cursor: pointer; padding: 0 .3rem;
}
.cl-analyze-close:hover { color: #fff; }
.cl-analyze-body {
  padding: 1rem 1.2rem;
  overflow-y: auto; flex: 1;
}
.cl-analyze-desc {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}
.cl-analyze-desc p { margin: 0 0 .5rem; }
.cl-analyze-desc ul {
  margin: 0 0 .5rem;
  padding-left: 1.2rem;
}
.cl-analyze-desc li {
  margin-bottom: .2rem;
  color: rgba(255,255,255,.6);
}
.cl-analyze-desc strong { color: var(--p-base); }
.cl-analyze-warn {
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .6rem;
  border-radius: 6px;
  background: rgba(234,179,8,.08);
  border: 1px solid rgba(234,179,8,.2);
  color: rgb(234,179,8);
  font-size: .7rem;
  margin-top: .35rem;
}
.cl-analyze-model-row {
  display: flex; align-items: center; gap: .6rem;
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cl-analyze-model-row label {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}
.cl-analyze-model-row select {
  flex: 1;
  padding: .35rem .5rem;
  background: #2a2a2e;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  color: #e4e4e7;
  font-size: .78rem;
  font-family: inherit;
}
.cl-analyze-model-row select:focus { outline: none; border-color: var(--p-base); }
.cl-analyze-question-row {
  margin-top: .5rem;
}
.cl-analyze-question-row label {
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  display: block;
  margin-bottom: .2rem;
}
.cl-analyze-question-row input {
  width: 100%; padding: .35rem .5rem;
  background: #2a2a2e;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  color: #e4e4e7;
  font-size: .78rem;
  font-family: inherit;
}
.cl-analyze-question-row input:focus { outline: none; border-color: var(--p-base); }
.cl-analyze-foot {
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: .6rem .8rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cl-analyze-cancel {
  padding: .35rem .8rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: rgba(255,255,255,.5);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
}
.cl-analyze-cancel:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
}
.cl-analyze-confirm {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .35rem .9rem;
  border-radius: 6px;
  border: 1px solid rgba(var(--p-base-rgb), .3);
  background: rgba(var(--p-base-rgb), .15);
  color: var(--p-base);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.cl-analyze-confirm:hover {
  background: rgba(var(--p-base-rgb), .25);
  border-color: rgba(var(--p-base-rgb), .5);
  box-shadow: 0 0 12px rgba(var(--p-base-rgb), .2);
}
.cl-analyze-result {
  padding: .5rem 1.2rem;
  max-height: 40vh;
  overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cl-analyze-loading {
  display: flex; align-items: center; gap: .4rem;
  color: rgba(255,255,255,.6); font-size: .75rem; padding: .3rem 0;
}

/* ── Historique ordonnances — cartes standard ── */
.med-ordo-card {
  background: rgba(var(--p-base-rgb), .04);
  border: 1px solid rgba(var(--p-base-rgb), .12);
  border-left: 3px solid rgba(var(--p-base-rgb), .4);
  border-radius: 8px;
  margin-bottom: .6rem;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.med-ordo-card:hover {
  border-color: rgba(var(--p-base-rgb), .25);
  background: rgba(var(--p-base-rgb), .06);
}
.med-ordo-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .8rem;
  cursor: pointer;
  user-select: none;
}
.med-ordo-head:hover { background: rgba(var(--p-base-rgb), .06); }
.med-ordo-chevron {
  color: rgba(255,255,255,.35);
  font-size: .7rem;
  flex-shrink: 0;
  transition: transform .15s;
}
.med-ordo-card[open] > .med-ordo-head .med-ordo-chevron { transform: rotate(90deg); }
.med-ordo-label {
  flex: 1; min-width: 0;
}
.med-ordo-title {
  font-weight: 600; font-size: .82rem; color: #e4e4e7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.med-ordo-meta {
  font-size: .65rem; color: #94a3b8; margin-top: .1rem;
}
.med-ordo-count {
  font-size: .68rem; color: rgba(var(--p-base-rgb), .7);
  font-weight: 600;
  flex-shrink: 0;
}
.med-ordo-body {
  padding: .2rem .6rem .5rem .6rem;
  border-top: 1px solid rgba(var(--p-base-rgb), .08);
}

/* ── Med item card (inside ordonnance) ── */
.med-item-card {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 6px;
  margin: .35rem 0;
  padding: .45rem .6rem;
  transition: border-color .15s, background .15s;
}
.med-item-card:hover {
  border-color: rgba(var(--p-base-rgb), .2);
  background: rgba(var(--p-base-rgb), .04);
}

/* ── Top med popup ── */
.med-info-popup {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.med-info-card {
  background: rgba(15, 15, 25, .98);
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 12px;
  width: min(480px, 92vw);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
  padding: 1rem 1.2rem;
}
.med-info-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .6rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.med-info-head h3 {
  margin: 0; font-size: .9rem; font-weight: 700; color: var(--p-base);
}
.med-info-close { opacity: .6; }
.med-info-close:hover { opacity: 1; }
.med-info-loading {
  display: flex; align-items: center; gap: .4rem;
  color: rgba(255,255,255,.6); font-size: .75rem; padding: .8rem 0;
}
.mstat-top-row { cursor: pointer; }
.mstat-top-row:hover { background: rgba(var(--p-base-rgb), .06); border-radius: 4px; }

/* kpi-score-card default tint — uses --card-rgb when no score-ok/warn/crit */
.kpi-card.kpi-score-card:not(.score-ok):not(.score-warn):not(.score-crit) {
  border-top: 1px solid rgba(var(--card-rgb), .4);
  border-right: 1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left: 2px solid rgba(var(--card-rgb), .85);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb), .1) 0%, rgba(var(--card-rgb), .03) 50%, rgba(24, 24, 27, .5) 100%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
}
.kpi-card.kpi-score-card:not(.score-ok):not(.score-warn):not(.score-crit) .kpi-score {
  color: rgb(var(--card-rgb));
}

/* ── Journal entries ── */
.journ-entry {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  padding: .55rem .85rem;
  margin-bottom: .45rem;
  border: 1px solid rgba(var(--card-rgb), .25);
  border-left: 3px solid rgba(var(--card-rgb), .7);
  background: linear-gradient(135deg, rgba(var(--card-rgb), .08) 0%, rgba(24,24,27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  box-shadow: inset 8px 0 14px -8px rgba(var(--card-rgb), .4), 0 2px 8px rgba(0,0,0,.2);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.journ-entry:hover {
  border-color: rgba(var(--card-rgb), .5);
  box-shadow: inset 8px 0 14px -8px rgba(var(--card-rgb), .6), 0 4px 16px rgba(0,0,0,.3);
}
.journ-entry-hidden { opacity: .45; }
.journ-entry-head {
  display: flex; align-items: center; gap: .5rem; min-height: 1.6rem;
}
.journ-date {
  color: var(--p-light); font-family: 'Menlo',monospace; font-size: .72rem; flex-shrink: 0;
}
.journ-cat {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--p-base); border: 1px solid rgba(var(--p-base-rgb), .35);
  background: rgba(var(--p-base-rgb), .1); padding: .05rem .35rem;
  border-radius: 3px; font-family: 'Menlo',monospace; flex-shrink: 0;
}
.journ-title {
  color: #e4e4e7; font-size: .88rem; flex: 1; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.journ-actions {
  display: flex; gap: 2px; flex-shrink: 0; margin-left: auto;
}
.journ-actions .icon-action-btn { width: 26px; height: 26px; }
.journ-entry-body {
  display: none; color: #d4d4d8; font-size: .82rem; line-height: 1.55;
  padding: .4rem 0 .15rem; border-top: 1px solid rgba(255,255,255,.06); margin-top: .35rem;
}
.journ-entry.expanded .journ-entry-body { display: block; }
.journ-tags {
  display: none; gap: .3rem; flex-wrap: wrap; padding-top: .3rem;
}
.journ-entry.expanded .journ-tags { display: flex; }
.journ-tag {
  font-size: .62rem; color: var(--p-light); background: rgba(var(--p-base-rgb), .12);
  border: 1px solid rgba(var(--p-base-rgb), .2); border-radius: 3px;
  padding: .05rem .3rem; font-family: 'Menlo',monospace;
}
/* Journal modal */
.journal-modal {
  background: rgba(24, 24, 27, .95); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 1.2rem 1.4rem; width: min(520px, 90vw);
  backdrop-filter: blur(32px); box-shadow: 0 12px 40px rgba(0,0,0,.5);
}

/* ── Stats view (Statistiques) ─────────────────────────────────────────── */
/* Audit card: margin only, glass comes from .blood-synthesis wrapper */
.stats-audit-card {
  margin-bottom: 1.2rem;
}
/* stats combo now uses shared .bs-depth/.bs-model rule */
.stats-section-title {
  font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; color: var(--p-base);
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase;
  margin: 1.2rem 0 .7rem;
  display: flex; align-items: center; gap: .4rem;
}
.stats-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: .5rem;
}
.stats-card-empty {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; opacity: .3;
}
.stats-corr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
/* Charts & corr cards: exact .blood-chart-card pattern from Biométrie */
.stats-chart-card, .stats-corr-card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border-top: 1px solid rgba(var(--card-rgb, var(--p-base-rgb)), .4);
  border-right: 1px solid rgba(var(--card-rgb, var(--p-base-rgb)), .4);
  border-bottom: 1px solid rgba(var(--card-rgb, var(--p-base-rgb)), .4);
  border-left: 2px solid rgba(var(--card-rgb, var(--p-base-rgb)), .85);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb, var(--p-base-rgb)), .12), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb, var(--p-base-rgb)), .08) 0%, rgba(var(--card-rgb, var(--p-base-rgb)), .025) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb, var(--p-base-rgb)), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
}
/* Header: same as .bcc-header */
.stats-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .85rem;
  padding: .85rem 1.1rem .45rem;
  flex-wrap: nowrap;
  text-align: left;
}
.stats-card-title-line {
  display: inline-flex; align-items: baseline; gap: .45rem;
  flex: 1; min-width: 0;
  flex-wrap: wrap;
}
.stats-card-title {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.15;
}
.stats-card-unit {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}
.stats-card-vs {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .72rem; color: rgba(255,255,255,.35);
  text-transform: uppercase; letter-spacing: .04em;
}
/* Body */
.stats-card-body {
  padding: .25rem .35rem .15rem;
}
/* Footer: same as .bcc-footer-text */
.stats-card-footer {
  padding: .45rem 1.1rem .85rem;
  border-top: 1px dashed rgba(var(--card-rgb, var(--p-base-rgb)), .15);
  margin-top: .25rem;
  display: flex; gap: .7rem; flex-wrap: wrap;
  font-size: .78rem; color: #a1a1aa;
  font-family: 'Menlo','Consolas',monospace;
}
/* Correlation cards */
.stats-corr-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
}
.stats-corr-plot {
  display: flex; flex-direction: column;
}
.stats-corr-coef {
  display: flex; flex-direction: column;
  justify-content: center;
  padding: .85rem 1rem;
}
.stats-corr-r {
  font-size: 2.4rem; font-weight: 700; line-height: 1;
  font-family: 'Menlo','Consolas',monospace;
}
.stats-corr-interp {
  font-size: .78rem; color: #a1a1aa;
  margin-top: .4rem; line-height: 1.4;
}
.stats-corr-explain {
  font-size: .74rem; color: rgba(255,255,255,.6);
  margin-top: .5rem; line-height: 1.5;
  font-style: italic;
}
@media (max-width: 900px) {
  .stats-charts-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-corr-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-charts-grid { grid-template-columns: 1fr; }
  .stats-corr-card   { grid-template-columns: 1fr; }
}

/* ── Collapsible audit card (.bs-collapse) — standard design pattern ── */
/* Matches claude-systeme .dash-collapse layout exactly:
   LEFT:  [chev] [title]
   RIGHT: [badges] [score-box] [edit?] [pin]
   Badges pushed right via margin-left:auto. Score in bordered box. */

.bs-collapse { border: none; margin: 0; padding: 0; }

/* Reduce parent .blood-synthesis padding when collapsed */
.blood-synthesis:has(> .bs-collapse:not([open])) {
  padding: .25rem .5rem;
}

.bs-collapse > .bsc-summary {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  padding: .35rem .5rem;
  cursor: pointer; list-style: none;
  transition: background .15s;
  user-select: none;
}
.bs-collapse > .bsc-summary::-webkit-details-marker { display: none; }
.bs-collapse > .bsc-summary:hover { background: rgba(var(--p-base-rgb, 148,163,184), .05); }
.bs-collapse[open] > .bsc-summary {
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: .5rem; padding-bottom: .45rem;
}

.bsc-chev {
  color: var(--p-light, #94a3b8); opacity: .55; font-size: .85rem;
  transition: transform .15s; flex-shrink: 0; width: 12px;
  align-self: center;
}
.bs-collapse[open] > .bsc-summary .bsc-chev {
  transform: rotate(90deg); color: var(--p-base, #64748b); opacity: 1;
}

.bsc-title {
  font-size: .92rem !important; font-weight: 600; color: var(--p-base, #94a3b8);
  font-family: 'Menlo','Consolas',monospace;
  letter-spacing: .03em;
  display: inline-flex; align-items: center; gap: .35rem;
  white-space: nowrap; flex-shrink: 0;
  align-self: center;
  line-height: 1.2;
}

.bsc-badges {
  display: inline-flex; align-items: center; gap: .3rem;
  flex-wrap: wrap; justify-content: flex-end;
  margin-left: auto;
  font-size: .75rem; line-height: 1.2;
  flex-shrink: 1; min-width: 0;
}
.bsc-badges:empty { display: none; }
.bsc-badges .bs-cnt { padding: .1rem .4rem; line-height: 1.4; white-space: nowrap; }

.bsc-score-slot {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; align-self: center;
}
.bsc-score-slot .bs-score-big {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 34px;
  padding: 0 .45rem;
  border: none; background: none;
  font-size: 1.1rem; font-weight: 700;
  font-family: 'Menlo','Consolas',monospace;
  letter-spacing: -.01em;
  white-space: nowrap; line-height: 1;
}
.bsc-score-slot .bs-score-big .bsb-unit {
  font-size: .55em; opacity: .65; margin-left: 1px; font-weight: 600;
  line-height: 1; align-self: center;
}

.bsc-pin {
  background: none; border: none; cursor: pointer;
  color: var(--p-light, #94a3b8); opacity: .3;
  padding: .2rem; border-radius: .3rem;
  transition: opacity .15s, transform .15s, color .15s;
  flex-shrink: 0; align-self: center; margin-left: 0;
}
.bsc-pin svg { display: block; }
.bsc-pin:hover { opacity: 1; color: var(--p-glow, var(--p-base)); }
.bsc-pin.pinned {
  color: var(--p-base); opacity: 1;
  transform: rotate(-45deg);
  background: transparent;
}
.bsc-pin.pinned:hover { transform: rotate(-30deg) scale(1.08); }

.bsc-edit {
  background: none; border: none; cursor: pointer;
  color: var(--p-light, #94a3b8); opacity: .35;
  padding: .2rem; border-radius: .3rem;
  transition: opacity .15s, color .15s;
  flex-shrink: 0; align-self: center;
}
.bsc-edit:hover { opacity: 1; color: var(--p-glow, var(--p-base)); }

.bsc-body { padding: 0; }
.bs-collapse:not([open]) > .bsc-body { display: none; }

/* ── Audit config modal (uses std-side + std-grid from portal.css) ── */
.acm-prompt {
  font-size: .73rem; background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.08); border-radius: .4rem;
  padding: .6rem; max-height: 22vh; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
  color: rgba(255,255,255,.6); line-height: 1.4;
}
.acm-sub-row {
  margin: 0 0 .3rem 1.5rem; padding: .4rem 0 .2rem .7rem;
  border-left: 2px solid rgba(var(--p-base-rgb), .25);
}
.acm-sub-row label { margin-bottom: .3rem; }

/* ── Chart crosshair + hover tooltip ──────────────────────────────── */
.chart-crosshair { pointer-events: none; }
.chart-hover-zone { cursor: crosshair; }
.chart-dot[data-hover="1"] {
  r: 5; stroke: rgba(255,255,255,.8); stroke-width: 1.5;
  filter: drop-shadow(0 0 4px currentColor);
  transition: r .1s, stroke .1s;
}
.chart-crosshair-tip {
  position: absolute; z-index: 9999; pointer-events: none;
  background: rgba(15, 15, 20, .92);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: .4rem;
  padding: .35rem .55rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .78rem;
  line-height: 1.4;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  white-space: nowrap;
  max-width: 250px;
}
.cct-date { color: rgba(255,255,255,.6); font-size: .72rem; }
.cct-value { font-weight: 700; font-size: .9rem; }
.cct-unit { font-weight: 400; font-size: .72rem; opacity: .65; }

/* Excluded points link & panel */
.excluded-points-link {
  display: inline-block;
  margin: 12px 0 4px 16px;
  font-size: .82rem;
  color: rgba(251,146,60,.8);
  text-decoration: underline dashed rgba(251,146,60,.4);
  cursor: pointer;
  letter-spacing: .02em;
}
.excluded-points-link:hover { color: #fb923c; }

.excluded-panel-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
}
.excluded-panel {
  background: rgba(24,24,27,.97);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .2);
  border-radius: 12px;
  min-width: 360px; max-width: 520px; max-height: 70vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.excluded-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  font-weight: 600; font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.excluded-panel-list {
  overflow-y: auto; padding: 8px 12px 12px;
}
.excluded-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .85rem;
}
.excluded-row:last-child { border-bottom: none; }
.excluded-key {
  flex: 1; font-weight: 500; color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 140px;
}
.excluded-val {
  color: #fb923c; font-weight: 600; min-width: 50px; text-align: right;
}
.excluded-date {
  color: rgba(255,255,255,.5); font-size: .78rem; min-width: 80px;
}
.excluded-restore {
  color: #4ade80 !important;
}
.excluded-restore:hover { color: #22c55e !important; }
.excluded-empty {
  text-align: center; padding: 24px;
  color: rgba(255,255,255,.4); font-style: italic;
}

/* Bio chart group headers */
.bio-chart-group-head {
  grid-column: 1 / -1;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 18px 0 4px 10px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Vue d'ensemble — Layout + Bar Gauges + Mannequin + Score
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout 3 colonnes ── */
.ov-layout {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 16px;
  padding: 16px 0 0;
  position: relative;
}
.ov-col-left { display: flex; flex-direction: column; gap: 14px; }
.ov-col-center { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ov-col-right { display: flex; flex-direction: column; gap: 14px; }

/* ── Score card (rectangular KPI + badges) ── */
.ov-score-card { padding: 10px 14px !important; }
.ov-score-card-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ov-score-card-left { flex-shrink: 0; }
.ov-score-card-value {
  font-size: 2.6rem; font-weight: 800; line-height: 1; margin-top: 4px;
  display: flex; align-items: baseline; gap: 6px;
}
.ov-score-card-value small {
  font-size: 1rem; font-weight: 400; opacity: .5;
}
.ov-score-trend-inline {
  font-size: 1.6rem; font-weight: 700; line-height: 1;
}
.ov-score-badges {
  display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0;
}
.ov-score-badge {
  display: block; text-align: center;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2.5px 0;
  border-radius: 4px;
  background: rgba(var(--badge-rgb), .18);
  color: rgb(var(--badge-rgb));
  border: 1px solid rgba(var(--badge-rgb), .35);
}

/* ── Mannequin ── */
.ov-mannequin-wrap { width: 100%; max-width: 360px; max-height: 570px; position: relative; overflow: hidden; }
.ov-mannequin-wrap .anat-stack { max-height: 570px; }
.ov-mannequin-wrap .anat-overlay-wrap { max-height: 570px; overflow: hidden; }
.ov-mannequin-wrap svg { max-height: 540px; width: auto; }
.ov-mannequin-wrap img { max-height: 540px; width: auto; }

/* Organ animations */
@keyframes ovHeartbeat {
  0%   { transform: scale(1);    filter: brightness(1)   drop-shadow(0 0 2px rgba(140,20,20,.25)); }
  3%   { transform: scale(1.06); filter: brightness(1.15) drop-shadow(0 0 6px rgba(180,30,30,.5)); }
  6%   { transform: scale(1.14); filter: brightness(1.35) drop-shadow(0 0 12px rgba(200,40,40,.75)); }
  9%   { transform: scale(1.04); filter: brightness(1.08) drop-shadow(0 0 4px rgba(160,25,25,.35)); }
  13%  { transform: scale(1.01); filter: brightness(1.02) drop-shadow(0 0 3px rgba(140,20,20,.3)); }
  16%  { transform: scale(1.10); filter: brightness(1.28) drop-shadow(0 0 10px rgba(190,35,35,.65)); }
  20%  { transform: scale(1.03); filter: brightness(1.06) drop-shadow(0 0 4px rgba(150,25,25,.35)); }
  26%  { transform: scale(1);    filter: brightness(1)   drop-shadow(0 0 2px rgba(140,20,20,.25)); }
  100% { transform: scale(1);    filter: brightness(1)   drop-shadow(0 0 2px rgba(140,20,20,.25)); }
}
.ov-organ-heart {
  animation: ovHeartbeat 1.15s ease-in-out infinite;
  fill: #8B1A1A !important;
  opacity: 1 !important;
  transform-origin: center;
  transform-box: fill-box;
  stroke: #5C0E0E !important;
  stroke-width: 0.5 !important;
}

@keyframes ovBreathe {
  0%  { transform: scaleX(0.88) scaleY(0.94); filter: brightness(0.75) drop-shadow(0 0 2px rgba(14,165,233,.15)); }
  5%  { transform: scaleX(0.92) scaleY(0.96); filter: brightness(0.82) drop-shadow(0 0 3px rgba(14,165,233,.2)); }
  15% { transform: scaleX(1.08) scaleY(1.04); filter: brightness(1.1) drop-shadow(0 0 8px rgba(14,165,233,.45)); }
  30% { transform: scaleX(1.25) scaleY(1.12); filter: brightness(1.5) drop-shadow(0 0 20px rgba(14,165,233,.9)); }
  40% { transform: scaleX(1.20) scaleY(1.10); filter: brightness(1.35) drop-shadow(0 0 16px rgba(14,165,233,.75)); }
  55% { transform: scaleX(1.05) scaleY(1.02); filter: brightness(1.0) drop-shadow(0 0 6px rgba(14,165,233,.35)); }
  70% { transform: scaleX(0.92) scaleY(0.96); filter: brightness(0.82) drop-shadow(0 0 3px rgba(14,165,233,.2)); }
  85% { transform: scaleX(0.88) scaleY(0.94); filter: brightness(0.75) drop-shadow(0 0 2px rgba(14,165,233,.15)); }
  100%{ transform: scaleX(0.88) scaleY(0.94); filter: brightness(0.75) drop-shadow(0 0 2px rgba(14,165,233,.15)); }
}
.ov-organ-lung {
  animation: ovBreathe 4.5s ease-in-out infinite;
  fill: rgba(14,165,233,.75) !important;
  opacity: 1 !important;
  transform-origin: center;
  transform-box: fill-box;
}
.ov-organ-lung--left { animation-delay: 0.15s; }

@keyframes ovNeural {
  0%, 100% { opacity: 0.4; filter: brightness(1) drop-shadow(0 0 2px rgba(168,85,247,.2)); }
  20% { opacity: 1; filter: brightness(2) drop-shadow(0 0 12px rgba(168,85,247,.8)); }
  40% { opacity: 0.5; filter: brightness(1.1) drop-shadow(0 0 3px rgba(168,85,247,.3)); }
  60% { opacity: 0.95; filter: brightness(1.9) drop-shadow(0 0 14px rgba(168,85,247,.9)); }
  80% { opacity: 0.45; filter: brightness(1) drop-shadow(0 0 2px rgba(168,85,247,.2)); }
}
.ov-organ-brain {
  animation: ovNeural 3s ease-in-out infinite;
  fill: rgba(168,85,247,.7) !important;
}

/* Watch zones — two severity levels (warn=orange, crit=red) */
/* Halo pulsé large + pulsation de taille */
@keyframes ovWatchCrit {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(239,68,68,.7)) drop-shadow(0 0 20px rgba(239,68,68,.4)) drop-shadow(0 0 40px rgba(239,68,68,.15));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(239,68,68,1)) drop-shadow(0 0 32px rgba(239,68,68,.7)) drop-shadow(0 0 50px rgba(239,68,68,.35));
    transform: scale(1.08);
  }
}
@keyframes ovWatchWarn {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(245,158,11,.6)) drop-shadow(0 0 16px rgba(245,158,11,.35)) drop-shadow(0 0 32px rgba(245,158,11,.12));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(245,158,11,.95)) drop-shadow(0 0 28px rgba(245,158,11,.6)) drop-shadow(0 0 44px rgba(245,158,11,.25));
    transform: scale(1.06);
  }
}
.ov-zone-watch {
  animation: ovWatchCrit 1.6s ease-in-out infinite !important;
  stroke: rgba(239,68,68,1) !important;
  stroke-width: 2.5 !important;
  fill: rgba(239,68,68,.45) !important;
  opacity: .9 !important;
  transform-origin: center !important;
  transform-box: fill-box !important;
}
.ov-zone-watch-warn {
  animation: ovWatchWarn 2s ease-in-out infinite !important;
  stroke: rgba(245,158,11,1) !important;
  stroke-width: 2.5 !important;
  fill: rgba(245,158,11,.5) !important;
  opacity: .85 !important;
  transform-origin: center !important;
  transform-box: fill-box !important;
}

/* Gauge groups — KPI score card design */
.ov-gauge-group {
  --card-rgb: 34,197,94;
  border-top: 1px solid rgba(var(--card-rgb), .4);
  border-right: 1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left: 2px solid rgba(var(--card-rgb), .85);
  border-radius: 10px;
  padding: 10px 12px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb), .1) 0%, rgba(var(--card-rgb), .03) 50%, rgba(24,24,27,.5) 100%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb), .55),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 4px 18px rgba(0,0,0,.28);
  transition: all .25s;
}
.ov-gauge-group:hover {
  border-color: rgba(var(--card-rgb), .6);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb), .7),
    inset 0 1px 0 rgba(255,255,255,.1),
    0 4px 24px rgba(0,0,0,.32),
    0 0 16px rgba(var(--card-rgb), .1);
}
.ov-group-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; margin: 0 0 6px; padding: 0;
}
.ov-gauge-group .ov-gauge {
  background: transparent; border: none; padding: 6px 0 4px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.ov-gauge-group .ov-gauge:hover {
  background: rgba(var(--p-base-rgb, 161,161,170), .06);
  box-shadow: none;
}
.ov-gauge-group .ov-gauge-foot { display: none; }
.ov-gauge-group .ov-gauge-interp { font-size: .7rem; margin-top: 2px; font-weight: 500; line-height: 1.2; }
.ov-connectors {
  position: absolute; top: 0; left: 0;
  pointer-events: none; z-index: 0;
}

/* ── Bar gauges ── */
.ov-gauge {
  background: rgba(var(--p-base-rgb, 161,161,170), .06);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .12);
  border-radius: 10px;
  padding: 10px 14px 8px;
  cursor: default;
  transition: all .25s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ov-gauge:hover {
  background: rgba(var(--p-base-rgb, 161,161,170), .1);
  border-color: rgba(var(--p-base-rgb, 161,161,170), .2);
  box-shadow: 0 0 12px rgba(var(--p-base-rgb, 161,161,170), .08);
}
.ov-gauge-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 5px;
}
.ov-gauge-label {
  font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .03em;
}
.ov-gauge-value {
  font-size: 1.15rem; font-weight: 700; color: rgba(255,255,255,.95);
}
.ov-gauge-value small {
  font-size: .65rem; font-weight: 400; color: rgba(255,255,255,.5); margin-left: 2px;
}
.ov-gauge-bar {
  position: relative; height: 6px; border-radius: 3px; overflow: visible;
  background: rgba(0,0,0,.45); margin: 4px 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6), inset 0 -1px 2px rgba(255,255,255,.04);
  border-top: 1px solid rgba(0,0,0,.3);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ov-zones {
  position: absolute; inset: 0; border-radius: 3px; overflow: hidden; display: flex;
}
.ov-zone {
  position: absolute; top: 0; height: 100%; opacity: .85;
  transition: all .2s;
  filter: saturate(1.3) brightness(1.2);
}
.ov-gauge:hover .ov-zone { opacity: 1; filter: saturate(1.5) brightness(1.4); }
.ov-cursor {
  position: absolute; top: -3px; transform: translateX(-50%); z-index: 2;
  height: 12px; width: 2px;
}
.ov-cursor-line {
  width: 2px; height: 12px; background: #fff; border-radius: 1px;
  box-shadow: 0 0 4px rgba(255,255,255,.5);
}
.ov-cursor-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  border: 2px solid rgba(0,0,0,.5);
  position: absolute; top: 2px; left: -3px;
  box-shadow: 0 0 8px rgba(255,255,255,.8), 0 0 16px rgba(255,255,255,.3);
}
.ov-gauge-foot {
  display: flex; justify-content: flex-end; margin-top: 2px;
}
.ov-gauge-date {
  font-size: .65rem; color: rgba(255,255,255,.35);
}
.ov-gauge-interp {
  font-size: .7rem; color: rgba(255,255,255,.5); margin-top: 2px;
  line-height: 1.3; font-style: italic;
}
.ov-level-ok .ov-gauge-interp { color: rgba(34,197,94,.7); }
.ov-level-warn .ov-gauge-interp { color: rgba(245,158,11,.7); }
.ov-level-bad .ov-gauge-interp { color: rgba(239,68,68,.7); }
.ov-gauge--empty { opacity: .5; }
.ov-gauge-nodata { text-align: center; color: rgba(255,255,255,.3); font-size: 1.2rem; padding: 4px 0; }

/* Trend arrows */
.ov-trend { font-size: 1.15rem; margin-left: 4px; font-weight: 700; vertical-align: middle; }
.ov-trend-up { color: #ef4444; text-shadow: 0 0 6px rgba(239,68,68,.5); }
.ov-trend-down { color: #3b82f6; text-shadow: 0 0 6px rgba(59,130,246,.5); }
.ov-trend-stable { color: rgba(255,255,255,.5); }

/* ── Journal input ── */
.ov-section-title {
  font-size: .85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--p-base);
  margin: 0 0 8px;
}
.ov-journal-prompts {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.ov-prompt-chip {
  background: rgba(var(--p-base-rgb, 161,161,170), .1);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .2);
  border-radius: 16px; padding: 4px 12px;
  font-size: .72rem; color: rgba(255,255,255,.6);
  cursor: pointer; transition: all .2s;
}
.ov-prompt-chip:hover {
  background: rgba(var(--p-base-rgb, 161,161,170), .2);
  color: rgba(255,255,255,.9);
  border-color: rgba(var(--p-base-rgb, 161,161,170), .4);
}
.ov-journal-input {
  width: 100%; background: rgba(0,0,0,.3);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .15);
  border-radius: 8px; padding: 8px 10px;
  color: rgba(255,255,255,.9); font-size: .82rem;
  font-family: inherit;
}
.ov-journal-input:focus {
  outline: none;
  border-color: rgba(var(--p-base-rgb, 161,161,170), .4);
}
.ov-journal-row {
  display: flex; gap: 10px; align-items: center;
}
.ov-journal-row .ov-journal-input { flex: 1; }
.ov-journal-btn {
  padding: 6px 16px;
  background: rgba(var(--p-base-rgb, 161,161,170), .15);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .25);
  border-radius: 6px; color: rgba(255,255,255,.8);
  font-size: .78rem; cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.ov-journal-btn:hover {
  background: rgba(var(--p-base-rgb, 161,161,170), .25);
  color: #fff;
}
.ov-journal-btn:disabled { opacity: .5; cursor: default; }
.ov-journal-btn-claude {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: 6px 14px;
  background: rgba(var(--p-base-rgb), .18);
  border: 1px solid rgba(var(--p-base-rgb), .45);
  border-radius: 6px; color: var(--p-base);
  font-size: .78rem; cursor: pointer;
  transition: all .2s;
  white-space: nowrap; font-weight: 500;
}
.ov-journal-btn-claude:hover {
  background: rgba(var(--p-base-rgb), .3);
  border-color: var(--p-base);
  filter: drop-shadow(0 0 6px rgba(var(--p-base-rgb), .4));
}

/* ── Analysis cards ── */
.ov-analysis-cards { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ov-analysis-card {
  --ac-rgb: 161,161,170;
  border-top: 1px solid rgba(var(--ac-rgb), .35);
  border-right: 1px solid rgba(var(--ac-rgb), .35);
  border-bottom: 1px solid rgba(var(--ac-rgb), .35);
  border-left: 2px solid rgba(var(--ac-rgb), .8);
  border-radius: 10px; padding: 12px 14px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  background:
    radial-gradient(circle at top right, rgba(var(--ac-rgb), .12), transparent 60%),
    linear-gradient(135deg, rgba(var(--ac-rgb), .08) 0%, rgba(var(--ac-rgb), .02) 50%, rgba(24,24,27,.5) 100%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--ac-rgb), .5),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 4px 18px rgba(0,0,0,.28);
  transition: all .25s;
}
.ov-analysis-card:hover {
  border-color: rgba(var(--ac-rgb), .55);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--ac-rgb), .65),
    inset 0 1px 0 rgba(255,255,255,.1),
    0 4px 24px rgba(0,0,0,.32),
    0 0 20px rgba(var(--ac-rgb), .08);
}
.ov-card-title {
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; margin: 0 0 6px;
}
#ov-analysis-global { --ac-rgb: 236,72,153; }
#ov-analysis-etat { --ac-rgb: 236,72,153; }
#ov-analysis-reco { --ac-rgb: 236,72,153; }
.ov-card-title.accent-blue { color: #60a5fa; }
.ov-card-title.accent-teal { color: #2dd4bf; }
.ov-card-title.accent-orange { color: #fb923c; }
.ov-card-body { font-size: .82rem; color: rgba(255,255,255,.7); line-height: 1.5; }
.ov-card-body p { margin: 4px 0; }
.ov-placeholder { color: rgba(255,255,255,.3); font-style: italic; }

/* ── Bottom row ── */
.ov-bottom-row {
  display: flex; flex-direction: column;
  gap: 14px;
}
.ov-bottom-card {
  background: rgba(var(--p-base-rgb, 161,161,170), .06);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .1);
  border-radius: 10px; padding: 12px 14px;
}
.ov-bottom-card .ov-card-title { color: rgba(255,255,255,.6); }
.ov-timeline-card { }

/* ── Score float — between head and cards ── */
.ov-score-float { display: none; }


/* ── Journal full width ── */
.ov-journal-full {
  border-top: 1px solid rgba(var(--p-base-rgb, 161,161,170), .3);
  border-right: 1px solid rgba(var(--p-base-rgb, 161,161,170), .3);
  border-bottom: 1px solid rgba(var(--p-base-rgb, 161,161,170), .3);
  border-left: 2px solid rgba(var(--p-base-rgb, 161,161,170), .7);
  border-radius: 10px; padding: 10px 14px 8px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  background:
    radial-gradient(circle at top right, rgba(var(--p-base-rgb, 161,161,170), .1), transparent 60%),
    linear-gradient(135deg, rgba(var(--p-base-rgb, 161,161,170), .08) 0%, rgba(var(--p-base-rgb, 161,161,170), .02) 50%, rgba(24,24,27,.5) 100%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--p-base-rgb, 161,161,170), .4),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 4px 18px rgba(0,0,0,.28);
}


/* ── Phase 2: Analysis card content ── */
.ov-card-stats {
  display: flex; gap: 16px; margin-bottom: 8px;
}
.ov-stat {
  display: flex; flex-direction: column; align-items: center;
}
.ov-stat b { font-size: 1.1rem; color: rgba(255,255,255,.9); }
.ov-stat small { font-size: .65rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .04em; }
.ov-audit-meta {
  display: flex; gap: 12px; font-size: .7rem; color: rgba(255,255,255,.4);
  margin-bottom: 6px; flex-wrap: wrap;
}
.ov-audit-badges {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: .7rem; color: rgba(255,255,255,.7);
}
.ov-finding-badge {
  --badge-bg: 102,102,102;
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: .6rem; font-weight: 700; color: #fff; text-transform: uppercase;
  letter-spacing: .04em; vertical-align: middle;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  background:
    linear-gradient(135deg, rgba(var(--badge-bg), .45) 0%, rgba(var(--badge-bg), .2) 100%);
  border: 1px solid rgba(var(--badge-bg), .4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 6px rgba(0,0,0,.2);
}
.ov-audit-summary {
  font-size: .72rem; line-height: 1.5; color: rgba(255,255,255,.6);
  max-height: 160px; overflow-y: auto; margin-top: 6px;
}
.ov-audit-summary b { color: rgba(255,255,255,.85); }
.ov-finding {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; font-size: .72rem; color: rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ov-finding:last-of-type { border-bottom: none; }
.ov-finding-axe {
  font-size: .6rem; color: rgba(255,255,255,.4); text-transform: uppercase;
  min-width: 55px;
}
.ov-finding-title { flex: 1; }
.ov-priorities {
  margin-top: 8px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .72rem; line-height: 1.5; color: rgba(255,255,255,.6);
}
.ov-priorities b { color: rgba(255,255,255,.85); }
.ov-placeholder { color: rgba(255,255,255,.3); font-style: italic; }


/* ── Global audit card extras ── */
.gs-trend-arrow {
  font-size: 1.8rem; font-weight: 700; margin-left: 6px;
  vertical-align: middle; display: inline-block;
  line-height: 1;
}
.gs-source-tag {
  display: inline-block; padding: 1px 5px; border-radius: 4px;
  font-size: .55rem; font-weight: 600; text-transform: uppercase;
  background: rgba(var(--p-base-rgb, 161,161,170), .12);
  border: 1px solid rgba(var(--p-base-rgb, 161,161,170), .15);
  color: rgba(255,255,255,.5); margin-left: 2px;
}
.global-synthesis .bs-summary {
  font-size: .82rem; line-height: 1.65; color: #d4d4d8;
  padding: .75rem 1rem;
}
.global-synthesis .bs-summary b,
.global-synthesis .bs-summary strong {
  color: var(--p-base); font-weight: 600;
  font-size: .92rem; display: inline;
}
/* Sub-titles (Profil global, Axes majeurs, etc.) — first strong in each paragraph */
.global-synthesis .bs-summary .bs-md-para + b,
.global-synthesis .bs-summary .bs-md-para + strong,
.global-synthesis .bs-summary > b:first-child,
.global-synthesis .bs-summary > strong:first-child {
  font-size: 1rem; letter-spacing: .02em;
}
/* Paragraph spacing */
.global-synthesis .bs-summary .bs-md-para {
  height: .75rem;
}
/* Bullet list indentation */
.global-synthesis .bs-summary .bs-md-ul {
  margin: .3rem 0 .3rem 1.5rem; padding: 0;
}
.global-synthesis .bs-summary .bs-md-ul li {
  margin: .25rem 0; padding-left: .3rem;
}
/* Ordered list styling */
.global-synthesis .bs-summary .bs-md-ol {
  margin: .3rem 0 .3rem 1.5rem; padding: 0;
  list-style: decimal;
}
.global-synthesis .bs-summary .bs-md-ol li {
  margin: .25rem 0; padding-left: .3rem; line-height: 1.55;
}
.global-synthesis .bs-summary .bs-md-ol li::marker { color: var(--p-base); font-weight: 600; }


/* Global synthesis card spacing */
.global-synthesis .bs-meta {
  margin-bottom: .65rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .1);
}
.global-synthesis .bs-combo-row {
  margin: .45rem 0 .75rem;
}
.global-synthesis .bs-summary {
  margin-bottom: .75rem;
}
.global-synthesis .bs-findings-block {
  margin-top: .5rem;
}
/* Trend arrow standard size */
.gs-trend-arrow {
  font-size: 1.8rem; line-height: 1; margin-left: .15rem;
  vertical-align: baseline;
}


/* Kill audit button */
.bs-kill-btn {
  color: #ef4444; opacity: .45;
  margin-left: .15rem; padding: 2px;
  transition: opacity .15s, color .15s;
}
.bs-kill-btn:hover { opacity: 1; color: #f87171; }



/* Generic accept/reopen in finding extras */
.bsf-generic-accept, .bsf-generic-reopen {
  margin-left: auto !important;
}
/* Finding note form (toggle) */
.bsf-note-form {
  margin: .5rem 0; padding: .65rem .8rem;
  background: rgba(0,0,0,.25); border: 1px solid rgba(var(--p-base-rgb), .15);
  border-radius: 8px;
}
.bsf-note-toggle-btn.has-note { border-style: solid !important; }



/* Trigger mode list (audit config modal) */
.acm-trigger-list {
  display: flex; flex-direction: column; gap: .1rem;
}
.acm-trigger-head {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: #94a3b8; margin-bottom: .4rem;
}

/* Finding interactive elements */
.bsf-user-note {
  width: 100%; min-height: 2.2rem; max-height: 6rem; resize: vertical;
  background: rgba(0,0,0,.3); color: #d4d4d8; border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 6px; padding: .4rem .6rem; font-size: .78rem; line-height: 1.5;
  font-family: inherit; box-sizing: border-box; margin-bottom: .35rem;
}
.bsf-user-note:focus { border-color: rgba(var(--p-base-rgb), .5); outline: none; }
.bsf-interactive-btns {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  padding-top: .4rem; margin-bottom: .35rem;
  border-top: 1px solid rgba(var(--p-base-rgb), .12);
}
.bsf-interactive-btns .t-btn {
  font-size: .75rem; padding: .25rem .65rem;
  border: 1px solid rgba(var(--p-base-rgb), .35);
  border-radius: 5px; color: var(--p-base);
  background: rgba(var(--p-base-rgb), .06);
  transition: border-color .15s, background .15s, color .15s;
  cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
}
.bsf-interactive-btns .t-btn:hover {
  border-color: rgba(var(--p-base-rgb), .7);
  background: rgba(var(--p-base-rgb), .14);
  color: var(--p-light);
}
.bsf-ask-form, .bsf-todo-form {
  margin: .5rem 0; padding: .65rem .8rem;
  background: rgba(0,0,0,.25); border: 1px solid rgba(var(--p-base-rgb), .15);
  border-radius: 8px;
}
.bsf-ask-question, .bsf-todo-comment {
  width: 100%; background: rgba(0,0,0,.3); color: #d4d4d8;
  border: 1px solid rgba(var(--p-base-rgb), .2); border-radius: 6px;
  padding: .4rem .6rem; font-size: .78rem; line-height: 1.5;
  font-family: inherit; resize: vertical;
}
.bsf-todo-title {
  width: 100%; background: rgba(0,0,0,.3); color: #e4e4e7;
  border: 1px solid rgba(var(--p-base-rgb), .2); border-radius: 6px;
  padding: .4rem .6rem; font-size: .85rem; font-weight: 500;
  font-family: inherit; margin-bottom: .4rem;
}
.bsf-todo-title:focus, .bsf-ask-question:focus, .bsf-todo-comment:focus {
  border-color: rgba(var(--p-base-rgb), .5); outline: none;
}
.bsf-inline-actions {
  display: flex; gap: .4rem; margin-top: .4rem; justify-content: flex-end;
}
.bsf-inline-actions .t-btn { font-size: .75rem; padding: .25rem .6rem; }
.bsf-ask-response { margin-top: .5rem; }
.bsf-claude-response {
  font-size: .82rem; line-height: 1.65; color: #d4d4d8;
  padding: .5rem .7rem; background: rgba(var(--p-base-rgb), .06);
  border-left: 2px solid rgba(var(--p-base-rgb), .4);
  border-radius: 0 6px 6px 0;
}
.bsf-claude-response strong { color: var(--p-base); font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ov-layout { grid-template-columns: 240px 1fr 240px; gap: 8px; }
}
@media (max-width: 900px) {
  .ov-layout { grid-template-columns: 200px 1fr 200px; gap: 6px; }
  .ov-connectors { display: none; }
  .ov-mannequin-wrap { max-width: 280px; max-height: 460px; }
  .ov-mannequin-wrap .anat-stack,
  .ov-mannequin-wrap .anat-overlay-wrap { max-height: 460px; }
  .ov-mannequin-wrap svg,
  .ov-mannequin-wrap img { max-height: 440px; }
}
@media (max-width: 768px) {
  /* Vue d ensemble santé — meme strategie que sport-tab : 1 col KPI, mannequin masque */
  .sante-tab .ov-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px !important;
    min-height: auto !important;
    padding: 8px 0 0 !important;
  }
  .sante-tab .ov-col-left,
  .sante-tab .ov-col-right {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }
  .sante-tab .ov-gauge-group {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .sante-tab .ov-col-center { display: none !important; }
  .sante-tab .ov-mannequin-wrap { display: none !important; }
  .sante-tab .ov-connectors { display: none !important; }
  .sante-tab .ov-score-card-value { font-size: 2rem; }
  .sante-tab .ov-bottom-row { flex-direction: column; }
  .sante-tab .ov-journal-full { margin-top: 10px; }
}
@media (max-width: 480px) {
  .ov-gauge-group { min-width: 120px; }
  .ov-gauge-label { font-size: .7rem; }
  .ov-gauge-value { font-size: 1rem; }
  .ov-score-card-value { font-size: 1.6rem; }
  .ov-mannequin-wrap { max-width: 180px; max-height: 290px; }
  .ov-mannequin-wrap .anat-stack,
  .ov-mannequin-wrap .anat-overlay-wrap { max-height: 290px; }
  .ov-mannequin-wrap svg,
  .ov-mannequin-wrap img { max-height: 270px; }
}

/* === Annotations findings — historique chronologique (Phase B2 2026-05-05) === */
.bsf-annot-hidden { display: none; }
.bsf-annot-toggle {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .78rem; color: var(--p-light, #94a3b8);
}
.bsf-annot-toggle:hover { color: var(--p-base); }
.bsf-annot-count {
  font-weight: 600; font-size: .72rem;
  background: rgba(var(--p-base-rgb), .15);
  border: 1px solid rgba(var(--p-base-rgb), .25);
  padding: 1px 6px; border-radius: 9px;
  color: var(--p-base);
}
.bsf-annot-history {
  margin-top: .5rem; padding: .5rem .65rem;
  background: rgba(0, 0, 0, .25);
  border-left: 2px solid rgba(var(--p-base-rgb), .35);
  border-radius: 4px;
}
.bsf-annot-item {
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.bsf-annot-item:last-child { border-bottom: none; }
.bsf-annot-meta {
  display: flex; align-items: center; gap: .35rem;
  font-size: .72rem; color: #94a3b8;
  margin-bottom: .2rem;
}
.bsf-annot-meta .bsf-annot-author { color: var(--p-light); }
.bsf-annot-delete {
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: .85rem;
  padding: 0 .25rem; opacity: .5;
  transition: opacity .15s, color .15s;
}
.bsf-annot-delete:hover { opacity: 1; color: #ef4444; }
.bsf-annot-text {
  font-size: .82rem; color: #d4d4d8;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}

/* === Journal santé carte vue d'ensemble — pattern modale inline (retouche 2026-05-05) === */
.ov-journal-textarea {
  width: 100%; background: rgba(0,0,0,.3);
  border: 1px solid rgba(var(--p-base-rgb), .15);
  border-radius: 8px; padding: 8px 10px;
  color: rgba(255,255,255,.9); font-size: .82rem;
  resize: vertical; min-height: 50px;
  font-family: inherit; line-height: 1.4;
}
.ov-journal-textarea:focus {
  outline: none;
  border-color: rgba(var(--p-base-rgb), .4);
}
.ov-journal-intro {
  color: #94a3b8; font-size: .78rem;
  margin: 0; padding: 0; flex: 1; line-height: 1.4;
  text-align: left;
}
.ov-journal-model-pick {
  color: var(--p-base); cursor: pointer;
  border-bottom: 1px dashed var(--p-base);
  font-weight: 600;
}
.ov-journal-actions {
  display: flex; gap: .5rem; justify-content: flex-end; align-items: center;
  margin-top: .15rem;
}
.ov-journal-btn-cancel {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px; color: rgba(255,255,255,.7);
  font-size: .78rem; cursor: pointer;
  transition: all .15s;
}
.ov-journal-btn-cancel:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}
.ov-journal-btn-save {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: 6px 16px;
  background: rgba(var(--p-base-rgb), .55);
  border: 1px solid rgba(var(--p-base-rgb), .7);
  border-radius: 6px; color: var(--p-text-on, #fff);
  font-size: .78rem; cursor: pointer; font-weight: 600;
  transition: all .15s;
}
.ov-journal-btn-save:hover {
  background: var(--p-base);
  filter: drop-shadow(0 0 8px rgba(var(--p-base-rgb), .5));
}
.ov-journal-btn-save:disabled { opacity: .55; cursor: default; }
.ov-journal-status {
  font-size: .78rem; color: #94a3b8;
}
.ov-journal-status:empty { display: none; }
.ov-journal-status:not(:empty) { margin-top: .4rem; }

.ov-journal-prompts-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; margin-bottom: .15rem; flex-wrap: wrap;
}
.ov-journal-prompts-row .ov-journal-prompts { flex: 1; }
.ov-journal-prompts-row .ov-journal-status { white-space: nowrap; margin: 0; padding: 0; text-align: right; }


/* ═══════════════════════════════════════════════════════════════════════
   STANDARD : audit card responsive wrap (DB principle a inscrire)
   Quand le titre + badges + score depasse, le titre prend la 1ere ligne
   et les badges + score basculent sur la 2eme ligne sous le titre.
   Applicable a TOUTES les cartes audit (.bs-collapse > .bsc-summary)
   - sport, sante, biometrie, blood, etc.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .bs-collapse > .bsc-summary {
    flex-wrap: wrap;
    row-gap: .35rem;
  }
  .bs-collapse > .bsc-summary > .bsc-title {
    flex: 1 1 100%;
    min-width: 0;
    white-space: normal;
  }
  .bs-collapse > .bsc-summary > .bsc-badges {
    margin-left: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   STANDARD : mannequin derriere les colonnes KPI dans une vue d'ensemble
   Pattern : col-center en position relative + z-index 0,
   col-left/col-right en position relative + z-index 1.
   Permet, quand le mannequin est en position absolute (cf Sport), aux KPI
   de passer DEVANT le mannequin avec effet glass/blur des cartes.
   ═══════════════════════════════════════════════════════════════════════ */
.sante-tab .ov-col-left,
.sante-tab .ov-col-right,
.sport-tab .ov-col-left,
.sport-tab .ov-col-right {
  position: relative;
  z-index: 1;
}
.sante-tab .ov-col-center,
.sport-tab .ov-col-center {
  position: relative;
  z-index: 0;
}

/* Score audit Claude — tooltip explicatif au survol */
.bs-score-big[data-score-help] { position: relative; cursor: help; }
.bs-score-big[data-score-help]::after {
  content: attr(data-score-help);
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 1000;
  background: rgba(15,15,19,.98);
  color: #e4e4e7;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: .7rem .85rem;
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  white-space: pre-line;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  pointer-events: none;
  backdrop-filter: blur(16px) saturate(180%);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.bs-score-big[data-score-help]:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.bs-score-big[data-score-help]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  right: 14px;
  width: 0; height: 0;
  border: 6px solid transparent;
  border-top-color: rgba(15,15,19,.98);
  z-index: 1001;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.bs-score-big[data-score-help]:hover::before { opacity: 1; }

/* ============================================================================
   A3a Responsive Mobile (chirurgical) — sante claude-health (≤ 768px)
   ============================================================================ */
@media (max-width: 768px) {
  /* Layout : sidebar masquee par defaut, contenu prend toute la largeur */
  .sante-layout {
    grid-template-columns: 0 1fr !important;
  }
  .sante-layout #sante-sidebar {
    visibility: hidden;
    border-right: none;
    position: fixed;
    top: 0; left: 0;
    width: 80%; max-width: 280px;
    height: 100vh;
    background: rgba(20, 20, 23, .98);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease-out, visibility .25s;
    overflow-y: auto;
  }
  /* Quand sidebar-shown classe est activée (toggle handle), affiche le drawer */
  .sante-layout.sidebar-shown #sante-sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  /* Toolbar : wrap pour ne pas deborder */
  .sante-toolbar { flex-wrap: wrap !important; gap: .35rem !important; padding: .4rem !important; }
  .sante-toolbar > * { flex-shrink: 1 !important; }

  /* Grilles KPI et cards : passe en 1 colonne */
  .blood-kpi-grid,
  .bk-kpi-grid,
  .stats-kpi-grid,
  .ov-kpi-grid,
  .kpi-row,
  .biometrie-grid {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }

  /* Bilan medical : grille split timeline + viewer = stack vertical */
  .med-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto;
    min-height: auto !important;
  }
  .med-viewer {
    height: 60vh !important;
    min-height: 0 !important;
  }
  .med-viewer iframe { height: 60vh !important; }

  /* Mannequin (overview) : reduire taille pour ne pas écraser KPI */
  .ov-mannequin-wrap,
  .sante-mannequin {
    transform: scale(.7) !important;
    transform-origin: top center !important;
    margin-bottom: -8rem !important;
  }

  /* Cartes audit : padding compact */
  .bs-collapse, .bsc-summary { padding: .35rem .5rem !important; }

  /* Charts : full width single col */
  .stats-charts, .blood-charts, .bk-charts {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================================
   FIX MOBILE — sante-tab hauteur fixe pour scroll interne (≤ 768px)
   Bug : portal.css force body overflow-y:auto + main#content height:auto pour
   activer le scroll natif mobile. Mais .sante-tab utilise un flex column avec
   .sante-content / #chat-messages en flex:1 overflow-y:auto qui necessite que
   le parent ait une hauteur DETERMINEE (pas auto).
   Solution : sur ces 3 tabs uniquement, forcer height fixe = viewport - header,
   et le main du layout prend toute la grid (le sidebar mobile est en fixed
   donc out-of-flow).
   ============================================================================ */
@media (max-width: 768px) {
  .sante-tab {
    height: calc(100vh - 50px) !important;
    height: calc(100dvh - 50px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 50px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .sante-layout {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  /* Le main prend toute la largeur (sidebar est en position:fixed, out of flow) */
  #sante-main {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
}

/* ============================================================================
   STANDARD TOOLBAR — height 28px sur controls (rigueur visuelle alignement)
   Vincent 2026-05-10 : standardisation barre filtre, ref Biometrie sante.
   ============================================================================ */
.chrono-bar .period-btn,
.chrono-bar .chrono-input { height: 28px; box-sizing: border-box; }
.chrono-filters { align-items: center; min-height: 28px; }

/* ============================================================================
   STANDARD TOOLBAR — uniforme reference Biometrie sante (Vincent 2026-05-10)
   Principle DB #102 — zone figee + controls coherents inter-tabs et inter-VMs.
   ============================================================================ */
.sante-toolbar {
  min-height: 3.15rem !important;
  box-sizing: border-box !important;
}
.sante-toolbar input[type="search"],
.sante-toolbar input[type="text"],
.sante-toolbar input[type="date"],
.sante-toolbar input[type="number"],
.sante-toolbar select,
.sante-toolbar button.t-btn {
  background: rgba(39, 39, 42, .45);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: .22rem .55rem;
  font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  height: 28px;
  box-sizing: border-box;
  line-height: 1.2;
}
.sante-toolbar button.t-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .18);
  color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .35);
}
.sante-toolbar label {
  font-size: .82rem;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.2;
}
