/* SuperCloud Status
   Une seule feuille, sans framework. Reprend les fondations de la landing
   « haute altitude » : ciel pâle, encre, soleil rare, serif éditorial. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/fonts/instrument-sans-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;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-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;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-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;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  color-scheme: light;

  --sky-0: #f7fafc;
  --sky-1: #eaf3f8;
  --sky-2: #d8e8f2;
  --sky-3: #bfd8e7;
  --ink: #0a1822;
  --ink-2: #29414e;
  --muted: #5a7280;
  --line: rgba(10, 24, 34, 0.12);
  --line-strong: rgba(10, 24, 34, 0.24);
  --deep: #06121a;
  --deep-2: #0b2030;
  --white: #ffffff;
  --sun: #f0a45c;
  --sun-deep: #e9974d;
  --sun-2: #ffd2a2;

  --ok: #2f6f55;
  --ok-bg: #e8f2ed;
  --warn: #8a4f12;
  --warn-bg: #fbeedd;
  --bad: #9b3a22;
  --bad-bg: #f8e9e5;
  --idle: #5a7280;
  --idle-bg: #eef3f6;

  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas,
    monospace;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 3px rgba(10, 24, 34, 0.04), 0 22px 50px rgba(10, 24, 34, 0.08);
  --shadow-soft: 0 8px 24px rgba(10, 24, 34, 0.07);
  --focus: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--sky-3) var(--sky-0);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky-0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
::selection {
  background: var(--sun);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--sun-deep);
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.86em;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--sky-0);
}
::-webkit-scrollbar-thumb {
  background: var(--sky-3);
  border: 3px solid var(--sky-0);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ── Utilitaires ───────────────────────────────────────────────────────── */

.wrap {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

.tone-up {
  --tone: var(--ok);
  --tone-bg: var(--ok-bg);
}
.tone-degraded {
  --tone: var(--warn);
  --tone-bg: var(--warn-bg);
}
.tone-down {
  --tone: var(--bad);
  --tone-bg: var(--bad-bg);
}
.tone-unknown,
.tone-muted {
  --tone: var(--idle);
  --tone-bg: var(--idle-bg);
}
.tone-ok {
  --tone: var(--ok);
  --tone-bg: var(--ok-bg);
}
.tone-warn {
  --tone: var(--warn);
  --tone-bg: var(--warn-bg);
}
.tone-bad {
  --tone: var(--bad);
  --tone-bg: var(--bad-bg);
}

/* ── En-tête / pied de page ────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 250, 252, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: var(--sun);
}

.brand-sub {
  color: var(--muted);
  font-weight: 400;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.header-nav a {
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.header-nav a:hover {
  border-bottom-color: var(--sun-deep);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.detail-meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  text-decoration: none;
}
.detail-meta a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun-deep);
}
.detail-meta svg {
  flex: none;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ink-2);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid var(--ink-2);
  opacity: 0;
  animation: live-pulse 2.8s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    opacity: 0.45;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.site-footer {
  margin-top: clamp(56px, 9vh, 96px);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-links a {
  color: var(--ink-2);
}

/* ── Page publique ─────────────────────────────────────────────────────── */

.public-main {
  padding-top: clamp(44px, 7vh, 76px);
}

.status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding-bottom: clamp(34px, 5vw, 54px);
}

.status-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 14ch;
  text-wrap: balance;
}

.status-hero h1 em {
  font-style: italic;
  color: var(--ink-2);
}

.hero-lede {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 16.5px;
}

.hero-note {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.hero-note strong {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.overall {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
  border-radius: var(--radius);
  background: var(--tone-bg);
}
.overall.is-unknown {
  border-style: dashed;
}

.overall-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--white);
  color: var(--tone);
  box-shadow: var(--shadow-soft);
}
.overall-icon svg {
  width: 20px;
  height: 20px;
}

.overall-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.overall-text {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.overall-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.overall-side {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
  white-space: nowrap;
}
.overall-side strong {
  display: block;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.section {
  margin-top: clamp(44px, 7vh, 72px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 16px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(25px, 2.8vw, 32px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.section-lede {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 62ch;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend-swatch {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--swatch, var(--idle));
}

/* ── Registre des services ─────────────────────────────────────────────── */

.ledger {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.ledger-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.35fr) 118px 92px 142px minmax(150px, 0.9fr) 84px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: background-color 160ms ease;
}
.ledger-row:first-child {
  border-top: 0;
}
.ledger-row:hover {
  background: var(--sky-1);
}
.ledger-row:hover .service-name {
  text-decoration: underline;
  text-decoration-color: var(--sun-deep);
  text-decoration-thickness: 1px;
}

.ledger-service,
.service-name,
.service-desc {
  display: block;
}
.service-name {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.service-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.service-tags {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--sky-1);
  border-radius: 4px;
  padding: 2px 5px;
}

.cell-label {
  display: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.cell-value {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  flex: none;
}
.status-pill.is-large {
  font-size: 13px;
  padding: 7px 13px;
}

.ssl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tone);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
}
.ssl-badge svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.ledger-bars {
  width: 100%;
  min-width: 0;
}
.uptime-svg {
  width: 100%;
  height: 26px;
  display: block;
}
.uptime-svg rect {
  shape-rendering: crispEdges;
}
.uptime-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.ledger-uptime {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ── Incidents ─────────────────────────────────────────────────────────── */

.incident-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.incident-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.9fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
}
.incident-row:first-child {
  border-top: 0;
}

.incident-main {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}
.incident-main .status-dot {
  margin-top: 6px;
  color: var(--tone);
}

.incident-title {
  font-size: 14.5px;
  font-weight: 600;
}
.incident-title a {
  text-decoration: none;
}
.incident-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun-deep);
}
.incident-cause {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.incident-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}
.incident-meta strong {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.incident-duration {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  text-align: right;
}

.empty-state {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.panel-body.flush .empty-state {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  flex: none;
}
.empty-icon svg {
  width: 17px;
  height: 17px;
}
.empty-title {
  font-size: 14.5px;
  font-weight: 600;
}
.empty-text {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ── Détail d'un service ───────────────────────────────────────────────── */

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 26px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
}
.breadcrumb:hover {
  color: var(--ink);
}

.detail-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.detail-sub {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: 62ch;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.detail-grid .span-2 {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.panel-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.panel-body {
  padding: 18px 20px;
}
.panel-body.flush {
  padding: 0;
}

.kv {
  display: grid;
  gap: 0;
}
.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.kv-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.kv-row:last-child {
  padding-bottom: 0;
}
.kv-key {
  color: var(--muted);
  font-size: 12.5px;
}
.kv-value {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.status-line .message {
  color: var(--ink-2);
  font-size: 13.5px;
}

.chart {
  width: 100%;
  height: 170px;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.chart-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.chart-area {
  fill: var(--sky-2);
  opacity: 0.45;
}
.chart-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}
.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.components {
  display: grid;
  gap: 0;
}
.component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.component-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.component-name {
  font-size: 13.5px;
  font-weight: 500;
}
.component-detail {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr:last-child td {
  border-bottom: 0;
}
table.data tr:hover td {
  background: var(--sky-1);
}
table.data .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.data .message-cell {
  max-width: 360px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* ── Boutons / formulaires ─────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}
.button:hover {
  background: var(--sky-1);
  border-color: var(--ink-2);
}
.button:active {
  transform: translateY(1px);
}
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button svg {
  width: 15px;
  height: 15px;
}

.button-primary {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
}
.button-primary:hover {
  background: var(--sun-deep);
  border-color: var(--sun-deep);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
}
.button-ghost:hover {
  background: var(--sky-1);
  border-color: transparent;
}

.button-danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
  background: transparent;
}
.button-danger:hover {
  background: var(--bad-bg);
  border-color: var(--bad);
}

.button-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.field {
  display: grid;
  gap: 6px;
}
.field > label,
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--sans);
}
.field textarea {
  min-height: 84px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
  border-color: var(--ink);
}
.field-help {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.field-help code {
  background: var(--sky-1);
  padding: 1px 4px;
  border-radius: 4px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.form-grid .span-2 {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--white);
}
.notice svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.notice-ok {
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
  color: var(--ok);
}
.notice-error {
  background: var(--bad-bg);
  border-color: color-mix(in srgb, var(--bad) 25%, transparent);
  color: var(--bad);
}
.notice-warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
  color: var(--warn);
}

/* ── Console ───────────────────────────────────────────────────────────── */

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
}
.admin-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}
.admin-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin-left: 8px;
}
.admin-tab {
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.admin-tab:hover {
  background: var(--sky-1);
  color: var(--ink);
}
.admin-tab.is-active {
  background: var(--ink);
  color: var(--white);
}
.admin-header .header-meta {
  margin-left: auto;
}

.admin-main {
  padding-top: clamp(30px, 5vh, 52px);
  padding-bottom: 40px;
}

.admin-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
}
.admin-title-row h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.admin-title-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.stat {
  padding: 17px 20px;
  border-left: 1px solid var(--line);
}
.stat:first-child {
  border-left: 0;
}
.stat-value {
  font-family: var(--mono);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
}
.stat-label {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat.is-down .stat-value {
  color: var(--bad);
}
.stat.is-degraded .stat-value {
  color: var(--warn);
}
.stat.is-up .stat-value {
  color: var(--ok);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.admin-stack {
  display: grid;
  gap: 18px;
}

.env-list {
  display: grid;
  gap: 0;
}
.env-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.env-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.env-key {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.env-state {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tone, var(--muted));
  white-space: nowrap;
}
.env-state.is-set {
  color: var(--ok);
}
.env-state.is-missing {
  color: var(--bad);
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 68px);
  padding: 40px 20px;
}
.login-panel {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.login-panel h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.login-panel .lede {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.setup-panel {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.setup-panel h2 {
  font-size: 15px;
  font-weight: 600;
}
.setup-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.setup-panel pre {
  margin: 12px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  background: var(--deep);
  color: var(--pale, #eaf3f8);
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.7;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover {
  text-decoration-color: var(--sun-deep);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .status-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: baseline;
    padding-bottom: 0;
  }
  .hero-note strong {
    display: inline;
  }
  .ledger-row {
    grid-template-columns: minmax(190px, 1.2fr) 112px 84px 142px minmax(130px, 0.9fr) 78px;
    gap: 12px;
    padding: 16px 18px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-nav {
    display: none;
  }
  .ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    align-items: start;
  }
  .ledger-row > .ledger-service {
    grid-column: 1 / -1;
  }
  .ledger-cell {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }
  .ledger-cell:nth-child(4) {
    grid-column: 1 / -1;
  }
  .cell-label {
    display: inline;
  }
  .ledger-bars {
    grid-column: 1 / -1;
  }
  .ledger-uptime {
    text-align: left;
  }
  .ledger-uptime .cell-label {
    display: inline;
    margin-right: 6px;
  }
  .incident-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .incident-duration {
    text-align: left;
  }
  .overall {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .overall-side {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 4px;
    border-top: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
    display: flex;
    gap: 16px;
    align-items: baseline;
    white-space: normal;
  }
  .overall-side strong {
    display: inline;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: auto;
  }
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(3) {
    border-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .admin-header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .admin-tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 2px;
  }
  .admin-header .header-meta {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 18px;
  }
  .header-meta .live {
    display: none;
  }
  .status-hero h1 {
    font-size: clamp(38px, 11vw, 48px);
  }
  .overall {
    padding: 18px;
  }
  .overall-icon {
    width: 36px;
    height: 36px;
  }
  .ledger-row {
    padding: 15px 16px;
  }
  .incident-row {
    padding: 15px 16px;
  }
  .panel-head,
  .panel-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  table.data th,
  table.data td {
    padding-left: 12px;
    padding-right: 12px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .login-panel {
    padding: 24px 20px;
  }
  .detail-head h1 {
    font-size: clamp(32px, 10vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .live,
  .detail-actions,
  .admin-header {
    display: none !important;
  }
  body {
    background: var(--white);
  }
  .panel,
  .ledger,
  .incident-list {
    box-shadow: none;
  }
}
