/* PTV SRT Server — feuille de style reprise de PTV Show Director (mêmes couleurs, mêmes polices),
   puis les éléments propres aux canaux SRT en fin de fichier. */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow/files/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow/files/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow/files/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-semi-condensed/files/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-semi-condensed/files/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-semi-condensed/files/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #1a1b1e;
  --surface: #222428;
  --surface-2: #2a2c31;
  --line: #34373d;
  --line-strong: #464a52;
  --text: #ece8e1;
  --muted: #9b978f;
  --faint: #6f6c66;
  --pgm: #e0342c;
  --pgm-tint: rgba(224, 52, 44, 0.12);
  --pvw: #2fb35a;
  --pvw-tint: rgba(47, 179, 90, 0.1);
  --amber: #f0a10a;
  --amber-tint: rgba(240, 161, 10, 0.12);
  --hab: #7aa2d6;
  --hab-tint: rgba(122, 162, 214, 0.1);
  --radius: 6px;
  --cond: 'Barlow Semi Condensed', 'Arial Narrow', system-ui, sans-serif;
  --sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--sans);
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--hab); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-family: var(--cond); font-variant-numeric: tabular-nums; }

/* ---------- Barre du haut ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 0 16px; min-height: 52px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-family: var(--cond); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand b { color: var(--pgm); font-weight: 700; }
.rundown-name { flex: 1; min-width: 160px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 2px; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: var(--radius); font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current='page'] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); border-radius: 0; }
.lamps { display: flex; gap: 12px; }
.lamp { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.lamp::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.lamp.ok::before { background: var(--pvw); box-shadow: 0 0 6px var(--pvw); }
.lamp.ko { color: var(--pgm); }
.lamp.ko::before { background: var(--pgm); box-shadow: 0 0 6px var(--pgm); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #fff; }
.btn.danger { color: #ff8a84; }
.btn.danger:hover:not(:disabled) { border-color: var(--pgm); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover:not(:disabled) { color: var(--text); border-color: var(--line); }
.btn.small { padding: 4px 8px; font-size: 0.85rem; }
.btn.icon { width: 32px; padding: 6px 0; }


/* ---------- Panneaux (habillage, journal, inputs) ---------- */
.panel { border-top: 1px solid var(--line); padding-top: 12px; }
.panel h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.panel summary { cursor: pointer; font-weight: 600; list-style: none; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: '+'; float: right; color: var(--muted); }

/* ---------- Notifications ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 50;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-left: 4px solid var(--pgm);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 500; max-width: min(90vw, 560px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-left-color: var(--pvw); }
.toast.warn { border-left-color: var(--amber); }

/* ---------- Champs de formulaire (éditeur, rundowns) ---------- */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.field.grow { flex: 1; min-width: 220px; }
.field.small input { width: 92px; }
.field input, .field select, .field textarea, .input {
  background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 9px; font-size: 0.95rem; min-width: 0;
}
.field input:disabled { opacity: 0.55; }
.field textarea { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; width: 100%; }
.field .unit { color: var(--faint); font-size: 0.8rem; }
.field.bad select, .field.bad input { border-color: var(--pgm); color: #ff8a84; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--text); padding: 6px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--pvw); }
.hint { font-size: 0.85rem; color: var(--faint); }
.segment { display: inline-flex; align-self: flex-start; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg-btn { position: relative; cursor: pointer; }
.seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn span { display: block; padding: 7px 12px; font-size: 0.92rem; color: var(--muted); background: var(--bg); border-right: 1px solid var(--line-strong); user-select: none; white-space: nowrap; }
.seg-btn:last-child span { border-right: 0; }
.seg-btn input:checked + span { background: var(--text); color: var(--bg); font-weight: 600; }
.seg-btn input:focus-visible + span { outline: 2px solid var(--hab); outline-offset: -2px; }

/* ---------- Éditeur ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 20px 20px 80px; }

.dirty { font-size: 0.85rem; color: var(--faint); }
.dirty.on { color: var(--amber); font-weight: 600; }

.page-title { margin: 0; font-family: var(--cond); font-size: 1.5rem; flex: 1; }
.set-intro { margin: 18px 0 8px; max-width: 78ch; }
.set-intro p { margin: 0 0 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.set-tabs { display: flex; gap: 22px; flex: 1; }
.set-tabs button { background: none; border: 0; padding: 4px 0; font-family: var(--cond); font-weight: 600; font-size: 1.45rem; color: var(--faint); border-bottom: 2px solid transparent; }
.set-tabs button:hover { color: var(--muted); }
.set-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }

/* ---------- Comptes : connexion, menu du compte ---------- */
body:not([data-role="admin"]) .admin-only { display: none !important; }
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); }
.auth-brand { font-size: 1.6rem; margin-bottom: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.auth-form h1, .auth-form h2 { margin: 0; font-family: var(--cond); font-size: 1.5rem; }
.auth-form .field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.9rem; }
.auth-form .field input { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; font-size: 1rem; }
.auth-form .field input:focus { outline: 2px solid var(--hab); outline-offset: 0; }
.auth-form .check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.auth-submit { min-height: 44px; font-size: 1rem; }
.auth-error { margin: 0; color: #ff8a80; min-height: 1.2em; font-size: 0.9rem; }
.auth-error:empty { min-height: 0; }
.auth-login { margin: -4px 0 0; color: var(--muted); font-size: 0.9rem; min-height: 1.2em; }
.auth-id { font-family: var(--cond); font-size: 1.1rem; color: var(--text); }
.auth-switch { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.auth-switch a, .auth-notice a { color: var(--hab); }
.auth-notice { margin: 0; padding: 10px 12px; border-radius: var(--radius); background: rgba(240, 161, 10, 0.08); border: 1px solid rgba(240, 161, 10, 0.4); color: #f6cf86; font-size: 0.9rem; }
.me { position: relative; }
.me-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); }
.me-btn:hover { border-color: var(--muted); }
.me-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--cond); font-weight: 700; text-transform: uppercase; }
.me-login { font-size: 0.88rem; }
.me-dot { position: absolute; top: 2px; left: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); border: 2px solid var(--bg); }
.me-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8); }
.me-menu[hidden] { display: none; }
.me-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-who span { color: var(--muted); font-size: 0.85rem; }
.me-menu button, .me-menu a { text-align: left; padding: 9px 10px; border-radius: 6px; background: none; border: 0; color: var(--text); font: inherit; text-decoration: none; }
.me-menu button:hover, .me-menu a:hover { background: var(--surface-2); }
.pw-dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: min(420px, calc(100vw - 32px)); }
.pw-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.pw-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (pointer: coarse) { .me-btn { min-height: 40px; } }

/* Réglages : comptes */
.acc-section { margin: 18px 0 26px; }
.acc-section h2 { margin: 0 0 4px; font-family: var(--cond); font-size: 1.2rem; }
.acc-section > .hint { margin: 0 0 10px; }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 170px 110px 110px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 6px; }
.acc-row.pending { grid-template-columns: minmax(0, 1fr) 150px auto auto; border-color: rgba(240, 161, 10, 0.45); }
.acc-row.key { grid-template-columns: minmax(0, 1fr) auto; }
.acc-row.off { opacity: 0.6; }
.acc-who { display: flex; flex-direction: column; min-width: 0; }
.acc-who b { font-family: var(--cond); font-size: 1.05rem; }
.acc-who span { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; }
.acc-row select { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 8px; }

/* =====================================================================
   PTV SRT Server : canaux SRT
   ===================================================================== */
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.88rem; }
.topbar .summary { flex: 1; min-width: 160px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .summary b { color: var(--pvw); font-weight: 600; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 52px; z-index: 9; margin: -20px -20px 0; padding: 14px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-family: var(--cond); font-size: 1.6rem; font-weight: 700; }
.page-head .search { flex: 1; min-width: 180px; max-width: 340px; margin-left: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 10px; }
.page-head .spacer { flex: 1; }
.btn.go { background: var(--pvw); border-color: var(--pvw); color: #08140c; font-weight: 600; }
.btn.go:hover:not(:disabled) { background: #3cc768; }

/* Groupes et lignes de canaux */
.grp { margin-top: 22px; }
.grp-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.grp-head h2 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.02em; }
.grp-head .hint { flex: 1; }
.grp-head .count { font-family: var(--cond); color: var(--muted); }
.grp-empty { color: var(--faint); font-size: 0.9rem; padding: 10px 2px; }
.ch { position: relative; display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(0, 1.6fr) minmax(0, 0.9fr) auto; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 6px; }
.ch::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--line-strong); }
.ch.live::before { background: var(--pvw); box-shadow: 0 0 8px rgba(47, 179, 90, 0.6); }
.ch.live { background: linear-gradient(90deg, var(--pvw-tint), var(--surface) 40%); }
.ch.warn::before { background: var(--amber); }
.ch-name { min-width: 0; display: flex; flex-direction: column; }
.ch-name b { font-family: var(--cond); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-name span { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-src, .ch-rd { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; }
.ch-src .l2, .ch-rd .l2 { color: var(--muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-family: var(--cond); font-weight: 700; font-size: 0.85rem; padding: 1px 7px; border-radius: 3px; letter-spacing: 0.03em; background: var(--surface-2); color: var(--faint); }
.tag.on { background: var(--pvw); color: #08140c; }
.tag.warn { background: var(--amber); color: #1a1b1e; }
.tag.rd { background: var(--hab-tint); color: #cfe0f6; border: 1px solid rgba(122, 162, 214, 0.45); }
.tag .num { font-weight: 700; }
.ch-acts { display: flex; align-items: center; gap: 6px; }
@media (max-width: 900px) {
  .ch { grid-template-columns: minmax(0, 1fr) auto; }
  .ch-name { grid-column: 1; }
  .ch-acts { grid-column: 2; grid-row: 1; }
  .ch-src, .ch-rd { grid-column: 1 / -1; }
}

/* Menu « ⋮ » */
.menu { position: relative; }
.kebab { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.kebab:hover, .kebab[aria-expanded="true"] { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); }
.kebab-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 260px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8); }
.kebab-menu[hidden] { display: none; }
.kebab-menu button { text-align: left; padding: 9px 10px; border-radius: 6px; background: none; border: 0; color: var(--text); font: inherit; }
.kebab-menu button:hover, .kebab-menu button:focus-visible { background: var(--surface-2); outline: none; }
.kebab-menu button.danger { color: #ff8a84; }
.kebab-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
@media (pointer: coarse) {
  .kebab { width: 40px; height: 40px; }
  .kebab-menu button { padding: 12px; }
  .btn { min-height: 40px; }
  .nav a { padding-top: 10px; padding-bottom: 10px; }
  .check input { width: 20px; height: 20px; }
}

/* Fenêtres (création, accès, confirmation) */
dialog.dlg { border: 0; padding: 0; background: transparent; color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog.dlg.wide { width: min(980px, calc(100vw - 24px)); }
dialog.dlg::backdrop { background: rgba(0, 0, 0, 0.65); }
.dlg-card { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.dlg-card h2 { margin: 0; font-family: var(--cond); font-size: 1.5rem; }
.dlg-card h2 .sub { display: block; font-family: var(--sans); font-size: 0.9rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.dlg-card p { margin: 0; }
.dlg-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-foot .spacer { flex: 1; }
.dlg-error { color: #ff8a80; font-size: 0.9rem; min-height: 1.2em; margin: 0; }
.dlg-error:empty { min-height: 0; }
.warnbox { padding: 10px 12px; border-radius: var(--radius); background: var(--amber-tint); border: 1px solid rgba(240, 161, 10, 0.45); color: #f6cf86; font-size: 0.92rem; }
.dangerbox { padding: 10px 12px; border-radius: var(--radius); background: var(--pgm-tint); border: 1px solid rgba(224, 52, 44, 0.5); color: #ffb3ae; font-size: 0.92rem; }

/* Création : choix du préfixe */
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; }
.pick label:hover { border-color: var(--line-strong); }
.pick input { accent-color: var(--pvw); width: 16px; height: 16px; }
.pick label:has(input:checked) { border-color: var(--pvw); background: var(--pvw-tint); }
.pick b { font-family: var(--cond); font-size: 1.05rem; }
.pick span { display: block; color: var(--muted); font-size: 0.85rem; }
.new-name { font-family: var(--cond); font-size: 1.35rem; font-weight: 700; color: var(--pvw); }

/* Accès d'un canal */
.acc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .acc-cols { grid-template-columns: 1fr; } }
.acc-col { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.acc-col h3 { margin: 0; font-family: var(--cond); font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.acc-col h3 .tag { font-size: 0.8rem; }
.acc-col > .hint { margin: -4px 0 0; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.kv dt { color: var(--muted); font-size: 0.85rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv dd.mono { color: var(--text); }
.copy { padding: 3px 8px; font-size: 0.8rem; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); }
.copy:hover { color: var(--text); border-color: var(--muted); }
.copy.done { color: var(--pvw); border-color: var(--pvw); }
.urlbox { display: flex; gap: 8px; align-items: flex-start; }
.urlbox code { flex: 1; min-width: 0; padding: 7px 9px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.qr { display: flex; gap: 14px; align-items: center; }
.qr img { width: auto; height: auto; max-width: 240px; image-rendering: pixelated; background: #fff; border-radius: 6px; padding: 6px; flex-shrink: 0; }
.qr p { color: var(--muted); font-size: 0.88rem; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sep-title { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Connexion : double authentification */
.otp-input { font-family: var(--cond); font-size: 2rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-qr { display: flex; justify-content: center; }
.auth-qr img { width: 200px; height: 200px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.secret { text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.95rem; letter-spacing: 0.08em; padding: 8px; border-radius: var(--radius); background: var(--bg); border: 1px dashed var(--line-strong); overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.92rem; display: flex; flex-direction: column; gap: 4px; }
.steps b { color: var(--text); }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line-strong); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; text-align: center; }
.auth-link { background: none; border: 0; padding: 0; color: var(--hab); font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; align-self: flex-start; }

/* Réglages */
.set-tabs { margin: 0; }
.pfx-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-width: 820px; }
.pfx-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pfx-row input { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 9px; min-width: 0; width: 100%; }
.pfx-row input.code { font-family: var(--cond); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; }
.set-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0; }
.acc-new { display: grid; grid-template-columns: 1fr 1fr 170px; gap: 10px; max-width: 820px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 12px; }
.acc-new .full { grid-column: 1 / -1; }
.acc-new .pwline { display: flex; gap: 8px; }
.acc-new .pwline input { flex: 1; }
.acc-new .field select { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 9px; }
@media (max-width: 760px) { .acc-new { grid-template-columns: 1fr; } }
.acc-row.u { grid-template-columns: minmax(0, 1fr) 160px 170px auto; }
.acc-2fa { font-size: 0.85rem; color: var(--muted); }
.acc-2fa.ok { color: var(--pvw); }
.acc-2fa.todo { color: var(--amber); }
@media (max-width: 860px) { .acc-row.u { grid-template-columns: 1fr 1fr; } }
.jr { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.jr th { text-align: left; color: var(--faint); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 104px; background: var(--bg); }
.jr td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.jr td.t { font-family: var(--cond); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jr td.who { font-family: var(--cond); font-weight: 600; white-space: nowrap; }
.jr td.ip { color: var(--faint); white-space: nowrap; }
.jr tr.bad td.act { color: #ff8a84; }
.empty-state { margin: 40px auto; max-width: 520px; text-align: center; color: var(--muted); }
.empty-state h2 { font-family: var(--cond); color: var(--text); margin: 0 0 6px; }
.foot-note { margin-top: 30px; color: var(--faint); font-size: 0.8rem; }
.dlg-card form { display: flex; flex-direction: column; gap: 12px; }
.dlg-card .field input { padding: 9px 11px; font-size: 1rem; }
.acc-new .pwline input { background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 9px; }
.acc-new p { margin: 0; }
@media (max-width: 700px) {
  .page-head { position: static; }
  .page-head .search { margin-left: 0; max-width: none; order: 3; flex-basis: 100%; }
  .topbar .lamps { display: none; }
  .qr { flex-direction: column; align-items: flex-start; }
}
