/* LEC Back: authentication pages (login, link, 2FA, enrolment, recovery codes, step-up),
   the security panel of the Système page and the step-up window opened by app.js.
   OWNER: auth. Only the semantic tokens of tokens.css; no inline style anywhere (CSP). */

.auth-card { text-align: left; }
.auth-wide { width: min(520px, 100%); }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); text-align: center; }
.auth-title { font-size: var(--text-2xl); }
.auth-foot { text-align: center; }
.auth-actions { justify-content: space-between; }
.auth-narrow { max-width: 560px; margin: 0 auto; }

.auth-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.auth-icon .icon { width: 26px; height: 26px; }
.auth-icon-warn { background: var(--warn-soft); color: var(--warn); }
.auth-icon-ok { background: var(--ok-soft); color: var(--ok); }

.input-lg { min-height: 48px; font-size: var(--text-lg); }
.otp-input { font-family: var(--font-mono); font-size: 1.75rem; letter-spacing: 0.35em; text-align: center;
  min-height: 58px; padding-left: calc(var(--s-3) + 0.35em); }
.otp-input::placeholder { letter-spacing: 0.35em; opacity: 0.35; }

.auth-details summary { cursor: pointer; color: var(--text-muted); font-size: var(--text-sm); padding: var(--s-1) 0; }
.auth-details summary:hover { color: var(--text); }
.auth-details[open] summary { margin-bottom: var(--s-3); }

.auth-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-5);
  counter-reset: auth-step; }
.auth-steps > li { position: relative; padding-left: 40px; display: flex; flex-direction: column; gap: var(--s-3); }
.auth-steps > li::before { counter-increment: auth-step; content: counter(auth-step); position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: var(--text-sm); background: var(--accent-soft); color: var(--accent); }

.qr-box { width: fit-content; padding: var(--s-3); background: var(--lec-creme); border-radius: var(--r);
  border: 1px solid var(--border); }
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.secret-key { display: block; font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: 0.06em;
  word-break: break-all; padding: var(--s-2) var(--s-3); background: var(--surface-2); border-radius: var(--r-sm);
  border: 1px dashed var(--border-strong); }

.recovery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2);
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recovery-grid li { font-family: var(--font-mono); text-align: center; padding: var(--s-2); border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border); letter-spacing: 0.06em; }
.dev-link { word-break: break-all; }

@media (max-width: 420px) {
  .recovery-grid { grid-template-columns: 1fr; }
  .auth-title { font-size: 1.7rem; }
  .auth-actions .btn { width: 100%; }
}

/* --- step-up window (built by app.js, LEC.stepUp) ---------------------------------------- */
.stepup-dialog { width: min(420px, calc(100vw - 2 * var(--s-4))); max-width: none; padding: var(--s-5);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-pop); }
.stepup-dialog::backdrop { background: rgba(23, 8, 17, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.stepup-dialog .page-title { font-size: var(--text-xl); }
.stepup-dialog .field-error:empty { display: none; }

/* --- security panel (Système page) ----------------------------------------------------- */
.auth-security .table td { vertical-align: middle; }
