body.auth-compact [hidden] { display: none !important; }
.auth-resend-label { display: none; }
.auth-recovery .card:has(#confirm:not([hidden])) .auth-resend-label { display: inline; }
.auth-recovery .card:has(#confirm:not([hidden])) .auth-send-label { display: none; }

.auth-recovery { margin: 0; background: #edf2f8; color: #122741; font: 16px system-ui, sans-serif; }
.auth-recovery .intro { padding: 10px 14px; background: linear-gradient(110deg,#09172d,#123f64); }
.auth-recovery .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: .875rem; font-weight: 700; }
.auth-recovery .brand img { width: 108px; height: 36px; object-fit: contain; }
.auth-recovery .access { padding: 12px; }
.auth-recovery .card { max-width: 390px; margin: auto; padding: 16px; background: #fff; border: 1px solid #d8e4ef; border-radius: 14px; box-shadow: 0 8px 24px #12274112; }
.auth-recovery h1 { margin: 0 0 6px; font-size: 1.35rem; }
.auth-recovery p { margin: 0 0 12px; color: #435c76; font-size: .875rem; }
.auth-recovery form { display: grid; gap: 5px; margin: 0 0 10px; }
.auth-recovery label { font-size: .875rem; font-weight: 650; }
.auth-recovery input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid #cad9e8; border-radius: 9px; background: #f5f8fb; font: inherit; }
.auth-recovery button { min-height: 44px; margin-top: 4px; border: 0; border-radius: 9px; background: #a94400; color: #fff; font: 700 .875rem system-ui, sans-serif; }
.auth-recovery .back { display: inline-flex; align-items: center; min-height: 44px; color: #096581; font-size: .875rem; font-weight: 700; }
.auth-recovery #status:empty { margin: 0; }

.auth-compact #otpForm #resendOtp,
.auth-recovery .card:has(#confirm:not([hidden])) #request #send {
  display: inline-flex; align-items: center; justify-content: center;
  justify-self: start; width: auto; min-height: 44px; height: auto;
  margin: 4px 0 0; padding: 4px 8px; border: 0; border-radius: 8px;
  background: transparent; color: #096581; box-shadow: none; font-size: .875rem;
}
.auth-compact button:disabled { opacity: .55; }
.auth-compact :is(a, button, input):focus-visible { outline: 2px solid #096581; outline-offset: 2px; }

@media (max-width: 680px) {
  .auth-compact .layout { display: flex; flex-direction: column; min-height: 0; gap: 0; }
  .auth-compact .layout > .intro { min-height: 0; padding: 10px 14px; }
  .auth-compact .intro-content { display: none; }
  .auth-compact .layout .intro .brand { min-height: 38px; height: auto; margin: 0; gap: 10px; overflow: visible; font-size: .8rem; }
  .auth-compact .layout .intro .brand img { display: block; flex: none; width: 108px; height: 36px; max-height: none; object-fit: contain; object-position: center; }
  .auth-compact .layout > .access { display: block; min-height: 0; padding: 12px 12px 20px; }
  .auth-compact .layout .card { box-sizing: border-box; width: 100%; max-width: 420px; margin: auto; padding: 14px; border-radius: 14px; }
  .auth-compact .layout .card h2 { margin: 5px 0; font-size: 1.35rem; }
  .auth-compact .layout .security { margin: 0; font-size: .68rem; }
  .auth-compact .layout .subtitle { margin: 0 0 10px; font-size: .875rem; line-height: 1.35; }
  .auth-compact .layout .card label { display: block; margin: 0 0 3px; font-size: .82rem; }
  .auth-compact .layout .card input { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; min-height: 44px; margin: 0 0 7px; padding: 7px 10px; border-radius: 9px; font-size: 16px; }
  .auth-compact .layout .card button[type="submit"] { min-height: 44px; height: auto; padding: 7px 10px; border-radius: 9px; font-size: .875rem; }
  .auth-compact .layout .message:empty { display: none; }
  .auth-compact .layout .status { margin: 10px 0 0; padding-top: 8px; font-size: .75rem; }
  .auth-compact .layout .back { margin-top: 5px; font-size: .85rem; }
  .auth-compact .layout .legal { margin: 8px auto 0; text-align: center; font-size: .75rem; }
}
@media (min-width: 360px) and (max-width: 680px) {
  #signupForm .auth-name-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
}

/* Alignement du bouton et de sa flèche. */
body.auth-compact #loginSubmit {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; line-height: 1.2; text-align: center;
}
body.auth-compact #loginSubmit > span {
  position: static; margin: 0; transform: none; line-height: inherit;
}
body.auth-compact #loginForm a[href="/connexion/recuperation/"] {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: 36px; margin: 0 0 7px;
  padding: 5px 10px; border: 1px solid #f1b77e; border-radius: 8px;
  background: #ffead6; color: #8a3900; text-decoration: none;
}

@media (max-width: 680px) {
  body.auth-compact .layout { min-height: 100vh; min-height: 100dvh; }
  body.auth-compact .layout > .intro { flex: none; }
  body.auth-compact .layout > .access {
    flex: 1 0 auto; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    box-sizing: border-box; padding: 12px;
  }
  body.auth-compact .layout > .access > :is(.card, #authSignup, #authRecovery) {
    width: 100%; max-width: 380px; margin: 0;
  }
  body.auth-compact .layout #signupPanel { padding: 11px 12px; }
  body.auth-compact #signupPanel h2 { margin: 3px 0; font-size: 1.2rem; }
  body.auth-compact #signupPanel .subtitle { margin-bottom: 6px; }
  body.auth-compact #signupForm { gap: 0; }
  body.auth-compact #signupForm label { margin-bottom: 2px; line-height: 1.2; }
  body.auth-compact #signupForm input {
    height: 38px; min-height: 38px; margin-bottom: 5px; padding: 4px 8px;
  }
  body.auth-compact #signupPanel .status { margin-top: 6px; padding-top: 5px; }
  body.auth-compact #signupPanel .back { margin-top: 3px; line-height: 1.25; }
  .auth-name-row > div { min-width: 0; }
}
