/* Page de connexion : carte blanche sur fond clair, filet orange en haut —
   la même logique que le site de M. Bibite (blanc dominant, orange en accent). */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  background: var(--bg);
}

.login__box {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login__logo { margin-bottom: 26px; height: 88px; }

.login__card {
  width: 100%;
  padding: 30px 28px 26px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--orange);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.login__title {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.login__form { display: flex; flex-direction: column; gap: 16px; }
.login__step { display: flex; flex-direction: column; gap: 10px; }

/* Le « ‹ utilisateur » cliquable, au-dessus du champ de mot de passe */
.login__who {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px 3px 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-soft);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.login__who:hover { background: #ffe6d1; }
.login__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.login__error {
  margin: -4px 0 0;
  padding: 9px 12px;
  font-size: 14px;
  color: #8c1d1d;
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
}

.login__foot {
  width: 100%;
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.login__foot-help { display: block; color: #9a9a9a; }

.login__lang { margin-top: 22px; }

/* L'étape qui arrive glisse légèrement. */
@keyframes login-step-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.login__step:not(.hidden) { animation: login-step-in 160ms ease-out; }

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

@media (max-width: 520px) {
  .login__logo { height: 62px; margin-bottom: 20px; }
  .login__card { padding: 26px 20px 22px; }
}

@media (max-height: 620px) {
  .login { align-items: flex-start; }
  .login__logo { height: 54px; margin-bottom: 16px; }
}

/* Troisième étape : le code à usage unique */
.login__hint { margin: 0; font-size: 13px; color: var(--muted); }
.login__hint--dim { color: #9a9a9a; font-size: 12.5px; }
.login__code {
  font-size: 22px; font-weight: 600; text-align: center;
  letter-spacing: 0.18em; font-variant-numeric: tabular-nums;
}
