/* Variables globales */
:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-bg: rgba(99, 102, 241, 0.08);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border-color: #e5e7eb;
  --border-dark: #d1d5db;
  --bg-color: #f9fafb;
  --card-color: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition: all 0.2s ease-in-out;
}

/* Styles de base */
body.auth-page {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%236366f1' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

.auth-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--card-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.auth-card-large {
  max-width: 620px;
}

/* Header de la carte */
.auth-header {
  text-align: center;
  padding: 2.5rem 2.5rem 1.5rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.logo-link:hover {
  color: var(--primary-hover);
}

.logo-link svg {
  margin-right: 0.75rem;
  width: 2rem;
  height: 2rem;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-color);
}

.auth-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

/* Contenu de la carte */
.auth-content {
  padding: 0 2.5rem 2.5rem;
}

/* Formulaires */
.auth-form-group {
  margin-bottom: 1.5rem;
}

.auth-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-color);
}

.auth-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--card-color);
  transition: var(--transition);
}

.auth-form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
}

.auth-form-control::placeholder {
  color: var(--text-lighter);
}

.auth-form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.auth-form-error {
  color: var(--danger-color);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.auth-form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.auth-form-check-input {
  margin-top: 0.25rem;
  margin-right: 0.75rem;
  width: 1.125rem;
  height: 1.125rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
}

.auth-form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.auth-form-check-label {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.auth-form-check-label a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.auth-form-check-label a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Boutons */
.auth-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.auth-btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.auth-btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.auth-btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.auth-btn-outline:hover {
  background-color: var(--primary-bg);
}

/* Footer de la carte */
.auth-footer {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.6;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* Alertes */
.auth-alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  display: flex;
  align-items: flex-start;
  line-height: 1.5;
}

.auth-alert-icon {
  margin-right: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.auth-alert-danger {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

.auth-alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.auth-alert-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

/* Styles spécifiques pour les grands écrans */
@media (min-width: 768px) {
  .auth-card {
    max-width: 480px;
  }

  .auth-card-large {
    max-width: 620px;
  }
}

/* Styles spécifiques pour affichage sur mobile */
@media (max-width: 576px) {
  .auth-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .auth-content {
    padding: 0 1.5rem 1.5rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .auth-subtitle {
    font-size: 0.9375rem;
  }
}

/* Accents visuels et effets de design */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
}

.auth-card-highlight {
  position: relative;
  overflow: hidden;
}

.auth-card-highlight::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0) 50%);
  z-index: -1;
}

/* Formulaire à plusieurs colonnes pour les formulaires plus grands */
.auth-form-row {
  display: flex;
  flex-wrap: wrap;
  margin: -0.75rem;
}

.auth-form-col {
  flex: 1 0 50%;
  padding: 0.75rem;
}

/* Style pour les sections optionnelles repliables */
.auth-collapse-section {
  margin-top: 1.5rem;
}

.auth-collapse-trigger {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.auth-collapse-trigger:hover {
  color: var(--primary-hover);
}

.auth-collapse-trigger svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  transition: var(--transition);
}

.auth-collapse-trigger.open svg {
  transform: rotate(90deg);
}

.auth-collapse-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-in-out;
}

.auth-collapse-content.open {
  max-height: 1000px;
}

/* Séparateurs élégants avec texte */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-lighter);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider::before {
  margin-right: 0.75rem;
}

.auth-divider::after {
  margin-left: 0.75rem;
}

/* Badges et étiquettes */
.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

.auth-badge-primary {
  background-color: var(--primary-bg);
  color: var(--primary-color);
}

/* Animations et effets */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Classes pour les modals */
.auth-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.auth-modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.auth-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Styles pour les CGV/politique de confidentialité */
.legal-content {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.legal-content h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.legal-version {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 2rem;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.legal-section ul {
  padding-left: 1.5rem;
}

.legal-section ul li {
  margin-bottom: 0.75rem;
}

/* Amélioration pour les sélecteurs de type de compte */
.auth-account-type {
  display: flex;
  margin-bottom: 2rem;
  background-color: var(--bg-color);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.auth-account-type-option {
  flex: 1;
  text-align: center;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.auth-account-type-option.active {
  background-color: var(--card-color);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.auth-account-type-option:hover:not(.active) {
  color: var(--primary-hover);
}

/* Séparateur avec message */
.auth-redirect-message {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.auth-redirect-message::before,
.auth-redirect-message::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background-color: var(--border-color);
}

.auth-redirect-message::before {
  margin-right: 1rem;
}

.auth-redirect-message::after {
  margin-left: 1rem;
}

.auth-redirect-link {
  display: block;
  text-align: center;
  font-weight: 500;
  color: var(--primary-color);
  padding: 0.75rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.auth-redirect-link:hover {
  background-color: var(--primary-bg);
  border-color: var(--primary-light);
  text-decoration: none;
}

/* Styles pour les boutons de sélection de type d'utilisateur */
.auth-user-type-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.auth-user-type-option {
  flex: 1;
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.auth-user-type-option:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.auth-user-type-option.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-bg);
}

.auth-user-type-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.auth-user-type-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.auth-user-type-description {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Ajout d'une bannière marketing pour les avantages */
.auth-benefits-banner {
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-bg), rgba(129, 140, 248, 0.08));
  border-radius: var(--radius);
  padding: 1.25rem;
}

.auth-benefits-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.auth-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-benefits-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.auth-benefits-item svg {
  color: var(--primary-color);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Style pour le lien de redirection */
.auth-alt-option {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-color);
  border-radius: var(--radius);
}

.auth-alt-option p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.auth-alt-option a {
  font-weight: 600;
  color: var(--primary-color);
}

.auth-alt-option a:hover {
  color: var(--primary-hover);
}