:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --text: #1b1a22;
  --muted: #5d5b6b;
  --border: #e3e1ec;
  --accent: #5b4bd6;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(20 18 40 / 6%), 0 4px 16px rgb(20 18 40 / 6%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131f;
    --surface: #1f1c2c;
    --text: #ece9f6;
    --muted: #a7a3b8;
    --border: #322e44;
    --accent: #9d8fff;
    --accent-text: #15131f;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hero {
  text-align: center;
  padding: 56px 16px 24px;
}
.hero .logo { border-radius: 14px; }
.hero h1 { margin: 12px 0 4px; font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--muted); }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

h2 { font-size: 1.25rem; margin: 40px 0 16px; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover, a.card:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
}
.icon.letter {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 1.4rem;
}

.card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .host { margin-top: 8px; font-size: 0.85rem; color: var(--accent); }

.apps { display: grid; gap: 16px; }
.app { flex-wrap: wrap; }
.app .body { flex: 1 1 200px; min-width: 0; }
.app .meta { margin: 2px 0 8px; font-size: 0.85rem; }
.app .actions { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }

.button {
  align-self: flex-start;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hash { margin: 0; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.hash code { font-size: 0.75rem; }

.help {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.help summary { cursor: pointer; font-weight: 600; }
.help ol { padding-left: 20px; }
.help li { margin: 6px 0; }
.help p { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Legal pages (confidentialite/) */
.legal { max-width: 760px; }
.legal a { color: var(--accent); }
.legal code { font-size: 0.85em; overflow-wrap: anywhere; }
.legal .bullets { list-style: disc; padding-left: 20px; }
.legal .bullets li { margin: 8px 0; }
.legal .updated { margin-top: 32px; color: var(--muted); font-size: 0.85rem; }
.app .links { margin: 0; font-size: 0.85rem; }
.app .links a { color: var(--accent); }

footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
