/* ORBIT — espace d'accueil (dashboard post-login).
   Hérite des tokens + utilitaires de orbit.css (:root, .ic, couleurs apps).
   Couleurs apps : PULSE vert, SHIELD doré, PILOT rouge, ALIVE bleu. */

body.app-shell {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ───────────────── Barre supérieure ───────────────── */
/* Web component <secalys-topbar> : light DOM, l'élément s'efface pour que son
   <header class="topbar2"> participe directement au layout flex de .app-shell. */
secalys-topbar { display: contents; }
.topbar2 {
  flex: none;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 26px 0 18px;
}
.top-left { display: flex; align-items: center; gap: 14px; flex: none; }
.apps-grid {
  border: 0; background: none; cursor: pointer; padding: 8px;
  border-radius: 8px; color: var(--muted); display: inline-flex;
}
.apps-grid:hover { background: var(--bg); color: var(--navy); }
.apps-grid svg { width: 20px; height: 20px; fill: currentColor; }
.top-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.top-logo { height: 26px; width: auto; display: block; }
.top-word { font-size: 21px; font-weight: 600; letter-spacing: .12em; color: var(--navy); }

/* Champ de recherche central */
.top-search {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}
.search-ic {
  position: absolute; left: 16px;
  width: 18px; height: 18px; pointer-events: none;
  fill: none; stroke: var(--muted-2); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.search-field {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 11px 56px 11px 44px;
  font: inherit; font-size: 14px; color: var(--ink);
}
.search-field::placeholder { color: var(--muted-2); }
.search-field:focus { outline: none; border-color: #c9d3dc; background: #fff; }
.search-kbd {
  position: absolute; right: 12px;
  font-size: 11px; font-weight: 600; color: var(--muted-2);
  background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; letter-spacing: .04em;
  pointer-events: none;
}

/* margin-left:auto pousse le groupe au bord droit (l'ancien espaceur flex était
   le champ de recherche, désormais retiré). */
.top-right { display: flex; align-items: center; gap: 14px; flex: none; margin-left: auto; }
.top-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.top-link:hover { color: var(--navy); }
.top-bell { position: relative; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; }
.top-bell:hover { color: var(--navy); }
/* Accès aux paramètres : engrenage bordé 38x38 + séparateur vertical, agencement
   aligné sur SHIELD/PILOT. Visible pour les admins uniquement. */
.top-gear {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.top-gear:hover { color: var(--navy); background: var(--bg); }
.top-gear[hidden] { display: none; }
.top-sep { width: 1px; height: 28px; background: var(--line); flex-shrink: 0; }
.top-sep[hidden] { display: none; }
.bell-badge {
  position: absolute; top: -2px; right: -3px;
  background: var(--pilot); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: grid; place-items: center; padding: 0 4px;
}
.top-profile {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--navy); padding: 4px;
}
.avatar {
  position: relative;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  display: grid; place-items: center;
}
.avatar-dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); border: 2px solid #fff;
}
.who { font-size: 14px; font-weight: 600; }

/* ───────────────── Sous : sidebar + contenu ───────────────── */
.below { flex: 1; display: flex; min-height: 0; }

/* ───────────────── Sidebar ───────────────── */
.sidebar {
  position: relative;
  flex: none;
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 14px 12px;
  overflow: visible;
  transition: width .16s ease;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--ink); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.nav-item:hover { background: var(--bg); }
.nav-item.is-active { background: rgba(24,169,87,.10); color: var(--green-d); font-weight: 600; }
.nav-item.is-active .nav-ic { stroke: var(--green-d); }
.nav-ic { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge {
  margin-left: auto;
  background: var(--pilot); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 5px;
}
.nav-section {
  margin: 16px 0 6px; padding: 0 12px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--muted-2); text-transform: uppercase;
}
/* Section poussée en bas de la sidebar */
.nav-section-bottom { margin-top: auto; }

/* Bouton collapse — onglet chevron sur la bordure droite (façon SHIELD) */
.sidebar-footer {
  position: absolute; right: -18px; top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}
.btn-collapse {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 48px; padding: 0;
  background: #fff;
  border: 1px solid var(--line); border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--muted); cursor: pointer;
  box-shadow: 3px 0 8px rgba(20, 37, 58, .08);
  transition: background .12s, color .12s;
}
.btn-collapse span { display: none; }
.btn-collapse svg { width: 12px; height: 12px; transition: transform .16s ease; }
.btn-collapse:hover { background: var(--bg); color: var(--navy); }

/* État réduit */
body.app-shell.collapsed .sidebar { width: 64px; }
body.app-shell.collapsed .nav-item { justify-content: center; gap: 0; font-size: 0; padding: 9px 0; }
body.app-shell.collapsed .nav-section { font-size: 0; }
body.app-shell.collapsed .nav-badge { display: none; }
body.app-shell.collapsed .btn-collapse svg { transform: rotate(180deg); }
body.app-shell.collapsed .dash-bottom { left: 64px; }

/* ───────────────── Contenu ───────────────── */
.content {
  flex: 1; min-width: 0; overflow-y: auto;
  padding: 32px 38px 128px;
  background: #f6f8fa;
}

/* ───────────────── Bandeau de crise ───────────────── */
.crisis-banner {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  margin: 0 0 46px;
  padding: 16px 18px 16px 32px;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 6% 50%, rgba(255,255,255,.10), transparent 26%),
    linear-gradient(100deg, #8c1717 0%, #6f1010 58%, #5d0c0c 100%);
  box-shadow: 0 18px 40px -22px rgba(125, 14, 14, .7);
}
/* `display:flex` ci-dessus écrase le style UA `[hidden]{display:none}` : sans
   cette règle, le bandeau resterait affiché (avec son texte par défaut) même
   quand home.js pose `hidden` (aucune crise active). Même garde que les autres
   éléments togglés du shell (.view[hidden], .cnode-license-badge[hidden], ...). */
.crisis-banner[hidden] { display: none; }
.crisis-ic {
  position: relative; flex: none;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 8px rgba(255,255,255,.05), 0 0 0 17px rgba(255,255,255,.03);
}
.crisis-ic svg { width: 28px; height: 28px; fill: #fff; }
/* ping radar */
.crisis-ic::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  animation: crisis-ping 2.4s ease-out infinite;
}
@keyframes crisis-ping {
  0%   { transform: scale(1);   opacity: .6; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

.crisis-body { flex: 1; min-width: 0; }
.crisis-eyebrow {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.65);
}
.crisis-title { margin: 2px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.crisis-meta {
  margin: 8px 0 0;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255,255,255,.78);
}
.crisis-meta u { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; color: #fff; }
.crisis-level {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
  background: #e5484d; border-radius: 999px; padding: 4px 11px;
}
.crisis-sep { width: 1px; height: 13px; background: rgba(255,255,255,.28); }

.crisis-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #8c1717;
  border-radius: 10px; padding: 11px 18px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none;
  transition: background .15s, transform .05s;
}
.crisis-btn .ic { width: 16px; height: 16px; }
.crisis-btn:hover { background: #ffecec; }
.crisis-btn:active { transform: translateY(1px); }

/* Région haute : intro (gauche) + constellation (droite) */
.dash-stage {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ───────────────── Intro ───────────────── */
.hero-hi {
  margin: 6px 0 0;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green);
}
.hero-title {
  margin: 14px 0 0;
  font-size: 28px; line-height: 1.22; font-weight: 800;
  letter-spacing: -.02em; color: var(--navy);
  white-space: nowrap;
}
.hero-title .dot { color: var(--green); }
.hero-lead {
  margin: 16px 0 0; max-width: 352px;
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
}

/* ───────────────── Carte « ORBIT Insights » ───────────────── */
.insights {
  margin: 26px 0 0;
  max-width: 300px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px -26px rgba(20, 37, 58, .28);
  padding: 16px;
}
.insights-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 2px 12px;
}
.insights-h {
  margin: 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy);
}
.insights-spark { width: 18px; height: 18px; fill: #6d5dfc; }

.insight {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  text-decoration: none;
  margin-bottom: 10px;
}
.insight:hover { border-color: #d7dee6; background: #fcfcfd; }
.insight-ic {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
}
.insight-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.insight-title { margin: 1px 0 0; font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.insight-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.insight-link {
  margin: 9px 0 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
}
.insight-link .ic { width: 15px; height: 15px; }

/* Recommandation : pas de cadre, séparée par un filet */
.insight-reco {
  border: 0; border-top: 1px solid var(--line-2);
  border-radius: 0; margin-bottom: 0;
  padding: 16px 2px 2px;
}
.insight-reco:hover { background: none; border-color: var(--line-2); }
.insight-eyebrow {
  margin: 2px 0 0; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #6d5dfc;
}
.insight-reco .insight-title { margin: 4px 0 0; }

/* Couleurs par catégorie (icône + lien) */
.n-alive .insight-ic { background: rgba(37,99,235,.10);  color: var(--alive); }
.n-pulse .insight-ic { background: rgba(22,163,74,.10);  color: var(--pulse); }
.n-shield .insight-ic { background: rgba(214,161,0,.13); color: var(--shield); }
.n-pilot .insight-ic { background: rgba(229,72,77,.10);  color: var(--pilot); }
.n-reco  .insight-ic { background: rgba(109,92,252,.13); color: #6d5dfc; }
.n-alive .insight-link { color: var(--alive); }
.n-pulse .insight-link { color: var(--pulse); }
.n-shield .insight-link { color: var(--shield); }
.n-pilot .insight-link { color: var(--pilot); }
.n-reco  .insight-link { color: #6d5dfc; }

/* ───────────────── Constellation ───────────────── */
.dash-right { position: relative; }
.constellation {
  position: relative;
  height: 700px;
  width: 100%;
  max-width: 820px;
  margin: 92px auto 0;
  transform: translateX(-40px);
}

/* Aura bleue diffuse en fond de la constellation */
.aura {
  position: absolute; left: 50%; top: 50%;
  width: 660px; height: 660px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(37,99,235,.11) 0%,
    rgba(37,99,235,.06) 32%,
    rgba(37,99,235,.02) 55%,
    transparent 72%);
  pointer-events: none;
  z-index: 0;
}

/* Anneaux orbitaux concentriques (fond riche) */
.rings, .rings-xl {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}
.rings {
  width: 560px; height: 560px;
  border: 1px solid rgba(20, 37, 58, .08);
}
.rings::before,
.rings::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(20, 37, 58, .07);
}
.rings::before { inset: 80px; border-style: dashed; }
.rings::after  { inset: 162px; }
.rings-xl {
  width: 760px; height: 760px;
  border: 1px solid rgba(20, 37, 58, .05);
}
.rings-xl::before {
  content: ""; position: absolute; inset: 100px;
  border-radius: 50%; border: 1px dashed rgba(20, 37, 58, .045);
}

.odot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(246, 248, 250, .6);
}
.od-sm { width: 6px; height: 6px; }
.od-lg { width: 11px; height: 11px; }
.od-green { background: var(--pulse); }
.od-blue  { background: var(--alive); }
.od-red   { background: var(--pilot); }
.od-navy  { background: var(--navy); }
.od-gray  { background: var(--muted-2); }
/* Point « cible » : pastille + anneau fin */
.od-target {
  width: 7px; height: 7px;
  box-shadow: 0 0 0 3px #f6f8fa, 0 0 0 4.5px rgba(37,99,235,.5);
}

/* Emblème central */
.orbit-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.core-disc {
  width: 242px; height: 242px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ffffff 58%, rgba(255,255,255,.75) 72%, rgba(255,255,255,0) 100%);
  box-shadow: 0 30px 70px -34px rgba(20, 37, 58, .4);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.core-mark { width: 56px; height: auto; display: block; }
.core-word { margin: 8px 0 0; font-size: 24px; font-weight: 600; letter-spacing: .16em; color: var(--navy); }
.core-tag {
  margin: 7px 0 0; font-size: 9.5px; font-weight: 600;
  letter-spacing: .1em; line-height: 1.7; color: var(--muted);
}
.core-tag strong { color: var(--green); }

/* Nœuds d'application — grand disque blanc + petite constellation autour */
.cnode {
  position: absolute;
  width: 204px; height: 204px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #ffffff 52%, rgba(255,255,255,.94) 82%, rgba(255,255,255,.84) 100%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 26px 54px -34px rgba(20, 37, 58, .42), inset 0 1px 0 rgba(255,255,255,.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 20px 18px;
  z-index: 3;
}
/* Anneaux fins autour du rond (absolute -> hors du flux flex) */
.cnode::before,
.cnode::after {
  content: ""; position: absolute; border-radius: 50%;
  pointer-events: none; z-index: -1;
}
.cnode::before { inset: -13px; border: 1px solid rgba(20, 37, 58, .08); }
.cnode::after  { inset: -28px; border: 1px dashed rgba(20, 37, 58, .055); }
/* Position des apps : centralisée dans la section « Gravitation » (révolution)
   et rétablie aux quatre coins en repli (petits écrans / mouvement réduit). */

.cnode-ic {
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
}
.cnode-ic img { width: 32px; height: 32px; object-fit: contain; display: block; }
.n-alive .cnode-ic img { width: 40px; }
.cnode-dot {
  position: absolute; top: 50%; left: 50%;
  --dot-R: 116px;
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 0 4px #f6f8fa;
  z-index: 4;
  animation: app-dot-orbit 16s linear infinite;
  will-change: transform;
}
/* Désync par app : chacun démarre à un angle différent (delai négatif) */
.n-pulse  .cnode-dot { background: var(--pulse);  animation-delay: -2s;  }
.n-shield .cnode-dot { background: var(--shield); animation-delay: -9s;  }
.n-pilot  .cnode-dot { background: var(--pilot);  animation-delay: -5s;  }
.n-alive  .cnode-dot { background: var(--alive);  animation-delay: -13s; }
/* Survol : l'app et son satellite s'immobilisent ensemble */
.cnode:hover .cnode-dot { animation-play-state: paused; }
.cnode-name { margin: 11px 0 0; font-size: 16px; font-weight: 800; letter-spacing: .05em; }
.cnode-desc { margin: 5px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.cnode-metric { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; }
/* Flèche dans un rond posé sur le bord (bas) du grand cercle */
.cnode-go {
  position: absolute;
  left: 50%; bottom: -19px; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(20, 37, 58, .4);
  transition: background .15s, border-color .15s, color .15s;
}
.cnode-go .ic { width: 17px; height: 17px; }

/* Halo du badge, liseré + flèche colorés par app */
.n-pulse  .cnode-ic { box-shadow: 0 0 0 6px rgba(22,163,74,.10), 0 10px 22px -10px rgba(22,163,74,.5); }
.n-shield .cnode-ic { box-shadow: 0 0 0 6px rgba(214,161,0,.12), 0 10px 22px -10px rgba(214,161,0,.5); }
.n-pilot  .cnode-ic { box-shadow: 0 0 0 6px rgba(229,72,77,.10), 0 10px 22px -10px rgba(229,72,77,.5); }
.n-alive  .cnode-ic { box-shadow: 0 0 0 6px rgba(37,99,235,.10), 0 10px 22px -10px rgba(37,99,235,.5); }
.n-pulse  .cnode-name, .n-pulse  .cnode-metric { color: var(--pulse); }
.n-shield .cnode-name, .n-shield .cnode-metric { color: var(--shield); }
.n-pilot  .cnode-name, .n-pilot  .cnode-metric { color: var(--pilot); }
.n-alive  .cnode-name, .n-alive  .cnode-metric { color: var(--alive); }
.n-pulse  .cnode-go { border: 1.5px solid rgba(22,163,74,.30); color: var(--pulse); }
.n-shield .cnode-go { border: 1.5px solid rgba(214,161,0,.34); color: var(--shield); }
.n-pilot  .cnode-go { border: 1.5px solid rgba(229,72,77,.30); color: var(--pilot); }
.n-alive  .cnode-go { border: 1.5px solid rgba(37,99,235,.30); color: var(--alive); }
/* Survol : fond coloré, flèche blanche */
.n-pulse  .cnode-go:hover { background: var(--pulse);  border-color: var(--pulse);  color: #fff; }
.n-shield .cnode-go:hover { background: var(--shield); border-color: var(--shield); color: #fff; }
.n-pilot  .cnode-go:hover { background: var(--pilot);  border-color: var(--pilot);  color: #fff; }
.n-alive  .cnode-go:hover { background: var(--alive);  border-color: var(--alive);  color: #fff; }

/* Ronds désactivés (prochainement / licence requise) */
.cnode.is-soon .cnode-ic,
.cnode.is-locked .cnode-ic { box-shadow: 0 0 0 6px rgba(20,37,58,.05), 0 10px 22px -10px rgba(20,37,58,.25); }
.cnode.is-soon .cnode-ic img,
.cnode.is-locked .cnode-ic img { filter: grayscale(1); opacity: .45; }
.cnode.is-soon .cnode-name,
.cnode.is-locked .cnode-name { color: var(--muted); }
.cnode.is-soon .cnode-dot,
.cnode.is-locked .cnode-dot { background: var(--muted-2); }
.cnode-soon {
  margin: 9px 0 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted-2);
}
.cnode-soon svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cnode.is-soon .cnode-go,
.cnode.is-locked .cnode-go {
  pointer-events: none; cursor: default;
  background: #f4f6f8;
  border: 1.5px solid var(--line);
  color: var(--muted-2);
  box-shadow: none;
}

/* Badge « Licence requise » des nœuds verrouillés (#66). Masqué par défaut
   (attribut hidden posé en HTML), révélé par home.js sur .is-locked. */
.cnode-license-badge {
  margin: 9px 0 0;
  align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted-2);
}
.cnode-license-badge[hidden] { display: none; }
.cnode.is-locked .cnode-license-badge { display: inline-flex; }
.cnode-license-badge svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Rond PILOT en mode crise active */
.cnode.is-crisis {
  background: radial-gradient(circle at 50% 30%, #ffffff 48%, rgba(229,72,77,.06) 82%, rgba(229,72,77,.11) 100%);
  border-color: rgba(229,72,77,.28);
  box-shadow: 0 26px 54px -30px rgba(229,72,77,.55), inset 0 1px 0 rgba(255,255,255,.9);
}
.cnode.is-crisis::before { border-color: rgba(229,72,77,.30); }
.cnode.is-crisis::after  { border-color: rgba(229,72,77,.18); border-style: solid; }
.cnode.is-crisis .cnode-dot { background: var(--pilot); }
.cnode.is-crisis .cnode-go {
  background: var(--pilot); border-color: var(--pilot); color: #fff;
  box-shadow: 0 8px 18px -6px rgba(229,72,77,.6);
}
.cnode.is-crisis .cnode-go:hover { background: #d83f44; }
/* Radar pulsé — réservé au mode crise active. Le span `.cnode-pulse` est
   toujours présent dans le markup PILOT, mais ses pseudo-éléments (les ondes)
   ne sont rendus QUE lorsque le nœud porte `.is-crisis` ; sinon le rond PILOT
   est neutre, comme les autres apps. */
.cnode-pulse { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: -1; }
.cnode.is-crisis .cnode-pulse::before,
.cnode.is-crisis .cnode-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(229,72,77,.5);
  animation: crisis-radar 2.6s ease-out infinite;
}
.cnode.is-crisis .cnode-pulse::after { animation-delay: 1.3s; }
@keyframes crisis-radar {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.4);  opacity: 0; }
  100% { transform: scale(1.4);  opacity: 0; }
}

/* ───────────────── Gravitation ─────────────────
   Révolution lente, sens horaire, autour de l'emblème ORBIT (fixe au centre).
   - Apps : chacune est ancrée AU CENTRE puis projetée sur un cercle de rayon
     --orbit-R. La double rotation inverse (rotate θ -> translateX R -> rotate -θ)
     les fait tourner autour du centre tout en restant droites. Même vitesse pour
     toutes (système rigide) ; un animation-delay négatif distinct les répartit
     sur le cercle (≈ 45 / 135 / 225 / 315°), reproduisant la disposition initiale.
   - Points : le calque .dots tourne d'un bloc autour du centre (ce sont des ronds,
     inutile de les redresser), un peu plus lentement -> effet de profondeur.
   Le champ de fond (aura, rings) ne tourne pas : repère fixe de la gravitation. */
@keyframes revolve {
  from { transform: translate(-50%, -50%) rotate(0deg)   translateX(var(--orbit-R, 320px)) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(var(--orbit-R, 320px)) rotate(-360deg); }
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* Point satellite de chaque app : orbite locale autour du centre de SON disque
   (rayon --dot-R, sur l'anneau fin ::before). Démarre en haut (translateY -R). */
@keyframes app-dot-orbit {
  from { transform: translate(-50%, -50%) rotate(0deg)   translateY(calc(-1 * var(--dot-R))) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateY(calc(-1 * var(--dot-R))) rotate(-360deg); }
}

/* Apps : toutes ancrées au centre, réparties par le délai, même période */
.cnode {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  --orbit-R: 320px;
  animation: revolve 120s linear infinite;
  will-change: transform;
}
.cn-tl { animation-delay: -75s;  }  /* PULSE  -> haut-gauche  (≈225°) */
.cn-tr { animation-delay: -105s; }  /* SHIELD -> haut-droite  (≈315°) */
.cn-bl { animation-delay: -45s;  }  /* PILOT  -> bas-gauche   (≈135°) */
.cn-br { animation-delay: -15s;  }  /* ALIVE  -> bas-droite   (≈45°)  */
/* Pause au survol : l'app visée s'immobilise, on clique tranquillement */
.cnode:hover { animation-play-state: paused; }

/* Points : 3 calques d'étoiles en parallaxe gravitant autour du centre.
   Les plus proches tournent plus vite (période courte) -> effet de profondeur,
   comme un vrai système orbital. Même sens que les apps (cohérence). */
.dots { position: absolute; inset: 0; }
/* Un calque par point -> chacun gravite autour du centre à SA vitesse (durée
   posée en inline sur chaque calque). Variété : certains rapides, d'autres lents. */
.dots-layer {
  position: absolute; inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  animation: orbit-spin linear infinite;
}

/* Repli : petits écrans (constellation à l'étroit) ou mouvement réduit ->
   pas de révolution, on rétablit la disposition fixe aux quatre coins. */
@media (max-width: 1120px), (prefers-reduced-motion: reduce) {
  .cnode, .dots-layer { animation: none; }
  .cnode-dot { animation: none; top: -14px; transform: translate(-50%, -50%); }
  .cn-tl { left: 23%; top: 18%; }
  .cn-tr { left: 77%; top: 18%; }
  .cn-bl { left: 17%; top: 81%; }
  .cn-br { left: 83%; top: 81%; }
}

/* ───────────────── Accès rapide (barre fixée en bas de fenêtre) ───────────────── */
.dash-bottom {
  position: fixed;
  left: 236px; right: 0; bottom: 52px;
  display: flex; justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.quick-access {
  pointer-events: auto;
  display: inline-flex; align-items: stretch;
  background: #14253a;
  border-radius: 16px;
  box-shadow: 0 22px 48px -18px rgba(20, 37, 58, .6);
  padding: 8px;
  color: #fff;
}
.qa-h {
  display: flex; align-items: center;
  margin: 0; padding: 0 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
}
.qa-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px;
  color: #eaf0f6; text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  position: relative;
}
/* Séparateur fin entre chaque élément */
.qa-item::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 1px; background: rgba(255,255,255,.12);
}
.qa-item:hover { background: rgba(255,255,255,.06); }
.qa-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa-item span { flex: none; }

/* ───────────────── Responsive ───────────────── */
@media (max-width: 1320px) {
  .dash-stage { grid-template-columns: 360px minmax(0, 1fr); gap: 20px; }
  .hero-title { font-size: 25px; white-space: normal; }
}
@media (max-width: 1120px) {
  .top-search { display: none; }
  .dash-stage { grid-template-columns: 1fr; }
  .constellation { height: 520px; max-width: 720px; margin: 24px auto 0; transform: none; }
}
@media (max-width: 720px) {
  .quick-access { flex-wrap: wrap; justify-content: center; }
  .qa-h { width: 100%; justify-content: center; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 6px 0 10px; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .dash-bottom, body.app-shell.collapsed .dash-bottom { left: 0; bottom: 16px; }
  .constellation { height: 470px; }
  .cnode { width: 168px; height: 168px; padding: 14px; }
  .core-disc { width: 180px; height: 180px; }
  .crisis-banner { flex-wrap: wrap; }
  .crisis-btn { width: 100%; justify-content: center; }
}

/* ---------- Menu profil (déconnexion) ---------- */
.profile-wrap { position: relative; }
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18); padding: 8px; z-index: 60;
}
.profile-menu-email { margin: 4px 8px 8px; color: #94a3b8; font-size: .8rem; word-break: break-all; }
.profile-menu-item {
  display: block; width: 100%; text-align: left; box-sizing: border-box;
  padding: 9px 10px; border: none; background: none; border-radius: 8px;
  font: inherit; font-size: .9rem; color: #334155; cursor: pointer; text-decoration: none;
}
.profile-menu-item:hover { background: #f1f5f9; }
.profile-logout { color: #b91c1c; font-weight: 600; }
.profile-logout:hover { background: #fef2f2; }

/* ---------- Lanceur d'applications (panneau du bouton 3x3) ---------- */
.apps-wrap { position: relative; display: inline-flex; }
.apps-panel {
  position: absolute; top: calc(100% + 8px); left: 0; width: 300px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18); padding: 16px; z-index: 60;
}
.apps-panel-h {
  margin: 0 0 10px; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.apps-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apps-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 7px; padding: 14px 8px; border-radius: 12px; text-decoration: none;
  transition: background .15s;
}
.apps-tile:hover { background: var(--bg); }
.apps-tile-ic {
  width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid;
  place-items: center; box-shadow: 0 0 0 5px rgba(20,37,58,.04), 0 8px 18px -8px rgba(20,37,58,.25);
}
.apps-tile-ic img { width: 26px; height: 26px; object-fit: contain; display: block; }
.n-alive .apps-tile-ic img { width: 32px; }
.apps-tile-name { font-size: .82rem; font-weight: 800; letter-spacing: .04em; }
.apps-tile-desc { font-size: .7rem; line-height: 1.3; color: var(--muted); }
.n-pulse  .apps-tile-name { color: var(--pulse); }
.n-shield .apps-tile-name { color: var(--shield); }
.n-pilot  .apps-tile-name { color: var(--pilot); }
.n-alive  .apps-tile-name { color: var(--alive); }
.n-pulse  .apps-tile-ic { box-shadow: 0 0 0 5px rgba(22,163,74,.10),  0 8px 18px -8px rgba(22,163,74,.45); }
.n-shield .apps-tile-ic { box-shadow: 0 0 0 5px rgba(214,161,0,.12),  0 8px 18px -8px rgba(214,161,0,.45); }
.n-pilot  .apps-tile-ic { box-shadow: 0 0 0 5px rgba(229,72,77,.10),  0 8px 18px -8px rgba(229,72,77,.45); }
.n-alive  .apps-tile-ic { box-shadow: 0 0 0 5px rgba(37,99,235,.10),  0 8px 18px -8px rgba(37,99,235,.45); }
/* Tuile desactivee (pas d'entitlement) : grisee, non cliquable. */
.apps-tile.is-disabled { cursor: default; }
.apps-tile.is-disabled:hover { background: none; }
.apps-tile.is-disabled .apps-tile-ic { box-shadow: 0 0 0 5px rgba(20,37,58,.04), 0 8px 18px -8px rgba(20,37,58,.20); }
.apps-tile.is-disabled .apps-tile-ic img { filter: grayscale(1); opacity: .45; }
.apps-tile.is-disabled .apps-tile-name { color: var(--muted); }
.apps-panel-admin { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2f6; }
.apps-admin-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
  text-decoration: none; color: #334155; font-size: .9rem; font-weight: 500;
}
.apps-admin-item:hover { background: #f1f5f9; }
.apps-admin-item svg { width: 18px; height: 18px; flex: none; }
