/* Uptime — kit UI maison, CSS pur, aucune dépendance. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(/assets/fonts/inter-variable-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    --bg: #f7f7f9;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #111827;
    --text-2: #4b5563;
    --muted: #6b7280;

    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-soft: #f3eefe;
    --accent-ring: rgba(124, 58, 237, .35);

    --up: #16a34a;
    --slow: #f59e0b;
    --down: #dc2626;
    --pending: #9ca3af;
    --paused: #e5e7eb;

    --radius-sm: 8px;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
    --shadow-md: 0 4px 12px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .05);
    --sidebar-w: 240px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-feature-settings: "cv11", "ss01";
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -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: -.01em; }
p { margin: 0; }
form { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }
.small { font-size: .82rem; }
.num { font-variant-numeric: tabular-nums; }
.sep { color: var(--border-strong); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 2rem 2rem 4rem; }

/* ---------- Sidebar ---------- */
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1rem .85rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: .25rem .35rem; margin-bottom: 1rem; }
.sb-top .sb-close { display: none; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; font-size: 1.05rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
    background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(124, 58, 237, .35);
}
.brand-mark .i { width: 16px; height: 16px; }
.brand-lg { font-size: 1.35rem; }
.brand-lg .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.brand-lg .brand-mark .i { width: 20px; height: 20px; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-group { padding: .6rem .6rem .3rem; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sb-link {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .6rem; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 500; font-size: .92rem;
}
.sb-link .i { width: 18px; height: 18px; color: var(--muted); }
.sb-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sb-link.active { background: var(--accent-soft); color: var(--accent); }
.sb-link.active .i { color: var(--accent); }


.sb-user {
    margin-top: auto; display: flex; align-items: center; gap: .6rem;
    padding: .9rem .35rem 0; border-top: 1px solid var(--border);
}
.avatar {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
    background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.sb-user-link {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem;
    margin-left: -.35rem; padding: .3rem .35rem; border-radius: var(--radius-sm); color: var(--text);
}
.sb-user-link:hover { background: var(--surface-2); text-decoration: none; }
.sb-user-link.active { background: var(--accent-soft); color: var(--accent); }
.sb-user-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 500; }

.topbar-m { display: none; }
.sb-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(17, 24, 39, .45); }
.sb-backdrop[hidden] { display: none; }

/* ---------- Page head ---------- */
.crumbs { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-bottom: .75rem; font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .i { width: 14px; height: 14px; color: var(--border-strong); }
.crumbs span { color: var(--text-2); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.4rem; line-height: 1.25; }
.page-title { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.page-sub { margin-top: .35rem; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .35rem .5rem; flex-wrap: wrap; }
.page-sub .i { color: var(--pending); }
.page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.link-ext { display: inline-flex; align-items: center; gap: .3rem; }
.link-ext .i { width: 13px; height: 13px; color: currentColor; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .i { color: var(--pending); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel + .panel, .stats + .panel, .panel + .legend { margin-top: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: .95rem; }
.panel-body { padding: 1.25rem; }
.panel-narrow { max-width: 640px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem 1.15rem; }
.stat-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat-value { margin-top: .2rem; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: .2rem; font-size: .78rem; color: var(--muted); }
.stat.tinted .stat-value { color: var(--c); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 36px; padding: 0 .9rem;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
    font-weight: 500; font-size: .9rem; line-height: 1;
    cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.btn .i { color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary .i { color: #fff; }
.btn-danger { color: var(--down); border-color: rgba(220, 38, 38, .3); }
.btn-danger:hover { background: rgba(220, 38, 38, .06); border-color: rgba(220, 38, 38, .5); }
.btn-danger .i { color: var(--down); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-icon { width: 36px; padding: 0; }
.btn-sm { min-height: 30px; padding: 0 .65rem; font-size: .82rem; }
.btn-block { width: 100%; min-height: 40px; }

/* ---------- Segmented tabs ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--radius-sm); }
.seg a { padding: .35rem .8rem; border-radius: 6px; color: var(--muted); font-weight: 500; font-size: .88rem; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Status ---------- */
.st-up { --c: var(--up); }
.st-slow { --c: var(--slow); }
.st-down { --c: var(--down); }
.st-pending { --c: var(--pending); }
.st-paused { --c: var(--pending); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--pending)); vertical-align: middle; flex: none; }
.dot-lg { width: 12px; height: 12px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--pending)) 18%, transparent); }
.st-down .dot-lg { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
    50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 10%, transparent); }
}

.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; white-space: nowrap; line-height: 1.5;
    color: var(--c, var(--pending));
    background: color-mix(in srgb, var(--c, var(--pending)) 12%, transparent);
}
.pill .dot { width: 6px; height: 6px; }
.pill-lg { font-size: .82rem; padding: .25rem .75rem; }
.pill-sub { font-weight: 400; opacity: .8; }

/* ---------- Site list ---------- */
.site-head, .site-row {
    display: grid;
    grid-template-columns: 18px minmax(200px, 1.4fr) minmax(180px, 2fr) 90px 90px 90px 120px 32px;
    align-items: center; gap: 1rem;
    padding: .8rem 1.25rem;
}
.site-head {
    padding-top: .6rem; padding-bottom: .6rem;
    background: var(--surface-2); border-bottom: 1px solid var(--border);
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.site-head .num, .site-row .num { text-align: right; }
.site-row { color: inherit; transition: background .12s; }
.site-item + .site-item { border-top: 1px solid var(--border); }
.site-item { position: relative; }
.site-item .site-bell { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); }
.site-row:hover { background: #fafafb; text-decoration: none; }
.site-row .dot-lg { justify-self: center; }
.site-id { min-width: 0; }
.site-row .name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .url { display: block; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .num::before { display: none; content: attr(data-label); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.site-last { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }

.ticks { display: flex; gap: 2px; height: 24px; align-items: stretch; }
.ticks span { flex: 1; border-radius: 2px; background: var(--c, var(--paused)); min-width: 2px; opacity: .9; }
.ticks .st-pending, .ticks .st-paused { background: var(--paused); }
.ticks .tick-empty { background: var(--surface-2); opacity: 1; }

.legend { display: flex; gap: .5rem 1.25rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; font-size: .8rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: .4rem; }

.empty { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty-icon { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: .75rem; }
.empty h2 { color: var(--text); font-size: 1.1rem; margin-bottom: .35rem; }
.empty p { margin-bottom: 1.25rem; }

/* ---------- Alerts ---------- */
.alert {
    display: flex; align-items: flex-start; gap: .65rem;
    padding: .75rem 1rem; margin-bottom: 1rem;
    border: 1px solid; border-radius: var(--radius-sm);
    font-size: .9rem; line-height: 1.45;
}
.alert .i { margin-top: 3px; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert[hidden] { display: none; }

/* ---------- Toasts (messages flash) ---------- */
.toasts {
    position: fixed; right: 1.25rem; top: 1.25rem; z-index: 50;
    display: flex; flex-direction: column; gap: .6rem;
    width: min(380px, calc(100vw - 2.5rem));
    pointer-events: none;
}
.toast {
    display: flex; align-items: flex-start; gap: .65rem;
    padding: .8rem .85rem .8rem 1rem;
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c, var(--accent));
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    font-size: .9rem; line-height: 1.45; color: var(--text);
    pointer-events: auto;
    animation: toast-in .25s ease-out both;
}
.toast > .i { margin-top: 3px; color: var(--c, var(--accent)); }
.toast-success { --c: var(--up); }
.toast-error { --c: var(--down); }
.toast-text { flex: 1; min-width: 0; }
.toast-close {
    display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -3px -3px -3px 0; flex: none;
    border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.toast-close:hover { background: var(--surface-2); color: var(--text); }
.toast-close .i { width: 14px; height: 14px; }
.toast.is-leaving { animation: toast-out .2s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; align-content: start; }
.field > span:first-child { font-size: .85rem; font-weight: 500; color: var(--text); }
.hint { font-size: .78rem; font-weight: 400; color: var(--muted); }
.form input, .form select {
    font: inherit; width: 100%; min-height: 38px;
    padding: .45rem .75rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: border-color .12s, box-shadow .12s;
}
.form input::placeholder { color: var(--pending); }
.form select {
    height: 38px; padding-right: 2.25rem; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .75rem center;
}
.form input[type=number] { height: 38px; }
.form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.form-section { padding-top: 1.1rem; border-top: 1px solid var(--border); }
.form-section h3 { margin-bottom: .9rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; align-items: start; }
.form-actions { display: flex; align-items: center; gap: .6rem; padding-top: .25rem; }
.form-errors { margin: 0; padding-left: 1.1rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .65rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafb; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Chart & timeline ---------- */
.chart { width: 100%; min-height: 260px; }
.chart-empty { display: grid; place-items: center; height: 200px; color: var(--muted); font-size: .9rem; }
.timeline { display: flex; gap: 1px; height: 26px; margin-top: .75rem; border-radius: 6px; overflow: hidden; }
.timeline span { flex: 1; background: var(--c, var(--paused)); min-width: 1px; }
.timeline .st-paused { background: var(--paused); }
.timeline-legend { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .75rem; color: var(--muted); }

/* ---------- Login ---------- */
.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 1rem;
    background: radial-gradient(900px 500px at 50% -10%, #ede9fe 0%, rgba(237, 233, 254, 0) 70%), var(--bg);
}
.login-card {
    width: 100%; max-width: 400px; padding: 2.25rem 2rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-md);
}
.login-sub { margin: .5rem 0 1.75rem; color: var(--muted); font-size: .9rem; }
.check-remember { margin: -.25rem 0 .25rem; }

/* ---------- Pages de statut (admin) ---------- */
.row-actions { display: inline-flex; gap: .4rem; align-items: center; }
.slug-input { display: flex; align-items: stretch; }
.slug-prefix {
    display: inline-flex; align-items: center; padding: 0 .7rem; height: 38px;
    background: var(--surface-2); border: 1px solid var(--border); border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--muted); font-size: .85rem; white-space: nowrap;
}
.form .slug-input input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-width: 0; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.check {
    display: flex; align-items: center; gap: .6rem; min-width: 0;
    padding: .55rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s;
}
.check:hover { border-color: var(--border-strong); }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form .check input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.check-text { display: grid; min-width: 0; line-height: 1.3; }
.check-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Alertes ---------- */
.form-section .check { margin-top: .75rem; }
.scope-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
.scope-choice .check { margin-top: 0; }
.form .scope-choice input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
/* Liste de sites visible seulement en mode « sélection » (sans JS). */
.scope-list { display: none; margin-top: .75rem; }
.scope:has(input[name=scope][value=selected]:checked) .scope-list { display: block; }
.row-muted td { color: var(--muted); }
.chan { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; }
.chan .i { color: var(--muted); flex: none; }
.chan-text { display: grid; line-height: 1.3; min-width: 0; }
.chan-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i-sm { width: 14px; height: 14px; }
.text-down { color: var(--down); }
.text-up { color: var(--up); }
.nowrap { white-space: nowrap; }

.mute-list { display: grid; }
.mute-row { display: grid; grid-template-columns: 12px minmax(120px, 1fr) minmax(0, 1.5fr) auto; align-items: center; gap: .9rem; padding: .6rem 1.25rem; }
.mute-row + .mute-row { border-top: 1px solid var(--border); }
.mute-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mute-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mute-row.is-muted .mute-name, .mute-row.is-muted .mute-url { color: var(--muted); }

.site-bell { display: inline-flex; }
.bell {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.bell:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.bell:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.bell .i { width: 16px; height: 16px; }
.bell .i-off { display: none; }
.bell.is-muted { color: var(--down); }
.bell.is-muted .i-on { display: none; }
.bell.is-muted .i-off { display: block; }

/* ---------- Page de statut publique ---------- */
.public-page { background: radial-gradient(900px 400px at 50% -10%, #ede9fe 0%, rgba(237, 233, 254, 0) 70%), var(--bg); }
.public { max-width: 860px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.public-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.public-updated { display: inline-flex; align-items: center; gap: .35rem; }
.public-updated .i { width: 14px; height: 14px; color: var(--pending); }
.public-foot { margin-top: 2.5rem; text-align: center; font-size: .78rem; color: var(--muted); }
.status-banner {
    display: flex; align-items: center; gap: .9rem;
    padding: 1.1rem 1.35rem; margin-bottom: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--c, var(--pending)) 35%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--c, var(--pending)) 9%, #fff);
}
.status-banner .i { width: 26px; height: 26px; color: var(--c, var(--pending)); flex: none; }
.status-banner strong { display: block; font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
.status-banner-sub { font-size: .85rem; color: var(--text-2); }
.status-row {
    display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 2.2fr) 72px 110px;
    align-items: center; gap: 1rem; padding: .8rem 1.25rem;
}
.status-row + .status-row { border-top: 1px solid var(--border); }
.status-name { display: flex; align-items: center; gap: .55rem; min-width: 0; font-weight: 600; }
.status-name .dot { width: 9px; height: 9px; }
.status-row .timeline { margin-top: 0; height: 22px; }
.status-pct { text-align: right; font-weight: 500; }
.status-row .pill { justify-self: end; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .page { padding: 1.25rem 1rem 3rem; }

    .topbar-m {
        display: flex; align-items: center; gap: .5rem;
        position: sticky; top: 0; z-index: 20;
        height: 52px; padding: 0 .75rem;
        background: var(--surface); border-bottom: 1px solid var(--border);
    }
    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
        width: var(--sidebar-w); height: 100vh;
        transform: translateX(-100%); transition: transform .2s ease;
        box-shadow: none;
    }
    body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-md); }
    body.sidebar-open { overflow: hidden; }
    .sb-top .sb-close { display: inline-flex; }

    .page-head { flex-direction: column; align-items: stretch; }
    .page-actions { justify-content: flex-start; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    .stat-value { font-size: 1.4rem; }

    .site-head { display: none; }
    .site-row {
        grid-template-columns: 18px 1fr auto;
        grid-template-areas:
            "dot name last"
            "dot url last"
            "ticks ticks ticks"
            "n1 n2 n3";
        row-gap: .5rem; column-gap: .75rem; padding: .9rem 1rem;
    }
    .site-row .dot-lg { grid-area: dot; align-self: start; margin-top: 4px; }
    .site-row .site-id { grid-area: name / name / url / url; }
    .site-last { grid-area: last; }
    .site-row .ticks { grid-area: ticks; height: 18px; }
    .site-row .c-resp { grid-area: n1; }
    .site-row .c-u24 { grid-area: n2; }
    .site-row .c-u7 { grid-area: n3; }
    .site-row .num { text-align: left; font-size: .95rem; }
    .site-row .num::before { display: block; }
    .site-item .site-bell { top: .9rem; right: .75rem; transform: none; }
    .site-last { padding-right: 36px; }

    .table th, .table td { padding: .6rem .9rem; }
    .panel-head, .panel-body { padding-left: 1rem; padding-right: 1rem; }

    .mute-row { grid-template-columns: 12px 1fr auto; grid-template-areas: "dot name bell" "dot url bell"; row-gap: .15rem; }
    .mute-row .dot { grid-area: dot; }
    .mute-name { grid-area: name; }
    .mute-url { grid-area: url; }
    .mute-row .site-bell { grid-area: bell; }

    .public { padding: 1.5rem 1rem 2.5rem; }
    .status-row {
        grid-template-columns: 1fr auto;
        grid-template-areas: "name pill" "tl tl" "pct pct";
        row-gap: .5rem; padding: .9rem 1rem;
    }
    .status-name { grid-area: name; }
    .status-row .pill { grid-area: pill; }
    .status-row .timeline { grid-area: tl; }
    .status-pct { grid-area: pct; text-align: left; font-size: .85rem; color: var(--muted); }
    .status-pct::before { content: "Disponibilité "; }
    .row-actions { flex-direction: column; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar { transition: none; }
    .st-down .dot-lg { animation: none; }
    .toast, .toast.is-leaving { animation: none; }
}
