/* ==========================================================
   Connexion
   ========================================================== */
.login {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 12px; padding: 12px;
}
.login-hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background:
    radial-gradient(520px 380px at 85% 105%, rgba(201, 154, 63, .30), transparent 70%),
    linear-gradient(160deg, var(--card) 0%, var(--rail) 100%);
  border: 1px solid var(--line);
  padding: 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero .mark {
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold); box-shadow: 0 12px 30px rgba(201, 154, 63, .35);
}
.login-hero h1 { font-size: clamp(44px, 6vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin-top: 28px; }
.login-hero h1 em { font-style: normal; color: var(--gold); }
.login-hero p { margin-top: 18px; max-width: 34ch; color: var(--text-2); font-size: 17px; }
.hero-lines { position: absolute; right: -60px; bottom: -40px; width: 440px; height: 440px; color: var(--gold); opacity: .09; pointer-events: none; transform: rotate(-12deg); }
.hero-foot { display: flex; gap: 22px; color: var(--text-3); font-size: 13px; font-weight: 600; position: relative; }
.hero-foot span { display: inline-flex; align-items: center; gap: 8px; }

.login-panel {
  border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 28px 32px; min-width: 0;
}
.login-top { display: flex; justify-content: space-between; align-items: center; }
.login-top .brand-sm { display: none; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.login-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 440px; width: 100%; margin: 0 auto; padding: 16px 0; }
.step { animation: fade-up .38s var(--ease) both; }
.step h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.step .lead { color: var(--text-2); margin-top: 6px; margin-bottom: 24px; }

.role-list { display: flex; flex-direction: column; gap: 12px; }
.role {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  min-height: 84px; padding: 14px 18px; border-radius: 20px;
  background: var(--card-2); border: 1px solid var(--line);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), background var(--t-fast);
}
.role:hover { border-color: var(--gold-line); background: var(--card-3); }
.role:active { transform: scale(.985); }
.role .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); flex: none; }
.role b { display: block; font-size: 17px; font-weight: 800; }
.role small { color: var(--text-2); font-size: 13.5px; }
.role .go { margin-left: auto; color: var(--text-3); }

.back { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px 0 8px; margin-left: -8px; color: var(--text-2); font-weight: 600; border-radius: 14px; }
.back:hover { color: var(--text); }

.who-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who {
  display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px; text-align: left;
  border-radius: 18px; background: var(--card-2); border: 1px solid var(--line);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast);
}
.who:hover { border-color: var(--gold-line); }
.who:active { transform: scale(.97); }
.who b { font-size: 15px; display: block; line-height: 1.2; }
.who small { color: var(--text-3); font-size: 12px; }

.pin-who { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.pin-who b { font-size: 20px; font-weight: 800; display: block; line-height: 1.15; }
.pin-who span { color: var(--text-2); font-size: 13.5px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 26px 0 28px; }
.pin-dots.shake { animation: shake .5s both; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.pin-dot.on { background: var(--gold); border-color: var(--gold); transform: scale(1.12); }
.pin-dots.err .pin-dot { border-color: var(--danger); background: var(--danger); }
.login .keypad { max-width: 330px; margin: 0 auto; gap: 12px; }
.login .key { min-height: 68px; }

.demo { margin-top: 22px; font-size: 12.5px; color: var(--text-3); }
.demo summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 8px; font-weight: 600; list-style: none; }
.demo summary::-webkit-details-marker { display: none; }
.demo-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px dashed var(--line-2); }
.demo-grid b { color: var(--text-2); font-weight: 700; }
.demo-grid code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--gold-2); letter-spacing: .08em; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-top .brand-sm { display: inline-flex; }
  .login-panel { padding: 20px 20px; }
}
@media (max-height: 760px) {
  .login .key { min-height: 58px; }
  .pin-dots { margin: 18px 0 20px; }
}
