/* =========================================================
   DATAAGENTS GALAXY — carte orbitale premium
   Styles volontairement isolés sous .map-page / .cosmos-*
   ========================================================= */

.map-page {
  --map-bg: #050816;
  --map-panel: rgba(8, 14, 31, 0.86);
  --map-panel-strong: rgba(10, 18, 39, 0.96);
  --map-line: rgba(153, 190, 255, 0.14);
  --map-line-strong: rgba(153, 203, 255, 0.28);
  --map-muted: #9aa8be;
  --map-focus: #6ee7ff;
  --family-migrator: #45a3ff;
  --family-builder: #45e08a;
  --family-corepilot: #bd7bff;
  --family-audit: #8b8dff;
  background: var(--map-bg);
}

.map-page::before {
  background:
    radial-gradient(ellipse 58% 38% at 18% 5%, rgba(56, 189, 248, 0.13), transparent 68%),
    radial-gradient(ellipse 52% 42% at 90% 18%, rgba(168, 85, 247, 0.11), transparent 68%),
    radial-gradient(ellipse 62% 44% at 58% 105%, rgba(46, 77, 173, 0.12), transparent 70%),
    linear-gradient(180deg, #050816 0%, #060b19 48%, #050712 100%);
}

.map-page::after {
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.72) 0 1px, transparent 1.4px),
    radial-gradient(circle at 80% 34%, rgba(126,220,255,.62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 47% 76%, rgba(210,185,255,.56) 0 1px, transparent 1.4px);
  background-size: 137px 137px, 193px 193px, 257px 257px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cosmos-main { overflow: hidden; }

.cosmos-container {
  max-width: 1480px;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

/* Hero compact : la carte reste visible dans le premier écran. */
.cosmos-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3.2rem, 7vw, 6.4rem) 0 clamp(2rem, 4vw, 3.4rem);
}

.cosmos-hero-copy { max-width: 780px; }

.cosmos-kicker,
.directory-eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  color: #92eaff;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cosmos-kicker-mark {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #56e1ff;
  box-shadow: 0 0 0 5px rgba(86,225,255,.09), 0 0 22px rgba(86,225,255,.8);
}

.cosmos-kicker-mark::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(86,225,255,.28);
  border-radius: inherit;
  animation: mapSignal 2.6s ease-out infinite;
}

.cosmos-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #f7f9ff;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5vw, 5.3rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.cosmos-hero h1 span {
  color: transparent;
  background: linear-gradient(96deg, #80e8ff 4%, #a9b9ff 48%, #d09cff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 22px rgba(112, 213, 255, .14));
}

.cosmos-hero-sub {
  max-width: 690px;
  margin-top: 1.35rem;
  color: #a9b4c7;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  font-weight: 300;
  line-height: 1.75;
}

.cosmos-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  min-width: min(100%, 400px);
  padding: .75rem;
  border: 1px solid rgba(158, 198, 255, .14);
  border-radius: 18px;
  background: rgba(10, 18, 38, .58);
  box-shadow: 0 22px 60px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(18px);
}

.cosmos-stat {
  position: relative;
  min-width: 0;
  padding: .65rem 1rem;
}

.cosmos-stat + .cosmos-stat::before {
  content: '';
  position: absolute;
  inset: .45rem auto .45rem 0;
  width: 1px;
  background: rgba(255,255,255,.09);
}

.cosmos-stat dt {
  overflow: hidden;
  color: #8997ad;
  font-family: var(--font-display);
  font-size: .58rem;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cosmos-stat dd {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  margin-top: .12rem;
}

.cosmos-stat dd span {
  color: #f8fbff;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
}

.cosmos-stat dd small {
  color: #718097;
  font-size: .66rem;
  white-space: nowrap;
}

.cosmos-stat--live dd span { color: #62e6a0; }

/* Cadre Mission Control */
.cosmos-console {
  position: relative;
  margin-bottom: clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  border: 1px solid rgba(153, 198, 255, .19);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(12, 23, 49, .86), rgba(5, 10, 24, .92)),
    var(--map-panel);
  box-shadow:
    0 42px 100px rgba(0,0,0,.42),
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 1px rgba(255,255,255,.07) inset;
}

.cosmos-console::before {
  content: '';
  position: absolute;
  z-index: 5;
  top: 0;
  left: 7%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #65dfff, transparent);
  box-shadow: 0 0 28px 3px rgba(76, 211, 255, .32);
  pointer-events: none;
}

.cosmos-console-bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding: 1rem 1.25rem 1rem 1.4rem;
  border-bottom: 1px solid var(--map-line);
  background: rgba(7, 13, 28, .76);
  backdrop-filter: blur(22px);
}

.console-signal,
.console-actions,
.console-signal > span:last-child {
  display: flex;
  align-items: center;
}

.console-signal { gap: .8rem; }
.console-signal > span:last-child { align-items: flex-start; flex-direction: column; }

.console-signal strong {
  color: #dce9f8;
  font-family: var(--font-display);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.console-signal small { color: #7f8ea4; font-size: .72rem; }

.console-signal-radar {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(83, 228, 157, .28);
  border-radius: 50%;
  background: rgba(50, 211, 135, .06);
}

.console-signal-radar::before,
.console-signal-radar::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(83, 228, 157, .18);
  border-radius: inherit;
}

.console-signal-radar::before { inset: 5px; }
.console-signal-radar::after { inset: 10px; }

.console-signal-radar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #52e39a;
  box-shadow: 0 0 12px #52e39a;
}

.console-actions { justify-content: flex-end; gap: .75rem; }

.map-search {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: clamp(210px, 22vw, 320px);
  min-height: 42px;
  padding: 0 .7rem 0 .9rem;
  border: 1px solid rgba(158, 199, 255, .18);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: #8797ae;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.map-search:focus-within {
  border-color: rgba(100, 225, 255, .72);
  background: rgba(84, 211, 255, .06);
  box-shadow: 0 0 0 3px rgba(82, 214, 255, .1);
}

.map-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef5ff;
  font: 400 .82rem var(--font-body);
}

.map-search input::placeholder { color: #738198; opacity: 1; }

.map-search kbd {
  display: grid;
  min-width: 24px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.11);
  border-bottom-color: rgba(255,255,255,.2);
  border-radius: 5px;
  color: #6f7d91;
  font: 500 .65rem var(--font-display);
}

.console-directory-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 42px;
  padding: 0 .95rem;
  border: 1px solid rgba(158, 199, 255, .16);
  border-radius: 11px;
  color: #aebbd0;
  font-size: .76rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.console-directory-link:hover {
  border-color: rgba(110, 231, 255, .45);
  background: rgba(110, 231, 255, .06);
  color: #eefaff;
}

.cosmos-workspace {
  display: grid;
  grid-template-columns: 205px minmax(510px, 1fr) 300px;
  min-height: 660px;
}

/* Filtres */
.family-panel {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1rem 1.15rem;
  border-right: 1px solid var(--map-line);
  background: rgba(5, 11, 25, .52);
}

.family-panel-heading { padding: 0 .45rem 1rem; }

.family-panel-heading span,
.dossier-eyebrow,
.dossier-section-title {
  display: block;
  color: #6d7e98;
  font-family: var(--font-display);
  font-size: .56rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.family-panel-heading strong {
  display: block;
  margin-top: .2rem;
  color: #dce7f5;
  font-size: .9rem;
  font-weight: 500;
}

.family-filters { display: grid; gap: .4rem; }

.family-filter {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 54px;
  padding: .55rem .55rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #8e9db2;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.family-filter:hover {
  border-color: rgba(152, 197, 255, .12);
  background: rgba(255,255,255,.035);
  color: #d6e1ef;
}

.family-filter.is-active {
  border-color: rgba(105, 218, 255, .22);
  background: linear-gradient(100deg, rgba(68, 190, 255, .12), rgba(122, 100, 255, .055));
  color: #eef8ff;
  box-shadow: inset 2px 0 #5ddcff;
}

.family-filter-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  font-family: var(--font-display);
  font-size: .84rem;
}

.family-filter-icon--all { color: #6ee7ff; }
.family-filter-icon--migrator { color: var(--family-migrator); }
.family-filter-icon--builder { color: var(--family-builder); }
.family-filter-icon--corepilot { color: var(--family-corepilot); }
.family-filter-icon--audit { color: var(--family-audit); }

.family-filter-copy { min-width: 0; }
.family-filter-copy strong,
.family-filter-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-filter-copy strong { color: inherit; font-size: .76rem; font-weight: 500; }
.family-filter-copy small { margin-top: .02rem; color: #68778d; font-size: .63rem; }

.family-filter-count {
  min-width: 23px;
  padding: .12rem .35rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: #8090a6;
  font: 500 .6rem var(--font-display);
  text-align: center;
}

.family-filter.is-active .family-filter-count { border-color: rgba(104, 223, 255, .25); color: #8deaff; }

.family-panel-help {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: auto .4rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #718096;
  font-size: .68rem;
  line-height: 1.45;
}

.family-panel-help > span:first-child {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  font-family: serif;
  font-size: .62rem;
}

/* Carte */
.cosmos-map-shell { min-width: 0; background: #050a17; }

.cosmos-viewport {
  --stars-x: 0px;
  --stars-y: 0px;
  --nebula-x: 0px;
  --nebula-y: 0px;
  --depth-x: 0px;
  --depth-y: 0px;
  --light-x: 50%;
  --light-y: 44%;
  --scene-tilt-x: 6deg;
  --scene-tilt-y: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 660px;
  overflow: hidden;
  outline: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(30, 72, 134, .16), transparent 37%),
    linear-gradient(180deg, #060c1c, #030711);
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  isolation: isolate;
  perspective: 1100px;
  perspective-origin: 50% 44%;
}

.cosmos-viewport::before,
.cosmos-viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cosmos-viewport::before {
  z-index: 3;
  background: radial-gradient(310px circle at var(--light-x) var(--light-y), rgba(116, 226, 255, .105), rgba(117, 110, 255, .035) 34%, transparent 72%);
  mix-blend-mode: screen;
}

.cosmos-viewport::after {
  z-index: 6;
  background: repeating-linear-gradient(180deg, transparent 0 4px, rgba(150, 211, 255, .022) 5px, transparent 6px);
  opacity: .42;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.cosmos-viewport.is-dragging { cursor: grabbing; }

.cosmos-viewport:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(110, 231, 255, .72), inset 0 0 0 6px rgba(5, 8, 22, .95);
}

.star-canvas,
.cosmos-nebula,
.cosmos-depth-field,
.cosmos-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star-canvas {
  z-index: 0;
  opacity: .9;
  transform: translate3d(var(--stars-x), var(--stars-y), 0) scale(1.035);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

.network-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .82;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 4px rgba(83, 205, 255, .16));
  transform: translateZ(-18px);
}

.cosmos-nebula {
  z-index: 1;
  background:
    radial-gradient(ellipse 35% 22% at 23% 70%, rgba(42, 157, 255, .12), transparent 72%),
    radial-gradient(ellipse 30% 27% at 78% 27%, rgba(174, 79, 255, .13), transparent 74%),
    radial-gradient(ellipse 23% 18% at 61% 78%, rgba(55, 223, 162, .06), transparent 75%);
  filter: blur(12px);
  transform: translate3d(var(--nebula-x), var(--nebula-y), 0) scale(1.06);
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
  animation: nebulaBreathe 10s ease-in-out infinite alternate;
}

.cosmos-depth-field {
  z-index: 1;
  inset: -8%;
  width: 116%;
  height: 116%;
  opacity: .62;
  background-image:
    radial-gradient(circle at 9% 24%, rgba(139, 225, 255, .75) 0 1px, transparent 1.8px),
    radial-gradient(circle at 79% 17%, rgba(205, 168, 255, .68) 0 1.2px, transparent 2px),
    radial-gradient(circle at 69% 81%, rgba(112, 205, 255, .58) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 72%, rgba(255,255,255,.48) 0 .8px, transparent 1.7px);
  background-size: 173px 157px, 229px 211px, 283px 263px, 137px 191px;
  filter: blur(.2px) drop-shadow(0 0 5px rgba(120, 213, 255, .28));
  transform: translate3d(var(--depth-x), var(--depth-y), 0) scale(1.055);
  transition: transform .62s cubic-bezier(.2,.7,.2,1);
}

.cosmos-depth-field::before,
.cosmos-depth-field::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(116, 210, 255, .09);
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(109, 131, 255, .08));
}

.cosmos-depth-field::before { inset: 16% 23%; transform: rotate(-14deg); }
.cosmos-depth-field::after { inset: 28% 8%; border-color: rgba(190, 118, 255, .065); transform: rotate(17deg); }

.cosmos-vignette {
  z-index: 4;
  box-shadow: inset 0 0 115px 28px rgba(0,0,0,.72);
}

.cosmos-scene {
  --scene-x: 0px;
  --scene-y: 0px;
  --scene-scale: 1;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(94%, 720px);
  aspect-ratio: 1;
  transform: translate3d(calc(-50% + var(--scene-x)), calc(-50% + var(--scene-y)), 0) scale(var(--scene-scale)) rotateX(var(--scene-tilt-x)) rotateY(var(--scene-tilt-y));
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform .28s cubic-bezier(.22,.7,.26,1);
  will-change: transform;
}

.cosmos-viewport.is-dragging .cosmos-scene { transition: none; }

.scene-depth-grid,
.scene-depth-disc {
  position: absolute;
  pointer-events: none;
  transform-style: preserve-3d;
}

.scene-depth-grid {
  z-index: 0;
  inset: 9%;
  border: 1px solid rgba(112, 209, 255, .075);
  border-radius: 50%;
  opacity: .34;
  background-image:
    linear-gradient(rgba(104, 198, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 198, 255, .075) 1px, transparent 1px);
  background-size: 34px 34px;
  box-shadow: inset 0 0 72px rgba(4, 8, 24, .88), 0 0 55px rgba(80, 164, 255, .08);
  mask-image: radial-gradient(circle, #000 0 38%, rgba(0,0,0,.72) 58%, transparent 78%);
  transform: translateZ(-88px) scale(1.08);
}

.scene-depth-disc {
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 79%;
  aspect-ratio: 1;
  border: 1px solid rgba(138, 127, 255, .11);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(64, 128, 255, .055), transparent 61%);
  box-shadow: inset 0 0 60px rgba(102, 72, 255, .055), 0 0 80px rgba(76, 155, 255, .06);
  transform: translate3d(-50%, -50%, -54px);
}

.system-orbit {
  --orbit-z: -20px;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(120, 174, 255, .2);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, var(--orbit-z)) rotate(-7deg);
  transform-style: preserve-3d;
  transition: opacity .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.system-orbit::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-top: 1px solid var(--orbit-color, #73dfff);
  border-radius: inherit;
  opacity: .48;
  mask-image: linear-gradient(90deg, transparent 8%, #000 48%, transparent 88%);
}

.system-orbit::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-bottom: 3px solid color-mix(in srgb, var(--orbit-color, #73dfff) 13%, transparent);
  border-radius: inherit;
  filter: blur(2px);
  transform: translateZ(-9px);
}

.system-orbit > span {
  position: absolute;
  top: 50%;
  right: -7px;
  padding: .2rem .5rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(4, 9, 20, .9);
  color: #74839a;
  font-family: var(--font-display);
  font-size: .48rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  transform: translate(50%, -50%) rotate(7deg);
  white-space: nowrap;
}

.system-orbit--corepilot { --orbit-color: var(--family-corepilot); --orbit-z: 8px; width: 34%; height: 19%; }
.system-orbit--builder { --orbit-color: var(--family-builder); --orbit-z: -5px; width: 52%; height: 30%; }
.system-orbit--audit { --orbit-color: var(--family-audit); --orbit-z: -18px; width: 70%; height: 40%; }
.system-orbit--migrator { --orbit-color: var(--family-migrator); --orbit-z: -34px; width: 90%; height: 54%; }

.system-orbit.is-muted { opacity: .14; }
.system-orbit.is-highlighted {
  border-color: color-mix(in srgb, var(--orbit-color) 60%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--orbit-color) 18%, transparent);
}

.galaxy-core {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  transform: translate3d(-50%, -50%, 78px);
  transform-style: preserve-3d;
  transition: opacity .28s ease, visibility 0s linear, transform .42s cubic-bezier(.2,.8,.2,1);
}

.galaxy-core::before {
  content: '';
  position: absolute;
  inset: -36px;
  border: 1px solid rgba(105, 218, 255, .09);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 191, 255, .12), rgba(113, 76, 255, .045) 45%, transparent 70%);
  box-shadow: 0 0 48px rgba(74, 166, 255, .11);
  transform: translateZ(-38px);
}

.galaxy-core::after {
  content: '';
  position: absolute;
  top: 69px;
  left: 50%;
  width: 68px;
  height: 19px;
  border-radius: 50%;
  background: rgba(3, 7, 20, .74);
  filter: blur(7px);
  transform: translate3d(-50%, 0, -64px) rotateX(67deg);
}

.galaxy-core-sun {
  position: relative;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 32%;
  background:
    radial-gradient(circle at 34% 28%, #fff 0 4%, #baf4ff 16%, #55c6ff 43%, #3562c8 76%, #17275e 100%);
  box-shadow: 0 0 18px #71dbff, 0 0 54px 12px rgba(78, 155, 255, .28), 0 0 90px 24px rgba(111, 75, 255, .13);
  clip-path: polygon(25% 3%, 75% 3%, 97% 25%, 97% 75%, 75% 97%, 25% 97%, 3% 75%, 3% 25%);
  transform: translateZ(18px);
  transform-style: preserve-3d;
  animation: coreLevitate 4.8s ease-in-out infinite alternate;
}

.galaxy-core-sun::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(226, 250, 255, .45);
  background: linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%, rgba(63, 46, 172, .22));
  clip-path: inherit;
  transform: translateZ(9px);
}

.galaxy-core-sun::after {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(104, 215, 255, .24);
  border-radius: 50%;
  animation: corePulse 3.4s ease-in-out infinite;
}

.galaxy-core-sun b {
  color: #07112b;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: -.02em;
}

.galaxy-core-orbit {
  position: absolute;
  border: 1px solid rgba(134, 218, 255, .24);
  border-radius: 50%;
}

.galaxy-core-orbit--one { inset: 6px; transform: translateZ(28px) rotate(54deg) scaleY(.38); }
.galaxy-core-orbit--two { inset: 2px; transform: translateZ(8px) rotate(-28deg) scaleY(.5); }

.galaxy-core-copy {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  color: #cceeff;
  transform: translate3d(-50%, 0, 36px);
  white-space: nowrap;
}

.galaxy-core-copy strong { font: 600 .48rem var(--font-display); letter-spacing: .15em; text-transform: uppercase; }
.galaxy-core-copy small { margin-top: 1px; color: #64768e; font-size: .48rem; }

.planet-layer { position: absolute; inset: 0; z-index: 5; transform-style: preserve-3d; }

.planet-node {
  --planet-color: #48dfff;
  --planet-depth: var(--planet-base-depth, 0px);
  --planet-scale: 1;
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 94px;
  min-height: 94px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dce9f7;
  font: inherit;
  opacity: 1;
  visibility: visible;
  transform: translate3d(-50%, -50%, var(--planet-depth)) scale(var(--planet-scale));
  transform-style: preserve-3d;
  cursor: pointer;
  transition: opacity .28s ease, filter .28s ease, transform .32s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

.planet-node::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 72px;
  height: 72px;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--planet-color) 30%, transparent),
      rgba(255,255,255,.015) 44%,
      color-mix(in srgb, var(--planet-color) 12%, transparent));
  clip-path: polygon(25% 3%, 75% 3%, 97% 25%, 97% 75%, 75% 97%, 25% 97%, 3% 75%, 3% 25%);
  opacity: .44;
  border: 1px solid color-mix(in srgb, var(--planet-color) 18%, transparent);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--planet-color) 8%, transparent), 0 0 16px rgba(0,0,0,.22);
  transform: translate3d(-50%, 0, -12px) rotate(8deg);
  transform-style: preserve-3d;
  transition: opacity .25s ease, transform .25s ease;
}

.planet-node.is-filtered-out {
  opacity: 0;
  visibility: hidden;
  filter: saturate(.2) blur(.5px);
  pointer-events: none;
  transition: opacity .22s ease, visibility 0s linear .22s, filter .22s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}

.cosmos-scene.has-selection .planet-node:not(.is-selected):not(.is-filtered-out) { opacity: 1; }
.cosmos-scene.has-selection .planet-node:hover,
.cosmos-scene.has-selection .planet-node:focus-visible { opacity: 1; }

.cosmos-scene[data-view="focus"] .system-orbit,
.cosmos-scene[data-view="focus"] .galaxy-core {
  opacity: 0;
  visibility: hidden;
}

.cosmos-scene[data-view="focus"] .galaxy-core {
  transform: translate3d(-50%, -50%, -45px) scale(.52);
  transition: opacity .22s ease, visibility 0s linear .22s, transform .42s cubic-bezier(.2,.8,.2,1);
}

.planet-node.is-graph-hidden {
  opacity: 0 !important;
  visibility: hidden;
  filter: blur(2px) saturate(.25);
  pointer-events: none;
  transition: opacity .2s ease, visibility 0s linear .2s, filter .2s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}

.planet-node.is-focus-root,
.planet-node.is-focus-neighbor {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.planet-node.is-focus-root { z-index: 20; }
.planet-node.is-focus-neighbor { z-index: 16; }
.cosmos-scene.is-layout-animating .planet-node { transition-property: opacity, filter; }

.planet-visual {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--planet-color) 72%, white);
  border-radius: 50%;
  background-color: var(--planet-color);
  background-image:
    radial-gradient(circle at 27% 22%, rgba(255,255,255,.92) 0 3%, rgba(255,255,255,.24) 7%, transparent 22%),
    radial-gradient(circle at 68% 72%, rgba(0,0,0,.32) 0 13%, transparent 14%),
    linear-gradient(145deg, color-mix(in srgb, var(--planet-color) 82%, white), var(--planet-color) 42%, color-mix(in srgb, var(--planet-color) 46%, #030712));
  box-shadow:
    inset -11px -10px 16px rgba(1,5,18,.48),
    inset 7px 6px 10px rgba(255,255,255,.08),
    0 0 18px color-mix(in srgb, var(--planet-color) 48%, transparent),
    0 0 44px color-mix(in srgb, var(--planet-color) 15%, transparent);
  transform: translateZ(20px);
  transform-style: preserve-3d;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), box-shadow .26s ease, filter .26s ease;
  animation: planetFloat 4.8s ease-in-out infinite alternate;
  animation-delay: var(--float-delay, 0s);
}

.planet-shadow {
  position: absolute;
  z-index: -1;
  top: 61px;
  left: 50%;
  width: 49px;
  height: 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--planet-color) 18%, rgba(2, 5, 16, .82));
  box-shadow: 0 0 18px rgba(0,0,0,.62);
  filter: blur(5px);
  opacity: .72;
  transform: translate3d(-50%, 0, -32px) rotateX(68deg);
}

.planet-surface,
.planet-atmosphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.planet-surface {
  z-index: 1;
  inset: 3px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 26% 13% at 63% 31%, rgba(255,255,255,.22), transparent 72%),
    radial-gradient(ellipse 31% 18% at 34% 68%, rgba(2,8,25,.27), transparent 75%),
    repeating-linear-gradient(101deg, transparent 0 7px, rgba(255,255,255,.045) 8px, transparent 10px);
  box-shadow: inset 3px 3px 8px rgba(255,255,255,.08), inset -8px -6px 12px rgba(0,0,0,.22);
  opacity: .78;
  transform: translateZ(5px) rotate(-8deg);
  animation: planetSurface 13s linear infinite;
}

.planet-atmosphere {
  z-index: 3;
  inset: -4px;
  border: 1px solid color-mix(in srgb, var(--planet-color) 52%, white);
  border-right-color: transparent;
  border-bottom-color: color-mix(in srgb, var(--planet-color) 12%, transparent);
  box-shadow: inset 4px 1px 7px rgba(255,255,255,.17), 0 0 12px color-mix(in srgb, var(--planet-color) 34%, transparent);
  opacity: .7;
  transform: translateZ(8px) rotate(21deg);
  animation: atmosphereSpin 8s linear infinite;
}

.planet-visual::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid color-mix(in srgb, var(--planet-color) 30%, transparent);
  border-radius: inherit;
  opacity: .5;
}

.planet-node[data-family="migrator"] .planet-visual::after {
  content: '';
  position: absolute;
  width: 76px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--planet-color) 52%, transparent);
  border-right-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-16deg);
}

.planet-icon {
  position: relative;
  z-index: 2;
  font-size: 1.12rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
  transform: translateZ(13px);
}

.planet-label {
  position: absolute;
  top: 72px;
  left: 50%;
  max-width: 126px;
  overflow: hidden;
  padding: .22rem .48rem;
  border: 1px solid rgba(163, 205, 255, .13);
  border-radius: 999px;
  background: rgba(3, 8, 19, .82);
  color: #b6c4d8;
  font-size: .64rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
  backdrop-filter: blur(7px);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.planet-beacon {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 18px;
  width: 7px;
  height: 7px;
  border: 1px solid #07111c;
  border-radius: 50%;
  background: #5ee7a1;
  box-shadow: 0 0 9px #4de798;
  opacity: 0;
}

.planet-node.is-running .planet-beacon { opacity: 1; animation: beaconPulse 1.8s ease-out infinite; }
.planet-node.is-upcoming .planet-visual { filter: grayscale(.55) saturate(.45); opacity: .72; box-shadow: inset -10px -10px 15px rgba(0,0,0,.55), 0 0 16px rgba(130,148,177,.18); }
.planet-node.is-upcoming .planet-visual::before { border-style: dashed; }

.planet-node:hover .planet-visual,
.planet-node:focus-visible .planet-visual,
.planet-node.is-selected .planet-visual {
  transform: translateZ(34px) scale(1.16);
  box-shadow:
    inset -11px -10px 16px rgba(1,5,18,.4),
    0 0 24px color-mix(in srgb, var(--planet-color) 74%, transparent),
    0 0 64px color-mix(in srgb, var(--planet-color) 27%, transparent);
}

.planet-node:hover::before,
.planet-node:focus-visible::before,
.planet-node.is-selected::before {
  opacity: .9;
  transform: translate3d(-50%, 0, -5px) rotate(23deg) scale(1.08);
}

.planet-node.is-selected { --planet-depth: calc(var(--planet-base-depth, 0px) + 26px); }
.planet-node.is-selected .planet-shadow { opacity: .92; filter: blur(7px); }

.planet-node.is-focus-root .planet-visual {
  transform: translateZ(56px) scale(1.43);
  box-shadow:
    inset -12px -11px 17px rgba(1,5,18,.35),
    inset 8px 6px 12px rgba(255,255,255,.11),
    0 0 32px color-mix(in srgb, var(--planet-color) 82%, transparent),
    0 0 92px color-mix(in srgb, var(--planet-color) 35%, transparent);
}

.planet-node.is-focus-root::before {
  opacity: 1;
  transform: translate3d(-50%, 0, 4px) rotate(29deg) scale(1.28);
}

.planet-node.is-focus-root::after {
  top: 1px;
  width: 84px;
  height: 84px;
  border-color: var(--planet-color);
  box-shadow: 0 0 34px color-mix(in srgb, var(--planet-color) 48%, transparent);
}

.planet-node.is-focus-root .planet-label {
  top: 80px;
  padding: .3rem .62rem;
  border-color: color-mix(in srgb, var(--planet-color) 52%, transparent);
  background: rgba(4, 10, 25, .96);
  color: #fff;
  font-size: .71rem;
  font-weight: 600;
}

.planet-node.is-focus-neighbor .planet-visual {
  transform: translateZ(30px) scale(1.1);
}

.planet-node.is-focus-neighbor .planet-label {
  border-color: color-mix(in srgb, var(--planet-color) 32%, transparent);
  background: rgba(4, 10, 25, .92);
  color: #eef8ff;
}

.planet-node:hover .planet-label,
.planet-node:focus-visible .planet-label,
.planet-node.is-selected .planet-label {
  border-color: color-mix(in srgb, var(--planet-color) 40%, transparent);
  background: rgba(6, 13, 29, .96);
  color: #fff;
}

.planet-node:focus-visible::after,
.planet-node.is-selected::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 72px;
  height: 72px;
  border: 2px solid var(--map-focus);
  border-radius: 24%;
  box-shadow: 0 0 24px rgba(110, 231, 255, .32);
  transform: translateX(-50%);
  clip-path: polygon(25% 3%, 75% 3%, 97% 25%, 97% 75%, 75% 97%, 25% 97%, 3% 75%, 3% 25%);
}

.planet-node.is-selected::after { border-color: var(--planet-color); }

.map-depth-indicator {
  position: absolute;
  z-index: 7;
  top: 16px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 34px;
  padding: .35rem .65rem .35rem .45rem;
  border: 1px solid rgba(126, 210, 255, .15);
  border-radius: 999px;
  background: rgba(5, 11, 27, .62);
  color: #8ea5bd;
  font: 500 .54rem var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(13px);
}

.depth-cube {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
  transform: rotateX(58deg) rotateZ(45deg);
  transform-style: preserve-3d;
  animation: depthCubeFloat 4s ease-in-out infinite alternate;
}

.depth-cube,
.depth-cube::before,
.depth-cube::after,
.depth-cube i {
  border: 1px solid rgba(116, 226, 255, .72);
  background: rgba(68, 165, 255, .08);
  box-shadow: inset 0 0 9px rgba(111, 222, 255, .12), 0 0 8px rgba(104, 214, 255, .14);
}

.depth-cube::before,
.depth-cube::after,
.depth-cube i { content: ''; position: absolute; inset: -1px; }
.depth-cube::before { transform: translateZ(-7px); opacity: .45; }
.depth-cube::after { transform: rotateX(90deg) translateZ(-9px); transform-origin: bottom; opacity: .55; }
.depth-cube i { transform: rotateY(90deg) translateZ(9px); transform-origin: right; opacity: .6; }

.map-controls {
  position: absolute;
  z-index: 7;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(160, 205, 255, .16);
  border-radius: 12px;
  background: rgba(5, 11, 25, .8);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
}

.map-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #afbdd0;
  font: 500 1rem var(--font-display);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.map-controls button:hover { background: rgba(109, 220, 255, .1); color: #effbff; }

.map-controls .map-depth-toggle {
  width: 44px;
  border-right: 1px solid rgba(157, 203, 255, .11);
  border-radius: 8px 5px 5px 8px;
}

.map-depth-toggle span { color: #72e2ff; font: 700 .56rem var(--font-display); letter-spacing: .04em; }
.map-depth-toggle[aria-pressed="false"] span { color: #7b889d; }
.map-depth-toggle[aria-pressed="true"] { background: linear-gradient(135deg, rgba(63, 203, 255, .13), rgba(137, 93, 255, .1)); }

.map-gesture-hint {
  position: absolute;
  z-index: 7;
  bottom: 19px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  color: #7f8da3;
  font-size: .72rem;
}

.map-gesture-hint > span:first-child { color: #7ee7ff; }

.map-empty {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(290px, calc(100% - 2rem));
  padding: 1.4rem;
  place-items: center;
  border: 1px solid rgba(152, 198, 255, .2);
  border-radius: 16px;
  background: rgba(6, 13, 29, .92);
  box-shadow: 0 24px 55px rgba(0,0,0,.38);
  color: #dce8f6;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
}

.map-empty[hidden] { display: none; }

.map-empty > span { color: #74e3ff; font-size: 1.5rem; }
.map-empty strong { margin-top: .45rem; font-family: var(--font-display); font-size: .76rem; }
.map-empty small { margin-top: .4rem; color: #8290a5; font-size: .72rem; line-height: 1.5; }

.map-overview-button {
  position: absolute;
  z-index: 9;
  top: 16px;
  left: 50%;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 0 .9rem;
  border: 1px solid rgba(112, 221, 255, .28);
  border-radius: 999px;
  background: linear-gradient(115deg, rgba(19, 61, 112, .84), rgba(37, 26, 91, .8));
  box-shadow: 0 14px 32px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.07), 0 0 22px rgba(82, 195, 255, .1);
  color: #e8f8ff;
  font: 600 .61rem var(--font-display);
  letter-spacing: .04em;
  transform: translateX(-50%);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.map-overview-button:hover { border-color: rgba(119, 232, 255, .62); box-shadow: 0 16px 36px rgba(0,0,0,.38), 0 0 28px rgba(91, 211, 255, .18); }
.map-overview-button[hidden] { display: none; }
.cosmos-viewport.is-graph-focus .map-gesture-hint { opacity: 0; }

.cosmos-viewport.is-flat {
  --scene-tilt-x: 0deg !important;
  --scene-tilt-y: 0deg !important;
}

.cosmos-viewport.is-flat .scene-depth-grid,
.cosmos-viewport.is-flat .scene-depth-disc,
.cosmos-viewport.is-flat .network-canvas { transform: none; }
.cosmos-viewport.is-flat .scene-depth-grid { opacity: .16; }
.cosmos-viewport.is-flat .system-orbit { --orbit-z: 0px; }
.cosmos-viewport.is-flat .galaxy-core { transform: translate3d(-50%, -50%, 0); }
.cosmos-viewport.is-flat .planet-node { --planet-depth: 0px !important; }
.cosmos-viewport.is-flat .depth-cube { animation: none; transform: rotate(45deg); }

/* Fiche agent */
.agent-dossier {
  position: relative;
  z-index: 4;
  display: flex;
  min-width: 0;
  overflow-y: auto;
  flex-direction: column;
  padding: 1.35rem 1.3rem 1.25rem;
  border-left: 1px solid var(--map-line);
  background:
    radial-gradient(circle at 72% 8%, color-mix(in srgb, var(--planet-color, #48dfff) 13%, transparent), transparent 34%),
    rgba(6, 12, 27, .76);
}

.agent-dossier { scrollbar-width: thin; scrollbar-color: rgba(107, 204, 255, .24) transparent; }

.dossier-topline,
.dossier-identity,
.dossier-status,
.dossier-cta {
  display: flex;
  align-items: center;
}

.dossier-topline { justify-content: space-between; gap: 1rem; }
.dossier-index { color: #64758d; font: 500 .58rem var(--font-display); letter-spacing: .08em; }

.dossier-identity { gap: 1rem; margin: 1.45rem 0 1.2rem; }

.dossier-identity > span:last-child {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: .42rem;
}

.dossier-planet,
.directory-mini-planet {
  --planet-color: #48dfff;
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--planet-color) 70%, white);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.88) 0 5%, transparent 20%),
    linear-gradient(145deg, color-mix(in srgb, var(--planet-color) 76%, white), var(--planet-color) 48%, color-mix(in srgb, var(--planet-color) 43%, #030712));
  box-shadow: inset -8px -7px 12px rgba(0,0,0,.42), 0 0 22px color-mix(in srgb, var(--planet-color) 30%, transparent);
}

.dossier-planet { width: 62px; height: 62px; }
.dossier-planet::after { content: ''; position: absolute; width: 84px; height: 19px; border: 1px solid color-mix(in srgb, var(--planet-color) 40%, transparent); border-radius: 50%; transform: rotate(-14deg); }
.dossier-planet i { position: relative; z-index: 2; font-size: 1.25rem; font-style: normal; }

.dossier-family { overflow: hidden; color: #9daec3; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }

.dossier-status {
  gap: .38rem;
  width: fit-content;
  padding: .2rem .48rem;
  border: 1px solid rgba(82, 226, 154, .2);
  border-radius: 999px;
  background: rgba(82, 226, 154, .055);
  color: #71e8a8;
}

.dossier-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.dossier-status b { font-size: .61rem; font-weight: 500; }
.dossier-status--running { border-color: rgba(99, 220, 255, .28); background: rgba(83, 209, 255, .07); color: #76e4ff; }
.dossier-status--upcoming { border-color: rgba(159, 172, 194, .19); background: rgba(159, 172, 194, .04); color: #9aa7ba; }
.dossier-status--upcoming i { border: 1px solid currentColor; background: transparent; box-shadow: none; }

.dossier-copy h2 {
  overflow-wrap: anywhere;
  color: #f5f8ff;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.dossier-specialty { margin-top: .55rem; color: color-mix(in srgb, var(--planet-color, #48dfff) 75%, white); font-size: .78rem; line-height: 1.45; }
.dossier-description { margin-top: 1rem; color: #8e9db1; font-size: .78rem; line-height: 1.65; }

.dossier-capabilities { margin-top: 1.35rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.07); }
.dossier-capabilities ul { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; list-style: none; }
.dossier-capabilities li { padding: .28rem .48rem; border: 1px solid rgba(151, 194, 248, .13); border-radius: 7px; background: rgba(255,255,255,.025); color: #9baac0; font-size: .62rem; line-height: 1.3; }

.dossier-relations {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255,255,255,.07);
}

.dossier-relation-group { margin-top: .8rem; }
.dossier-relation-group[hidden], .dossier-no-relations[hidden] { display: none; }

.dossier-relation-label {
  display: block;
  margin-bottom: .45rem;
  color: color-mix(in srgb, var(--planet-color, #48dfff) 72%, white);
  font: 600 .55rem var(--font-display);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dossier-relation-list { display: grid; gap: .4rem; }

.dossier-relation-chip {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 38px;
  padding: .32rem .55rem;
  border: 1px solid rgba(151, 203, 255, .13);
  border-radius: 9px;
  background: linear-gradient(105deg, rgba(71, 184, 255, .07), rgba(139, 91, 255, .035));
  color: #b7c8da;
  font: 500 .66rem var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.dossier-relation-chip > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--planet-color, #48dfff) 28%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--planet-color, #48dfff) 8%, transparent);
  font-size: .75rem;
}

.dossier-relation-chip:hover { border-color: color-mix(in srgb, var(--planet-color, #48dfff) 42%, transparent); background: color-mix(in srgb, var(--planet-color, #48dfff) 9%, rgba(10,18,38,.8)); color: #f1f8ff; transform: translateX(2px); }
.dossier-no-relations { margin-top: .75rem; color: #708097; font-size: .68rem; line-height: 1.45; }

.dossier-actions { display: grid; gap: .55rem; margin-top: auto; padding-top: 1.2rem; }

.dossier-focus {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  border: 1px solid rgba(135, 179, 255, .18);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  color: #aabbd0;
  font: 500 .71rem var(--font-body);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.dossier-focus:hover,
.dossier-focus[aria-pressed="true"] { border-color: rgba(106, 221, 255, .44); background: rgba(83, 192, 255, .07); color: #e8f9ff; }

.dossier-cta {
  justify-content: space-between;
  gap: 1rem;
  min-height: 46px;
  margin-top: auto;
  padding: 0 1rem;
  border: 1px solid color-mix(in srgb, var(--planet-color, #48dfff) 40%, transparent);
  border-radius: 11px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--planet-color, #48dfff) 16%, transparent), rgba(255,255,255,.025));
  color: #eefaff;
  font-size: .76rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dossier-actions .dossier-cta { margin-top: 0; }

.dossier-cta:hover { transform: translateY(-2px); border-color: var(--planet-color, #48dfff); box-shadow: 0 12px 28px color-mix(in srgb, var(--planet-color, #48dfff) 13%, transparent); }
.dossier-cta.is-disabled { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.025); color: #78869b; pointer-events: none; }

/* Répertoire */
.orbital-directory { padding-bottom: clamp(4rem, 8vw, 7rem); scroll-margin-top: 90px; }

.directory-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.directory-eyebrow { margin-bottom: .65rem; }
.directory-header h2 { max-width: 700px; color: #f2f6ff; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.16; }
.directory-header > p { color: #8f9db1; font-size: .92rem; line-height: 1.7; }

.directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

.directory-card {
  --planet-color: #48dfff;
  position: relative;
  display: flex;
  min-height: 330px;
  overflow: hidden;
  flex-direction: column;
  padding: 1.2rem;
  border: 1px solid rgba(151, 194, 248, .12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 2%, color-mix(in srgb, var(--planet-color) 12%, transparent), transparent 35%),
    linear-gradient(145deg, rgba(13, 23, 47, .74), rgba(7, 13, 28, .86));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .2s ease;
}

.directory-card::before { content: ''; position: absolute; top: 0; left: 16%; width: 54%; height: 1px; background: linear-gradient(90deg, transparent, var(--planet-color), transparent); opacity: .55; }
.directory-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--planet-color) 35%, transparent); box-shadow: 0 22px 50px rgba(0,0,0,.27); }
.directory-card.is-selected { border-color: color-mix(in srgb, var(--planet-color) 48%, transparent); box-shadow: 0 18px 46px color-mix(in srgb, var(--planet-color) 10%, transparent); }
.directory-card.is-filtered-out { display: none; }

.directory-card[data-color="cyan"] { --planet-color: #00e5ff; }
.directory-card[data-color="violet"] { --planet-color: #a855f7; }
.directory-card[data-color="vert"] { --planet-color: #22c55e; }
.directory-card[data-color="orange"] { --planet-color: #f97316; }
.directory-card[data-color="indigo"] { --planet-color: #818cf8; }
.directory-card[data-color="rose"] { --planet-color: #f43f8b; }
.directory-card[data-color="bleu"] { --planet-color: #3b9cff; }
.directory-card[data-color="jaune"] { --planet-color: #eab308; }
.directory-card[data-color="turquoise"] { --planet-color: #20cdbd; }

.directory-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.directory-mini-planet { width: 43px; height: 43px; }
.directory-mini-planet i { font-size: .95rem; font-style: normal; }

.directory-card-status { display: inline-flex; align-items: center; gap: .38rem; padding: .2rem .48rem; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: #8997aa; font-size: .59rem; }
.directory-card-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.directory-card-status.is-available { border-color: rgba(78, 226, 151, .2); color: #67e8a1; }
.directory-card-status.is-running { border-color: rgba(91, 218, 255, .28); background: rgba(91, 218, 255, .055); color: #79e7ff; }
.directory-card-status.is-upcoming i { border: 1px solid currentColor; background: transparent; }

.directory-card-family { margin-top: 1.15rem; color: var(--planet-color); font: 600 .55rem var(--font-display); letter-spacing: .13em; text-transform: uppercase; }
.directory-card h3 { margin-top: .35rem; color: #f1f5fd; font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.directory-card-specialty { margin-top: .35rem; color: #a8b6c9; font-size: .74rem; line-height: 1.4; }
.directory-card-description { display: -webkit-box; overflow: hidden; margin-top: .8rem; color: #7f8ea4; font-size: .7rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.directory-card-link { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.065); color: #c9d8e9; font-size: .71rem; text-decoration: none; transition: color .2s ease; }
.directory-card-link:hover { color: var(--planet-color); }
.directory-card-link--disabled { color: #68768a; cursor: default; }

/* Palette générée côté JS pour les planètes de la scène. */
.planet-node[data-color="cyan"], .agent-dossier[data-color="cyan"] { --planet-color: #00e5ff; }
.planet-node[data-color="violet"], .agent-dossier[data-color="violet"] { --planet-color: #a855f7; }
.planet-node[data-color="vert"], .agent-dossier[data-color="vert"] { --planet-color: #22c55e; }
.planet-node[data-color="orange"], .agent-dossier[data-color="orange"] { --planet-color: #f97316; }
.planet-node[data-color="indigo"], .agent-dossier[data-color="indigo"] { --planet-color: #818cf8; }
.planet-node[data-color="rose"], .agent-dossier[data-color="rose"] { --planet-color: #f43f8b; }
.planet-node[data-color="bleu"], .agent-dossier[data-color="bleu"] { --planet-color: #3b9cff; }
.planet-node[data-color="jaune"], .agent-dossier[data-color="jaune"] { --planet-color: #eab308; }
.planet-node[data-color="turquoise"], .agent-dossier[data-color="turquoise"] { --planet-color: #20cdbd; }

/* Focus visible explicite pour tous les contrôles de cette page. */
.map-page :where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--map-focus);
  outline-offset: 3px;
}

@keyframes mapSignal { 0% { transform: scale(.7); opacity: .9; } 85%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes nebulaBreathe { from { opacity: .68; transform: translate3d(var(--nebula-x), var(--nebula-y), 0) scale(1.04); } to { opacity: 1; transform: translate3d(var(--nebula-x), var(--nebula-y), 0) scale(1.1); } }
@keyframes corePulse { 0%,100% { transform: scale(.88); opacity: .34; } 50% { transform: scale(1.08); opacity: .78; } }
@keyframes coreLevitate { from { translate: 0 -2px; } to { translate: 0 3px; } }
@keyframes planetFloat { from { translate: 0 -2px; } to { translate: 0 3px; } }
@keyframes planetSurface { from { transform: translateZ(5px) rotate(-8deg); } to { transform: translateZ(5px) rotate(352deg); } }
@keyframes atmosphereSpin { from { transform: translateZ(8px) rotate(21deg); } to { transform: translateZ(8px) rotate(381deg); } }
@keyframes depthCubeFloat { from { transform: rotateX(58deg) rotateZ(45deg) translateZ(-1px); } to { transform: rotateX(64deg) rotateZ(52deg) translateZ(4px); } }
@keyframes beaconPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(77,231,152,.5), 0 0 8px #4de798; } 60% { box-shadow: 0 0 0 6px rgba(77,231,152,0), 0 0 10px #4de798; } }

@media (max-width: 1240px) {
  .cosmos-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .family-panel { grid-column: 1 / -1; padding: .8rem 1rem; border-right: 0; border-bottom: 1px solid var(--map-line); }
  .family-panel-heading, .family-panel-help { display: none; }
  .family-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
  .family-filter { min-height: 48px; }
  .family-filter-copy small { display: none; }
}

@media (max-width: 1020px) {
  .cosmos-hero { grid-template-columns: 1fr; align-items: start; gap: 1.8rem; }
  .cosmos-stats { width: min(100%, 470px); }
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-page nav { padding-inline: 1.2rem; }
  .map-page .nav-links { max-width: 54vw; overflow-x: auto; scrollbar-width: none; }
  .map-page .nav-links::-webkit-scrollbar { display: none; }
}

@media (max-width: 860px) {
  .cosmos-console-bar { align-items: stretch; flex-direction: column; }
  .console-actions { justify-content: stretch; }
  .map-search { width: 100%; }
  .cosmos-workspace { grid-template-columns: 1fr; }
  .agent-dossier { min-height: 480px; border-top: 1px solid var(--map-line); border-left: 0; }
  .dossier-cta { margin-top: 1.5rem; }
  .cosmos-viewport { min-height: clamp(500px, 72svh, 640px); }
  .directory-header { grid-template-columns: 1fr; align-items: start; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cosmos-container { padding-inline: .85rem; }
  .cosmos-hero { padding-top: 2.8rem; }
  .cosmos-hero h1 { font-size: clamp(2.1rem, 11vw, 3.2rem); }
  .cosmos-stats { min-width: 0; padding: .45rem; }
  .cosmos-stat { padding: .55rem .62rem; }
  .cosmos-stat dt { font-size: .48rem; }
  .cosmos-stat dd span { font-size: 1.25rem; }
  .cosmos-stat dd small { display: none; }
  .cosmos-console { border-radius: 20px; }
  .console-directory-link { width: 42px; flex: 0 0 42px; padding: 0; }
  .console-directory-link span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .family-panel { overflow: hidden; padding-inline: .7rem; }
  .family-filters { display: flex; overflow-x: auto; gap: .45rem; padding-bottom: .15rem; scroll-snap-type: x proximity; scrollbar-width: none; }
  .family-filters::-webkit-scrollbar { display: none; }
  .family-filter { grid-template-columns: 30px auto auto; min-width: max-content; padding-right: .7rem; scroll-snap-align: start; }
  .family-filter-copy strong { font-size: .7rem; }
  .cosmos-viewport { min-height: 520px; }
  .cosmos-scene { width: 128%; }
  .cosmos-scene[data-view="focus"] { width: 100%; }
  .planet-node { width: 82px; min-height: 82px; }
  .planet-visual { width: 48px; height: 48px; }
  .planet-label { top: 65px; max-width: 105px; font-size: .57rem; }
  .planet-node[data-family="migrator"] .planet-visual::after { width: 65px; }
  .planet-node:focus-visible::after, .planet-node.is-selected::after { top: 5px; width: 64px; height: 64px; }
  .system-orbit > span { display: none; }
  .map-gesture-hint { right: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .directory-grid { grid-template-columns: 1fr; }
  .directory-card { min-height: 300px; }
  .orbital-directory { padding-bottom: 4rem; }
  .map-overview-button { min-height: 44px; max-width: calc(100% - 7rem); }
  .dossier-relation-chip { min-height: 44px; }
}

@media (hover: none), (pointer: coarse) {
  .planet-node { min-width: 48px; min-height: 48px; }
  .planet-label { opacity: 1; }
  .map-search kbd { display: none; }
}

@media (max-width: 430px) {
  .map-depth-indicator { top: 12px; left: 12px; width: 34px; padding: .35rem; justify-content: center; }
  .map-depth-indicator > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .map-gesture-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map-page { scroll-behavior: auto; }
  .map-page *, .map-page *::before, .map-page *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .cosmos-nebula { transform: none; }
  .star-canvas, .cosmos-depth-field { transform: none; }
  .planet-visual { translate: none; }
}

@media (prefers-contrast: more) {
  .cosmos-console,
  .family-filter,
  .map-search,
  .directory-card { border-color: rgba(210, 230, 255, .42); }
  .map-muted, .planet-label, .dossier-description { color: #c3cee0; }
}

@media (forced-colors: active) {
  .planet-visual,
  .dossier-planet,
  .directory-mini-planet,
  .galaxy-core-sun { forced-color-adjust: none; }
  .system-orbit,
  .planet-node:focus-visible::after,
  .planet-node.is-selected::after { border-color: CanvasText; }
}
