/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --background: #ffffff;
  --surface: #f9fafb;
  --border: #e5e7eb;
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Container principal */
.container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Carte d'authentification */
.auth-card {
  background: var(--background);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header avec logo */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-image {
  max-width: 225px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.logo-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* Formulaire */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.form-group input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--background);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
  color: var(--text-light);
}

/* Bouton principal */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loader du bouton */
.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

/* Séparateur */
.divider {
  text-align: center;
  position: relative;
  margin: 0.5rem 0;
}

.divider span {
  background: var(--background);
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Boutons sociaux */
.social-buttons {
  display: flex;
  gap: 1rem;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-social:hover {
  border-color: var(--primary-color);
  background: var(--background);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-facebook:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.05);
}

.btn-google:hover {
  border-color: #ea4335;
  background: rgba(234, 67, 53, 0.05);
}

.social-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Messages d'état */
.message-container {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.message {
  text-align: center;
  padding: 1rem;
}

.message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
    margin: 0.5rem;
  }

  .logo h1 {
    font-size: 2rem;
  }

  .social-buttons {
    flex-direction: column;
  }

  .btn-social {
    padding: 1rem;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }
}

/* Animations d'entrée */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeInUp 0.6s ease-out;
}

/* États de focus améliorés */
.btn-primary:focus-visible,
.btn-social:focus-visible,
.form-group input:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Support pour le mode sombre */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #111827;
    --surface: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --border: #374151;
  }

  body {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  }
}
