/* ============================================================
   AUTH PAGES — Login & Register
   Design épuré, moderne et accessible pour Seazazoo
   ============================================================ */

/* --- Variables & Reset --- */
.auth-page {
  --auth-primary: #0d6efd;
  --auth-primary-dark: #0a58ca;
  --auth-primary-light: #e7f1ff;
  --auth-dark: #1a1a2e;
  --auth-muted: #6c757d;
  --auth-bg: #f8fafc;
  --auth-card: #ffffff;
  --auth-radius: 20px;
  --auth-radius-sm: 12px;
  --auth-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
  --auth-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.1);
  --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  display: flex;
  font-family: "Verdana", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
  box-sizing: border-box;
}

/* --- Layout principal split-screen --- */
.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* --- Panneau visuel gauche (desktop) --- */
.auth-visual {
  flex: 1;
  display: none;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 40%, #0d6efd 100%);
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/img/national-class-c-30-120.jpg') center/cover no-repeat;
  opacity: 0.25;
  z-index: 0;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 3rem;
  text-align: center;
  color: #fff;
}

.auth-visual-content .auth-visual-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

.auth-visual-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.auth-visual-content p {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 360px;
  line-height: 1.6;
}

/* Points décoratifs animés */
.auth-visual-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 1;
}

.auth-visual-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: authDotPulse 2s ease-in-out infinite;
}

.auth-visual-dots span:nth-child(1) { animation-delay: 0s; }
.auth-visual-dots span:nth-child(2) { animation-delay: 0.4s; }
.auth-visual-dots span:nth-child(3) { animation-delay: 0.8s; }

@keyframes authDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* --- Panneau formulaire droite --- */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--auth-bg);
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--auth-card);
  border-radius: var(--auth-radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--auth-shadow);
  transition: var(--auth-transition);
  animation: authFadeUp 0.5s ease-out;
}

.auth-card:hover {
  box-shadow: var(--auth-shadow-hover);
}

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

/* --- Logo & En-tête --- */
.auth-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 48px;
  width: auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--auth-dark);
  margin: 0 0 0.4rem;
}

.auth-header p {
  font-size: 0.92rem;
  color: var(--auth-muted);
  margin: 0;
}

/* --- Champs de formulaire --- */
.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-dark);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.auth-field label .auth-required {
  color: var(--auth-primary);
  margin-left: 2px;
}

.auth-field .form-control,
.auth-field .form-select {
  border: 1.5px solid #dee2e6;
  border-radius: var(--auth-radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  transition: var(--auth-transition);
  background: #fff;
  color: var(--auth-dark);
}

.auth-field .form-control:focus,
.auth-field .form-select:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
  outline: none;
}

.auth-field .form-control::placeholder {
  color: #adb5bd;
  font-weight: 400;
}

/* Input group pour mot de passe avec toggle */
.auth-field .input-group {
  position: relative;
}

.auth-field .input-group .form-control {
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-field .input-group .btn-password-toggle {
  border: 1.5px solid #dee2e6;
  border-left: none;
  border-radius: 0 var(--auth-radius-sm) var(--auth-radius-sm) 0;
  background: #fff;
  color: var(--auth-muted);
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  transition: var(--auth-transition);
  cursor: pointer;
}

.auth-field .input-group .btn-password-toggle:hover {
  color: var(--auth-primary);
}

.auth-field .input-group .form-control:focus ~ .btn-password-toggle,
.auth-field .input-group .form-control:focus + .btn-password-toggle {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

/* Ligne de deux champs côte à côte */
.auth-row {
  display: flex;
  gap: 1rem;
}

.auth-row .auth-field {
  flex: 1;
}

/* --- Mot de passe aide --- */
.auth-password-help {
  font-size: 0.78rem;
  color: #dc3545;
  margin-top: 0.35rem;
  min-height: 1.2em;
}

/* --- Bouton principal --- */
.auth-btn-primary {
  display: block;
  width: 100%;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 50px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--auth-transition);
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

.auth-btn-primary:hover {
  background: var(--auth-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.auth-btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.auth-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Séparateur --- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--auth-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dee2e6;
}

/* --- Liens texte footer --- */
.auth-footer-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--auth-muted);
}

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

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

/* --- Lien mdp oublié --- */
.auth-forgot-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--auth-transition);
}

.auth-forgot-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* --- Recaptcha --- */
.auth-recaptcha {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.5rem;
  transform: scale(0.92);
  transform-origin: center;
}

/* --- Note champs obligatoires --- */
.auth-required-note {
  font-size: 0.78rem;
  color: var(--auth-muted);
  margin: 0.5rem 0 0;
}

.auth-required-note span {
  color: var(--auth-primary);
  font-weight: 600;
}

/* --- Stepper (register) --- */
.auth-steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.auth-step-dot {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #dee2e6;
  transition: var(--auth-transition);
}

.auth-step-dot.active {
  background: var(--auth-primary);
  width: 56px;
}

/* --- Animations d'étapes --- */
.auth-step {
  display: none;
  animation: authStepIn 0.35s ease-out;
}

.auth-step.active {
  display: block;
}

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

/* Boutons navigation étapes */
.auth-step-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-btn-secondary {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1.5px solid #dee2e6;
  border-radius: 50px;
  background: #fff;
  color: var(--auth-dark);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--auth-transition);
  text-align: center;
}

.auth-btn-secondary:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
  background: var(--auth-primary-light);
}

.auth-btn-next {
  flex: 2;
}

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

/* Tablette et plus */
@media (min-width: 768px) {
  .auth-visual {
    display: flex;
  }

  .auth-form-panel {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 3rem 2.5rem;
  }

  .auth-card {
    padding: 3rem 2.5rem;
  }

  .auth-recaptcha {
    transform: scale(1);
  }
}

@media (min-width: 1200px) {
  .auth-form-panel {
    flex: 0 0 42%;
    max-width: 42%;
  }

  .auth-visual-content h2 {
    font-size: 2.4rem;
  }
}

/* Mobile : ajustements */
@media (max-width: 767.98px) {
  .auth-form-panel {
    padding: 1.5rem 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }

  .auth-header h1 {
    font-size: 1.35rem;
  }

  .auth-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-logo {
    height: 40px;
    margin-bottom: 1.25rem;
  }
}

/* Petits mobiles */
@media (max-width: 374px) {
  .auth-card {
    padding: 1.5rem 1rem;
  }

  .auth-recaptcha {
    transform: scale(0.82);
  }
}
