/* ════════════════════════════════
   AUTH — Login (Licorne Passion / Figma-inspired)
   Same minimal aesthetic as the nav + footer newsletter:
   Urbanist, monochrome, 1px borders, no glass.
════════════════════════════════ */

body.auth-page {
  background: #fff;
  color: #000;
  font-family: 'Urbanist', sans-serif;
}
body.auth-page .blob { display: none; }

main:has(.auth) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 64px;
}

.auth {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Heading ── */
.auth-title {
  font-family: 'Urbanist', sans-serif;
  font-weight: 300;
  font-size: 28px;
  line-height: 1.2;
  color: #000;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
}
.auth-subtitle {
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #6a7282;
  margin: 0 0 36px;
}

/* ── Form ── */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: left;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a7282;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d1d5dc;
  padding: 8px 0 10px;
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  outline: none;
  transition: border-color 0.18s;
}
.auth-input::placeholder {
  color: #99a1af;
  font-weight: 300;
}
.auth-input:focus { border-bottom-color: #000; }

.auth-input-wrap.has-eye .auth-input { padding-right: 28px; }

/* Eye toggle uses .pwd-toggle (FormAjax hook) */
.auth-form .pwd-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6a7282;
  cursor: pointer;
  transition: color 0.18s;
}
.auth-form .pwd-toggle:hover { color: #000; }
.auth-form .pwd-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; pointer-events: none; }
.auth-form .pwd-toggle .eye-off { display: none; }
.auth-form .pwd-toggle.visible .eye-on  { display: none; }
.auth-form .pwd-toggle.visible .eye-off { display: block; }

/* ── Remember + forgot ── */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.auth-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #d1d5dc;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
}
.auth-check input[type="checkbox"]:hover { border-color: #000; }
.auth-check input[type="checkbox"]:checked {
  background: #000;
  border-color: #000;
}
.auth-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.auth-check span {
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #4a5565;
}

.auth-link {
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.18s;
}
.auth-link:hover { opacity: 0.6; }

/* ── Submit ── */
.auth-submit {
  width: 100%;
  padding: 14px 16px;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.18s, transform 0.18s;
}
.auth-submit:hover { opacity: 0.85; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 28px 0 16px;
  color: #99a1af;
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── Google SSO ── */
.auth-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.auth-google:hover { background: #000; color: #fff; }
.auth-google svg { width: 16px; height: 16px; }

/* ── Footer link ── */
.auth-foot {
  margin-top: 32px;
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #6a7282;
  text-align: center;
}
.auth-foot a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-foot a:hover { opacity: 0.6; }

/* ── Inline form errors (registered by FormAjax) ── */
.auth-field .form-errors,
.auth-form .form-errors {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.auth-field .form-errors li,
.auth-form .form-errors li {
  font-size: 11px;
  color: #c4344f;
  margin-top: 2px;
}
.auth-field .input--error,
.auth-form .input--error { border-bottom-color: #c4344f !important; }
.auth-form [data-error]:empty { display: none; }

/* ── Register: errors box (form-level) ── */
.auth-errors {
  margin-bottom: 4px;
  padding: 10px 12px;
  background: #fff5f5;
  border: 1px solid #f3c0c8;
  border-radius: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  color: #c4344f;
}
.auth-errors ul { list-style: none; margin: 0; padding: 0; }
.auth-errors li + li { margin-top: 2px; }

/* ── Register: 2 columns ── */
.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Register: password strength bars ── */
.auth-strength {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.auth-strength-bar {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  transition: background 0.25s;
}
.auth-strength-bar.fill-weak,
.register-strength-bar.fill-weak { background: #c4344f; }
.auth-strength-bar.fill-medium,
.register-strength-bar.fill-medium { background: #6a7282; }
.auth-strength-bar.fill-strong,
.register-strength-bar.fill-strong { background: #000; }
.auth-strength-label {
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #6a7282;
  margin-top: 6px;
  text-align: right;
  letter-spacing: 0.02em;
}

/* ── Register: password rules ── */
.auth-pwd-rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
}
.auth-pwd-rules .pwd-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #6a7282;
  transition: color 0.18s;
}
.auth-pwd-rules .pwd-rule-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border: 1px solid #d1d5dc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.18s, background 0.18s;
}
.auth-pwd-rules .pwd-rule-icon::after {
  content: '';
  display: block;
  width: 4px;
  height: 6px;
  border-right: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: border-color 0.18s;
}
.auth-pwd-rules .pwd-rule.valid { color: #000; }
.auth-pwd-rules .pwd-rule.valid .pwd-rule-icon {
  background: #000;
  border-color: #000;
}
.auth-pwd-rules .pwd-rule.valid .pwd-rule-icon::after {
  border-right-color: #fff;
  border-bottom-color: #fff;
}

/* ── Register: refused chars hint ── */
.auth-pwd-refused {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  color: #4a5565;
}
.auth-pwd-refused svg { width: 12px; height: 12px; flex-shrink: 0; stroke: #4a5565; }
.auth-pwd-refused code {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 11px;
  background: #e5e7eb;
  padding: 1px 5px;
  letter-spacing: 0.05em;
}

/* ── Register: terms checkbox ── */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-top: 4px;
}
.auth-terms input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #d1d5dc;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
}
.auth-terms input[type="checkbox"]:hover { border-color: #000; }
.auth-terms input[type="checkbox"]:checked {
  background: #000;
  border-color: #000;
}
.auth-terms input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.auth-terms span {
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: #4a5565;
}
.auth-terms span a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-terms span a:hover { opacity: 0.6; }

/* ── Forgot password: success state ── */
.auth-success {
  margin: 4px 0 22px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-family: 'Urbanist', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: #000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.auth-success svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; stroke: #000; }
.auth-success strong { font-weight: 500; }

/* ── Submit element styled as link (e.g. "← Retour") ── */
.auth-submit--ghost {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}
.auth-submit--ghost:hover { background: #000; color: #fff; opacity: 1; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-row-2 { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  main:has(.auth) { padding: 80px 20px 48px; }
  .auth-card { max-width: 100%; }
  .auth-title { font-size: 24px; }
}
