/* Pages de connexion (servies avant la connexion) : panneau de marque à gauche, formulaire à droite */
:root {
  --bg: #f7f7f5; --bg-elevated: #fff; --text: #1a1a1a; --text-muted: #6b6b68; --border: #e6e4df;
  --accent: #2f7d61; --accent-soft: #e4f1eb; --danger: #c2413b;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111312; --bg-elevated: #191b1a; --text: #ecedeb; --text-muted: #9a9e9a; --border: #262a28; --accent: #3f9c78; --accent-soft: #17291f; --danger: #e0625b; }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased;
}
.hero {
  position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 0% 0%, #23523f 0%, #142a21 45%, #0c1511 100%); color: #eef3ef;
}
.hero::after {
  content: ""; position: absolute; inset: auto -20% -35% auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 191, 152, 0.22), transparent 65%);
}
.brand { font-size: 22px; font-weight: 750; letter-spacing: -0.035em; display: inline-flex; align-items: baseline; gap: 2px; }
.brand span { width: 7px; height: 7px; border-radius: 50%; background: #5cbf98; display: inline-block; }
.hero h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 14px; max-width: 15ch; position: relative; z-index: 1; }
.hero p { margin: 0; color: rgba(238, 243, 239, 0.7); font-size: 15px; line-height: 1.6; max-width: 40ch; position: relative; z-index: 1; }
.hero small { color: rgba(238, 243, 239, 0.45); font-size: 12px; position: relative; z-index: 1; }
main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; overflow-y: auto; }
form, .panel { width: 100%; max-width: 380px; }
.step { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
h1 { font-size: 24px; letter-spacing: -0.03em; margin: 0 0 6px; }
.lead { color: var(--text-muted); font-size: 14px; line-height: 1.55; margin: 0 0 24px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font: inherit; font-size: 15px; margin-bottom: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.code { font-size: 24px; font-weight: 600; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; padding: 14px; }
input.code::placeholder { color: var(--border); }
button, .button {
  display: block; width: 100%; padding: 12px; border-radius: 10px; border: none; background: var(--accent); text-align: center;
  color: white; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: filter 0.15s; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.6; cursor: default; }
.error { color: var(--danger); display: none; font-size: 13.5px; background: color-mix(in srgb, var(--danger) 10%, transparent); padding: 10px 12px; border-radius: 8px; margin: -8px 0 18px; }
.small { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; margin: 20px 0 0; }
a { color: var(--text-muted); }
.secure { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--text-muted); font-size: 12.5px; }
.secure svg { width: 15px; height: 15px; flex: none; }
ol.steps { padding-left: 20px; margin: 0 0 18px; font-size: 14px; line-height: 1.55; }
ol.steps li { margin-bottom: 10px; }
.qr { display: block; width: 180px; height: 180px; margin: 12px 0; border-radius: 10px; background: white; padding: 6px; border: 1px solid var(--border); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.recovery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 18px; }
.recovery code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: 0.05em; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; }
@media (max-width: 820px) {
  body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero { padding: 28px 24px 30px; gap: 22px; }
  .hero h2 { font-size: 26px; max-width: none; }
  .hero small { display: none; }
  main { align-items: flex-start; padding-top: 36px; }
}
