/* Parcours connexion / vérification par code — Exxon-bat */

.auth-flow-shell {
  width: 100%;
  max-width: 460px;
}

.auth-flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}

.auth-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 88px;
}

.auth-flow-step__dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  border: 2px solid var(--border, #e2e8f0);
  background: #fff;
  color: var(--text-muted, #64748b);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.auth-flow-step.is-done .auth-flow-step__dot,
.auth-flow-step.is-active .auth-flow-step__dot {
  border-color: var(--primary, #6665dd);
  background: var(--primary-soft, #ede9fe);
  color: var(--primary-dark, #4338ca);
}

.auth-flow-step.is-done .auth-flow-step__dot {
  background: var(--primary, #6665dd);
  color: #fff;
}

.auth-flow-step__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
  text-align: center;
}

.auth-flow-step.is-active .auth-flow-step__label {
  color: var(--primary-dark, #4338ca);
}

.auth-flow-step__line {
  flex: 1;
  height: 2px;
  min-width: 24px;
  max-width: 48px;
  margin-top: -18px;
  background: var(--border, #e2e8f0);
}

.auth-flow-step__line.is-done {
  background: var(--primary, #6665dd);
}

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

.auth-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-soft, #ede9fe), #fff);
  border: 1px solid rgba(102, 101, 221, 0.2);
  margin-bottom: 16px;
}

.auth-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy, #0f172a);
  word-break: break-all;
}

.auth-email-chip__icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.auth-code-input {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 8px auto 20px;
  padding: 16px 12px;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: #fff;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--navy, #0f172a);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-code-input:focus {
  outline: none;
  border-color: var(--primary, #6665dd);
  box-shadow: 0 0 0 3px rgba(102, 101, 221, 0.18);
}

.auth-code-input.is-error {
  border-color: #ef4444;
  background: #fef2f2;
  animation: auth-otp-shake 0.35s ease;
}

.auth-otp {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 20px;
}

.auth-otp-autofill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.01;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  z-index: 2;
  pointer-events: none;
}

.auth-otp__cell {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 54px;
  padding: 0;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  color: var(--navy, #0f172a);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-otp__cell:focus {
  outline: none;
  border-color: var(--primary, #6665dd);
  box-shadow: 0 0 0 3px rgba(102, 101, 221, 0.18);
}

.auth-otp__cell.is-filled {
  border-color: var(--primary, #6665dd);
  background: var(--primary-soft, #ede9fe);
}

.auth-otp__cell.is-error {
  border-color: #ef4444;
  background: #fef2f2;
  animation: auth-otp-shake 0.35s ease;
}

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

.auth-resend {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
}

.auth-resend button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--primary-dark, #4338ca);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-resend button:disabled {
  color: var(--text-muted, #64748b);
  cursor: not-allowed;
  text-decoration: none;
}

.auth-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert--success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.auth-local-code {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fefce8;
  border: 1px solid #fde047;
  text-align: center;
}

.auth-local-code__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #854d0e;
  margin-bottom: 6px;
}

.auth-local-code__value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
  color: #713f12;
}

.auth-success {
  text-align: center;
  padding: 12px 0 8px;
}

.auth-success__check {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 2px solid #86efac;
  animation: auth-success-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes auth-success-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.auth-success h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: var(--navy, #0f172a);
}

.auth-success p {
  margin: 0 0 20px;
  color: var(--text-muted, #64748b);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-success__redirect {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.auth-flow-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

.auth-flow-back:hover {
  color: var(--primary-dark, #4338ca);
}

@media (max-width: 480px) {
  .auth-otp {
    gap: 6px;
  }

  .auth-otp__cell {
    width: 42px;
    height: 50px;
    font-size: 1.2rem;
    border-radius: 10px;
  }

  .auth-card--flow {
    padding: 28px 22px;
  }
}

.auth-quick-access {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm, 12px);
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #eef2ff, #fff);
  text-align: center;
}

.auth-quick-access__title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy, #0f172a);
}

.auth-quick-access__url {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--primary-dark, #4338ca);
}

.auth-quick-access__hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}

.auth-quick-access__install {
  margin: 0 auto;
}
