/* Parcours de compte : modale de la page d'accueil et pages /inscription, /connexion. */
.auth {
  width: 100%;
  max-width: 372px;
  margin-inline: auto;
  text-align: center;
}
.auth-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--sage);
  color: var(--ink);
}
.auth-mark svg {
  width: 28px;
  height: 28px;
}
.auth-title {
  margin-top: 18px;
  font-size: 27px;
  font-weight: 490;
  line-height: 1.2;
  letter-spacing: -0.045em;
}
.auth-title:focus {
  outline: none;
}
.auth-sub {
  margin: 10px auto 0;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.auth-sub strong {
  font-weight: 560;
  color: var(--ink);
  word-break: break-word;
}
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin-top: 26px;
  padding: 10px 16px;
  border: 1px solid #d6dcd1;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.2s, border-color 0.2s;
}
.auth-google:hover {
  background: #f3f5f0;
  border-color: #c9d0c3;
}
.auth-google svg {
  width: 17px;
  height: 17px;
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: #8a9085;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-form {
  text-align: left;
}
.auth > .auth-form:first-of-type {
  margin-top: 24px;
}
.auth-or + .auth-form {
  margin-top: 0;
}
.field + .field {
  margin-top: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.field input,
.pw input {
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 10px 13px;
  border: 1px solid #ccd2c6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder {
  color: #9aa094;
}
.field input:focus,
.code input:focus {
  outline: none;
  border-color: #6f8565;
  box-shadow: 0 0 0 3px rgb(83 107 74 / 16%);
}
.field input[aria-invalid="true"] {
  border-color: #b35a48;
  box-shadow: 0 0 0 3px rgb(179 90 72 / 12%);
}
.pw {
  position: relative;
}
.pw input {
  padding-right: 44px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #7a8174;
}
.pw-toggle:hover {
  color: var(--ink);
  background: var(--sage);
}
.pw-toggle svg {
  width: 18px;
  height: 18px;
}
.pw-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #8a9085;
  transition: color 0.2s;
}
.pw-hint svg {
  width: 14px;
  height: 14px;
  opacity: 0.35;
  transition: opacity 0.2s;
}
.pw-hint.is-ok {
  color: #3f6b3a;
}
.pw-hint.is-ok svg {
  opacity: 1;
}
.link,
.auth-switch button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b9c0b3;
  text-underline-offset: 3px;
}
.link {
  font-size: 12px;
  color: var(--muted);
}
.link:hover,
.auth-switch button:hover {
  text-decoration-color: currentColor;
}
.auth-switch button:disabled {
  color: #9aa094;
  text-decoration: none;
  cursor: default;
}
.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbefeb;
  color: #8f3b2c;
  font-size: 13px;
  line-height: 1.5;
}
.auth-submit {
  position: relative;
  width: 100%;
  margin-top: 18px;
}
.auth-submit.is-busy span {
  opacity: 0;
}
.auth-submit.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
.auth > .auth-submit {
  margin-top: 26px;
}
.auth-legal {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #7a8174;
  text-align: center;
}
.auth-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-switch {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.auth-dot {
  margin-inline: 8px;
  color: #b5bbb0;
}
.auth-proto {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.6;
  color: #8a9085;
}
.code {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}
.code input {
  width: 100%;
  height: 52px;
  padding: 0;
  border: 1px solid #ccd2c6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 520;
  text-align: center;
  font-variant-numeric: tabular-nums;
  caret-color: #536b4a;
}

/* Modale de la page d'accueil */
.auth-dialog {
  width: min(452px, calc(100% - 32px));
  padding: 40px 36px 30px;
}

/* Pages /inscription et /connexion */
.auth-page {
  min-height: calc(100dvh - var(--header-height));
  display: grid;
  place-items: center;
  padding: 40px 0 72px;
}
.auth-card {
  width: min(452px, 100%);
  padding: 40px 36px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px -30px rgb(15 21 10 / 25%);
}
@media (max-width: 520px) {
  .auth-dialog,
  .auth-card {
    padding: 34px 22px 24px;
  }
  .auth-card {
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .code {
    gap: 6px;
  }
  .code input {
    height: 48px;
  }
}
