/**
 * animations.css - Animations et transitions pour Portal SSO
 * Définit les transitions, animations et effets
 */

 :root {
  /* Durées de transition */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Animations de base */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInFromTop {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@keyframes slideInFromLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Utilités d'animation */
.animated {
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.animated.slow {
  animation-duration: 0.6s;
}

.animated.fast {
  animation-duration: 0.15s;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Classes d'animation prêtes à l'emploi */
.fade-in { animation-name: fadeIn; }
.fade-out { animation-name: fadeOut; }
.slide-in-top { animation-name: slideInFromTop; }
.slide-in-bottom { animation-name: slideInFromBottom; }
.slide-in-left { animation-name: slideInFromLeft; }
.slide-in-right { animation-name: slideInFromRight; }
.spinner { animation: spin 1s linear infinite; }
.pulse { animation: pulse 2s ease infinite; }

/* Transition de base */
.transition {
  transition: all var(--transition-normal);
}

.transition-fast {
  transition: all var(--transition-fast);
}

.transition-slow {
  transition: all var(--transition-slow);
}

/* Transitions spécifiques */
.hover-scale {
  transition: transform var(--transition-fast);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-shadow {
  transition: box-shadow var(--transition-fast);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-md);
}

/* Animation du toggle */
@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}