/* ermdx : page d'accueil. Barre avec le logo, titre, grille de deux colonnes de fiches d'apps.
   Une seule famille (Geist), palette neutre bleutée, accent bleu réservé aux liens et au survol. */

@font-face { font-family: "Geist"; src: url("fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #16192b;
  --muted: #5b6172;
  --line: #e3e5eb;
  --accent: #2547d0;
  --mark-fg: #ffffff;
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1018;
    --surface: #161925;
    --ink: #eceef4;
    --muted: #9aa0b1;
    --line: #262a3b;
    --accent: #8ea2ff;
    --mark-fg: #0e1018;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bar, .page, .foot {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.bar { padding-block: 1.5rem; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  border-radius: 0.5rem;
}
.logo-mark { width: 2rem; height: 2rem; display: block; }
.logo-mark .mark-bg { fill: var(--ink); }
.logo-mark .mark-fg { fill: var(--mark-fg); }
.logo-word { height: 1.15rem; width: auto; display: block; fill: currentColor; }

.page {
  flex: 1;
  padding-block: clamp(2.5rem, 7vw, 5rem) 4rem;
  display: grid;
  gap: 2rem;
  align-content: start;
}

.title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.app {
  height: 100%;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  color: inherit;
  text-decoration: none;
}
.app:hover { border-color: var(--accent); }
.app:focus-visible, .logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-icon { width: 3.5rem; height: 3.5rem; border-radius: 0.8rem; display: block; }

.app-text { display: grid; gap: 0.3rem; min-width: 0; }
.app-name { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.3; }
.app-desc { color: var(--muted); font-size: 0.95rem; }
.app-url { margin-top: 0.35rem; font-weight: 500; font-size: 0.875rem; color: var(--accent); overflow-wrap: anywhere; }

.foot {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .app { transition: border-color 150ms ease; }
}
