/* ═══════════════════════════════════════════════════════════════════════
   Animations — rien de linéaire, rien au-delà de 1.2s.
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes rowSlide    { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes progressGrow { from { width: 0 !important; } }
@keyframes barGrow     { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sparkDraw   { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
@keyframes sparkFill   { from { opacity: 0; } to { opacity: .07; } }
@keyframes dotPop      { 0% { r: 0; opacity: 0; } 70% { r: 4.5; opacity: 1; } 100% { r: 3.5; opacity: 1; } }
@keyframes donutDraw   { from { stroke-dashoffset: 277; } }
@keyframes donutNum    { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes popIn       { 0% { opacity: 0; transform: scale(.94) translateY(6px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideInRight{ from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastIn     { 0% { opacity: 0; transform: translateY(16px) scale(.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut    { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes pulseDot    { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes shimmer     { 0% { background-position: -320px 0; } 100% { background-position: 320px 0; } }
@keyframes valueFlash  { 0% { color: var(--accent); } 100% { color: inherit; } }
@keyframes gaugeSweep  { from { stroke-dashoffset: 440; } }
@keyframes ganttGrow   { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* Entrées en cascade — chaque section arrive 60ms après la précédente */
.anim-up { animation: fadeSlideUp .5s var(--ease-out) both; }
.anim-in { animation: fadeIn .4s ease both; }
.anim-pop { animation: popIn .32s var(--ease-bounce) both; }

.stagger > * { animation: fadeSlideUp .5s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .22s; }
.stagger > *:nth-child(5) { animation-delay: .28s; }
.stagger > *:nth-child(6) { animation-delay: .34s; }
.stagger > *:nth-child(7) { animation-delay: .40s; }
.stagger > *:nth-child(8) { animation-delay: .46s; }

.d-1 { animation-delay: .08s; } .d-2 { animation-delay: .16s; }
.d-3 { animation-delay: .24s; } .d-4 { animation-delay: .32s; }
.d-5 { animation-delay: .40s; } .d-6 { animation-delay: .48s; }

/* Valeur qui vient d'être recalculée en direct */
.flash { animation: valueFlash .7s ease both; }

/* Squelette de chargement */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-50) 50%, var(--gray-100) 100%);
  background-size: 320px 100%;
  animation: shimmer 1.1s ease-in-out infinite;
  border-radius: var(--radius-xs);
  color: transparent !important;
}

/* Transition de page Turbo */
@media (prefers-reduced-motion: no-preference) {
  html { view-transition-name: none; }
  ::view-transition-old(root) { animation: fadeIn .18s ease reverse; }
  ::view-transition-new(root) { animation: fadeSlideUp .28s var(--ease-out); }
}

.turbo-progress-bar { height: 2px; background: var(--accent); }
