:root {
  --bg: #010604;
  --bg-2: #062019;
  --text: #f3f7f5;
  --muted: rgba(218, 230, 226, .66);
  --emerald: #3ce6bb;
  --glass: rgba(22, 58, 49, .34);
  --glass-edge: rgba(221, 243, 237, .22);
  --glass-edge-hover: rgba(236, 250, 246, .43);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(26, 132, 100, .23), transparent 27%),
    radial-gradient(circle at 88% 15%, rgba(55, 171, 137, .11), transparent 24%),
    linear-gradient(145deg, var(--bg-2), var(--bg) 52%, #000302);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 28%, rgba(255,255,255,.018) 48%, transparent 66%);
  z-index: -1;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: .025;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}
.ambient-a {
  width: 360px;
  height: 360px;
  top: 12%;
  left: -150px;
  background: rgba(20, 153, 116, .11);
}
.ambient-b {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -80px;
  background: rgba(79, 182, 153, .07);
}

.hub-shell {
  width: min(1230px, calc(100% - 28px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 20px 0 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hub-brand {
  min-height: 165px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  flex: 0 0 auto;
}

.hub-brand img {
  width: 205px;
  height: 130px;
  object-fit: contain;
  filter: drop-shadow(0 15px 34px rgba(0,0,0,.38));
}

.hub-brand p {
  margin: -4px 0 0;
  color: rgba(225, 235, 232, .70);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .015em;
}

.app-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 174px);
  justify-content: center;
  align-items: start;
  gap: 26px;
  padding-top: 12px;
}

.app-tile {
  width: 174px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.logo-stage {
  width: 166px;
  height: 166px;
  padding: 14px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  border: 1px solid var(--glass-edge);
  background:
    linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.028) 38%, transparent 60%),
    radial-gradient(circle at 50% 16%, rgba(77, 226, 185, .14), transparent 55%),
    rgba(22, 58, 49, .32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.17),
    inset 0 -1px 0 rgba(255,255,255,.025),
    0 18px 42px rgba(0,0,0,.30),
    0 0 0 1px rgba(53, 210, 169, .025);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease;
}

.logo-stage::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 34px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.075), transparent 38%, rgba(46,226,177,.025));
}

.logo-stage::after {
  content: "";
  position: absolute;
  width: 72%;
  height: 28%;
  left: 14%;
  top: -10%;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  filter: blur(15px);
  pointer-events: none;
  opacity: .66;
}

.logo-stage img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 9px 16px rgba(0,0,0,.24));
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}

.logo-stage.stage-cover {
  padding: 0;
}
.logo-stage.stage-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-stage.stage-light {
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.028) 42%, transparent 60%),
    rgba(20, 50, 43, .34);
}
.logo-stage.stage-light img {
  width: 95%;
  height: 95%;
}

/* Passeur uses the same glass tile as the rest of the Nwayo launcher.
   Its transparent horizontal wordmark is given a little more width without
   changing the common card background. */
.logo-passeur img {
  width: 98%;
  height: 98%;
  object-fit: contain;
  filter: drop-shadow(0 9px 16px rgba(0,0,0,.18));
}

.logo-stage.compact-logo img {
  width: 76%;
  height: 76%;
}

.app-copy {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.app-name {
  max-width: 100%;
  color: rgba(247,250,249,.96);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.app-description {
  min-height: 34px;
  max-width: 165px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

@media (hover: hover) and (pointer: fine) {
  .app-tile:hover .logo-stage {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--glass-edge-hover);
    background:
      linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.04) 38%, transparent 60%),
      radial-gradient(circle at 50% 12%, rgba(76, 238, 193, .19), transparent 55%),
      rgba(24, 67, 55, .38);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.21),
      0 22px 48px rgba(0,0,0,.36),
      0 0 28px rgba(57, 224, 181, .075);
  }
  .app-tile:hover .logo-stage img {
    transform: scale(1.035);
  }
  .app-tile:hover .app-name { color: #fff; }
  .app-tile:hover .app-description { color: rgba(232,240,237,.82); }
}

@media (max-width: 1170px) {
  .app-grid {
    grid-template-columns: repeat(3, 174px);
    gap: 30px 48px;
  }

}

@media (max-width: 650px) {
  .hub-shell {
    width: min(100% - 18px, 1230px);
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .hub-brand {
    min-height: 142px;
  }
  .hub-brand img {
    width: 175px;
    height: 112px;
  }
  .hub-brand p {
    font-size: 12.5px;
  }

  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 8px;
    padding-top: 8px;
  }

  .app-tile {
    width: 100%;
    min-width: 0;
    gap: 9px;
  }

  .logo-stage {
    width: min(116px, 100%);
    height: auto;
    aspect-ratio: 1;
    padding: 8px;
    border-radius: 27px;
  }
  .logo-stage::before { border-radius: 25px; }

  .app-name { font-size: 12.5px; }
  .app-description {
    min-height: 30px;
    max-width: 112px;
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .app-grid { gap: 22px 5px; }
  .logo-stage { width: min(104px, 100%); border-radius: 24px; }
  .app-description { font-size: 10px; max-width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* Logos transparents mis à jour */
.logo-stage.logo-evalue img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.logo-stage.logo-triyel img {
  width: 96%;
  height: 96%;
  object-fit: contain;
}
