/* Un en-tête de synthèse, puis une grille de tuiles cliquables. Thème clair ou sombre selon le système. */
:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --ink: #141b2d;
  --muted: #5a657c;
  --line: #d3dae6;
  --accent: #2f55d4;
  --ok: #17855a;
  --ok-bg: #dcf3e8;
  --down: #b3261e;
  --down-bg: #fbe3e1;
  --tile-s: 62%;
  --tile-l: 46%;
  --shadow: 0 1px 2px rgba(20, 27, 45, .06), 0 8px 24px -12px rgba(20, 27, 45, .18);
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1220;
    --surface: #161d30;
    --ink: #e8ecf6;
    --muted: #97a3bd;
    --line: #2a3450;
    --accent: #8aa4ff;
    --ok: #5fd6a2;
    --ok-bg: #143a2c;
    --down: #ff8a80;
    --down-bg: #4a1b18;
    --tile-s: 55%;
    --tile-l: 58%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 32px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.top h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.top p { margin: 8px 0 0; color: var(--muted); max-width: 52ch; }
.counts { display: flex; gap: 28px; margin: 0; }
.counts div { display: flex; flex-direction: column; }
.counts dt { order: 2; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.counts dd { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.app:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.h0 { background: hsl(228 var(--tile-s) var(--tile-l)); }
.h1 { background: hsl(12 var(--tile-s) var(--tile-l)); }
.h2 { background: hsl(196 var(--tile-s) var(--tile-l)); }
.h3 { background: hsl(32 var(--tile-s) var(--tile-l)); }
.h4 { background: hsl(168 var(--tile-s) var(--tile-l)); }
.h5 { background: hsl(284 var(--tile-s) var(--tile-l)); }
.h6 { background: hsl(340 var(--tile-s) var(--tile-l)); }
.h7 { background: hsl(96 var(--tile-s) var(--tile-l)); }
.app-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.app-title h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0; }
.arrow { color: var(--muted); font-size: 18px; transition: transform .15s ease, color .15s ease; }
.app:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.url { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); overflow-wrap: anywhere; }
.app p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.meta { grid-column: 1 / -1; display: flex; margin-top: 6px; font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.down { background: var(--down-bg); color: var(--down); }
.empty { color: var(--muted); margin: 0; }
footer { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .app, .arrow { transition: none; }
  .app:hover { transform: none; }
}
