:root {
  --bg:#f4f6f2; --surface:#fff; --ink:#1c2420; --muted:#5a675f; --line:#d6ddd5; --accent:#a8137a; --accent-soft:#f6e4ef;
  --ok:#1f7a35; --okbg:#dff3e3; --bad:#b3261e; --badbg:#fde3e1; --warn:#8a3b00; --warnbg:#fde8d4; --bar:#a8137a; --bar2:#2b6f88;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#111713; --surface:#19211c; --ink:#e5ebe6; --muted:#9aa99f; --line:#2c3a31; --accent:#ec6fc3; --accent-soft:#3a1c31;
          --ok:#7fdc95; --okbg:#173a21; --bad:#ff8a80; --badbg:#42201d; --warn:#ffb878; --warnbg:#3d2a14; --bar:#ec6fc3; --bar2:#6cc3e0; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 18px; }
a { color: inherit; }
h1 { font-size: 1.6rem; margin: 0; letter-spacing: .01em; }
h2 { font-size: 1.05rem; margin: 0; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .85rem; margin: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); align-self: center; }
.brand small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.who { display: flex; align-items: center; gap: 10px; } .who form { margin: 0; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .titlebar form { margin: 0; }
.crumb { margin: 0; } .crumb a { color: var(--muted); text-decoration: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
button, .btn { font: inherit; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 40px; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { background: transparent; }
input { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; }
label { display: grid; gap: 4px; font-weight: 500; }
.stack { display: grid; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 12px; }
.panel.narrow { max-width: 420px; width: 100%; margin: 40px auto; }
.flash { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.flash.ok { background: var(--okbg); color: var(--ok); } .flash.error { background: var(--badbg); color: var(--bad); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h2 a { text-decoration: none; } .card h2 a:hover { text-decoration: underline; }
.card footer { display: flex; gap: 8px; flex-wrap: wrap; }
.card p { margin: 0; overflow-wrap: anywhere; }
.pill { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.pill.up { background: var(--okbg); color: var(--ok); } .pill.down { background: var(--badbg); color: var(--bad); } .pill.stale { background: var(--warnbg); color: var(--warn); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.kv.wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kv dt { color: var(--muted); font-size: .8rem; } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nums.big { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.nums b { display: block; font-size: 1.5rem; line-height: 1.2; } .nums span { color: var(--muted); font-size: .78rem; }
.spark { width: 100%; height: 44px; } .spark rect, .chart rect { fill: var(--bar); } .chart.alt rect { fill: var(--bar2); } .chart rect.bad { fill: var(--bad); }
.chart { width: 100%; height: 120px; display: block; } .chart.short { height: 56px; }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: -6px; }
.note { color: var(--muted); font-size: .85rem; border-left: 3px solid var(--line); padding-left: 10px; }
.tablewrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .8rem; font-weight: 600; } .r { text-align: right; } td.path { white-space: normal; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.log { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 70vh; overflow-y: auto; }
@media (max-width: 560px) { .card, .panel { padding: 14px; } h1 { font-size: 1.35rem; } th, td { padding: 8px 6px; } }
[hidden] { display: none !important; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h3 { font-size: .95rem; margin: 0 0 6px; }
ol, ul.rules { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-text { display: grid; gap: 2px; } .setting-text p { margin: 0; }
.setting-label { font-weight: 600; }
.ios-switch { position: relative; flex: none; width: 51px; height: 31px; }
.ios-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ios-switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.ios-switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s; }
.ios-switch input:checked + .track { background: var(--ok); }
.ios-switch input:checked + .track::after { transform: translateX(20px); }
.ios-switch input:disabled { cursor: not-allowed; } .ios-switch input:disabled + .track { opacity: .5; }
.ios-switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
#push-msg:empty { display: none; }
ul.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert { display: grid; gap: 2px; padding-left: 10px; border-left: 3px solid var(--line); overflow-wrap: anywhere; }
.alert.down { border-color: var(--bad); } .alert.up, .alert.fresh { border-color: var(--ok); } .alert.stale { border-color: var(--warn); }
.alert span { color: var(--ink); font-size: .9rem; }
.top { flex-wrap: wrap; } .who { flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; }
.alert.action { border-color: var(--bar2); }
.btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.svc { display: grid; gap: 6px; }
form.inline { display: inline; margin: 0; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); }
#live-stamp.bad { color: var(--bad); }
#flash-zone:empty { display: none; }
#flash-zone { display: grid; gap: 8px; }
.titlebar .actions { align-items: center; }
.titlebar .actions form { margin: 0; }
ul.countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.countries li { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr minmax(80px, auto); align-items: center; gap: 10px; }
.cbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--bar); border-radius: 4px; }
.cnum { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.cname { overflow-wrap: anywhere; }
@media (max-width: 560px) { ul.countries li { grid-template-columns: 1fr auto; } .cbar { grid-column: 1 / -1; order: 3; } }

/* logos des applications */
.logo { flex: none; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo.ph { font-weight: 700; font-size: 1.1rem; color: var(--muted); }
.logo.big { width: 48px; height: 48px; border-radius: 11px; }
.logo.big.ph { font-size: 1.4rem; }
.withlogo { display: flex; align-items: center; gap: 10px; min-width: 0; }
h1.withlogo { flex-wrap: wrap; row-gap: 6px; }
