/* Régie — deliberately plain. This is a tool, not a brochure: the site itself
   carries the design language, and an admin that imitates it invites the client
   to confuse "what I see here" with "what is published".

   One visual decision does carry weight: provenance is rendered as prominently
   as the value it explains. If the source is a footnote, nobody reads it, and
   the whole point of the sidecar is lost. */

:root {
  --ink: #16181d;
  --ink-2: #4a5058;
  /* Was #767d87 = 4.16:1 on the card and 3.88:1 on the page background, so
     every 13.6px line using it (field hints, provenance, asset metadata) failed
     WCAG AA for normal text. Measured, not guessed: #6b7280 is the first value on
     the same hue that clears 4.5:1 against BOTH surfaces — but only by 0.01 on
     the page background, which is not a margin, it is a rounding coincidence.
     #666d79 gives 5.21 on the card and 4.86 on the page. */
  --ink-3: #666d79;
  --line: #dfe2e7;
  /* Borders that IDENTIFY a control (inputs, selects, file pickers) need 3:1 —
     WCAG 1.4.11. --line is 1.30:1, which is right for a decorative card edge
     and not enough for a text box. Decorative and functional borders are
     therefore two tokens, not one. */
  --line-strong: #767d87;
  --bg: #f6f7f9;
  --card: #fff;
  --volt: #c8ff00;
  --volt-ink: #3d4a00;
  /* TEXT ON A VOLT FILL. Distinct from --volt-ink, which is "volt-coloured text
     on a normal background" and therefore has to lighten in dark mode. --volt
     itself never changes, so a button using the flipping token rendered #d6ff4d
     on #c8ff00 — a 1.03:1 ratio, i.e. invisible. Caught by screenshotting the
     dark theme at 375px; it had already shipped on the Marque screen's
     "Envoyer et publier" button earlier the same day. */
  --on-volt: #3d4a00;
  --warn: #b45309;
  --stop: #b42318;
  --ok: #067647;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee; --ink-2: #b3b9c2; --ink-3: #8a919b;
    --line: #2c3037; --line-strong: #646c79; --bg: #14161a; --card: #1b1e23;
    --volt-ink: #d6ff4d; --warn: #f0a868; --stop: #f97066; --ok: #4ade80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: inherit; }

/* ---------- chrome ---------- */
.top {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .85rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
/* 23px tall as written, and 2.5.8 wants 24. It is a standalone header control,
   not a word inside running text, so the inline exception does not apply. */
.brand {
  font-weight: 500; text-decoration: none; letter-spacing: -.01em;
  /* inline-flex makes the bare "Régie " text node and the <b> two flex items,
     which collapses the whitespace between them — it shipped as
     "RégieAthletic Center" until a 320px screenshot showed it. `gap` puts the
     word space back as layout instead of relying on a collapsed text node. */
  display: inline-flex; align-items: center; gap: .3em; min-height: 24px;
}
.brand b { font-weight: 700; }
/* THE RÉGIE SAYS SO WHEN IT IS BEHIND THE CODE ON DISK (see
   admin/lib/freshness.mjs). Under the sticky header rather than inside it: this
   is three lines of prose, and a banner that pinned itself would eat the top of
   every screen for as long as it takes someone to restart a service.

   The signal is carried by the left rule AND by the words, never by colour
   alone — so the text stays --ink on --card (15:1 light, 13:1 dark) instead of
   --warn on --card, which would make the one notice nobody should skim the one
   thing on the page that is hard to read. */
.stale {
  display: grid; gap: .35rem;
  padding: .8rem 1.25rem .85rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  font-size: .9rem;
}
.stale p { margin: 0; max-width: 68ch; }

.top nav { display: flex; gap: .35rem; margin-right: auto; flex-wrap: wrap; }
.top nav a {
  text-decoration: none; padding: .35rem .7rem; border-radius: 999px;
  color: var(--ink-2); font-size: .92rem;
}
.top nav a:hover { background: var(--bg); }
.top nav a.on { background: var(--ink); color: var(--card); }
.out button {
  font: inherit; font-size: .88rem; padding: .35rem .8rem; cursor: pointer;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2);
}
.out button:hover { border-color: var(--ink-3); }

main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
/* The reading column is 60rem because prose wants to be narrow. A device
   preview does not: at 1280 the column left only 920px for a 1280px frame, and
   a wider monitor did not help because the cap is fixed. This screen gets the
   window. */
main.wide { max-width: none; }
/* ---------- l'écran d'édition, avec son aperçu à côté ----------
   La colonne du formulaire garde 60rem : une ligne de français plus large est
   moins lisible, et c'est l'écran où le client passe son temps. C'est l'aperçu
   qui prend la place restante, et seulement quand il y en a.

   AUCUN `overflow` ICI, ET C'EST DÉLIBÉRÉ. Le bouton « Publier » est
   `position: sticky; bottom: 0` (voir `.publish`) : un `overflow` sur un
   ancêtre le tuerait en silence, et ce dépôt a failli le « corriger » une fois
   en croyant qu'il allait mal. La grille n'en pose pas, et `minmax(0, 1fr)`
   évite qu'une colonne refuse de rétrécir. */
main.split { max-width: 96rem; }
.edit-split { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1fr); }
/* 60rem EN PERMANENCE, pas seulement en deux colonnes. Sans ce plafond,
   `main.split` (96rem) laissait le formulaire s'étaler à 1240 px sous le point
   de bascule — la mesure de lecture que cette feuille défend explicitement
   ailleurs, perdue exactement là où le client passe son temps. Mesuré : 1240 px
   à 1280 de fenêtre avant ce plafond, 960 après. */
.edit-col { min-width: 0; max-width: 60rem; }
.edit-live { min-width: 0; }
.edit-live-h {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin: 0 0 .45rem; font-weight: 600;
}
.edit-live iframe {
  width: 100%; height: min(68vh, 720px); display: block;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--card);
}
.edit-live-note { font-size: .82rem; color: var(--ink-3); margin: .5rem 0 0; }

@media (min-width: 90rem) {
  .edit-split { grid-template-columns: minmax(0, 60rem) minmax(0, 1fr); align-items: start; }
  /* `align-items: start` donne au panneau sa hauteur propre, mais sa ZONE de
     grille fait la hauteur de la rangée : `sticky` a donc où glisser pendant
     que le formulaire défile. */
  .edit-live { position: sticky; top: 1rem; }
}
/* Sous 90rem, l'aperçu passe SOUS le formulaire — il ne doit jamais repousser
   les champs, qui sont ce qu'on vient faire. */
/* Only the STAGE wants the window. A line of French prose 1900px wide is
   unreadable, so the text on that screen keeps the reading measure while the
   frame beside it does not. */
main.wide > h1,
main.wide > .lead,
main.wide > .screens,
main.wide > .scr-note,
main.wide > .scr-scale { max-width: 60rem; }
h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .4rem; }
.lead { color: var(--ink-2); margin: 0 0 1.75rem; }
.back { margin: 0 0 1rem; font-size: .9rem; }
/* Alone in its own paragraph, so not covered by 2.5.8's "in a sentence"
   exception — it measured 77x16. Padding rather than height keeps the baseline. */
.back a {
  color: var(--ink-3); text-decoration: none;
  display: inline-block; min-height: 24px; padding: 4px 0;
}
.back a:hover { color: var(--ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

.foot {
  max-width: 60rem; margin: 0 auto; padding: 1.25rem;
  color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line);
}

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 1.25rem; }
.login {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; width: min(23rem, 100%); display: grid; gap: 1rem;
}
.login h1 { font-size: 1.2rem; margin: 0 0 .5rem; font-weight: 500; }
.login label { display: grid; gap: .35rem; font-size: .88rem; color: var(--ink-2); }
.login input {
  font: inherit; padding: .6rem .7rem; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--bg); color: var(--ink);
}
.login input:focus-visible { outline: 3px solid var(--volt-ink); outline-offset: 1px; }
.login button {
  font: inherit; font-weight: 600; padding: .65rem; cursor: pointer; margin-top: .35rem;
  background: var(--ink); color: var(--card); border: 0; border-radius: 8px;
}
.err { color: var(--stop); font-size: .88rem; margin: 0; }
/* Same slot as .err, but for something true and unalarming — a big file that
   will simply take a while. Was .err until 2026-09-05, when the 60 s upload
   wall it warned about stopped existing. */
.softnote { color: var(--ink-2); font-size: .88rem; margin: 0; }

/* ---------- open items ---------- */
/* minmax(0, 1fr), not the default `auto`. An auto-sized grid track refuses to
   shrink below its content's MIN-CONTENT width, and Chrome's `input[type=file]`
   has a wide intrinsic minimum (325px here, in French), so at 320px the Marque
   cards forced the document 63px wider than the viewport — `max-width: 100%` on
   the input cannot help, because min-content sizing ignores it. Same family as
   the `1fr` = `minmax(auto, 1fr)` trap. */
.items { display: grid; gap: .85rem; grid-template-columns: minmax(0, 1fr); }
.item {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3); border-radius: var(--radius); padding: 1rem 1.15rem;
}
.item-missing { border-left-color: var(--stop); }
.item-disputed { border-left-color: var(--warn); }
.item-inferred { border-left-color: var(--ink-3); }
.item-blocker { border-left-color: var(--stop); background: color-mix(in srgb, var(--stop) 4%, var(--card)); }
.item-done { border-left-color: var(--line); opacity: .72; }
.item-blocker .badge { color: var(--stop) !important; }
.sub { font-size: 1.1rem; margin: 2.5rem 0 .4rem; letter-spacing: -.01em; }
.item h3, .item h2 { margin: 0; font-size: .95rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.item p { margin: .4rem 0 0; color: var(--ink-2); font-size: .92rem; }
.badge {
  display: inline-block; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700; color: var(--ink-3) !important;
}
.item-missing .badge { color: var(--stop) !important; }
.item-disputed .badge { color: var(--warn) !important; }

/* ---------- sections ---------- */
.secs { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.sec {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; text-decoration: none; display: block;
}
.sec:hover { border-color: var(--ink-3); }
.sec h3 { margin: 0 0 .25rem; font-size: 1rem; }
.sec p { margin: 0 0 .5rem; color: var(--ink-2); font-size: .88rem; }
/* `.sec span` USED TO LIVE HERE and it was killing the chip colours.
   From the old card design, when the count was a bare <span>. Its specificity
   (0,1,1) beats every single-class chip rule (0,1,0), so .chip-open/.chip-ok/
   .chip-deferred all rendered in --ink-3 grey in both themes, whatever they
   said — measured rgb(107,114,128) in a live browser, while .grp-count, which
   sits outside .sec, correctly rendered orange one line above. Source order
   never entered into it. Every span in a card now carries its own class, so the
   blanket rule is deleted rather than out-specified: adding `.sec .chip` would
   have left the same trap armed for the next span. */

/* ---------- fields ---------- */
.fields { display: grid; gap: .6rem; }
.field {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1.1rem;
}
.field-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.trail { color: var(--ink-3); font-size: .78rem; }
.field-head label { font-weight: 600; font-size: .92rem; }
.field-value {
  margin: .35rem 0 .5rem; padding: .5rem .65rem;
  background: var(--bg); border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem;
  /* Long copy (FAQ answers, page leads) must wrap, and a very long unbroken
     string must scroll inside its own box rather than widening the document. */
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14rem; overflow: auto;
}
.field-value.empty, .empty { color: var(--ink-3); font-style: italic; }
.field-prov { font-size: .82rem; color: var(--ink-2); display: grid; gap: .2rem; }

/* UN REFUS SE VOIT SUR LE CHAMP, PAS SEULEMENT EN TÊTE D'ÉCRAN.
   La couleur ne porte rien toute seule : le motif est écrit sous la boîte, et
   le liseré ne fait que mener l'œil jusqu'à lui. */
.field-refus { border-left: 3px solid var(--stop); padding-left: .55rem; }
.field-refus-why { margin: .3rem 0 0; font-size: .88rem; color: var(--stop); font-weight: 600; }
.fld-refus > summary { border-left: 3px solid var(--stop); }

.refus-banner {
  border: 1px solid var(--stop);
  background: color-mix(in srgb, var(--stop) 5%, var(--card));
  border-radius: 6px; padding: .8rem .9rem; margin: 0 0 1rem;
}
.refus-banner h2 { margin: 0 0 .35rem; font-size: 1rem; color: var(--stop); }
.refus-banner p { margin: 0; font-size: .92rem; }
.refus-banner ul { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .9rem; }
.refus-banner a { color: var(--stop); }
.prov { font-weight: 600; }
.prov-verified { color: var(--ok); }
.prov-stated { color: var(--ink-2); }
.prov-inferred, .prov-disputed { color: var(--warn); }
.prov-missing, .prov-none { color: var(--stop); }
.prov-detail { color: var(--ink-3); }
.inh { color: var(--ink-3); font-weight: 400; }

/* ---------- preview ---------- */
.preview {
  /* Width comes from the chosen device preset, inline on the element. Height is
     a viewport fraction so the frame is usable on a laptop and on a phone.

     content-box IS THE POINT. With the default border-box the 1px border eats
     into the declared width, so "320px" laid the site out at 318 and "390px" at
     388 — two pixels that can sit the wrong side of a breakpoint, in a tool
     whose only job is to show the layout at a given width. Measured: 388 before,
     390 after. */
  box-sizing: content-box;
  height: min(78vh, 900px); border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--card); display: block;
}
/* The stage centres a narrow frame instead of leaving it stranded on the left,
   and scrolls ITSELF if a wide preset is chosen on a narrow screen — the panel
   behind it must never scroll sideways. */
/* The stage centres a narrow frame instead of leaving it stranded on the left,
   and SCROLLS ITSELF when the chosen width is wider than the space available —
   the panel behind it must never scroll sideways. The frame keeps its true
   width: capping it with max-width made "Ordinateur 1280px" render at 914px on
   a 1280 screen, which is a label that lies about the one number it exists to
   show. */
.preview-stage {
  display: flex;
  /* `safe center`, and the flex-start fallback ABOVE it, are not a nicety.
     Plain `justify-content: center` on a SCROLLABLE flex container makes an
     oversized item overflow BOTH sides — and the left overflow cannot be
     scrolled to. Measured: a 1280px frame in a 920px stage reported
     scrollWidth 1104, i.e. 184px reachable on the right and ~180px of the
     site's left edge — its logo and navigation — permanently unreachable. The
     `safe` keyword falls back to start alignment exactly when the item
     overflows; engines that do not support it get flex-start and a frame that
     is at least entirely reachable. */
  justify-content: flex-start;
  justify-content: safe center;
  overflow-x: auto; padding: .2rem;
  background: var(--bg); border-radius: var(--radius);
}
/* A frame wider than the stage must not be squeezed by the flex centring — and
   no `margin: auto`, which reintroduces the unreachable-left-edge problem that
   `safe center` was added to solve. */
.preview-stage > .preview-scale { flex: 0 0 auto; }

/* SCALE-TO-FIT. The wrapper is sized to the SCALED dimensions while the iframe
   keeps its true layout width, so the site inside still lays out at 1280 and
   the client sees all of it at once. This is what browser devtools do, and it
   is the difference between "a preview of the desktop layout" and "the middle
   83% of it behind a scrollbar".
   Set by app.js: without script the wrapper has no scale and the stage scrolls,
   which still works. */
.preview-scale { transform-origin: top left; }
/* THE FULL-WIDTH PRESET, IN CSS AND NOT INLINE. The wrapper is a content-sized
   flex item, so an iframe at width:100% had nothing to resolve against and
   "Pleine largeur" laid the site out at 302px — narrower than the phone preset.
   An inline style fixed it for exactly as long as it took fit() to run, because
   that function clears style.width when there is no target width. In CSS it
   cannot be wiped by the script. */
.preview-scale[data-width="0"] { width: 100%; }
.preview-scale > .preview { display: block; }
/* ---------- aperçu : le cadre d'abord, les réglages autour ----------
   CE QUI N'ALLAIT PAS. Tout s'empilait dans une seule colonne : titre, chapeau,
   cinq largeurs, PUIS vingt-six pages en pastilles repliées sur cinq ou six
   rangées, puis deux légendes — et le cadre commençait sous le bas de l'écran.
   Sur un portable 1280x800, la seule chose que le client venait voir était la
   seule qu'il ne voyait pas.

   DEUX RÈGLES QUE CETTE FEUILLE A DÉJÀ PAYÉES, et qui décident de tout ici :
     · `minmax(0, 1fr)` et jamais `1fr` seul — une piste `1fr` refuse de
       descendre sous la largeur de son contenu, et le contenu de cette
       colonne-ci est un cadre de 1280 px. Avec `1fr`, choisir « Ordinateur »
       sur un écran de 1280 pousserait la RÉGIE ENTIÈRE en débordement
       horizontal au lieu de faire défiler la scène.
     · aucun `overflow` sur un ancêtre de l'élément collant. `.apercu` n'en
       porte donc pas ; `overflow-y` est sur `.apercu-side` LUI-MÊME, ce qui est
       sans effet sur son propre `position: sticky`.
   Voir le commentaire du résumé des lignes, plus bas, qui énonce les deux. */
.apercu { display: grid; gap: 1rem 1.25rem; grid-template-columns: minmax(0, 1fr); }
/* `min-width: 0` explicite EN PLUS de minmax : un élément de grille a
   `min-width: auto` par défaut, et c'est lui qui refuse de rétrécir. */
.apercu-main { min-width: 0; }
.apercu-h {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin: 0 0 .45rem; font-weight: 600;
}
/* La barre des largeurs reste AU-DESSUS du cadre : elle le modifie. Le lien
   d'édition va à l'opposé — c'est le geste suivant, pas un réglage. */
.apercu-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.apercu-bar > .screens { margin: 0; }
.apercu-edit {
  margin-left: auto; font-size: .88rem; min-height: 24px;
  display: inline-flex; align-items: center;
}
/* Les légendes DESCENDENT sous le cadre : elles le décrivent, elles n'ont pas à
   le repousser. Elles gardent la mesure de lecture, que `main.wide > .scr-note`
   ne leur donne plus puisqu'elles ne sont plus filles directes. */
.apercu-main .scr-note { max-width: 60rem; margin: .6rem 0 0; }
.apercu-main .scr-scale { max-width: 60rem; }
.apercu-main > .preview-stage { margin-top: .5rem; }

@media (min-width: 68rem) {
  .apercu { grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  /* `align-items: start` donne à l'aside sa hauteur naturelle, mais sa ZONE de
     grille fait la hauteur de la rangée — donc `sticky` a de la place où
     glisser, ce qui ne serait pas le cas avec un étirement par défaut. */
  .apercu-side {
    position: sticky; top: 1rem;
    max-height: calc(100vh - 3rem); overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Vingt-six liens en colonne : lisibles, et l'un sous l'autre au lieu de
     cinq rangées de pastilles qui changent de forme à chaque sélection. */
  .apercu-side .pgpick { flex-direction: column; flex-wrap: nowrap; gap: .15rem; margin: 0; }
  .apercu-side .pgpick a { width: 100%; }
}
/* Sous 68rem on retombe sur l'empilement, volontairement : une colonne de
   vingt-six liens sur un téléphone serait le même défaut dans l'autre sens.
   Mais l'empilement seul laissait encore le cadre commencer vers 800 px —
   sous la ligne de flottaison d'un téléphone comme d'une tablette. La liste
   est donc BORNÉE et défile pour elle-même : trois rangées de pastilles
   suffisent à choisir, et le cadre remonte dans l'écran.
   Une région qui défile reste atteignable au clavier — un lien qui reçoit le
   focus est ramené dans la vue par le navigateur. */
@media (max-width: 67.99rem) {
  .apercu-side .pgpick {
    max-height: 7.5rem; overflow-y: auto;
    overscroll-behavior: contain; padding-right: .2rem;
  }
}

.screens { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.screens a {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 32px;
  padding: .3rem .7rem; text-decoration: none; font-size: .88rem;
  color: var(--ink-2); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 999px;
}
.screens a:hover { border-color: var(--ink-3); color: var(--ink); }
.screens a.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.screens a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.scr-w { font-variant-numeric: tabular-nums; opacity: .75; font-size: .82rem; }
.scr-note { margin: 0 0 .7rem; font-size: .85rem; color: var(--ink-3); }

@media (max-width: 40rem) {
  main { padding: 1.5rem 1rem 3rem; }
  .top { gap: .75rem; padding: .7rem 1rem; }
}

/* ---------- editing (phase 3) ---------- */
.field input[type="text"], .field textarea {
  font: inherit; width: 100%; margin: .35rem 0 .5rem;
  padding: .5rem .65rem; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg); color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--volt-ink); outline-offset: 1px; border-color: transparent;
}
/* An empty field is a job to do, not a neutral state — the launch blockers are
   all empty fields, and they should look like it. */
.field-empty { border-left: 3px solid var(--stop); }
.field-empty input { border-color: var(--stop); }
.bool { display: flex; align-items: center; gap: .5rem; margin: .35rem 0 .5rem; }
.bool input { width: 1.1rem; height: 1.1rem; }
.ro { margin: .2rem 0 .5rem; font-size: .8rem; color: var(--ink-3); font-style: italic; }

.publish {
  position: sticky; bottom: 0; margin-top: 1.25rem; padding: 1rem 1.15rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; gap: .6rem;
}
.note { display: grid; gap: .3rem; font-size: .85rem; color: var(--ink-2); }
.note input {
  font: inherit; padding: .5rem .65rem; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--bg); color: var(--ink);
}
.publish-why { margin: 0; font-size: .82rem; color: var(--ink-3); }
/* Rien à enregistrer : la barre se réduit à son bouton (voir sync() dans app.js).
   Sans JavaScript, la classe n'est jamais posée — tout reste visible. */
.is-clean .publish .note,
.is-clean .publish .publish-why { display: none; }
.publish button {
  font: inherit; font-weight: 600; padding: .7rem 1.1rem; cursor: pointer;
  background: var(--ink); color: var(--card); border: 0; border-radius: 8px; justify-self: start;
}
.publish button[disabled] { opacity: .45; cursor: default; }
.warn-inline { margin: 0; color: var(--warn); font-size: .85rem; }

/* ---------- publish result ---------- */
.step { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ok-big { font-size: 1.4rem; font-weight: 700; color: var(--ok); margin: 0 0 .3rem; }
.fail-big { font-size: 1.4rem; font-weight: 700; color: var(--stop); margin: 0 0 .3rem; }
.findings { margin: .5rem 0 1rem; padding-left: 1.1rem; color: var(--ink-2); }
.findings li { margin: .25rem 0; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: .55rem 1rem; background: var(--ink); color: var(--card); border-radius: 8px;
}
.item-deferred { border-left-color: var(--ink-3); opacity: .85; }
.item-deferred .badge { color: var(--ink-3) !important; }
.item-actions { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; margin-top: .7rem !important; }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; }
/* The deep link lands on a field; make it obvious which one. */
.field:target { outline: 3px solid var(--volt-ink); outline-offset: 3px; }

/* Items computed by the truth gate headline a SENTENCE, not a JSON path, so the
   monospace face that suits `club.foundedYear` is wrong for them — it makes
   French read like a stack trace. Same card, different heading voice. */
.item-audit h3 { font-family: inherit; font-weight: 650; font-size: 1rem; letter-spacing: -.01em; }
.item-more { font-size: .82rem !important; color: var(--ink-3) !important; }

/* ---------- answering a question, as opposed to filling a field ----------
   Two items in the queue were readable but unanswerable: the data was already
   right, so there was no box to type in and no way to say "yes, that is
   correct". This is that answer. Deliberately quiet — it sits inside a card
   that has already asked the question, and it must not compete with the
   "Répondre dans …" link on items that DO have a field to fill. */
.decide {
  margin-top: .85rem; padding-top: .8rem; border-top: 1px dashed var(--line);
  display: grid; gap: .6rem;
}
.decide fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.decide legend { padding: 0; font-size: .82rem; color: var(--ink-3); }
.decide .choice { display: inline-flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; font-weight: 600; }
/* 24px minimum target, enforced by the responsive gate on the public site and
   applied here by hand — the client uses this on a phone at the club. */
.decide .choice input { width: 24px; height: 24px; accent-color: var(--ink); }
.decide label { display: grid; gap: .3rem; font-size: .85rem; color: var(--ink-2); }
.decide textarea {
  width: 100%; box-sizing: border-box; font: inherit; line-height: 1.5;
  padding: .5rem .6rem; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink); resize: vertical;
}
.decide textarea:focus-visible { outline: 3px solid var(--volt-ink); outline-offset: 2px; }
/* The sentence above the "apply" button. It says what the click will change and
   how long it takes — a button that republishes the site must never be a bare
   verb. Sized like the card body, not like a form label: it is prose. */
.decide-lead { margin: 0 !important; font-size: .85rem; color: var(--ink-2); line-height: 1.55; }
.decide-actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: 0 !important; }
.decide button { font: inherit; cursor: pointer; border: 0; }
/* "Reporter" must be reachable but never the obvious click. */
.btn-quiet { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong) !important; }

/* ---------------------------------------------------------------- MARQUE */
/* The upload screen. The thumbnail sits on a checkerboard because half of what
   lands here is a transparent PNG or an SVG with no background: on a white card
   a white logo is indistinguishable from an upload that silently failed. */
.asset-now { display: flex; gap: 1rem; align-items: flex-start; margin: 0.9rem 0; flex-wrap: wrap; }
.asset-thumb {
  flex: none; display: grid; place-items: center;
  width: 148px; min-height: 84px; padding: 0.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%),
    linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
.asset-thumb img { max-width: 100%; max-height: 120px; height: auto; display: block; }
/* THE VIDEO CARD HAD NO RULE AT ALL. `.asset-thumb` sizes the image wrapper,
   but the `<video>` of a video placement carries its own class — so it laid
   itself out at the file's intrinsic 1280×720 and pushed the whole document
   past the viewport at every width, phone and desktop alike. It now sizes like
   the image thumbs it sits beside, and never exceeds its column. */
.asset-thumb-v {
  flex: none; display: block; min-width: 0;
  width: 260px; max-width: 100%; height: auto; max-height: 148px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background-color: #000;
}
.asset-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; margin: 0; font-size: 0.88rem; }
.asset-meta dt { color: var(--ink-3); }
.asset-meta dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-all; }
.asset-empty { color: var(--ink-2); margin: 0.6rem 0 0.9rem; }
.asset-remove { margin: 0 0 1rem; }
.asset-form { border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 0.5rem; }
.asset-form .help { color: var(--ink-2); margin: 0 0 0.7rem; }
.asset-file, .asset-alt { display: block; margin: 0 0 0.75rem; }
.asset-file > span, .asset-alt > span { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.asset-alt input {
  width: 100%; max-width: 34rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--ink);
  font: inherit;
}
.asset-alt em { display: block; color: var(--ink-3); font-size: 0.85rem; margin-top: 0.25rem; font-style: normal; }
.asset-file input[type=file] { font: inherit; color: var(--ink-2); width: 100%; max-width: 100%; }

/* The provenance row's "voir la source" link measured 251x20 and sits in a
   metadata row rather than a sentence, so WCAG 2.5.8's inline exception does not
   cover it. Padding, not height, so the text position does not move. */
.field-prov a, .prov + a { display: inline-block; min-height: 24px; padding: 2px 0; }
.asset-rules { color: var(--ink-3); font-size: 0.85rem; margin: 0 0 0.9rem; }
.asset-form button {
  font: inherit; font-weight: 600; padding: 0.55rem 1.1rem; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 8px; background: var(--volt); color: var(--on-volt);
}
.asset-form button:hover { filter: brightness(1.06); }
@media (max-width: 560px) {
  .asset-thumb { width: 100%; }
  .asset-thumb-v { width: 100%; max-height: none; }
}

/* AGRANDIR ET TÉLÉCHARGER — « Médias pouvoir zoomer sur images », « Admin
   marque / fichiers pouvoir télécharger ». La vignette est un LIEN (voir
   zoomThumb() dans server.mjs) : il garde le damier de .asset-thumb, et le
   petit ⤢ dans le coin dit qu'on peut cliquer — sans lui, rien ne distingue
   une vignette cliquable d'une image posée. */
.asset-zoom { position: relative; cursor: zoom-in; text-decoration: none; }
.asset-zoom:hover { border-color: var(--line-strong); }
.asset-zoom:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.asset-zoom-cue {
  position: absolute; right: 4px; bottom: 4px;
  min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px;
  display: grid; place-items: center; font-size: 14px; line-height: 1;
  background: rgba(22, 24, 29, .78); color: #fff;
}
.asset-dl-row { margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .25rem .8rem; align-items: baseline; }
/* Un lien, pas un bouton : il ne publie rien et ne modifie rien. Encadré quand
   même, et à 32px de haut comme .asset-acts .btn-quiet, pour se trouver au doigt. */
.asset-dl {
  display: inline-block; min-height: 32px; padding: .35rem .8rem; line-height: 1.4;
  border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: .9rem;
}
.asset-dl::before { content: "↓"; margin-right: .4rem; }
.asset-dl:hover { background: var(--bg); }
.asset-dl:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.asset-dl-note { color: var(--ink-3); font-size: .85rem; }

/* Le dialogue d'agrandissement (app.js section 7). Plein écran sur téléphone,
   l'image tient TOUJOURS dans la fenêtre : max-height en vh moins la place du
   bouton et de la légende, object-fit pour ne jamais déformer. */
dialog.zoom {
  width: min(96vw, 1400px); max-width: 96vw; max-height: 96vh;
  padding: 2.9rem .75rem .75rem; margin: auto;
  /* Fond sombre dans les deux thèmes : une photo se regarde sur du noir, et
     le damier de l'image garde visible un logo transparent. */
  border: 1px solid #2c3037; border-radius: var(--radius);
  background: #111316; color: #e8eaee;
}
dialog.zoom::backdrop { background: rgba(10, 11, 13, .82); }
dialog.zoom figure { margin: 0; display: grid; gap: .5rem; justify-items: center; }
dialog.zoom img {
  display: block; max-width: 100%; max-height: calc(96vh - 7.5rem); width: auto; height: auto;
  object-fit: contain;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%),
    linear-gradient(45deg, #eceef1 25%, transparent 25%, transparent 75%, #eceef1 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
dialog.zoom figcaption { color: #c9ced6; font-size: .9rem; max-width: 70ch; text-align: center; }
.zoom-close {
  position: absolute; top: .5rem; right: .5rem; min-height: 36px; padding: .4rem .9rem;
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 8px; background: var(--card); color: var(--ink);
}
.zoom-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 560px) {
  dialog.zoom { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; padding: 3.2rem .5rem .5rem; }
  dialog.zoom figure { height: 100%; align-content: center; }
  dialog.zoom img { max-height: calc(100dvh - 8rem); }
}

/* --------------------------------------------------------------- CONTENU */
/* The index of every published value: a search box, a one-line summary of what
   is outstanding, and the eighteen rubrics in five fixed groups.

   Restraint is the point. This screen is a way in, not a dashboard: no
   progress rings, no counts racing each other for attention. Exactly one chip
   per card, and the only colour that appears is on the cards that want him. */

.sum { margin: 0 0 1rem; font-size: .95rem; }
.sum-open {
  border-left: 3px solid var(--warn); padding-left: .7rem; color: var(--ink);
}
.sum-clear { color: var(--ink-2); }
.sum a { color: var(--ink); }

/* ---- search ---- */
.find { margin: 0 0 1.6rem; }
.find label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.find-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.find input[type="search"] {
  font: inherit; flex: 1 1 20rem; min-width: 0;
  padding: .55rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink);
  /* iOS zooms the page when a focused input is under 16px. */
  font-size: max(1rem, 16px);
}
.find button {
  font: inherit; font-weight: 600; cursor: pointer; padding: .55rem 1.1rem;
  border: 1px solid var(--ink); border-radius: 8px;
  background: var(--volt); color: var(--on-volt);
}
.find .btn-quiet {
  font: inherit; padding: .55rem 1rem; border-radius: 8px; text-decoration: none;
  display: inline-flex; align-items: center;
}
.find-help { margin: .4rem 0 0; font-size: .84rem; color: var(--ink-3); }
.find-count { margin: 0 0 .8rem; font-size: .9rem; color: var(--ink-2); }
.find-none { margin: 0 0 1rem; color: var(--ink-2); }

.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.hit a {
  display: grid; gap: .15rem; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .85rem;
}
.hit a:hover { border-color: var(--ink-3); }
.hit-where { font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.hit-label { font-weight: 600; font-size: .95rem; }
.hit-loc {
  font-weight: 500; font-size: .72rem; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 .25rem; vertical-align: .1em;
}
.hit-val { font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
/* The browser default is a yellow that vanishes in dark mode. */
.hit-val mark {
  background: var(--volt); color: var(--on-volt); border-radius: 2px; padding: 0 .1em;
  font-weight: 600;
}

/* ---- groups ---- */
.grp { margin: 0 0 1.8rem; }
.grp h2 { font-size: 1.02rem; margin: 0 0 .15rem; font-weight: 600; }
.grp-hint { margin: 0 0 .7rem; font-size: .86rem; color: var(--ink-3); }

.sec-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .82rem; }
.sec-count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sec-langs {
  color: var(--ink-3); font-size: .74rem; letter-spacing: .04em;
  margin-left: auto; white-space: nowrap;
}

.chip {
  display: inline-block; border-radius: 999px; padding: .1rem .5rem;
  font-weight: 600; font-size: .78rem; border: 1px solid currentColor;
}
.chip-open { color: var(--warn); }
.chip-deferred { color: var(--ink-2); }
.chip-ok { color: var(--ok); border-color: var(--line-strong); font-weight: 500; }

/* Off-screen but announced. `display:none` and `visibility:hidden` remove it
   from the accessibility tree too, which is the opposite of the point. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- focus: one visible ring everywhere, in both themes ---- */
/* --ink is 17.8:1 on the light card and 13.9:1 on the dark one, so a ring drawn
   in it is unmissable without inventing an accent colour this tool does not
   have. :focus-visible only, or a mouse click leaves a ring behind. */
/* The header was left on Chrome's default 1px ring, which contradicted the
   claim below. Named explicitly rather than with a blanket `a:focus-visible`,
   so a future element does not inherit a ring that has not been looked at. */
.sec:focus-visible, .hit a:focus-visible, .find input:focus-visible,
.find button:focus-visible, .find .btn-quiet:focus-visible, .sum a:focus-visible,
.top nav a:focus-visible, .brand:focus-visible, .out button:focus-visible,
.rec a:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}

@media (max-width: 560px) {
  /* `flex: 1 1 20rem` on the input sizes the MAIN axis. Stacking the row turns
     that axis vertical, so the search box became a 320px-tall void with the
     placeholder floating in the middle of it. Basis must go back to auto
     whenever the direction changes — flex-basis is not "width". */
  .find-row { flex-direction: column; align-items: stretch; }
  .find input[type="search"] { flex: 0 0 auto; width: 100%; }
  .find .btn-quiet { justify-content: center; }
  .sec-langs { margin-left: 0; }
}

/* The group heading's aside: the total for the group, counted once per question.
   Deliberately quieter than the card chips — it is a signpost while scrolling,
   not a third thing competing for the same glance. */
.grp-count {
  /* At 320px "Tarifs et abonnement 1 question" wraps, and without this the pill
     itself broke across the line — "(1" above "question)" — which nothing
     detects as overflow because the document never widens. */
  white-space: nowrap;
  font-weight: 500; font-size: .8rem; color: var(--warn);
  border: 1px solid currentColor; border-radius: 999px; padding: .05rem .45rem;
  vertical-align: .12em; margin-left: .3rem;
}
/* "One question, two rubrics" — see the comment in the /contenu route. Last
   line of the card, quiet, because it is context and not a task. */
.sec-linked {
  display: block; margin-top: .45rem; font-size: .78rem; color: var(--ink-3);
  border-top: 1px dashed var(--line); padding-top: .4rem;
}

/* ---- "Vos dernières modifications": absent entirely when there is nothing ---- */
.recent { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.rec { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.rec a {
  display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap;
  text-decoration: none; color: inherit; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.rec a:hover { border-color: var(--ink-3); }
.rec a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rec-what { font-weight: 600; font-size: .9rem; }
.rec-when { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rec-was { font-size: .8rem; color: var(--ink-3); margin-left: auto; overflow-wrap: anywhere; }
@media (max-width: 560px) { .rec-was { margin-left: 0; } }
/* The audit could not be run, so we do not know. Never rendered alongside a
   count — it replaces one, and it must not read like reassurance. */
.chip-unknown { color: var(--ink-2); border-style: dashed; }

/* -------------------------------------------------------------- FICHIERS */
/* The drop zone is a <label> around a real file input: clicking it opens the
   picker with no script at all, and app.js only adds dropping. */
.drop-form { margin: 0 0 1.6rem; }
.drop {
  display: grid; gap: .3rem; place-items: center; text-align: center;
  padding: 1.8rem 1rem; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--card); color: var(--ink-2);
}
.drop:hover { border-color: var(--ink-3); }
.drop:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
/* The dragged-over state changes BORDER and BACKGROUND, not just colour: a
   colour-only cue is invisible to anyone who cannot distinguish it. */
.drop-over { border-style: solid; border-color: var(--ink); background: color-mix(in srgb, var(--volt) 12%, var(--card)); }
.drop-strong { font-weight: 600; font-size: 1rem; color: var(--ink); }
.drop-or { font-size: .88rem; color: var(--ink-3); }
/* The <label> around it is a ~110px target, so the effective hit area was
   already fine — but the control itself measured 253x21 and arguing an
   exemption is worse than clearing the bar. It stays VISIBLE on purpose:
   with JavaScript off, the native input's own "2 files" text is the only
   confirmation he gets that anything was selected. */
.drop input[type=file] { margin-top: .5rem; max-width: 100%; min-height: 24px; }
.drop-picked { font-size: .85rem; color: var(--ink); overflow-wrap: anywhere; }
.drop-form button {
  margin-top: .8rem; font: inherit; font-weight: 600; cursor: pointer;
  padding: .55rem 1.1rem; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--volt); color: var(--on-volt);
}
.drop-form button[disabled] { opacity: .6; cursor: default; }
.drop-form button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.inbox li {
  display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  padding: .55rem .7rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
}
.inbox-name { color: var(--ink); font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; min-height: 24px; display: inline-flex; align-items: center; }
.inbox-name:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.inbox-meta { font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.inbox-del { margin-left: auto; }
/* A folder is not a link, and a cited file has no Retirer button — both need to
   look deliberate rather than look like a missing control. */
.inbox-folder { color: var(--ink-3); font-weight: 600; }
.inbox-keep {
  margin-left: auto; font-size: .82rem; color: var(--ink-3);
  padding: .15rem .45rem; border: 1px dashed var(--line); border-radius: 6px;
}
@media (max-width: 560px) { .inbox-del, .inbox-keep { margin-left: 0; } }
.scr-scale { margin: .5rem 0 0; font-size: .82rem; color: var(--ink-3); }

/* ------------------------------------------------------------- LES PAGES */
/* L'axe « page du site », ajouté quand le client a dit qu'il ne savait pas sur
   quelle page il agissait. Deux écrans le portent (/pages et /pages/<id>) et
   l'écran Médias s'y range désormais.

   LA COULEUR PORTE UNE INFORMATION, ELLE NE DÉCORE PAS. Une page a un accent, et
   c'est le MÊME partout : sur sa carte, sur son bandeau dans Médias, sur son
   onglet dans l'aperçu. Sans cette constance, onze teintes ne seraient qu'un
   arc-en-ciel — exactement ce qu'un outil sobre doit éviter.

   LES VALEURS SONT MESURÉES, PAS CHOISIES. Elles vivent dans
   admin/lib/site-pages.mjs, qui documente le calcul de contraste : chaque paire
   tient AA en clair et en sombre, comme texte sur la carte ET sur sa propre
   teinte. Deux teintes essayées n'y sont pas arrivées et ont été remplacées.

   POURQUOI --a EST INDIRECTE. Un attribut `style` ne peut pas porter de media
   query : le serveur émet les deux valeurs (--a-l et --a-d) et c'est ici que le
   thème choisit. */
.pgrp, .pgcard, .pgjump a, .pgpick a, .pgctx { --a: var(--a-l, var(--ink-2)); }
@media (prefers-color-scheme: dark) {
  .pgrp, .pgcard, .pgjump a, .pgpick a, .pgctx { --a: var(--a-d, var(--ink-2)); }
}

/* La teinte du bandeau. 8% en clair, 6% en sombre — au-delà, --ink-3 tombait
   sous 4.5:1 dessus. Aucun texte en --ink-3 ne s'y pose pour cette raison :
   le bandeau n'emploie que --ink, --ink-2 et l'accent lui-même. */
.pg-head { --tint: color-mix(in srgb, var(--a) 8%, var(--card)); }
@media (prefers-color-scheme: dark) {
  .pg-head { --tint: color-mix(in srgb, var(--a) 6%, var(--card)); }
}

/* ---- le sommaire de l'écran Médias ---- */
.pgjump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.6rem; }
.pgjump a {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 32px;
  padding: .3rem .7rem; text-decoration: none; font-size: .88rem; font-weight: 500;
  border: 1px solid var(--line); border-left: 3px solid var(--a);
  border-radius: 8px; background: var(--card); color: var(--ink);
}
.pgjump a:hover { border-color: var(--ink-3); border-left-color: var(--a); }
.pgjump a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.jump-n {
  font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 .4rem; min-width: 1.35em; text-align: center;
}

/* ---- un groupe de page ---- */
.pgrp { margin: 0 0 2.25rem; }
.pg-head {
  background: var(--tint);
  border: 1px solid var(--line); border-left: 4px solid var(--a);
  border-radius: var(--radius); padding: .8rem 1rem .9rem; margin: 0 0 .85rem;
}
.pg-eyebrow {
  margin: 0 0 .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--a);
}
.pg-head h1, .pg-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; color: var(--ink); }
.pg-lede { margin: .3rem 0 0; color: var(--ink-2); font-size: .92rem; max-width: 62ch; }
.pg-views { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .65rem 0 0; }
.pg-views-lbl { font-size: .82rem; color: var(--ink-2); }
/* 24px de haut au minimum : ce sont des liens isolés dans une rangée, pas des
   mots dans une phrase — l'exception « inline » de WCAG 2.5.8 ne les couvre pas. */
.pg-see {
  display: inline-flex; align-items: center; min-height: 24px; padding: .2rem .6rem;
  font-size: .85rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
}
.pg-see:hover { border-color: var(--a); }
.pg-see:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pgrp-solo { margin-bottom: 1.5rem; }

/* ---- la carte d'une page, sur l'index ---- */
.pgcard { border-left: 4px solid var(--a); }

/* ---- l'onglet de page, dans l'aperçu ---- */
.pgpick { margin-top: .35rem; }
.pgpick a { border-left: 3px solid var(--a); }

/* ------------------------------------------------- MÉDIAS — les encadrés */
/* Le titre d'un emplacement est une phrase française (« Photo d'accueil »), pas
   un chemin de données : la chasse fixe héritée de .item lui donnait un air de
   code source. Elle reste sur /contenu, où le titre EST un chemin. */
.item.asset h3 {
  font-family: inherit; font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em;
}
.asset-also { margin: .35rem 0 0 !important; font-size: .85rem; color: var(--ink-2); }
.asset-also a { color: var(--ink); }
.miss { color: var(--stop); font-style: italic; }

/* Les deux panneaux repliés d'un encadré. Le résumé est la cible cliquable :
   il lui faut la hauteur et le focus visible d'un vrai contrôle. */
.asset-send, .asset-edit { margin: .6rem 0 0; }
.asset-send > summary, .asset-edit > summary {
  display: list-item; cursor: pointer; min-height: 24px; padding: .3rem 0;
  font-weight: 600; font-size: .92rem; color: var(--ink); width: fit-content;
}
.asset-send > summary:focus-visible, .asset-edit > summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px;
}
.asset-send[open] > summary, .asset-edit[open] > summary { margin-bottom: .2rem; }
.asset-edit { border-top: 1px solid var(--line); padding-top: .5rem; }

/* Les actions d'un fichier sur une seule rangée. Sans cette règle les trois
   <form> s'empilaient l'un sous l'autre, chacun sur sa ligne : « Monter »,
   « Descendre » et « Retirer » occupaient trois lignes pour trois petits mots. */
.asset-acts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.asset-acts form { margin: 0; }

/* --------------------------------------------------- LES TROIS NIVEAUX D'ACTION */
/* « Tout est écrit envoyer et publier » — le retour du client, mot pour mot.
   Trois actions coexistent dans un encadré et se ressemblaient toutes : envoyer
   des octets, enregistrer un texte, retirer. Elles ont maintenant trois poids
   et trois libellés qui nomment leur objet.

   Le remplissage volt reste réservé à UNE action par encadré. --on-volt, jamais
   --volt-ink : le second s'éclaircit en thème sombre et donnait 1.03:1 sur le
   volt, c'est-à-dire un bouton invisible, ce qui a déjà été livré une fois. */
.btn-go {
  font: inherit; font-weight: 600; padding: .55rem 1.1rem; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 8px;
  background: var(--volt); color: var(--on-volt);
}
.btn-go:hover { filter: brightness(1.06); }
.btn-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-second {
  font: inherit; font-weight: 600; padding: .5rem 1rem; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.btn-second:hover { background: var(--bg); }
.btn-second:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Retirer est réversible — le fichier se renvoie — donc discret, pas alarmant.
   Le rouge n'apparaît qu'au survol, là où le geste est déjà engagé. */
.btn-undo:hover:not([disabled]) { border-color: var(--stop) !important; color: var(--stop); }
.asset-acts .btn-quiet {
  font: inherit; padding: .45rem .8rem; border-radius: 8px; cursor: pointer;
  min-height: 32px; background: transparent; color: var(--ink-2);
}
.asset-acts .btn-quiet[disabled] { opacity: .45; cursor: default; }
.asset-acts .btn-quiet:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 560px) {
  .pg-head { padding: .7rem .8rem .8rem; }
  .pgjump a { font-size: .84rem; }
  /* Une action par ligne plutôt que deux moitiés de bouton illisibles. */
  .asset-acts form, .asset-acts .btn-quiet { width: 100%; }
  .btn-go, .btn-second { width: 100%; }
}

/* Une phrase de renvoi, et rien d'autre. Elle portait d'abord `.note`, qui est
   un `display: grid` conçu pour le champ de note du formulaire de publication :
   chaque lien de la phrase devenait un élément de grille, donc une ligne à lui
   seul, et la phrase se lisait en escalier. Trouvé en mesurant les quatre
   largeurs, pas en relisant le HTML — trois liens de 288 px de large dans un
   paragraphe de 288 px. */
.crossref { margin: 2rem 0 0; font-size: .88rem; color: var(--ink-2); max-width: 68ch; }
.crossref a { color: var(--ink); }

/* Les liens de ces trois phrases sont dans une phrase, donc couverts par
   l'exception « en ligne » de WCAG 2.5.8 — mais ils se mesuraient à 17 px de
   haut, et la régie a déjà tranché une fois dans l'autre sens pour le lien
   « voir la source ». Du remplissage, pas de la hauteur, pour que le texte ne
   bouge pas. */
.asset-also a, .scr-note a, .crossref a { display: inline-block; min-height: 24px; padding: 2px 0; }

/* « Ces textes s'affichent sur … », en tête du navigateur de champs. Une
   rubrique peut alimenter deux pages, et rien ne le disait là où la
   modification se fait : on pouvait corriger une adresse pour Contact et
   changer, sans le savoir, le pied de page de tout le site. */
.feeds { margin: -1.25rem 0 1.5rem; font-size: .88rem; color: var(--ink-2); }
.feeds a { color: var(--ink); display: inline-block; min-height: 24px; padding: 2px 0; }

/* ------------------------------------------------------------------ AIDE */
/* Le manuel du gérant. Sobre comme le reste : ce n'est pas une brochure, c'est
   une page qu'on relit à un moment où quelque chose ne marche pas. */
.aide-gates, .aide-gestes { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.aide-gates li { display: flex; gap: .6rem; align-items: baseline; font-size: .92rem; color: var(--ink-2); }
.aide-gates b { color: var(--ink); }
.aide-n {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: var(--ink); color: var(--card);
  font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.aide-gestes { gap: 1rem; counter-reset: none; }
.aide-geste {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem;
}
.aide-geste h3 { margin: 0 0 .5rem; font-size: 1rem; display: flex; align-items: center; gap: .55rem; }
.aide-geste ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; color: var(--ink-2); font-size: .92rem; }
.aide-geste ol b { color: var(--ink); }
.aide-note { margin: .55rem 0 0; font-size: .85rem; color: var(--ink-3); }
.aide-safe { margin: .6rem 0 0; padding-left: 1.1rem; display: grid; gap: .4rem; color: var(--ink-2); font-size: .92rem; }
.aide-safe b { color: var(--ink); }
.aide-safe a { color: var(--ink); display: inline-block; min-height: 24px; padding: 2px 0; }
.aide-faq { margin: .6rem 0 0; display: grid; gap: .1rem; }
.aide-faq dt { font-weight: 600; font-size: .92rem; margin-top: .6rem; }
.aide-faq dd { margin: .15rem 0 0; color: var(--ink-2); font-size: .9rem; max-width: 68ch; }
.aide-contact { margin-top: 2rem; }

/* LA FEUILLE A4 EST CETTE PAGE, IMPRIMÉE. « Une A4 pour le mur du bureau » était
   vendue comme un document à part ; un second document est un second document à
   tenir à jour, et celui-ci serait périmé au premier bouton renommé. À
   l'impression on ne garde donc que les cinq gestes — le reste se lit à l'écran,
   là où il est actionnable. */
/* UNE SEULE A4, MESURÉE. La première version tenait sur deux pages : le devis
   dit « une page A4 pour le mur du bureau », et une feuille qui déborde d une
   ligne finit agrafée ou jetée. Les tailles ci-dessous ont été réglées en
   imprimant vraiment la page en PDF et en comptant les pages, pas à l œil.
   TOUT EST PRÉFIXÉ PAR body.aide-body, ET C EST LE FOND DE L AFFAIRE : sans ce
   préfixe, `.grp:not(.aide-print-keep) { display: none }` était une règle
   GLOBALE, donc imprimer l écran Contenu ou Fichiers ne sortait plus qu un
   titre et un champ de recherche — 280 caractères sur une feuille. Mesuré, pas
   relu : chaque écran a été imprimé en PDF et ses caractères comptés. Une
   feuille de style d impression écrite pour UNE page doit dire laquelle. */

/* ============================================ LE CONTENU D'UNE PAGE, EN LIGNES

   UNE LIGNE FERMÉE EST UNE PAGE À LIRE ; OUVERTE, C'EST UN FORMULAIRE.
   Le résumé porte trois colonnes — le nom du champ, sa valeur telle que le site
   l'affiche, l'état (langues, traduction manquante) — et se replie sur une
   colonne au téléphone. La valeur est tronquée côté serveur ET coupée ici :
   sans les deux, une réponse de FAQ ferait une ligne de six hauteurs.

   AUCUN `overflow-x` SUR UN ANCÊTRE. Ce dépôt a déjà payé cette leçon : un
   overflow sur un conteneur tue `position: sticky` à l'intérieur, et le débord
   se règle par `min-width: 0` sur les colonnes de grille, jamais par un
   overflow parent. Chaque `1fr` est donc écrit `minmax(0, 1fr)` — `1fr` seul
   vaut `minmax(auto, 1fr)`, la colonne refuse de rétrécir et c'est le document
   qui défile.
                                                                              */
.cflow { display: grid; gap: 1rem; margin: .6rem 0 1.4rem; }

.cblock {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--a); border-radius: var(--radius);
  padding: .75rem .85rem .85rem;
}
.cb-title {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 .55rem; font-size: 1rem;
}
.cb-where { font-weight: 400; font-size: .78rem; color: var(--ink-2); }
.cb-fields { display: grid; gap: .4rem; }

details.fld { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
details.fld > summary {
  /* QUATRE COLONNES, TOUJOURS LES MÊMES. Avec trois colonnes et quatre enfants
     — nom, valeur, états, pastille — la pastille des lignes QUI ONT des états
     tombait dans une rangée implicite et s'y étirait sur toute la largeur :
     visible sur la capture de /pages/tarifs, la ligne « Nom » (4 langues)
     portait un « Modifier » large et mal aligné, celle d'à côté non. Le
     conteneur d'états est donc toujours émis, même vide, et la pastille est
     toujours en colonne 4. */
  display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) auto auto;
  gap: .35rem .9rem; align-items: baseline;
  padding: .5rem .7rem; cursor: pointer;
  /* Deux façons de retirer le triangle par défaut : la propriété standard et
     le pseudo-élément WebKit. Les deux, parce que l'une ne suffit pas partout
     et qu'un triangle résiduel décale les trois colonnes. */
  list-style: none;
}
details.fld > summary::-webkit-details-marker { display: none; }
/* LE SURVOL NE FABRIQUE PAS UNE SURFACE NEUVE, IL RÉUTILISE UNE SURFACE MESURÉE.
   Première version : un fond teinté à 7 % de l'accent. La pastille « Modifier »
   est elle-même de la couleur de l'accent, donc elle se posait sur sa propre
   teinte — 4,37:1 pour l'accent « univers » en clair, ÉCHEC AA, mesuré et non
   relu. C'est la même règle que site-pages.mjs a déjà écrite pour --ink-3 : on
   ne pose pas un texte sur une teinte de sa propre couleur. Le survol passe
   donc de --bg à --card, la surface contre laquelle les onze accents ont été
   calculés dès le départ. */
details.fld > summary:hover { background: var(--card); }
details.fld > summary:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }

.fld-head { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; min-width: 0; }
.fld-trail { font-size: .74rem; color: var(--ink-2); }
.fld-name { font-weight: 600; font-size: .9rem; }
.fld-read {
  min-width: 0; color: var(--ink-2); font-size: .88rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fld-nil { font-style: italic; }
/* ---------------------------------------------------------------- *
 * LA BARRE DES LANGUES, en tête du formulaire d'une page.
 *
 * Elle est posée AVANT la note d'ordre et non dans l'en-tête de l'écran :
 * elle ne décrit pas la page, elle décrit ce que le formulaire montre, et un
 * réglage se met à côté de ce qu'il règle.
 * ---------------------------------------------------------------- */
.langbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  margin: 0 0 1rem; padding: .7rem .85rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.langbar-lab { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.langbar-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.langpill {
  display: inline-flex; align-items: center; gap: .35rem;
  /* 32 px de haut : la barre est un réglage qu'on vise à la souris et au
     doigt, et le plancher de 24x24 (WCAG 2.5.8) est un plancher. */
  min-height: 32px; padding: 0 .7rem; border-radius: 999px;
  border: 1px solid var(--line-strong); text-decoration: none;
  color: var(--ink-2); font-size: .82rem; white-space: nowrap;
}
/* Le survol repasse par --card et non par une teinte de l'encre : une pastille
   posée sur sa propre teinte retombe sous le seuil AA, la panne déjà payée sur
   les lignes de contenu. */
.langpill:hover { color: var(--ink); border-color: var(--ink-3); background: var(--card); }
.langpill.is-on { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 600; }
/* Le compte n'est pas qu'une couleur : il porte un nombre, donc il se lit en
   noir et blanc comme en daltonien. */
.langpill-n {
  font-variant-numeric: tabular-nums; font-size: .74rem; font-weight: 700;
  border: 1px solid currentColor; border-radius: 999px; padding: 0 .3rem;
}
.langbar-note { font-size: .8rem; color: var(--ink-3); }
.langbar-ok { font-size: .82rem; color: var(--ok); font-weight: 500; }
.langbar-miss { font-size: .82rem; color: var(--warn); font-weight: 500; }
.langbar-all { font-size: .82rem; color: var(--ink); }

/* Le filtre CACHE une ligne, il ne la retire pas du formulaire : ses valeurs
   partent avec la publication comme si elle était visible. Voir le commentaire
   de `off` dans contentFieldHtml. */
.fld-off { display: none !important; }
/* Un champ vide dans la langue mise en avant se signale AUSSI par une forme —
   le filet à gauche — et pas seulement par la teinte de sa pastille. */
.fld-miss { border-left: 3px solid var(--warn); }

.fld-tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.fld-tags span {
  font-size: .72rem; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: .05rem .4rem;
  white-space: nowrap;
}
.fld-cue {
  justify-self: end;
  font-size: .78rem; font-weight: 600; color: var(--a);
  border: 1px solid var(--line); border-radius: 999px; padding: .1rem .55rem;
  white-space: nowrap;
}
details.fld > summary .cue-open { display: none; }
details.fld[open] > summary .cue-shut { display: none; }
details.fld[open] > summary .cue-open { display: inline; }
details.fld[open] > summary { border-bottom: 1px solid var(--line); }
details.fld[open] > summary .fld-read { display: none; }
.fld-body { display: grid; gap: .6rem; padding: .6rem .7rem .7rem; }

/* UNE LIGNE NON MODIFIABLE NE DOIT PAS RESSEMBLER À UNE LIGNE MODIFIABLE. */
details.fld-ro > summary .fld-cue, details.fld-tech > summary .fld-cue { color: var(--ink-2); }
details.fld-tech { background: transparent; border-style: dashed; }

/* UNE MODIFICATION EN ATTENTE NE PEUT ÊTRE NI CACHÉE, NI CONTREDITE.
   app.js ouvre la ligne et la marque au moment de la saisie ; le client garde le
   droit de la refermer — on ne rouvre pas une ligne sous ses doigts — et la
   marque, elle, reste. Sans ça, le compteur du bouton annoncerait « 2
   modifications » sans que rien à l'écran dise lesquelles.
   ET LE RÉSUMÉ AFFICHE MAINTENANT LA NOUVELLE VALEUR. Il cachait la valeur —
   « modifié — ouvrez pour voir » — parce que celle qu'il portait venait du
   serveur, donc d'avant la saisie : une ligne refermée affichait « 1 mois »
   pendant que son champ contenait « 1 mois MODIFIÉ ». C'était le moins faux
   qu'on pouvait faire, pas ce qu'il fallait faire. `app.js` projette désormais
   la valeur COURANTE du champ dans le résumé à chaque frappe : la ligne
   refermée dit vrai, et « ouvrez pour voir » n'a plus lieu d'être.
   La marque est un vrai élément (`.tag-modif`), pas un `content:` — un
   `content:` ne s'annonce pas au lecteur d'écran et ne se trouve pas au
   Ctrl+F. */
details.fld[data-modif] { border-color: var(--warn); }
.fld-tags .tag-modif {
  color: var(--warn); border-color: var(--warn); font-weight: 700;
}

/* La ligne qu'on vient d'atteindre depuis « Revoir » : un battement bref, et
   rien d'animé pour qui a demandé moins de mouvement. */
details.fld.fld-flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 40%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  details.fld { transition: box-shadow .18s ease-out; }
}

/* RÉTABLIR — posé en bas du corps de la ligne, là où l'on vient de taper. */
.fld-undo {
  justify-self: start; font: inherit; font-size: .78rem; font-weight: 600;
  color: var(--ink-2); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .25rem .7rem; cursor: pointer; min-height: 32px;
}
.fld-undo:hover { color: var(--ink); border-color: var(--ink-3); }
.fld-undo:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }

/* ---------------------------------------------------------------- *
 * « REVOIR » — À CÔTÉ DE « PUBLIER », PAS DANS UNE BARRE FLOTTANTE.
 *
 * Le bouton de publication est DÉJÀ collé en bas de la fenêtre : `.publish` est
 * en `position: sticky; bottom: 0`, et c'est pour ça que ce fichier s'interdit
 * tout `overflow-x` sur un ancêtre (voir le commentaire du résumé des lignes).
 * Une barre flottante de plus aurait recouvert celle qui fonctionne.
 * ---------------------------------------------------------------- */
.publish-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.publish-row button { justify-self: auto; }
.publish-see {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding: .55rem .95rem; min-height: 32px; border-radius: 8px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.publish-see:hover { border-color: var(--ink-3); }
.publish-see:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }

/* L'ATTRIBUT `hidden` DOIT GAGNER. Toute règle d'auteur qui pose un `display`
   sur un élément l'annule EN SILENCE — et rien dans une relecture du HTML ne le
   montre. `.langpill-n` et `.publish-see` s'en servent tous les deux. */
[hidden] { display: none !important; }

/* LE TIROIR DES CHAMPS NON LOCALISÉS. Nommé, compté, et jamais vide de sens :
   c'est la contrepartie de « on ne cache jamais un champ faute de l'avoir
   trouvé » (voir admin/lib/page-content.mjs). */
.cabsent {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: .6rem .8rem; background: var(--card);
}
.cabsent > summary {
  cursor: pointer; display: flex; gap: .5rem; flex-wrap: wrap;
  align-items: baseline; font-size: .9rem; color: var(--ink-2);
}
.cabsent > summary:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }
.cabsent-n { font-weight: 700; color: var(--ink); }
.cabsent .cblock { margin-top: .6rem; }

/* LA PORTE D'ENTRÉE, SUR L'ACCUEIL. Un seul geste nommé, assez grand pour être
   la première chose qu'on voit, et qui reste un lien : pas de script, pas de
   bouton qui poste. Le contraste du texte est pris sur --card, pas sur la
   teinte — --ink-3 sur une teinte tombait à 4,54:1, au-dessus du seuil de 0,04,
   ce que --ink-3 documente déjà comme une coïncidence d'arrondi et non une
   marge. Ici : --ink (13,7:1) et --ink-2 (6,4:1) sur --card. */
.doorway {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line-strong);
  border-left: 4px solid var(--volt-ink); border-radius: var(--radius);
  padding: .85rem 1rem; margin: 0 0 1.4rem;
}
.doorway:hover { border-color: var(--ink-3); }
.doorway:focus-visible { outline: 2px solid var(--line-strong); outline-offset: 2px; }
.doorway-do { display: block; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.doorway-do::after { content: ' →'; }
.doorway-why { display: block; margin-top: .2rem; font-size: .88rem; color: var(--ink-2); }

/* Sous un résultat de recherche : où il mène, et l'autre chemin. */
.hit-alt { margin: .15rem 0 0; font-size: .8rem; color: var(--ink-2); }

/* D'OÙ VIENNENT CES TEXTES — les rubriques, et ce qu'elles alimentent ailleurs. */
.rubs { list-style: none; padding: 0; margin: .2rem 0 1.2rem; display: grid; gap: .45rem; }
.rubs li { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; font-size: .92rem; }

.subcard code { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }

/* AU TÉLÉPHONE, UNE SEULE COLONNE. Trois colonnes à 390 px donnent une valeur
   large de six caractères : l'information utile disparaît pour préserver une
   grille dont personne n'a besoin. */
/* AU TÉLÉPHONE : DEUX COLONNES, TROIS LIGNES — PAS QUATRE LIGNES EMPILÉES.
   Première version : une seule colonne, donc nom / valeur / états / pastille
   les uns sous les autres. Mesuré à 390 px : 91 px de haut par ligne, 82 lignes
   sur l'écran Tarifs, soit 7 500 px à faire défiler pour lire une page. La
   pastille remonte à côté du nom (elle est courte et alignée à droite), la
   valeur prend toute la largeur, les états suivent. */
@media (max-width: 640px) {
  details.fld > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'head cue' 'read read' 'tags tags';
    gap: .15rem .5rem;
  }
  .fld-head { grid-area: head; }
  .fld-read { grid-area: read; }
  .fld-tags { grid-area: tags; }
  .fld-cue { grid-area: cue; justify-self: end; }
}

@media print {
  /* @page ne peut pas être conditionné à une classe : il reste global, et
     A4 + 10 mm est un défaut sain pour n importe quel écran imprimé. */
  @page { size: A4; margin: 10mm; }
  body.aide-body .top,
  body.aide-body .foot,
  body.aide-body .stale,
  body.aide-body .aide-print,
  body.aide-body .lead { display: none !important; }
  body.aide-body .grp:not(.aide-print-keep) { display: none !important; }
  body.aide-body main { padding: 0 !important; max-width: none !important; }
  body.aide-body { background: #fff; color: #000; font-size: 9pt; line-height: 1.35; }
  body.aide-body h1 { font-size: 13pt; margin: 0 0 .2rem; }
  body.aide-body .aide-print-keep h2 { font-size: 11pt; margin: 0 0 .25rem; }
  body.aide-body .aide-gestes { gap: .35rem; }
  body.aide-body .aide-geste { border: 1px solid #999; border-radius: 4px; padding: .3rem .45rem; break-inside: avoid; page-break-inside: avoid; }
  body.aide-body .aide-geste h3 { font-size: 9.5pt; margin: 0 0 .15rem; gap: .35rem; }
  body.aide-body .aide-geste ol { gap: .05rem; padding-left: 1rem; color: #222; font-size: 8.5pt; }
  body.aide-body .aide-n { width: 1.05rem; height: 1.05rem; font-size: 7pt; background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.aide-body .aide-note { margin: .15rem 0 0; font-size: 7.5pt; color: #444; }
  body.aide-body .aide-contact { margin-top: .4rem; font-size: 8pt; }
}

/* ---- Historique & suivi de publication (23/09) ---------------------------- */
.versions { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.ver { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.ver-live { border-color: var(--ok); }
.ver-main { min-width: 0; flex: 1 1 22rem; }
.ver-main p { margin: .1rem 0; }
.ver-when { color: var(--ink-2); font-size: .9rem; }
.ver-what { overflow-wrap: anywhere; }
.ver-who { color: var(--ink-3); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ver-act { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ver-slow { color: var(--ink-3); font-size: .8rem; }
.vb { display: inline-block; font-size: .78rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px;
  border: 1px solid currentColor; line-height: 1.5; }
.vb-live, .vb-ok { color: var(--ok); }
.vb-warn { color: var(--warn); }
.vb-fail { color: var(--stop); }
.vb-run { color: var(--ink-2); }
.review { list-style: none; padding: 0; display: grid; gap: .5rem; }
.review > li { border-left: 3px solid var(--line); padding: .2rem .8rem; }
.review > li.rv-ok { border-color: var(--ok); }
.review > li.rv-warn { border-color: var(--warn); }
.review p, .review ul { margin: .25rem 0; }
.revert p { max-width: 62ch; }
.ok-line { color: var(--ok); }
.warn-line { color: var(--warn); }
.fail-line { color: var(--stop); }

/* ---- indicateur de publication (19/10/2026) ---------------------------
   « Enregistrer » ne fait plus attendre : une pastille dit où en est la mise
   en ligne. HORS DU FLUX (position fixe) : posée dans l'en-tête, elle le
   faisait passer d'une ligne à deux à 1440 px au moment où elle apparaissait —
   la page sautait de 58 px sous les doigts de quelqu'un qui écrit. */
.pubchip {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: inline-flex; align-items: center; gap: .35rem; min-height: 36px;
  max-width: calc(100vw - 2rem);
  padding: .35rem .85rem; border-radius: 999px; font-size: .875rem;
  text-decoration: none; white-space: nowrap; border: 1px solid var(--line);
  color: var(--ink); background: var(--card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.pubchip[hidden] { display: none; }
.pubchip.is-run { border-color: var(--line-strong); }
.pubchip.is-ok { background: #e7f6ec; border-color: #2f7a46; color: #1d5230; }
.pubchip.is-err { background: #fdecec; border-color: #b3261e; color: #8c1d18; font-weight: 600; }
.pubchip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pubchip-step { color: var(--ink-2); }
.pub-toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  /* max-content : sans lui, `left: 50%` limite la largeur à la moitié de
     l'écran et le message tenait sur quatre lignes à 390 px. */
  width: max-content; max-width: min(36rem, calc(100vw - 2rem)); z-index: 50;
  padding: .75rem 1rem; border-radius: .6rem;
  background: var(--ink); color: var(--card); font-size: .95rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transition: opacity .5s ease, transform .5s ease;
}
.pub-toast.is-out { opacity: 0; transform: translate(-50%, .5rem); }
@media (prefers-reduced-motion: reduce) { .pub-toast { transition: none; } }
/* Téléphone : le bas de l'écran appartient au bouton « Enregistrer » (collé en
   bas du formulaire) ; la pastille monte à droite du titre de la régie, la
   seule place libre, et ne garde que l'essentiel. */
@media (max-width: 899px) {
  /* L'en-tête tient sur cinq lignes à 390 px (~220 px) : collé, il laissait,
     avec la barre « Enregistrer », un tiers de l'écran pour écrire. */
  .top { position: static; }
  /* Même raison : sur téléphone la barre, une fois dépliée, montait à 287 px et
     couvrait le « Rétablir » du champ qu'on venait de modifier. L'explication
     reste sur ordinateur et dans « Aide ». */
  .publish .publish-why { display: none; }
  .pubchip { top: .65rem; bottom: auto; right: .75rem; max-width: 45vw; }
  .pubchip-step { display: none; }
}

/* ---- comptes (21/10/2026) ---------------------------------------------
   « Mon compte » dans l'en-tête, l'écran « Comptes » des propriétaires et la
   page publique ouverte par un lien d'invitation (qui reprend .login). */
.me {
  font-size: .9rem; color: var(--ink-2); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 24px;
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me:hover, .me:focus-visible { color: var(--ink); text-decoration: underline; }
.hint { font-size: .82rem; color: var(--ink-3); font-weight: 400; }
.acct-msg { margin: 0 0 1.25rem; }
.acct-ok { color: var(--ok); font-size: .9rem; font-weight: 600; }
.acct-form { display: grid; gap: .8rem; max-width: 32rem; }
.acct-form label, .login label { display: grid; gap: .3rem; font-size: .88rem; color: var(--ink-2); }
.acct-form input, .acct-form select {
  font: inherit; padding: .55rem .7rem; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--bg); color: var(--ink);
}
.acct-form button, .acct-actions button {
  font: inherit; font-weight: 600; padding: .6rem 1rem; cursor: pointer;
  background: var(--ink); color: var(--card); border: 0; border-radius: 8px; justify-self: start;
}
.acct-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.acct-actions form { margin: 0; }
.acct-actions button.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
  font-weight: 500; padding: .4rem .7rem; font-size: .85rem; min-height: 36px;
}
.acct-actions button.danger { color: var(--stop); border-color: var(--stop); }
.acct-table-wrap { margin: 0 0 2rem; }
.acct-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.acct-table th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--ink-3); padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.acct-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.acct-table tr.off td { color: var(--ink-3); }
.acct-link {
  background: var(--card); border: 2px solid var(--ok); border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.acct-url {
  width: 100%; font: .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg); color: var(--ink);
}
.acct-log { list-style: none; padding: 0; margin: 0; font-size: .86rem; display: grid; gap: .35rem; }
.acct-log time { color: var(--ink-3); }
/* Téléphone : le tableau devient une pile de cartes, sans défilement latéral
   (le dépôt s'interdit tout overflow-x, voir .publish). */
@media (max-width: 699px) {
  .acct-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .acct-table, .acct-table tbody, .acct-table tr, .acct-table td { display: block; }
  .acct-table tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 .8rem; padding: .3rem 0; }
  .acct-table td { border: 0; padding: .3rem .9rem; }
  .me { max-width: 9rem; }
}

/* ---- validation en deux étapes (12/11/2026) ---- */
.mfa-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; font-size: .92rem; }
.mfa-steps li > .hint { display: block; margin-top: .4rem; }
/* Le QR reste noir sur blanc en mode sombre : les applications lisent mal l'inverse. */
.mfa-qr { display: block; width: 200px; max-width: 100%; height: auto; margin: .6rem 0 .2rem; background: #fff; padding: 0; border-radius: 6px; }
/* Groupes de 4 séparés par des espaces : la ligne ne se coupe qu'ENTRE deux groupes. */
.mfa-key { font-size: .9rem; word-break: normal; overflow-wrap: normal; user-select: all; }
.mfa-recovery { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem; background: var(--bg); }
.mfa-recovery p { margin: 0 0 .6rem; font-size: .9rem; }
.mfa-codes { margin: 0; padding-left: 1.6rem; columns: 2; column-gap: 1.5rem; font-size: 1rem; }
.mfa-codes li { padding: .15rem 0; break-inside: avoid; }
/* Un code ne se coupe jamais en deux lignes : recopié de travers, il ne sert à rien. */
.mfa-codes code { font-size: 1rem; letter-spacing: .02em; white-space: nowrap; user-select: all; }
@media (max-width: 440px) { .mfa-codes { columns: 1; } }

/* Détail d'une version : un identifiant long ne doit pas élargir l'écran du téléphone. */
.main-wrap, main { min-width: 0; }
main h1, main p, main li, main dd, main td { overflow-wrap: anywhere; }

/* « Quitter » reste sur la ligne du menu sur un portable. */
@media (min-width: 1100px) and (max-width: 1500px) { .top nav { gap: .1rem; } .top nav a { padding: .35rem .42rem; font-size: .85rem; } }

/* L'œil des mots de passe. */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 3rem; box-sizing: border-box; }
.login .pw-eye, .acct-form .pw-eye, .pw-eye {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%); margin: 0; padding: 0;
  width: 44px; height: calc(100% - 4px); min-height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; color: var(--ink-2); cursor: pointer; box-shadow: none;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 3px solid var(--volt-ink); outline-offset: -2px; }
.pw-eye.is-on .pw-slash { display: none; }
