/* ============================================
   ANIMATIONS - Keyframes et transitions
   Nos Recettes V3
   ============================================ */

/* === TOAST === */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* === SKELETON LOADER === */
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === SPINNER === */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

/* === FADE IN === */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fade-in 300ms ease forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 400ms ease forwards;
}

.animate-scale-in {
  animation: scale-in 250ms ease forwards;
}

/* === STAGGER CARDS === */
.recipe-card {
  animation: fade-in-up 400ms ease forwards;
  opacity: 0;
}

.recipe-card:nth-child(1)  { animation-delay: 50ms; }
.recipe-card:nth-child(2)  { animation-delay: 100ms; }
.recipe-card:nth-child(3)  { animation-delay: 150ms; }
.recipe-card:nth-child(4)  { animation-delay: 200ms; }
.recipe-card:nth-child(5)  { animation-delay: 250ms; }
.recipe-card:nth-child(6)  { animation-delay: 300ms; }
.recipe-card:nth-child(7)  { animation-delay: 350ms; }
.recipe-card:nth-child(8)  { animation-delay: 400ms; }
.recipe-card:nth-child(9)  { animation-delay: 450ms; }
.recipe-card:nth-child(10) { animation-delay: 500ms; }

/* === TIMER PULSE === */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

.timer-active {
  animation: pulse 2s ease-in-out infinite;
}

/* === HEART BEAT === */
@keyframes heart-beat {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.3); }
  30%  { transform: scale(1); }
  45%  { transform: scale(1.15); }
  60%  { transform: scale(1); }
}

.heart-animate {
  animation: heart-beat 0.6s ease;
}

/* === SLIDE UP (bottom sheet mobile) === */
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes slide-down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}
