/* ═══════════════════════════════════════════
   RECHERCHE AVOCAT — Animations & Transitions
   Section E : Client-side improvements
   ═══════════════════════════════════════════ */

/* ─── Keyframes ──────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Wizard step transitions ────────────── */
.wizard__step {
  animation: fadeSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.wizard__step.is-exiting {
  animation: fadeSlideOut 0.18s ease forwards;
  pointer-events: none;
}

/* ─── Progress bar ───────────────────────── */
.wizard__progress-bar {
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label % + ETA sous la barre */
.wizard__progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--neutral-500);
}
.wizard__progress-pct {
  font-weight: 600;
  color: var(--green-700);
}
.wizard__progress-eta { font-style: italic; }

/* ─── Toast notifications ────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--neutral-900);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity   0.35s ease;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast--success { background: var(--green-700); }
.toast--error   { background: var(--red-500); }

/* ─── Skeleton loading ───────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--neutral-100) 25%,
    var(--neutral-50)  50%,
    var(--neutral-100) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton--text   { height: 1rem; }
.skeleton--title  { height: 1.5rem; width: 60%; }
.skeleton--button { height: 2.5rem; width: 120px; border-radius: var(--radius-md); }

/* ─── Spinner ────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner--green {
  border-color: rgba(58,150,104,.2);
  border-top-color: var(--green-600);
}

/* ─── Buttons & interactive press ───────── */
.btn {
  transition: background 0.15s, border-color 0.15s,
              box-shadow 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.domain-btn {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.urgence-btn, .chip {
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Empty state ────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  animation: fadeSlideIn 0.3s ease;
}
.empty-state__icon  { font-size: 3rem; }
.empty-state__title { font-size: var(--text-lg); font-weight: 600; color: var(--neutral-700); }
.empty-state__text  { font-size: var(--text-sm); color: var(--neutral-500); max-width: 280px; }

/* ─── Scroll reveal sections ─────────────── */
/* Appliqué par lazy-loading.js via .section--reveal */
.section--reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.section--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Image lazy loading ─────────────────── */
.img--lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.img--loaded {
  opacity: 1;
}

/* ─── Respect prefers-reduced-motion ─────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .section--reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
