/* Thème par défaut — chaque variable peut être changée pour créer un autre style */
:root {
  --fond: #f3eee3;
  --texte: #111111;
  --doux: #777777;
  --bord: #cccccc;
  --accent: #e10600;   /* puces, ENS du logo, bouton play, barre */
  --lien: #111111;     /* liens, boucle active */
  --police: "Noto Sans Mono", "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  --h1-prefixe: "";
  --h2-prefixe: "";
  --puce: "■";
  --separateur: "";
  --compte-avant: "(";
  --compte-apres: ")";
  --num: none;         /* "inline" pour afficher les numéros 01, 02… */
  color-scheme: light;
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--fond); }

.recueil {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1.02rem;
  line-height: 1.65;
}

.recueil ::selection { background: var(--accent); color: var(--fond); }

.entete, .recueil main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}
.entete { padding-block: 40px 8px; }
.recueil main { padding-bottom: 64px; }

/* ---------- En-tête ---------- */
.recueil h1 {
  margin: 0;
  font-family: var(--police-titre, inherit);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  line-height: 1.3;
}
.recueil h1::before { content: var(--h1-prefixe); color: var(--accent); }
.intro { margin: 12px 0 0; max-width: 52ch; }
.pied {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--doux);
  font-size: .85rem;
  text-align: center;
}
.compte { margin: 4px 0 0; color: var(--doux); font-size: .9rem; }
.compte::before { content: var(--compte-avant); }
.compte::after { content: var(--compte-apres); }

.recueil a { color: var(--lien); text-decoration: none; }
.recueil a:hover { color: var(--accent); }

.num { display: var(--num); color: var(--accent); }

/* Logo image + titre côte à côte */
.marque { display: flex; align-items: center; gap: 16px; }
.logo { width: 96px; height: 96px; flex: none; }

/* « ~ / » rouge : lien vers la page perso */
.recueil .maison {
  flex: none;
  color: var(--accent);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 700;
  white-space: nowrap;
}
.recueil .maison:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Page perso ---------- */
.perso section { margin-top: 36px; }
.recueil.perso h2 { font-size: 1.2rem; }
.recueil.perso h2::before { content: var(--puce) " "; color: var(--accent); margin-right: 0; }
.perso p { margin: 8px 0 0; }
.perso ul { list-style: none; margin: 8px 0 0; padding: 0; }
.perso li { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.perso li img { width: 40px; height: 40px; flex: none; }
.a-remplir { color: var(--doux); font-style: italic; }

/* ---------- Pile ou booléen (chat de jeu) ---------- */
.perso .interet-pob { flex-wrap: wrap; gap: 4px 12px; }
.choix { display: inline-flex; gap: 10px; }
.chat {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 8px 12px;
  border-left: 2px solid var(--bord);
}
.perso .chat .ligne { margin: 2px 0; animation: apparait .2s ease-out; }
.chat .auteur { color: var(--doux); }
.chat .heure { color: var(--doux); font-size: .8rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.btn-texte.btn-choix::before { content: "[> "; }
.btn-texte.btn-choix::after  { content: "]"; }
.chat .lui { color: var(--accent); font-weight: 700; }
.chat .meme {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 6px 0 4px;
  border: 2px solid var(--accent);
  animation: apparait .3s ease-out;
}
@keyframes apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat .ligne, .chat .meme { animation: none; } }

.btn-texte {
  padding: 0;
  border: none;
  background: none;
  color: var(--texte);
  font: inherit;
  cursor: pointer;
}
.btn-texte::before { content: "[ "; color: var(--doux); }
.btn-texte::after  { content: " ]"; color: var(--doux); }
.btn-texte:hover { color: var(--accent); }
.btn-texte:disabled { opacity: .5; cursor: wait; }
.btn-texte:focus-visible { outline: 1px dashed var(--accent); outline-offset: 2px; }


@media (max-width: 480px) {
  .marque { gap: 10px; }
  .logo { width: 56px; height: 56px; }
  .recueil h1, .recueil .maison { font-size: 1.25rem; }
}

.recueil h2 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 0;
  font-family: var(--police-titre, inherit);
  font-size: 1.4rem;
  line-height: 1.3;
}
.recueil h2::before { content: var(--h2-prefixe); color: var(--accent); margin-right: -12px; }
.recueil h2 .num { font-size: .9rem; font-weight: 400; }
