/* Totems-Scouts.be – « Guide de terrain » */

@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --paper: #f7f3e8;
  --paper-2: #efe8d6;
  --ink: #1b241c;
  --ink-2: #4c564a;
  --rule: #ddd4bf;
  --forest: #1f4d2c;
  --forest-2: #2b6a3d;
  --on-forest: #f7f3e8;
  --cover-bg: #1f4d2c;
  --cover-bg-2: #15371f;
  --cover-ink: #f7f3e8;
  --cover-ink-2: #c4d8c8;
  --g: var(--forest);
  --read: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* Une couleur franche par groupe d'animaux : les onglets du guide */
.g-mammiferes { --g: #8a3d14; }
.g-oiseaux { --g: #1b5f91; }
.g-reptiles { --g: #4b6a12; }
.g-amphibiens { --g: #0d7259; }
.g-poissons { --g: #0f5568; }
.g-insectes { --g: #855700; }
.g-arachnides { --g: #5d3591; }
.g-crustaces { --g: #b0380f; }
.g-mollusques { --g: #a3164f; }
.g-invertebres-marins { --g: #4e5a65; }
.g-jungle { --g: #2c3e7a; }

:root[data-theme="dark"] {
  --paper: #121613;
  --paper-2: #1b211c;
  --ink: #e8ede5;
  --ink-2: #a9b4aa;
  --rule: #2f3831;
  --forest: #8fd19e;
  --forest-2: #b2e3bc;
  --on-forest: #0f1a12;
  --cover-bg: #16331f;
  --cover-bg-2: #0e2415;
  --cover-ink: #eef3ea;
  --cover-ink-2: #a6c2ac;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* Repli si le JS de thème ne s'exécute pas : suivre la préférence système. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121613;
    --paper-2: #1b211c;
    --ink: #e8ede5;
    --ink-2: #a9b4aa;
    --rule: #2f3831;
    --forest: #8fd19e;
    --forest-2: #b2e3bc;
    --on-forest: #0f1a12;
    --cover-bg: #16331f;
    --cover-bg-2: #0e2415;
    --cover-ink: #eef3ea;
    --cover-ink-2: #a6c2ac;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule) transparent; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.1875rem/1.6 var(--read); caret-color: var(--forest); }
::selection { background: var(--forest); color: var(--on-forest); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--paper); padding: 8px 14px; font-family: var(--ui); }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.sheet { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- en-tête */
.mast { border-bottom: 1px solid var(--rule); background: var(--paper); font-family: var(--ui); }
.mast-inner { width: min(1120px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 12px 28px; padding: 14px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 34px; height: 34px; color: var(--forest); }
.brand .mark.logo { width: 52px; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-optical-sizing: auto; font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; }
.brand-sub { font-weight: 500; font-size: .85rem; color: var(--ink-2); margin-top: 3px; }
.mast-search { flex: 1 1 220px; max-width: 380px; }
.mast-search input, .cover-field input, .search-q input, .field input, .field select {
  width: 100%; font: 500 1rem var(--ui); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: 6px; padding: 9px 12px;
}
.mast-search input:focus, .cover-field input:focus, .search-q input:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 22%, transparent); }
::placeholder { color: var(--ink-2); opacity: 1; }
.mainnav { margin-left: auto; }
.mainnav ul { list-style: none; display: flex; gap: 4px 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.mainnav a { color: var(--ink); font-weight: 700; font-size: 1.02rem; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--rule); }
.mainnav a[aria-current="page"] { border-bottom-color: var(--forest); color: var(--forest); }
.theme-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; -webkit-appearance: none; appearance: none; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.theme-toggle:hover { border-color: var(--forest); color: var(--forest); }
.theme-toggle:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.theme-toggle svg { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
@media (max-width: 760px) {
  .mast-inner { gap: 10px 16px; padding: 10px 0; }
  .mast-search { order: 3; flex-basis: 100%; max-width: none; }
  .mainnav { order: 4; margin-left: 0; width: 100%; }
  .mainnav ul { flex-wrap: wrap; gap: 6px 16px; }
  .mainnav a { white-space: nowrap; }
  .theme-toggle { order: 2; margin-left: auto; }
}

/* ---------- onglets d'index (rangée d'onglets de classeur sous l'en-tête) */
.tabs { font-family: var(--ui); border-bottom: 4px solid var(--g); }
.tabs ul { list-style: none; margin: 0 auto; padding: 10px 0 0; width: min(1120px, 100% - 32px); display: flex; align-items: flex-end; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: baseline; gap: 5px; padding: 7px 11px 6px; border-radius: 8px 8px 0 0; color: #fff; background: var(--g); text-decoration: none; font-weight: 700; font-size: 1rem; white-space: nowrap; opacity: .88; }
.tabs a:hover, .tabs a:focus-visible { opacity: 1; }
.tabs a[aria-current="page"] { opacity: 1; padding-top: 12px; }
.tab-n { display: none; }
@media (max-width: 760px) {
  .tabs ul { width: 100%; padding-inline: 16px; }
  .tabs a { padding: 6px 11px 5px; font-size: .95rem; }
}
[data-page="home"] .tabs { display: none; }

.offline-banner { margin: 0; padding: 8px 16px; background: var(--ink); color: var(--paper); text-align: center; font: 700 .95rem var(--ui); }

/* ---------- en-têtes de page */
.page-head { padding: 2.6rem 0 1.4rem; }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.lead { color: var(--ink-2); font-size: 1.2rem; margin: .6rem 0 0; max-width: 62ch; }
.page-head-letter { display: flex; align-items: center; gap: 22px; }
.big-letter { font: 900 clamp(4.5rem, 10vw, 7rem)/.8 var(--display); font-optical-sizing: auto; color: var(--forest); margin: 0; }
.page-head-group { border-top: 10px solid var(--g); margin-top: 2rem; padding-top: 1.6rem; }
.page-head-group h1 { color: var(--g); }
@media (prefers-color-scheme: dark) { .page-head-group h1 { color: var(--ink); } }
.section-title { font-size: 1.5rem; margin: 3rem 0 1rem; }
/* Fil d'Ariane : boutons bien visibles pour remonter d'un niveau (groupe › famille › catégorie) */
.runhead { font: 700 1rem var(--ui); padding-top: 1.4rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink-2); }
.runhead a { color: var(--paper); background: var(--g); text-decoration: none; padding: 8px 18px; border: 2px solid var(--g); border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); font-size: 1.05rem; }
.runhead a::before { content: "↑ "; white-space: pre; }
.runhead a:hover, .runhead a:focus-visible { background: var(--paper); color: var(--g); }
.runhead > span { color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .runhead a { color: var(--ink); } }

/* ---------- lettres */
.letters { display: flex; flex-wrap: wrap; gap: 2px; margin: 1rem 0 2rem; font-family: var(--ui); }
.letter { display: grid; place-items: center; min-width: 2.2rem; height: 2.4rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
a.letter:hover { background: var(--paper-2); }
.letter.is-current { background: var(--forest); color: var(--on-forest); }
.letter.is-empty { color: var(--rule); }

/* ---------- index des totems (entrées de guide, pas des cartes) */
.index { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); column-gap: 32px; border-top: 1px solid var(--rule); }
.entry a { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 18px; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.entry a:hover { background: var(--paper-2); }
.entry a:hover .entry-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.entry img, .entry .noimg { width: 180px; aspect-ratio: 4/3; object-fit: contain; border-radius: 4px; background: var(--paper-2); }
.noimg { display: grid; place-items: center; font: 800 1.6rem var(--ui); color: var(--ink-2); }
.entry-text { display: flex; flex-direction: column; min-width: 0; }
.entry-name { font: 600 1.3rem/1.2 var(--display); font-optical-sizing: auto; letter-spacing: -.005em; overflow-wrap: anywhere; }
.entry-sub { font-size: .98rem; color: var(--ink-2); line-height: 1.3; }
.dot { width: 18px; height: 18px; flex: none; }
.index-compact { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
@media (max-width: 520px) {
  .index, .index-compact { grid-template-columns: 1fr; }
  .entry a { grid-template-columns: 140px 1fr auto; gap: 14px; }
  .entry img, .entry .noimg { width: 140px; }
}

/* ---------- accueil : page de garde */
/* ---------- accueil : bandeau de garde, pleine largeur */
.cover {
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  padding: clamp(2.6rem, 6vw, 4.4rem) max(16px, calc(50vw - 560px));
  background:
    radial-gradient(120% 150% at 12% 0%, var(--cover-bg-2), transparent 62%),
    var(--cover-bg);
  color: var(--cover-ink);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr);
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}
.cover h1 { color: var(--cover-ink); font-weight: 900; font-size: clamp(2.7rem, 6.2vw, 5rem); letter-spacing: -.025em; line-height: .96; max-width: 13ch; }
.cover-lead { font-size: 1.35rem; color: var(--cover-ink-2); margin: 1.1rem 0 1.9rem; max-width: 36ch; }
.cover-search label { display: block; font: 700 1rem var(--ui); color: var(--cover-ink); margin-bottom: 7px; }
.cover-field { display: flex; gap: 8px; max-width: 540px; }
.cover-field input { flex: 1; font-size: 1.2rem; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 7px; background: var(--paper); color: var(--ink); }
.cover-field input::placeholder { color: var(--ink-2); }
.cover-field button { font: 700 1.05rem var(--ui); background: var(--cover-ink); color: var(--cover-bg); border: 0; border-radius: 7px; padding: 0 22px; min-height: 44px; cursor: pointer; }
.cover-field button:hover { background: #ffffff; }
.btn { font: 700 1.05rem var(--ui); background: var(--forest); color: var(--on-forest); border: 0; border-radius: 6px; padding: 0 22px; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.btn:hover { background: var(--forest-2); }
.btn-ghost { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--forest); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-quiet { font: 700 .98rem var(--ui); background: none; border: 0; padding: 4px 0; color: var(--forest); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.btn.is-disabled { background: var(--paper-2); color: var(--ink-2); cursor: not-allowed; box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn.is-disabled:hover { background: var(--paper-2); }

/* page encyclopedie.html : choix des familles a imprimer */
.ency-select { margin-top: 2.5rem; max-width: 58ch; }
.ency-select-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1rem 0 1.3rem; }
.ency-fam-list { list-style: none; margin: 0 0 1.6rem; padding: 0; border-top: 1px solid var(--rule); columns: 2; column-gap: 32px; }
.ency-fam-list li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.ency-fam-list label { display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; cursor: pointer; font: 500 1.05rem var(--ui); }
.ency-fam-list input { flex: none; width: 18px; height: 18px; accent-color: var(--forest); cursor: pointer; }
@media (max-width: 560px) { .ency-fam-list { columns: 1; } }

/* totem du jour, planche de garde dans le bandeau */
.cover-plate { position: relative; display: flex; flex-direction: column; align-items: stretch; color: var(--cover-ink); text-decoration: none; }
.cover-plate-frame { display: block; position: relative; border-radius: 10px; background: var(--paper); box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); overflow: hidden; }
.cover-plate-frame::before { content: ""; position: absolute; inset: 0; border-top: 8px solid var(--g); border-radius: 10px 10px 0 0; pointer-events: none; }
.cover-plate img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--paper-2); display: block; }
.cover-stamp { position: absolute; top: 14px; left: 14px; z-index: 1; font: 800 .72rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--on-forest); background: var(--g); border-radius: 999px; padding: 7px 13px; }
.cover-plate-name { font: 600 clamp(1.7rem, 3vw, 2.4rem)/1.04 var(--display); font-optical-sizing: auto; color: var(--cover-ink); letter-spacing: -.01em; margin: 16px 0 0; }
.cover-plate-fam { font: 700 1rem var(--ui); color: var(--cover-ink-2); margin: 7px 0 0; }
.cover-plate-fam .dot { vertical-align: -.18em; margin-right: .3em; }
.cover-plate-cta { font: 700 1rem var(--ui); color: var(--cover-ink); margin: 10px 0 0; text-decoration: underline; text-underline-offset: .18em; }
.cover-plate:hover .cover-plate-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .12em; }

/* parcourir + index familles en classeur */
.browse { margin: 3rem 0 0; }
.browse .section-title { margin-bottom: 1.1rem; }
.famdex { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 20px; font-family: var(--ui); }
.famdex a { display: flex; align-items: baseline; gap: 10px; padding: 13px 15px; background: var(--paper-2); border-top: 5px solid var(--g); border-radius: 0 0 7px 7px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.famdex a:hover { background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule), 0 6px 16px -10px rgba(0,0,0,.4); }
.famdex a:hover .fd-name { text-decoration: underline; text-underline-offset: .18em; }
.fd-name { flex: 1; }
.fd-n { flex: none; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.home-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; margin-top: 3rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--ui); }
.chips a { display: inline-block; padding: 6px 13px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 700; }
.chips a:hover { border-color: var(--forest); color: var(--forest); }
.chips span { font-weight: 500; color: var(--ink-2); }
.page-head-group .chips { margin-top: 1.2rem; }
.plain-links { list-style: none; margin: 0; padding: 0; font: 700 1.1rem var(--ui); }
.plain-links li { border-bottom: 1px solid var(--rule); }
.plain-links a { display: block; padding: 10px 0; text-decoration: none; }
.plain-links a:hover { text-decoration: underline; }
.colophon-note { color: var(--ink-2); font-family: var(--ui); margin: 3rem 0 0; font-variant-numeric: tabular-nums; }
.care { margin: 3.2rem 0 1rem; border-top: 1px solid var(--rule); padding-top: 2.2rem; }
.care-inner { max-width: 72ch; }
.care h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
.care-lead { font-size: 1.2rem; color: var(--ink); margin: .9rem 0 1rem; }
.care-rule { font-size: 1.1rem; font-style: italic; color: var(--ink-2); margin: 0 0 1.1rem; padding-left: 1rem; border-left: 3px solid var(--rule); }
.care-ps { font: 600 1rem var(--ui); color: var(--forest); margin: 0 0 1.1rem; }
.care-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font: 700 1.05rem var(--ui); margin: 0 0 1rem; }
.care-src { font: 400 .9rem var(--ui); color: var(--ink-2); margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .cover-plate { animation: coverRise .6s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes coverRise { from { opacity: .001; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 860px) {
  .cover, .home-row { grid-template-columns: 1fr; gap: 28px; }
  .cover { padding-block: clamp(2rem, 7vw, 2.8rem); }
  .cover-plate { order: -1; }
}

/* ---------- fiche totem : une planche du guide */
.totem-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding: .6rem 0 1.4rem; }
.totem-head h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); letter-spacing: -.03em; line-height: .98; overflow-wrap: anywhere; }
.totem-head .btn-quiet { margin-left: auto; }
.latin { margin: .2rem 0 0; flex-basis: 100%; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; font-size: 1.1rem; }
.latin-label { font: 700 .82rem var(--ui); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; min-width: 7.5em; }
.latin i { font-size: 1.15rem; color: var(--ink); line-height: 1.3; }
.langs .lang-tag { font: 700 .78rem var(--ui); color: var(--ink-2); margin-left: 6px; }
.alias { background: var(--paper-2); border-radius: 6px; padding: 14px 18px; font-family: var(--ui); font-weight: 500; font-size: 1.1rem; max-width: 62ch; }
.alias a { font-weight: 800; }
.totem-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; align-items: start; }
.plate { margin: 0 0 2rem; }
/* La photo est toujours montrée en entier : jamais d'animal coupé (fond neutre si le format ne remplit pas le cadre) */
.plate img { width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: 4px; background: var(--paper-2); }
.plate figcaption { font: 500 .9rem var(--ui); color: var(--ink-2); margin-top: 6px; }
.prose { max-width: 66ch; }
.prose h3 { font-size: 1.3rem; margin: 2rem 0 .7rem; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; }
.prose p { overflow-wrap: break-word; hyphens: auto; }
.traits { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--ui); }
.traits a, .traits span { display: inline-block; padding: 4px 11px; border-radius: 4px; background: color-mix(in srgb, var(--g) 12%, var(--paper)); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; }
.traits a:hover { background: var(--g); color: #fff; }
.traits:has(+ .trait-gloses) { margin-bottom: .5rem; }
.trait-gloses { list-style: none; padding: 0; margin: 0 0 1.6rem; font: 400 .92rem/1.4 var(--ui); color: var(--ink-2); }
.trait-gloses li { margin: .15rem 0; }
.trait-gloses b { color: var(--ink); font-weight: 700; }
.sources { font-size: .95rem; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.revision { font: 500 .92rem var(--ui); color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.4rem; }
.totem-side { display: flex; flex-direction: column; gap: 30px; position: sticky; top: 20px; font-family: var(--ui); min-width: 0; }
.block { border-top: 2px solid var(--ink); padding-top: 10px; min-width: 0; max-width: 100%; }
.block h2 { font-size: 1.05rem; margin-bottom: .6rem; }
.block-floches { border-top-color: var(--g); border-top-width: 6px; }
.floches-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; }
.floche { width: 104px; color: var(--ink-2); }
.more-link { display: inline-block; margin-top: 10px; font-weight: 700; }
.facts { margin: 0; }
.facts div { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; }
.facts dt { color: var(--ink-2); font-weight: 500; flex: none; }
.facts div::after { content: none; }
.facts dd { margin: 0; font-weight: 700; text-align: right; margin-left: auto; overflow-wrap: anywhere; }
.facts dt::after { content: ""; display: inline-block; }
.facts div { background: radial-gradient(circle, var(--rule) 1px, transparent 1.4px) 0 calc(100% - 9px) / 6px 3px repeat-x; }
.facts dt, .facts dd { background: var(--paper); }
.facts dt { padding-right: 6px; }
.facts dd { padding-left: 6px; }
.facts-tight div { padding: 2px 0; }
.map { width: 100%; border-radius: 4px; margin-bottom: 10px; }
.regions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 700; font-size: .98rem; }
.regions a { color: var(--ink); text-decoration: none; }
.regions a:hover { color: var(--forest); text-decoration: underline; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin: 3.4rem 0 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; font-family: var(--ui); }
.pager a { display: flex; flex-direction: column; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.pager a span { font-weight: 500; font-size: .9rem; color: var(--ink-2); }
.pager a[rel="next"] { text-align: right; margin-left: auto; }
.related h2 { font-size: 1.4rem; margin: 2.4rem 0 1rem; }
@media (max-width: 900px) {
  .totem-grid { grid-template-columns: 1fr; gap: 28px; }
  .totem-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
}

/* ---------- groupes, familles, traits */
.group-index + .section-title { margin-top: 3rem; }
.fam-list { list-style: none; margin: 0 0 3rem; padding: 0; columns: 3 240px; column-gap: 32px; font-family: var(--ui); }
.fam-list li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 1.08rem; }
.fam-list a { font-weight: 700; text-decoration: none; }
.fam-list a:hover { text-decoration: underline; }
.fam-list .fam-group { border-bottom: 2px solid var(--g); padding: 1.4rem 0 4px; break-after: avoid; }
.fam-list .fam-group:first-child { padding-top: 0; }
.fam-list .fam-group h3 { font-size: 1.15rem; color: var(--g); }
@media (prefers-color-scheme: dark) { .fam-list .fam-group h3 { color: var(--ink); } }
.fam-list .farde-link { font-weight: 500; font-size: .92rem; float: right; text-decoration: underline; }
.groups-page .group-index { max-width: 560px; }
main > .group-index { max-width: 640px; }
.group-index { list-style: none; margin: 1.6rem 0 0; padding: 0; font-family: var(--ui); }
.group-index li { border-bottom: 1px solid var(--rule); }
.group-index a { display: flex; align-items: baseline; gap: 12px; padding: 11px 2px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.12rem; }
.group-index a:hover .gi-name, .group-index a:focus-visible .gi-name { color: var(--g); text-decoration: underline; }
.gi-swatch { flex: none; align-self: center; width: 14px; height: 14px; border-radius: 4px; background: var(--g); }
.gi-name { flex: none; }
.gi-lead { flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-5px); }
.gi-n { flex: none; color: var(--ink-2); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.trait-columns { columns: 4 200px; column-gap: 32px; margin-bottom: 3rem; }
.trait-letter { break-inside: avoid; margin-bottom: 1.4rem; font-family: var(--ui); }
.trait-letter h2 { font-size: 1.6rem; color: var(--forest); border-bottom: 2px solid var(--ink); margin-bottom: .4rem; }
.trait-letter ul { list-style: none; margin: 0; padding: 0; }
.trait-letter li { padding: 2px 0; font-size: 1.05rem; }
.trait-letter a { font-weight: 700; text-decoration: none; }
.trait-letter a:hover { text-decoration: underline; }

/* ---------- recherche */
.search { border-top: 2px solid var(--ink); padding-top: 18px; margin-bottom: 1.4rem; font-family: var(--ui); }
.search-q label { display: block; font-weight: 700; margin-bottom: 6px; }
.search-q input { font-size: 1.25rem; padding: 14px 16px; }
.filters { margin-top: 18px; }
.filters summary { font-weight: 800; font-size: 1.1rem; cursor: pointer; padding: 6px 0; }
.filters summary span { font-weight: 500; color: var(--forest); }
.search-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .95rem; min-width: 0; }
.search-checks { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { accent-color: var(--forest); width: 18px; height: 18px; }
/* sélecteur de langue (FR · EN · NL · DE) */
/* En-tête : « Contribuer » + bouton de langue unique qui déplie la liste des langues */
.mast-tools { display: flex; align-items: center; gap: 8px; font: 700 .85rem var(--ui); }
.btn-contrib { display: inline-block; padding: 5px 11px; border-radius: 4px; background: var(--forest); color: var(--paper); text-decoration: none; border: 1.5px solid var(--forest); }
.btn-contrib:hover { background: var(--paper); color: var(--forest); }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 4px 9px; border-radius: 4px; border: 1.5px solid var(--rule); color: var(--ink); user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--forest); }
.lang-menu summary:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.lang-switch { list-style: none; margin: 0; padding: 4px; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / .12); }
.lang-switch a { display: block; padding: 7px 10px; border-radius: 4px; color: var(--ink-2); text-decoration: none; font-weight: 600; white-space: nowrap; }
.lang-switch a:hover { background: var(--paper-2); color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--forest); color: var(--paper); }
@media (max-width: 760px) { .mast-tools { order: 2; margin-left: auto; } }
.lang-note { font: 500 .9rem var(--ui); color: var(--ink-2); background: var(--paper-2); border-radius: 6px; padding: 6px 12px; max-width: 66ch; }

/* nom latin faux ou périmé, barré à côté du nom corrigé */
.latin-wrong { font-size: .95rem; color: var(--ink-2); font-style: italic; white-space: nowrap; }
.latin-wrong del { text-decoration-thickness: 1.5px; }

/* ---------- données complémentaires (Wikidata, Wikipédia, Commons) */
.credit { font: 500 .85rem/1.4 var(--ui); color: var(--ink-2); margin: .5rem 0 0; }
.credit a { color: inherit; }
.map-free { width: 100%; height: auto; border-radius: 4px; background: #fff; }
.uicn { font: 700 1.05rem var(--ui); margin: 0; display: inline-block; padding: 4px 10px; border-radius: 4px; background: var(--paper-2); }
.uicn-vulnerable, .uicn-quasi-menace { background: color-mix(in srgb, #d4a017 22%, var(--paper)); }
.uicn-en-danger, .uicn-en-danger-critique, .uicn-eteint, .uicn-eteint-a-l-etat-sauvage { background: color-mix(in srgb, #b42318 18%, var(--paper)); }
.same-animal { font: 600 1rem var(--ui); background: var(--paper-2); border-radius: 6px; padding: 10px 14px; max-width: 66ch; }
.wiki-summary { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: .8rem; max-width: 66ch; }
.wiki-summary h2 { font-size: 1.2rem; }
.mode-vie { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: .8rem; max-width: 66ch; }
.mode-vie h2 { font-size: 1.2rem; }
.mode-vie dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: .4rem 0 .6rem; }
.mode-vie dt { font: 700 .95rem var(--ui); color: var(--ink-2); padding-top: .3rem; }
.mode-vie dd { margin: 0; }
.mode-vie .sources { font-size: .82rem; }
.grille { margin: 0 0 2.4rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grille-table { border-collapse: collapse; width: 100%; min-width: 520px; font: 500 .98rem var(--ui); }
.grille-table th, .grille-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.grille-table thead th { font-weight: 700; color: var(--ink-2); border-bottom: 2px solid var(--rule); }
.grille-table tbody th { white-space: nowrap; font-weight: 700; }
.grille-table td a { white-space: nowrap; }
@media (max-width: 560px) { .mode-vie dl { grid-template-columns: 1fr; } .mode-vie dt { padding-top: 0; } .mode-vie dd { margin-bottom: .4rem; } }

/* ---------- commentaires, signalement, pages de compte et d'administration */
.head-actions { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.totem-head .head-actions .btn-quiet { margin-left: 0; }
.report-box { background: var(--paper-2); border-radius: 8px; padding: 16px 18px; margin: 0 0 1.6rem; max-width: 640px; font-family: var(--ui); }
.comments { border-top: 2px solid var(--ink); margin-top: 2.6rem; padding-top: 1rem; max-width: 66ch; }
.comments h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.comment-list { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.comment { border-bottom: 1px solid var(--rule); padding: 10px 0; }
.comment p { margin: 0 0 .4em; }
.comment-head { font: 500 .95rem var(--ui); color: var(--ink-2); }
.comment-form { display: flex; flex-direction: column; gap: 8px; font-family: var(--ui); }
.comment-form label { font-weight: 700; }
.comment-form textarea, .comment-form select, .account-form input:not([type=checkbox]), .account-form textarea {
  font: 500 1rem var(--ui); color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 6px; padding: 9px 12px; width: 100%; }
.comment-form textarea:focus, .comment-form select:focus, .account-form input:focus, .account-form textarea:focus {
  outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 22%, transparent); }
.comment-form .btn { align-self: flex-start; min-height: 42px; }
.comment-status { min-height: 1.2em; font-weight: 600; margin: 0; }
.account { max-width: 760px; }
.account-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; font-family: var(--ui); }
.account-form .field { gap: 6px; }
.account-form .btn { min-height: 44px; }
.form-error { background: color-mix(in srgb, #b42318 12%, var(--paper)); color: var(--ink); border-radius: 6px; padding: 10px 14px; font: 600 1rem var(--ui); max-width: 520px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
main.account:has(.admin-nav) { max-width: 1120px; }
.admin-nav { margin: 0 0 1.6rem; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1.5px solid var(--rule); border-radius: 8px; color: var(--ink); text-decoration: none; font-family: var(--ui); }
.stat:hover { border-color: var(--forest); }
.stat-n { font: 800 2.2rem/1 var(--ui); color: var(--forest); font-variant-numeric: lining-nums tabular-nums; }
.admin-table, .admin-facts dd { font-variant-numeric: lining-nums tabular-nums; }
.admin-columns + p { margin-top: 2rem; }
.account-form .check { align-items: flex-start; }
.account-form .check input { flex: none; margin-top: 4px; }
.admin-facts { max-width: 420px; }
.admin-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.admin-table { border-collapse: collapse; width: 100%; font: 500 .98rem var(--ui); }
.admin-table th, .admin-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.admin-table th { font-weight: 800; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.admin-meta { font: 500 .95rem var(--ui); color: var(--ink-2); margin: 0 0 .4em; }
.admin-body { white-space: pre-wrap; margin: 0 0 .6em; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-actions .btn { min-height: 38px; padding: 0 16px; font-size: .95rem; }
.tag { display: inline-block; font: 600 .78rem var(--ui); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; margin: 1px 0; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 1rem 0; font-family: var(--ui); }
.admin-filter select, .admin-filter input { font: 500 1rem var(--ui); padding: 6px 10px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); }
.admin-box { background: var(--paper-2); border-radius: 8px; padding: 12px 18px; margin: 1rem 0; max-width: 760px; }
.admin-edit { max-width: 760px; }
.admin-edit fieldset { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.admin-edit legend { font: 700 1rem var(--ui); padding: 0 6px; }
.form-ok { background: color-mix(in srgb, var(--forest) 14%, var(--paper)); border-radius: 6px; padding: 10px 14px; font: 600 1rem var(--ui); max-width: 760px; }
.admin-log { background: var(--paper-2); padding: 12px; border-radius: 6px; font-size: .85rem; white-space: pre-wrap; max-height: 420px; overflow: auto; }

/* ---------- propositions de la recherche (saisie semi-automatique) */
.ac-host { position: relative; }
.ac-list { position: absolute; z-index: 30; list-style: none; margin: 0; padding: 6px; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 28px rgb(0 0 0 / .16); font-family: var(--ui); max-height: 70vh; overflow-y: auto; }
.ac-list li { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--paper-2); }
.ac-list img, .ac-noimg { width: 48px; height: 36px; object-fit: contain; border-radius: 4px; background: var(--paper-2); flex: none; }
.ac-text { display: flex; flex-direction: column; min-width: 0; }
.ac-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.ac-typed { font-weight: 500; color: var(--ink-2); }
.ac-sub { font: 400 .92rem var(--read); color: var(--ink-2); }
.sous-box { border: 0; border-top: 1px solid var(--rule); margin: 16px 0 0; padding: 12px 0 0; }
.sous-box legend { font-weight: 800; font-size: 1.05rem; padding: 0; }
.sous-box .muted { margin: 4px 0 0; font-size: .95rem; }
.sous-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sous-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--rule); border-radius: 999px; cursor: pointer; font-weight: 700; }
.sous-check:has(input:checked) { border-color: var(--forest); background: var(--paper-2); }
.sous-check input { accent-color: var(--forest); width: 17px; height: 17px; margin: 0; }
.chips-small a { padding: 4px 11px; font-size: .95rem; }
.chips a[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.chips a[aria-current="page"] span { color: inherit; opacity: .85; }
.fam-section .section-title a { color: inherit; text-decoration: none; }
.fam-section .section-title a:hover { text-decoration: underline; }
.fam-section .chips { margin-bottom: 1rem; }
.swatch-picker { margin-top: 6px; }
.swatch-picker summary { font-weight: 500; font-size: .92rem; color: var(--forest); cursor: pointer; width: max-content; }
.swatch-picker summary:hover { text-decoration: underline; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgb(0 0 0 / .25); padding: 0; cursor: pointer; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch:disabled { opacity: .18; cursor: default; }
.swatch-unknown { background: repeating-linear-gradient(45deg, #bbb 0 4px, #fff 4px 8px); }
@media (prefers-reduced-motion: no-preference) { .swatch { transition: transform .15s; } .swatch:not(:disabled):hover { transform: scale(1.12); } }
.search-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 1rem; }
.search-bar .lead { margin: 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--ui); }
.chip-remove, .chip-clear { font: 700 .95rem var(--ui); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.chip-remove { background: var(--paper-2); border: 1.5px solid var(--forest); color: var(--ink); }
.chip-remove::after { content: " ×"; }
.chip-remove:hover { background: var(--forest); color: var(--on-forest); }
.chip-clear { background: none; border: 1.5px solid var(--rule); color: var(--ink-2); }
.more { text-align: center; margin-top: -1.5rem; }
@media (max-width: 900px) { .search-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .search-filters { grid-template-columns: 1fr; } }

/* ---------- hors ligne, farde */
.offline-box { border-top: 2px solid var(--ink); padding: 16px 0 8px; margin: 0 0 2.4rem; font-family: var(--ui); max-width: 720px; }
.offline-box progress { width: 100%; height: 12px; accent-color: var(--forest); }
.offline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.farde-toc { columns: 3 200px; padding-left: 1.4rem; margin: 0 0 2.4rem; font-family: var(--ui); }
.farde-fiche { border-top: 6px solid var(--g); padding-top: 1rem; margin-top: 3rem; }
.farde-fiche > h2 { font-size: 2.2rem; }
.farde-fiche > h2 a { color: inherit; text-decoration: none; }
.farde-fiche .latin { margin-bottom: 1rem; }
.farde-photo { width: 360px; max-width: 100%; border-radius: 4px; margin-bottom: 1rem; }
.farde .totem-side { position: static; }
.ency-cover { padding: 2rem 0 1rem; }
.ency-cover h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.ency-kicker { font: 800 .9rem var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--forest); }
.ency-toc ol { columns: 2 260px; font-family: var(--ui); padding-left: 1.2rem; }
.ency-toc > ol > li { break-inside: avoid; margin-bottom: .8rem; font-weight: 700; }
.ency-toc ul { list-style: none; padding-left: .8rem; font-weight: 500; }
.ency-group { border-top: 10px solid var(--g); margin-top: 4rem; padding-top: 1rem; }
.ency-gtitle { font-size: 3rem; }
.ency-ftitle { font-size: 2rem; border-bottom: 2px solid var(--ink); margin-top: 3rem; }
.ency-stitle { font: 800 1.2rem var(--ui); color: var(--forest); margin-top: 2rem; }
.ency-fiche { border-top: 3px solid var(--g); padding-top: .6rem; margin-top: 2rem; }
.ency-fiche h4 { font-size: 1.6rem; margin: 0; }
.ency-fiche h4 a { color: inherit; text-decoration: none; }
.ency-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; margin: .8rem 0; align-items: start; }
.ency-photo { width: 100%; height: auto; border-radius: 4px; }
.ency .totem-side { position: static; }
.ency-alias { margin: .6rem 0; font-family: var(--ui); }
@media (max-width: 640px) { .ency-grid { grid-template-columns: 1fr; } }

/* ---------- pied de page */
.colophon { margin-top: 5rem; background: var(--paper-2); border-top: 1px solid var(--rule); padding: 1.8rem 0; font: 500 1rem var(--ui); color: var(--ink-2); }
.colophon a { margin-right: 18px; font-weight: 700; }
.colophon p { margin: .4rem 0; }

/* ---------- impression */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; padding: 0 !important; }
  .mast, .tabs, .colophon, .skip, .pager, .related, .runhead, [data-print], .offline-banner, .farde-toc, .more, .colophon-note, .page-head .btn { display: none !important; }
  .sheet { width: 100%; }
  a { color: #000; text-decoration: none; }
  .totem-head h1 { font-size: 30pt; }
  .totem-grid { grid-template-columns: minmax(0, 1fr) 58mm; gap: 7mm; }
  .totem-side { position: static; gap: 5mm; display: flex; flex-direction: column; }
  .block { break-inside: avoid; }
  .plate img { max-height: 90mm; object-fit: contain; }
  .traits a, .traits span { background: none; border: 1px solid #999; }
  svg, .block-floches, .farde-fiche { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .farde-fiche { break-before: page; margin: 0; }
  .farde .page-head { display: none; }
  .farde-photo { width: 70mm; }
  .floches-row { grid-template-columns: 16mm minmax(0, 1fr); gap: 3mm; }
  .floche { width: 16mm; }
  /* pointillés en bordure (vectorielle) : un dégradé serait converti en image dans le PDF */
  .facts div { background: none; border-bottom: 1px dotted #999; }
  .ency .page-head, .ency-toc ul { display: block; }
  .ency-cover { break-after: page; padding-top: 60mm; }
  .ency-toc { break-after: page; }
  .ency-toc ol { columns: 2; font-size: 9.5pt; }
  .ency-group { break-before: page; padding-top: 40mm; border-top-width: 6mm; }
  .ency-gtitle { font-size: 34pt; }
  .ency-ftitle { break-before: page; font-size: 20pt; break-after: avoid; }
  .ency-stitle { break-after: avoid; }
  .ency-fiche { break-inside: auto; margin-top: 7mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ency-fiche h4 { font-size: 15pt; break-after: avoid; }
  .ency-grid { grid-template-columns: 60mm minmax(0, 1fr); gap: 6mm; break-inside: avoid; }
  .ency .prose { font-size: 9.5pt; }
  .ency .map, .ency .map-free, .farde .map, .farde .map-free { max-width: 70mm; height: auto; }
  .ency .totem-side { max-width: 110mm; }
}

/* ---------- boutons flottants « haut / bas de page » (suivent le défilement, thème clair et sombre) */
.scrollers { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.scrollers a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font: 700 1.3rem var(--ui); color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); text-decoration: none; opacity: .85; }
.scrollers a:hover { opacity: 1; background: var(--paper-2); }
@media print { .scrollers { display: none; } }

/* Maquette de boutique (boutique.html) : bandeau de démonstration, grille d'articles, panier */
.shop-demo { margin: 16px 0 0; padding: 12px 16px; border: 2px dashed #b5651d; border-radius: 8px; background: color-mix(in srgb, #f4a62a 14%, var(--paper)); font: 500 .95rem/1.5 var(--ui); }
.shop { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; margin: 8px 0 32px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.shop-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 10px; padding: 14px; background: var(--paper); }
.shop-card h2 { font-size: 1.15rem; margin: 10px 0 6px; }
.shop-card p { margin: 0 0 8px; font: 400 .95rem/1.5 var(--ui); }
.shop-price { font: 800 1.2rem var(--ui) !important; color: var(--forest); margin-top: auto !important; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.shop-visual { height: 120px; border-radius: 8px; background: var(--paper-2); position: relative; overflow: hidden; }
.shop-coffret::before, .shop-coffret::after { content: ""; position: absolute; width: 64px; height: 88px; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .18); top: 16px; }
.shop-coffret::before { left: calc(50% - 50px); transform: rotate(-8deg); border-top: 14px solid var(--forest); }
.shop-coffret::after { left: calc(50% - 14px); transform: rotate(6deg); border-top: 14px solid #b5651d; }
.shop-floches { background: repeating-linear-gradient(90deg, transparent 0 30%, #c62828 30% 38%, #f9a825 38% 46%, transparent 46% 54%, #1565c0 54% 62%, #2e7d32 62% 70%, transparent 70% 100%), var(--paper-2); }
.shop-fiche-perso::before { content: ""; position: absolute; inset: 14px calc(50% - 46px); border-radius: 6px; background: #fff; border-top: 12px solid var(--forest); box-shadow: 0 2px 6px rgb(0 0 0 / .18); }
.shop-cart { position: sticky; top: 16px; border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; background: var(--paper); font-family: var(--ui); }
.shop-cart h2 { margin: 0 0 8px; font-size: 1.15rem; }
.cart-list { list-style: none; margin: 0 0 10px; padding: 0; }
.cart-list li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.cart-total { margin: 8px 0 12px; }
@media (max-width: 760px) { .shop { grid-template-columns: 1fr; } .shop-cart { position: static; } }
