/* ============================================================
   KAYTEK INTER — Animations
   ============================================================ */

/* ===== KEYFRAMES ===== */

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

@keyframes float-badge-1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-9px) rotate(-2deg); }
}
@keyframes float-badge-2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%       { transform: translateY(-6px) rotate(2deg); }
}
@keyframes float-badge-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-11px) rotate(0deg); }
}

@keyframes orb-pulse {
  0%, 100% { opacity: 0.16; transform: scale(1); }
  50%       { opacity: 0.26; transform: scale(1.1); }
}

@keyframes glow-btn-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(45,126,247,0.3); }
  50%       { box-shadow: 0 0 44px rgba(45,126,247,0.65), 0 0 20px rgba(0,212,232,0.35); }
}

/* ===== MESSAGERIE ANIMATION ===== */

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

@keyframes msg-status-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

.msg-bubble {
  animation: msg-appear 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.msg-bubble:nth-child(1)  { animation-delay: 0.2s; }
.msg-bubble:nth-child(2)  { animation-delay: 1.1s; }
.msg-bubble:nth-child(3)  { animation-delay: 2.0s; }
.msg-bubble:nth-child(4)  { animation-delay: 2.9s; }
.msg-bubble:nth-child(5)  { animation-delay: 3.6s; }

.typing-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.msg-status {
  animation: msg-status-in 0.3s ease both;
  animation-delay: 4s;
}

/* ===== WORKFLOW ANIMATION ===== */

@keyframes step-activate {
  from { opacity: 0.3; transform: scale(0.94); }
  to   { opacity: 1;   transform: scale(1); }
}

@keyframes connector-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes step-check {
  from { opacity: 0; transform: scale(0) rotate(-45deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.wf-step {
  opacity: 0.3;
  transform: scale(0.94);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.wf-step.wf-active {
  opacity: 1;
  transform: scale(1);
}
.wf-step.wf-done .wf-step-num {
  background: linear-gradient(135deg, #10b981, #34d399) !important;
}
.wf-connector-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2d7ef7, #00d4e8);
  transition: width 0.6s ease;
}
.wf-connector-fill.filled { width: 100%; }

/* ===== PWA ANIMATION ===== */

@keyframes pwa-bounce {
  0%, 100% { transform: translateY(0); }
  30%       { transform: translateY(-8px); }
  60%       { transform: translateY(-4px); }
}

@keyframes pwa-notif-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwa-install-bar {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes pwa-ring {
  0%   { box-shadow: 0 0 0 0 rgba(45,126,247,0.6); }
  70%  { box-shadow: 0 0 0 18px rgba(45,126,247,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,126,247,0); }
}

.pwa-icon-anim {
  animation: pwa-bounce 2.4s ease-in-out infinite;
}

.pwa-notif-anim {
  animation: pwa-notif-in 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.pwa-notif-anim:nth-child(1) { animation-delay: 0.4s; }
.pwa-notif-anim:nth-child(2) { animation-delay: 1.4s; }

.pwa-ring-anim {
  animation: pwa-ring 2s ease-out infinite;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grouped cards */
.reveal-group .reveal:nth-child(1)  { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2)  { transition-delay: 0.07s; }
.reveal-group .reveal:nth-child(3)  { transition-delay: 0.14s; }
.reveal-group .reveal:nth-child(4)  { transition-delay: 0.21s; }
.reveal-group .reveal:nth-child(5)  { transition-delay: 0.28s; }
.reveal-group .reveal:nth-child(6)  { transition-delay: 0.35s; }
.reveal-group .reveal:nth-child(7)  { transition-delay: 0.42s; }
.reveal-group .reveal:nth-child(8)  { transition-delay: 0.49s; }
.reveal-group .reveal:nth-child(9)  { transition-delay: 0.56s; }
.reveal-group .reveal:nth-child(10) { transition-delay: 0.63s; }
.reveal-group .reveal:nth-child(11) { transition-delay: 0.70s; }
.reveal-group .reveal:nth-child(12) { transition-delay: 0.77s; }
.reveal-group .reveal:nth-child(13) { transition-delay: 0.84s; }
.reveal-group .reveal:nth-child(14) { transition-delay: 0.91s; }
.reveal-group .reveal:nth-child(15) { transition-delay: 0.98s; }

/* ===== PHONE FLOAT ===== */
.phone-float {
  animation: float 4s ease-in-out infinite;
}

/* ===== FLOAT BADGES ===== */
.fb-notif       { animation: float-badge-1 4.2s ease-in-out infinite; }
.fb-devis       { animation: float-badge-2 5.1s ease-in-out infinite; }
.fb-commissions { animation: float-badge-3 3.8s ease-in-out infinite; }

/* ===== BACKGROUND ORBS ===== */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
  z-index: 0;
}
.hero-orb.orb-1 {
  width: 600px; height: 600px;
  background: rgba(45,126,247,0.22);
  top: -180px; left: -120px;
  animation: orb-pulse 9s ease-in-out infinite;
}
.hero-orb.orb-2 {
  width: 450px; height: 450px;
  background: rgba(0,212,232,0.14);
  top: 80px; right: -80px;
  animation: orb-pulse 11s ease-in-out infinite 2s;
}
.hero-orb.orb-3 {
  width: 350px; height: 350px;
  background: rgba(124,58,237,0.12);
  bottom: -60px; left: 40%;
  animation: orb-pulse 13s ease-in-out infinite 4s;
}

/* ===== CTA SECTION GLOW ===== */
.cta-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: 0;
}
.cta-orb.cta-orb-1 {
  width: 500px; height: 500px;
  background: rgba(45,126,247,0.25);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-pulse 6s ease-in-out infinite;
}
.cta-orb.cta-orb-2 {
  width: 300px; height: 300px;
  background: rgba(0,212,232,0.18);
  top: 30%; right: 15%;
  animation: orb-pulse 8s ease-in-out infinite 1.5s;
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.revealed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .phone-float,
  .fb-notif,
  .fb-devis,
  .fb-commissions,
  .hero-orb,
  .cta-orb,
  .pwa-icon-anim,
  .pwa-notif-anim,
  .pwa-ring-anim,
  .msg-bubble,
  .typing-dot,
  .wf-step,
  .wf-connector-fill {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    width: 100% !important;
  }
  .wf-step { opacity: 1 !important; transform: none !important; }
}
