/* Scène 3D dynamique — immigration (avion + passeport), responsive */
.auth-scene-3d {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 900px;
  background: radial-gradient(ellipse 120% 80% at 50% 100%, #1a4a6e 0%, #071526 45%, #020810 100%);
}

.auth-scene-3d__clouds {
  position: absolute;
  inset: -20% 0 0;
  background:
    radial-gradient(ellipse 40% 25% at 20% 30%, rgb(255 255 255 / 0.06), transparent 70%),
    radial-gradient(ellipse 35% 20% at 70% 22%, rgb(255 255 255 / 0.05), transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 15%, rgb(100 160 200 / 0.08), transparent 70%);
  animation: auth-clouds-drift 28s linear infinite;
}

.auth-scene-3d__globe {
  position: absolute;
  left: 8%;
  bottom: 18%;
  width: clamp(100px, 28vw, 160px);
  height: clamp(100px, 28vw, 160px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #3d7a9e, #0a2038 55%, #051018);
  box-shadow:
    inset -12px -16px 32px rgb(0 0 0 / 45%),
    0 20px 40px rgb(0 0 0 / 35%);
  animation: auth-globe-spin 36s linear infinite;
}

.auth-scene-3d__globe::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgb(120 170 200 / 0.35);
  transform: rotateX(68deg);
}

.auth-scene-3d__runway {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgb(15 35 55 / 0.85));
  transform: rotateX(58deg);
  transform-origin: center bottom;
  border-top: 1px solid rgb(100 140 170 / 0.25);
}

.auth-scene-3d__runway::before {
  content: '';
  position: absolute;
  top: 42%;
  left: 15%;
  right: 15%;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    rgb(201 162 39 / 0.9) 0 24px,
    transparent 24px 48px
  );
  animation: auth-runway-scroll 2.2s linear infinite;
}

.auth-scene-3d__plane {
  position: absolute;
  width: clamp(120px, 32vw, 200px);
  height: auto;
  left: 0;
  bottom: 22%;
  filter: drop-shadow(0 16px 24px rgb(0 0 0 / 0.45));
  animation: auth-plane-takeoff 9s ease-in-out infinite;
  transform-style: preserve-3d;
}

.auth-scene-3d__passport {
  position: absolute;
  right: 10%;
  top: 22%;
  width: clamp(72px, 20vw, 110px);
  transform-style: preserve-3d;
  animation: auth-passport-lift 6s ease-in-out infinite;
}

.auth-scene-3d__passport-cover {
  width: 100%;
  aspect-ratio: 1.42;
  border-radius: 6px;
  background: linear-gradient(145deg, #1d4e74, #0a2840);
  border: 2px solid #7f93a6;
  box-shadow:
    0 12px 28px rgb(0 0 0 / 0.4),
    inset 0 1px 0 rgb(255 255 255 / 0.12);
  display: grid;
  place-items: center;
  transform: rotateY(-18deg) rotateX(8deg);
}

.auth-scene-3d__passport-cover span {
  font-size: clamp(0.55rem, 2.5vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #e8c547;
}

.auth-scene-3d__caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1rem;
  text-align: center;
  font-size: clamp(0.72rem, 2.8vw, 0.85rem);
  color: rgb(200 220 235 / 0.75);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes auth-plane-takeoff {
  0% {
    transform: translate(5%, 12%) rotate(-6deg) scale(0.85);
    opacity: 0.85;
  }
  35% {
    transform: translate(35%, -5%) rotate(2deg) scale(0.95);
    opacity: 1;
  }
  70% {
    transform: translate(75%, -35%) rotate(8deg) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate(110%, -55%) rotate(12deg) scale(1.1);
    opacity: 0.35;
  }
}

@keyframes auth-passport-lift {
  0%,
  100% {
    transform: translateY(0) rotateY(-18deg) rotateX(8deg);
  }
  50% {
    transform: translateY(-18px) rotateY(-8deg) rotateX(14deg);
  }
}

@keyframes auth-globe-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes auth-clouds-drift {
  to {
    transform: translateX(-8%);
  }
}

@keyframes auth-runway-scroll {
  to {
    transform: translateX(-48px);
  }
}

@media (min-width: 900px) {
  .auth-scene-3d__plane {
    animation-duration: 11s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-scene-3d__plane,
  .auth-scene-3d__passport,
  .auth-scene-3d__globe,
  .auth-scene-3d__clouds,
  .auth-scene-3d__runway::before {
    animation: none;
  }

  .auth-scene-3d__plane {
    transform: translate(45%, -15%) rotate(4deg);
  }
}
