/**
 * Coque téléphone + écran : partagé par /plateforme et le bloc parcours (accueil, landings).
 * Les pages peuvent surcharger la taille via des sélecteurs plus spécifiques (ex. .step-phones-row .mock-phone).
 */

.plat-phone-stage {
  position: relative;
  perspective: 1400px;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0.5rem;
}

.plat-phone-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: min(120%, 340px);
  height: 55%;
  background: radial-gradient(ellipse 75% 90% at 50% 50%, rgba(255, 46, 121, 0.28), transparent 68%);
  pointer-events: none;
  z-index: 0;
  filter: blur(4px);
}

.mock-phone {
  width: 260px;
  max-width: 100%;
  aspect-ratio: 9 / 17.5;
  background: linear-gradient(160deg, #141820 0%, #0a0a0a 100%);
  border-radius: 32px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.45),
    0 32px 64px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.mock-phone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: #0a0a0a;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}

.mock-screen {
  position: absolute;
  inset: 3px;
  border-radius: 29px;
  overflow: hidden;
  background: #111827;
  padding: 28px 10px 10px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body, "Poppins", system-ui, sans-serif);
}

.mock-phone--tilt-left,
.mock-phone--tilt-right {
  position: relative;
  z-index: 1;
  transform-origin: 50% 80%;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 28px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    -12px 20px 48px rgba(255, 46, 121, 0.12);
  animation: plat-phone-float-l 7s ease-in-out infinite;
}

.mock-phone--tilt-right {
  animation-name: plat-phone-float-r;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 28px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    12px 20px 48px rgba(255, 46, 121, 0.12);
}

@keyframes plat-phone-float-l {
  0%,
  100% {
    transform: rotateY(-16deg) rotateX(5deg) rotateZ(-3deg) translateY(0);
  }
  50% {
    transform: rotateY(-12deg) rotateX(6deg) rotateZ(-2deg) translateY(-12px);
  }
}

@keyframes plat-phone-float-r {
  0%,
  100% {
    transform: rotateY(16deg) rotateX(5deg) rotateZ(3deg) translateY(0);
  }
  50% {
    transform: rotateY(12deg) rotateX(6deg) rotateZ(2deg) translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mock-phone--tilt-left,
  .mock-phone--tilt-right {
    animation: none;
  }

  .mock-phone--tilt-left {
    transform: rotateY(-14deg) rotateX(4deg) rotateZ(-2.5deg);
  }

  .mock-phone--tilt-right {
    transform: rotateY(14deg) rotateX(4deg) rotateZ(2.5deg);
  }
}

.mock-phone--hero {
  width: 198px;
  max-width: 92vw;
}

@media (min-width: 960px) {
  .mock-phone--hero {
    width: 232px;
  }
}
