:root{
  --bg:#070b14;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.78);
  --line:rgba(255,255,255,.14);
  --glass:rgba(255,255,255,.06);
  --glass2:rgba(255,255,255,.08);

  --inst:#fbbf24;
  --emo:#f472b6;
  --ment:#60a5fa;

  --good:#86efac;
  --warn:#ffd18b;
  --bad:#fda4af;

  --radius:22px;
  --shadow:0 25px 60px rgba(0,0,0,.45);

  --accent:rgba(255,255,255,.75);
  --fieldTitle:rgba(215,220,230,.86);
}

*{box-sizing:border-box}
html,body{height:100%}
html{background:var(--bg)}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji;
  color:var(--text);
  background: var(--bg);
}

a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}

.wrap{max-width:1180px;margin:34px auto 44px;padding:0 14px}

.top{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}
.top > div:first-child{text-align:center;max-width:820px}
.actions{
  position:absolute;
  right:0;
  top:0;
  display:flex;
  gap:10px;
  align-items:center;
}

.top h1{margin:0;font-size:44px;letter-spacing:.2px}
.top p{margin:10px 0 0;color:var(--muted);font-size:15px}

button{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:650;
  font-size:13px;
  transition:background .18s ease,border-color .18s ease,transform .06s ease;
}
button:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.22)}
button:active{transform:translateY(1px)}

.grid{
  display:grid;
  grid-template-columns:1fr 520px;
  gap:18px;
  align-items:start;
}

@media (max-width:1060px){
  .grid{grid-template-columns:1fr}
  .top > div:first-child{text-align:center}
  .actions{position:static}
}

.stage{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
  overflow:hidden;
  min-height:640px;
}

.svgWrap{
  display:flex;
  justify-content:center;
  align-items:center;
  background: transparent;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:10px;
}
.svgWrap svg{width:min(720px,92vw);height:auto;display:block}

.side{
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  box-shadow:var(--shadow);
  padding:16px;
}

.badgeRow{margin-bottom:10px;text-align:center}
.badge{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.20);
  backdrop-filter:blur(10px);
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}
#badgeNum{color:var(--accent)}
#typeBadge[data-group="instinctif"]{
  border-color:rgba(251,191,36,.48);
  background:rgba(251,191,36,.10);
  box-shadow:0 0 0 2px rgba(251,191,36,.14) inset;
  transform:translateY(-1px);
}
#typeBadge[data-group="emotionnel"]{
  border-color:rgba(244,114,182,.48);
  background:rgba(244,114,182,.10);
  box-shadow:0 0 0 2px rgba(244,114,182,.14) inset;
  transform:translateY(-1px);
}
#typeBadge[data-group="mental"]{
  border-color:rgba(96,165,250,.48);
  background:rgba(96,165,250,.10);
  box-shadow:0 0 0 2px rgba(96,165,250,.14) inset;
  transform:translateY(-1px);
}
#typeBadge[data-group="instinctif"] #badgeNum{color:var(--inst)}
#typeBadge[data-group="emotionnel"] #badgeNum{color:var(--emo)}
#typeBadge[data-group="mental"] #badgeNum{color:var(--ment)}

.centerLegend{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 12px;
}
.centerLegendItem{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.14);
  color:rgba(255,255,255,.84);
  font-size:12px;
  font-weight:700;
}
.centerLegendDot{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
}
.centerLegendDot.instinctif{background:var(--inst)}
.centerLegendDot.emotionnel{background:var(--emo)}
.centerLegendDot.mental{background:var(--ment)}

.card{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}

.miniGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width:1060px){
  .miniGrid{grid-template-columns:1fr}
}

.mini{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.10);
  border-radius:16px;
  padding:12px;
}
.mini h3{
  margin:0 0 6px;
  font-size:12px;
  letter-spacing:.7px;
  text-transform:uppercase;
  color:var(--fieldTitle);
}
.mini p{margin:0;font-size:15px;font-weight:700;color:rgba(255,255,255,.88)}

#center{
  color:var(--accent);
  transition:color .14s ease;
}
#center[data-group="instinctif"]{color:var(--inst)}
#center[data-group="emotionnel"]{color:var(--emo)}
#center[data-group="mental"]{color:var(--ment)}

#toIntegr,#toDisint{
  color:var(--accent);
  transition:color .14s ease;
}
#toIntegr[data-group="instinctif"],#toDisint[data-group="instinctif"]{color:var(--inst)}
#toIntegr[data-group="emotionnel"],#toDisint[data-group="emotionnel"]{color:var(--emo)}
#toIntegr[data-group="mental"],#toDisint[data-group="mental"]{color:var(--ment)}

.moveLines{margin-top:12px;display:grid;gap:10px}
.moveLine{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.10);
  border-radius:16px;
  padding:12px;
}
.moveHead{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.moveBody{margin-top:8px;color:rgba(255,255,255,.78);line-height:1.35}
.muted{color:rgba(255,255,255,.55)}

/* pastilles UI, sans casser ul.dot des profils */
.uiDot,
.dot:not(ul){
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(255,255,255,.25);
  display:inline-block;
  flex:0 0 auto;
}
.uiDot.good,.dot.good:not(ul){background:var(--good)}
.uiDot.warn,.dot.warn:not(ul){background:var(--warn)}
.uiDot.bad,.dot.bad:not(ul){background:var(--bad)}

.ctaRow{margin-top:12px;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}

.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-family:inherit;
  font-size:15px;
  line-height:1.2;
  font-weight:650;
  text-decoration:none;
  transition:background .18s ease,border-color .18s ease,transform .06s ease;
}
.btn:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.22);text-decoration:none}
.btn:active{transform:translateY(1px)}

a[aria-disabled=true]{opacity:.55;pointer-events:none}

.ring{stroke:rgba(147,197,253,.55);stroke-width:3.2;fill:none}

.staticBg{pointer-events:none}

.hex,.tri{fill:none;stroke-linecap:round;stroke-linejoin:round}
.hex{stroke:rgba(255,255,255,.08);stroke-width:2.2}
.tri{stroke:rgba(255,255,255,.06);stroke-width:2;opacity:.65}

.centerLabel{
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
  font-size:13px;
  fill:rgba(255,255,255,.72);
}
.centerLabel.instinctif{fill:var(--inst)}
.centerLabel.emotionnel{fill:var(--emo)}
.centerLabel.mental{fill:var(--ment)}

.node{cursor:pointer}
.node circle{
  fill:rgba(15,26,51,.85);
  stroke:rgba(255,255,255,.20);
  stroke-width:2.2;
  transition:stroke .14s ease,filter .14s ease,transform .14s ease,opacity .14s ease,stroke-width .14s ease;
  filter:url(#softGlow);
}
.node.instinctif circle{stroke:var(--inst)}
.node.emotionnel circle{stroke:var(--emo)}
.node.mental circle{stroke:var(--ment)}
.node{transition:opacity .14s ease}
.node.is-key{opacity:1}
.node.is-dimmed{opacity:.24}
.node.is-active{opacity:1}
.node.is-active circle{
  stroke-width:2.2;
  transform:none;
}
.node.instinctif.is-active circle{filter:url(#softGlow)}
.node.emotionnel.is-active circle{filter:url(#softGlow)}
.node.mental.is-active circle{filter:url(#softGlow)}

.node text{
  fill:var(--text);
  font-weight:850;
  font-size:22px;
  dominant-baseline:middle;
  text-anchor:middle;
  opacity:1;
  transition:fill .14s ease,opacity .14s ease;
}
.node.is-dimmed text{fill:rgba(255,255,255,.42)}
.node.is-key text{fill:var(--text)}
.node.is-active text{fill:var(--text)}

.arrow{fill:none;stroke-width:3.2;opacity:0;transition:opacity .14s ease}
.arrow.on{opacity:.95}
.arrow.integr{stroke:rgba(134,239,172,.92)}
.arrow.disint{stroke:rgba(253,164,175,.92)}

#sidePanel.is-updating .card{
  animation:panelRefresh .16s ease;
}
@keyframes panelRefresh{
  from{opacity:.92;transform:translateY(2px)}
  to{opacity:1;transform:translateY(0)}
}

.siteFooter{margin-top:28px;padding:18px 12px;text-align:center;font-size:12px;opacity:.90}
.siteFooter .footerInner{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}
.siteFooter a{color:inherit;text-decoration:none;border-bottom:1px dotted currentColor}
.siteFooter a:hover{opacity:1}

@media (max-width:640px){
  .wrap{margin:18px auto 28px}
  .top{flex-direction:column;align-items:flex-start}
  .top h1{font-size:36px}
  .top p{font-size:14px}
  .actions{position:static}

  .stage{min-height:unset;padding:14px}
  .svgWrap{align-items:flex-start}
  .svgWrap svg{width:min(620px,96vw)}

  .ctaRow{gap:8px}
  .btn{padding:10px 12px}
}

#openProfil{
  border-color:rgba(255,255,255,.14)!important;
  color:var(--text)!important;
  background:rgba(255,255,255,.06)!important;
}

@keyframes halo-pulse{
  0%{transform:scale(1);filter:drop-shadow(0 0 10px rgba(255,255,255,.28))}
  50%{transform:scale(1.04);filter:drop-shadow(0 0 16px rgba(255,255,255,.42))}
  100%{transform:scale(1);filter:drop-shadow(0 0 10px rgba(255,255,255,.28))}
}

.node.hint circle{
  stroke-width:6.8;
  transform-box:fill-box;
  transform-origin:center;
  animation:halo-pulse 2s infinite ease-in-out;
}

/* scrollbars desktop */
@media (pointer:fine){
  *{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.35) transparent}
  *::-webkit-scrollbar{width:10px;height:10px}
  *::-webkit-scrollbar-track{background:transparent}
  *::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.22);
    border-radius:999px;
    border:2px solid transparent;
    background-clip:content-box;
  }
  *::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.32)}
}
