/* ==========================================================================
   Macron ou Explosion ? — Styles complémentaires au CDN Tailwind
   ========================================================================== */

.quiz-image {
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1), filter 250ms ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.quiz-image.no-transition {
  transition: none !important;
}

/* Mode Noir & Blanc */
.stage-frame.is-bw .quiz-image,
.stage-frame.is-bw .quiz-backdrop {
  filter: grayscale(100%) contrast(1.08);
}

/* Viseur optique */
.viewfinder-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(248, 250, 252, 0.65);
  border-radius: 2px;
}

/* Touches clavier discrètes sur les boutons */
.kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  font-size: 0.68rem;
  line-height: 1;
}

/* Retour visuel sur la zone d'affichage */
.stage-frame.is-correct {
  border-color: rgba(16, 185, 129, 0.9);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 20px 50px -12px rgba(0, 0, 0, 0.85);
}

.stage-frame.is-wrong {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 20px 50px -12px rgba(0, 0, 0, 0.85);
  animation: arcade-shake 340ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes arcade-shake {
  10%, 90% {
    transform: translate3d(-2px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(4px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-6px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(6px, 0, 0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 240ms ease-out both;
}

/* Respect des préférences d'accessibilité moteur */
@media (prefers-reduced-motion: reduce) {
  .quiz-image {
    transition-duration: 150ms;
  }
  .stage-frame.is-wrong,
  .animate-fade-in {
    animation: none;
  }
}
