/* ═══════════════════════════════════════════════════════════════
   Jus d'orange — Animations & Transitions
   ═══════════════════════════════════════════════════════════════ */

/* ─── Keyframes ──────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes orangePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,0,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255,107,0,0); }
}

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

@keyframes borderGlow {
  0%,100% { border-color: rgba(255,107,0,0.2); }
  50%     { border-color: rgba(255,107,0,0.6); }
}

/* ─── Page load animation ────────────────────────────────────── */
.page-content {
  animation: fadeInUp 0.3s ease;
}

/* ─── Card hover glow ────────────────────────────────────────── */
.stat-card.animate { animation: orangePulse 2s ease infinite; }

/* ─── Scheduler active indicator ────────────────────────────── */
.scheduler-active-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
.scheduler-active-dot.paused { background: var(--yellow); animation: none; }
.scheduler-active-dot.stopped { background: var(--red); animation: none; }

/* ─── SSE progress bar ───────────────────────────────────────── */
.sse-progress-bar {
  height: 3px;
  background: var(--bg-surface3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.sse-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 2px;
  transition: width var(--transition-base);
}
.sse-progress-bar.indeterminate .sse-progress-fill {
  width: 40%;
  animation: progressIndeterminate 1.5s ease infinite;
}

@keyframes progressIndeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── Orange glow on active elements ────────────────────────── */
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--orange);
}

/* ─── Table row entrance animation ──────────────────────────── */
.table tbody tr {
  animation: fadeIn 0.2s ease both;
}
.table tbody tr:nth-child(1) { animation-delay: 0ms; }
.table tbody tr:nth-child(2) { animation-delay: 30ms; }
.table tbody tr:nth-child(3) { animation-delay: 60ms; }
.table tbody tr:nth-child(4) { animation-delay: 90ms; }
.table tbody tr:nth-child(5) { animation-delay: 120ms; }

/* ─── Stat card count-up ─────────────────────────────────────── */
.stat-value { animation: countUp 0.4s ease; }

/* ─── Login page animations ──────────────────────────────────── */
.login-card {
  animation: fadeInUp 0.4s ease;
}

/* ─── Modal animation ────────────────────────────────────────── */
.modal-overlay.open .modal {
  animation: fadeInUp 0.25s ease;
}

/* ─── Orange brand glow on sidebar brand ────────────────────── */
.brand-icon {
  animation: borderGlow 3s ease infinite;
}

/* ─── Notification badge pulse ───────────────────────────────── */
.nav-badge { animation: pulse 3s ease infinite; }
