:root { --bg: #fdfcf8; --fg: #1d1d1f; --muted: #6b6b70; --accent: #e95420; --line: #e4e2dc; }
@media (prefers-color-scheme: dark) { :root { --bg: #16161a; --fg: #ececf0; --muted: #9a9aa2; --line: #2c2c33; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.55 system-ui, sans-serif; }
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }
nav { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
a { color: var(--accent); }
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 8px; }
.date { color: var(--muted); font-size: 15px; }
ul.links { list-style: none; padding: 0; }
ul.links li { border-top: 1px solid var(--line); padding: 14px 0; }
a.big { font-size: 1.3rem; font-weight: 600; text-decoration: none; }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; text-align: left; }
pre { background: color-mix(in srgb, var(--fg) 6%, transparent); padding: 12px; overflow-x: auto; font-size: 14px; }

/* ---------- Charte « néon » (comme les diaporamas) : <body class="charte"> ----------
   Accueil et pages d'atelier. Les pages à imprimer (cheat sheet) gardent le style ci-dessus. */
@font-face { font-family: "Inter Variable"; font-weight: 100 900; font-display: swap; src: url(vendor/inter/inter-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat Variable"; font-weight: 400 700; font-display: swap; src: url(vendor/caveat/caveat-latin-wght-normal.woff2) format("woff2"); }
.charte {
  --bg: #000; --fg: #fff; --muted: rgba(255, 255, 255, .65); --line: rgba(255, 255, 255, .14);
  --neon: #00ff9c; --accent: var(--neon); --carte: #0d0f12;
  font-family: "Inter Variable", "Inter", system-ui, sans-serif;
  background: radial-gradient(ellipse 80% 50% at 50% 0, rgba(0, 255, 156, .14), transparent 70%) no-repeat, var(--bg);
}
.charte main { max-width: 980px; }
.charte nav a { color: var(--muted); text-decoration: none; }
.charte h1 { font-weight: 900; letter-spacing: -.02em; }
.mono, .invite, .terminal { font-family: "DejaVu Sans Mono", ui-monospace, "Courier New", monospace; }

/* En-tête de l'accueil */
.accueil { padding: 32px 0 40px; }
.accueil .invite { margin: 0 0 8px; color: var(--neon); font-size: 15px; }
.accueil h1 { font-size: clamp(2.6rem, 9vw, 4.5rem); color: var(--neon); text-shadow: 0 0 24px rgba(0, 255, 156, .55); }
.accueil p { max-width: 36em; color: var(--muted); }

/* Cartes d'atelier : grille qui passe à la ligne toute seule */
ul.cartes { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.carte {
  position: relative; display: flex; flex-direction: column; padding: 0 22px 22px; overflow: hidden;
  background: var(--carte); border: 1px solid var(--line); border-radius: 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.carte:hover, .carte:focus-within { transform: translateY(-4px); border-color: var(--neon); box-shadow: 0 10px 40px rgba(0, 255, 156, .2); }
.carte .visuel {
  display: grid; place-items: center; height: 190px; margin: 0 -22px 18px;
  background: linear-gradient(rgba(0, 255, 156, .07) 1px, transparent 1px) 0 0 / 22px 22px,
              linear-gradient(90deg, rgba(0, 255, 156, .07) 1px, transparent 1px) 0 0 / 22px 22px, #06080a;
  border-bottom: 1px solid var(--line);
}
.carte .visuel img { max-height: 150px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); transition: transform .3s; }
.carte:hover .visuel img { transform: rotate(-4deg) scale(1.05); }
.carte .surtitre { margin: 0 0 4px; color: var(--neon); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.carte h2 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 900; line-height: 1.15; }
.carte h2 a { color: var(--fg); text-decoration: none; }
.carte h2 a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.carte p:last-child { margin: 0; color: var(--muted); font-size: 16px; }

/* Mini-terminal (visuel de carte) */
.terminal {
  width: 78%; margin: 0; padding: 14px 16px; font-size: 14px; line-height: 1.6; white-space: pre;
  background: #0b0f0b; color: #c8ffd9; border: 2px solid rgba(0, 255, 156, .5); border-radius: 10px; box-shadow: 0 0 30px rgba(0, 255, 156, .2);
}
.terminal b { color: var(--neon); font-weight: 400; }
.terminal i { display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--neon); animation: clignote 1s steps(1) infinite; }
@keyframes clignote { 50% { opacity: 0; } }

/* Pages d'atelier : la liste de liens devient des tuiles */
.charte ul.links { display: grid; gap: 12px; }
.charte ul.links li {
  position: relative; padding: 16px 20px; color: var(--muted); font-size: 16px;
  background: var(--carte); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, transform .2s;
}
.charte ul.links li:hover { border-color: var(--neon); transform: translateX(4px); }
.charte ul.links a.big { color: var(--fg); }
.charte ul.links a.big::after { content: ""; position: absolute; inset: 0; }
.charte ul.links li a:not(.big) { position: relative; z-index: 1; } /* les petits liens restent cliquables */

.credits { margin-top: 48px; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .carte, .carte *, .charte ul.links li, .terminal i { transition: none; animation: none; } }

/* Aperçus d'une page d'atelier : captures du diaporama et du jeu, en grille */
.apercus { display: grid; gap: 16px; margin: 24px 0; padding: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.apercus figure { margin: 0; }
.apercus img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.apercus figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; }
