html.auth-pending body {
  visibility: hidden;
}

/* Connexion — fond structuré, palette neutre */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(165deg, #dce3eb 0%, #e8ecf1 38%, #d4dce6 100%);
  overflow: hidden;
}

/* Calque décoratif : halos + grain + cercles filaires */
.auth-page__decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 55% at 15% 90%, rgba(100, 116, 139, 0.22), transparent 58%),
    radial-gradient(ellipse 75% 50% at 88% 8%, rgba(148, 163, 184, 0.28), transparent 52%),
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(241, 245, 249, 0.35), transparent 65%),
    radial-gradient(ellipse 100% 40% at 50% -5%, rgba(255, 255, 255, 0.75), transparent 48%);
}

.auth-page__decor::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: radial-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, black 10%, transparent 72%);
}

.auth-page__decor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(140vmin, 920px);
  height: min(140vmin, 920px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 0 48px rgba(15, 23, 42, 0.02),
    0 0 0 49px rgba(15, 23, 42, 0.035);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.08);
  padding: 0;
  overflow: hidden;
}

.auth-card__header {
  padding: 1.75rem 1.75rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.auth-card__title {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-card__subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #64748b;
  font-weight: 500;
}

.auth-card__body {
  padding: 1.5rem 1.75rem 1.25rem;
}

.auth-card__footer {
  margin: 0;
  padding: 0 1.75rem 1.35rem;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
}

.auth-card h1.auth-card__title {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
}

.auth-card .auth-sub {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  color: #64748b;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #334155;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9375rem;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:hover:not(:disabled) {
  border-color: #94a3b8;
}

.auth-field input:focus {
  outline: none;
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.auth-field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8fafc;
}

.auth-lockout {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #854d0e;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.auth-error {
  color: #b91c1c;
  font-size: 0.8125rem;
  margin: 0.65rem 0 0;
  min-height: 1.2em;
}

.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-submit:hover:not(:disabled) {
  background: #1e293b;
}

.auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar .nav-logout {
  font-size: 0.85rem;
  color: #ffd6a5;
  border-left: 3px solid transparent;
}

.sidebar .nav-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #ffd6a5;
}
