/* ========================================
   Premium Animation System
   Prestige VTC - Unified Animations
   ======================================== */

/* ========================================
   Variables d'Animation
   ======================================== */
:root {
  /* Timing Functions Premium */
  --ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
  --ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-premium: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-luxury: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Durées Standard */
  --duration-instant: 0.1s;
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
  --duration-slower: 0.8s;
  --duration-luxury: 1.2s;
  
  /* Délais d'Animation */
  --delay-short: 0.1s;
  --delay-medium: 0.2s;
  --delay-long: 0.3s;
  
  /* Variables de Transform */
  --translate-up: translateY(-20px);
  --translate-down: translateY(20px);
  --translate-left: translateX(-20px);
  --translate-right: translateX(20px);
  --scale-up: scale(1.05);
  --scale-down: scale(0.95);
  --rotate-slight: rotate(2deg);
}

/* ========================================
   Animations d'Entrée Premium
   ======================================== */

/* Fade In avec élégance */
@keyframes fadeInPremium {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Slide In de luxe */
@keyframes slideInLuxury {
  0% {
    opacity: 0;
    transform: translateX(-40px);
    filter: brightness(0.8);
  }
  50% {
    opacity: 0.8;
    transform: translateX(10px);
    filter: brightness(1.1);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: brightness(1);
  }
}

/* Scale In premium avec glow */
@keyframes scaleInGlow {
  0% {
    opacity: 0;
    transform: scale(0.8);
    box-shadow: 0 0 0 rgba(184, 134, 11, 0);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.1);
  }
}

/* Rotate In sophistiqué */
@keyframes rotateInElegant {
  0% {
    opacity: 0;
    transform: rotate(-10deg) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Float avec subtilité */
@keyframes floatPremium {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-5px) rotate(0.5deg);
  }
  75% {
    transform: translateY(-3px) rotate(-0.5deg);
  }
}

/* ========================================
   Animations de Hover Premium
   ======================================== */

/* Lift Effect de luxe */
@keyframes liftLuxury {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  100% {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(184, 134, 11, 0.1);
  }
}

/* Glow Effect premium */
@keyframes glowPremium {
  0%, 100% {
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(184, 134, 11, 0.6), 0 0 60px rgba(184, 134, 11, 0.3);
  }
}

/* Pulse de luxe */
@keyframes pulseLuxury {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

/* Shake subtil */
@keyframes shakeSubtle {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* ========================================
   Animations Spécialisées
   ======================================== */

/* Counter Animation */
@keyframes counterPremium {
  0% {
    transform: scale(0.8) rotate(-2deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(1deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Progress Bar Premium */
@keyframes progressPremium {
  0% {
    width: 0%;
    opacity: 0;
    background: linear-gradient(90deg, var(--primary-gold), var(--primary-gold));
  }
  50% {
    opacity: 1;
    background: linear-gradient(90deg, var(--primary-gold), var(--primary-bronze));
  }
  100% {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-bronze), var(--primary-gold));
  }
}

/* Ripple Effect Premium */
@keyframes ripplePremium {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Text Reveal élégant */
@keyframes textRevealLuxury {
  0% {
    width: 0%;
    opacity: 0;
  }
  50% {
    width: 100%;
    opacity: 0.8;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

/* ========================================
   Classes d'Animation Utilitaires
   ======================================== */

/* Animations d'entrée */
.anim-fade-in-premium {
  animation: fadeInPremium var(--duration-slow) var(--ease-luxury) both;
}

.anim-slide-in-luxury {
  animation: slideInLuxury var(--duration-normal) var(--ease-out-cubic) both;
}

.anim-scale-in-glow {
  animation: scaleInGlow var(--duration-slow) var(--ease-out-quad) both;
}

.anim-rotate-in-elegant {
  animation: rotateInElegant var(--duration-normal) var(--ease-out-cubic) both;
}

/* Animations continues */
.anim-float-premium {
  animation: floatPremium 4s var(--ease-in-out-quad) infinite;
}

.anim-glow-premium {
  animation: glowPremium 3s var(--ease-in-out-quad) infinite;
}

.anim-pulse-luxury {
  animation: pulseLuxury 2s var(--ease-in-out-quad) infinite;
}

/* Délais d'animation échelonnés */
.anim-delay-1 { animation-delay: calc(var(--delay-short) * 1); }
.anim-delay-2 { animation-delay: calc(var(--delay-short) * 2); }
.anim-delay-3 { animation-delay: calc(var(--delay-short) * 3); }
.anim-delay-4 { animation-delay: calc(var(--delay-short) * 4); }
.anim-delay-5 { animation-delay: calc(var(--delay-short) * 5); }
.anim-delay-6 { animation-delay: calc(var(--delay-short) * 6); }

/* ========================================
   States d'Interaction Premium
   ======================================== */

/* Hover States */
.hover-lift {
  transition: all var(--duration-normal) var(--ease-luxury);
}

.hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-glow {
  transition: all var(--duration-normal) var(--ease-premium);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(184, 134, 11, 0.4);
  transform: scale(1.02);
}

.hover-rotate {
  transition: transform var(--duration-normal) var(--ease-luxury);
}

.hover-rotate:hover {
  transform: rotate(2deg) scale(1.05);
}

/* Focus States Premium */
.focus-premium:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.3);
  transform: scale(1.02);
  transition: all var(--duration-fast) var(--ease-luxury);
}

/* Active States */
.active-press:active {
  transform: scale(0.98);
  transition: transform var(--duration-instant) var(--ease-premium);
}

/* ========================================
   Animations de Loading Premium
   ======================================== */

/* Spinner Premium */
@keyframes spinnerPremium {
  0% {
    transform: rotate(0deg);
    border-top-color: var(--primary-gold);
  }
  25% {
    border-right-color: var(--primary-bronze);
  }
  50% {
    transform: rotate(180deg);
    border-bottom-color: var(--primary-cognac);
  }
  75% {
    border-left-color: var(--primary-gold);
  }
  100% {
    transform: rotate(360deg);
    border-top-color: var(--primary-gold);
  }
}

.spinner-premium {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: spinnerPremium 1.5s var(--ease-in-out-quad) infinite;
}

/* Dots Loading Premium */
@keyframes dotsLoadingPremium {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.dots-loading-premium {
  display: flex;
  gap: 8px;
}

.dots-loading-premium .dot {
  width: 8px;
  height: 8px;
  background: var(--primary-gold);
  border-radius: 50%;
  animation: dotsLoadingPremium 1.4s infinite both;
}

.dots-loading-premium .dot:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--primary-bronze);
}

.dots-loading-premium .dot:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--primary-cognac);
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* GPU Acceleration pour éléments animés */
.gpu-accelerated {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Containment pour performance */
.animation-contain {
  contain: layout style paint;
}

/* ========================================
   Responsive Animation Control
   ======================================== */

/* Réduction des animations sur mobile */
@media (max-width: 768px) {
  :root {
    --duration-normal: 0.2s;
    --duration-slow: 0.3s;
    --duration-luxury: 0.5s;
  }
  
  .anim-fade-in-premium,
  .anim-slide-in-luxury,
  .anim-scale-in-glow {
    animation-duration: 0.3s;
  }
  
  /* Désactivation des animations coûteuses */
  .anim-float-premium,
  .anim-glow-premium {
    animation: none;
  }
}

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .anim-float-premium,
  .anim-glow-premium,
  .anim-pulse-luxury {
    animation: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .hover-glow:hover,
  .anim-glow-premium {
    box-shadow: none;
    border: 2px solid var(--primary-gold);
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

/* ========================================
   Debug Mode (pour développement)
   ======================================== */
.debug-animations * {
  animation-duration: 5s !important;
  transition-duration: 2s !important;
}

.debug-animations::before {
  content: "DEBUG: Animations ralenties";
  position: fixed;
  top: 10px;
  right: 10px;
  background: red;
  color: white;
  padding: 5px 10px;
  z-index: 9999;
  font-size: 12px;
}