/* ============================================================
   PAGINATIVE — Page Auth
   ============================================================ */

.auth-layout {
  min-height: calc(100dvh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(100px);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

/* ── Tabs ─────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  position: relative;
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 1.75rem;
  gap: 2px;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  border-radius: calc(var(--r-md) - 2px);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color var(--t-action) var(--ease-book);
}

.auth-tab.active {
  color: var(--text);
}

.auth-tab-indicator {
  position: absolute;
  height: calc(100% - 8px);
  top: 4px;
  background: var(--surface);
  border-radius: calc(var(--r-md) - 4px);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-action) var(--ease-settle);
  border: 1px solid var(--border);
}

/* ── Form ─────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 400;
}

.field-hint-inline {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 2px;
}

.field-hint-inline.available { color: var(--success); }
.field-hint-inline.taken     { color: var(--error); }

/* ── Password strength ────────────────────────────────── */
.password-strength {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 4px;
}

.pwd-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}

.pwd-fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-full);
  background: var(--accent);
  transition: width 0.4s var(--ease-reveal), background 0.3s;
}

.pwd-label {
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 60px;
  text-align: right;
}

/* ── Toggle (consent) ─────────────────────────────────── */
.consent-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
}

.consent-label {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  cursor: pointer;
}

.toggle-wrapper { flex-shrink: 0; padding-top: 2px; }

.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border-2);
  border-radius: var(--r-full);
  position: relative;
  transition: background var(--t-action) var(--ease-book);
  cursor: pointer;
}

.toggle-input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  position: absolute;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform var(--t-action) var(--ease-settle);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

.consent-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.consent-desc {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.5;
}

/* ── Misc ─────────────────────────────────────────────── */
.auth-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-3);
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 500;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover { opacity: 0.8; }

.auth-legal {
  text-align: center;
  font-size: 0.775rem;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}

.auth-legal a { color: var(--text-3); text-decoration: underline; }
.auth-legal a:hover { color: var(--accent); }

/* ── Boutons genre identitaire ───────────────────────────── */

.genre-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.genre-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  padding: 0.5rem 1.1rem;
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease;
}
.genre-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.genre-btn.active {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ── Étape 2FA ───────────────────────────────────────────── */

.totp-intro {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.totp-lock {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.625rem;
}

.totp-input {
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 600;
}
