/* ============================================================
   SignalOS — Les profils v2 · arbre de comptes
   complète v3/v3b/v4.css (+ .hlw/.hli locaux)
   ============================================================ */

.hlw { display: block; overflow: hidden; }
.hli { display: inline-block; transform: translateY(112%); transition: transform 0.9s cubic-bezier(.16,1,.3,1); }
.hlw:nth-child(2) .hli { transition-delay: 0.12s; }
html.ccm-go .hli { transform: none; }
@media (prefers-reduced-motion: reduce) { .hli { transform: none !important; } }

/* ─────────────────────────────────────────────
   L'ARBRE — ton profil → tes comptes
   ───────────────────────────────────────────── */
.tree-sec { padding-top: 40px; padding-bottom: 150px; }
.tree { position: relative; max-width: 1000px; margin: 0 auto; height: 560px; }
.tree-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tree-svg path { fill: none; stroke: rgba(232,25,60,0.2); stroke-width: 1.6;
  stroke-dasharray: 1000; stroke-dashoffset: 1000; }
html:not([data-theme="light"]) .tree-svg path { stroke: rgba(232,25,60,0.3); }
.tree.in .tree-svg path { animation: trDraw 1.3s cubic-bezier(.2,.7,.3,1) var(--td, 0s) forwards; }
@keyframes trDraw { to { stroke-dashoffset: 0; } }
.tree-svg path.pulse { stroke: var(--red); stroke-width: 2.2; stroke-dasharray: 26 974; stroke-dashoffset: 1000; opacity: 0.95;
  animation: trPulse 1.1s cubic-bezier(.3,.5,.5,1) forwards; filter: drop-shadow(0 0 5px rgba(232,25,60,0.7)); }
@keyframes trPulse { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tree.in .tree-svg path { animation: none; stroke-dashoffset: 0; }
  .tree-svg path.pulse { display: none; }
}

/* racine : ton profil */
.tree-root { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 12px;
  background: var(--v3-solid); border: 1px solid rgba(232,25,60,0.45); border-radius: 100px;
  box-shadow: 0 0 0 1px rgba(232,25,60,0.2), var(--v3-sh); padding: 9px 20px 9px 10px; }
.tree-root .ra { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.tree-root b { display: block; font-family: var(--display); font-weight: 800; font-size: 0.9rem; color: var(--v3-ink); }
.tree-root span { font-size: 0.66rem; color: var(--v3-dim); }
html.v3x .tree.in .tree-root { animation: rootPulse 3.2s ease-in-out infinite; }
@keyframes rootPulse { 0%,100% { box-shadow: 0 0 0 1px rgba(232,25,60,0.2), var(--v3-sh); } 50% { box-shadow: 0 0 0 6px rgba(232,25,60,0.1), var(--v3-sh); } }

/* feuilles : comptes */
.tree-leaf { position: absolute; z-index: 2; transform: translate(-50%,-50%) scale(0.6); opacity: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  transition: opacity 0.55s cubic-bezier(.2,.8,.3,1.3) var(--ld, 0s), transform 0.55s cubic-bezier(.2,.8,.3,1.3) var(--ld, 0s); }
.tree.in .tree-leaf { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.tree-leaf .la { position: relative; width: 56px; height: 56px; border-radius: 50%; background-size: cover; background-position: center;
  filter: blur(1.8px); border: 2.5px solid var(--v3-solid); box-shadow: 0 10px 26px -10px rgba(13,13,21,0.4), 0 0 0 2px rgba(232,25,60,0.2); }
.tree-leaf .lact { position: absolute; right: -6px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.64rem;
  background: var(--v3-solid); border: 1px solid var(--v3-line); box-shadow: 0 6px 14px -6px rgba(13,13,21,0.4); }
.tree-leaf b { font-size: 0.64rem; font-weight: 700; color: var(--v3-ink); filter: blur(2.4px); user-select: none; -webkit-user-select: none; }
.tree-leaf .ltag { font-size: 0.56rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--red);
  background: rgba(232,25,60,0.09); border: 1px solid rgba(232,25,60,0.3); border-radius: 100px; padding: 3px 9px; white-space: nowrap; backdrop-filter: blur(6px); }
.tree-leaf.fire { z-index: 4; }
.tree-leaf.fire .la { box-shadow: 0 10px 30px -8px rgba(232,25,60,0.55), 0 0 0 3px rgba(232,25,60,0.55); }
.tree-leaf.fire .lact { transform: scale(1.3); background: linear-gradient(135deg, var(--red-2), var(--red)); border-color: transparent; }
.tree-leaf .lact, .tree-leaf .la { transition: transform 0.3s cubic-bezier(.2,.9,.3,1.5), box-shadow 0.3s; }

/* compteur central */
.tree-count { position: absolute; left: 50%; bottom: -74px; transform: translateX(-50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px; font-size: 0.76rem; font-weight: 600; color: var(--v3-mut);
  background: var(--v3-card); backdrop-filter: blur(12px); border: 1px solid var(--v3-line); border-radius: 100px; padding: 8px 17px; box-shadow: var(--v3-sh); }
.tree-count b { font-family: var(--display); font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────
   ANATOMIE D'UN PROFIL
   ───────────────────────────────────────────── */
.anat { position: relative; max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 26px; align-items: center; }
.anat-card { position: relative; z-index: 2; width: 250px; background: var(--v3-solid); border: 1px solid var(--v3-line);
  border-radius: 22px; box-shadow: var(--v3-sh); padding: 24px 20px; text-align: center; }
.anat-card .aa { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 12px; background-size: cover; background-position: center;
  filter: blur(2px); border: 3px solid var(--v3-solid); box-shadow: 0 0 0 3px rgba(232,25,60,0.3); }
.anat-card b { display: block; font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--v3-ink); filter: blur(3px); user-select: none; -webkit-user-select: none; }
.anat-card .ah { font-size: 0.68rem; color: var(--v3-dim); margin-top: 3px; }
.anat-card .as { display: flex; justify-content: center; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--v3-hair); }
.anat-card .as span { font-size: 0.62rem; color: var(--v3-dim); }
.anat-card .as b { font-size: 0.82rem; filter: none; display: block; }
.anat-col { display: flex; flex-direction: column; gap: 14px; }
.anat-pt { display: flex; gap: 11px; align-items: flex-start; background: var(--v3-card); backdrop-filter: blur(14px);
  border: 1px solid var(--v3-line); border-radius: 15px; padding: 13px 15px; box-shadow: var(--v3-sh);
  opacity: 0; transform: translateX(var(--ax, -20px)); transition: opacity 0.6s cubic-bezier(.2,.7,.3,1) var(--ad, 0s), transform 0.6s cubic-bezier(.2,.7,.3,1) var(--ad, 0s); }
.anat.in .anat-pt { opacity: 1; transform: none; }
.anat-pt em { font-style: normal; font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.anat-pt b { display: block; font-size: 0.8rem; font-weight: 700; color: var(--v3-ink); }
.anat-pt span { font-size: 0.7rem; color: var(--v3-mut); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .anat-pt { opacity: 1 !important; transform: none !important; } }

/* ─────────────────────────────────────────────
   PIPELINE — sélection → warm-up → assignation
   ───────────────────────────────────────────── */
.pipe { max-width: 940px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.pipe-st { background: var(--v3-card); backdrop-filter: blur(14px); border: 1px solid var(--v3-line); border-radius: 18px;
  padding: 22px 18px; text-align: center; box-shadow: var(--v3-sh); position: relative; overflow: hidden; }
.pipe-st .pe { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.pipe-st b { display: block; font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.01em; color: var(--v3-ink); }
.pipe-st span { display: block; font-size: 0.72rem; color: var(--v3-mut); margin-top: 5px; line-height: 1.5; }
.pipe-st .pn { display: inline-flex; margin-top: 11px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--red); background: rgba(232,25,60,0.09); border: 1px solid rgba(232,25,60,0.3); border-radius: 100px; padding: 4px 11px; }
.pipe-arr { display: flex; align-items: center; color: var(--red); font-size: 1.1rem; font-weight: 800; }
html.v3x .pipe-arr i { font-style: normal; animation: pipeArr 1.4s ease-in-out infinite; display: inline-block; }
@keyframes pipeArr { 0%,100% { transform: translateX(0); opacity: 0.5; } 50% { transform: translateX(5px); opacity: 1; } }

/* ── perf ── */
.anat-sec, .pipe-sec, .v3-metrics, .v3-ctasec, footer { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .tree { height: 470px; }
  .tree-count { bottom: -86px; font-size: 0.7rem; padding: 7px 14px; }
  .tree-leaf .la { width: 46px; height: 46px; }
  .tree-leaf .ltag { font-size: 0.5rem; padding: 2px 7px; }
  .tree-root { padding: 7px 15px 7px 8px; }
  .tree-root .ra { width: 33px; height: 33px; font-size: 0.85rem; }
  .anat { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .anat-col .anat-pt { --ax: 0px; }
  .anat-card { width: 100%; max-width: 300px; }
  .anat-col { width: 100%; max-width: 420px; }
  .pipe { grid-template-columns: 1fr; }
  .pipe-arr { justify-content: center; transform: rotate(90deg); padding: 2px 0; }
}
