:root {
  color-scheme: light;
  --ink: #172f2c;
  --deep: #123b35;
  --green: #176b59;
  --lime: #d9ef72;
  --paper: #f5f4ec;
  --white: #fffefa;
  --muted: #66766f;
  --line: #e2e5dc;
  --danger: #a53b2d;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--paper); }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-pitch { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 88px); overflow: hidden; color: #f2f5e8; background: radial-gradient(circle at 85% 15%, rgba(217, 239, 114, .18), transparent 40%), var(--deep); }
.auth-brand { position: absolute; top: 32px; left: clamp(32px, 6vw, 88px); display: inline-flex; align-items: center; gap: 11px; color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -.05em; text-decoration: none; }
.auth-brand b { color: var(--lime); }
.auth-brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px 13px 13px 3px; color: var(--deep); background: var(--lime); font: 700 22px Georgia, serif; }
.auth-kicker { display: flex; align-items: center; gap: 10px; margin: 60px 0 18px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.auth-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(217, 239, 114, .18); }
.auth-pitch h1 { margin: 0 0 34px; font-size: clamp(40px, 5.4vw, 72px); line-height: .98; letter-spacing: -.06em; }
.auth-pitch h1 em { color: var(--lime); font-style: normal; }
.auth-points { display: grid; gap: 18px; max-width: 520px; margin: 0; padding: 0; list-style: none; }
.auth-points li { padding-left: 22px; border-left: 2px solid rgba(217, 239, 114, .5); }
.auth-points b { display: block; color: #fff; font-size: 17px; }
.auth-points span { color: #c4d2c8; font-size: 15px; }
.auth-small { margin: 40px 0 0; color: #9fb3a8; font-size: 13px; }

.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 5vw, 64px); }
.auth-card { width: 100%; max-width: 470px; margin: 0 auto; padding: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: 26px; background: var(--white); box-shadow: 0 18px 50px rgba(31, 61, 50, .08); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 26px; padding: 5px; border-radius: 999px; background: #edf0e6; }
.auth-tabs button { min-height: 44px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-weight: 750; cursor: pointer; }
.auth-tabs button[aria-pressed="true"] { color: var(--deep); background: var(--white); box-shadow: 0 2px 10px rgba(18, 59, 53, .1); }
.auth-card h2 { margin: 0 0 8px; color: var(--deep); font-size: 28px; letter-spacing: -.04em; }
.auth-note { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.auth-card form label { display: grid; gap: 7px; margin-top: 16px; color: var(--ink); font-size: 14px; font-weight: 700; }
.auth-card input:not([type="checkbox"]) { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid #cfd8cc; border-radius: 14px; color: var(--ink); background: #fff; font-weight: 400; }
.auth-card input:focus { outline: 3px solid rgba(23, 107, 89, .25); border-color: var(--green); }
.auth-card small { color: var(--muted); font-size: 12px; font-weight: 400; }
.auth-optional { color: var(--muted); font-weight: 400; }
.auth-card form label.auth-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.auth-check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--green); }
.auth-check a { color: var(--green); font-weight: 700; }
.auth-submit { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; border: 0; border-radius: 999px; color: var(--deep); background: var(--lime); font-weight: 800; cursor: pointer; }
.auth-submit:hover { filter: brightness(.97); }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-link { display: block; margin: 16px auto 0; border: 0; color: var(--green); background: none; font-weight: 700; cursor: pointer; }
.auth-message { min-height: 1.4em; margin: 16px 0 0; color: var(--green); font-size: 14px; font-weight: 600; }
.auth-message[data-state="error"] { color: var(--danger); }
.auth-message:empty { display: none; }
.auth-demo { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.auth-demo p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.auth-demo p b { margin-right: 6px; color: var(--deep); }
.auth-demo div { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-demo button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--deep); background: #f4f6ee; font-weight: 700; cursor: pointer; }
/* Un bouton par établissement fictif : le nom, puis le secteur, en grille régulière. */
.auth-demo div:has(small) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.auth-demo div:has(small) button { width: 100%; border-radius: 16px; text-align: left; }
.auth-demo button:has(small) { display: grid; align-content: center; gap: 1px; min-height: 52px; padding: 7px 16px; border-radius: 16px; text-align: left; }
.auth-demo button small { color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-footer { margin: 22px 0 0; text-align: center; font-size: 14px; }
.auth-footer a { color: var(--green); font-weight: 700; text-decoration: none; }

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-pitch { padding: 96px 20px 36px; }
  .auth-brand { top: 24px; left: 20px; }
  .auth-kicker { margin-top: 0; }
  .auth-points li:nth-child(n+2), .auth-small { display: none; }
  .auth-panel { padding: 24px 16px 40px; }
}
