/* ─── PRTG Sensor — thème clair / sombre ─────────────────────────────────────────
   Mêmes couleurs que IPBX Admin. Couleurs d'état (ok / avertissement / erreur) toujours accompagnées
   d'un libellé, jamais la couleur seule. Structure : en-tête de page, compteurs, barre d'outils,
   cartes (titre + contenu), tableaux à colonnes fixes. */

:root {
	color-scheme: light;
	--bg: #f5f5f3;
	--surface: #ffffff;
	--surface-2: #f9f9f7;
	--border: #e2e1dc;
	--grid: #eeede9;
	--text: #111110;
	--text-2: #52514e;
	--muted: #85847e;
	--accent: #2a78d6;
	--ok: #0ca30c;      --ok-text: #006300;
	--warn: #fab219;    --warn-text: #8a5a00;
	--err: #d03b3b;     --err-text: #b02525;
	--off: #b8b7b1;
	--radius: 10px;
	--code-bg: #f7f7f5; --code-text: #24292f; --code-keyword: #8250df; --code-string: #0a7d33; --code-key: #0550ae;
	--code-number: #b35900; --code-comment: #6e7781; --code-option: #0e7490; --code-var: #b42318;
	--shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) {
		color-scheme: dark;
		--bg: #121211; --surface: #1a1a19; --surface-2: #1f1f1d; --border: #2f2f2c; --grid: #262624;
		--text: #f0efec; --text-2: #c3c2b7; --muted: #8c8b84; --accent: #3987e5;
		--ok-text: #4fcf4f; --warn-text: #fab219; --err-text: #ef7a7a; --off: #55554f;
		--shadow: none;
		--code-bg: #141413; --code-text: #e6e5e0; --code-keyword: #c79bff; --code-string: #7ee08f; --code-key: #79c0ff;
		--code-number: #ffb86b; --code-comment: #8b949e; --code-option: #5fd4e6; --code-var: #ff8a80;
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #121211; --surface: #1a1a19; --surface-2: #1f1f1d; --border: #2f2f2c; --grid: #262624;
	--text: #f0efec; --text-2: #c3c2b7; --muted: #8c8b84; --accent: #3987e5;
	--ok-text: #4fcf4f; --warn-text: #fab219; --err-text: #ef7a7a; --off: #55554f;
	--shadow: none;
	--code-bg: #141413; --code-text: #e6e5e0; --code-keyword: #c79bff; --code-string: #7ee08f; --code-key: #79c0ff;
	--code-number: #ffb86b; --code-comment: #8b949e; --code-option: #5fd4e6; --code-var: #ff8a80;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 12px; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
p { margin: 0 0 10px; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; }
pre { white-space: pre-wrap; margin: 0; }
.muted { color: var(--muted); }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
code.wrap { overflow-wrap: anywhere; }

/* ─── En-tête du site ────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; height: 56px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); font-weight: 500; }
.topbar nav { display: flex; gap: 2px; flex: 1; height: 100%; }
.topbar nav a { display: flex; align-items: center; padding: 0 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.topbar nav a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.user { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 6px; cursor: pointer; width: 30px; height: 30px; }

main { max-width: 1440px; margin: 0 auto; padding: 24px 24px 48px; }

/* ─── En-tête de page ────────────────────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Compteurs (filtres rapides) ────────────────────────────────────────── */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.counter { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.counter:hover { text-decoration: none; border-color: var(--muted); }
.counter.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.counter .value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.counter .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: none; }
.lvl-ok .dot { background: var(--ok); }
.lvl-warn .dot { background: var(--warn); }
.lvl-err .dot { background: var(--err); }

/* ─── Barre de recherche / filtres ───────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar > select, .toolbar > .btn { flex: none; }
/* Champ de recherche + croix d'effacement dans le champ (la croix native du navigateur est masquée) */
.toolbar .search-box { position: relative; flex: 1 1 auto; min-width: 160px; display: flex; }
.toolbar .search-box .search { flex: 1; width: 100%; padding-right: 32px; }
.toolbar .search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%; color: var(--text-2); }
.search-clear:hover { background: var(--border); color: var(--text); text-decoration: none; }
.search-clear[hidden] { display: none; }
a.loading { pointer-events: none; color: var(--text-2); font-style: italic; }
/* Cache d'une sonde (fiche capteur, au-dessus des canaux) : fichier, date, bouton « Vider le cache » */
.cache-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; }
input, select, textarea { font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; }
input, select { height: 36px; padding: 0 11px; }
input[type="radio"], input[type="checkbox"] { height: auto; padding: 0; accent-color: var(--accent); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { width: 100%; padding: 9px 11px; line-height: 1.5; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }

.result-count { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }

/* ─── Cartes ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .meta { font-size: 12.5px; color: var(--muted); }
.card > p.muted { font-size: 13px; }
.empty { padding: 28px 16px; text-align: center; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; }
.empty p { margin: 0 0 4px; }
.card .empty { margin-bottom: 14px; }

/* Fiche capteur : contenu principal + colonne latérale */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .layout-2 { grid-template-columns: 1fr; } }

/* ─── Alertes ────────────────────────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-size: 13.5px; overflow-wrap: anywhere; }
.alert.err { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 8%, var(--surface)); color: var(--err-text); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); color: var(--warn-text); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); color: var(--ok-text); }
.alert.info { border-color: var(--border); background: var(--surface-2); color: var(--text-2); }

/* ─── Pastilles d'état ───────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--off) 22%, transparent); color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--off); }
.pill.lvl-ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok-text); }
.pill.lvl-ok::before { background: var(--ok); }
.pill.lvl-warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-text); }
.pill.lvl-warn::before { background: var(--warn); }
.pill.lvl-err { background: color-mix(in srgb, var(--err) 13%, transparent); color: var(--err-text); }
.pill.lvl-err::before { background: var(--err); }
h1 .pill { font-size: 13px; }

/* ─── Liste des capteurs : un seul tableau, colonnes fixes ───────────────── */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: clip; }
table.list { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.list col.c-status { width: 150px; }
table.list col.c-script { width: 220px; }
table.list col.c-doc { width: 130px; }
table.list col.c-msg { width: 32%; }
table.list thead th { position: sticky; top: 56px; z-index: 2; background: var(--surface-2); text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.list td { padding: 9px 14px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.list tr.group-row th { text-align: left; padding: 18px 14px 8px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border-bottom: 1px solid var(--border); }
table.list tbody:first-of-type tr.group-row th { padding-top: 12px; }
table.list tr.group-row .count { margin-left: 6px; font-weight: 500; color: var(--muted); font-size: 12px; }
table.list tr[data-href] { cursor: pointer; }
table.list tr[data-href]:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
table.list .name { color: var(--text); font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list tr[data-href]:hover .name { color: var(--accent); }
.sub { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.msg { font-size: 13px; color: var(--text-2); }
td.msg.muted { color: var(--muted); }
table.list code { color: var(--text-2); }
.doc-flag { font-size: 12.5px; font-weight: 500; }
.doc-flag.yes { color: var(--ok-text); }
.doc-flag.no { color: var(--muted); }
@media (max-width: 900px) {
	table.list col.c-script, table.list col.c-msg { width: 0; }
	table.list td:nth-child(3), table.list td:nth-child(5), table.list th:nth-child(3), table.list th:nth-child(5) { display: none; }
}

/* ─── Tableaux simples (canaux, test, contrôles) ─────────────────────────── */
table.plain { width: 100%; border-collapse: collapse; }
table.plain th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--border); }
table.plain th.num { text-align: right; }
table.plain td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.plain tr:last-child td { border-bottom: 0; }
table.plain td:last-child, table.plain th:last-child { padding-right: 0; }
tr.ghost td:first-child { color: var(--warn-text); }

/* ─── Détails (liste clé / valeur) ───────────────────────────────────────── */
dl.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0; margin: 0; font-size: 13.5px; }
dl.kv dt, dl.kv dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--grid); }
dl.kv dt { color: var(--muted); font-size: 12.5px; }
dl.kv dd { overflow-wrap: anywhere; }
dl.kv dt:last-of-type, dl.kv dd:last-of-type { border-bottom: 0; }
code.tag { display: inline-block; padding: 1px 6px; margin: 1px 4px 1px 0; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }

/* ─── Documentation ──────────────────────────────────────────────────────── */
.doc-block { padding: 14px 0; border-top: 1px solid var(--grid); }
.doc-block:first-of-type { border-top: 0; padding-top: 0; }
.doc-text { line-height: 1.6; overflow-wrap: anywhere; }
.doc-text p { margin: 0 0 8px; }
.doc-text p:last-child, .doc-text ul:last-child { margin-bottom: 0; }
.doc-text ul { margin: 4px 0 8px; padding-left: 20px; }
.doc-text li { margin: 2px 0; }
.doc-text code, td code, dd code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--code-bg); border: 1px solid var(--border); }
.doc-meta { font-size: 12px; color: var(--muted); margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--grid); }

/* Tableaux de documentation (canaux, erreurs) : texte long, alignement en haut */
table.doc-table td { vertical-align: top; line-height: 1.55; }
table.doc-table col.c-channel { width: 200px; }
table.doc-table col.c-limits { width: 230px; }
table.doc-table col.c-message { width: 34%; }
table.doc-table td.method { font-size: 13px; color: var(--text-2); }
table.doc-table td.limits { font-size: 12.5px; line-height: 2; }
code.message { display: block; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
tr.current td { background: color-mix(in srgb, var(--err) 9%, transparent); }
tr.current.lvl-warn td { background: color-mix(in srgb, var(--warn) 11%, transparent); }
tr.current td:first-child { box-shadow: inset 3px 0 0 var(--err); }
tr.current.lvl-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

/* Erreur en cours : en tête de fiche, chaque erreur avec son explication */
.card.current-error.lvl-err { border-color: color-mix(in srgb, var(--err) 55%, var(--border)); background: color-mix(in srgb, var(--err) 6%, var(--surface)); }
.card.current-error.lvl-warn { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.current-error.lvl-err h2 { color: var(--err-text); }
.current-error.lvl-warn h2 { color: var(--warn-text); }
.current-item { padding: 12px 0; border-top: 1px solid var(--grid); }
.current-item:first-of-type { border-top: 0; padding-top: 0; }
.current-item code.message { margin: 0 0 8px; font-weight: 600; }
dl.explain { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13.5px; }
dl.explain dt { color: var(--muted); }
dl.explain dd { margin: 0; }

/* Fonctionnement par canal : un bloc par canal, requêtes à copier */
table.channel-index col.c-channel { width: 210px; }
table.channel-index col.c-sources { width: 120px; }
table.channel-index col.c-limits { width: 240px; }
table.channel-index tr[data-href] { cursor: pointer; }
/* Marge à gauche de la 1re colonne des tableaux où une ligne peut être « en cours » (canaux, erreurs) : la barre de couleur
   d'erreur / d'avertissement (3 px) ne recouvre pas le texte ni les pastilles */
table.channel-index td:first-child, table.channel-index th:first-child,
table.doc-table td:first-child, table.doc-table th:first-child { padding-left: 12px; }
table.channel-index tr[data-href]:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
table.channel-index td .doc-text p, table.channel-index td p { margin: 0; }
table.channel-index td.limits, .channel-facts dd .pill { font-size: 12.5px; }
details.channel-card { padding: 0; scroll-margin-top: 72px; }
details.channel-card > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 14px 20px; cursor: pointer; }
details.channel-card > summary::-webkit-details-marker { display: none; }
details.channel-card > summary:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
details.channel-card[open] > summary { border-bottom: 1px solid var(--border); }
.chevron { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details[open] > summary .chevron { transform: rotate(45deg); }
.channel-name { font-weight: 700; font-size: 14.5px; }
.channel-summary { flex: 1 1 300px; color: var(--text-2); font-size: 13px; }
.channel-summary p { margin: 0; }
.channel-sources { display: flex; gap: 4px; }
details.channel-card.in-error { border-color: color-mix(in srgb, var(--err) 55%, var(--border)); box-shadow: inset 3px 0 0 var(--err); }
details.channel-card.in-warning { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); box-shadow: inset 3px 0 0 var(--warn); }
details.channel-card > dl, details.channel-card > h3, details.channel-card > .query { margin-left: 20px; margin-right: 20px; }
dl.channel-facts { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0; margin-top: 4px; margin-bottom: 0; }
dl.channel-facts dt, dl.channel-facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--grid); }
dl.channel-facts dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 12px; }
h3.queries-title { margin-top: 18px; margin-bottom: 0; }
details.channel-card > .query:last-child { margin-bottom: 20px; }
.query-note { display: flex; gap: 10px; align-items: baseline; }
.note-label { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 700px) { dl.channel-facts { grid-template-columns: 1fr; } dl.channel-facts dt { border-bottom: 0; padding-bottom: 0; } }
article.channel { padding: 16px 0; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
article.channel:first-of-type { border-top: 0; padding-top: 0; }
article.channel > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
article.channel h3 { margin: 0; font-size: 14.5px; color: var(--text); text-transform: none; letter-spacing: 0; }
article.channel .limits { margin-left: auto; font-size: 12.5px; color: var(--text-2); }
article.channel.in-error { margin: 0 -20px; padding-left: 17px; padding-right: 20px; border-left: 3px solid var(--err); background: color-mix(in srgb, var(--err) 5%, transparent); }
article.channel:target { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.doc-text.method { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.query { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.query-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; }
.query-head .spacer { flex: 1; }
.query-head .target { color: var(--text-2); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.query pre { margin: 0; padding: 12px 14px; max-height: 420px; overflow: auto; white-space: pre; font-size: 12.5px; line-height: 1.6; color: var(--code-text); background: var(--code-bg); tab-size: 4; }
.tk-keyword { color: var(--code-keyword); font-weight: 600; }
.tk-string { color: var(--code-string); }
.tk-key { color: var(--code-key); }
.tk-number { color: var(--code-number); }
.tk-comment { color: var(--code-comment); font-style: italic; }
.tk-option { color: var(--code-option); }
.tk-var { color: var(--code-var); background: color-mix(in srgb, var(--code-var) 14%, transparent); border-radius: 3px; }
[hidden] { display: none !important; }
.query-note { margin: 0; padding: 8px 12px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-2); }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.kind-elk { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-text); }
.kind-aws { background: color-mix(in srgb, #eb6834 18%, transparent); color: #eb6834; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.pill.lvl-run { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pill.lvl-run::before { background: var(--accent); }

/* URL appelée par le capteur : copiable, ouvrable */
.url-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.url-box code { flex: 1 1 400px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; overflow-wrap: anywhere; user-select: all; }
.url-actions { display: flex; gap: 8px; flex-wrap: wrap; }
p.params { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* ─── Divers ─────────────────────────────────────────────────────────────── */
pre.raw { max-height: 320px; overflow: auto; background: var(--surface-2); padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; }
ul.items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.items li code { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
section[id] { scroll-margin-top: 72px; }

/* ─── Connexion ──────────────────────────────────────────────────────────── */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; max-width: 400px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.login-card .brand { font-size: 22px; margin-bottom: 12px; justify-content: center; }
.login-card p { color: var(--text-2); margin-bottom: 22px; }

@media (max-width: 700px) {
	main { padding: 16px; }
	.topbar { padding: 0 16px; gap: 12px; }
	.user span:not(.pill) { display: none; }
}
