/* Pages mot de passe oublié / réinitialisation — DA « Lin & Ardoise » */

html {
  height: 100%;
}

@supports (min-height: 100dvh) {
  html {
    min-height: 100dvh;
  }
}

.authRecover-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.theme-lin-ardoise {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  font-family: var(--typo-body, "Manrope", system-ui, sans-serif);
  background-color: var(--da-base, #f1efe9);
  background-image: none;
  color: var(--theme-b-text);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1.25rem;
  line-height: 1.45;
  overflow-x: hidden;
}

.authRecoverCard {
  position: relative;
  background: color-mix(in srgb, var(--da-base-raised) 92%, transparent);
  border: 1px solid var(--da-line);
  padding: 2.25rem 2rem 2.5rem;
  width: 100%;
  max-width: 420px;
  border-radius: 28px;
  box-shadow: 0 12px 40px var(--da-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  animation: authRecoverFadeIn 0.4s ease;
  box-sizing: border-box;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.authRecoverCard:focus-within {
  border-color: color-mix(in srgb, var(--da-accent) 32%, var(--da-line));
  box-shadow:
    0 12px 40px var(--da-shadow),
    0 0 0 1px color-mix(in srgb, var(--da-accent) 14%, transparent);
}

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

.authRecoverCard__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme-b-text);
}

.authRecoverCard__lead {
  margin: 0;
  font-size: 0.95rem;
  color: var(--theme-b-text-muted);
  line-height: 1.5;
}

.authRecoverField {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--theme-b-border);
  padding: 0 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--theme-b-surface);
  color: var(--theme-b-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.authRecoverField::placeholder {
  color: var(--theme-b-text-muted);
  opacity: 0.85;
}

.authRecoverField:focus {
  outline: none;
  border-color: var(--da-accent);
  box-shadow: 0 0 0 3px var(--da-focus-ring);
}

.authRecoverField.input-error {
  border: 2px solid var(--theme-b-danger) !important;
  color: var(--theme-b-danger);
  background: color-mix(in srgb, var(--theme-b-danger) 6%, var(--theme-b-surface));
}

.authRecover-input-wrapper {
  position: relative;
  width: 100%;
}

.authRecover-input-wrapper .authRecoverField {
  padding-right: 2.75rem;
}

.authRecover-toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: var(--theme-b-text-muted);
  user-select: none;
}

#passwordCriteria {
  width: 100%;
  margin: 0;
}

#passwordCriteria ul {
  margin: 0;
  padding: 0;
  width: 100%;
}

#passwordCriteria li {
  color: var(--theme-b-text-muted);
  list-style: none;
  margin-bottom: 5px;
  position: relative;
  padding-left: 25px;
  font-size: 0.82rem;
}

#passwordCriteria li.valid::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--theme-b-strength-4);
  font-weight: 700;
}

#passwordCriteria li.invalid {
  color: var(--theme-b-text-muted);
}

#passwordCriteria li.invalid.show-error {
  color: var(--theme-b-danger);
}

.message {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--theme-b-text-muted);
  text-align: center;
  width: 100%;
}

.message.success {
  color: var(--da-accent);
  font-weight: 600;
}

.message.error {
  color: var(--theme-b-danger);
  font-weight: 600;
}

.message.info {
  color: var(--theme-b-text-muted);
  font-style: italic;
}

.authRecoverBtn {
  align-self: center;
  width: auto;
  max-width: min(100%, 280px);
  padding-inline: 1.75rem;
  min-height: 48px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.authRecoverBtn--primary {
  border: none;
  background: var(--da-accent);
  color: var(--da-accent-ink);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--da-accent) 38%, transparent);
}

.authRecoverBtn--primary:hover:not(:disabled) {
  background: var(--da-accent-hover);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--da-accent) 44%, transparent);
}

.authRecoverBtn:focus-visible {
  outline: 2px solid var(--da-accent);
  outline-offset: 3px;
}

.authRecoverBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.authRecoverBackLink {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--theme-b-text-muted);
  max-width: 420px;
}

.authRecoverBackLink a {
  font-weight: 600;
  color: var(--theme-b-action);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.authRecoverBackLink a:hover {
  color: var(--theme-b-action-hover);
}

.authRecoverBackLink a:focus-visible {
  outline: 2px solid var(--da-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .authRecoverCard {
    animation: none;
  }
}

@media (max-width: 480px) {
  body.theme-lin-ardoise {
    align-items: center;
    justify-content: flex-start;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .authRecoverCard {
    padding: 1.5rem 1.15rem 1.75rem;
    border-radius: 22px;
    max-width: none;
  }

  .authRecoverCard__title {
    font-size: 1.45rem;
  }
}
