/* Intro plein écran — page d’accueil uniquement (préfixe .intro-splash*) */

html.intro-splash-active,
body.intro-splash-active {
  overflow: hidden;
  touch-action: none;
}

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black, #0a0a0a);
  font-family: "DM Sans", system-ui, sans-serif;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.intro-splash.intro-splash--exit {
  opacity: 0;
  transform: scale(1.035);
  pointer-events: none;
}

.intro-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 1.75rem);
  width: min(88vw, 320px);
  padding: 1.5rem;
}

.intro-splash__logo {
  display: block;
  width: min(56vw, 220px);
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  animation: intro-splash-logo-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes intro-splash-logo-in {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.intro-splash__bar {
  width: 100%;
  max-width: 200px;
  height: 3px;
  border-radius: 999px;
  background: rgba(245, 240, 230, 0.18);
  overflow: hidden;
}

.intro-splash__bar-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--terracotta, #a65947) 0%,
    rgba(245, 240, 230, 0.85) 50%,
    var(--terracotta, #a65947) 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  animation: intro-splash-bar 1.45s cubic-bezier(0.33, 1, 0.68, 1) 0.22s forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .intro-splash,
  .intro-splash.intro-splash--exit {
    transition: none;
  }

  .intro-splash__logo {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .intro-splash__bar-fill {
    animation: none;
    transform: scaleX(1);
  }
}
