/* Animations globales pour toutes les pages - Style Admin Dashboard */

/* Animation de transition de page plus fluide */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation plus sophistiquée pour les cartes */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Animation pour le menu flottant */
@keyframes slideUpFromBottom {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animation de transition entre pages */
@keyframes pageTransition {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation pour les éléments avec effet rebond */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(-10px);
  }
  70% {
    transform: scale(0.98) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Classes d'animation appliquées automatiquement */
.container {
  animation: fadeInUp 0.3s ease-out;
}

.stat-card, .clearance-card, .document-card, .admin-card {
  animation: fadeInScale 0.25s ease-out forwards;
  animation-delay: calc(0.05s * var(--delay, 0));
}

/* .main-content {
  animation: fadeInUp 0.3s ease-out 0.1s both;
} */

.floating-menu {
  animation: slideUpFromBottom 0.3s ease-out 0.15s both;
}

.table-container {
  animation: fadeInUp 0.3s ease-out 0.12s both;
}

.form-container {
  animation: fadeInUp 0.3s ease-out 0.08s both;
}

/* Animation spéciale pour les cartes avec hover effect */
.stat-card, .admin-card, .clearance-card, .document-card {
  transition: all 0.3s ease;
  transform: translateY(0); /* État initial fixe */
}

/* Animation bleue pour admin, clearance, document */
.admin-card:hover, .clearance-card:hover, .document-card:hover {
  transform: translateY(-4px) !important;
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(14,165,233,0.07);
}

/* Animation bleue spécifique pour les cartes stat du dashboard admin */
.stat-card:hover {
  transform: translateY(-4px) !important;
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(14,165,233,0.07);
}

/* Animation pour les éléments de login */
.login-container {
  animation: bounceIn 0.6s ease-out;
}

body {
  animation: pageTransition 0.2s ease-out;
}

/* Transitions pour les éléments interactifs */
.btn, .filter-btn, .action-btn {
  transition: all 0.3s ease;
}

/* Animation pour les éléments qui apparaissent au survol */
.hover-scale {
  transition: transform 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Animation pour les éléments qui rebondissent légèrement */
.bounce-hover {
  transition: transform 0.2s ease;
}

.bounce-hover:hover {
  transform: translateY(-2px);
}

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Animation de chargement B2C - Spinner moderne */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.8);
    opacity: 1;
  }
}

.b2c-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.b2c-loading-content {
  background: white;
  padding: 48px 56px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.b2c-spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.b2c-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border: 4px solid #e5e7eb;
  border-top-color: #ef4444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.b2c-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border: 3px solid #ef4444;
  border-radius: 50%;
  opacity: 0.3;
  animation: pulse-ring 1.5s ease-in-out infinite;
}

.b2c-loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 8px;
}

.b2c-loading-subtext {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Animation des points de chargement */
.b2c-loading-dots {
  display: inline-block;
}

.b2c-loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

