/**
 * Bledna Splash Screen — Monolithe Sombre
 * Dark mode loading screen matching the official brand.
 * Logo: "bledna" (white #FFFFFF) + "Pay" (electric green #10b981) + red dot.
 * Background: #0f172a (dark navy). Spinner: electric green.
 * Fade-out: 200ms ease-out.
 */

#bledna-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0f172a; /* Monolithe sombre — dark navy */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;

  /* Fade-in on show */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

#bledna-splash.visible {
  opacity: 1;
  visibility: visible;
}

/* Fade-out on exit — 200ms as specified */
#bledna-splash.fade-out {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

#bledna-splash.removed {
  display: none;
}

/* ——— Logo ——— */
.splash-logo {
  display: flex;
  align-items: center;
  gap: 0;

  /* Fade-in animation for the logo itself */
  opacity: 0;
  transform: translateY(8px);
  animation: splashLogoIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes splashLogoIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-logo-text {
  font-family: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #FFFFFF; /* Blanc pur */
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
}

.splash-logo-pay {
  color: #10b981; /* Vert Électrique Néon — couleur officielle "Pay" */
  font-weight: 700;
  font-size: 2.8rem;
  letter-spacing: -0.02em;
}

.splash-logo-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #D21034; /* Rouge Bledna */
  border-radius: 50%;
  margin-left: 3px;
  align-self: flex-start;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ——— Spinner — Vert Électrique ——— */
.splash-spinner {
  margin-top: 36px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash-spinner.visible {
  opacity: 1;
  visibility: visible;
}

.splash-spinner-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.splash-spinner-dot span {
  display: block;
  width: 7px;
  height: 7px;
  background: #10b981; /* Vert Électrique — même vert que "Pay" */
  border-radius: 50%;
  animation: splashPulse 1.1s ease-in-out infinite;
}

.splash-spinner-dot span:nth-child(1) { animation-delay: 0s; }
.splash-spinner-dot span:nth-child(2) { animation-delay: 0.18s; }
.splash-spinner-dot span:nth-child(3) { animation-delay: 0.36s; }

@keyframes splashPulse {
  0%, 80%, 100% {
    transform: scale(0.55);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ——— Branding tagline ——— */
.splash-branding {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35); /* Texte discret sur fond sombre */
  letter-spacing: 0.04em;
  user-select: none;
}

/* ——— Responsive ——— */
@media (max-width: 480px) {
  .splash-logo-text {
    font-size: 2.2rem;
  }
  .splash-logo-pay {
    font-size: 2.2rem;
  }
  .splash-logo-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    margin-left: 2px;
  }
  .splash-branding {
    font-size: 0.72rem;
    bottom: 20px;
  }
}
