/* ============================================================
   NÉBULA — écran de lancement (splash)
   Reprend l'idée de saryx.xyz : voile noir plein écran, logo qui
   surgit, nom de la marque, puis barre de progression qui se remplit
   avant de laisser place au site.
   ============================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: #08080a;
  opacity: 1;
  transition: opacity .4s var(--ease, cubic-bezier(.4, 0, .2, 1));
  /* Filet de sécurité : même si le JS ne s'exécute pas, le voile se
     retire tout seul pour ne jamais bloquer le contenu. */
  animation: nbl-splash-auto .5s ease 2.6s forwards;
}
.splash.is-leaving { opacity: 0; pointer-events: none; }
/* Déjà vu dans la session (navigation interne) : pas de splash. */
html.nb-splash-seen .splash { display: none; }

.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.splash-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  animation: nbl-splash-pop .5s var(--ease, cubic-bezier(.4, 0, .2, 1)) both;
  filter: drop-shadow(0 14px 44px rgba(139, 92, 246, .38));
}

.splash-name {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  opacity: 0;
  animation: nbl-splash-up .5s var(--ease, cubic-bezier(.4, 0, .2, 1)) .1s both;
}

.splash-bar {
  display: block;
  width: 180px;
  height: 3px;
  margin-top: 2px;
  border-radius: 999px;
  overflow: hidden;
  background: #222226;
}
.splash-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, #8b5cf6);
  animation: nbl-splash-fill 1.1s var(--ease, cubic-bezier(.4, 0, .2, 1)) forwards;
}

@keyframes nbl-splash-pop {
  0% { opacity: 0; transform: scale(.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes nbl-splash-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}
@keyframes nbl-splash-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}
@keyframes nbl-splash-auto {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo,
  .splash-name,
  .splash-bar > span { animation: none !important; }
  .splash-bar > span { width: 100%; }
}
