/* Formulaire compte Run and Bike — layout moderne */

/* ── Split layout (inscription / profil / connexion) ── */
body.auth-page.auth-page--split {
  background: #eef1f8;
}

body.auth-page.auth-page--split .auth-shell {
  min-height: 100vh;
  display: block;
  padding: 0;
  place-items: stretch;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  min-height: 100vh;
}

.auth-split-visual {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.auth-split-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: none;
  image-rendering: auto;
  backface-visibility: hidden;
}

.auth-split-overlay {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 32px;
  background: linear-gradient(
    180deg,
    rgba(8, 18, 40, 0.15) 0%,
    rgba(8, 18, 40, 0.55) 45%,
    rgba(8, 18, 40, 0.88) 100%
  );
  color: #fff;
}

.auth-split-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 18px;
  animation: fadeSlideUp 0.6s ease backwards;
}

.auth-split-overlay h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.4px;
  animation: fadeSlideUp 0.6s ease 0.08s backwards;
}

.auth-split-overlay p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  animation: fadeSlideUp 0.6s ease 0.14s backwards;
}

.auth-split-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.auth-split-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  animation: fadeSlideUp 0.55s ease backwards;
}

.auth-split-features li:nth-child(1) { animation-delay: 0.2s; }
.auth-split-features li:nth-child(2) { animation-delay: 0.28s; }
.auth-split-features li:nth-child(3) { animation-delay: 0.36s; }

.auth-split-features .feat-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 16px;
}

.auth-split-main {
  overflow-y: auto;
  padding: 28px clamp(20px, 4vw, 48px) 40px;
}

.auth-split-main .auth-card {
  max-width: 780px;
  margin: 0 auto;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.auth-split-main .auth-top {
  margin-bottom: 24px;
  animation: fadeSlideUp 0.5s ease backwards;
}

.auth-split-main .auth-header {
  text-align: left;
  margin-bottom: 22px;
  animation: fadeSlideUp 0.5s ease 0.06s backwards;
}

.auth-split-main .auth-title {
  font-size: clamp(26px, 3vw, 32px);
  text-align: left;
}

.auth-split-main .account-form-intro,
.auth-split-main .auth-subtitle {
  text-align: left;
  max-width: 620px;
}

/* ── Étapes ── */
.form-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  animation: fadeSlideUp 0.5s ease 0.1s backwards;
}

.form-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.55);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.form-step-num {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  padding: 0;
  background: rgba(0, 0, 0, 0.06);
}

.form-step--active {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.08);
}

.form-step--active .form-step-num {
  background: #2563eb;
  color: #fff;
}

/* ── Sections en cartes ── */
.account-form {
  display: grid;
  gap: 18px;
}

.form-section {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  animation: fadeSlideUp 0.55s ease backwards;
}

.form-section:nth-child(1) { animation-delay: 0.12s; }
.form-section:nth-child(2) { animation-delay: 0.18s; }
.form-section:nth-child(3) { animation-delay: 0.24s; }
.form-section:nth-child(4) { animation-delay: 0.30s; }
.form-section:nth-child(5) { animation-delay: 0.36s; }

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

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section-num {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.22);
}

/* Bloc Google mis en avant */
.auth-google-promo {
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  animation: fadeSlideUp 0.5s ease 0.08s backwards;
}

.auth-google-promo-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #2563eb;
}

.auth-google-promo-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.88);
}

.auth-google-promo .btn-auth--google-lg {
  width: 100%;
  padding: 15px 18px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.auth-google-promo .btn-auth--google-lg:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

.auth-google-promo-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--auth-muted);
  text-align: center;
}

.auth-divider--below-google {
  margin: 22px 0;
}

.form-section-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: rgba(11, 18, 32, 0.92);
}

.form-section-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--auth-muted);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid--3 {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-field label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.72);
  line-height: 1.35;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.form-field textarea {
  min-height: 96px;
  resize: vertical;
  font-family: inherit;
}

.form-field input:not([type="checkbox"]):not([type="radio"]):hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: rgba(37, 99, 235, 0.28);
}

.form-field input:not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

/* Case à cocher (consentement) */
.form-field--consent {
  padding: 16px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
}

.form-field--consent .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}

.form-field--consent .consent-row-text {
  flex: 1;
  min-width: 0;
}

.form-field--consent .consent-row-text .req {
  color: #dc2626;
  font-style: normal;
  font-weight: 800;
}

.form-field--consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 2px 0 0;
  padding: 0;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  background: #fff;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
  transform: none;
  box-shadow: none;
}

.form-field--consent input[type="checkbox"]:focus {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  box-shadow: none;
  transform: none;
}

.form-field--consent.is-invalid {
  border-color: #fca5a5;
  background: #fef2f2;
}

.form-field--consent.is-invalid input[type="checkbox"] {
  border-color: #dc2626;
}

.form-field input:not([type="checkbox"]):not([type="radio"])[readonly] {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(11, 18, 32, 0.65);
  cursor: default;
}

.form-field.is-invalid input:not([type="checkbox"]):not([type="radio"]),
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

#distances-list.is-invalid {
  outline: 2px solid #dc2626;
  outline-offset: 4px;
  border-radius: 12px;
}

.validation-error-list {
  margin: 10px 0 0;
  padding-left: 1.25rem;
  text-align: left;
}

.validation-error-list li {
  margin-bottom: 6px;
}

.form-field .field-error {
  font-size: 12px;
  color: #b91c1c;
  font-weight: 600;
}

.form-field--note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px dashed rgba(37, 99, 235, 0.22);
  font-size: 13px;
  color: rgba(11, 18, 32, 0.65);
  font-style: italic;
}

.required-mark {
  color: #dc2626;
}

.account-form-intro {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.7;
}

.account-form-actions {
  margin-top: 4px;
  animation: fadeSlideUp 0.55s ease 0.42s backwards;
}

.account-form-actions .btn-auth {
  max-width: 320px;
  margin: 0 auto;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.account-form-actions .btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.account-form-legend {
  margin-top: 4px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.7), rgba(254, 243, 199, 0.35));
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
  animation: fadeSlideUp 0.5s ease 0.46s backwards;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.10);
}

.auth-links {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  animation: fadeSlideUp 0.5s ease 0.5s backwards;
}

.auth-links a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-success {
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

/* Connexion compacte dans split */
.auth-login-panel {
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  animation: fadeSlideUp 0.55s ease 0.12s backwards;
}

.auth-login-panel .auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-login-panel .auth-title {
  text-align: center;
}

/* Legacy row layout (fallback) */
.account-form-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 12px;
  align-items: start;
}

.account-form-row label {
  padding-top: 10px;
  font-size: 13px;
  font-weight: 700;
}

.dob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

@media (max-width: 960px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-split-visual {
    min-height: 220px;
    max-height: 280px;
  }

  .auth-split-overlay {
    padding: 24px 20px;
  }

  .auth-split-overlay h2 {
    font-size: 22px;
  }

  .auth-split-features {
    display: none;
  }
}

@media (max-width: 640px) {
  .form-grid--2,
  .form-grid--3,
  .dob-grid {
    grid-template-columns: 1fr;
  }

  .auth-split-main {
    padding: 20px 16px 32px;
  }

  .form-section {
    padding: 16px;
    border-radius: 14px;
  }

  .form-steps {
    gap: 6px;
  }

  .form-step {
    font-size: 11px;
    padding: 6px 10px;
  }
}

.summary-lines {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 14px;
}

.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #334155;
}

.summary-lines li.muted {
  color: #94a3b8;
  font-style: italic;
}

.summary-total-line {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2563eb;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .form-section,
  .auth-split-badge,
  .auth-split-overlay h2,
  .auth-split-overlay p,
  .auth-split-features li,
  .auth-split-main .auth-top,
  .auth-split-main .auth-header,
  .form-steps,
  .account-form-actions,
  .account-form-legend,
  .auth-links,
  .auth-login-panel,
  .auth-google-promo {
    animation: none !important;
  }

  .form-field input:not([type="checkbox"]):not([type="radio"]):focus,
  .form-field select:focus,
  .form-field textarea:focus {
    transform: none;
  }
}
