:root {
  --bg: #070b14;
  --ink: #eef3ff;
  --muted: #9aa8c3;
  --line: rgba(120, 170, 255, 0.28);
  --glass: rgba(14, 22, 40, 0.72);
  --hub: #6ec8ff;
  --radius: min(32vmin, 280px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
}

body {
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 160, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 160, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}

.bg-glow {
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.bg-glow-a {
  top: -12vmax;
  left: -8vmax;
  background: #163a7a;
}

.bg-glow-b {
  right: -10vmax;
  bottom: -16vmax;
  background: #0f3d48;
}

.top,
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  padding: 0.35rem 1rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.top-mark {
  width: 0.78rem;
  height: 0.78rem;
  padding: 0;
  border: 0;
  cursor: pointer;
  clip-path: polygon(50% 6%, 96% 88%, 4% 88%);
  background: linear-gradient(180deg, #9fe7ff, #3b8dff);
  transition: transform 0.25s ease, filter 0.2s ease, opacity 0.2s ease;
}

.top-mark:hover,
.top-mark:focus-visible {
  filter: brightness(1.2);
  outline: none;
}

.top-mark[aria-pressed="true"] {
  transform: rotate(180deg);
}

body:not(.prices-on) .price-bar {
  display: none;
}

body:not(.prices-on) .brick {
  padding-top: 0.45rem;
}

body:not(.prices-on) .brick--static {
  padding-top: 0.4rem;
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.25rem 0.75rem 0.35rem;
  overflow: visible;
}

.stage--wide {
  display: grid;
  grid-template-columns: minmax(200px, 26vw) minmax(0, 1fr) minmax(200px, 26vw);
  align-items: stretch;
  gap: 0.5rem 0.75rem;
  width: min(100%, 1680px);
  margin: 0 auto;
  height: 100%;
  max-height: 100%;
  place-items: stretch center;
}

.stage--full {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  padding: 0.15rem 0.4rem 0.25rem;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
  height: 100%;
  min-height: 0;
  overflow: visible;
  padding: 0.35rem 0.45rem;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.rail-title {
  margin: 0;
  flex: 0 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: clamp(0.58rem, 1.1vh, 0.72rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.constellation {
  position: relative;
  width: min(48vw, 68vh, 720px);
  height: min(48vw, 68vh, 720px);
  min-height: 0;
  max-height: 100%;
  justify-self: center;
  align-self: center;
}

.constellation--full {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
}

.web {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.web line {
  stroke: var(--line);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.web line.is-hot {
  stroke: var(--hot, #6ec8ff);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 8px var(--hot, #6ec8ff));
}

.web line.is-outer {
  stroke-opacity: 0.55;
}

.hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(38%, 220px);
  height: min(38%, 220px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  z-index: 2;
}

.hub-orbit,
.hub-orbit-slow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(150, 190, 255, 0.28);
  animation: spin 28s linear infinite;
}

.hub-orbit-slow {
  inset: 12%;
  border-style: solid;
  border-color: rgba(110, 200, 255, 0.16);
  animation-duration: 48s;
  animation-direction: reverse;
}

.hub-kicker {
  margin: 0 0 0.2rem;
  font-size: clamp(0.55rem, 1.2vh, 0.68rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hub);
}

.hub h1 {
  margin: 0;
  font-family: Syne, Outfit, sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.8vh, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 20%, #8fd4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hub-lead {
  margin: 0.35rem 0 0;
  max-width: 12rem;
  color: var(--muted);
  font-size: clamp(0.7rem, 1.4vh, 0.82rem);
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hub-core {
  position: relative;
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 0.7rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(90, 180, 255, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(18, 32, 58, 0.95), rgba(8, 14, 28, 0.96));
  border: 1px solid rgba(150, 210, 255, 0.35);
  box-shadow:
    0 0 0 8px rgba(40, 90, 160, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.hub-body {
  display: grid;
  place-items: center;
  text-align: center;
}

/* Totaux : visibles surtout hors orbite (bloc rectangulaire) */
.hub-price-bar {
  display: none;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 0;
}

.constellation--full .brick {
  width: clamp(96px, 11.5vh, 132px);
  min-height: clamp(96px, 11.5vh, 132px);
}

.constellation--full .brick[data-ring="2"] {
  width: clamp(88px, 10.5vh, 120px);
  min-height: clamp(88px, 10.5vh, 120px);
}

.constellation--full .hub {
  width: min(28%, 200px);
  height: min(28%, 200px);
}

.constellation--full .brick-mark {
  width: min(78%, 92px);
  max-height: 58px;
  height: auto;
  object-fit: contain;
}

.constellation--full .brick-desc {
  display: none;
}

.brick {
  --accent: #6ec8ff;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: clamp(128px, 18vh, 168px);
  min-height: clamp(128px, 18vh, 168px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  padding: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 1.1rem;
  background: var(--glass);
  border: 1px solid rgba(160, 190, 255, 0.22);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)));
  transition: transform 0.28s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.brick:hover,
.brick:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, white);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(1.06);
  outline: none;
}

body[data-layout="orbit"] .brick {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  width: clamp(110px, 13.5vh, 148px);
  min-height: clamp(110px, 13.5vh, 148px);
}

body[data-layout="orbit"] .brick img {
  -webkit-user-drag: none;
  pointer-events: none;
}

body[data-layout="orbit"] .brick.is-orbit-dragging {
  cursor: grabbing;
  transition: none !important;
  z-index: 30;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(1.08);
  will-change: transform;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

.brick-glow {
  position: absolute;
  inset: auto 18% -18px;
  height: 28px;
  background: var(--accent);
  filter: blur(18px);
  opacity: 0.35;
}

.brick-logo,
.brick img:not(.brick-word):not(.brick-brand):not(.brick-mark) {
  width: clamp(42px, 6.5vh, 64px);
  height: clamp(42px, 6.5vh, 64px);
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.brick-img-wide {
  width: clamp(64px, 10vh, 96px) !important;
  height: clamp(34px, 5vh, 50px) !important;
}

.brick-word {
  display: block;
  width: clamp(72px, 11vh, 110px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.brick-word--pad {
  width: clamp(78px, 12vh, 116px);
  padding: 0.25rem 0.35rem;
  background: #f4f7fb;
  border-radius: 0.45rem;
  filter: none;
}

.brick-word--wide {
  width: clamp(84px, 13vh, 124px);
}

.brick-brand {
  width: clamp(78px, 12vh, 118px);
  height: auto;
  padding: 0;
  background: transparent !important;
  border-radius: 0;
  object-fit: contain;
  filter: none;
}

.brick[data-module="kommandia"] > .brick-brand {
  width: clamp(108px, 16vh, 156px);
}

.brick-brand--light {
  width: 132px;
  padding: 0.45rem 0.55rem;
  background: #f4f7fb;
  border-radius: 0.85rem;
}

.brick-copy {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
}

.brick-name {
  font-family: Syne, Outfit, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brick-tag {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.brick-desc {
  margin-top: 0.12rem;
  color: #b7c4dc;
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
  max-width: 12rem;
}

.brick--static {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  min-height: 0;
  flex: 1 1 0;
  transform: none;
  cursor: default;
  gap: 0.2rem;
  padding: 0;
  border-radius: 0.95rem;
  overflow: hidden;
}

a.brick--static {
  cursor: pointer;
}

.brick--static:hover,
.brick--static:focus-visible {
  z-index: 5;
  transform: scale(1.02);
}

.brick--static .brick-tag {
  font-size: clamp(0.68rem, 1.5vh, 1rem);
  letter-spacing: 0.02em;
  font-weight: 600;
  color: #d5e2f7;
}

.brick--static .brick-desc {
  margin-top: 0;
  font-size: clamp(0.58rem, 1.2vh, 0.85rem);
  line-height: 1.2;
  max-width: 100%;
  padding: 0 0.4rem 0.35rem;
}

.brick--static .brick-copy {
  flex: 0 0 auto;
  padding: 0 0.35rem;
}

.brick-mark {
  flex: 1 1 auto;
  width: auto;
  max-width: 88%;
  height: auto;
  min-height: 0;
  max-height: clamp(56px, 11vh, 128px);
  margin: 0.25rem 0 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.price-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  flex: 0 0 auto;
  z-index: 4;
  font-family: Montserrat, Outfit, system-ui, sans-serif;
}

.price-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.55rem 0.6rem 0.6rem;
  line-height: 1.1;
}

.price-cell--dev {
  color: #ffffff;
  background: linear-gradient(100deg, #0b5fff 0%, #1a6dff 55%, #3b82f6 100%);
}

.price-cell--abo {
  color: #1f2937;
  background: linear-gradient(100deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
}

.price-ico {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  opacity: 0.95;
}

.price-cell--abo .price-ico {
  color: #111827;
}

.price-txt {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
}

.price-k {
  font-family: Montserrat, Outfit, system-ui, sans-serif;
  font-size: clamp(0.55rem, 1.15vh, 0.68rem);
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-k .short {
  display: none;
}

.price-v {
  font-family: Montserrat, Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(0.92rem, 2vh, 1.2rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.price-cell--dev .price-v {
  color: #ffffff;
}

.price-cell--abo .price-v {
  color: #111827;
}

.price-v small {
  font-family: Montserrat, Outfit, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.72em;
  letter-spacing: 0;
  opacity: 1;
}

.brick:not(.brick--static) .price-cell {
  gap: 0.22rem;
  padding: 0.36rem 0.32rem 0.4rem;
}

.brick:not(.brick--static) .price-ico {
  width: 0.78rem;
  height: 0.78rem;
}

.brick:not(.brick--static) .price-k .full {
  display: none;
}

.brick:not(.brick--static) .price-k .short {
  display: inline;
}

.brick:not(.brick--static) .price-k {
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brick:not(.brick--static) .price-v {
  font-size: clamp(0.66rem, 1.35vh, 0.8rem);
  font-weight: 800;
}

.brick:not(.brick--static) .price-v small {
  display: none;
}

.brick:not(.brick--static) .brick-logo,
.brick:not(.brick--static) .brick-img-wide,
.brick:not(.brick--static) .brick-brand,
.brick:not(.brick--static) .brick-mark,
.brick:not(.brick--static) .brick-copy {
  margin-top: 0.15rem;
}

.brick:not(.brick--static) {
  justify-content: flex-start;
  padding-bottom: 0.4rem;
}

.brick:not(.brick--static) .brick-copy {
  padding: 0 0.25rem;
}

.brick:not(.brick--static) > .brick-logo,
.brick:not(.brick--static) > .brick-img-wide,
.brick:not(.brick--static) > .brick-brand,
.brick:not(.brick--static) > .brick-mark,
.brick:not(.brick--static) > .brick-copy {
  margin-top: auto;
}

.brick:not(.brick--static) > .brick-copy {
  margin-bottom: auto;
}

.brick:not(.brick--static) > .brick-logo + .brick-copy,
.brick:not(.brick--static) > .brick-img-wide + .brick-copy,
.brick:not(.brick--static) > .brick-brand + .brick-copy,
.brick:not(.brick--static) > .brick-mark + .brick-copy {
  margin-top: 0.2rem;
  margin-bottom: auto;
}

.foot p {
  margin: 0;
}

.foot a.visit-o {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.foot a.visit-o:hover,
.foot a.visit-o:focus-visible {
  color: #6ec8ff;
  outline: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
    height: auto;
    display: block;
  }

  .stage {
    min-height: auto;
    height: auto;
  }

  .stage--wide {
    grid-template-columns: 1fr;
    width: min(100%, 720px);
    height: auto;
    max-height: none;
  }

  .rail {
    height: auto;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
  }

  .rail-title {
    grid-column: 1 / -1;
  }

  .constellation {
    order: -1;
    width: min(92vw, 520px);
    height: min(92vw, 520px);
  }

  .brick--static {
    flex: none;
  }

  .brick-mark {
    max-height: 180px;
    width: min(100%, 260px);
  }

  .brick--static .brick-tag {
    font-size: 1.1rem;
  }

  .brick--static .brick-desc {
    font-size: 0.9rem;
  }
}

@media (max-width: 760px) {
  .constellation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: auto;
    min-height: 0;
    padding-bottom: 1rem;
  }

  .web {
    display: none;
  }

  .hub,
  .brick:not(.brick--static) {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
  }

  .hub {
    width: 240px;
    height: 240px;
    margin-bottom: 0.6rem;
  }

  .brick:not(.brick--static) {
    width: min(100%, 340px);
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.85rem 1rem;
    gap: 0.9rem;
  }

  .brick:not(.brick--static):hover,
  .brick:not(.brick--static):focus-visible {
    transform: scale(1.02);
  }

  .brick-copy {
    justify-items: start;
  }

  .brick--static .brick-copy {
    justify-items: center;
  }

  .brick-desc {
    text-align: left;
  }

  .brick--static .brick-desc {
    text-align: center;
  }
}
