/* Anofelis Web — style commun.
   Palette : nuit d'Arkham (fond), papier de guide (texte), dorure (accent). */

/* Polices du site, servies par le site lui-même depuis le 2026-10-04 (rien n'est plus demandé à Google) : IM Fell English
   (Igino Marini) et Alegreya Sans (Huerta Tipográfica), licence SIL OFL 1.1 — textes dans public/fonts/OFL-*.txt.
   Les fichiers et leurs plages de caractères sont ceux que Google Fonts servait au site : le navigateur ne charge que
   ceux dont la page a besoin. Bloc régénéré par scripts/build_polices.py — ne pas le modifier à la main. */
/* polices:debut */
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400i-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/alegreya-sans-v28-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/alegreya-sans-v28-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/alegreya-sans-v28-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/im-fell-english-v14-400i-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/im-fell-english-v14-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* polices:fin */

:root {
  --nuit: #1e2d33;
  --nuit-2: #253840;
  --papier: #e6dcc3;
  --papier-2: #b9ae95;
  --dorure: #c8a25a;
  --dorure-2: #e0c07a;
  --ok: #8fbf9f;
  --wip: #d08a3e;
  --prevu: #7f8c88;
  --filet: rgba(230, 220, 195, 0.18);
  --sceau: #8c2f26;   /* cire du sceau « 18+ » (catégorie Taboo : galerie, fenêtre des illustrations des tables) */

  --serif: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --sans: "Alegreya Sans", "Gill Sans", "Segoe UI", system-ui, sans-serif;

  --mesure: 64rem;
  --pas: 0.5rem;
}

* { box-sizing: border-box; }

html { background: var(--nuit); color: var(--papier); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--dorure-2); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--papier); }

:focus-visible { outline: 2px solid var(--dorure-2); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; }

/* En‑tête commun --------------------------------------------------- */

.entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--mesure);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.entete .marque {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--papier);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.entete .marque:hover { color: var(--dorure-2); }

.entete nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1.5rem; }
.entete nav a { white-space: nowrap; }

/* Accueil : « Join a table » dans le bandeau, à la suite des liens (2026-10-04) — libellé, champ de code compact et
   bouton sur une ligne ; l'aide ne se montre que pour dire une erreur, sous le champ. Bandeau étroit : le groupe passe
   à la ligne, à droite. */
.entete-accueil { flex-wrap: wrap; gap: 0.6rem 1.75rem; }
.entete-accueil nav { margin-left: auto; }
.rejoindre-barre { position: relative; display: flex; align-items: baseline; gap: 0.6rem; margin-left: auto; }
.rejoindre-barre label { white-space: nowrap; color: var(--papier-2); }
.rejoindre-barre .code-saisie { font-size: 1.05rem; letter-spacing: 0.25em; width: 7.4em; padding: 0.3rem 0 0.3rem 0.5em; border-bottom-width: 1px; }
.rejoindre-barre .bouton { padding: 0.25rem 0.85rem; font-size: 0.95rem; }
.rejoindre-barre .aide { position: absolute; right: 0; top: calc(100% + 0.35rem); margin: 0; white-space: nowrap; font-size: 0.9rem; color: var(--papier-2); }
.rejoindre-barre .aide.erreur { color: var(--wip); }
@media (max-width: 720px) {
  .entete-accueil nav { margin-left: 0; justify-content: flex-start; }
  .rejoindre-barre { margin-left: 0; flex-wrap: wrap; }
  .rejoindre-barre .aide { position: static; flex-basis: 100%; white-space: normal; }
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--mesure);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.pied {
  max-width: var(--mesure);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--papier-2);
  font-size: 0.9rem;
  border-top: 1px solid var(--filet);
}

/* Accueil ---------------------------------------------------------- */

/* Logo de la boutique en filigrane (accueil, bibliothèque ; page Tester un deck via
   joueur.css) : le fichier est un masque (blanc + alpha) posé en haut à gauche, dans la
   marge de la colonne, teinté dorure et presque transparent — le dessin passe sous le
   titre comme une gravure de garde. C'est un lien vers l'accueil, premier enfant de la
   page, peint avant ses frères en-tête, colonne et pied (positionnés, donc au-dessus) :
   il ne se clique que là où rien ne le recouvre, dans la marge.
   Sans prise en charge des masques, rien n'est peint (pas de carré plein). */
.filigrane {
  position: absolute;
  top: -3rem;
  left: max(calc(50% - 54rem), -4rem);
  width: 28rem;
  aspect-ratio: 800 / 790;
  opacity: 0.19;
}
.filigrane ~ .entete, .filigrane ~ main, .filigrane ~ .pied { position: relative; }
@supports ((mask-image: url("")) or (-webkit-mask-image: url(""))) {
  .filigrane {
    background: var(--dorure);
    -webkit-mask: url("/img/anofelis-logo.webp") center / contain no-repeat;
    mask: url("/img/anofelis-logo.webp") center / contain no-repeat;
  }
}
.filigrane:hover, .filigrane:focus-visible { opacity: 0.34; outline: 0; }

.accueil h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  max-width: 18ch;
  margin-top: 2.5rem;
}

/* Lettre aux joueurs : la police du titre (un caractère d'imprimeur du XVIIe), un filet
   court en guise d'en-tête, salutation et signature en dorure. */
.lettre {
  max-width: 58ch;
  margin: 2rem 0 3rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
}
.lettre::before {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--dorure);
  margin-bottom: 1.6rem;
}
.lettre p { margin: 0 0 0.9em; }
.lettre .salut { font-style: italic; color: var(--dorure-2); }
.lettre .adieu { margin-top: 1.5em; }
.lettre .signature {
  font-size: 1.7rem;
  color: var(--dorure-2);
  margin: 0.15em 0 0 3ch;
}
.lettre a { color: var(--dorure-2); }
.lettre a:hover { color: var(--papier); }

.rejoindre {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 3rem;
  padding: 0;
  border: 0;
}

.rejoindre legend {
  font-family: var(--serif);
  font-size: 1.5rem;
  padding: 0;
  margin-bottom: 0.5rem;
}

.rejoindre .ligne { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }

.code-saisie {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  width: 6.2em;
  padding: 0.25rem 0 0.25rem 0.35em;
  background: var(--nuit-2);
  color: var(--papier);
  border: 0;
  border-bottom: 2px solid var(--dorure);
  border-radius: 0;
}
.code-saisie::placeholder { color: var(--papier-2); opacity: 0.55; }

.rejoindre .aide { color: var(--papier-2); font-size: 0.95rem; margin: 0; }

.bouton {
  font: inherit;
  font-weight: 500;
  padding: 0.55rem 1.2rem;
  background: var(--dorure);
  color: var(--nuit);
  border: 1px solid var(--dorure);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.3;
}
.bouton:hover { background: var(--dorure-2); border-color: var(--dorure-2); color: var(--nuit); }
.bouton:disabled { opacity: 0.45; cursor: not-allowed; }

.bouton.secondaire {
  background: transparent;
  color: var(--dorure-2);
}
.bouton.secondaire:hover { background: var(--nuit-2); }

/* Les autres fonctions du site, à la suite du champ de code : un lien-titre et une ligne
   qui dit ce que l'on y fait. */
.fonctions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.fonctions p { max-width: 58ch; margin: 0.3rem 0 0; color: var(--papier-2); }
.accueil .vers-biblio {
  font-family: var(--serif);
  font-size: 1.5rem;
  display: table;
}

/* Pied de l'accueil : la boutique Etsy et le Patreon en plaques cliquables (pictogrammes
   maison au trait, dans la dorure du site), puis la mention et les liens en toutes lettres. */
.pied-accueil { padding-top: 2rem; }
.ailleurs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  max-width: 44rem;
  margin: 0 0 1.75rem;
}
.plaque {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--dorure);
  border-radius: 3px;
  color: var(--papier);
  text-decoration: none;
}
.plaque:hover, .plaque:focus-visible { background: var(--nuit-2); color: var(--papier); }
.plaque svg { flex: 0 0 auto; width: 3rem; height: 3rem; color: var(--dorure-2); }
.plaque .texte { display: grid; gap: 0.1rem; }
.plaque .nom { font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; color: var(--dorure-2); }
.plaque:hover .nom { color: var(--papier); }
.plaque .mot { font-size: 0.9rem; color: var(--papier-2); line-height: 1.35; }
.pied .mentions { margin: 0 0 0.5rem; }
.pied a[href="/about"] { margin-right: 1.1rem; }   /* le lien « Contact » le suit (marge à droite : pas de retrait s'il passe à la ligne) */
.pied a[aria-current] { color: var(--papier-2); text-decoration: none; }
.pied .liens { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

/* À propos (/about) ------------------------------------------------ */

/* Mentions du site : une colonne de lecture, le filet court de la lettre de l'accueil sous le titre. La première
   section — ce qu'est le projet — est dans la police des titres, comme la lettre ; le reste en texte courant.
   Chaque section a son ancre (le pied des autres pages et les liens du site y mènent). */
.apropos h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 1.5rem; }
.apropos h1::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--dorure);
  margin-top: 1.6rem;
}
.apropos section { max-width: 62ch; margin-top: 2.5rem; scroll-margin-top: 1.5rem; }
.apropos .chapeau { margin-top: 1.8rem; }
.apropos h2 { font-size: 1.55rem; margin-bottom: 0.7rem; }
.apropos p { margin: 0 0 0.8em; }
.apropos p:last-child { margin-bottom: 0; }
.apropos .chapeau p { font-family: var(--serif); font-size: 1.2rem; }

/* Contact (/contact) ----------------------------------------------- */

/* Formulaire de contact : la colonne et le filet de la page « About », les champs du site (fond de nuit claire, filet de
   dorure dessous). Le champ piège est hors écran plutôt que masqué : un robot qui ignore les champs cachés le remplit
   quand même. Après l'envoi, le formulaire laisse la place au mot de remerciement. */
.contact h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 1.5rem; }
.contact h1::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: var(--dorure);
  margin-top: 1.6rem;
}
.contact .chapeau { max-width: 62ch; margin: 1.8rem 0 0; font-family: var(--serif); font-size: 1.2rem; }
.contact form { display: grid; gap: 1.6rem; max-width: 40rem; margin-top: 2.2rem; }
.contact form[hidden] { display: none; }   /* la grille l'emporterait sur l'attribut hidden */
.contact .genre { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.contact .genre legend, .contact .champ > label { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; padding: 0; margin-bottom: 0.5rem; }
.contact .genre label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.contact .genre input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--dorure); }
.contact .champ { display: grid; }
.contact .champ textarea, .contact .champ input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  background: var(--nuit-2);
  color: var(--papier);
  border: 0;
  border-bottom: 2px solid var(--dorure);
  border-radius: 0;
}
.contact .champ textarea { min-height: 9rem; line-height: 1.45; resize: vertical; }
.contact .champ #table { width: 9em; letter-spacing: 0.2em; text-transform: uppercase; }
.contact .aide { margin: 0.4rem 0 0; color: var(--papier-2); font-size: 0.95rem; }
.contact .aide.erreur { color: var(--wip); }
.contact .envoi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.25rem; }
.contact .envoi .aide { flex: 1 1 16rem; margin: 0; }
.contact .piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact #merci { max-width: 62ch; margin-top: 2.2rem; }
.contact #merci:focus { outline: 0; }
.contact #merci h2 { font-size: 1.55rem; margin-bottom: 0.7rem; }
.contact #merci p { margin: 0 0 0.8em; }

/* Bibliothèque ----------------------------------------------------- */

.biblio h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.biblio .legende {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1rem 0 2.5rem;
  color: var(--papier-2);
  font-size: 0.95rem;
}

.campagne { margin: 0 0 2.5rem; }

.campagne header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--dorure);
}

.campagne h2 { font-size: 1.9rem; }
.campagne .boite { color: var(--papier-2); font-size: 0.95rem; }

/* Libellé de boîte cliquable → guide de campagne FFG (PDF). */
.campagne a.boite {
  text-decoration: underline dotted;
  text-decoration-color: rgba(185, 174, 149, 0.6);
  text-underline-offset: 0.22em;
}
.campagne a.boite::after { content: " \2197"; font-size: 0.85em; opacity: 0.75; }
.campagne a.boite:hover { color: var(--dorure-2); text-decoration-color: currentColor; }

/* Bandeau : une image du guide de campagne derrière le titre (library.json → banner).
   Déborde de la colonne de texte sur la marge de <main>, bords fondus dans la nuit
   comme les illustrations à bords déchirés des guides ; le titre reste aligné sur la liste. */
.campagne header.bandeau {
  position: relative;
  isolation: isolate;
  align-content: flex-end;
  min-height: 8.5rem;
  margin: 0 -1.5rem;
  padding: 0.75rem 1.5rem 0.55rem;
  border-bottom: 0;
}
.campagne header.bandeau::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(30, 45, 51, 0.96) 0, rgba(30, 45, 51, 0.7) 32%, rgba(30, 45, 51, 0.22) 62%, rgba(30, 45, 51, 0.06) 100%),
    var(--bandeau) var(--bandeau-pos, center) / cover no-repeat var(--nuit-2);
  border-bottom: 1px solid var(--dorure);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
    linear-gradient(to bottom, transparent, #000 28%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 5%, #000 95%, transparent),
    linear-gradient(to bottom, transparent, #000 28%);
  mask-composite: intersect;
}
.campagne header.bandeau h2 {
  font-size: 2.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 14px rgba(0, 0, 0, 0.55);
}
.campagne header.bandeau .boite { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }

.campagne ol { list-style: none; margin: 0; padding: 0; }

.scenario {
  display: grid;
  grid-template-columns: 5.5rem 1fr 8.5rem auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--filet);
}

.scenario .num { font-family: var(--serif); color: var(--papier-2); }
.scenario .titre { font-weight: 500; }
.scenario .note { display: block; color: var(--papier-2); font-size: 0.9rem; font-weight: 400; }
/* Livret propre à un scénario indépendant (PDF FFG) : lien discret sous le titre, comme une note. */
.scenario a.livret { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-color: var(--filet); }
.scenario a.livret:hover { color: var(--papier); }

.statut {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--papier-2);
  white-space: nowrap;
}
.statut::before {
  content: "";
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
}
.statut.available { color: var(--ok); }
.statut.creation { color: var(--wip); }

.scenario .action { min-width: 8.5rem; text-align: right; }
.scenario .action .bouton { font-size: 0.95rem; padding: 0.35rem 0.9rem; }

/* Scénario en cours de création : bouton grisé comme un bouton inactif, mais cliquable (il ouvre la boîte de patience). */
.bouton.grise, .bouton.grise:hover { opacity: 0.45; cursor: not-allowed; background: var(--dorure); border-color: var(--dorure); }

/* Boîte « Il va falloir attendre encore un peu. » (bibliotheque.js → ouvrirAttente) : même dessin que les fenêtres de la
   table (filet doré, nuit, voile). touch-action : les glissements sur la boîte sont lus par le script, pas par le défilement. */
dialog.attente {
  width: min(26rem, 90vw);
  margin: auto;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  background: var(--nuit);
  color: var(--papier);
  border: 1px solid var(--dorure);
  border-radius: 3px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
  touch-action: none;
  user-select: none;
}
dialog.attente::backdrop { background: rgba(8, 14, 16, 0.7); }
dialog.attente p { font-family: var(--serif); font-size: 1.5rem; line-height: 1.3; margin: 0 0 1.5rem; }
dialog.attente p.aveu { color: var(--papier-2); font-style: italic; font-size: 1.3rem; }

.erreur { color: var(--wip); }

/* Galerie ---------------------------------------------------------- */

/* Page plus large que les autres : le mur de cartes a besoin de colonnes. Couleurs des classes = celles des tables
   (FACTIONS, js/room/cartes.js) ; le sceau de cire marque la catégorie Taboo (18+). */
.page-galerie {
  --mesure: 80rem;
}
.page-galerie .filigrane { left: max(calc(50% - 62rem), -4rem); }
.entete nav a[aria-current] { color: var(--papier); text-decoration: none; }

.galerie h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.galerie .chapeau { max-width: 58ch; margin: 1rem 0 0; color: var(--papier-2); }

.barre-onglets {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0 2rem;
  margin-top: 1.75rem;
  border-bottom: 1px solid var(--filet);
}
.onglets { display: flex; align-items: flex-end; gap: 2.5rem; }
.onglets a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0 0.75rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--papier-2);
  text-decoration: none;
  white-space: nowrap;
}
.onglets a:has(.sceau) { align-items: center; }
.onglets a:hover { color: var(--papier); }
.onglets a[aria-current] { color: var(--papier); border-bottom-color: var(--dorure); }
.onglets .compte { font-family: var(--sans); font-size: 0.95rem; color: var(--papier-2); }

.sceau {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--sceau);
  color: var(--papier);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(230, 220, 195, 0.32);
}
.sceau.grand { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }

.recherche { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; color: var(--papier-2); font-size: 0.95rem; }
.recherche input {
  width: 15rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  background: var(--nuit-2);
  color: var(--papier);
  border: 0;
  border-bottom: 2px solid var(--dorure);
  border-radius: 0;
}
.recherche input::placeholder { color: var(--papier-2); opacity: 0.7; }

/* Filtres : ils suivent le défilement ; le fond ne vient qu'une fois collés en haut (classe posée par galerie.js),
   pour ne pas couper le filigrane en haut de page. */
.filtres {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0 0.75rem;
}
.filtres:empty { padding: 0.6rem 0 0; }
.filtres.collee { background: var(--nuit); box-shadow: 0 1px 0 var(--filet); }
.filtres .separateur { width: 1px; height: 1.5rem; margin: 0 0.75rem; background: var(--filet); }

.puce {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  background: transparent;
  border: 1px solid var(--filet);
  border-radius: 2px;
  color: var(--papier);
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.puce:hover { border-color: var(--papier-2); }
.puce[aria-pressed="true"] { background: var(--nuit-2); border-color: var(--dorure); }

.pastille { flex: none; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: #7f8c88; }
.pastille.guardian { background: #3b6fb6; }
.pastille.seeker { background: #d5892b; }
.pastille.rogue { background: #3f8f5a; }
.pastille.mystic { background: #7b4fa6; }
.pastille.survivor { background: #b8433a; }

/* Le mur : une section par classe (titre et filet comme les campagnes de la bibliothèque), des miniatures serrées. */
#mur { margin-top: 0.4rem; }
.classe { margin: 0 0 2.5rem; }
.classe header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--dorure);
}
.classe h2 { font-size: 1.9rem; }
.classe h2 .pastille { display: inline-block; width: 0.7rem; height: 0.7rem; margin-right: 0.75rem; vertical-align: 0.14em; }
.classe .combien { color: var(--papier-2); font-size: 0.95rem; white-space: nowrap; }

.planche {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}
.planche.paysage { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.vignette { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 4.4% / 3.15%; }
.planche.paysage .vignette { aspect-ratio: 7 / 5; border-radius: 3.15% / 4.4%; }
.vignette img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.vignette:hover, .vignette:focus-visible { outline: 2px solid var(--dorure-2); outline-offset: 3px; }
.vignette .badge {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  padding: 0.15rem 0.4rem;
  background: rgba(30, 45, 51, 0.92);
  border: 1px solid var(--dorure);
  border-radius: 2px;
  color: var(--papier);
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}
.galerie .vide { margin: 2rem 0; font-family: var(--serif); font-size: 1.3rem; color: var(--papier-2); }

/* Avertissement de la catégorie Taboo : le dessin des boîtes du site (filet doré, nuit, voile). */
dialog.avertissement {
  width: min(29rem, 92vw);
  margin: auto;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  background: var(--nuit);
  color: var(--papier);
  border: 1px solid var(--dorure);
  border-radius: 3px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}
dialog.avertissement::backdrop, dialog.comparaison::backdrop { background: rgba(8, 14, 16, 0.7); }
dialog.avertissement h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.1rem 0 0; text-wrap: balance; }
dialog.avertissement p { margin: 0.75rem 0 1.5rem; color: var(--papier-2); text-wrap: balance; }
dialog.avertissement .actions { display: grid; gap: 0.6rem; }

/* Comparaison : la carte Anofelis et l'officielle côte à côte, les choix (versions, éditions) sur les côtés,
   la carte précédente et la suivante au pied. Un clic sur une carte l'agrandit seule. */
dialog.comparaison {
  width: min(75rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  background: var(--nuit);
  color: var(--papier);
  border: 1px solid var(--dorure);
  border-radius: 3px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}
dialog.comparaison:focus { outline: 0; }
.comparaison .cadre { display: grid; gap: 1.4rem; padding: 1.75rem 2.25rem 1.1rem; }

.cmp-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.cmp-entete h2 { font-size: 2.2rem; }
.cmp-entete .sous-titre { margin: 0.2rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--papier-2); }
.cmp-entete .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.4rem; margin: 0.5rem 0 0; color: var(--papier-2); font-size: 1rem; }
.cmp-entete .meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.cmp-entete .bouton { flex: none; font-size: 0.95rem; padding: 0.35rem 0.9rem; }

.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  column-gap: 1.5rem;
  row-gap: 1rem;
  align-items: start;
  touch-action: pan-y;
}
.scene figure { grid-row: 1; margin: 0; display: grid; gap: 0.75rem; justify-items: start; }
.scene figure.anofelis { grid-column: 2; }
.scene figure.officielle { grid-column: 3; margin-left: 1rem; }
.scene figcaption { font-family: var(--serif); font-size: 1.4rem; line-height: 1.1; }
.scene .anofelis figcaption { color: var(--dorure-2); }
.scene .officielle figcaption { color: var(--papier-2); }
.carte-cmp {
  display: block;
  height: min(31.5rem, calc(100dvh - 19rem));
  aspect-ratio: 5 / 7;
  padding: 0;
  border: 0;
  border-radius: 4.4% / 3.15%;
  background: transparent center / cover no-repeat;
  cursor: zoom-in;
}
.carte-cmp img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.carte-cmp.indisponible {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 1.5rem;
  text-align: center;
  background: var(--nuit-2);
  border: 1px dashed var(--papier-2);
  color: var(--papier-2);
  cursor: default;
}
.comparaison.paysage .carte-cmp { height: auto; width: min(31.5rem, calc((100vw - 12rem) / 2), calc((100dvh - 23rem) * 7 / 5)); aspect-ratio: 7 / 5; border-radius: 3.15% / 4.4%; }

.choix { grid-row: 1; display: flex; flex-direction: column; gap: 0.5rem; padding-top: 2.3rem; }
.choix.versions { grid-column: 1; align-items: flex-end; }
.choix.editions { grid-column: 4; align-items: flex-start; }
.choix .legende { color: var(--papier-2); font-size: 0.95rem; }
.version {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.25rem 0.25rem 0.6rem;
  background: transparent;
  border: 1px solid var(--filet);
  border-radius: 2px;
  color: var(--papier-2);
  font: inherit;
  font-size: 1rem;
  white-space: nowrap;
  cursor: pointer;
}
.version img { display: block; width: 2.5rem; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 3px; }
.comparaison.paysage .version img { width: 3.5rem; aspect-ratio: 7 / 5; }
.version:hover { border-color: var(--papier-2); }
.version[aria-pressed="true"] { background: var(--nuit-2); border-color: var(--dorure); color: var(--papier); }
.faces { grid-row: 2; grid-column: 2 / 4; justify-self: center; display: flex; gap: 0.5rem; }
.faces .puce { min-width: 6rem; justify-content: center; }
/* Enquêteur redessiné : deux cartes en paysage ne laissent pas de colonne aux versions (elles déborderaient de la
   fenêtre) ; elles passent sous les cartes, en ligne, après Recto / Verso. Le téléphone a sa propre mise en page. */
@media (min-width: 721px) {
  .comparaison.paysage .choix.versions { grid-row: 3; grid-column: 2 / 4; justify-self: center; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding-top: 0; }
  .comparaison.paysage:not([class*="zoom-"]) .scene:has(.versions) .carte-cmp { width: min(31.5rem, calc((100vw - 12rem) / 2), calc((100dvh - 27.75rem) * 7 / 5)); }
}

/* Carte agrandie : elle reste seule sur la scène, à la hauteur de la fenêtre. */
.comparaison.zoom-anofelis .scene > :not(.anofelis),
.comparaison.zoom-officielle .scene > :not(.officielle) { display: none; }
.comparaison[class*="zoom-"] .scene { display: flex; justify-content: center; }
.comparaison[class*="zoom-"] .scene figure { margin-left: 0; max-width: 100%; }
.comparaison[class*="zoom-"] .carte-cmp { cursor: zoom-out; height: min(49rem, calc(100dvh - 19rem)); }
.comparaison.paysage[class*="zoom-"] .carte-cmp { height: auto; width: min(62rem, calc(100vw - 8rem), calc((100dvh - 23rem) * 7 / 5)); }

.cmp-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--filet);
}
.cmp-pied .voisine { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; min-width: 0; flex: 1 1 0; }
.cmp-pied .voisine span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-pied .suivante { justify-content: flex-end; }
.cmp-pied .precedente::before { content: "\2039"; font-size: 1.5em; line-height: 1; }
.cmp-pied .suivante::after { content: "\203A"; font-size: 1.5em; line-height: 1; }
.cmp-pied .milieu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.1rem 1.75rem; color: var(--papier-2); font-size: 1rem; white-space: nowrap; }
.cmp-pied .externe::after { content: " \2197"; font-size: 0.85em; opacity: 0.75; }

/* Proxy printer ---------------------------------------------------- */

/* La page /print reprend le mur de la galerie (body.page-galerie, main.galerie) : une tuile par illustration, que le
   clic coche ; la liste d'impression tient dans une barre fixée au bas de l'écran, et s'ouvre en fenêtre. */
.page-impression { padding-bottom: 5.5rem; }   /* la barre fixe ne recouvre pas le pied de page */
.impression .notice { max-width: 58ch; margin: 0.6rem 0 0; color: var(--papier-2); font-size: 0.95rem; }

/* Tuile : la miniature est un bouton ; cochée, elle prend un filet doré, sa coche, et la réglette des exemplaires.
   Le contour est porté par la tuile (qui rogne la réglette à ses coins), pas par le bouton. */
.tuile { position: relative; border-radius: 4.4% / 3.15%; overflow: hidden; }
.planche.paysage .tuile { border-radius: 3.15% / 4.4%; }
.tuile .vignette { width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tuile .vignette, .tuile .vignette:hover, .tuile .vignette:focus-visible { outline: 0; }
.tuile:has(.vignette:focus-visible) { outline: 2px solid var(--dorure-2); outline-offset: 3px; }
.tuile.choisie { outline: 2px solid var(--dorure); outline-offset: 2px; }
.tuile.choisie:has(.vignette:focus-visible) { outline-color: var(--dorure-2); }
.tuile .vignette .badge { top: 0.3rem; bottom: auto; }
.tuile .coche {
  display: none;
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--dorure);
  box-shadow: 0 0 0 2px var(--nuit);
}
.tuile .coche::after {
  content: "";
  position: absolute;
  left: 0.52rem;
  top: 0.27rem;
  width: 0.36rem;
  height: 0.72rem;
  border: solid var(--nuit);
  border-width: 0 0.17rem 0.17rem 0;
  transform: rotate(45deg);
}
.tuile.choisie .coche { display: block; }
.tuile .copies {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  grid-template-columns: 2.25rem 1fr 2.25rem;
  background: rgba(30, 45, 51, 0.94);
  border-top: 1px solid var(--dorure);
}
.tuile.choisie .copies { display: grid; }
.tuile .copies button {
  min-height: 2.25rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--papier);
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.tuile .copies button:active:not(:disabled) { background: var(--dorure); color: var(--nuit); }
.tuile .copies button:disabled { opacity: 0.35; cursor: not-allowed; }
.tuile .copies button:focus-visible { outline-offset: -3px; }
.tuile .copies output { align-self: center; text-align: center; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* Survol : seulement là où il existe — sur un écran tactile il resterait collé à la dernière tuile touchée, et une carte
   décochée garderait un contour. */
@media (hover: hover) {
  .tuile:hover { outline: 2px solid var(--dorure-2); outline-offset: 3px; }
  .tuile.choisie:hover { outline-offset: 2px; }
  .tuile .copies button:hover:not(:disabled) { background: var(--dorure); color: var(--nuit); }
}

/* Barre du bas : la planche en cours (neuf emplacements, les pris à l'encre), le compte, les deux boutons. */
.barre-impression {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: var(--nuit-2);
  border-top: 1px solid var(--dorure);
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}
.barre-impression .dedans {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.25rem;
  max-width: var(--mesure);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
}
.barre-impression .resume { flex: 1; min-width: 0; margin: 0; }
.barre-impression .actions { display: flex; gap: 0.6rem; }
.feuille {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 0.5rem);
  gap: 2px;
  padding: 3px 4px 5px;
  background: var(--papier);
  border-radius: 1px;
}
.feuille i { height: 0.7rem; border-radius: 1px; background: rgba(30, 45, 51, 0.16); }
.feuille i.prise { background: var(--nuit); }

/* Onglet « From a deck » : il prend la place du mur (filtres et recherche s'effacent) ; un filet le sépare des
   onglets de catégorie. Le champ du lien, puis les cartes du deck en tuiles, la quantité du deck en légende. */
.impression.sur-deck .recherche, .impression.sur-deck .filtres, .impression.sur-deck #mur { display: none; }
.impression:not(.sur-deck) .deck { display: none; }
.onglets .separateur { align-self: center; width: 1px; height: 1.6rem; margin: 0 -1rem; background: var(--filet); }
.deck { margin-top: 1.75rem; }
.lien-deck { display: grid; gap: 0.6rem; max-width: 46rem; }
.lien-deck label { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.lien-deck .ligne { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lien-deck input {
  flex: 1 1 18rem;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  background: var(--nuit-2);
  color: var(--papier);
  border: 0;
  border-bottom: 2px solid var(--dorure);
  border-radius: 0;
}
.lien-deck input::placeholder { color: var(--papier-2); opacity: 0.7; }
.lien-deck .aide { max-width: 62ch; margin: 0; color: var(--papier-2); font-size: 0.95rem; }
.lien-deck .aide.erreur { color: var(--wip); }
.deck-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--dorure);
}
.deck-entete h2 { font-size: 1.9rem; overflow-wrap: anywhere; }
.deck-meta { margin: 0; color: var(--papier-2); font-size: 0.95rem; }
.deck .bilan { margin: 1rem 0 0; }
.actions-deck { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.75rem; margin-top: 0.75rem; }
.actions-deck .bouton { padding: 0.35rem 0.9rem; font-size: 1rem; }
.option-taboo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-left: 0.75rem; cursor: pointer; }
.option-taboo input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--dorure); }
.option-taboo > span:first-of-type { display: inline-flex; align-items: center; gap: 0.5rem; }
.carte-deck { display: grid; align-content: start; gap: 0.35rem; margin: 0; }
.carte-deck figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.4rem;
  color: var(--papier-2);
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: center;
}
.carte-deck .sceau { width: 1.3rem; height: 1.3rem; font-size: 0.58rem; }
.absentes { margin-top: 2.25rem; }
.absentes summary { width: fit-content; cursor: pointer; font-family: var(--serif); font-size: 1.3rem; color: var(--papier-2); }
.absentes summary:hover { color: var(--papier); }
.absentes ul { list-style: none; margin: 0.9rem 0 0; padding: 0; columns: 17rem; column-gap: 2rem; color: var(--papier-2); font-size: 0.95rem; }
.absentes li { display: flex; align-items: center; gap: 0.5rem; padding: 0.12rem 0; break-inside: avoid; }

/* Fenêtre de la liste d'impression : les cartes choisies, dans l'ordre du PDF ; le dessin des boîtes du site. */
dialog.liste-impression {
  width: min(76rem, 94vw);
  max-height: 88dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: var(--nuit);
  color: var(--papier);
  border: 1px solid var(--dorure);
  border-radius: 3px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}
dialog.liste-impression::backdrop { background: rgba(8, 14, 16, 0.7); }
.liste-impression .cadre { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: 88dvh; }
.liste-impression header, .liste-impression footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
}
.liste-impression header { border-bottom: 1px solid var(--filet); }
.liste-impression footer { border-top: 1px solid var(--filet); }
.liste-impression h2 { font-size: 1.9rem; }
.liste-impression .resume-liste { margin: 0.3rem 0 0; color: var(--papier-2); font-size: 0.95rem; }
.liste-impression .corps { overflow-y: auto; padding: 0.25rem 1.5rem 1.5rem; }
.liste-impression .corps .planche { margin-top: 1.25rem; }
.liste-impression .cachees { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin: 1.25rem 0 0; color: var(--papier-2); }
.liste-impression .vide { margin: 2rem 0 1rem; font-family: var(--serif); font-size: 1.3rem; color: var(--papier-2); }

/* Réactif ---------------------------------------------------------- */

@media (max-width: 720px) {
  .filigrane { width: 22rem; top: -3.5rem; left: -6rem; opacity: 0.12; }
}

@media (max-width: 640px) {
  .scenario { grid-template-columns: 4rem 1fr; row-gap: 0.4rem; }
  .scenario .statut { grid-column: 2; }
  .scenario .action { grid-column: 2; text-align: left; }
  .scenario .action:empty { display: none; }
}

/* Galerie sur écran étroit : onglets sans compte, recherche sur sa ligne, filtres en bande défilante, trois cartes
   par rangée ; la comparaison prend tout l'écran (portraits côte à côte, enquêteurs l'un sous l'autre). */
@media (max-width: 720px) {
  .barre-onglets { border-bottom: 0; }
  .onglets { width: 100%; gap: 1.4rem; border-bottom: 1px solid var(--filet); }
  .onglets a { font-size: 1.25rem; padding: 0.75rem 0; }
  .onglets .compte { display: none; }
  .onglets .sceau { width: 1.35rem; height: 1.35rem; font-size: 0.62rem; }
  .recherche { width: 100%; margin: 1rem 0 0; }
  .recherche input { flex: 1; width: auto; min-width: 0; min-height: 2.75rem; }
  .filtres { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; scrollbar-width: none; }
  .filtres::-webkit-scrollbar { display: none; }
  .puce { min-height: 2.75rem; }
  .classe h2 { font-size: 1.6rem; }
  .planche { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: 0.5rem; }

  dialog.comparaison { width: 100vw; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .comparaison .cadre { box-sizing: border-box; min-height: 100%; grid-template-rows: auto 1fr auto; gap: 1rem; padding: 1rem; }
  .cmp-entete h2 { font-size: 1.75rem; }
  .scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.75rem; align-content: start; }
  .scene figure { grid-row: auto; justify-items: stretch; gap: 0.5rem; }
  .scene figure.anofelis { grid-column: 1; }
  .scene figure.officielle { grid-column: 2; margin-left: 0; }
  .scene figcaption { font-size: 1.25rem; }
  .carte-cmp, .comparaison.paysage .carte-cmp { width: 100%; height: auto; }
  .comparaison.paysage .scene { grid-template-columns: minmax(0, 1fr); }
  .comparaison.paysage .scene figure.anofelis, .comparaison.paysage .scene figure.officielle { grid-column: 1; }
  .choix, .choix.versions, .choix.editions { order: 1; grid-row: auto; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; padding-top: 0; }
  .choix .legende { width: 100%; }
  .faces { order: 2; grid-row: auto; grid-column: 1 / -1; justify-self: stretch; }
  .faces .puce { flex: 1; }
  .comparaison[class*="zoom-"] .scene figure { width: 100%; }
  .comparaison[class*="zoom-"] .carte-cmp, .comparaison.paysage[class*="zoom-"] .carte-cmp { width: 100%; height: auto; max-height: none; }
  .cmp-pied { flex-wrap: wrap; }
  .cmp-pied .milieu { order: 1; width: 100%; }
}

/* Proxy printer sur écran étroit : l'onglet du deck sur sa ligne, au-dessus des catégories ; la barre sur deux lignes
   (le compte, puis les boutons) ; la liste en plein écran. */
@media (max-width: 720px) {
  .page-impression { padding-bottom: 8.5rem; }
  .barre-impression .dedans { flex-wrap: wrap; padding: 0.6rem 1rem 0.75rem; }
  .barre-impression .resume { font-size: 0.95rem; line-height: 1.3; }
  .barre-impression .actions { width: 100%; }
  .barre-impression .actions .bouton { flex: 1; }
  .tuile .copies { grid-template-columns: 2rem 1fr 2rem; }
  .page-impression .onglets { flex-wrap: wrap; gap: 0 1.4rem; }
  .onglets .separateur { flex: 0 0 100%; width: auto; height: 0; margin: 0; background: none; }   /* un saut de ligne */
  .deck { margin-top: 1.25rem; }
  .lien-deck .ligne .bouton { flex: 1; }
  .option-taboo { margin-left: 0; }
  dialog.liste-impression { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .liste-impression .cadre { height: 100%; max-height: none; }
  .liste-impression header, .liste-impression footer { padding: 0.75rem 1rem; }
  .liste-impression h2 { font-size: 1.6rem; }
  .liste-impression .corps { padding: 0 1rem 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .bouton { transition: background-color 120ms ease, color 120ms ease; }
}
