/* Hub des outils de manager — charte reprise à l'identique de ./disc, dont
   ./moving-motivator hérite déjà. Les tokens généraux sont les leurs, au
   caractère près : le hub doit ressembler aux pages qu'il ouvre, sinon le
   passage de l'index à l'outil se lit comme un changement de site.

   Les dix couleurs de motivateurs et les quatre couleurs DISC ne sont pas
   reprises : le hub ne montre aucune donnée d'outil, il n'en a pas besoin. */

:root {
  color-scheme: light;
  --bg: #f5ead8;
  --surface: #ebddc5;
  --raise: #f9f4ed;
  --ink: #201e1d;
  --ink-2: #645c50;
  --ink-3: #82796a;
  --line: #dcd3c4;
  --line-2: #c0b6a5;
  --accent: #8c491a;
  --accent-fill: #c67139;
  --accent-soft: #ffe1d0;
  --focus: #8c491a;

  --shadow-sm: 0 1px 2px rgba(46, 43, 37, 0.14);
  --shadow-md: 0 3px 10px rgba(46, 43, 37, 0.16);
  --shadow-lg: 0 18px 44px rgba(46, 43, 37, 0.18);

  --r-sm: 8px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;

  --titre: 'Bricolage Grotesque', system-ui, sans-serif;
  --texte: 'Figtree', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17150f;
    --surface: #221f18;
    --raise: #2b2720;
    --ink: #f4ebda;
    --ink-2: #c2b7a2;
    --ink-3: #9c9182;
    --line: #3a352b;
    --line-2: #4d463a;
    --accent: #f0a86e;
    --accent-fill: #b2622d;
    --accent-soft: #3a2a1c;
    --focus: #f0a86e;

    --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

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

h1, h2 { font-family: var(--titre); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(34px, 6vw, 50px); margin: 0 0 8px; }
p { margin: 0 0 1rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.discret { color: var(--ink-2); }
.tres-discret { color: var(--ink-3); font-size: 15px; }
.pousse { margin-left: auto; }

.sur-titre {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.large { max-width: 1240px; margin: 0 auto; padding: 0 40px; width: 100%; }
main { flex: 1; }

.entete { border-bottom: 1px solid var(--line); background: var(--bg); }
.entete > div { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.marque { font-family: var(--titre); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.baseline { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }

.accueil { padding: 56px 0 40px; max-width: 640px; }
.accroche { font-size: 19px; color: var(--ink-2); margin: 0; }

/* ── La grille ──────────────────────────────────────────────────────────── */

/* `auto-fit` plutôt qu'un nombre de colonnes fixe : à deux outils la grille
   tient sur une ligne, à cinq elle se replie toute seule. C'est la raison pour
   laquelle ajouter un outil ne demande de toucher qu'à `outils.js`. */
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
  padding-bottom: 40px;
}

.carte {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.carte:hover {
  background: var(--raise);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.carte:active { transform: translateY(0); }

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

.carte-format {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.carte-nom { font-size: clamp(24px, 3vw, 30px); margin: 0; }

.carte-accroche { color: var(--ink-2); margin: 0; flex: 1; }

.carte-ouvrir {
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}
/* La flèche avance au survol. Le décalage est porté par un élément à part :
   animer la marge du texte le ferait vibrer sur les rendus subpixel. */
.carte-ouvrir span {
  display: inline-block;
  transition: transform 0.15s ease;
}
.carte:hover .carte-ouvrir span { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .carte-ouvrir span { transition: none; }
  .carte:hover .carte-ouvrir span { transform: none; }
}

/* ── Pied de page ───────────────────────────────────────────────────────── */

.pied {
  border-top: 1px solid var(--line);
  padding: 26px 0 60px;
}
.pied p { margin: 0; max-width: 640px; }

@media (max-width: 640px) {
  .large { padding: 0 22px; }
  .entete > div { padding-top: 16px; padding-bottom: 16px; }
  .accueil { padding: 40px 0 32px; }
  .carte { padding: 24px; }
}
