/* CityAI · portail — feuille de style commune (reprise de l'application locale) */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f1f0ec;
  --surface-3: #e8e7e2;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 4px 16px rgba(11, 11, 11, 0.04);
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --in: #2a78d6;
  --out: #eb6834;
  --occ: #1baf7a;
  --person: #1baf7a;
  --bicycle: #eda100;
  --vehicle: #e87ba4;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --critical: #d03b3b;
  --heat: 42, 120, 214;
  --load: #6250d6;
  --cpu: #e87ba4;
  --gpu: #008300;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --surface-3: #2c2c2a;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: none;
    --accent: #3987e5;
    --in: #3987e5;
    --out: #d95926;
    --occ: #199e70;
    --person: #199e70;
    --bicycle: #c98500;
    --vehicle: #d55181;
    --good-text: #0ca30c;
    --heat: 57, 135, 229;
    --load: #9085e9;
    --cpu: #d55181;
    --gpu: #008300;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232321;
  --surface-3: #2c2c2a;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --shadow: none;
  --accent: #3987e5;
  --in: #3987e5;
  --out: #d95926;
  --occ: #199e70;
  --person: #199e70;
  --bicycle: #c98500;
  --vehicle: #d55181;
  --good-text: #0ca30c;
  --heat: 57, 135, 229;
  --load: #9085e9;
  --cpu: #d55181;
  --gpu: #008300;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 15px; }
h3 { font-size: 13px; color: var(--text-2); }
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* --- en-tête -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.nav a.external { display: inline-flex; align-items: center; gap: 5px; }
.nav a.external svg { width: 13px; height: 13px; opacity: .7; }
.topbar .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.good .dot { background: var(--good); }
.pill.warn .dot { background: var(--warning); }
.pill.bad .dot { background: var(--critical); }

.theme-switch button { padding: 5px 7px; }
.theme-switch svg { width: 15px; height: 15px; }
.userbox { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--border); }
.userbox .who { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.userbox .who svg { width: 18px; height: 18px; color: var(--muted); }
.userbox .txt { display: flex; flex-direction: column; line-height: 1.15; font-size: 12px; }
.userbox .txt strong { color: var(--text); font-weight: 600; font-size: 13px; }
.userbox .btn.logout, .userbox .btn.open-access { height: 30px; padding: 0 10px; font-size: 12px; color: var(--text-2); }
.userbox .btn.logout:hover, .userbox .btn.open-access:hover { color: var(--text); }

main { max-width: 1320px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }

/* --- cartes ---------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- tuiles de chiffres --------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.tile .label { color: var(--text-2); font-size: 13px; }
.tile .value { font-size: 28px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.key.in { background: var(--in); }
.key.out { background: var(--out); }
.key.occ { background: var(--occ); }
.key.line { height: 3px; width: 14px; border-radius: 2px; vertical-align: 3px; }

/* --- boutons et formulaires ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--critical); }
.btn.icon { width: 34px; padding: 0; }
.btn svg { width: 16px; height: 16px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; color: var(--text-2); font: 500 13px var(--font);
  padding: 5px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.segmented svg { width: 15px; height: 15px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; min-width: 0; }
label.field small, .help { color: var(--muted); font-weight: 400; font-size: 12px; }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], select {
  height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: 14px var(--font); min-width: 0; width: 100%;
}
input:focus, select:focus, .btn:focus-visible, .segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 20px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; align-items: center; flex-wrap: wrap; }
.form-actions .note { margin-right: auto; color: var(--muted); font-size: 12px; }

/* --- tableaux --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.r, th.r { text-align: right; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.link { cursor: pointer; }
details.table-toggle summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-top: 12px; }
details.table-toggle[open] summary { margin-bottom: 8px; }

/* --- graphiques --------------------------------------------------------------------------- */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 300px; }
.chart-box.short { height: 200px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.loading { opacity: 0.45; transition: opacity .2s; }

/* --- notifications ------------------------------------------------------------------------ */
#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--page); padding: 10px 16px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--critical); color: #fff; }

.banner {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); color: var(--text-2); font-size: 13px; margin-bottom: 16px;
}
.banner svg { width: 18px; height: 18px; flex: none; }
.banner.warn svg { color: var(--warning); }
.banner.bad svg { color: var(--critical); }

/* --- vidéo ----------------------------------------------------------------------------------- */
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; overflow: hidden;
}
.video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.video-frame .placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #c3c2b7; font-size: 14px; text-align: center; padding: 24px;
}
.video-frame .placeholder svg { width: 36px; height: 36px; opacity: .6; }

@media (max-width: 760px) {
  /* Sur téléphone, la navigation passe sur une seconde ligne. */
  .topbar { padding: 8px 16px; gap: 8px 10px; height: auto; flex-wrap: wrap; }
  .topbar .nav { order: 10; width: 100%; }
  .theme-switch button { padding: 4px 6px; }
  .topbar .pill .txt { display: none; }
  .userbox { padding-left: 6px; }
  .userbox .txt, .userbox .btn span { display: none; }
  .userbox .btn.logout, .userbox .btn.open-access { width: 30px; padding: 0; }
  .brand span { display: none; }
  main { padding: 16px; }
  .card { padding: 16px; }
  .nav a { padding: 6px 8px; }
}

/* =====================================================================================================
   Portail : compléments
   ===================================================================================================== */
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--text-2); }
.small { font-size: 12px; }
input[type="email"] {
  height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: 14px var(--font); min-width: 0; width: 100%;
}
select.auto { width: auto; }
.nav a { white-space: nowrap; }
.nav-sep { width: 1px; background: var(--border); margin: 6px 6px; }
.userbox form { margin: 0; }
.userbox a.who { text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.userbox a.who:hover, .userbox a.who[aria-current="page"] { background: var(--surface-2); }
.page-head .h1-sub { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.head-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.camera-picker { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.camera-picker select { width: auto; max-width: 280px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.back svg { width: 14px; height: 14px; }
.banner.good svg { color: var(--good); }
.banner > span strong { color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip.good::before { background: var(--good); }
.chip.warn::before { background: var(--warning); }
.chip.bad::before { background: var(--critical); }
.form-error { color: var(--critical); font-size: 13px; }
.help { margin: 0; }
.btn.big { height: 40px; }
.btn.danger { border-color: color-mix(in srgb, var(--critical) 40%, var(--border)); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* --- pages de connexion -------------------------------------------------------------------- */
.auth-wrap { min-height: calc(100vh - 110px); display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.auth-card { width: 100%; max-width: 400px; padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.auth-brand svg { width: 28px; height: 28px; color: var(--accent); }
.auth-card h1 { font-size: 22px; margin-top: 8px; }
.auth-sub { margin: -8px 0 0; color: var(--text-2); }
.auth-card .banner { margin: 0; }
.auth-link { display: inline-flex; align-items: center; gap: 4px; justify-content: center; font-size: 13px; }
.auth-link svg { width: 14px; height: 14px; }

/* --- vue d'ensemble ------------------------------------------------------------------------- */
.camera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.camera-card { display: flex; flex-direction: column; gap: 14px; }
.camera-card.offline .cc-value { color: var(--muted); }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 10px; flex-wrap: wrap; }
.cc-title { min-width: 0; flex: 1 1 150px; }
.cc-name { font-weight: 600; font-size: 16px; color: var(--text); }
.cc-loc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cc-head .pill { flex: none; }
.cc-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.cc-label svg { width: 17px; height: 17px; color: var(--muted); }
.cc-value { font-size: 52px; font-weight: 650; line-height: 1; letter-spacing: -0.03em; margin-top: 8px; }
.cc-others { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.cc-others > span { display: inline-flex; align-items: center; gap: 6px; }
.cc-others svg { width: 17px; height: 17px; color: var(--muted); }
.cc-foot { display: flex; gap: 8px; margin-top: auto; }
.cc-foot .btn { flex: 1; }
.empty-state { text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state svg { width: 40px; height: 40px; color: var(--muted); }
.empty-state p { margin: 0 0 6px; color: var(--text-2); max-width: 460px; }

/* --- direct --------------------------------------------------------------------------------- */
.live-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.live-grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; }
.hero .label { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero .label svg { width: 18px; height: 18px; color: var(--muted); }
.hero .value { font-size: 72px; font-weight: 650; line-height: 1; letter-spacing: -0.03em; margin: 12px 0 18px; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.io div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.io .k { font-size: 12px; color: var(--text-2); }
.io .v { font-size: 22px; font-weight: 600; margin-top: 2px; }
.hero .peak { margin-top: 14px; font-size: 12px; color: var(--muted); }
.cat-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--grid); }
.cat-row:first-of-type { border-top: 0; padding-top: 0; }
.cat-row svg { width: 22px; height: 22px; color: var(--muted); }
.cat-row .name { font-weight: 500; }
.cat-row .detail { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
.cat-row .present { font-size: 22px; font-weight: 600; text-align: right; }
.events { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.events li { display: grid; grid-template-columns: 64px 20px 1fr auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--grid); font-size: 13px; }
.events li:last-child { border-bottom: 0; }
.events li.empty { display: block; color: var(--muted); padding: 16px 0; text-align: center; border: 0; }
.events svg { width: 18px; height: 18px; color: var(--muted); }
.events .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.dir { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; }
.dir::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--in); }
.dir.out::before { background: var(--out); }
@media (max-width: 980px) { .live-top, .live-grid-2 { grid-template-columns: 1fr; } }

/* --- statistiques ---------------------------------------------------------------------------- */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--grid); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; color: var(--text-2); font: 500 14px var(--font); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav input { width: 160px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.calendar-wrap { overflow-x: auto; padding-bottom: 4px; }
.calendar { display: grid; grid-auto-flow: column; grid-template-rows: 16px repeat(7, 14px); grid-template-columns: 30px; grid-auto-columns: 14px; gap: 3px; width: max-content; }
.calendar .m { font-size: 11px; color: var(--muted); white-space: nowrap; width: 14px; overflow: visible; }
.calendar .wd { font-size: 10px; color: var(--muted); line-height: 14px; padding-right: 6px; }
.cell { width: 14px; height: 14px; border-radius: 3px; background: var(--surface-2); }
.cell.data { cursor: pointer; }
.cell:hover, .cell:focus-visible, .hm-cell:hover { outline: 2px solid var(--text); outline-offset: 0; }
.scale { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.scale .cell { width: 12px; height: 12px; cursor: default; }
.scale .cell:hover { outline: none; }
.heatmap-wrap { overflow-x: auto; }
.heatmap { display: grid; grid-template-columns: 70px repeat(48, minmax(11px, 1fr)); gap: 2px; min-width: 720px; }
.heatmap .rl { font-size: 12px; color: var(--text-2); display: flex; align-items: center; }
.heatmap .cl { font-size: 10px; color: var(--muted); grid-column: span 4; padding-top: 4px; }
.hm-cell { height: 26px; border-radius: 3px; background: var(--surface-2); }
#tip {
  position: fixed; z-index: 40; pointer-events: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); display: none; max-width: 260px;
}
#tip strong { display: block; font-size: 14px; color: var(--text); }
#tip span { color: var(--text-2); }
.exports { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* --- administration ------------------------------------------------------------------------- */
.form-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .form-columns { grid-template-columns: 1fr; } }
.admin-table td { white-space: normal; vertical-align: top; }
.admin-table td:first-child a { color: var(--text); }
.field-set { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.field-set legend { font-size: 13px; font-weight: 500; color: var(--text-2); padding: 0; margin-bottom: 8px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; max-height: 320px; overflow-y: auto; padding: 2px; }
#camera-rights .admin-note { display: none; }
#camera-rights.is-admin .admin-note { display: block; }
#camera-rights.is-admin .check-list { opacity: .45; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.key-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); margin-bottom: 16px; }
.key-card h2 { display: flex; align-items: center; gap: 8px; }
.key-card h2 svg { width: 18px; height: 18px; color: var(--accent); }
.copy-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.copy-row .field { flex: 1; }
.copy-row input { font-size: 13px; }
.steps { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: grid; gap: 4px; }
.danger-zone { border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); }
details.table-toggle form { margin-top: 10px; }
/* Menu plus long que dans l'application locale : il passe sur une seconde ligne plus tôt. */
@media (max-width: 1100px) {
  .topbar { padding: 8px 16px; gap: 8px 12px; height: auto; flex-wrap: wrap; }
  .topbar .nav { order: 10; width: 100%; overflow-x: auto; }
}
@media (max-width: 760px) {
  .nav-sep { display: none; }
  .copy-row { flex-direction: column; align-items: stretch; }
  .hero .value { font-size: 56px; }
  .camera-picker select { max-width: 200px; }
}

/* --- pied de page (toutes les pages) ------------------------------------------------------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { width: 100%; flex: 1 0 auto; }
.site-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 18px 16px 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}
.site-footer svg { width: 14px; height: 14px; color: var(--accent); }
.site-footer a { color: var(--text-2); font-weight: 600; }
.site-footer a:hover { color: var(--accent); }
