/*
  Brevet: espace membre du CVRQ. One stylesheet, no build step.
  Visual world and rules: DESIGN.md (project root). Surface briefs: .impeccable/surfaces/.
  Brand source: https://randonneursquebec.ca/ and its theme CSS, read 2026-11-23
  (navy #0A1A5C, blue #06408B, pale aqua #E3F2F3, Montserrat).
  Served at /static/styles.css; every url() below is relative to this file.
*/

/* ---------- Font: Montserrat, self-hosted (CSP allows only the app's origin) ---------- */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("brand/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("brand/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  /* Brand (randonneursquebec.ca) */
  --brand-navy: #0A1A5C;
  --brand-blue: #06408B;
  --brand-aqua: #E3F2F3;

  /* Surfaces */
  --bg: #FFFFFF;            /* page ground: white, as on the club site (D46, spec 006) */
  --surface: #FFFFFF;       /* cards, forms, tables */
  --surface-alt: #E3F2F3;   /* brand aqua: panels, table stripes, info notices */
  --footer-bg: #0A1A5C;
  --footer-ink: #FFFFFF;

  /* Text */
  --ink: #0F1733;           /* body, 16.4:1 on --bg */
  --ink-muted: #4A5878;     /* hints, meta, 6.2:1 on --surface-alt */
  --heading: #0F1733;      /* headings in ink, not navy (D46) */
  --link: #06408B;

  /* Lines */
  --border: #C9D4E0;        /* decorative card borders */
  --border-strong: #5E6C8C; /* inputs and controls, 4.9:1 on --bg */

  /* Actions */
  --primary: #0A1A5C;
  --primary-hover: #06408B;
  --on-primary: #FFFFFF;
  --secondary-ink: #06408B;
  --secondary-hover-bg: #E3F2F3;
  --danger: #B3261E;
  --danger-hover: #8C1D18;
  --on-danger: #FFFFFF;
  --focus: #06408B;

  /* States: word + shape + colour, never colour alone */
  --ok-ink: #17602F;      --ok-bg: #E3F3E8;      --ok-line: #2E7D4A;
  --review-ink: #7A4300;  --review-bg: #FFF1D6;  --review-line: #B26A00;
  --wrong-ink: #A3191F;   --wrong-bg: #FDE8E8;   --wrong-line: #C62828;
  --late-ink: #5B2A86;    --late-line: #7B45A8;  --late-bg: #F3ECF8;
  --neutral-ink: #4A5878; --neutral-bg: #EAF0F8; --neutral-line: #6B86B3;

  /* Distance range (D36): categories only, aqua to navy; the km is always written.
     Ink on tint, light: 200 6.2:1, 300 7.3:1, 400 7.8:1, 600 and 1000 16:1 (DESIGN.md).
     400 leans indigo-violet on a deeper tint so it parts from the 300's blue (critique round 2). */
  --dist-200-ink: #1F5F66;  --dist-200-bg: #DDF0F1;
  --dist-300-ink: #0B4A8A;  --dist-300-bg: #DCEAF7;
  --dist-400-ink: #33288A;  --dist-400-bg: #D6D0F2;
  --dist-600-ink: #FFFFFF;  --dist-600-bg: #0A1A5C;
  --dist-1000-ink: #FFFFFF; --dist-1000-bg: #0A1A5C; --dist-1000-ring: #2B7A85; /* ring 5.0:1 on white */

  /* Map (server-drawn SVG, no tiles) */
  --map-ground: #F3F9F9;
  --map-route: #4F949E;   /* official route band, 3.2:1 on ground */
  --map-track: #0A1A5C;   /* kept track, 4.6:1 on the band */
  --map-gap: #C62828;
  --map-control-fill: #FFFFFF;
  --map-control-line: #06408B;

  /* Type: Montserrat for everything (brand), fixed rem scale: 15 · 17 · 20 · 26 · 33, the heading steps
     h3 › h2 › h1 at 1.3 and 1.27 (critique round 3: 1.21 read as flat) */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-sm: 0.9375rem;   /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.625rem;    /* 26px */
  --text-2xl: 2.0625rem;  /* 33px */
  --leading: 1.6;
  --leading-tight: 1.2;

  /* Space: 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --gutter: 1rem;

  /* Shape */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow: none;          /* flat: no shadow on cards (D46) */

  --target: 2.75rem;      /* 44px minimum touch target */
  --control-h: 3rem;      /* 48px inputs and buttons */
  --measure: 65ch;
  --measure-hint: 58ch;    /* hints and the consent text: about 60 letters a line (Montserrat 1ch is a full letter) */
  --page: 46rem;
  --page-wide: 76rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1230;
    --surface: #121B3D;
    --surface-alt: #1A2750;
    --footer-bg: #060B22;
    --footer-ink: #E6ECF7;

    --ink: #E6ECF7;
    --ink-muted: #A9B6D3;
    --heading: #E6ECF7;
    --link: #8FB8FF;

    --border: #2C3A6B;
    --border-strong: #7D8BB5;

    --primary: #BCD3FF;
    --primary-hover: #8FB8FF;
    --on-primary: #0A1A5C;
    --secondary-ink: #8FB8FF;
    --secondary-hover-bg: #1A2750;
    --danger: #B3261E;
    --danger-hover: #D0392F;
    --on-danger: #FFFFFF;
    --focus: #8FB8FF;

    --ok-ink: #8FE0A8;      --ok-bg: #12351F;      --ok-line: #4CAF6E;
    --review-ink: #FFC872;  --review-bg: #3A2A0C;  --review-line: #D99A2B;
    --wrong-ink: #FF9C9C;   --wrong-bg: #3D1518;   --wrong-line: #E05A5A;
    --late-ink: #D2B0F5;    --late-line: #B387E6;  --late-bg: #2A1F4A;
    --neutral-ink: #A9B6D3; --neutral-bg: #1A2750; --neutral-line: #6F8BC2;

    /* Distance range, dark: light ink on a deep tint; 600 and 1000 invert like the primary button.
       200 8.8:1, 300 7.9:1, 400 8.2:1, 600 and 1000 10.6:1, ring 8.1:1 on the surface. */
    --dist-200-ink: #9FE0E6;  --dist-200-bg: #12363D;
    --dist-300-ink: #A9CCF5;  --dist-300-bg: #13305A;
    --dist-400-ink: #D6CEFA;  --dist-400-bg: #332A72;
    --dist-600-ink: #0A1A5C;  --dist-600-bg: #BCD3FF;
    --dist-1000-ink: #0A1A5C; --dist-1000-bg: #BCD3FF; --dist-1000-ring: #6FC1CC;

    --map-ground: #0F1A3A;
    --map-route: #3F8E9E;
    --map-track: #FFFFFF;
    --map-gap: #FF7B7B;
    --map-control-fill: #0F1A3A;
    --map-control-line: #8FB8FF;

    --shadow: none;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-weight: 400;
  font-variant-numeric: lining-nums;
  caret-color: var(--link);
  overflow-wrap: break-word;
}

::selection { background: var(--surface-alt); color: var(--heading); }
@media (prefers-color-scheme: dark) {
  ::selection { background: #2F4F8F; color: #FFFFFF; }
}

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: var(--leading-tight);
  font-weight: 500;  /* h1 and h2 600 below; the rest of the page is 400–500 (D46) */
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--text-2xl); font-weight: 600; }
h2 { font-size: var(--text-xl); font-weight: 500; }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-base); }

* + h1, * + h2 { margin-top: var(--space-6); }
* + h3, * + h4 { margin-top: var(--space-5); }
h1 + *, h2 + *, h3 + *, h4 + * { margin-top: var(--space-3); }

p, ul, ol, dl { margin: 0; }
* + p, * + ul, * + ol, * + dl { margin-top: var(--space-3); }
p, li, dd { text-wrap: pretty; }
p { max-width: var(--measure); }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: var(--space-1); }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

strong, b { font-weight: 500; }  /* 600 is for the h1 and one key fact (DESIGN.md rule 1) */
small { font-size: var(--text-sm); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-6) 0; }

time, .num, td.num, .figures dd, .controls time { font-variant-numeric: tabular-nums; }

img, svg { max-width: 100%; }

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

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -10rem;
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  color: var(--link);
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: var(--space-2); }

/* ---------- Layout: header, nav, page, footer ---------- */

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--target);
  color: var(--heading);
  text-decoration: none;
}
.logo img { display: block; height: 2.25rem; width: auto; }
.logo-app {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-muted);
  padding-left: var(--space-3);
  border-left: 1px solid var(--border);
  line-height: 1.2;
}

.nav { margin-left: auto; }
.nav ul, ul.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-1);
}
.nav li + li, ul.nav li + li { margin-top: 0; }
.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 var(--space-3);
  color: var(--heading);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav a:hover,
.nav button:hover { background: var(--surface-alt); }
.nav a[aria-current="page"] {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.45em;
  text-decoration-color: var(--link);
}
.nav li { display: flex; align-items: center; }
.nav-form { margin: 0; display: flex; }
.nav-form > * + * { margin-top: 0; } /* not the form rhythm: the CSRF input comes first */
.nav a { gap: 0.3em; }
.footer-signout { display: none; }
.nav-admin {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.nav-admin ul {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-admin .nav-label {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding-right: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* Phone: the rider's three links share one row of equal cells; « Se déconnecter » moves to the
   footer; the admin links form a tidy 3 × 2 grid under the « Menu admin » landmark (review #6). */
@media (max-width: 40rem) {
  .header-inner { padding-bottom: 0; row-gap: var(--space-1); }
  .header-inner > .nav { margin: 0 calc(var(--space-2) * -1); width: calc(100% + var(--space-4)); }
  .header-inner > .nav ul, .nav-admin ul.nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .header-inner > .nav a, .nav-admin ul.nav a {
    justify-content: center;
    width: 100%;
    padding: 0 var(--space-2);
    text-align: center;
  }
  .nav .nav-long, .nav .nav-signout { display: none; }
  .nav-admin ul.nav { padding: 0 calc(var(--gutter) - var(--space-2)); }
  .nav-admin ul.nav li:has(.nav-label) { display: none; }
  .footer li.footer-signout { display: list-item; }
  .logo img { height: 2rem; }
}
.footer-signout button {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0;
  border: 0;
  background: none;
  color: var(--footer-ink);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.footer-signout button:hover { text-decoration-thickness: 2px; }

/* Prototype / demo banner: first thing inside <header> (a landmark, axe « region »), grey dashes:
   a working condition of this machine, never a club message or a state (D36). */
.notice.prototype-banner {
  max-width: none;
  margin: var(--space-2) var(--gutter);
  padding: var(--space-2) var(--space-3);
  border: 2px dashed var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-sm);
}
@media (min-width: 78rem) { .notice.prototype-banner { margin-inline: auto; max-width: calc(var(--page-wide) - 2 * var(--gutter)); } }

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-7);
}
.page-wide { max-width: var(--page-wide); }
.page-narrow { max-width: 30rem; }

.page > * + * { margin-top: var(--space-5); }
.page > h1 + * { margin-top: var(--space-3); }

.back {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  font-weight: 400;
  font-size: var(--text-sm);
}
.back::before { content: "\2190\00a0"; }

/* Where a page sits (spec 007 FR-005): « À faire › File de révision » above the title. */
.place ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-2); font-size: var(--text-sm); }
.place li { margin: 0; display: inline-flex; align-items: center; min-height: var(--target); }
.place li + li::before { content: "\203A"; color: var(--ink-muted); margin-right: var(--space-2); }
.place li.place-ride::before { content: "\00b7"; }
.place [aria-current] { color: var(--ink-muted); }
.place + h1, .stack > .place + h1 { margin-top: 0; }

.meta { color: var(--ink-muted); font-size: var(--text-sm); }
.lead { font-size: var(--text-lg); }

.footer {
  margin-top: auto;
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: var(--text-sm);
}
.footer-inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: var(--space-6) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}
.footer img { display: block; height: 2rem; width: auto; }
.footer a { color: var(--footer-ink); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.footer li + li { margin-top: 0; }
.footer li a { display: inline-flex; align-items: center; min-height: var(--target); }
.footer :focus-visible { outline-color: currentColor; }

/* Two columns that collapse: review page, result page */
.split { display: grid; gap: var(--space-5); }
@media (min-width: 64rem) {
  .split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  /* The decision panel (spec 007 FR-001): beside the track, held in view only while it fits the window
     (panneau.js adds .is-pinned); taller, or without JavaScript, it scrolls with the page. Never a scroll
     of its own. */
  .split > .sticky.is-pinned { position: sticky; top: var(--space-4); }
}
.split > * + * { margin-top: 0; }
.stack > * + * { margin-top: var(--space-4); }

/* ---------- Card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
}
@media (max-width: 30rem) { .card { padding: var(--space-4); } }
.card > :first-child { margin-top: 0; }
.card > * + * { margin-top: var(--space-4); }
.card h2 { font-size: var(--text-lg); }
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.card-head > * { margin: 0; }

/* A whole card that is one link (event choice, submission row) */
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
a.card:hover { border-color: var(--link); }
a.card .card-title { color: var(--link); font-weight: 500; font-size: var(--text-lg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a.card:hover .card-title { text-decoration-thickness: 2px; }
a.card .card-title, a.card .meta { display: block; }
a.card > * + * { margin-top: var(--space-2); }
.card-notice { display: block; padding: var(--space-2) var(--space-3); font-weight: 500; color: var(--review-ink); }

/* The club's decision on the result page: the one stamp, framed in its state's line colour */
.decision-card:has(.status-ok) { border: 2px solid var(--ok-line); }
.decision-card:has(.status-wrong) { border: 2px solid var(--wrong-line); }

/* Error pages (404, 403, 409, 500): a calm column, not the field-error style */
.page-error > * + * { margin-top: var(--space-4); }
.page-error p { color: var(--ink); }

.list { list-style: none; padding: 0; }
.list > li + li { margin-top: var(--space-3); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-5);
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; }
.button:active { transform: translateY(1px); }

.button-secondary {
  background: var(--surface);
  color: var(--secondary-ink);
  border-color: var(--secondary-ink);
}
.button-secondary:hover { background: var(--secondary-hover-bg); border-color: var(--secondary-ink); }

.button-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}
.button-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }

/* Secondary danger: an outline in red ink for an undoable-by-confirmation action (« Retirer mon envoi ») */
.button-danger-quiet {
  background: var(--surface);
  color: var(--wrong-ink);
  border-color: var(--wrong-line);
}
.button-danger-quiet:hover { background: var(--wrong-bg); border-color: var(--wrong-line); }
.h-quiet { font-size: var(--text-lg); }

.button:disabled,
.button[aria-disabled="true"] {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--ink-muted);
  cursor: not-allowed;
  transform: none;
}
.button[aria-busy="true"] { cursor: progress; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}
@media (max-width: 30rem) {
  .actions .button, form > .button { width: 100%; }
}

/* ---------- Forms ---------- */

form > * + * { margin-top: var(--space-5); }

.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field > label,
.field > .label,
legend {
  font-weight: 500;
  color: var(--ink);
}

input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="time"], input[type="search"], input[type="tel"], input[type="url"],
input:not([type]), select, textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-base); /* never under 16px: no zoom on iOS */
  transition: border-color var(--fast) var(--ease);
}
textarea { min-height: 8rem; line-height: 1.5; resize: vertical; }
select { appearance: auto; }
input:hover, select:hover, textarea:hover { border-color: var(--link); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input[readonly], textarea[readonly] { background: var(--bg); }

input[type="file"] {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
}
input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  min-height: var(--target);
  padding: 0 var(--space-4);
  border: 2px solid var(--secondary-ink);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--secondary-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* The six-digit sign-in code */
.input-code {
  font-size: var(--text-xl) !important;
  font-weight: 500;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
  max-width: 12em;
}

input[type="checkbox"], input[type="radio"] {
  width: 1.5rem;   /* 24 px box (WCAG 2.5.8); the whole .choice label is the 44 px target */
  height: 1.5rem;
  margin: 0;
  flex: none;
  accent-color: var(--link);
}

/* A checkbox or radio with its whole sentence as the label */
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--target);
  padding: var(--space-2) 0;
  border-radius: var(--radius-sm);
  font-weight: 400;
  cursor: pointer;
}
.choice input { margin-top: 0.1em; }
.choice:has(input:checked) { color: var(--ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice small, .choice .hint { display: block; font-weight: 400; }
.choices { display: grid; gap: var(--space-2); }
.choices-inline { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choices-inline .choice { flex: 1 1 8rem; align-items: center; }

/* Settings switch: a native checkbox with on/off words */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--target);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  cursor: pointer;
}
.switch input {
  appearance: none;
  position: relative;
  width: 3.25rem;
  height: 1.875rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.switch input::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 1.375rem; height: 1.375rem;
  border-radius: 50%;
  background: var(--border-strong);
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.switch input:checked { background: var(--link); border-color: var(--link); }
.switch input:checked::before { transform: translateX(1.375rem); background: var(--surface); }
.switch:hover input { border-color: var(--link); }
.switch .switch-state { font-weight: 400; color: var(--ink-muted); font-size: var(--text-sm); margin-left: auto; }

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
fieldset > legend { padding: 0; margin-bottom: var(--space-2); }
fieldset > * + * { margin-top: var(--space-3); }

/* Decision form: only the chosen branch's fields show (review #8). Pure CSS: without :has() support
   the whole rule is dropped and every branch stays visible, which is the no-JS-safe fallback. */
.decision-form:has(input[name="decision"]) .branch { display: none; }
.decision-form:has(input[name="decision"][value="homologuee"]:checked) .branch-homologuee,
.decision-form:has(input[name="decision"][value="question"]:checked) .branch-question,
.decision-form:has(input[name="decision"][value="non-retenue"]:checked) .branch-non-retenue { display: block; }


.form-row {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.form-row > * + * { margin-top: 0; }

.hint {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: var(--measure-hint);
}

.error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--wrong-ink);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
}
.error::before {
  content: "";
  flex: none;
  width: 1em; height: 1em;
  margin-top: 0.15em;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 42%, var(--surface) 42% 58%, transparent 58%) center / 60% 60% no-repeat,
    linear-gradient(-45deg, transparent 42%, var(--surface) 42% 58%, transparent 58%) center / 60% 60% no-repeat,
    currentColor;
}
[aria-invalid="true"],
.field:has(.error) input,
.field:has(.error) select,
.field:has(.error) textarea {
  border-color: var(--wrong-line);
  border-width: 2px;
}

/* ---------- Notices ---------- */

.notice {
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--ink);
}
.notice > :first-child { margin-top: 0; }

/* Empty is one quiet line (D46, 006:FR-003): what goes here and how to make it happen, its link on the same
   line; no heading, tint or frame. Muted ink is 7.1:1 on the white page. */
.empty-line { max-width: none; color: var(--ink-muted); overflow-wrap: anywhere; }  /* a searched word with no spaces wraps */
.empty-line a { white-space: nowrap; }
.page > h1 + .empty-line, .page > .lead + .empty-line, .tabs + .empty-line, .form-row + .empty-line { margin-top: var(--space-5); }
.notice > * + * { margin-top: var(--space-2); }
.notice strong:first-child { color: var(--heading); }
.notice ul { padding-left: 1.2em; }
.notice-ok     { background: var(--ok-bg);     border-color: var(--ok-line); }
.notice-review { background: var(--review-bg); border-color: var(--review-line); }
.notice-wrong  { background: var(--wrong-bg);  border-color: var(--wrong-line); }
.notice-ok strong:first-child     { color: var(--ok-ink); }
.notice-review strong:first-child { color: var(--review-ink); }
.notice-wrong strong:first-child  { color: var(--wrong-ink); }
.notice-late   { background: var(--late-bg); }
.notice-late strong:first-child { color: var(--late-ink); }
.notice-large { font-size: var(--text-lg); line-height: 1.5; padding: var(--space-5); }

/* ---------- Status badges: word + shape + colour ----------
   .status         neutral  « Envoyée », « Remplacée »
   .status-ok      « Conforme… », « Homologuée », « Dans le délai »
   .status-review  « À vérifier par le club », « Question du club », « Hors délai »
   .status-wrong   « …ne semble pas correspondre… », « Non retenue »
   .status-late    « Envoi tardif », « En retard » (a flag next to a state, outlined)        */

.status, .status-ok, .status-review, .status-wrong, .status-late {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0;
  border: 0;
  border-radius: 1em; /* .status-large: a pill on one line, a rounded box when a long verdict wraps */
  background: none;
  color: var(--neutral-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
  white-space: normal; /* long verdicts wrap: no sideways scroll at 375 px (review #2) */
  text-align: left;
  max-width: 100%;
  vertical-align: middle;
}
.status::before, .status-ok::before, .status-review::before, .status-wrong::before, .status-late::before, .status-cancelled::before {
  content: "";
  flex: none;
  width: 0.6em;
  height: 0.6em;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.status-ok { color: var(--ok-ink); }
.status-ok::before {
  width: 0.38em; height: 0.72em;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0;
  transform: translateY(-0.1em) rotate(45deg);
  margin: 0 0.12em 0 0.1em;
}

.status-review { color: var(--review-ink); }
.status-review::before { border-radius: 1px; transform: rotate(45deg); width: 0.55em; height: 0.55em; }

.status-wrong { color: var(--wrong-ink); }
.status-wrong::before {
  border: 0;
  border-radius: 0;
  width: 0.7em; height: 0.7em;
  background:
    linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%);
}

.status-late { color: var(--late-ink); }  /* a word and its mark, never a second frame (D46) */
.status-late::before {
  width: 0.75em; height: 0.75em;
  border-width: 1.5px;
  background:
    linear-gradient(currentColor, currentColor) 50% 25% / 1.5px 35% no-repeat,
    linear-gradient(currentColor, currentColor) 68% 52% / 35% 1.5px no-repeat;
}

/* « Annulée » (spec 006 FR-016): heading ink and a ring with a slash; the club's call, not an alarm (D46). */
.status-cancelled { color: var(--heading); }
.status-cancelled::before {
  background: linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
.ride-cancel-reason { color: var(--ink-muted); font-size: var(--text-sm); flex-basis: 100%; overflow-wrap: anywhere; }
.ride-row-cancel { font-size: var(--text-sm); }
.ride-cancelled { overflow-wrap: anywhere; }
.event-cancelled { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.event-cancelled-title { margin: 0; font-size: var(--text-base); }
.event-cancelled p { overflow-wrap: anywhere; }
.event-cancel textarea { width: 100%; max-width: 36rem; }

/* Larger stamp for the headline verdict or decision */
.status-large { font-size: var(--text-base); padding: 0.4em 1em 0.4em 0.8em; border-radius: 1.1em; border: 1.5px solid var(--neutral-line); background: var(--neutral-bg); }
.status-large.status-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.status-large.status-review { background: var(--review-bg); border-color: var(--review-line); }
.status-large.status-wrong { background: var(--wrong-bg); border-color: var(--wrong-line); }

.badges { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.badges > * + * { margin-top: 0; }

/* ---------- Key figures and the route-card control list ---------- */

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}
.figures > div { min-width: 6rem; }
@media (max-width: 30rem) { .figures { column-gap: var(--space-5); } .figures > div { min-width: 0; } }
.figures dt { color: var(--ink-muted); font-size: var(--text-sm); font-weight: 400; }
.figures dd { margin: 0; font-size: var(--text-lg); font-weight: 500; color: var(--heading); }
.figures > * + * { margin-top: 0; }

/* « Carte de route »: numbered controls with their passage time */
.controls {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.controls li {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--target);
  padding: var(--space-2) 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.controls li:last-child { border-bottom: 0; }
.controls .control-n {
  display: inline-grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border: 2px solid var(--map-control-line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--heading);
  font-size: var(--text-sm);
  font-weight: 500;
}
.controls .control-name { font-weight: 400; }
.controls .control-name small { display: block; font-weight: 400; color: var(--ink-muted); }
.controls time, .controls .control-time { font-weight: 500; color: var(--heading); text-align: right; }
.controls .control-missed { color: var(--wrong-ink); font-weight: 500; font-size: var(--text-sm); }

/* Check lines: plain-French reasons */
.reasons { list-style: none; padding: 0; }
.reasons li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-2) 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.reasons li:last-child { border-bottom: 0; }
.reasons li::before {
  content: "";
  flex: none;
  width: 0.5rem; height: 0.5rem;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--neutral-line);
}
.reasons li.ok::before { background: var(--ok-line); }
.reasons li.review::before { background: var(--review-line); border-radius: 1px; transform: rotate(45deg); }
.reasons li.wrong::before { background: var(--wrong-line); border-radius: 0; }

/* ---------- Table ---------- */

.table-wrap { width: 100%; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table caption {
  text-align: left;
  font-weight: 500;
  color: var(--heading);
  padding-bottom: var(--space-2);
}
.table th, .table td {
  padding: var(--space-3) var(--space-3);
  text-align: left;
  vertical-align: top;
}
.table thead th {
  color: var(--ink-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table .num { text-align: right; }
.table td a { font-weight: 500; }
@media (min-width: 40.01rem) { .table td:first-child a { white-space: nowrap; } }
.table .group-row th {
  background: var(--bg);
  color: var(--heading);
  font-size: var(--text-sm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Narrow screens: each row becomes a block; cells need data-label="…" */
@media (max-width: 40rem) {
  .table { border: 0; background: transparent; }
  /* Column headers are hidden visually (each cell carries its data-label) but kept for screen readers */
  .table thead {
    display: block;
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .table caption { display: block; }
  .table tbody, .table tr, .table td, .table th[scope="row"] { display: block; }
  /* Each row is a ruled block, not a boxed card (D46, 006:FR-001, FR-002) */
  .table tbody tr {
    background: transparent !important;
    border: 0;
    border-top: 1px solid var(--border-strong);
    padding: var(--space-2) 0 var(--space-3);
    margin: 0;
  }
  .table tbody tr.group-row { border: 0; padding: var(--space-3) 0 0; margin: 0; background: transparent !important; }
  .table .group-row th { display: block; padding: 0 0 var(--space-2); border: 0; background: transparent; font-size: var(--text-base); text-align: left; }
  .table td, .table th[scope="row"] {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-2) 0;
    border-bottom: 1px dashed var(--border);
    text-align: right;
  }
  .table td:last-child { border-bottom: 0; }
  .table td > *, .table th[scope="row"] > * { min-width: 0; overflow-wrap: anywhere; }  /* a long unbroken name wraps, never scrolls the page (006:FR-005) */
  .table td[data-label]::before, .table th[data-label]::before {
    content: attr(data-label);
    color: var(--ink-muted);
    font-weight: 400;
    text-align: left;
  }
  .table td:first-child, .table th[scope="row"] { font-size: var(--text-base); text-align: left; }
  .table td:first-child::before { content: none; }
  .table td > *, .table th > * { min-width: 0; }
}
.table th[scope="row"] a { display: inline-flex; align-items: center; min-height: var(--target); }

/* Tabs (queue « À décider » / « Questions en attente »): one baseline, the current one underlined */
.tabs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  border-bottom: 1px solid var(--border);
}
.tabs li + li { margin-top: 0; }
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 var(--space-3);
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--heading);
  font-weight: 400;
  text-decoration: none;
}
.tabs a:hover { background: var(--surface-alt); }
.tabs a[aria-current="page"] { border-bottom-color: var(--link); font-weight: 500; }
@media (max-width: 30rem) {
  .tabs ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .tabs a { width: 100%; justify-content: center; text-align: center; padding: var(--space-2); line-height: 1.3; }
}

/* ---------- SVG map: route + track, server-drawn ----------
   Markup: <figure class="svg-map"><svg viewBox="0 0 400 300" role="img" aria-label="…">
     <path class="map-route" d="…"/>   official route (wide band)
     <path class="map-track" d="…"/>   kept track (thin line)
     <path class="map-gap" d="…"/>     a jump in space found by the check
     <circle class="map-control" r="9"/><text class="map-label">1</text>
     <circle class="map-start" r="7"/> <rect class="map-finish" …/>
   </svg><figcaption>…legend…</figcaption></figure>                       */

.svg-map {
  margin: 0;
  background: var(--map-ground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.svg-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  aspect-ratio: 4 / 3;
}
.svg-map .map-route {
  fill: none;
  stroke: var(--map-route);
  stroke-width: 9px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.svg-map .map-track {
  fill: none;
  stroke: var(--map-track);
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.svg-map .map-gap {
  fill: none;
  stroke: var(--map-gap);
  stroke-width: 3.5px;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.svg-map .map-control { fill: var(--map-control-fill); stroke: var(--map-control-line); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.svg-map .map-control.missed { stroke: var(--map-gap); stroke-dasharray: 3 2; }
.svg-map .map-label {
  fill: var(--heading);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: central;
}
.svg-map .map-start { fill: var(--ok-line); stroke: var(--map-control-fill); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.svg-map .map-finish { fill: var(--map-track); stroke: var(--map-control-fill); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.svg-map figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}
.svg-map .key { display: inline-flex; align-items: center; gap: var(--space-2); }
.svg-map .key::before { content: ""; display: inline-block; width: 1.5rem; flex: none; }
.svg-map .key-route::before { height: 9px; border-radius: 9px; background: var(--map-route); }
.svg-map .key-track::before { height: 3px; background: var(--map-track); }
.svg-map .key-gap::before { height: 0; border-top: 3.5px dotted var(--map-gap); }
.svg-map .key-control::before { width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2.5px solid var(--map-control-line); background: var(--map-control-fill); }
.svg-map-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: var(--space-5);
  text-align: center;
  color: var(--ink-muted);
}

/* ---------- Definition list (Mes données, event details) ---------- */

.details {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: var(--space-2) var(--space-5);
}
.details dt { color: var(--ink-muted); font-weight: 400; }
.details dd { margin: 0; }
.details > * + * { margin-top: 0; }
.details-pairs { grid-template-columns: max-content max-content; }
@media (max-width: 30rem) {
  .details:not(.details-pairs) { grid-template-columns: 1fr; gap: 0; }
  .details:not(.details-pairs) dd + dt { margin-top: var(--space-3); }
}

/* =====================================================================================
   Tonight's demo components (2026-11-23). Briefs: .impeccable/surfaces/accueil.md, sorties.md,
   sortie.md, envoyer.md (drop zone, demo files, clearer drawing), connexion.md (demo code).
   Markup and class names: DESIGN.md › Components › Rides and answers / Demo mode / Drawing.
   ===================================================================================== */

:root {
  --map-band: #8CC3CA;       /* official route, a light band; the track is 8.2:1 on it */
  --map-casing: var(--map-ground);
  --map-mark: #0A1A5C;       /* D / A discs, like the route card's circles */
  --map-mark-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --map-band: #2D5866;     /* white track 7.8:1 on it */
    --map-mark: #BCD3FF;
    --map-mark-ink: #0A1A5C;
  }
}

/* ---------- Rider nav: four equal cells on a phone (Accueil · Sorties · Mes envois · Mes données) ---------- */
@media (max-width: 40rem) {
  .header-inner > .nav ul {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
  .header-inner > .nav a { line-height: 1.2; }
}

/* ---------- Rides: list, card, date stub, facts, counts ---------- */

.ride-list { list-style: none; padding: 0; display: grid; gap: 0; border-bottom: 1px solid var(--border); }
.ride-list > li, .list.ride-list > li + li { margin: 0; border-top: 1px solid var(--border); }

.ride-card, a.card.ride-card {
  /* One ride-row shape (006:FR-025): the name, « sam. 28 nov. · 100 km », the facts, the foot. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--space-1);
  align-items: start;
  padding: var(--space-4);
}
/* A ride in a list is a ruled row, not a box, flush with the text (D46, spec 006 FR-001); a bordered ride card keeps its padding */
.ride-list .card.ride-card { border: 0; border-radius: 0; background: none; padding: var(--space-4) 0; }
.card.ride-card > * + *, a.card.ride-card > * + * { margin-top: 0; }
/* The send deadline under a ride row, outside its link, in the name column (spec 006 S3, FR-006) */
.ride-list .ride-window { margin: 0 0 var(--space-4); max-width: none; }
.ride-list .card.ride-card:has(+ .ride-window) { padding-bottom: var(--space-2); }
.ride-card .ride-date { grid-area: date; align-self: start; }
.ride-card-title { display: block; color: var(--heading); font-size: var(--text-lg); font-weight: 500; line-height: 1.3; text-wrap: balance; }
.ride-card-title a { color: var(--link); }
a.ride-card .ride-card-title {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a.ride-card:hover .ride-card-title { text-decoration-thickness: 2px; }
.ride-facts { display: block; color: var(--ink); font-size: var(--text-sm); line-height: 1.5; font-variant-numeric: tabular-nums; }
.ride-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}
.ride-card-foot:empty { display: none; }
.ride-card-foot > * + * { margin-top: 0; }
/* Actions span the whole card under the stub (« Envoyer ma trace » on Accueil) */

/* The date stub: a small route-card tab, aqua for what's coming, plain ground once past */
.ride-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  text-align: center;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.ride-date > * { display: block; }
.ride-date-wd { font-size: var(--text-sm); font-weight: 400; color: var(--ink-muted); }
.ride-date-day { font-size: var(--text-xl); font-weight: 500; }
.ride-date-month { font-size: 0.875rem; font-weight: 400; }
.ride-card-past .ride-date { color: var(--ink-muted); }

.ride-counts { color: var(--ink-muted); font-size: var(--text-sm); font-weight: 400; font-variant-numeric: tabular-nums; }
/* 002-S8: a started ride still within its time limit; a word, quiet like the counts, never colour alone. */
.ride-live { color: var(--heading); font-size: var(--text-sm); font-weight: 500; }

/* « Ta réponse : Oui » — neutral, one shape per answer (tick, half disc, dash) */
.answer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2em 0.75em 0.2em 0.6em;
  border: 1.5px solid var(--neutral-line);
  border-radius: 1em;
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
  max-width: 100%;
}
.answer-badge::before {
  content: "";
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.answer-badge-oui::before {
  width: 0.38em; height: 0.72em;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0;
  transform: translateY(-0.1em) rotate(45deg);
  margin: 0 0.12em 0 0.1em;
}
.answer-badge-peut-etre::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.answer-badge-non::before { width: 0.7em; height: 0; border-width: 2.5px 0 0; border-radius: 1px; }

/* ---------- The answer control: three submit buttons in one pill track (works without JS) ---------- */

.answer-group { max-width: 30rem; }
.answer-group > legend { font-weight: 500; color: var(--ink); margin-bottom: var(--space-2); }
.answer-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-1);
  padding: var(--space-1);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}
.answer-options > * + * { margin-top: 0; }
.answer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: var(--target);
  padding: var(--space-1) var(--space-2);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.answer:hover { background: var(--surface); border-color: var(--link); }
.answer:active { transform: translateY(1px); }
.answer[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
}
.answer[aria-pressed="true"]:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.answer[aria-pressed="true"]::before {
  content: "";
  flex: none;
  width: 0.36em; height: 0.7em;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-0.1em) rotate(45deg);
}

/* External link: a drawn « ↗ » (never a glyph) */
.link-external::after {
  content: "";
  flex: none;
  display: inline-block;
  width: 0.65em;
  height: 0.65em;
  margin-left: 0.1em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  background: linear-gradient(to bottom right, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.more-link { display: inline-flex; align-items: center; min-height: var(--target); font-weight: 400; }

/* Controls before the ride: distance along the route instead of a passage time */
.controls .control-km { font-weight: 500; color: var(--heading); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

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

.page > .home-section + .home-section { margin-top: var(--space-6); }
.page > h1 + .home-section { margin-top: var(--space-5); }
.home-section > h2 { font-size: var(--text-xl); }
.home-section > h2 + * { margin-top: var(--space-3); }

/* ---------- Drop zone around the native file field ---------- */

.dropzone {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.dropzone > * + * { margin-top: 0; }
.dropzone:hover { border-color: var(--link); }
.dropzone:focus-within { border-color: var(--link); }
.dropzone.is-dragover {
  border-style: solid;
  border-color: var(--link);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--link);
}
.dropzone-label { font-size: var(--text-lg); font-weight: 500; color: var(--heading); }
.dropzone > p { max-width: 100%; }
.dropzone input[type="file"] {
  width: auto;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}
.dropzone-hint { display: none; color: var(--ink-muted); font-size: var(--text-sm); }
.dropzone-hint-drop { display: none; }
@media (hover: hover) and (pointer: fine) {
  .dropzone-hint { display: block; }
}
.dropzone.is-dragover .dropzone-hint-idle { display: none; }
.dropzone.is-dragover .dropzone-hint-drop { display: inline; color: var(--heading); font-weight: 500; }
.dropzone .hint { text-align: center; }
.dropzone-files { font-size: var(--text-sm); font-weight: 400; color: var(--ink); overflow-wrap: anywhere; }
.dropzone-files:empty { display: none; }
.dropzone:has(.error) { border-color: var(--wrong-line); border-style: solid; }
.dropzone .error { text-align: left; }

/* ---------- Demo mode: dashed, neutral, never mistaken for a real club message ---------- */

.demo-code, .demo-files {
  padding: var(--space-4);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
}
.demo-code > * + *, .demo-files > * + * { margin-top: var(--space-2); }
.demo-code-value {
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
  color: var(--heading);
  white-space: nowrap;
}
.demo-files h2 { font-size: var(--text-base); }
.demo-files ul { list-style: none; padding: 0; }
.demo-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--border);
}
.demo-file:last-child { border-bottom: 0; }
.demo-file > span { min-width: 0; }
.demo-file-name { display: block; font-weight: 500; overflow-wrap: anywhere; }
.demo-file .meta { display: block; margin: 0; }
@media (max-width: 30rem) { .demo-file .button { width: 100%; } }

/* ---------- Clearer drawing: light route band, strong track over a casing, D / A discs, legend above ---------- */

.svg-map .map-route { stroke: var(--map-band); stroke-width: 12px; opacity: 1; }
.svg-map .map-track-casing {
  fill: none;
  stroke: var(--map-casing);
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.svg-map .map-track { stroke-width: 3.5px; stroke-dasharray: none; }
.svg-map g.map-control circle { fill: var(--map-control-fill); stroke: var(--map-control-line); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.svg-map g.map-start circle,
.svg-map g.map-finish circle { fill: var(--map-mark); stroke: var(--map-casing); stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.svg-map g.map-start .map-label,
.svg-map g.map-finish .map-label { fill: var(--map-mark-ink); }
.svg-map svg.map .map-label { font-size: 28px; } /* draw.ts viewBox is 1000 wide: about 10 px at 375 */

.svg-map > figcaption:first-child { border-top: 0; border-bottom: 1px solid var(--border); }
.svg-map .key-route::before { height: 12px; border-radius: 12px; background: var(--map-band); }
.svg-map .key-track::before { height: 3.5px; border-radius: 2px; background: var(--map-track); }
.svg-map .key-start::before,
.svg-map .key-finish::before {
  content: "D";
  content: "D" / "";
  display: inline-grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--map-mark);
  color: var(--map-mark-ink);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}
.svg-map .key-finish::before { content: "A"; content: "A" / ""; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .button:active { transform: none; }
}

/* ---------- Print (ACP sheet preview, receipts) ---------- */

@media print {
  .header .nav, .nav-admin, .footer, .actions, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}

/* =====================================================================================
   « Sorties » month calendar, the Ride with GPS widget and « Qui vient » (plan C2, D29, D30).
   New components only; tokens from :root. Markup: app/src/pages/member/sorties.ts.
   ===================================================================================== */

.month-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.month-nav > * + * { margin-top: 0; }
.month-nav h2 { margin: 0; font-size: var(--text-xl); text-transform: none; }
.month-cal { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: var(--space-4); }  /* no outer frame (006:FR-002): the day cells' rules draw the grid */
.month-cal th { padding: var(--space-2); font-size: var(--text-sm); font-weight: 400; color: var(--ink-muted); text-align: left; border-bottom: 1px solid var(--border); }
.month-cal abbr { text-decoration: none; }
.month-cal td { vertical-align: top; height: 5.5rem; padding: var(--space-2); border: 1px solid var(--border); font-size: var(--text-sm); overflow-wrap: anywhere; }
.month-cal td.month-day-out { background: var(--bg); }
.month-cal td.month-day-out .month-day-n { color: var(--ink-muted); font-weight: 400; }  /* last or next month: muted on the white page */
.month-day-n { display: block; font-weight: 500; color: var(--heading); font-variant-numeric: tabular-nums; }
.month-day-today .month-day-n { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); }
.month-day-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.month-cal ul { list-style: none; padding: 0; margin: var(--space-1) 0 0; display: grid; gap: var(--space-2); }
.month-cal li { margin: 0; line-height: 1.35; }
.month-cal li a { font-weight: 500; }
.month-cal .answer-badge { margin-top: var(--space-1); }
@media (max-width: 40rem) {
  /* A phone reads the month as a list of the days that have rides. */
  .month-cal, .month-cal tbody, .month-cal tr, .month-cal td { display: block; width: 100%; height: auto; }
  .month-cal { border: 0; background: none; }
  .month-cal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .month-cal td.month-day-out, .month-cal td.month-day-empty { display: none; }
  /* Each ride day is a ruled row, not a box (006:FR-001) */
  .month-cal td { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: var(--space-3) 0; margin: 0; font-size: var(--text-base); }
  .month-day-n { display: none; }
  .month-day-today .month-day-n { display: none; }
  .month-day-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; display: block; font-weight: 500; color: var(--heading); }
  .month-cal li a { display: inline-flex; align-items: center; min-height: var(--target); }
}

.rwgps-embed { display: block; width: 100%; height: 26rem; margin-top: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--map-ground); }
@media (max-width: 40rem) { .rwgps-embed { height: 20rem; } }

.who { list-style: none; padding: 0; columns: 2 12rem; column-gap: var(--space-5); }
.who li { margin: 0 0 var(--space-1); break-inside: avoid; }
/* D41: « Toi » first, in weight; members who hide their name are a count, in the quiet ink, never a name */
.who .who-you { font-weight: 400; }
.who .who-hidden { color: var(--ink-muted); }

/* =====================================================================================
   Design review 2 (2026-11-23): specs/001-homologation/evidence/design-review-2.md.
   ===================================================================================== */

/* Phone nav: the current page shows as a bar under its cell, not a text underline that crosses
   the second line of « Mes envois » / « Mes données ». */
@media (max-width: 40rem) {
  .header-inner > .nav a[aria-current="page"],
  .nav-admin ul.nav a[aria-current="page"] {
    text-decoration: none;
    box-shadow: inset 0 -3px 0 var(--link);
  }
}

/* The type filter is a row of chips, so it never reads as a second set of view tabs. */
.filter-chips { margin-top: var(--space-4); }
.filter-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-chips li { margin: 0; }
.filter-chips a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 var(--space-4);
  border: 1.5px solid var(--neutral-line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--heading);
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
}
.filter-chips a:hover { background: var(--surface-alt); }
.filter-chips a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 500; }

/* Date stub: the width of the brief (4.5rem) so « novembre » and « décembre » keep a margin. */
.ride-date-month { font-size: 0.8125rem; }
/* In the season the stub carries both month forms; a phone shows the short one (« déc. »): at 390
   « décembre » touched the edges (critique round 4). The full date is the visually-hidden text. */
.ride-date-month > .ride-date-month-short { display: none; }
@media (max-width: 30rem) {
  .ride-date-month > .ride-date-month-long { display: none; }
  .ride-date-month > .ride-date-month-short { display: inline; }
}

/* Month calendar on a phone: the month on top, « Mois précédent » and « Mois suivant » side by side. */
@media (max-width: 40rem) {
  .month-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .month-nav h2 { grid-column: 1 / -1; order: -1; }
  .month-nav .button { width: 100%; padding-inline: var(--space-2); font-size: var(--text-sm); white-space: nowrap; }
}

/* Review « Passages aux contrôles »: the dated time goes under the name on a phone and never splits. */
.controls time, .controls .control-time { white-space: nowrap; }
@media (max-width: 30rem) {
  .controls-dated li { grid-template-columns: 2.25rem minmax(0, 1fr); row-gap: 0; }
  .controls-dated li > time, .controls-dated li > .control-missed { grid-column: 2; text-align: left; }
}

/* Drawing on a phone: let the viewBox set the height (no forced 4:3 letterbox) and grow the
   markers so « 1 », « D », « A » read at about 13 px. */
@media (max-width: 40rem) {
  .svg-map svg.map { aspect-ratio: auto; }
  .svg-map svg.map g.map-control,
  .svg-map svg.map g.map-start,
  .svg-map svg.map g.map-finish { transform-box: fill-box; transform-origin: center; transform: scale(1.5); }
}

/* =====================================================================================
   Design review 3, agent A (2026-11-23): ride page type scale, « Sorties » search, « Accueil »
   distilled to one top card + compact rows + one line. Briefs: .impeccable/surfaces/sortie.md,
   sorties.md, accueil.md; review: specs/001-homologation/evidence/design-review-3.md.
   Markup: app/src/pages/member/sorties.ts, accueil.ts. Tokens from :root only.
   ===================================================================================== */

/* ---------- Ride page: one scale (h1 29 · section h2 24 · card h2 20 · body 17 · labels 15) ---------- */

/* Facts block: the figure row and the details read as one quiet group under the h1. */
.page > h1 + .ride-facts-block, .page > h1 + .ride-action { margin-top: var(--space-5); }
.page > .ride-action + .ride-facts-block { margin-top: var(--space-6); }
.ride-facts-block > * + * { margin-top: var(--space-4); }
.ride-figures { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.ride-figures > div { min-width: 0; }
@media (max-width: 40rem) { .ride-figures > div:first-child { flex-basis: 100%; } }
.ride-figures dt { font-size: var(--text-sm); font-weight: 400; color: var(--ink-muted); }
.ride-figures dd { font-size: var(--text-base); font-weight: 400; color: var(--ink); line-height: 1.4; }
.ride-details { grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-1) var(--space-5); }
.ride-details dt { font-weight: 400; }
@media (max-width: 30rem) {
  .ride-details:not(.details-pairs) dt { font-size: var(--text-sm); }
  .ride-details:not(.details-pairs) dd + dt { margin-top: var(--space-2); }
}

/* The one action card sits like a section: 32 px under the facts, its h2 at card size. */
.page > .ride-action { margin-top: var(--space-6); }
.ride-action > h2 + * { margin-top: var(--space-3); }
.answer-card form { margin-top: var(--space-4); }
.answer-card .answer-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.answer-card .hint { margin-top: var(--space-3); }

/* Sections after the card: one rhythm, 32 px above each h2. */
.page > .ride-section { margin-top: var(--space-6); }
.ride-section > h2 + * { margin-top: var(--space-3); }

/* « Qui vient »: « Oui · 27 » is a label in body weight 700, not a heading. */
.who-label { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
* + .who-label { margin-top: var(--space-4); }
.ride-section > h2 + .who-label { margin-top: var(--space-3); }
.who-label + .who { margin-top: var(--space-2); }
.who-hint { margin-top: var(--space-4); }

/* ---------- « Sorties » search ---------- */

.ride-search { margin-top: var(--space-5); }
.ride-search > * + * { margin-top: var(--space-1); }
.ride-search > label { display: block; font-weight: 500; color: var(--ink); }
.ride-search-row { display: flex; gap: var(--space-2); margin-top: var(--space-2) !important; max-width: 34rem; }
.ride-search-row > * + * { margin-top: 0; }
.ride-search-row input { flex: 1 1 auto; min-width: 0; }
.ride-search-row .button { flex: none; }
.ride-search + .tabs { margin-top: var(--space-5); }
.search-result { margin-top: var(--space-4); }
.search-result > * + * { margin-top: 0; }
.search-count { font-weight: 400; color: var(--ink); }

/* ---------- « Accueil »: one top card that adapts ---------- */

.page > h1 + .home-top { margin-top: var(--space-5); }
.page > .home-top + .home-section { margin-top: var(--space-6); }
.home-top > h2 + * { margin-top: var(--space-3); }
.home-top-ride {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--space-1);
  align-items: start;
}
.home-top-ride > * + * { margin-top: 0; }
.home-top-ride .ride-date { grid-area: date; }
.home-top-ride .ride-card-title a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.home-top .actions { margin-top: var(--space-4); }
/* « Aussi à envoyer » in the top card: the compact rows of « Mes résultats » (critique round 4), 2 at most */
.home-top > .home-send-more, .home-todo-item > .home-send-more { margin-top: var(--space-5); }
.home-send-more > * + * { margin-top: var(--space-2); }

/* « Les prochaines sorties »: compact rows in one panel, divided by rules, never a stack of cards. */
.ride-rows {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ride-rows > li { margin: 0; }
.ride-rows > li + li { border-top: 1px solid var(--border); }
.ride-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--space-1);
  align-items: baseline;
  min-height: var(--target);
  padding: var(--space-3) 0;  /* rows line up with the headings above them (D46) */
  color: inherit;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease);
}
.ride-row:focus-visible { outline-offset: -3px; }
.ride-row-name { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.ride-row:hover .ride-row-name { text-decoration-thickness: 2px; }
.ride-rows + p { margin-top: var(--space-2); }

/* « Mes envois » as one row: the whole row is the link, like a ride row. */
.page > .home-section + .home-envois-section { margin-top: var(--space-5); }
.home-envois {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-height: var(--target);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.home-envois:hover { border-color: var(--link); }
.home-envois-title { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.home-envois:hover .home-envois-title { text-decoration-thickness: 2px; }
.home-envois-text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-sm); }
.home-season-hint { flex-basis: 100%; color: var(--ink-muted); font-size: var(--text-sm); } /* « Série SR : … » in one short line (round 4) */

/* =====================================================================================
   Design review 3 · agent E (2026-11-23 evening): admin ⇄ member switch, « Ajouter une
   précision » with photos (D32), the « Temps total » help line, the verdict line after a
   decision. Briefs: .impeccable/surfaces/envoyer.md, revision.md. Tokens from :root only.
   ===================================================================================== */

/* « Espace membre · Administration »: one pill track, the active mode filled navy (like the ride answer control). */
.mode-switch { margin-left: auto; }
.mode-switch ul {
  list-style: none;
  margin: 0;
  padding: 3px;
  display: flex;
  gap: 2px;
  border: 1.5px solid var(--neutral-line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.mode-switch li { margin: 0; }
.mode-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--heading);
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}
.mode-switch a:hover { background: var(--surface-alt); }
.mode-switch a[aria-current="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.45em; text-decoration-color: var(--primary); }
.mode-switch a:focus-visible { outline-offset: 1px; }

/* The second header row of an admin: the nav of the active mode, member or admin. */
.nav-row { border-top: 1px solid var(--border); background: var(--bg); }
.nav-row ul { max-width: var(--page-wide); margin: 0 auto; padding: 0 var(--gutter); }
.nav-row .nav-signout { margin-left: auto; }
@media (max-width: 40rem) {
  .header-inner:has(.mode-switch) { padding-bottom: var(--space-3); }
  .mode-switch { flex-basis: 100%; margin-left: 0; }
  .mode-switch ul { display: grid; grid-template-columns: 1fr 1fr; }
  .nav-row-member ul.nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 calc(var(--gutter) - var(--space-2));
  }
  .nav-row-member ul.nav a { justify-content: center; width: 100%; padding: 0 var(--space-2); text-align: center; line-height: 1.2; }
  .nav-row-member ul.nav a[aria-current="page"] { text-decoration: none; box-shadow: inset 0 -3px 0 var(--link); }
}

/* « Temps écoulé » help line, right under the figures, then « Dans le délai / Hors délai » (D39). */
.figures + .figures-hint { margin-top: var(--space-2); }
.limit-status { margin-top: var(--space-2); font-variant-numeric: tabular-nums; }

/* « Feuille ACP » (D25, D40): the ACP form as a table; a second table « Envois tardifs » stands apart. */
.acp-lot { margin-top: var(--space-6); }
.verdict-line { font-weight: 400; color: var(--heading); }

/* « Ajouter une précision »: a native disclosure, closed until needed. */
.precision-disclosure { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.precision-disclosure > summary {
  display: block;
  min-height: var(--target);
  padding: 0.625rem var(--space-4);
  line-height: 1.5;
  color: var(--link);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.precision-disclosure > summary::-webkit-details-marker { display: none; }
.precision-disclosure > summary::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin: 0 0.6em 0.15em 0.1em;
  vertical-align: middle;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--fast) var(--ease);
}
.precision-disclosure[open] > summary::before { transform: rotate(45deg); }
.precision-disclosure > summary:hover { background: var(--surface-alt); }
.precision-disclosure > summary .meta { font-weight: 400; }
.precision-disclosure > :not(summary) { padding: var(--space-2) var(--space-4) var(--space-4); margin-top: 0; }

/* The note as the rider wrote it (line breaks kept), on the aqua panel; never a side bar. */
.precision-note {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-alt);
  border-radius: var(--radius);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.precision-note > p { margin: 0; }
.precision-note + .meta { margin-top: var(--space-2); }

/* Photo thumbnails: 96 px squares, each a link to the full photo. */
.photo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.photo-list li { margin: 0; display: grid; gap: var(--space-2); justify-items: start; }
.photo-thumb {
  display: block;
  width: 6rem;
  height: 6rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.photo-thumb:hover { border-color: var(--link); }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-list form { margin: 0; }
.button-small { min-height: var(--target); padding: 0 var(--space-4); font-size: var(--text-sm); }
@media (max-width: 30rem) { .photo-list .button-small { width: auto; } }

/* =====================================================================================
   « Profil » and signing up from it (D33). Brief: .impeccable/surfaces/profil.md.
   Markup: app/src/pages/member/profil.ts, signup-card.ts, admin/inscrits.ts. Tokens from :root only.
   ===================================================================================== */

/* Sections: 32 px above each h2, 12 px below; the form's own sections keep that rhythm. */
.page > .profile-section, .page > .profile-form { margin-top: var(--space-6); }
/* Every block of a profile form 24 px apart, fieldsets included (the base fieldset rule zeroes its margin). */
.profile-form > * + * { margin-top: var(--space-5); }
.profile-form > .profile-section + .profile-section { margin-top: var(--space-6); }
.profile-section > h2 { font-size: var(--text-xl); }
.profile-section > h2 + * { margin-top: var(--space-3); }
.profile-section > * + * { margin-top: var(--space-4); }
.profile-facts { padding: var(--space-4); }
.profile-email { overflow-wrap: anywhere; }
.page > .profile-data-hint { margin-top: var(--space-6); }

/* Fields keep a readable width: a phone number never stretches across a laptop screen. */
.profile-form .field { max-width: 30rem; }
.input-phone { max-width: 16rem; }
.input-name { max-width: 24rem; }
/* A hint sits right under its label (the flex gap only), like the date's hint under its legend. */
.profile-form .field > label + .hint { margin-top: 0; }
.profile-form .field > .notice + .choice { margin-top: var(--space-2); }

/* Date of birth: three boxes on one row (jour, mois, année), the error under them. */
.field-date > legend { margin-bottom: var(--space-1); }
.field-date > .hint { margin-top: 0; }
.date-parts { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2) !important; }
.date-parts > * + * { margin-top: 0; }
.date-part > label { font-weight: 400; font-size: var(--text-sm); color: var(--ink); }
.date-part-jour input, .date-part-mois input { width: 4.5rem; }
.date-part-annee input { width: 6rem; }
.field-date:has(.error) .date-parts input { border-color: var(--wrong-line); border-width: 2px; }

/* A group of fields under a legend (« En cas d'urgence » on the short forms). */
.signup-group > legend { font-size: var(--text-lg); color: var(--heading); margin-bottom: var(--space-3); }
.signup-group > * + * { margin-top: var(--space-4); }

/* Form footer: the button, then « Annuler » as a quiet link on the same row. */
.profile-form > .actions { align-items: center; }

/* The answer card after « Oui »: « Le club recevra : » on the aqua ground, under the answers. */
.signup-summary {
  margin-top: var(--space-4) !important;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.signup-summary > * + * { margin-top: var(--space-3); }
.signup-summary-title { font-weight: 500; color: var(--ink); }
.signup-details { grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-1) var(--space-5); }
.signup-details dd { overflow-wrap: anywhere; }
.signup-note { white-space: pre-line; }
.signup-summary .actions { margin-top: var(--space-4); }
.signup-summary .hint { margin-top: var(--space-2); }
.signup-missing { background: transparent; padding: 0; }
.signup-missing .notice { margin: 0; }

/* Admin « Inscrits »: the note wraps; club-site rows say where they came from. */
.inscrits-note { white-space: pre-line; overflow-wrap: anywhere; max-width: 24rem; }
.inscrits-site { font-style: normal; }
.inscrits-phone { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Phone: each cell reads label above value (a long note or a two-line contact never squeezes its label). */
@media (max-width: 40rem) {
  .inscrits .table td { flex-direction: column; gap: var(--space-1); text-align: left; }
  .inscrits .table td:first-child::before { content: attr(data-label); }
  .inscrits .table td > .status-review { align-self: flex-start; } /* the badge keeps its own width */
}

/* « Je n'y suis pas allé » (JP 2026-11-23): a quiet text button under « Envoyer ma trace ». */
.not-went > * + * { margin-top: 0; } /* the CSRF and hidden inputs come first: not the form rhythm */
.card > .actions + .not-went { margin-top: var(--space-2); }
.link-button { background: none; border: 0; padding: 0.5rem 0; min-height: 44px; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.link-button:hover { text-decoration-thickness: 2px; }
.link-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* ---- D36 distance colours, stamp, count badge (agent D) ---- */

/* Distance range (D36). Colour is a category, never a state, and never alone: the km is always
   written beside it. Put one class from distanceClass(km, type) (pages/format.ts) on the element;
   it sets --dist-ink, --dist-bg, --dist-line and --dist-ring, which the components below read. */
.dist-200   { --dist-ink: var(--dist-200-ink);  --dist-bg: var(--dist-200-bg);  --dist-line: var(--dist-200-ink);  --dist-ring: transparent; }
.dist-300   { --dist-ink: var(--dist-300-ink);  --dist-bg: var(--dist-300-bg);  --dist-line: var(--dist-300-ink);  --dist-ring: transparent; }
.dist-400   { --dist-ink: var(--dist-400-ink);  --dist-bg: var(--dist-400-bg);  --dist-line: var(--dist-400-ink);  --dist-ring: transparent; }
.dist-600   { --dist-ink: var(--dist-600-ink);  --dist-bg: var(--dist-600-bg);  --dist-line: var(--dist-600-bg);   --dist-ring: transparent; }
.dist-1000  { --dist-ink: var(--dist-1000-ink); --dist-bg: var(--dist-1000-bg); --dist-line: var(--dist-1000-bg);  --dist-ring: var(--dist-1000-ring); }
.dist-other { --dist-ink: var(--ink);           --dist-bg: var(--surface);      --dist-line: var(--border-strong); --dist-ring: transparent; }

/* 1000 km and more: a second ring, 2 px wide, 2 px off the edge, the ground showing between (like a
   double stamp border). An outline, so no card shadow or hover rule can hide it; none of these is focusable. */
.dist-1000.cal-ride > a::before { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--dist-ring); }

/* « 300 km »: a small pill */
.km-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The distance colour is a small dot before the written km (D36, D46: no stub, no pill) */
.km-chip::before {
  content: "";
  flex: none;
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  background: var(--dist-line, var(--border-strong));
}
.km-chip.dist-other::before, .km-chip:not([class*="dist-"])::before { background: none; border: 1.5px solid var(--border-strong); }
.km-chip.dist-1000::before { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--dist-ring); }

/* Calendar (« Sorties » month view): one chip per ride in its distance colour */
.cal-ride {
  display: block;
  padding: 0;
  color: var(--ink);
}
/* The ride's distance colour as a small dot before its name (D36, D46: no chip) */
.cal-ride > a::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.35em;
  border-radius: 50%;
  background: var(--dist-line, var(--border-strong));
  vertical-align: 0.05em;
}
.cal-ride.dist-other > a::before { background: none; border: 1.5px solid var(--border-strong); }
.cal-ride .meta { color: var(--ink-muted); }
.month-cal .cal-ride { margin-top: var(--space-1); padding: 2px 0; overflow-wrap: break-word; hyphens: auto; min-width: 0; } /* names break between words (hyphenated in French); mid-word only when one word is wider than the day */
.cal-ride a { overflow-wrap: anywhere; }  /* a name with no spaces still breaks inside its day (006:FR-005) */

/* « Homologuée »: a round green stamp, double ring drawn in CSS, with a drawn tick (Word-and-Shape).
   Markup: <p class="stamp-homologuee"><span class="stamp-word">Homologuée</span>
           <span class="stamp-time">38 h 12</span></p>   (stamp-time optional)  */
.stamp-homologuee {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 6rem;
  height: 6rem;
  max-width: 6rem;
  margin: 0;
  padding: 0 var(--space-2);
  border: 3px solid var(--ok-line);
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok-ink);
  text-align: center;
  line-height: 1.15;
  transform: rotate(-6deg);
}
.stamp-homologuee::before { /* inner ring */
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--ok-line);
  border-radius: 50%;
  pointer-events: none;
}
.stamp-homologuee .stamp-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  font-size: 0.6875rem; /* « Homologuée » fits inside the inner ring at 96 px */
  font-weight: 800;
  letter-spacing: 0;
}
.stamp-homologuee .stamp-word::before { /* drawn tick */
  content: "";
  width: 0.9em;
  height: 0.5em;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-0.1em) rotate(-45deg);
}
.stamp-homologuee .stamp-time {
  display: block;
  margin-top: 0.2em;
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Small stamp on a « Mes résultats » card (critique round 3): 88 px (round 4: « Homologuée » needs the room), the word one step smaller so it still
   fits the inner ring; never under 10 px. There it is the card's state badge (« Homologuée », read aloud). */
/* The envoi page's stamp (spec 006 FR-007): the page's one loud thing, larger, with « Temps officiel » beside it */
.stamp-homologuee.stamp-large { width: 8rem; height: 8rem; max-width: 8rem; border-width: 3.5px; }
.stamp-homologuee.stamp-large::before { inset: 5px; border-width: 1.5px; }
.stamp-homologuee.stamp-large .stamp-word { font-size: 0.9375rem; }
.decision-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }
.decision-stamp-text { flex: 1 1 10rem; }
.decision-stamp-text > * + * { margin-top: var(--space-2); }
.decision-official .nowrap { white-space: nowrap; } /* « 9 h 45 » never breaks (evaluator note, 006-S4) */
.decision-official { font-size: var(--text-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.stamp-homologuee.stamp-small { width: 5.5rem; height: 5.5rem; max-width: 5.5rem; padding: 0; border-width: 2.5px; }
.stamp-homologuee.stamp-small::before { inset: 3px; border-width: 1px; }
/* 11 px at least: the detector's undersized-ui-text floor (006:FR-021) */
.stamp-homologuee.stamp-small .stamp-word { font-size: 0.6875rem; gap: 0.25em; }
@media (forced-colors: active) {
  .stamp-homologuee, .stamp-homologuee::before { border-color: CanvasText; }
}

/* Count on a nav item or the « Administration » switch: « 3 ». Never colour alone: the link also
   carries a visually-hidden phrase (« 3 à décider », « dont 1 en retard »). */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.45em;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  vertical-align: 0.05em;
}
.count-badge.is-late { border-color: var(--review-line); background: var(--review-bg); color: var(--review-ink); }
.count-badge:empty { display: none; }

/* Tap targets on stacked tables (« Carte de route » in the ACP list, every row link on a phone) */
@media (max-width: 40rem) {
  .table td a, .table th[scope="row"] a { display: inline-flex; align-items: center; min-height: var(--target); }
}

/* ---- M2 sorties, sortie, envoyer ---- */
/* Briefs: .impeccable/surfaces/sorties.md, sortie.md, envoyer.md (revised 2026-11-24, critique P1/P2).
   Tokens only; the distance colours (.dist-*, .km-chip, .cal-ride.dist-*) belong to the shared block. */

/* « Sorties »: one search field and a drawn magnifier button (round 3: the word « Chercher » shows beside it) */
.ride-search { margin-top: var(--space-4); }
.ride-search-row { margin-top: 0 !important; }
.ride-search input::placeholder { color: var(--ink-muted); opacity: 1; }

/* The km chip leads the facts line of a ride card */
.ride-card .ride-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.ride-card .ride-facts > * + * { margin-top: 0; }

/* Past rides by season: a year heading per group, under « Passées » */
.season-title { font-size: var(--text-lg); color: var(--heading); }
.page > .season-title { margin-top: var(--space-5); }
.page > h2 + .season-title { margin-top: var(--space-3); }
.page > .season-title + .ride-list { margin-top: var(--space-3); }

/* Ride page: « Comment ça marche », a quiet aqua panel of three plain lines (no side bar) */
.how-box {
  padding: 0;
}
.page > .how-box { margin-top: var(--space-6); }
.how-box h2 { font-size: var(--text-lg); }
.how-box dl { display: grid; gap: var(--space-2); margin: var(--space-3) 0 0; max-width: var(--measure); }
.how-box dl > div > * { display: inline; margin-top: 0; }
.how-box dt { font-weight: 500; color: var(--heading); }
.how-box dt::after { content: "\00a0:"; }
.how-box dd { color: var(--ink); margin-left: 0.3em; }

/* Ride page: the drawn route sits under its meta line, before the controls */
.ride-section .svg-map { margin-top: var(--space-3); }
.ride-section > .svg-map + h3 { margin-top: var(--space-5); }

/* « Envoyer »: « ← Sortie » (a plain .back link, as on every page: critique round 5), then one header
   row: the date stub, the name and « 200 km · délai 13 h 30 » */
.send-head {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: center;
}
.page > p:has(> .back) + .send-head { margin-top: var(--space-2); }
.send-head > * + * { margin-top: 0; }
.send-head .ride-date { min-height: 4rem; padding: var(--space-1); }
.send-head .ride-date-month { font-size: 0.75rem; }
.send-head h1 { font-size: var(--text-xl); line-height: 1.25; text-wrap: balance; overflow-wrap: anywhere; }
.send-head-text > * + * { margin-top: var(--space-1); }
@media (max-width: 30rem) {
  /* Phone: the stub and the meta on one row, the name as a full-width h1 under them, so it keeps the
     page's h1 step (26 px, above the 20 px file label) without wrapping word by word (critique round 4). */
  .send-head { grid-template-areas: "date meta" "title title"; row-gap: var(--space-3); }
  .send-head .ride-date { grid-area: date; }
  .send-head-text { display: contents; }
  .send-head h1 { grid-area: title; font-size: var(--text-xl); }
  .send-head-text > .meta { grid-area: meta; margin-top: 0; }
}

/* The way to send: two (or three) radio rows side by side */
.source-choice .choices-inline .choice { flex: 1 1 9rem; min-height: var(--target); }

/* Only the chosen way's panel and button show (CSS :has(); without it, all show and all work) */
.send-form:has(#source-fichier:not(:checked)) :is(.send-panel-fichier, .send-action-fichier, .demo-files),
.send-form:has(#source-rwgps:not(:checked)) :is(.send-panel-rwgps, .send-action-rwgps),
.send-form:has(#source-strava:not(:checked)) :is(.send-panel-strava, .send-action-strava) { display: none; }
.send-panel > * + * { margin-top: var(--space-3); }
.send-panel > .precision-disclosure { margin-top: var(--space-4); }

/* The French file button: with JS, the native field is visually hidden but stays focusable */
.file-button { display: none; }
:is(.dropzone, .file-pick).is-enhanced .file-button { display: inline-flex; }
:is(.dropzone, .file-pick).is-enhanced input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
:is(.dropzone, .file-pick).is-enhanced { position: relative; }
.file-pick-files { font-size: var(--text-sm); color: var(--ink); overflow-wrap: anywhere; }
.file-pick-files:empty { display: none; }
.file-pick > * + * { margin-top: var(--space-2); }
:is(.dropzone, .file-pick).is-enhanced input[type="file"]:focus-visible + .file-button { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Consent, directly above the one button */
.send-consent .hint { max-width: var(--measure-hint); }
.send-form > .send-action { margin-top: var(--space-4); }
@media (max-width: 40rem) { .send-action .button { width: 100%; } }
.send-strava-help { font-size: var(--text-sm); }

/* =====================================================================================
   Member structure (D34, agent M1): 4-tab nav, « Accueil » blocks, « Mes résultats », « Mon compte ».
   Briefs: .impeccable/surfaces/nav-membre.md, accueil.md, resultats.md, compte.md.
   ===================================================================================== */

/* Nav: « Mes résultats » / « Mon compte » shorten on a phone so the four cells stay on one line. */
.nav-short { display: none; }
@media (max-width: 40rem) {
  .nav .nav-full { display: none; }
  .nav .nav-short { display: inline; }
  .header-inner > .nav a, .nav-row-member ul.nav a { padding: 0 var(--space-1); white-space: nowrap; }
}

/* « Accueil »: the first block is the top card; the next ones are quieter cards. */
.page > h1 + .home-card { margin-top: var(--space-5); }
.page > .home-top + .home-card,
.page > .home-card + .home-card { margin-top: var(--space-4); }
.page > .home-card + .home-section { margin-top: var(--space-6); }
.home-card { padding-top: var(--space-5); border-top: 1px solid var(--border); }
.home-card > :first-child { margin-top: 0; }
.home-card > * + * { margin-top: var(--space-3); }
.home-card > h2 { font-size: var(--text-lg); }
.home-card > h2 + * { margin-top: var(--space-3); }
.home-card .actions { margin-top: var(--space-4); }
.home-todo-item > h3 { font-size: var(--text-lg); }
.home-todo-item > h3 + * { margin-top: var(--space-3); }
.home-todo-item + .home-todo-item { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.home-top > h2 + .home-todo-item { margin-top: var(--space-4); }

/* « Ton brevet est homologué »: green line, the stamp beside the heading (stamp drawn by .stamp-homologuee). */
.home-homologue-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.home-homologue-head > * + * { margin-top: 0; }
.home-homologue-head + * { margin-top: var(--space-3); }
.home-homologue-facts { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-homologue-facts > * + * { margin-top: 0; }

/* « Ma saison »: « 3 brevets homologués · 1 100 km · Série SR 200 ✓ 300 ✓ 400 — 600 — », marks drawn in CSS. */
.season-facts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-variant-numeric: tabular-nums; }
.season-fact { display: inline-flex; align-items: center; gap: var(--space-2); }
.season-fact + .season-fact::before { content: "·"; color: var(--ink-muted); }
.sr-label { text-decoration: none; font-weight: 400; cursor: help; }
.sr-steps { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); list-style: none; margin: 0; padding: 0; }
.sr-steps > li { margin: 0; }
.sr-step { display: inline-flex; align-items: center; gap: 0.3em; font-weight: 400; }
.sr-step::after { content: ""; flex: none; display: inline-block; }
.sr-step-done { color: var(--ok-ink); }
.sr-step-done::after { width: 0.36em; height: 0.7em; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: translateY(-0.12em) rotate(45deg); margin-left: 0.1em; }
.sr-step-todo { color: var(--ink-muted); }
.sr-step-todo::after { width: 0.7em; height: 0; border-top: 2px solid currentColor; }
.sr-complete { font-weight: 500; color: var(--ok-ink); }
/* Phone: the SR series takes its own line, so no « · » starts a line. */
@media (max-width: 30rem) {
  .season-fact.season-sr { flex-basis: 100%; }
  .season-fact.season-sr::before { content: none; }
}

/* « Mes résultats » */
.page > h1 + .season-panel { margin-top: var(--space-5); }
.season-panel > h2 { font-size: var(--text-lg); }
.season-panel > h2 + * { margin-top: var(--space-2); }
.season-line { color: var(--ink); }
.page > .season-panel + * { margin-top: var(--space-6); }
.results-season + .results-season { margin-top: var(--space-6); }
.results-season > h2 { font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.results-season > h2 + * { margin-top: var(--space-3); }
.results-season .season-line { font-size: var(--text-sm); }
.results-season .season-line + .list { margin-top: var(--space-3); }
.result-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; color: var(--ink); font-size: var(--text-sm); }
.result-facts .hint { display: inline; }
.page > .results-other { margin-top: var(--space-6); }

/* « Mon compte » */
.compte-section { margin-top: var(--space-6); }
.compte-section > h2 + * { margin-top: var(--space-3); }
.compte-section h3 { font-size: var(--text-lg); margin-top: var(--space-5); }
.compte-section:focus { outline: none; }
/* « Mon compte » has its own « Se déconnecter » section: the phone footer's copy would say it twice
   (critique round 4). Other pages keep the footer button on a phone (layout.ts, design review #6). */
body:has(.compte-signout) .footer li.footer-signout { display: none; }

/* ---- A admin ---- */
/* Briefs: .impeccable/surfaces/admin-a-faire.md, nav-admin.md, acp.md, revision.md, admin-setup.md
   (2026-11-24, D35). Tokens only; .count-badge and .km-chip come from the shared block. */

/* One box, one left edge for every admin page (critique 2026-11-24 P2). Tables use the full width;
   a text or form page keeps its content to the text width, aligned left, never centred alone. */
.page-admin-narrow > * { max-width: calc(var(--page) - 2 * var(--gutter)); }
.page-admin-narrow > .todo { max-width: 52rem; }
.page-admin-narrow > .tabs { max-width: none; } /* « Club »: the same tab line on Réglages and Journal */

/* « À faire »: a short list of full-bordered white rows, most urgent first (never a side bar, never tiles).
   One grammar: title and meta on the left, the action in one fixed column on the right, the same
   place on every row and every list item (subgrid); under the text on a phone. */
.todo { display: grid; gap: 0; margin-top: var(--space-5); }
.todo > * + * { margin-top: 0; }
.todo-row {
  --todo-action: 16.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--todo-action);
  gap: var(--space-3) var(--space-5);
  align-items: center;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}
.todo-row:last-child { border-bottom: 1px solid var(--border); }
.todo-row > * + * { margin-top: 0; }
.todo-row h2 { font-size: var(--text-lg); line-height: var(--leading-tight); }
.todo-text { grid-column: 1; }
.todo-text > * + * { margin-top: var(--space-2); }
.todo-row.is-late { border-color: var(--review-line); border-width: 2px; }
.todo > .todo-empty { padding: var(--space-4) 0; }  /* « Rien à faire »: one quiet line (006:FR-003) */
.todo-action { grid-column: 2; margin: 0; }
.todo-action .button, .todo-list .button, .todo-list form { width: 100%; }
.todo-late {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0 0.55em 0 0.45em;
  border: 1px solid var(--review-line);
  border-radius: var(--radius-pill);
  background: var(--review-bg);
  color: var(--review-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: baseline;
}
/* « en retard », « départ dans 2 jours »: the review diamond, as on .status-review (Word-and-Shape) */
.todo-late::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  border: 2px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.todo-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  list-style: none;
  margin: 0;
  padding: 0;
}
.todo-list li {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  row-gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
}
.todo-list li:first-child { border-top: 0; padding-top: 0; }
.todo-list li:last-child { padding-bottom: 0; }
.todo-list li > :last-child:not(.todo-item) { grid-column: 2; }
.todo-list form { margin: 0; }
.todo-list form > * + * { margin-top: 0; }
.todo-item { display: grid; gap: var(--space-1); min-width: 0; }
.todo-item > a, .todo-item-title { font-weight: 500; overflow-wrap: anywhere; }
.todo-item > a { display: inline-flex; align-items: center; min-height: 1.75rem; width: fit-content; }
.todo-item .meta { display: block; }
/* « Voir : Sorties · Révision »: plain links on the line, each with a 44 px touch area that does not move the text (D35, 006:FR-003) */
.todo-links a { display: inline-block; padding-block: 0.6875rem; margin-block: -0.6875rem; }
@media (max-width: 40rem) {
  .todo-row { grid-template-columns: minmax(0, 1fr); padding: var(--space-4); }
  .todo-text, .todo-action, .todo-list li > :last-child:not(.todo-item) { grid-column: 1; }
  .todo-list li { row-gap: var(--space-3); }
}

/* « Sorties » on a phone: a ride is its name, date and distance; empty counts (« 0 », « Aucun envoi »,
   « — ») stay on the wide table only */
@media (max-width: 40rem) {
  .table-rides td.cell-nil, .table-acp td.cell-nil { display: none; }
  .table-rides td { border-bottom: 0; }
  .table-rides td + td { border-top: 1px dashed var(--border); }
}

/* Ride page « Inscrits »: the same count as « À faire » */
.inscrits-summary { font-weight: 400; }

/* Standalone links in the admin: at least 24 px tall (WCAG 2.5.8), 44 where they stand alone */
.page-admin .table td a, .page-admin .table th[scope="row"] a { display: inline-flex; align-items: center; min-height: 1.5rem; }
.import-fold a[download] { display: inline-flex; align-items: center; min-height: var(--target); }

/* Mode switch: the badge sits beside the word, inside the pill */
.mode-switch a .count-badge { margin-left: var(--space-2); }

/* Réglages: section titles at h2 weight inside their legend (shared contract with D) */
.settings-legend { padding: 0; margin-bottom: var(--space-2); }
.settings-legend h2 { font-size: var(--text-xl); }

/* Filter rows (Sorties, Membres): search and season on one line, the button aligned to the fields */
.admin-filter { margin-top: var(--space-4); align-items: end; }
.admin-filter .actions { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tabs + .admin-filter { margin-top: var(--space-4); }
.admin-filter > .hint { grid-column: 1 / -1; margin-top: calc(var(--space-2) * -1); }
@media (max-width: 47.99rem) {
  .admin-filter > * { order: 2; }
  .admin-filter > .field:first-of-type { order: 0; }
  .admin-filter > .hint { order: 1; }
}
@media (min-width: 48rem) { .admin-filter { grid-template-columns: minmax(16rem, 2fr) minmax(10rem, 1fr) auto; } }

/* Membres: the import folded behind « Importer la liste » once the list exists */
.import-fold { margin-top: var(--space-6); padding: 0; box-shadow: none; border: 0; background: none; }
.import-fold > summary { list-style: none; cursor: pointer; width: fit-content; }
.import-fold > summary::-webkit-details-marker { display: none; }
.import-fold[open] { padding: var(--space-5); border: 1px solid var(--border); background: var(--surface); }
.import-fold[open] > summary { margin-bottom: var(--space-4); }

/* Admin ride page: the facts first, then the blocking route warning */
.ride-facts-admin { margin-top: var(--space-4); }
.route-block { margin-top: var(--space-5); }
.route-block h2 { font-size: var(--text-lg); color: inherit; }
.route-block .actions { margin-top: var(--space-3); }
/* « Copie le parcours… » belongs to the button above it (critique round 5 P3): tight, not a new paragraph. */
.route-block form > .actions + .hint { margin-top: var(--space-2); }
.route-block form > .actions { margin-bottom: 0; }

/* ACP index: an overdue « À préparer » row is marked by its word; the row keeps its stripes */
.table tr.is-late th[scope="row"] a { color: var(--review-ink); }

/* Journal: details as short French lines */
.journal-details { margin: 0; padding-left: 0; list-style: none; }
.journal-details li + li { margin-top: var(--space-1); }
.journal-details li { min-width: 0; overflow-wrap: anywhere; }  /* a long unbroken name wraps; the page never scrolls sideways (006:FR-005) */

/* Event form: the start time box is short (« 06:00 ») */
.input-time { max-width: 9rem; }

/* Révision « Conformes » (D38, brief revision.md): one white card, a row per envoi, the checkbox and
   its whole label as the target, « Ouvrir » at the end; one primary button under the list. */
.batch { margin-top: var(--space-5); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.batch h2 { font-size: var(--text-xl); }
.batch-list { list-style: none; margin: 0; padding: 0; }
.batch-list > * + * { margin-top: 0; }
.batch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border);
}
.batch-row:first-child { border-top: 0; }
.batch-row input { align-self: start; margin-top: 0.75rem; }
.batch-label { display: grid; gap: 0.125rem; min-height: var(--target); padding: var(--space-2) 0; cursor: pointer; }
.batch-who { font-weight: 500; overflow-wrap: anywhere; }
.batch-what { color: var(--ink-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.batch-row:has(input:not(:checked)) .batch-who { color: var(--ink-muted); font-weight: 400; }
.batch-open { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--space-2); }
.batch .actions { margin-top: var(--space-4); }
.batch .button:disabled { opacity: 0.55; cursor: not-allowed; }
.queue-all { margin-top: var(--space-6); font-size: var(--text-xl); }
.queue-all + .table-wrap { margin-top: var(--space-3); }

/* « À faire »: the route row is a white card; amber only on the word for a ride within 7 days
   (critique round 4 P2: amber means « needs you soon », never weeks ahead) */
.todo-warn { color: var(--review-ink); }
.todo-item-title .status-review { font-size: var(--text-sm); }
/* « 2 cyclistes sans contact d'urgence » on « Prochaine sortie » (critique round 5 P2, safety): the amber
   review badge, as a link to the ride's « Inscrits »; 44 px tall target, underlined like any link. */
.todo-badge-link { display: inline-flex; align-items: center; min-height: 2.75rem; width: fit-content; text-decoration: none; }
.todo-badge-link .status-review { font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 0.2em; }
.todo-badge-link:hover .status-review { text-decoration-thickness: 2px; }

/* Safety (critique round 4 P1): a « Oui » the club could not call reads « Aucun contact d'urgence » */
.inscrits-alert { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.inscrits-alert > * + * { margin-top: 0; }
.inscrits td .status-review { font-size: var(--text-sm); }
.inscrits-site .meta { display: inline-block; margin-left: var(--space-2); }

/* « Membre en règle »: the neutral blue badge with a filled dot, never the homologation green tick */
.status-member::before { background: currentColor; }

/* Révision: the batch confirmation page (no modal, DESIGN.md) and the links after it */
.batch-confirm { margin-top: var(--space-5); }
.batch-row-confirm { grid-template-columns: minmax(0, 1fr) auto; }
.batch-confirm > input[type="hidden"] + .batch-list { margin-top: 0; } /* hidden fields add no gap */
/* « Envoi tardif » stays one badge on one line in the wide queue table */
@media (min-width: 48rem) { .page-admin .table .status-late { white-space: nowrap; } }
.batch-row-confirm .batch-label { cursor: default; }
.batch-confirm .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.batch-done { padding-left: 1.2em; }
.batch-done a { display: inline-flex; align-items: center; min-height: 1.5rem; }

/* Nouvelle sortie, Modifier la sortie: the hint sits right under its label, as under « Date » (round 4 P3) */
.page-admin .field > label + .hint { margin-top: 0; }

/* Ride page: « Voir le parcours … sur Ride with GPS » is at least 24 px tall (WCAG 2.5.8) */
.ride-facts-admin .route-link { display: inline-flex; align-items: center; min-height: 1.5rem; }

/* Réglages: plain checkboxes, applied only by « Enregistrer les réglages » (critique round 3 P3) */
.settings-choices { display: grid; gap: var(--space-2); }

/* ---- integration: admin line on the member Accueil (D35) ---- */
.page > h1 + .home-admin-line { margin-top: var(--space-3); }
.home-admin-line { font-weight: 400; }
.home-admin-line .late-word { color: var(--review-ink); font-weight: 500; }

/* ---- M3 member polish (critique round 2, 2026-11-24) ---- */

/* « Mes résultats » › « À envoyer »: the same rides as « Accueil »'s « Ta trace est attendue » */
.page > h1 + .results-todo { margin-top: var(--space-5); }
.results-todo > h2 { font-size: var(--text-xl); }
.results-todo > h2 + .ride-list { margin-top: var(--space-3); }
.page > .results-todo + .season-panel { margin-top: var(--space-6); }
/* With a ride to send on top, « Ma saison » is a plain ruled section: one card per screen (006:FR-001). */
.season-panel-plain { padding-top: var(--space-5); border-top: 1px solid var(--border); }
.results-todo-ride .ride-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.results-todo-ride .ride-card-foot .hint { flex-basis: 100%; }

/* Native disclosures of the member pages (« Sorties » past seasons, « Mon compte » folds): a drawn
   chevron, a 44 px target, the summary in link blue. */
:is(.season-fold, .compte-fold, .map-fold) > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: var(--target);
  padding: 0.5rem 0;
  list-style: none;
  cursor: pointer;
  color: var(--link);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
:is(.season-fold, .compte-fold, .map-fold) > summary::-webkit-details-marker { display: none; }
:is(.season-fold, .compte-fold, .map-fold) > summary::before {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin: 0 0.75em 0 0.15em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--fast) var(--ease);
}
:is(.season-fold, .compte-fold, .map-fold)[open] > summary::before { transform: rotate(45deg); }
:is(.season-fold, .compte-fold, .map-fold) > summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:is(.season-fold, .compte-fold, .map-fold) > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { :is(.season-fold, .compte-fold, .map-fold) > summary::before { transition: none; } }

/* « Sorties » › « Passées »: earlier seasons folded, « Saison 2025 · 28 sorties » */
.page > .season-fold { margin-top: var(--space-3); border-top: 1px solid var(--border); }
.page > .season-fold:last-of-type { border-bottom: 1px solid var(--border); }
.page > .ride-list + .season-fold { margin-top: var(--space-5); }
.season-fold > summary { font-size: var(--text-lg); color: var(--heading); }
.season-fold > summary::before { color: var(--link); }
.season-fold-count { color: var(--ink-muted); font-weight: 400; font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.season-fold > .ride-list { margin: var(--space-2) 0 var(--space-4); }

/* « Mon compte »: the detail list and the erase section folded; the download stays in view */
.compte-section > p + .compte-fold { margin-top: var(--space-2); }
.compte-fold-body { padding: var(--space-2) 0 var(--space-3); }
.compte-fold-body > * + * { margin-top: var(--space-3); }
.compte-fold-body > .details { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.compte-fold + .actions { margin-top: var(--space-4); }
.compte-erase { padding-top: var(--space-4); border-top: 1px solid var(--border); }
.compte-erase > .compte-fold > summary { color: var(--heading); font-size: var(--text-lg); }
.compte-erase > .compte-fold > summary::before { color: var(--link); }

/* ---- M4 member polish (critique round 3, 2026-11-24) ---- */

/* « Sorties » search: the button says « Chercher », its drawn magnifier before the word */
.button-search { flex: none; gap: var(--space-2); padding-inline: var(--space-4); }
.button-search .icon { display: block; flex: none; width: 1.125rem; height: 1.125rem; }

/* « Mes résultats » › « À envoyer »: one card with the one primary button, then compact rows */
.results-todo > h2 + .results-todo-ride { margin-top: var(--space-3); }
.results-todo-ride + .send-more-title { margin-top: var(--space-5); }
.send-more-title { font-size: var(--text-base); color: var(--heading); }
.send-more-title + .send-rows { margin-top: var(--space-2); }
.send-rows {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.send-rows > li + li { border-top: 1px solid var(--border); margin-top: 0; }
.send-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name send" "when send";
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  align-items: center;
  min-height: var(--target);
  margin: 0;
  padding: var(--space-3) 0;
}
.send-row > .ride-when { grid-area: when; }
.send-row > * + * { margin-top: 0; }
.send-row-name { grid-area: name; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.send-row-send, .send-row-wait { grid-area: send; }
.send-row-send {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.send-row-send:hover { text-decoration-thickness: 2px; }
.send-row-wait { padding-right: var(--space-2); color: var(--ink-muted); font-size: var(--text-sm); text-align: right; }
@media (max-width: 40rem) { .send-row-wait { max-width: 7.5rem; } } /* two short lines on a phone, so the ride's name keeps the room (round 4) */

/* « Ma saison »: what « Série SR » means, one plain line */
.season-panel > .season-sr-hint { margin-top: var(--space-2); }

/* A homologated envoi carries the small green stamp at its top right, as on « Accueil » (D36) */
/* Results are ruled rows, not boxes (D46, spec 006 FR-001) */
a.card.result-card { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: var(--space-4) 0; }
li:first-child > a.card.result-card { border-top: 1px solid var(--border); }
a.card.result-card-stamped { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: start; }
a.card.result-card-stamped > * { grid-column: 1; }
a.card.result-card-stamped > .stamp-homologuee { grid-column: 2; grid-row: 1 / span 3; margin: 0; }

/* « Sorties » › « Passées »: the open season by month, the latest open, earlier months folded */
.month-title { font-size: var(--text-base); color: var(--heading); }
.page > .season-title + .month-title { margin-top: var(--space-3); }
.page > .month-title + .ride-list { margin-top: var(--space-2); }
.page > .ride-list + .month-fold { margin-top: var(--space-4); }
.month-fold > summary { font-size: var(--text-base); }
.month-fold .season-fold-count { font-size: var(--text-sm); }
.page > .month-fold + .season-fold:not(.month-fold) { margin-top: var(--space-6); }

/* No track kept (spec 006 FR-008): the quiet line under « Le parcours », then the route */
section > .empty-line + .svg-map { margin-top: var(--space-3); }

/* Accueil (006:FR-021, US1.9): the top card keeps the neutral frame of every card; the other blocks are one
   ruled row each, a small heading over the ride's name and one text link. */
.home-card > h2 { font-size: var(--text-base); font-weight: 500; }
.home-row-line { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); align-items: baseline; }
.home-row-line > * + * { margin-top: 0; }

/* Envoi page with no kept track (006:FR-024): the reason line, the next file, then the route folded. */
.map-fold { margin-top: var(--space-3); }
.map-fold[open] > summary { margin-bottom: var(--space-3); }
.next-file { margin-top: var(--space-2); }

/* The second line of every ride row (006:FR-025): « sam. 28 nov. » then the « 100 km » chip, and an answer word on Accueil. */
.ride-when { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--ink-muted); font-size: var(--text-sm); font-weight: 400; font-variant-numeric: tabular-nums; }
.ride-when > * + * { margin-top: 0; }
.ride-when time { white-space: nowrap; }
.ride-when .km-chip { color: var(--ink); }

/* One ride-row style (006:FR-025, US1.10): the ride's name is body size, weight 500, in every list and in the
   one card that holds a ride (Sorties, Envoyer, Accueil, « À envoyer »); the card's heading stays the big type. */
.ride-card-title, .ride-row-name { font-size: var(--text-base); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }

/* Spec 006 FR-004 (US1.6): with JavaScript a filter applies at once, so « Afficher » goes. */
form.is-live .live-submit { display: none; }

/* « Décider » under an envoi's title (006:FR-014): one quiet link to the decision card. */
.decide-jump { margin-top: var(--space-2); }
@media (min-width: 64rem) { .decide-jump { display: none; } } /* the card sits beside the title: nothing to jump to */
#decider:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
/* « Ce que le cycliste verra » (006:FR-013): the rider's view, framed plainly inside the decision card. */
.rider-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); }
.rider-preview h3 { font-size: var(--text-base); margin: 0; }
.rider-preview h4 { font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.rider-preview-body p { margin-top: var(--space-1); }

/* Live filters (006:FR-004): while a slow answer comes, the old list dims after a short wait (no flash on a fast one). */
[data-live-region][aria-busy="true"] { opacity: 0.55; transition: opacity 150ms ease-out 250ms; }
@media (prefers-reduced-motion: reduce) { [data-live-region][aria-busy="true"] { transition: none; } }

/* Live filters on a phone (006:FR-004, US1.6): with JavaScript the filters share one row (no « Afficher » to
   reach); the hint and « Tout afficher » sit under it. Without JavaScript the stacked form stays as it was. */
@media (max-width: 47.99rem) {
  form.is-live.filters-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-2); }
  form.is-live.filters-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  form.is-live:is(.filters-2, .filters-3) > .field { order: 0; min-width: 0; }
  form.is-live:is(.filters-2, .filters-3) > .hint { order: 1; grid-column: 1 / -1; }
  form.is-live:is(.filters-2, .filters-3) > .actions { order: 2; grid-column: 1 / -1; }
  form.is-live:is(.filters-2, .filters-3) select { width: 100%; min-width: 0; padding-inline: var(--space-2) var(--space-5); text-overflow: ellipsis; }
  form.is-live:is(.filters-2, .filters-3) input[type="search"] { width: 100%; min-width: 0; }
}

/* ACP sheet: « J'ai envoyé la feuille » and « Envoyée le … par … » (spec 006 US4.2–US4.4). */
.acp-sent { display: grid; gap: var(--space-3); justify-items: start; margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.acp-sent > *, .acp-sent form { margin: 0; }
.acp-sent-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-4); }
.acp-sent-row > * { margin: 0; }

/* Spec 008 US3.3: once a choice is made, only its hint stays, so the « Homologuée » panel fits a
   1280 × 800 window and stays beside the track. Before any choice every hint shows. */
.decision-form .choices:has(input:checked) .choice:not(:has(input:checked)) .hint { display: none; }
/* The optional note is two lines high and grows as it is dragged (resize: vertical), so the panel fits. */
.branch-homologuee textarea { min-height: 4.5rem; }
/* The optional note on « Homologuée » (spec 008 US3.3): folded behind its link, open when it holds text. */
.note-fold[open] > summary { margin-bottom: var(--space-2); }
/* The ride's name leading an ACP row on « À faire » (spec 008 US5.1): a 24 px target (WCAG 2.5.8). */
.todo-item-title > a { display: inline-block; min-height: 1.5rem; line-height: 1.5rem; }
/* Decision-panel fields grow with their text, so nothing in the panel scrolls on its own (spec 008 US3.4,
   007:US1.2); `rows` from fitRows() is the fallback where field-sizing isn't supported. */
.decision-form textarea { field-sizing: content; min-height: 4.5rem; max-height: none; }

/* ---------- Public site (spec 005, brief site-public.md): existing tokens only ---------- */
.site-page { max-width: var(--page-wide); } /* same left edge as the header */
.site-page > * { max-width: 60rem; }
.site-photo { max-width: 60rem; }
.site-text figure { margin-inline: 0; }
.site-page > p:has(> .back) + h1 { margin-top: 0; }
.site-page > .site-top { max-width: none; display: grid; gap: var(--space-6); }
@media (min-width: 64rem) { .site-top:has(.site-photo) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.site-top > * + * { margin-top: 0; }
.site-top section > * + * { margin-top: var(--space-4); }
.site-filters-phone { display: none; }
.site-filters-phone summary { display: flex; align-items: center; min-height: var(--target); width: fit-content; padding: 0 var(--space-4); border: 1.5px solid var(--neutral-line); border-radius: var(--radius-pill); font-size: var(--text-sm); cursor: pointer; }
.site-filters-phone .site-filters { margin-top: var(--space-3); }
@media (max-width: 40rem) { .site-page > .site-filters { display: none; } .site-filters-phone { display: block; } }
.site-page p > a:only-child { display: inline-flex; align-items: center; min-height: var(--target); }
.site-text > * + * { margin-top: var(--space-4); }
.site-text :is(h2, h3) { margin-top: var(--space-6); }
.site-text :is(h2, h3) + * { margin-top: var(--space-3); }
.site-text img, .site-photo img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.site-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4) var(--space-5); align-items: center; }
.site-intro img { display: block; width: 6rem; height: auto; }
.site-intro .site-text { margin-top: var(--space-3); }
.site-page > section, .site-page > .site-text { margin-top: var(--space-6); }
.site-page > section > * + * { margin-top: var(--space-4); }

.site-rides { list-style: none; padding: 0; border-bottom: 1px solid var(--border); }
.site-rides > li { margin: 0; border-top: 1px solid var(--border); }
.site-ride {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) 0;
  color: inherit;
  text-decoration: none;
}
.site-ride:focus-visible { outline-offset: -3px; }
.site-ride-month { font-size: var(--text-sm); color: var(--ink-muted); }
.site-ride-text { display: grid; row-gap: var(--space-1); overflow-wrap: anywhere; }
.site-ride-name { color: var(--link); font-size: var(--text-lg); font-weight: 500; line-height: 1.3; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.site-ride:hover .site-ride-name { text-decoration-thickness: 2px; }
.site-ride-region { color: var(--ink-muted); font-size: var(--text-sm); }

.site-filters { display: grid; gap: var(--space-3); }
.site-filters > * { margin: 0; }
.site-filter { display: grid; gap: var(--space-2); }
.site-filter > span { font-size: var(--text-sm); color: var(--ink-muted); }
@media (min-width: 40.01rem) { .site-filter { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: baseline; } }
@media (max-width: 30rem) {
  .site-ride { grid-template-columns: 5.25rem minmax(0, 1fr); gap: var(--space-3); }
  .site-intro { grid-template-columns: minmax(0, 1fr); }
}

.site-header > .logo { margin-right: auto; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; }
.site-header nav li { margin: 0; }
.site-header nav a, .site-header summary {
  display: flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 var(--space-3);
  color: var(--heading);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.site-header nav a:hover, .site-header summary:hover { background: var(--surface-alt); }
.site-header nav a[aria-current="page"] { font-weight: 500; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.45em; text-decoration-color: var(--link); }
.site-header summary { list-style: none; gap: var(--space-2); }
.site-header summary::-webkit-details-marker { display: none; }
.site-header summary::after { content: ""; width: 0.45em; height: 0.45em; margin-top: -0.2em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.site-header [open] > summary::after { margin-top: 0.2em; transform: rotate(225deg); }
.site-menu-phone summary { width: fit-content; margin-left: auto; border: 1.5px solid var(--neutral-line); border-radius: var(--radius-pill); padding: 0 var(--space-4); }
.site-menu-second, .site-menu-main { display: none; }
.header:has(.site-header) { position: relative; }
.site-header { padding-bottom: var(--space-3); }
.site-menu-phone { margin-left: auto; }
.site-menu-phone details > ul { position: absolute; z-index: 2; inset: 100% 0 auto; padding: var(--space-3) var(--gutter); background: var(--surface); border-block: 1px solid var(--border-strong); }
.site-menu-phone ul ul { padding-left: var(--space-4); }
.site-menu-group { display: block; padding: var(--space-3) var(--space-3) 0; font-size: var(--text-sm); color: var(--ink-muted); }
@media (min-width: 64rem) {
  .site-menu-phone { display: none; }
  .site-menu-second { display: block; }
  .site-menu-second ul, .site-menu-main > ul { display: flex; flex-wrap: wrap; }
  .site-menu-main { display: block; flex-basis: 100%; margin-left: calc(var(--space-3) * -1); }
  .site-menu-main > ul > li { position: relative; }
  .site-menu-main details:has([aria-current]) > summary { font-weight: 500; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.45em; text-decoration-color: var(--link); }
  /* no JavaScript to close it: an open panel steps aside once the keyboard is in the page (WCAG 2.4.11) */
  body:has(main :focus-visible) .site-menu-main details ul { display: none; }
  .site-menu-main details ul { position: absolute; z-index: 2; min-width: 16rem; padding: var(--space-2); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
}

.site-table { max-width: 100%; overflow-x: auto; }
.site-table table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.site-table caption { text-align: left; color: var(--ink-muted); padding-bottom: var(--space-2); }
.site-table :is(th, td) { padding: var(--space-2) var(--space-3) var(--space-2) 0; text-align: left; vertical-align: top; }
.site-table thead :is(th, td) { color: var(--ink-muted); font-weight: 500; border-bottom: 1px solid var(--border-strong); }
.site-table tbody tr { border-bottom: 1px solid var(--border); }
/* Text at 200 % on a phone: the date goes above the name */
@media (max-width: 15rem) { .site-ride { grid-template-columns: minmax(0, 1fr); } .site-ride .ride-date { align-items: flex-start; } }
.site-text .photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: var(--space-4); }
.site-text .photos > * { margin: 0; }
.site-text .photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.site-text figcaption { margin-top: var(--space-2); color: var(--ink-muted); font-size: var(--text-sm); }
.site-map { display: block; width: 100%; height: min(700px, 85vh); border: 1px solid var(--border); border-radius: var(--radius); }
.site-date, .site-text .posts time { color: var(--ink-muted); font-size: var(--text-sm); }
.site-text .posts { list-style: none; padding: 0; border-bottom: 1px solid var(--border); }
.site-text .posts > li { display: grid; row-gap: var(--space-1); margin: 0; padding: var(--space-4) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.site-text .posts a { justify-self: start; font-size: var(--text-lg); font-weight: 500; line-height: 1.3; }
.site-text .posts p { margin: 0; }
