/* Jezici Online · ERES PROD — Splash d'ouverture (2,2 s, CSS pur, 60 fps) */

.sans-splash #ouverture {
  display: none !important;
}

#ouverture {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060B1F;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 0px);
  animation: splash-sortie 250ms cubic-bezier(.65, 0, .35, 1) 1950ms forwards;
}

#ouverture.splash-passe {
  animation: splash-skip 150ms cubic-bezier(.4, 0, 1, 1) forwards !important;
}

#ouverture .splash-halo {
  position: absolute;
  width: 520px;
  height: 520px;
  max-width: 140vw;
  max-height: 140vw;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(47, 84, 255, .42) 0%,
    rgba(15, 40, 225, .18) 44%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(.78);
  pointer-events: none;
  will-change: transform, opacity;
  animation:
    splash-halo-in 250ms cubic-bezier(.22, 1, .36, 1) 0ms forwards,
    splash-halo-pulse 320ms cubic-bezier(.65, 0, .35, 1) 1550ms 1;
}

#ouverture .splash-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 340px;
  min-height: 220px;
}

/* Logo mère officiel ERES PROD (en couleurs, halo contrasté sur nuit bleue) */
#ouverture .splash-mere {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px) scale(.84);
  will-change: transform, opacity;
  animation:
    splash-mere-in 620ms cubic-bezier(.22, 1, .36, 1) 140ms forwards,
    splash-mere-retrait 350ms cubic-bezier(.65, 0, .35, 1) 1050ms forwards;
}

#ouverture .splash-mere-glow {
  position: relative;
  width: 196px;
  height: 196px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(250, 130, 40, .20) 0%,
    rgba(127, 160, 255, .18) 46%,
    transparent 70%
  );
}

#ouverture .splash-ring {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(250, 130, 40, .55);
  opacity: 0;
  transform: scale(.86);
  pointer-events: none;
  will-change: transform, opacity;
  animation: splash-ring-wave 680ms cubic-bezier(.22, 1, .36, 1) 240ms forwards;
}

#ouverture .splash-mere img {
  display: block;
  width: 196px;
  height: 196px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(127, 160, 255, .42)) drop-shadow(0 8px 24px rgba(2, 5, 18, .55));
}

/* Marque produit « Jezici Online » + trait orange */
#ouverture .splash-produit {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

#ouverture .splash-wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-family: "Exo 2", Exo, system-ui, -apple-system, sans-serif;
  font-weight: 900;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #EFF5FF;
  white-space: nowrap;
}

#ouverture .splash-wordmark .splash-space {
  width: 0.28em;
  display: inline-block;
}

#ouverture .splash-lettre {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  will-change: transform, opacity;
  animation: splash-leve 260ms cubic-bezier(.22, 1, .36, 1) calc(1150ms + var(--i, 0) * 30ms) forwards;
}

#ouverture .splash-lettre.accent-online {
  color: #EFF5FF;
}

#ouverture .splash-trait {
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: #FA8228;
  box-shadow: 0 0 18px rgba(250, 130, 40, .65);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  animation: splash-tire 300ms cubic-bezier(.22, 1, .36, 1) 1550ms forwards;
}

#ouverture .splash-sub {
  font-family: "Exo 2", Exo, system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #B4C2E6;
  opacity: 0;
  transform: translateY(6px);
  will-change: transform, opacity;
  animation: splash-leve 260ms cubic-bezier(.22, 1, .36, 1) 1620ms forwards;
}

@keyframes splash-halo-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splash-halo-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes splash-mere-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-ring-wave {
  0%   { opacity: 0; transform: scale(.86); }
  35%  { opacity: .65; }
  100% { opacity: 0; transform: scale(1.22); }
}

@keyframes splash-mere-retrait {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: .92;
    transform: translateY(var(--splash-bottom, 250px)) scale(.48);
  }
}

@keyframes splash-leve {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes splash-tire {
  to {
    transform: scaleX(1);
  }
}

@keyframes splash-sortie {
  to {
    opacity: 0;
    transform: scale(1.04);
    visibility: hidden;
  }
}

@keyframes splash-skip {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Mouvement réduit : image fixe 0,7 s (fondu 200 ms + tenue 300 ms + fondu 200 ms) */
@media (prefers-reduced-motion: reduce) {
  #ouverture {
    opacity: 0;
    animation: splash-rm 700ms ease-in-out 0ms forwards !important;
  }
  #ouverture .splash-halo {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  #ouverture .splash-ring {
    display: none;
  }
  #ouverture .splash-mere {
    opacity: .86;
    transform: translateY(var(--splash-bottom, 250px)) scale(.44);
    animation: none !important;
  }
  #ouverture .splash-lettre,
  #ouverture .splash-sub {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  #ouverture .splash-trait {
    transform: scaleX(1);
    animation: none !important;
  }
}

@keyframes splash-rm {
  0%   { opacity: 0; }
  29%  { opacity: 1; }
  71%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* États figés de démonstration / contrôle visuel (?splash_frame=1 ou 2) */
#ouverture.splash-freeze-1,
#ouverture.splash-freeze-2 {
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
#ouverture.splash-freeze-1 .splash-halo,
#ouverture.splash-freeze-2 .splash-halo {
  animation: none !important;
  opacity: 1;
  transform: scale(1);
}
#ouverture.splash-freeze-1 .splash-mere {
  animation: none !important;
  opacity: 1;
  transform: translateY(0) scale(1);
}
#ouverture.splash-freeze-1 .splash-ring {
  animation: none !important;
  opacity: .55;
  transform: scale(1.06);
}
#ouverture.splash-freeze-1 .splash-lettre,
#ouverture.splash-freeze-1 .splash-sub {
  animation: none !important;
  opacity: 0;
}
#ouverture.splash-freeze-1 .splash-trait {
  animation: none !important;
  transform: scaleX(0);
}

#ouverture.splash-freeze-2 .splash-mere {
  animation: none !important;
  opacity: .92;
  transform: translateY(var(--splash-bottom, 250px)) scale(.48);
}
#ouverture.splash-freeze-2 .splash-ring {
  animation: none !important;
  opacity: 0;
}
#ouverture.splash-freeze-2 .splash-lettre,
#ouverture.splash-freeze-2 .splash-sub {
  animation: none !important;
  opacity: 1;
  transform: none;
}
#ouverture.splash-freeze-2 .splash-trait {
  animation: none !important;
  transform: scaleX(1);
}
