/* ============================================================
   plate.css — carte du corps
   Seuls transform et opacity sont animés : le navigateur les
   confie au processeur graphique, sans repeindre la page.
   ============================================================ */
.bodymap {
  --bm-line: var(--teal);
  --bm-hot: var(--teal-2);
  --bm-text: var(--text);
  --bm-a: rgba(7,144,156,.16);
  --bm-b: rgba(7,144,156,.03);
  width: 100%; height: auto; overflow: visible; display: block;
}
.on-dark .bodymap {
  --bm-line: rgba(255,255,255,.55);
  --bm-hot: var(--glow);
  --bm-text: #fff;
  --bm-a: rgba(63,224,212,.22);
  --bm-b: rgba(63,224,212,.03);
}
.bm-s1 { stop-color: var(--bm-a) }
.bm-s2 { stop-color: var(--bm-b) }

.bm-body > * {
  fill: url(#bm-fill); stroke: var(--bm-line); stroke-width: 1.4;
  stroke-linejoin: round; stroke-linecap: round;
}
.bm-grid { stroke: var(--bm-line); stroke-width: .5; opacity: .16 }
.bm-axis { stroke: var(--bm-line); stroke-width: .8; stroke-dasharray: 2 5; opacity: .5 }

/* faisceau : un seul passage par séquence */
.bm-scan { fill: var(--bm-hot); opacity: 0 }
.bodymap.is-run .bm-scan { animation: bm-scan 1.5s cubic-bezier(.4,0,.2,1) both }
@keyframes bm-scan {
  0%   { transform: translateY(0);     opacity: 0 }
  12%  { opacity: .28 }
  88%  { opacity: .28 }
  100% { transform: translateY(700px); opacity: 0 }
}

/* gélule */
.bm-pill { fill: var(--bm-hot); opacity: 0 }
.bm-pill.is-down { animation: bm-pill .55s cubic-bezier(.55,0,.4,1) both }
@keyframes bm-pill {
  0%   { transform: translateY(0);     opacity: 1 }
  80%  { opacity: 1 }
  100% { transform: translateY(200px); opacity: 0 }
}

/* zones */
.bm-dot, .bm-ring, .bm-halo { transform-box: fill-box; transform-origin: center }
.bm-dot  { fill: var(--bm-line); opacity: .35; transform: scale(.6);
           transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s }
.bm-halo { fill: var(--bm-hot); opacity: 0; transition: opacity .3s }
.bm-ring { fill: none; stroke: var(--bm-hot); stroke-width: 1.5; opacity: 0 }
.bm-lead { fill: none; stroke: var(--bm-hot); stroke-width: 1; opacity: .7;
           stroke-dasharray: 1; stroke-dashoffset: 1;
           transition: stroke-dashoffset .35s ease-out }
.bm-label { font: 600 12.5px var(--font-body, system-ui, sans-serif); fill: var(--bm-text);
            opacity: 0; transition: opacity .3s .12s }

.bm-spot.is-active .bm-dot   { fill: var(--bm-hot); opacity: 1; transform: scale(1) }
.bm-spot.is-active .bm-halo  { opacity: .22 }
.bm-spot.is-active .bm-ring  { animation: bm-ping 1.8s ease-out infinite }
.bm-spot.is-active .bm-lead  { stroke-dashoffset: 0 }
.bm-spot.is-active .bm-label { opacity: 1 }
@keyframes bm-ping {
  0%   { transform: scale(.5);  opacity: .9 }
  70%  { transform: scale(2.1); opacity: 0 }
  100% { transform: scale(2.1); opacity: 0 }
}

/* artères protégées — Vitamine D3 + K2 */
.bm-spot.is-shielded .bm-dot,
.bm-spot.is-shielded .bm-halo { fill: var(--warn) }
.bm-spot.is-shielded .bm-ring,
.bm-spot.is-shielded .bm-lead { stroke: var(--warn) }

@media (prefers-reduced-motion: reduce) {
  .bodymap.is-run .bm-scan, .bm-pill.is-down, .bm-spot.is-active .bm-ring { animation: none }
  .bm-dot, .bm-lead, .bm-label { transition: none }
}
