/* Améliorations du design de la page de connexion Admin */
/* AutoBF - 2025-01-09 */

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */

/* Fond avec dégradé moderne */
.min-h-screen.bg-gray-50 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
  background-attachment: fixed !important;
  position: relative !important;
}

/* Effet de particules animées en arrière-plan */
.min-h-screen.bg-gray-50::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* ============================================
   CARTE DE CONNEXION
   ============================================ */

/* Carte principale avec effet glassmorphism */
.max-w-md.w-full {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-radius: 24px !important;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  padding: 3rem 2.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: slideUp 0.6s ease-out !important;
}

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

/* Effet de brillance sur la carte */
.max-w-md.w-full::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* ============================================
   EN-TÊTE
   ============================================ */

/* Icône avec effet 3D */
.mx-auto.h-12.w-12.rounded-full {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  box-shadow: 
    0 10px 30px rgba(249, 115, 22, 0.4),
    0 0 0 4px rgba(249, 115, 22, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
  animation: pulse 2s ease-in-out infinite !important;
  border: 3px solid rgba(255, 255, 255, 0.3) !important;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 10px 30px rgba(249, 115, 22, 0.4),
      0 0 0 4px rgba(249, 115, 22, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 
      0 15px 40px rgba(249, 115, 22, 0.5),
      0 0 0 6px rgba(249, 115, 22, 0.15),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
}

/* Titre avec dégradé */
.text-3xl.font-extrabold {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-size: 2rem !important;
  letter-spacing: -0.02em !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Sous-titre */
.text-sm.text-gray-600 {
  color: #6b7280 !important;
  font-weight: 500 !important;
}

/* ============================================
   BOUTON RETOUR
   ============================================ */

/* Bouton retour avec style moderne */
button[class*="outline"][class*="flex"][class*="items-center"] {
  border: 2px solid rgba(102, 126, 234, 0.3) !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px) !important;
  color: #667eea !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  border-radius: 12px !important;
  padding: 0.75rem 1.5rem !important;
}

button[class*="outline"][class*="flex"][class*="items-center"]:hover {
  background: rgba(102, 126, 234, 0.1) !important;
  border-color: #667eea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* ============================================
   FORMULAIRE
   ============================================ */

/* Labels */
label {
  color: #374151 !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

/* Inputs avec style moderne */
input[type="email"],
input[type="password"],
input[type="text"] {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 0.875rem 1rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  color: #111827 !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  outline: none !important;
  border-color: #f97316 !important;
  box-shadow: 
    0 0 0 4px rgba(249, 115, 22, 0.1),
    0 4px 12px rgba(249, 115, 22, 0.2) !important;
  background: white !important;
  transform: translateY(-2px) !important;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: #9ca3af !important;
  opacity: 0.7 !important;
}

/* Conteneur du mot de passe */
.relative.mt-1 {
  position: relative !important;
}

/* Bouton afficher/masquer mot de passe */
button[type="button"][class*="absolute"] {
  color: #6b7280 !important;
  transition: all 0.2s ease !important;
}

button[type="button"][class*="absolute"]:hover {
  color: #f97316 !important;
  transform: scale(1.1) !important;
}

/* ============================================
   BOUTON DE CONNEXION
   ============================================ */

/* Bouton de connexion avec dégradé */
button[type="submit"][class*="bg-green"] {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 1rem 2rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: white !important;
  box-shadow: 
    0 4px 15px rgba(249, 115, 22, 0.4),
    0 2px 4px rgba(249, 115, 22, 0.2) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

button[type="submit"][class*="bg-green"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

button[type="submit"][class*="bg-green"]:hover::before {
  left: 100%;
}

button[type="submit"][class*="bg-green"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 
    0 8px 25px rgba(249, 115, 22, 0.5),
    0 4px 8px rgba(249, 115, 22, 0.3) !important;
}

button[type="submit"][class*="bg-green"]:active {
  transform: translateY(-1px) !important;
}

button[type="submit"][class*="bg-green"]:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ============================================
   ALERTES
   ============================================ */

/* Alertes d'erreur */
[class*="Alert"][variant="destructive"] {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
  border: 2px solid #f87171 !important;
  border-radius: 12px !important;
  padding: 1rem !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
  animation: shake 0.5s ease !important;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* ============================================
   SECTION COMPTES DE TEST - CACHÉE
   ============================================ */

/* Cacher la section des comptes de test avec CSS */
/* Le script JavaScript ajoutera la classe hide-test-accounts */
.hide-test-accounts {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
}

.mt-6.text-center p {
  color: #6b7280 !important;
  font-weight: 500 !important;
}

.mt-2.space-y-1 {
  background: rgba(249, 115, 22, 0.05) !important;
  border-radius: 12px !important;
  padding: 1rem !important;
  border: 1px solid rgba(249, 115, 22, 0.1) !important;
}

.mt-2.space-y-1 p {
  color: #6b7280 !important;
  font-size: 0.875rem !important;
  padding: 0.25rem 0 !important;
}

.mt-2.space-y-1 strong {
  color: #f97316 !important;
  font-weight: 600 !important;
}

/* ============================================
   ANIMATIONS GLOBALES
   ============================================ */

/* Animation d'apparition pour les éléments */
.space-y-8 > * {
  animation: fadeIn 0.6s ease-out backwards !important;
}

.space-y-8 > *:nth-child(1) {
  animation-delay: 0.1s !important;
}

.space-y-8 > *:nth-child(2) {
  animation-delay: 0.2s !important;
}

.space-y-8 > *:nth-child(3) {
  animation-delay: 0.3s !important;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .max-w-md.w-full {
    padding: 2rem 1.5rem !important;
    border-radius: 16px !important;
  }
  
  .text-3xl.font-extrabold {
    font-size: 1.75rem !important;
  }
  
  button[type="submit"][class*="bg-green"] {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
}

/* ============================================
   AMÉLIORATIONS SUPPLÉMENTAIRES
   ============================================ */

/* Effet de focus amélioré */
*:focus-visible {
  outline: 2px solid #f97316 !important;
  outline-offset: 2px !important;
  border-radius: 4px !important;
}

/* Transitions fluides */
* {
  transition-property: color, background-color, border-color, transform, box-shadow !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 0.2s !important;
}

/* Amélioration de la lisibilité */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
