/* Animation d'arrière-plan inspirée du logo */
@keyframes gradient-flow {
  0% {
    background: linear-gradient(135deg,
      #0ea5e9 0%,     /* Bleu vif */
      #3b82f6 25%,    /* Bleu profond */
      #8b5cf6 50%,    /* Violet */
      #ec4899 75%,    /* Rose vif */
      #f97316 100%    /* Orange */
    );
  }
  25% {
    background: linear-gradient(135deg,
      #3b82f6 0%,
      #8b5cf6 25%,
      #ec4899 50%,
      #f97316 75%,
      #0ea5e9 100%
    );
  }
  50% {
    background: linear-gradient(135deg,
      #8b5cf6 0%,
      #ec4899 25%,
      #f97316 50%,
      #0ea5e9 75%,
      #3b82f6 100%
    );
  }
  75% {
    background: linear-gradient(135deg,
      #ec4899 0%,
      #f97316 25%,
      #0ea5e9 50%,
      #3b82f6 75%,
      #8b5cf6 100%
    );
  }
  100% {
    background: linear-gradient(135deg,
      #f97316 0%,
      #0ea5e9 25%,
      #3b82f6 50%,
      #8b5cf6 75%,
      #ec4899 100%
    );
  }
}

/* Animation de particules flottantes subtiles */
@keyframes float-particles {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.3; }
}

/* Classe principale pour l'animation d'arrière-plan */
.bg-animation-color {
  /*background-size: 400% 400%;*/
  animation: gradient-flow 17s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

/* Effet de particules subtiles en overlay */
.bg-animation-color::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.05) 3px, transparent 3px),
    radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.08) 2px, transparent 2px);
  background-size: 100px 100px, 150px 150px, 200px 200px, 80px 80px;
  animation: float-particles 15s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Amélioration de la carte de formulaire */
.bg-animation-color .card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* Effet de hover sur la carte */
.bg-animation-color .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Style pour les boutons dans l'animation */
.bg-animation-color .btn-primary {
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.bg-animation-color .btn-primary:hover {
  background: linear-gradient(45deg, #2563eb, #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Animation plus subtile pour les appareils préférant les animations réduites */
@media (prefers-reduced-motion: reduce) {
  .bg-animation-color {
    background: linear-gradient(135deg, #0ea5e9 0%, #ec4899 50%, #f97316 100%);
    animation: none;
  }

  .bg-animation-color::before {
    animation: none;
  }
}

/* Variante pour les écrans mobiles (performance optimisée) */
@media (max-width: 768px) {
  .bg-animation-color {
    animation-duration: 8s;
  }

  .bg-animation-color::before {
    background-size: 50px 50px, 75px 75px, 100px 100px, 40px 40px;
    animation-duration: 10s;
  }
}

/* Style spécifique pour le formulaire de création de compte */
.bg-animation-color .card-title {
  color: #1f2937;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.bg-animation-color .form-label {
  color: #374151;
/*  font-weight: 600;*/
}

.bg-animation-color .form-control {
  border: 2px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.bg-animation-color .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Animation pour la barre de force du mot de passe */
.bg-animation-color .progress-bar {
  transition: all 0.3s ease;
}

/* Effet de brillance occasionnel */
@keyframes shine {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.bg-animation-color .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shine 3s infinite;
  animation-delay: 2s;
}