/* ===========================================
   ANIMATIONS.CSS - Animations Fluides
   Phone & Co Center - Micro-interactions
   =========================================== */

/* Animation utilities */
[data-anim] {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-slow);
}

[data-anim].animate {
  opacity: 1;
  transform: translateY(0);
}

[data-anim="fade-in"] {
  opacity: 0;
  transition: opacity var(--transition-normal);
}

[data-anim="fade-in"].animate {
  opacity: 1;
}

[data-anim="slide-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

[data-anim="slide-up"].animate {
  opacity: 1;
  transform: translateY(0);
}

[data-anim="slide-left"] {
  opacity: 0;
  transform: translateX(30px);
  transition: all var(--transition-slow);
}

[data-anim="slide-left"].animate {
  opacity: 1;
  transform: translateX(0);
}

[data-anim="slide-right"] {
  opacity: 0;
  transform: translateX(-30px);
  transition: all var(--transition-slow);
}

[data-anim="slide-right"].animate {
  opacity: 1;
  transform: translateX(0);
}

[data-anim="zoom-in"] {
  opacity: 0;
  transform: scale(0.9);
  transition: all var(--transition-slow);
}

[data-anim="zoom-in"].animate {
  opacity: 1;
  transform: scale(1);
}

[data-anim="float-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition: all var(--transition-slow);
}

[data-anim="float-up"].animate {
  opacity: 1;
  transform: translateY(0);
}

[data-anim="scale-in"] {
  opacity: 0;
  transform: scale(0.85);
  transition: all var(--transition-normal);
}

[data-anim="scale-in"].animate {
  opacity: 1;
  transform: scale(1);
}

/* Stagger animations */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-slow);
}

[data-stagger] > *.animate {
  opacity: 1;
  transform: translateY(0);
}

[data-stagger] > *:nth-child(1) { transition-delay: 0s; }
[data-stagger] > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger] > *:nth-child(3) { transition-delay: 0.2s; }
[data-stagger] > *:nth-child(4) { transition-delay: 0.3s; }
[data-stagger] > *:nth-child(5) { transition-delay: 0.4s; }
[data-stagger] > *:nth-child(6) { transition-delay: 0.5s; }

/* Hover animations */
.hover-lift {
  transition: all var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(8,23,50,0.15);
}

.hover-scale {
  transition: all var(--transition-fast);
}

.hover-scale:hover {
  transform: scale(1.02);
}

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

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(0,61,153,0.2);
}

/* Button animations */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Loading animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Pulse animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0,61,153,0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0,61,153,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0,61,153,0);
  }
}

/* Float animation */
.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Typing animation */
.typing {
  border-right: 2px solid var(--color-blue-deep);
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--color-blue-deep); }
}

/* Counter animation */
.counter {
  display: inline-block;
}

.counter.animate {
  animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(.22,.61,.36,1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax effect */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@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;
  }

  [data-anim] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Intersection Observer for scroll animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.9, 0.9, 0.9);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

.zoom-in {
  animation: zoomIn 0.6s ease-out;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  [data-anim] {
    transform: translateY(10px);
  }

  .hover-lift:hover {
    transform: none;
  }

  .hover-scale:hover {
    transform: none;
  }
}
