/* ANGEL SECURE – interface du PC : même identité que l'appli iPhone (sombre, épurée). */
:root {
  color-scheme: dark;
  --bg: #0b1220; --card: #121a2b; --card-2: #172136; --line: #1f2a40; --line-2: #2a3754;
  --text: #f2f4f8; --muted: #8b96ab; --faint: #5d6880;
  --ok: #4ade80; --ok-bg: #12301f; --danger: #f87171; --danger-bg: #3a1618; --warn: #fbbf24; --warn-bg: #3a2a0a;
  --focus: #7dd3fc; --radius: 0;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; padding-bottom: env(safe-area-inset-bottom); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- marque ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand .wordmark { height: 40px; width: auto; display: block; }
.brand-name { font-weight: 700; letter-spacing: 0.12em; font-size: 14px; }
.brand-sub { font-size: 11px; letter-spacing: 0.2em; color: var(--faint); margin-top: 2px; }
.brand.big { justify-content: center; margin: 0 0 30px; } .brand.big .wordmark { height: 56px; }
.brand.big .brand-name { font-size: 18px; }
.lead { font-size: 22px; font-weight: 600; line-height: 1.25; margin: 0 0 18px; letter-spacing: -0.01em; }

/* ---------- en-tête et onglets ---------- */
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px;
  padding-top: max(14px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 2px; overflow-x: auto; padding: 0 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2; background: var(--bg); scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav button { background: none; color: var(--muted); border: 0; border-radius: 0; padding: 14px 12px 12px; min-height: 0;
  white-space: nowrap; font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; }
nav button:hover { color: var(--text); }
nav button.active { color: var(--text); border-bottom-color: var(--text); background: none; }
.tab { padding: 20px 24px 40px; max-width: 1080px; margin: 0 auto; }
@media (max-width: 600px) { header { padding: 12px 16px; } nav { padding: 0 8px; } .tab { padding: 16px; } }

/* ---------- blocs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 380px; margin: 14vh auto 0; padding: 32px 28px; }
h1, h2, h3 { margin: 0 0 12px; letter-spacing: -0.01em; } h3 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; } .error { color: var(--danger); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; margin: 12px 0; }

/* ---------- formulaires ---------- */
label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-size: 15px;
  border: 1px solid var(--line-2); border-radius: 0; background: var(--bg); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
textarea { min-height: 64px; margin: 12px 0; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 16px; padding: 4px 16px 8px; }
legend { font-weight: 600; font-size: 13px; padding: 0 6px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- boutons ---------- */
button { font: inherit; font-weight: 600; font-size: 14px; padding: 10px 16px; min-height: 42px; border-radius: 0; border: 0;
  background: var(--text); color: var(--bg); cursor: pointer; transition: opacity .15s, background .15s; }
button:hover { opacity: .9; } button:disabled { opacity: .35; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
button.ghost:hover { background: var(--card-2); opacity: 1; }
button.ok, button.danger { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
button.ok::before, button.danger::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 8px; vertical-align: 1px; }
button.ok::before { background: var(--ok); } button.danger::before { background: var(--danger); }
button.ok:hover { border-color: var(--ok); background: var(--ok-bg); opacity: 1; }
button.danger:hover { border-color: var(--danger); background: var(--danger-bg); opacity: 1; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.decision button { min-height: 48px; }

/* ---------- états ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--faint); }
.pill.good::before { background: var(--ok); } .pill.bad { color: var(--danger); } .pill.bad::before { background: var(--danger); }
.badge { color: var(--danger); font-size: 12px; font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--faint); }
.tag.nouveau { color: var(--text); } .tag.nouveau::before { background: var(--warn); }
.tag.ok::before { background: var(--ok); } .tag.suspect { color: var(--danger); } .tag.suspect::before { background: var(--danger); }
.banner { padding: 10px 24px; font-weight: 600; font-size: 14px; text-align: center; }
.banner.grace { background: var(--warn-bg); color: var(--warn); } .banner.expiree { background: var(--danger-bg); color: var(--danger); }

/* ---------- listes ---------- */
/* les lignes forment un seul tableau : bordure autour du groupe, fines séparations entre lignes */
#alert-list, #event-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
#alert-list:empty, #event-list:empty { display: none; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--card-2); }
#event-list .item { cursor: default; } #event-list .item:hover { background: none; }
.item .when { font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; } .item .why { color: var(--muted); font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* ---------- images ---------- */
video { width: 100%; border-radius: 0; background: #000; margin-top: 12px; display: block; }
.canvas-wrap { position: relative; width: 100%; }
canvas { width: 100%; border-radius: 0; touch-action: none; background: #000; display: block; }
.legend { list-style: none; padding: 0; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.legend li { margin: 6px 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; vertical-align: -1px; }
.zone-step h2 { font-size: 20px; margin: 4px 0 6px; } .zone-step p { margin: 0 0 6px; }
#login-form button[type="submit"] { width: 100%; margin-top: 8px; min-height: 46px; }
/* en-tête, onglets et contenu alignés sur la même colonne sur grand écran */
@media (min-width: 1129px) { header, nav { padding-left: calc((100vw - 1080px) / 2 + 24px); padding-right: calc((100vw - 1080px) / 2 + 24px); } }
.pill { white-space: nowrap; } @media (max-width: 600px) { .pill { font-size: 12px; } .brand .wordmark { height: 32px; } }
