/* Authentification lecteur inspirée du formulaire de création fourni. */
.reader-auth-page {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-height: calc(100vh - 7rem);
  min-height: calc(100dvh - 7rem);
  place-items: center;
  overflow: hidden;
  padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
  background-color: rgb(0 0 128 / 8%);
  background-image:
    radial-gradient(at 0% 0%, rgb(0 0 128 / 8%) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgb(0 0 128 / 5%) 0, transparent 50%);
}

.reader-auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 26.25rem);
  margin-inline: auto;
}

.reader-auth-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2.25rem;
  background: #fff;
  box-shadow: 0 20px 40px -15px rgb(50 70 90 / 25%), 0 0 15px rgb(0 0 0 / 5%);
}

.reader-auth-hero {
  position: relative;
  display: grid;
  height: 156px;
  min-height: 0;
  flex: 0 0 156px;
  overflow: hidden;
  place-items: center;
  padding: .5rem 1.5rem 0;
  background: #000080;
  color: #fff;
}

.reader-auth-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 13.75rem;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

.reader-auth-hero__shape {
  position: absolute;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}

.reader-auth-hero__shape--blue-accent {
  top: 16px;
  left: -32px;
  width: 126px;
  height: 126px;
  background: linear-gradient(135deg, #7188e8, #4058c7);
  opacity: .9;
}

.reader-auth-hero__shape--blue-soft {
  right: -30px;
  bottom: -36px;
  width: 128px;
  height: 128px;
  background: linear-gradient(135deg, #9bb6f0, #6284dc);
  opacity: .78;
}

.reader-auth-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: -1.5rem;
  padding: 1.45rem 1.5rem;
  border-radius: 2rem 2rem 0 0;
  background: #fff;
}

.reader-auth-description {
  margin: 0 0 .75rem;
  color: #707070;
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}

.reader-auth-form,
.reader-auth-fields {
  display: grid;
  min-width: 0;
  gap: .75rem;
}

.reader-auth-field-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .65rem;
}

.reader-auth-field {
  display: grid;
  min-width: 0;
  gap: .35rem;
}

.reader-auth-field--half { min-width: 0; }
.reader-auth-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }

.reader-auth-control {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 3.05rem;
  align-items: center;
  overflow: hidden;
  border-radius: .9rem;
  background: #f3f3f3;
  transition: outline-color .15s ease;
}

.reader-auth-control:focus-within {
  outline: 2px solid #000080;
  outline-offset: 1px;
}

.reader-auth-control.is-invalid { outline: 2px solid #b42318; outline-offset: 1px; }

.reader-auth-control input {
  width: 100%;
  min-width: 0;
  min-height: 3.05rem;
  padding: .7rem .9rem;
  border: 0 !important;
  border-radius: .9rem !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #202020;
  font: inherit;
  font-size: .94rem;
}

.reader-auth-control input::placeholder { color: #898989; opacity: 1; }
.reader-auth-control input:focus {
  border: 0 !important;
  outline: 0 !important;
  background: #ebebeb !important;
  box-shadow: none !important;
}

.reader-auth-control--password {
  gap: .5rem;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.reader-auth-control--password input {
  flex: 1;
  padding-right: 1rem;
  background: #f3f3f3 !important;
}

.reader-auth-password-toggle {
  position: static;
  display: grid;
  width: 3rem;
  min-height: 3.05rem;
  flex: 0 0 3rem;
  place-items: center;
  border: 0;
  border-radius: 1rem;
  background: #f3f3f3;
  color: #6e6e6e;
  cursor: pointer;
}

.reader-auth-password-toggle:hover { background: #ebebeb; }
.reader-auth-password-toggle svg { width: 1.05rem; height: 1.05rem; }

.reader-auth-field__error {
  margin: 0 .65rem;
  color: #a61b1b;
  font-size: .73rem;
  font-weight: 600;
  line-height: 1.45;
}

.reader-auth-error {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .75rem .9rem;
  border-radius: .9rem;
  background: #fff0ef;
  color: #9f2420;
}

.reader-auth-error svg { width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; margin-top: .06rem; }
.reader-auth-error p { margin: 0; font-size: .79rem; font-weight: 600; line-height: 1.45; }

.reader-auth-submit {
  display: flex;
  width: 100%;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  margin-top: .2rem;
  padding: .7rem .95rem;
  border: 0;
  border-radius: 999px;
  background: #000080;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.reader-auth-submit:hover { background: #15156d; }
.reader-auth-submit:active { transform: scale(.98); }

.reader-auth-legal {
  margin: .75rem .1rem 0;
  color: #757575;
  font-size: .72rem;
  line-height: 1.45;
  text-align: center;
}

.reader-auth-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem;
  margin: .75rem 0 0;
  color: #171717;
  font-size: .82rem;
  line-height: 1.5;
  text-align: center;
}

.reader-auth-switch a,
.reader-auth-back {
  color: #222;
  text-decoration: underline;
  text-decoration-color: #777;
  text-underline-offset: .15em;
}

.reader-auth-switch a { font-weight: 600; }
.reader-auth-back { display: block; width: fit-content; margin: .75rem auto 0; font-size: .75rem; }
.reader-auth-switch a:hover, .reader-auth-back:hover { color: #000; text-decoration-color: currentColor; }

.reader-auth-password-toggle:focus-visible,
.reader-auth-submit:focus-visible,
.reader-auth-switch a:focus-visible,
.reader-auth-back:focus-visible {
  outline: 3px solid #526b7a;
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .reader-auth-page { min-height: calc(100dvh - 8rem); padding-block: 1.5rem calc(5.5rem + env(safe-area-inset-bottom)); }
  .reader-auth-hero { height: 176px; flex-basis: 176px; }
  .reader-auth-hero h1 { max-width: 15rem; font-size: 2rem; }
  .reader-auth-panel { padding: 1.5rem; }
  .reader-auth-description { font-size: .82rem; }
  .reader-auth-form, .reader-auth-fields { gap: .8rem; }
  .reader-auth-control, .reader-auth-control input, .reader-auth-password-toggle { min-height: 3.15rem; }
  .reader-auth-submit { min-height: 3.4rem; }
}

@media (max-width: 360px) {
  .reader-auth-page { padding-inline: .7rem; }
  .reader-auth-panel { padding-inline: 1.05rem; }
  .reader-auth-field-row { gap: .45rem; }
  .reader-auth-control input { padding-inline: .7rem; font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reader-auth-control, .reader-auth-submit { transition: none; }
}
