/* Civic console: flat surfaces, 1px rules, condensed display, monospace
 * numbers. No shadow, no rounded corner, no motion, no image. The document is
 * still the design — the theme only decides ink and paper.
 *
 * Text colours are ≥ 7:1 (WCAG AAA) on their own paper. Structural rules use
 * `--border-strong` (≥ 3:1, non-text contrast); `--border-subtle` is a divider,
 * never the only thing that carries meaning. A blind reader never sees any of
 * it: the markup order, the landmarks and the live regions are what the design
 * is for.
 */

/* ── type ────────────────────────────────────────────────────────────────
 * Self-hosted on purpose: a font CDN would add a third-party connection (and
 * its cookies) to every page. Each file is the latin subset, so a title in
 * another script costs no download. `optional`, not `swap`: swap repaints the
 * same words in the real face when it lands, and a repaint that moves lines is
 * layout shift the visitor sees. `optional` never swaps — a first visit on a
 * slow link reads the fallback stack and the face is used from the next page on,
 * cached for a year. The display faces are preloaded where they are used.
 * Licence beside the files (`fonts/OFL.txt`). */
@font-face {
  font-family: "Archivo Black";
  font-weight: 400;
  font-display: optional;
  src: url("fonts/archivo-black-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: optional;
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 900;
  font-display: optional;
  src: url("fonts/barlow-condensed-900.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-weight: 400;
  font-display: optional;
  src: url("fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-weight: 600;
  font-display: optional;
  src: url("fonts/outfit-600.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-weight: 700;
  font-display: optional;
  src: url("fonts/outfit-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: optional;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: italic;
  font-display: optional;
  src: url("fonts/ibm-plex-mono-400i.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-display: optional;
  src: url("fonts/ibm-plex-mono-700.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --bg-paper: #faf8f3;
  --bg-paper-alt: #f1ede3;
  --bg-surface: #ffffff;
  --ink-main: #111110;
  --ink-muted: #45433d;
  --border-subtle: #c9c2b2;
  --border-strong: #111110;
  --link-blue: #0b498b;
  --link-visited: #523285;
  /* The red carries small text — the `ongoing` marker on a card, a hovered
   * link — so it is the one that clears 4.5:1 on paper (5.05), not the brighter
   * red that reads better as ink. Dark themes keep theirs: they have room. */
  --accent-red: #c9301a;
  --accent-green: #0d7040;
  --accent-green-pop: #16a35a;
  --focus-ring: #0b498b;
  --hatch-tint: rgba(11, 73, 139, 0.08);
  --hatch-bg: rgba(11, 73, 139, 0.025);

  /* Names the rest of this file reads. They follow the palette above, so a
   * theme only has to move the palette. */
  --paper: var(--bg-paper);
  --surface: var(--bg-surface);
  --ink: var(--ink-main);
  --ink-2: var(--ink-muted);
  --line: var(--border-subtle);
  --strong: var(--border-strong);
  --link: var(--link-blue);
  --visited: var(--link-visited);
  --accent: var(--accent-red);
  --ok: var(--accent-green);
  --pop: var(--accent-green-pop);
  --hl: var(--bg-paper-alt);
  --rule: 1px;

  --logo: "Archivo Black", "Barlow Condensed", ui-sans-serif, system-ui, sans-serif;
  --display: "Barlow Condensed", ui-sans-serif, system-ui, sans-serif;
  --sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

/* Dark paper, the way a console is read at night. The same palette, twice: once
 * for OS-following readers (no `data-theme`), once for the one who pressed the
 * button. `data-theme="light"` exists so that a light choice survives a dark OS
 * without the script having to be there for the paint. */
html[data-theme="dark"],
html:not([data-theme="light"]) {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-paper: #121211;
    --bg-paper-alt: #1b1b19;
    --bg-surface: #181816;
    --ink-main: #f3efe6;
    --ink-muted: #c2bdb0;
    --border-subtle: #3b3a35;
    --border-strong: #e6e1d5;
    --link-blue: #7ab4ff;
    --link-visited: #c2a8ff;
    --accent-red: #ff573b;
    --accent-green: #4ade80;
    --accent-green-pop: #4ade80;
    --focus-ring: #7ab4ff;
    --hatch-tint: rgba(122, 180, 255, 0.11);
    --hatch-bg: rgba(122, 180, 255, 0.035);
  }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-paper: #121211;
  --bg-paper-alt: #1b1b19;
  --bg-surface: #181816;
  --ink-main: #f3efe6;
  --ink-muted: #c2bdb0;
  --border-subtle: #3b3a35;
  --border-strong: #e6e1d5;
  --link-blue: #7ab4ff;
  --link-visited: #c2a8ff;
  --accent-red: #ff573b;
  --accent-green: #4ade80;
  --accent-green-pop: #4ade80;
  --focus-ring: #7ab4ff;
  --hatch-tint: rgba(122, 180, 255, 0.11);
  --hatch-bg: rgba(122, 180, 255, 0.035);
}

/* The reader's own text size. One step, then the browser's zoom takes over. */
html[data-size="large"] { font-size: 115%; }

/* Harder edges when the reader asks for more contrast. */
@media (prefers-contrast: more) {
  :root {
    --ink-muted: #111110;
    --border-subtle: #111110;
  }
  html[data-theme="dark"] {
    --ink-muted: #f3efe6;
    --border-subtle: #e6e1d5;
  }
  a { text-decoration-thickness: 2px; }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 400 1rem/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
  /* Nothing here may be wider than the phone: a scraped title can carry a bare
   * URL or a long slug with no space to break at. */
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

input::placeholder { color: var(--ink-2); opacity: 1; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:visited { color: var(--visited); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
p, li { text-wrap: pretty; }
code, kbd, samp, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* A 3px ring in the link colour: visible on both papers, and the one colour the
 * design already uses for "this is where you are". */
:focus-visible,
[tabindex="-1"]:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── frame ──────────────────────────────────────────────────────────────── */

/* One width for header, main and footer: the logo, the first column of results
 * and the last footer link sit on the same line, which is what makes the page
 * read as one printed sheet instead of three stacked boxes. */
.frame {
  width: 100%;
  max-width: 87.5rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip:not(:focus) {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: absolute; left: 0.75rem; z-index: 20;
  background: var(--paper); color: var(--ink);
  padding: 0.5rem 0.75rem; border: 2px solid var(--strong);
}
.skip:not(.second):focus { top: 0.75rem; }
.skip.second:focus { top: 3.5rem; }

.sep { color: var(--ink-2); user-select: none; }
.muted { color: var(--ink-2); }

/* ── header ─────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 2px solid var(--strong);
  padding-bottom: 0;
}

/* The tricolor strip is the registration mark of a printed sheet: it says this
 * is the same page, on every view. Decorative, never announced. */
.reg {
  display: grid;
  grid-template-columns: 7.5rem 1fr 3.5rem;
  height: 5px;
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}
.reg span:nth-child(1) { background: var(--ink); }
.reg span:nth-child(2) { background: var(--accent); }
.reg span:nth-child(3) { background: var(--pop); }
@media (min-width: 48rem) {
  .reg { grid-template-columns: 14.375rem 1fr 6rem; }
}

.masthead {
  display: flex; flex-wrap: wrap;
  align-items: flex-start; justify-content: space-between;
  gap: 0.75rem 2rem;
}

/* The name is the mark: no box, no icon, no tagline. The dot is the only
 * coloured element in the header, and it is also the full stop of the address. */
.logo {
  display: inline-flex; align-items: baseline;
  font-family: var(--logo);
  font-weight: 400;
  font-size: clamp(3.35rem, 8.8vw, 6.5rem);
  line-height: 0.84;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
}
.logo:visited, .logo:hover { color: var(--ink); }
.logo .dot {
  color: var(--accent);
  font-size: 0.145em;
  letter-spacing: 0;
  margin-inline-start: 0.06em;
}

.comfort { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
/* The controls sit in the markup from the first frame and keep their box, so
 * revealing them moves nothing below: `ui.js` only sets `data-ready`. Until
 * then the group is invisible, out of the tab order and out of the
 * accessibility tree — which is what a control that does not work yet must be.
 * A reader without JavaScript gets the space back, and no empty band.
 * Two degraded modes, accepted: the sheet missing paints the buttons alive and
 * mute (the page is unstyled anyway), and `ui.js` missing leaves the box empty
 * but reserved. Each costs less than moving the text under a reading eye. */
.comfort:not([data-ready]) { visibility: hidden; }
@media (scripting: none) {
  .comfort:not([data-ready]) { display: none; }
}

/* Periods: the only list of dates on the page. The sidebar filters the list,
 * it does not repeat the calendar. */
.periods { margin: 1rem 0 0; }
.periods ul {
  display: flex; flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0; padding: 0; list-style: none;
}
.periods a {
  display: flex; align-items: baseline; gap: 0.4rem;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
  font: 700 0.875rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.periods a:hover { color: var(--accent); }
.periods a[aria-current] { border-bottom-color: var(--accent); }
/* ── main ───────────────────────────────────────────────────────────────── */

main { padding: clamp(1.25rem, 3vw, 2.25rem) 0 3rem; }

.headline {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

/* ── search bar ─────────────────────────────────────────────────────────── */

.searchbar {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0 0 1.25rem;
  border-bottom: 2px solid var(--strong);
}
.searchbar label {
  display: block;
  font: 700 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.search-main {
  display: grid; grid-template-columns: 1fr auto;
  gap: 0.5rem; align-items: end;
}
.search-main input {
  width: 100%; min-width: 0;
  min-height: 46px;
  padding: 0.5rem 0.65rem;
  font: 400 1.0625rem/1.3 var(--sans);
  color: var(--ink); background: var(--surface);
  border: 2px solid var(--strong);
}
.search-mod {
  display: grid; gap: 0.75rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: end;
}

/* ── forms ──────────────────────────────────────────────────────────────── */

button, .button {
  display: inline-block; min-height: 40px;
  padding: 0.45rem 0.9rem;
  font: 700 0.8125rem/1.4 var(--mono);
  text-align: center; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); background: var(--surface);
  border: 2px solid var(--strong);
  cursor: pointer;
}
button:visited { color: var(--ink); }
button:hover, .button:hover { background: var(--hl); color: var(--ink); }
button.primary, .button.primary { background: var(--ink); color: var(--paper); }
button.primary:hover, .button.primary:hover { background: var(--ink-2); color: var(--paper); }
button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
/* The "on" state is also a colour, and colour is never the only signal: the
 * pressed attribute carries it for a screen reader, the border carries it here. */
button[aria-pressed="true"]:not(.primary) { box-shadow: inset 0 -4px 0 var(--pop); }

.row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; }
.field { display: grid; gap: 0.25rem; }
.field select, .field input, .field textarea {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); min-height: 40px;
  padding: 0.35rem 0.5rem; background: var(--surface); border: 2px solid var(--strong);
}
.field select { cursor: pointer; }
.field.check {
  display: flex; align-items: center; gap: 0.45rem;
  min-height: 40px; cursor: pointer;
}
.field.check input { min-height: 0; width: 1.25rem; height: 1.25rem; cursor: pointer; }

.origin, .hint { margin: 0; font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-2); }

/* ── board ──────────────────────────────────────────────────────────────── */

.columns {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 48rem) {
  .columns { grid-template-columns: 15rem 1fr; gap: 2.5rem; }
}
.list { order: -1; }
@media (min-width: 48rem) {
  .list { order: 0; min-width: 0; }
}

.rail { display: grid; gap: 1.5rem; }
/* A facet group is open on a wide screen and folded on a phone, where the list
 * has to reach the first event without scrolling past six headings. Closed in
 * the markup: `ui.js` opens them, so nothing shifts on a desktop first paint. */
.rail details > summary {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.5rem; cursor: pointer;
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--strong);
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  list-style: none;
}
.rail details > summary::-webkit-details-marker { display: none; }
.rail details > summary::after { content: "+"; font-weight: 400; }
.rail details[open] > summary::after { content: "−"; }
.rail details > summary:hover { color: var(--accent); }

.rubriques { margin: 0.35rem 0 0; padding: 0; list-style: none; }
.rubriques a {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.35rem 0 0.35rem 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.rubriques a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.rubriques a[aria-current] {
  border-left-color: var(--accent);
  font-weight: 700;
}
.rubriques .mono { color: var(--ink-2); font-size: 0.8125rem; }
/* A facet that would empty the list is still a real link: it is shown muted,
 * not removed, so the reader can see it exists and is empty. The `0` beside it
 * carries the meaning; the colour stays above 4.5:1, because the link is live. */
.rubriques .none { color: var(--ink-2); }

/* The province's communes: the doors to `/localite`, under the board and
 * outside the results. In columns — sixty full-width rows is a wall, and the
 * block is a shortcut, not the page. */
.communes { margin-top: 2.5rem; }
.communes h2 {
  margin: 0 0 0.5rem;
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.communes .rubriques { columns: 3 12rem; }
.communes .rubriques li { break-inside: avoid; }

/* ── result list ────────────────────────────────────────────────────────── */

.count {
  margin: 0 0 0.5rem;
  font: 700 0.8125rem/1.5 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

/* The list's count opens the results; the grid follows its own border. */
.cards { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--strong); }

/* One tab stop per row: the title. Everything else in the row is text, so a
 * keyboard reader crosses twenty events in twenty presses, not eighty. */
.card {
  display: grid; gap: 0.35rem 1.25rem;
  padding: 0.9rem 0.5rem;
  border-bottom: var(--rule) solid var(--line);
}
@media (min-width: 40rem) {
  .card { grid-template-columns: 10.5rem 1fr; padding: 0.9rem 0.75rem; }
}
@media (min-width: 48rem) {
  .card { grid-template-columns: 168px 1fr; }
}

/* The gentle blueprint ruling of the reference: a hint that this row is the one
 * the pointer is on, without a box or a shadow. */
.hatch { transition: background-color 140ms ease; }
.hatch:hover, .hatch:focus-within {
  background-color: var(--hatch-bg);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--hatch-tint) 0px,
    var(--hatch-tint) 1px,
    transparent 1px,
    transparent 6px
  );
}
@media (prefers-reduced-motion: reduce) {
  .hatch { transition: none; }
}

/* Date block: read as a ledger. What the screen shows is a shape; what a screen
 * reader hears is the sentence in `.visually-hidden`. */
.daytab { margin: 0; }
.daytab time {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 0.5rem;
}
.date-num {
  font: 400 2.35rem/0.95 var(--logo);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.date-num.ongoing { color: var(--ink-2); }
.date-parts {
  display: flex; flex-wrap: wrap; gap: 0 0.4rem;
  font: 400 0.8125rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.date-end { grid-column: 1 / -1; font: 400 0.75rem/1.4 var(--mono); color: var(--ink-2); }
.date-time {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  padding-left: 0.45rem;
  border-left: 3px solid var(--accent);
  font: 700 0.9375rem/1.3 var(--mono);
  font-variant-numeric: tabular-nums;
}
.date-time.unknown {
  font-weight: 400; font-style: italic; border-left-color: var(--line);
  color: var(--ink-2);
}
/* An event that has started is still on: say it, do not hide it. */
.ongoing {
  grid-column: 1 / -1;
  font: 700 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.card-title a { color: var(--link); text-decoration: none; }
.card-title a:hover, .card-title a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; }

.where { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--ink); }
.km { color: var(--ok); font: 700 0.875rem/1.4 var(--mono); }
.km.unknown { color: var(--ink-2); font-weight: 400; font-style: italic; }

.meta {
  margin: 0.5rem 0 0;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.25rem 0.75rem;
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--ink-2);
}
.price { color: var(--ink); }
.price.free { color: var(--ink); font-weight: 700; }
.price.free::before {
  content: ""; display: inline-block;
  width: 0.55em; height: 0.55em; margin-right: 0.4em;
  background: var(--pop); vertical-align: 0.05em;
}
.unknown { color: var(--ink-2); font-style: italic; }
.cat { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }

.tag {
  font: 700 0.75rem/1.4 var(--mono); text-transform: uppercase;
  border: 1px solid currentColor; padding: 0 0.3rem;
}
.tag.warn, .warn { color: var(--accent); }

/* Zero results is a dead end only if the page lets it be one: the recovery
 * links are the point of this block. */
.empty {
  margin: 1rem 0 0; padding: 1.25rem 1rem;
  border: 1px solid var(--line); border-left: 4px solid var(--strong);
  background: var(--surface);
}
.empty strong { display: block; margin-bottom: 0.5rem; font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; }
.empty ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.empty li { margin: 0.25rem 0; }

/* ── pager ──────────────────────────────────────────────────────────────── */

.pager {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 0.75rem; margin: 1.5rem 0 0;
  padding-top: 1rem; border-top: var(--rule) solid var(--line);
  font: 400 0.875rem/1.5 var(--mono);
}
.pager a { color: var(--link); }
.pager .next { margin-left: auto; text-align: right; }
.pager .hint2 { display: block; color: var(--ink-2); font-size: 0.8125rem; }

/* ── event detail ───────────────────────────────────────────────────────── */

.article { max-width: 46rem; }
.article h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1;
}
.back { margin: 0 0 1rem; font: 400 0.875rem/1.5 var(--mono); }
.crumbs { margin: 0 0 0.75rem; font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; padding-right: 0.35rem; color: var(--ink-2); }

.banner {
  margin: 0 0 0.875rem; padding: 0.5rem 0.875rem;
  border-left: 6px solid var(--accent); font-weight: 700;
  background: var(--surface);
}
.banner.notice { border-left-color: var(--ink-2); font-weight: 400; }

/* When / where / price: a description list because it is one. */
.facts { margin: 0 0 1.5rem; border-top: 2px solid var(--strong); }
.facts > div {
  display: grid; grid-template-columns: 1fr; gap: 0.2rem;
  padding: 0.7rem 0; border-bottom: var(--rule) solid var(--line);
}
@media (min-width: 40rem) {
  .facts > div { grid-template-columns: 7.5rem 1fr; gap: 1rem; }
}
.facts dt {
  margin: 0;
  font: 700 0.75rem/1.5 var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.facts dd { margin: 0; }
.facts p { margin: 0 0 0.25rem; }
.facts p:last-child { margin-bottom: 0; }
.facts .big { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; text-transform: none; }
/* Où, then the two ways out of it: the map, and the address in the clipboard. */
.place-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; }
.facts button { font: 400 0.875rem/1.5 var(--mono); }
/* Free is the one price a reader decides on instantly, so it is the one that
 * carries a colour. */
.facts .free { color: var(--ok); font-weight: 700; }

.cta { margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ics { font: 400 0.9375rem/1.5 var(--mono); }
/* A confirmation that only exists after the action: green, and spoken. */
.copy-ok { color: var(--ok); font: 700 0.8125rem/1.5 var(--mono); }
.copy-ok:not(:empty) { margin-left: 0.35rem; }

.links { margin: 0 0 1.25rem; }
.links ul { margin: 0; padding-left: 1.25rem; }
.links li { margin: 0.35rem 0; }

.description { margin: 0 0 1.5rem; max-width: 68ch; }
.description h2 { margin: 0 0 0.4rem; }

.provenance {
  margin: 1.25rem 0; padding: 1rem 0;
  border-top: var(--rule) solid var(--line);
  font: 400 0.8125rem/1.65 var(--mono); color: var(--ink-2);
}
.provenance p { margin: 0.2rem 0; }
.provenance a { color: var(--link); }
/* Categories are a line of text with links in it, not a row of boxes: `flex`
 * would let the label drift away from the tags it introduces. */
.tags { margin: 0.2rem 0; }
.tags .tag { text-decoration: underline; text-underline-offset: 0.15em; }
.tags .tag:hover { background: var(--hl); }

.report { border-top: var(--rule) solid var(--line); padding-top: 0.7rem; }
.report > summary {
  font: 700 0.75rem/1.5 var(--mono); letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer;
}
.report form { display: grid; gap: 0.875rem; padding: 0.875rem 0; max-width: 26rem; }
.report p { margin: 0; }

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 2px solid var(--strong);
  padding: 1rem 0 2.5rem;
  font: 400 0.8125rem/1.7 var(--mono);
  color: var(--ink-2);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-top: 0.5rem; }
/* WCAG 2.2 asks 24×24 for a target that is not a link inside a sentence; these
 * shortcuts are a row of their own. A phone taps them, so the box is theirs —
 * and it follows the root size, so the large text setting grows it too. */
.site-footer nav a { display: inline-flex; align-items: center; min-height: 1.5rem; }
.site-footer a { color: var(--link); }
.site-footer p { margin: 0.25rem 0; }

/* ── htmx ───────────────────────────────────────────────────────────────── */

.htmx-indicator { visibility: hidden; }
/* htmx puts `htmx-request` on the indicator element itself, not on an ancestor,
 * and the style it injects for that case is blocked by `style-src 'self'`. */
.htmx-indicator.htmx-request, .htmx-request .htmx-indicator { visibility: visible; }

/* ── touch ──────────────────────────────────────────────────────────────── */

@media (pointer: coarse) {
  button, .button { min-height: 44px; }
  .field select, .field input, .field textarea, .search-main input { min-height: 44px; }
  .field.check { min-height: 44px; }
  .periods a { padding: 0.5rem 0; }
  .rubriques a { padding: 0.5rem 0 0.5rem 0.5rem; }
  .links a { padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
  .card { padding: 1.1rem 0.5rem; }
}

/* ── reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── print ──────────────────────────────────────────────────────────────── */

/* A civic flyer: the events, on paper, without the machine that produced them. */
@media print {
  .site-header nav,
  .comfort,
  .searchbar,
  .rail,
  .site-footer,
  .report,
  .skip,
  .pager,
  .copy-ok,
  .back,
  button,
  #sr-status { display: none !important; }

  /* The wordmark stays as the mark of the sheet; at screen size it would eat a
   * third of the page. */
  .logo { font-size: 1.6rem; }

  html, body { background: #fff !important; color: #000 !important; }
  * { box-shadow: none !important; background-image: none !important; }
  a { color: #000 !important; text-decoration: underline !important; }
  .card { break-inside: avoid; border-bottom: 1px solid #000; }
  /* The rail is gone, so the column it held must go too: A4 is ~49rem wide and
   * matches the 48rem rule above, which would indent the list by 15rem of air. */
  .columns { grid-template-columns: 1fr; gap: 0; }
  .date-num { font-size: 1.6rem; }
  .empty, .banner, .facts > div { background: none !important; }
}

/* Recyparc hours: the same ruled table as `.facts`, because it is the same kind
 * of statement — a fact the visitor acts on. No colour carries meaning: a closed
 * day writes "Fermé". */
.schedule { margin: 0 0 1.25rem; }
.schedule-today { margin: 0 0 0.75rem; }
.hours { width: 100%; border-collapse: collapse; margin: 0 0 0.75rem; }
.hours th, .hours td {
  text-align: left; vertical-align: top; padding: 0.45rem 0;
  border-bottom: var(--rule) solid var(--line);
}
.hours th {
  width: 9em; font: 700 0.75rem/1.5 var(--mono);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.hours td { font-variant-numeric: tabular-nums; }

.materials { margin: 0 0 1.25rem; }
.materials ul { margin: 0 0 0.75rem; padding-left: 1.25rem; columns: 2; }
.materials li { break-inside: avoid; }
@media (max-width: 40em) { .materials ul { columns: 1; } }

/* A page that is not the agenda keeps the old single column, read like a page. */
.pagehead { margin: 0 0 1.25rem; }
