/* ═══════════════════════════════════════════════
   MARIMAKAN — Splash Screen
   Couleurs : primary blue (#1d4ed8 / #1e3a8a)
   ═══════════════════════════════════════════════ */

/* ── Animations ─────────────────────────────── */
@keyframes mm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mm-float-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes mm-icon-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.04);
  }
}
@keyframes mm-glow-pulse {
  0%,
  100% {
    box-shadow:
      0 0 24px rgba(29, 78, 216, 0.5),
      0 0 0 0 rgba(29, 78, 216, 0.2);
  }
  50% {
    box-shadow:
      0 0 44px rgba(37, 99, 235, 0.75),
      0 0 0 14px rgba(29, 78, 216, 0);
  }
}
@keyframes mm-bar-fill {
  0% {
    width: 0%;
  }
  15% {
    width: 28%;
  }
  40% {
    width: 55%;
  }
  70% {
    width: 74%;
  }
  90% {
    width: 88%;
  }
  100% {
    width: 93%;
  }
}
@keyframes mm-shimmer {
  0% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(200%);
  }
}
@keyframes mm-dot-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  35% {
    transform: translateY(-7px);
    opacity: 1;
  }
}
@keyframes mm-blob-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -15px) scale(1.05);
  }
  66% {
    transform: translate(-15px, 10px) scale(0.96);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}
@keyframes mm-star-twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* ── Full-screen overlay ─────────────────────── */
.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0f1117 0%, #111827 50%, #1a2033 100%);
  z-index: 9999;
  overflow: hidden;
  animation: mm-fade-in 0.35s ease;
  font-family:
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
}

/* ── Background blobs (primary + opacité) ────── */
.mm-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: mm-blob-drift linear infinite;
}
.mm-blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.55) 0%, transparent 70%);
  top: -160px;
  left: -120px;
  animation-duration: 18s;
}
.mm-blob-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, transparent 70%);
  bottom: -120px;
  right: -80px;
  animation-duration: 22s;
  animation-direction: reverse;
}
.mm-blob-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
  top: 45%;
  left: 65%;
  animation-duration: 15s;
}

/* ── Étoiles scintillantes ───────────────────── */
.mm-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(147, 197, 253, 0.8); /* blue-300 */
  animation: mm-star-twinkle ease-in-out infinite;
  pointer-events: none;
}
.mm-star:nth-child(1) {
  top: 12%;
  left: 18%;
  animation-duration: 2.1s;
  animation-delay: 0s;
}
.mm-star:nth-child(2) {
  top: 22%;
  left: 78%;
  animation-duration: 3s;
  animation-delay: 0.7s;
}
.mm-star:nth-child(3) {
  top: 68%;
  left: 12%;
  animation-duration: 2.5s;
  animation-delay: 1.1s;
}
.mm-star:nth-child(4) {
  top: 78%;
  left: 82%;
  animation-duration: 1.8s;
  animation-delay: 0.4s;
}
.mm-star:nth-child(5) {
  top: 40%;
  left: 90%;
  animation-duration: 2.8s;
  animation-delay: 1.5s;
  width: 4px;
  height: 4px;
}
.mm-star:nth-child(6) {
  top: 88%;
  left: 44%;
  animation-duration: 2.2s;
  animation-delay: 0.9s;
  width: 3px;
  height: 3px;
}

/* ── Carte glassmorphism ─────────────────────── */
.mm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 52px 60px 44px;
  min-width: 320px;
  max-width: 400px;
  box-shadow:
    0 32px 72px rgba(15, 23, 60, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* ── Anneau icône ────────────────────────────── */
.mm-icon-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  margin-bottom: 26px;
  animation:
    mm-icon-float 3s ease-in-out infinite,
    mm-glow-pulse 3s ease-in-out infinite;
}
.mm-icon-ring svg {
  width: 46px;
  height: 46px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 10px rgba(147, 197, 253, 0.6));
}

/* ── Titre & sous-titre ──────────────────────── */
.mm-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
.mm-subtitle {
  margin: 0 0 38px;
  color: rgba(147, 197, 253, 0.85); /* blue-300 avec opacité */
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* ── Barre de progression ────────────────────── */
.mm-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 30px;
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}
.mm-bar-fill {
  height: 100%;
  border-radius: 4px;
  /* Couleur principale claire → blanche → principale claire */
  background: linear-gradient(90deg, #93c5fd, #dbeafe 50%, #93c5fd);
  animation: mm-bar-fill 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: relative;
  overflow: hidden;
}
.mm-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: mm-shimmer 1.6s linear infinite;
}

/* ── Dots rebondissants ──────────────────────── */
.mm-dots {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 16px;
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.46s both;
}
.mm-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  /* Couleur principale avec opacité */
  background: rgba(147, 197, 253, 0.8);
  animation: mm-dot-bounce 1.5s ease-in-out infinite;
}
.mm-dots span:nth-child(1) {
  animation-delay: 0s;
}
.mm-dots span:nth-child(2) {
  animation-delay: 0.22s;
}
.mm-dots span:nth-child(3) {
  animation-delay: 0.44s;
}

/* ── Texte de statut ─────────────────────────── */
.mm-status {
  margin: 0;
  color: rgba(147, 197, 253, 0.65); /* blue-300 à 65% */
  font-size: 11.5px;
  letter-spacing: 0.4px;
  animation: mm-float-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.54s both;
}

/* ── Tagline bas de page ─────────────────────── */
.mm-tagline {
  position: absolute;
  bottom: 28px;
  margin: 0;
  color: rgba(147, 197, 253, 0.35);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: mm-fade-in 1s ease 1s both;
}

/* ── Accessibilité : mouvement réduit ────────── */
@media (prefers-reduced-motion: reduce) {
  .app-loading,
  .mm-card,
  .mm-icon-ring,
  .mm-blob,
  .mm-star,
  .mm-title,
  .mm-subtitle,
  .mm-bar-track,
  .mm-bar-fill::after,
  .mm-dots span,
  .mm-status,
  .mm-tagline {
    animation: none !important;
  }
  .mm-bar-fill {
    width: 80%;
  }
  .mm-card {
    opacity: 1;
    transform: none;
  }
}
