/* Connexion + administration des comptes — reprend les couleurs du site */
:root {
  --paper: #f3f4f6; --surface: #fff; --ink: #0d1424; --ink-2: #485164; --ink-3: #8a92a2;
  --line: #e3e6eb; --line-2: #edf0f3; --ember: #ff4f1a;
  --alert: #c81e1e; --alert-bg: #fde6e6; --ok: #0f8a4a; --ok-bg: #e2f5ea; --warn: #b45309; --warn-bg: #fdf0db;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body.auth-page { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; }
body.auth-page::before { content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(520px 340px at 18% 120px, rgba(255,79,26,.13), transparent 70%); }
.auth-page a { color: inherit; }
.auth-page button { font: inherit; }
.auth-page :focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 8px; }

.login { width: 100%; max-width: 420px; margin: 0 auto; padding: max(56px, 9vh) 16px 40px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 650; letter-spacing: -0.02em; }
.login-brand img { width: 34px; height: 34px; }
.login h1 { margin: 0 0 6px; font-size: 40px; line-height: 1; letter-spacing: -0.05em; font-weight: 700; }
.login h1 .dot { display: inline-block; width: .2em; height: .2em; margin-left: .05em; border-radius: 50%; background: var(--ember); box-shadow: 0 0 18px rgba(255,79,26,.55); }
.login .lead { margin: 0 0 24px; color: var(--ink-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 1px 2px rgba(13,20,36,.03), 0 18px 40px -26px rgba(13,20,36,.25); }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--paper); border-radius: 999px; }
.tabs button { flex: 1; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(13,20,36,.12); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13.5px; font-weight: 550; }
.field small { font-weight: 400; color: var(--ink-3); }
.field input, .field select { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); width: 100%; }
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(13,20,36,.06); }
.form-err { color: var(--alert); font-size: 13.5px; margin: 0 0 12px; }
.form-ok { color: var(--ok); font-size: 13.5px; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #222c44; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn.danger { color: var(--alert); }
.btn.danger:hover { background: var(--alert-bg); border-color: var(--alert-bg); }
.btn:disabled { opacity: .6; cursor: progress; }
.note { margin: 18px 4px 0; font-size: 13px; color: var(--ink-3); }

/* ---------- administration ---------- */
.admin { max-width: 1040px; margin: 0 auto; padding: 18px 16px 80px; }
.admin-top { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.admin-top .login-brand { margin: 0; }
.admin-top .btn:first-of-type { margin-left: auto; }
.admin h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); line-height: 1; letter-spacing: -0.05em; }
.admin .lead { margin: 0 0 22px; color: var(--ink-2); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.stat { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.stat strong { color: var(--ink); }
.users { display: flex; flex-direction: column; gap: 10px; }
.user { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.user { position: relative; }
.user:has(details[open]) { z-index: 5; }
.user.off > div:not(.user-actions) { opacity: .6; }
.user-name { letter-spacing: -0.015em; }
.user-name strong { font-weight: 650; margin-right: 4px; }
.user-name .tag { margin: 0 4px 0 0; vertical-align: 1px; }
.user-mail { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { font-size: 13px; color: var(--ink-3); }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.user-actions .btn { padding: 6px 11px; font-size: 13px; }
.more { position: relative; }
.more summary { list-style: none; padding: 6px 11px; font-size: 13px; letter-spacing: 1px; }
.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(13,20,36,.35); }
.more-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 14px var(--font); cursor: pointer; }
.more-menu button:hover { background: var(--paper); }
.more-menu button.danger { color: var(--alert); }
.tag { display: inline-block; white-space: nowrap; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--ink-2); }
.tag.admin { background: #fff0ea; color: #c2410c; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.off { background: var(--alert-bg); color: var(--alert); }
.add-user { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 22px; padding: 16px; border: 1.5px dashed #c9ced7; border-radius: 16px; }
.add-user .field { margin: 0; flex: 1 1 200px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 550; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) {
  .user { grid-template-columns: 1fr; }
  .user-actions { justify-content: flex-start; }
  .more { position: static; }
  .more-menu { left: 12px; right: 12px; min-width: 0; }
}

