/* Feuille unique de rdv (maquettes design/*.figcraft). Aucune police ni
   ressource externe : CSP `default-src 'none'; style-src 'self'`.
   RDV-94 : couleurs, rayons, tailles de texte, espacements, bordures et
   hauteurs de cible viennent des jetons de `:root` ; les largeurs propres à un
   composant restent à côté de lui. Les `@media` gardent des valeurs écrites
   (les variables y sont interdites).
   RDV-111 : direction « Pierre et encre » (design/rdv-111-fondations.figcraft),
   accent indigo par défaut, thème du consultant ; police Instrument Sans (OFL,
   `instrument-sans-OFL.txt`). Trois variantes de bouton, un style de carte. */
@font-face {
  font-family: "Instrument Sans";
  src: url("instrument-sans.woff2?v=1") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  accent-color: var(--brand);

  /* Couleurs. Contrastes vérifiés par `theme_contrast`
     (server/src/http/appearance_page.rs). */
  /* RDV-126 : neutres de la direction « Galet » (tasks/rdv-125/ui.md §11). */
  --bg: #eef0f3;
  --surface: #fff;
  --surface-2: #f6f7f9;
  --hover: #f1f3f6;
  /* Décor seulement ; les contours de champs prennent `--border-strong` (3:1). */
  --border: #e3e6eb;
  --border-strong: #80858e;
  --ink: #15171c;
  --ink-2: #3e434c;
  --muted: #5f6570;
  --brand: #4b3bd6;
  --brand-dark: #3d2fc0;
  --info-tint: #efedff;
  --on-brand: #fff;
  --warning: #92400e;
  --warning-tint: #fef3e2;
  --error: #c0261b;
  --error-dark: #94190f;
  --error-tint: #fdecea;
  --success: #1e5c35;
  --success-tint: #e3eee5;
  --open: #2f6b47;
  /* Heure actuelle de l'accueil (blanc dessus : 5,62:1). */
  --now: #c62828;
  --focus-color: #15171c;
  /* Bloc de code sombre (14,6:1). */
  --code-bg: #15171c;
  --code-ink: #e8eaee;
  /* RDV-157 : scène sombre de la séance, la même pour tous les thèmes
     (contrastes vérifiés par `stage_contrast`). Rouge de « Quitter » plus
     clair que `--error` : 3:1 sur la barre de commandes. */
  --stage-bg: #0b0e14;
  --stage-surface: #1a1f28;
  --stage-hover: #272d38;
  --stage-video: #161b24;
  --stage-border: #2a303b;
  --stage-line: #8a93a3;
  --stage-ink: #f3f5f8;
  --stage-ink-2: #a3acb9;
  --stage-accent: #8fb4d9;
  --stage-accent-2: #b5cde6;
  --stage-on-accent: #0b0e14;
  --stage-danger: #d93025;
  --stage-on-danger: #fff;
  --stage-success: #6cc994;
  --stage-warning: #e9b65c;
  --stage-error: #f28b80;

  /* Rayons et ombres. */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-card: 24px;
  /* RDV-128 : tuiles de chiffres de l'accueil. */
  --radius-tile: 20px;
  /* Boutons, segments et pastilles. */
  --radius-full: 999px;
  /* Carte posée sur le fond : deux couches, sans trait porteur de sens. */
  --shadow-card: 0 1px 2px rgb(21 23 28 / .04), 0 8px 24px rgb(21 23 28 / .06);
  --shadow-lg: 0 8px 24px rgb(21 23 28 / .12);

  /* Texte : échelle 12/14/15/18/22/30/36 px ; 12 px pour le décor seulement,
     14 px plancher du texte. */
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --step--2: .75rem;
  --step--1: .875rem;
  --step-0: .9375rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.875rem;
  --step-4: 2.25rem;
  --leading: 1.5;
  --leading-tight: 1.3;
  --leading-small: 1.43;

  /* Espacements : base de 4 px. */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 4rem;

  /* Traits, cibles (44 px, 40 px sur ordinateur) et cases. */
  --line: 1px;
  --line-strong: 2px;
  --focus: 3px;
  --bar: 4px;
  --target: 2.75rem;
  --check: 1.5rem;
  --offset: 2px;

  /* Largeurs : texte lisible, page publique, conteneur connecté. */
  --measure: 35rem;
  --page: 48rem;
  --container: 72rem;
  /* RDV-127 : barre latérale ; elle paraît à partir de 64rem (seuil écrit
     dans les `@media`, où les variables sont interdites). */
  --sidebar: 17rem;
}
/* RDV-105, RDV-111 : thème du consultant, sur `<html data-theme>` de son espace
   et de sa page publique. Il ne change que l'accent ; les neutres restent
   communs. RDV-156 : huit thèmes ; « sage » s'affiche Turquoise et « graphite »
   Ardoise (identifiants stockés inchangés). Indigo (« lavender ») par défaut, celui de `:root`. Une carte de la
   page Apparence porte aussi `data-theme` (son aperçu) ; `:has(#theme-…:checked)` :
   la page prend le thème coché avant l'enregistrement, sans JavaScript (règle à
   part : un navigateur sans `:has` ignorerait toute la liste). */
[data-theme="lavender"] { --brand: #4b3bd6; --brand-dark: #3d2fc0; --info-tint: #efedff; }
[data-theme="ocean"] { --brand: #1f5fa8; --brand-dark: #143e6e; --info-tint: #e5effa; }
[data-theme="sage"] { --brand: #0e7490; --brand-dark: #0a5468; --info-tint: #e9f7fb; }
[data-theme="graphite"] { --brand: #334155; --brand-dark: #252f3d; --info-tint: #eff2f5; }
[data-theme="night"] { --brand: #1e1b4b; --brand-dark: #161336; --info-tint: #edecf8; }
[data-theme="plum"] { --brand: #7a2e66; --brand-dark: #55204a; --info-tint: #f7e8f2; }
[data-theme="fuchsia"] { --brand: #a21caf; --brand-dark: #75147e; --info-tint: #fae9fb; }
[data-theme="coral"] { --brand: #b02d5e; --brand-dark: #7b2042; --info-tint: #fbe9f0; }
:root:has(#theme-lavender:checked) { --brand: #4b3bd6; --brand-dark: #3d2fc0; --info-tint: #efedff; }
:root:has(#theme-ocean:checked) { --brand: #1f5fa8; --brand-dark: #143e6e; --info-tint: #e5effa; }
:root:has(#theme-sage:checked) { --brand: #0e7490; --brand-dark: #0a5468; --info-tint: #e9f7fb; }
:root:has(#theme-graphite:checked) { --brand: #334155; --brand-dark: #252f3d; --info-tint: #eff2f5; }
:root:has(#theme-night:checked) { --brand: #1e1b4b; --brand-dark: #161336; --info-tint: #edecf8; }
:root:has(#theme-plum:checked) { --brand: #7a2e66; --brand-dark: #55204a; --info-tint: #f7e8f2; }
:root:has(#theme-fuchsia:checked) { --brand: #a21caf; --brand-dark: #75147e; --info-tint: #fae9fb; }
:root:has(#theme-coral:checked) { --brand: #b02d5e; --brand-dark: #7b2042; --info-tint: #fbe9f0; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  padding: var(--space-8) var(--space-4) var(--space-9);
  background: var(--bg);
  color: var(--ink);
  font: var(--step-0)/var(--leading) var(--font);
}
header { text-align: center; margin-bottom: var(--space-7); }
/* RDV-163 : lien vers l'autre langue, sous le logo ; cible de 24 px au moins (WCAG 2.5.8). */
.lang-switch { display: block; width: fit-content; margin: var(--space-2) auto 0; padding: var(--space-1) var(--space-2); min-height: 24px; }
.brand { display: inline-block; width: 7.5rem; height: auto; }
/* RDV-48 : logo du consultant dans un cadre fixe (taille déclarée, pas de
   décalage au chargement), image contenue sans déformation. */
.consultant-logo { display: inline-block; vertical-align: middle; width: 160px; max-width: 100%; height: auto; aspect-ratio: 10 / 3; object-fit: contain; }
.logo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
/* Fond des pages publiques : l'aperçu montre le logo tel que le client le voit. */
.logo-preview { flex: none; background: var(--bg); border: var(--line) solid var(--border); border-radius: var(--radius-sm); }
/* RDV-111 : un seul style de carte. `main.card` : page publique ; le
   `div.card` de l'espace connecté n'est qu'un conteneur (`.app-main > .card`). */
.card, .type-card, .book-card, .booking-page:has(.type-card) :is(.slots-section, .payment), .booking-page .types, .home-board > :is(.next, .todo, .day-line), .record > section,
.app-main :is(.booking, .booking-line, .steps, .type-rows, .week, .closures, .requests, .embed-section, .plans-wrap) {
  padding: var(--space-6);
  background: var(--surface);
  border: var(--line) solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card { display: block; max-width: var(--measure); margin: 0 auto; }
h1 { margin: 0 0 var(--space-4); font-size: var(--step-3); line-height: var(--leading-tight); letter-spacing: -.02em; }
h2 { margin: 0 0 var(--space-2); font-size: var(--step-2); font-weight: 600; line-height: var(--leading-tight); }
h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--step-0); }
/* Un seul style de titre de carte ; `:where` garde la spécificité de `h2`,
   les règles propres à un bloc (marges, grille) passent devant. */
:where(main.card, .type-card, .slots-section, .home-board > :is(.next, .todo, .day-line), .record > section,
.app-main :is(.booking, .booking-line, .steps, .type-rows, .week, .closures, .requests, .embed-section)) h2 {
  margin: 0 0 var(--space-3); font-size: var(--step-1);
}
p { margin: 0 0 var(--space-4); }
h1, h3, p, a { overflow-wrap: anywhere; }
h2, dd { overflow-wrap: anywhere; }
/* Heures et prix à chasse fixe. */
time, .meta, .chip, .slots > li > span { font-variant-numeric: tabular-nums; }
.intro, .hint, .note { color: var(--muted); }
.intro { color: var(--ink-2); }
.hint, .note { font-size: var(--step--1); line-height: var(--leading-small); margin-bottom: var(--space-2); }
/* Soulignement explicite : en Ardoise ou Nuit, la couleur des liens est proche de l'encre (1.4.1). */
.note a { color: var(--brand-dark); text-decoration: underline; }
/* RDV-139 : aide hors connexion, après un filet, avant la note de confidentialité. */
.help { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--line) solid var(--border); }
.meta { color: var(--muted); font-size: var(--step--1); margin-bottom: var(--space-3); }
.warning { font-size: var(--step--1); font-weight: 600; margin-bottom: var(--space-2); }
[hidden] { display: none !important; }
hr { margin: var(--space-6) 0; border: 0; border-top: var(--line) solid var(--border); }
:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Champs. 16 px : Safari iOS agrandit la page sur un champ plus petit. */
.field { margin: 0 0 var(--space-6); padding: 0; border: 0; min-width: 0; }
.field > label, legend { display: block; margin-bottom: var(--space-2); padding: 0; font-weight: 600; }
.field-error { border-left: var(--bar) solid var(--error); padding-left: var(--space-4); }
input[type="text"], input[type="email"], input[type="url"], input[type="date"], input[type="search"], textarea, select {
  min-height: var(--target);
  padding: var(--space-2) var(--space-3);
  border: var(--line) solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
input[type="text"], input[type="email"], input[type="url"], textarea { display: block; width: 100%; }
select { max-width: 100%; }
textarea { resize: vertical; }
/* RDV-116 : bloc de code sombre, non redimensionnable ; hauteur au contenu
   là où `field-sizing` existe, sinon `rows` et défilement. Bordure
   transparente : visible en contraste forcé. */
textarea.code {
  padding: var(--space-4) var(--space-5);
  border-color: transparent;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-code);
  font-size: var(--step--1);
  line-height: 1.6;
  resize: none;
  field-sizing: content;
  overflow-wrap: anywhere;
}
input.short { max-width: 12.5rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border: var(--line-strong) solid var(--error); }
.error { color: var(--error); font-size: var(--step--1); font-weight: 600; margin-bottom: var(--space-2); }
.radio, .check { display: flex; align-items: center; gap: var(--space-3); min-height: var(--target); }
.radio input, .check input { width: var(--check); height: var(--check); margin: 0; }
.radio label { flex: 1; padding: var(--space-2) 0; }
.check { margin-top: var(--space-2); }
/* RDV-26 : aide d'un choix, sous son libellé (case + écart). */
.radio-hint { margin: calc(-1 * var(--space-1)) 0 var(--space-3) calc(var(--check) + var(--space-3)); }
input[type="file"] { max-width: 100%; font: inherit; }
/* Aspect du bouton secondaire (pseudo-élément à part : une liste avec lui
   serait ignorée en entier par un navigateur qui ne le connaît pas). */
input[type="file"]::file-selector-button {
  min-height: var(--target); margin-right: var(--space-3); padding: 0 var(--space-4);
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
form + p, #passkey + p { margin-top: var(--space-4); }
/* RDV-93 : cérémonie en cours, le bouton garde le focus mais se montre inactif. */
#passkey-button[aria-disabled="true"] { background: var(--surface-2); border-color: var(--border); color: var(--muted); cursor: progress; }
form + .field { margin-top: var(--space-6); }
fieldset.field { min-width: 0; }

/* RDV-111 : trois variantes de bouton, une règle pour `button` et `a.button`.
   Primaire (défaut), `.secondary`,
   `.ghost`. `.danger` ne fait que teinter le primaire en rouge :
   réservé au bouton final d'une confirmation (le bouton qui l'ouvre reste secondaire).
   RDV-126 : en pilule. */
button, a.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--target);
  padding: var(--space-2) var(--space-5);
  border: var(--line) solid var(--brand);
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  line-height: var(--leading-tight);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
:is(button, a.button):hover { background: var(--brand-dark); border-color: var(--brand-dark); }
:is(button, a.button).danger { background: var(--error); border-color: var(--error); }
:is(button, a.button).danger:hover { background: var(--error-dark); border-color: var(--error-dark); }
:is(button, a.button).secondary {
  border: var(--line) solid var(--border-strong); background: var(--surface); color: var(--ink);
}
:is(button, a.button).secondary:hover { background: var(--hover); }
/* Bordure transparente : le contour revient en contraste forcé. */
:is(button, a.button).ghost { width: auto; border-color: transparent; background: none; color: var(--ink-2); }
:is(button, a.button).ghost:hover { background: var(--hover); }
/* RDV-118 : hauteur de cible (38,5 px avant), texte centré ; sans l'unité
   `lh`, le rembourrage de 8 px reste. */
a.link {
  display: inline-block; padding: var(--space-2) 0;
  padding-block: max(var(--space-2), (var(--target) - 1lh) / 2);
  color: var(--brand-dark); text-decoration: underline; text-underline-offset: var(--offset);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
.actions form { margin: 0; }

/* RDV-105 : page Apparence. Une carte par thème, le libellé entier est la
   cible du radio ; l'aperçu (décoratif) prend les couleurs de la carte. */
.crumb { margin: 0; }
.crumb + h1 { margin-top: 0; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: var(--space-4); }
.theme-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-3);
  border: var(--line) solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.theme-card:hover { border-color: var(--brand); }
/* RDV-133 : thème choisi, bordure 2 px à l'encre (a11y §6), pas l'accent seul. */
.theme-card:has(input:checked) { border: var(--line-strong) solid var(--ink); padding: calc(var(--space-3) - var(--line)); }
/* RDV-154 : anneau de la carte pour son radio seul ; le champ couleur garde le sien. */
.theme-card:has(.theme-name input:focus-visible) { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
/* RDV-118 : sans `:has`, l'anneau reste sur la case. */
@supports selector(:has(*)) { .theme-card .theme-name input:focus-visible { outline: none; } }
/* RDV-140 : 1re ligne en haut, même avec la mention dessous : noms alignés d'une carte à l'autre. */
.theme-name { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: var(--space-1) var(--space-3); min-height: var(--target); font-weight: 600; }
.theme-name input { flex: none; width: var(--check); height: var(--check); margin: 0; }
.theme-name .hint { margin: 0; font-weight: 400; }
legend + .hint { margin-top: calc(-1 * var(--space-1)); margin-bottom: var(--space-3); }
/* RDV-133 : aperçu en deux pastilles, l'accent et sa teinte (maquette « Galet »). */
.theme-preview { display: flex; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius); background: var(--surface-2); }
.theme-preview > span { width: 1.5rem; height: 1.5rem; border-radius: var(--radius-full); }
.tp-brand { background: var(--brand); }
.tp-tint { background: var(--info-tint); }
/* RDV-154 : carte « Couleur personnalisée », sur toute la largeur de la grille ;
   un `div` à deux champs, cliquable sur son nom seul. Le champ couleur ne paraît
   qu'avec son radio coché (sans `:has`, il reste visible). Ses couleurs viennent
   de `/static/theme/rrggbb.css`, jamais d'un style en ligne. */
.theme-custom { grid-column: 1 / -1; cursor: auto; }
.theme-custom:hover { border-color: var(--border-strong); }
.theme-custom .theme-name { cursor: pointer; }
.theme-colour { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.theme-colour > label { font-weight: 600; }
.theme-colour > p { margin: 0; }
/* Cible de 44 px, bord 3:1 (WCAG 1.4.11, 2.5.8). */
.theme-colour input[type="color"] {
  inline-size: var(--target); block-size: var(--target); padding: var(--space-1);
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
@supports selector(:has(*)) { .theme-custom:not(:has(#theme-custom:checked)) .theme-colour { display: none; } }
form .actions { align-items: center; gap: var(--space-5); }

/* Encadrés : un seul composant ; chaque variante ne fixe que `--tone*`. */
.notice, .alert, .error-summary, .notice-row, .page-status {
  --tone: var(--success);
  --tone-tint: var(--success-tint);
  --tone-ink: var(--success);
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--line) solid transparent;
  border-radius: var(--radius);
  background: var(--tone-tint);
  color: var(--tone-ink);
  overflow-wrap: anywhere;
}
/* RDV-198 : l'information neutre sur une surface neutre ; la teinte du thème
   reste à la sélection, les tons d'état aux alertes (icône et bord en plus). */
.notice.info, .notice-row, .page-status {
  --tone: var(--brand); --tone-tint: var(--surface-2); --tone-ink: var(--ink); border-color: var(--border);
}
.notice.info a { color: var(--brand-dark); }
/* Icône d'état, non lue (texte de remplacement vide). */
:is(.notice, .alert)::before, .error-summary h2::before, .error-summary h4::before {
  content: "\2713"; content: "\2713" / ""; margin-right: var(--space-2); font-weight: 700;
}
:is(.notice.info, .notice-row .notice)::before { content: "\24D8"; content: "\24D8" / ""; }
/* RDV-117 : avis d'alerte, ton d'alerte et icône. */
.notice.warn { --tone: var(--warning); --tone-tint: var(--warning-tint); --tone-ink: var(--warning); border-color: var(--warning); }
.notice.warn::before { content: "\26A0"; content: "\26A0" / ""; }
.notice { text-wrap: pretty; }
:is(.alert, .error-summary :is(h2, h4))::before { content: "\26A0"; content: "\26A0" / ""; }
.alert, .error-summary {
  --tone: var(--error); --tone-tint: var(--error-tint); --tone-ink: var(--error-dark);
}
/* RDV-198 : un état réussi garde son fond de ton, sans le bord des neutres. */
.page-status.ready {
  --tone: var(--success); --tone-tint: var(--success-tint); --tone-ink: var(--success); border-color: transparent;
}
/* RDV-84 : message ciblé au chargement, contour de focus fixe. */
:is(.notice, .alert, .error-summary):focus-visible { outline-color: var(--focus-color); }
/* RDV-118 : alerte vide sans `display: none`, sinon le texte inséré plus
   tard n'est pas toujours annoncé (4.1.3) ; boîte sans hauteur ni icône. */
:is(.alert, .session .notice):empty { margin: 0; padding: 0; border: 0; }
:is(.alert, .session .notice):empty::before { content: none; }
.error-summary { margin-bottom: var(--space-6); }
.error-summary ul { margin: 0; padding-left: var(--space-5); }
/* RDV-118 : liens écartés de 8 px, cercles de 24 px disjoints (2.5.8). */
.error-summary li + li { margin-top: var(--space-2); }
:is(.error-summary, .notice) a { color: var(--tone-ink); }
.page-status { font-weight: 600; }
/* Dans `.booking`, plus fort que `.booking p`. */
.booking .page-status { margin: var(--space-2) 0 var(--space-4); }
/* RDV-88 : avis avec action (« Rétablir la plage ») ; le texte prend l'encre de la ligne. */
.notice-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.notice-row .notice {
  --tone: inherit;
  flex: 1 1 16rem; margin: 0; padding: 0; border: 0; background: none; color: var(--ink);
}
.notice-row form { margin: 0; }
/* Un seul contour : celui de la bande, pas celui du texte ciblé. */
.notice-row:has(.notice:focus-visible) { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
@supports selector(:has(*)) { .notice-row .notice:focus-visible { outline: none; } }
.notice .offset { color: inherit; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: var(--radius-full);
  background: var(--success-tint); color: var(--success);
  font-size: var(--step-2); font-weight: 700;
}

/* Encadré du choix (surface neutre bordée, pas une carte, RDV-198) ; les autres blocs sont des cartes. */
.chosen, .booking, .booking-line, .steps { margin: var(--space-4) 0; }
.chosen {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: var(--space-1) var(--space-4); margin-top: 0; padding: var(--space-3) var(--space-4);
  border: var(--line) solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.chosen p { margin: 0; font-weight: 600; }
.chosen .link { font-weight: 400; }
.chosen .description { flex-basis: 100%; font-weight: 400; white-space: pre-wrap; }
.chosen .zone { font-weight: 400; }
/* RDV-23 : récapitulatif de la demande, une ligne par information. */
.chosen.recap { flex-direction: column; align-items: flex-start; }
.chosen.recap p { overflow-wrap: anywhere; }
.booking p { margin: 0; }
.booking label { display: block; margin-bottom: var(--space-2); font-size: var(--step--1); font-weight: 600; }
.booking input.url { -webkit-user-select: all; user-select: all; }
.booking .hint { margin: var(--space-2) 0; }
/* RDV-101 : champ du lien et bouton de copie ; le bouton passe dessous sur un écran étroit. */
.copy { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); }
.copy .url { flex: 1 1 16rem; min-width: 0; }
/* RDV-116 : lien entier lisible à 320 px (passe à la ligne). */
.copy textarea.url { resize: none; field-sizing: content; overflow-wrap: anywhere; }
/* RDV-116 : statut jamais masqué (une région qui apparaît n'est pas toujours
   annoncée) ; vide, il ne prend pas de place. Icône non lue, pas la couleur seule. */
.copy-status { margin: 0; font-weight: 600; color: var(--success); }
.copy-status[data-state="done"]::before { content: "\2713"; content: "\2713" / ""; margin-right: var(--space-2); }
.copy-status[data-state="failed"] { color: var(--error-dark); }
.copy-status[data-state="failed"]::before { content: "\26A0"; content: "\26A0" / ""; margin-right: var(--space-2); }
/* RDV-116 : page Intégrer. Libellé, statut et bouton sur une ligne ; aperçu
   et code côte à côte sur grand écran. */
.embed-section { margin: 0 0 var(--space-6); }
.embed-section > .intro { max-width: var(--page); }
.copy-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.copy-head > label { flex: 1 1 auto; margin: 0; font-weight: 600; }
.embed-pair { display: grid; gap: var(--space-6); align-items: start; }
.embed-pair > * { min-width: 0; margin: 0; }
.preview-title { margin: 0 0 var(--space-2); font-weight: 600; }
.preview-window { border: var(--line) solid var(--border-strong); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); }
.preview-bar { margin: 0; padding: var(--space-2) var(--space-3); border-bottom: var(--line) solid var(--border); background: var(--hover); color: var(--muted); font-size: var(--step--1); }
/* RDV-204 : l'aperçu rend comme une page HTML sans style (fond, police et
   couleur de lien par défaut du navigateur), quel que soit le thème. */
.preview-site { padding: var(--space-5); color-scheme: light; background: Canvas; color: CanvasText; font: medium serif; }
/* RDV-134 : lien inerte de l'aperçu (sans `href`), dessiné comme un lien. */
.preview-link { color: LinkText; text-decoration: underline; cursor: default; }
/* Code du cadre sur toute la carte, comme la maquette : moins de lignes coupées
   (spécificité au-dessus de `.app-main .field`). */
.embed-section > form + .code-field { margin-top: var(--space-7); max-width: none; }
.embed-section > :is(.field:last-child, .code-field) { margin-bottom: 0; }
/* Lien de la page : le titre de la carte est le libellé de la zone. */
.embed-section > h2 > label { display: block; }
.embed-section > .copy + .hint { margin: var(--space-2) 0 0; }
/* Adresses longues (domaine propre, formule Signature) : toute la carte. */
.embed-section .field:has(> .copy) { max-width: none; }
.copy > .copy-status { align-self: center; }
/* Sans `field-sizing`, deux lignes visibles : la fin de l'adresse (`?type=`) reste lisible. */
@supports not (field-sizing: content) {
  .copy textarea.url { min-height: calc(2lh + 2 * var(--space-2) + 2 * var(--line)); }
}
@media (width >= 64rem) {
  .embed-pair { grid-template-columns: 1fr 1fr; }
}
@media (width < 30rem) {
  .embed-section { padding: var(--space-4); }
  /* Bouton compact, à côté de son libellé ; le statut passe dessous sans le déplacer. */
  :is(.copy-head, .copy) > button { width: auto; }
  .copy-head > .copy-status { flex-basis: 100%; order: 3; }
}

/* RDV-16 à RDV-18 : pages publiques du compte. */
.terms { white-space: pre-wrap; }
dl { margin: 0 0 var(--space-4); }
dl > div { margin-bottom: var(--space-2); }
dt { display: inline; font-weight: 600; }
dt::after { content: "\00a0: "; content: "\00a0: " / ""; }
dd { display: inline; margin: 0; }
dd.activity { white-space: pre-line; }

/* RDV-17 : examen des demandes ; RDV-85 : listes des types et des jours. */
.card:has(.requests) { max-width: var(--page); }
.requests, .type-rows, .day-list { margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.requests > li { padding: var(--space-6) 0; border-top: var(--line) solid var(--border); }
.requests h2 { margin-bottom: var(--space-1); }

/* RDV-20, RDV-88, RDV-102 : disponibilités. Champs côte à côte qui passent à
   la ligne (1.4.10) ; semaine en grille (jour | plages, ajout) à partir
   de 48rem, empilée en dessous (reflux 320 px). RDV-117 : plages en pastilles
   « 09:00 – 12:00 » ; barre horaire retirée. RDV-132 (« Galet ») : pastille.
   RDV-198 : pastille neutre (`--hover`, comme `.pill.neutral`).
   RDV-199 : « Retirer » en texte souligné comme « Modifier » (même poids), cibles
   de 44 px de haut espacées de 12 px (2.5.8) ; une seule copie par semaine. */
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); }
.inline > .field { margin-bottom: 0; }
.slots { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
/* Bordure transparente : elle revient en contraste forcé ; pas d'`overflow: hidden`,
   qui couperait le contour de focus. Passe à la ligne à 320 px (1.4.10). */
.slots > li {
  display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-3);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-4); border: var(--line) solid transparent;
  border-radius: var(--radius-full); background: var(--hover); color: var(--ink);
}
.slots > li > span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slots form { display: flex; margin: 0; }
/* Plus fort que `button { width: 100% }` sous 30rem : le bouton garde sa largeur. */
.slots button.remove {
  width: auto; min-height: var(--target); padding: 0 var(--space-1);
  color: var(--brand-dark); font-weight: 400;
  text-decoration: underline; text-underline-offset: var(--offset);
}
.slots button.remove:hover { background: none; color: var(--error-dark); text-decoration-thickness: 2px; }
.day-actions { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--space-4); }
.day-actions .add-day[open] { flex: 1 1 100%; }
/* RDV-199 : copie en tête de semaine, liste et bouton secondaire. */
.copy-day { margin: 0 0 var(--space-4); }
.copy-day select { min-width: 7rem; min-height: var(--target); }
/* « Ajouter une plage » : `<summary>` en bouton texte, sans `display:flex` (rôle gardé). */
.add-day > summary {
  display: inline-block; min-height: var(--target); padding: var(--space-2) 0;
  color: var(--brand-dark); font-weight: 600; list-style: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: var(--offset);
}
.add-day > summary::-webkit-details-marker { display: none; }
.add-day > summary::before { content: "+" / ""; display: inline-block; width: 1em; text-decoration: none; }
.add-day[open] > summary::before { content: "\2304" / ""; }
:is(.add-day, .edit-slot) form { margin: var(--space-1) 0 var(--space-2); padding: var(--space-4); border-radius: var(--radius); background: var(--surface-2); }
:is(.add-day, .edit-slot) fieldset { margin: 0; }
/* RDV-95 : groupes « Jours » et « Heures », puis le bouton. */
:is(.add-day, .edit-slot) fieldset + :is(fieldset, .inline) { margin-top: var(--space-4); }
.add-day .setup-day-list { margin-top: var(--space-2); }
:is(.add-day, .edit-slot) legend { margin-bottom: var(--space-3); }
:is(.add-day, .edit-slot) select { min-width: 7rem; }
:is(.add-day, .edit-slot) .inline :is(select, button) { min-height: var(--target); }
:is(.add-day, .edit-slot) a.link { display: inline-flex; align-items: center; min-height: var(--target); padding: 0; }
:is(.add-day, .edit-slot) .field > .error { margin: var(--space-2) 0 0; }
:is(.add-day, .edit-slot) .hint { margin: var(--space-3) 0 0; }
/* RDV-189 (DIS-2) : « Modifier » dans la pastille, en lien texte ; ouvert, la
   pastille prend la ligne, le formulaire passe dessous sur fond blanc et le
   bouton « Retirer » se cache (Annuler reste). */
.edit-slot > summary {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--space-1);
  color: var(--brand-dark); list-style: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: var(--offset);
}
.edit-slot > summary::-webkit-details-marker { display: none; }
.edit-slot[open] > summary::before { content: "\2304" / ""; display: inline-block; width: 1em; text-decoration: none; }
.slots .edit-slot form { display: block; background: var(--surface); }
.slots > li:has(> .edit-slot[open]) {
  flex: 1 1 100%; flex-wrap: wrap; align-items: flex-start;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
}
.slots > li:has(> .edit-slot[open]) > span { flex: 1 1 100%; }
.slots > li > .edit-slot[open] { flex: 1 1 100%; }
.slots > li:has(> .edit-slot[open]) > form { display: none; }
.day-list > li { padding: var(--space-3) 0; border-top: var(--line) solid var(--border); }
.day-list > li > p { margin: 0; }
.day-list h3 { margin: 0 0 var(--space-2); font-size: var(--step-0); }
.week > .hint, .closures > .hint { margin-bottom: var(--space-2); }

/* RDV-117 (RDV-104) : fermetures. Une ligne par fermeture, les rendez-vous pris
   pendant elle en encadré d'alerte (bordure transparente : visible en contraste forcé). */
.closures { margin-top: var(--space-6); }
.closure-list { margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.closure-list > li { padding: var(--space-3) 0; border-top: var(--line) solid var(--border); }
/* « Retirer » à droite du titre ; dessous quand le titre n'a plus 16rem (RDV-132, maquette 390). */
.closure-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.closure-head p { flex: 1 1 16rem; min-width: 0; margin: 0; }
.closure-head form { flex: none; margin: 0; }
:is(.closure-head, .closure-list) .meta { display: block; color: var(--muted); font-size: var(--step--1); }
.closure-warning {
  margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border: var(--line) solid transparent; border-left: var(--bar) solid var(--warning);
  border-radius: var(--radius); background: var(--warning-tint);
}
.closure-warning > p { margin: 0 0 var(--space-2); color: var(--warning); font-weight: 600; scroll-margin-top: var(--space-4); }
.closure-warning > p::before { content: "\26A0"; content: "\26A0" / ""; margin-right: var(--space-2); }
.closure-warning ul { margin: 0; padding: 0; list-style: none; }
.closure-warning li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); }
.closure-warning a.link { color: var(--brand-dark); }
/* RDV-198 : « À confirmer » comme `.pill.request` (bord pointillé), sur le blanc. */
.tag {
  padding: 0 var(--space-2); border: var(--line) dashed var(--ink-2); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink-2); font-size: var(--step--1); font-weight: 600;
}
.closure-form { padding: var(--space-4); border-radius: var(--radius); background: var(--surface-2); }
.closure-form fieldset.field { margin: 0; max-width: none; }
.closure-form .hint { margin-bottom: var(--space-3); }
.closure-form input[type="date"] { width: 100%; min-width: 0; max-width: 12rem; }
.closure-form .inline > .field { flex: 0 1 14rem; }
/* Une erreur sous un champ ne décale pas l'autre : haut aligné, bouton au niveau des champs. */
.closure-form .inline { align-items: flex-start; }
.closure-form .inline > button { margin-top: calc(var(--leading) * 1em + var(--space-2)); }
/* RDV-132 : seul bouton plein de l'écran, « + » comme la maquette (non lu). */
.closure-form .inline > button::before { content: "+"; content: "+" / ""; margin-right: var(--space-2); }
.closure-form .field-error { padding-left: var(--space-3); }
/* RDV-40 : formulaire de l'export CSV, celui des fermetures sans le « + ». */
.export-form { margin-top: var(--space-4); }
.export-form .inline > button::before { content: none; }
.zone { margin-bottom: var(--space-6); color: var(--ink-2); }
/* RDV-132 : lien sous le fuseau (maquette). */
.zone .link { display: table; }
#fuseau:focus { outline: none; }

/* RDV-22, RDV-82 : page publique de réservation. La description d'un type
   reste hors du lien, 2 lignes au plus ; le lien couvre la ligne (::after).
   RDV-150 : liste en carte sous le consultant, posé sur le fond comme à
   l'étape 2 ; nom à l'encre, prix détaché, chevron : signe d'action visible
   sans survol ni couleur seule (1.4.1). Texte à 24 px du bord (8 + 16). */
.card:has(.types, .slots-section) { max-width: var(--page); }
.booking-page:has(.types) { padding: 0; background: none; border: 0; box-shadow: none; }
.owner > div { min-width: 0; }
.booking-page .types { margin: 0; padding: var(--space-2); list-style: none; }
.types li {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  column-gap: var(--space-4); padding-inline: var(--space-4); border-radius: var(--radius);
}
.types li > :not(.chevron) { grid-column: 1; }
/* Filet entre deux lignes, droit malgré les coins arrondis du survol. */
.types li + li::before { content: ""; position: absolute; inset: 0 var(--space-4) auto; border-top: var(--line) solid var(--border); }
.types a {
  display: flex; flex-direction: column; justify-content: center; min-height: var(--target);
  padding-block: var(--space-3); color: var(--ink); text-decoration: none;
}
.types .name { font-size: var(--step-1); font-weight: 600; line-height: var(--leading-tight); }
/* RDV-197 : date de début d'un type à venir, comme sa ligne de détails. */
.types :is(.meta, .from) { margin: var(--space-1) 0 0; font-size: var(--step-0); color: var(--ink-2); }
.types .price { font-weight: 600; color: var(--ink); white-space: nowrap; }
.types .chevron {
  grid-column: 2; grid-row: 1 / span 2; color: var(--brand-dark);
  font-size: var(--step-2); font-weight: 600; line-height: 1;
}
.types a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
/* Survol sur appareil à pointeur seulement : il resterait collé après un appui. */
@media (hover: hover) {
  .types li:has(a:hover) { background: var(--bg); }
  .types a:hover .name { text-decoration: underline; text-underline-offset: var(--offset); }
}
.types li:has(a:active) { background: var(--border); }
/* Anneau du produit autour de la ligne entière, au-dessus de la ligne suivante. */
.types li:has(a:focus-visible) { z-index: 1; }
.types a:focus-visible { outline: none; }
.types a:focus-visible .name { text-decoration: underline; text-underline-offset: var(--offset); }
.types a:focus-visible::after { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
.types .description {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; margin: calc(-1 * var(--space-2)) 0 0; font-size: var(--step--1); color: var(--muted);
}
/* Espace bas sur la ligne : un padding sous le texte coupé laisserait voir la 3e ligne. */
.types li:has(.description) { padding-bottom: var(--space-3); }
.slots-section, .payment, .manage-change { padding-top: var(--space-6); border-top: var(--line) solid var(--border); }
.payment { margin-bottom: var(--space-6); }
/* RDV-151 : heures du jour choisi, action principale : pilules bordées comme
   les boutons secondaires (contour 3,7:1), texte de 18 px. */
.times {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(6.5rem, 100%), 1fr)); gap: var(--space-2);
  margin: 0; padding: 0; list-style: none;
}
.chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--target);
  padding: var(--space-1) var(--space-3); border: var(--line) solid var(--border-strong); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink); font-size: var(--step-1); font-weight: 600; line-height: var(--leading-tight);
  text-align: center; text-decoration: none; overflow-wrap: anywhere;
}
/* Survol : contour à l'accent ; le fond plein reste au jour choisi. */
.chip:hover { background: var(--hover); box-shadow: inset 0 0 0 var(--line-strong) var(--brand); }
/* Heure du visiteur, ajoutée par `slots.js`. */
.chip .local { font-size: var(--step--1); font-weight: 400; }
/* RDV-151 : liens de période sous les heures, en liens soulignés pour ne pas
   ressembler à une heure ; « suivants » à droite. */
.periods { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-4); margin: var(--space-4) 0 0; }
.periods .next { margin-left: auto; }
/* RDV-91 : décalage UTC du fuseau, insécable et marqué. */
.offset { white-space: nowrap; font-weight: 600; color: var(--ink); }
h3 .hint { font-size: var(--step--1); font-weight: 400; }
h3 .hint .offset { font-weight: inherit; color: inherit; }
.owner { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.owner h1 { margin: 0; }
.owner .intro { margin: var(--space-1) 0 0; }

/* RDV-103 : créneaux d'un type. Consultant sur le fond, puis deux panneaux
   (type, créneaux) ; jours en colonnes alignées, repliés dans un cadre étroit
   (requête de conteneur, RDV-24). */
span.owner-photo {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--info-tint); color: var(--brand-dark); font-size: var(--step-1); font-weight: 700;
}
.booking-page:is(:has(.type-card), :has(.book-card)) { max-width: var(--page); padding: 0; background: none; border: 0; box-shadow: none; }
/* RDV-190 (PUB-1) : formulaire en carte sous l'en-tête des étapes 1 et 2 ;
   contenu à la largeur de lecture, un seul bord droit. */
.book-card > * { max-width: var(--measure); }
/* PUB-2 : règle du formulaire entier, à l'écart d'un champ de l'aide du premier. */
.book-card > form > .hint:first-child { margin-bottom: var(--space-6); }
.type-card, .booking-page:has(.type-card) :is(.slots-section, .payment) { margin-bottom: var(--space-4); }
.type-card { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--space-4); align-items: baseline; }
.type-card > * { grid-column: 1 / -1; }
.type-card h2 { grid-column: 1; margin-bottom: var(--space-1); }
.type-card .change { grid-column: 2; grid-row: 1; margin: 0; }
.type-card .meta { margin-bottom: var(--space-2); }
.type-card .description { margin-bottom: 0; white-space: pre-wrap; }
.type-card .from:last-child { margin-bottom: 0; }
/* RDV-151 : carte du paiement, après les créneaux. */
.booking-page:has(.type-card) .payment .note { margin-bottom: 0; }
/* RDV-112 : période, fuseau, bande des 7 jours, heures ; RDV-151 : liens de période. */
.slots-section { container-type: inline-size; }
.slots-section > h2 { text-wrap: balance; }
.slots-section > .zone-line { margin-bottom: var(--space-2); }
.slots-section > .local-zone { margin-bottom: var(--space-2); }
/* Ancres des liens sans JavaScript : un peu d'air au-dessus du titre visé. */
#slots-title, #day-title { scroll-margin-top: var(--space-4); }
/* RDV-140 : l'accueil porte aussi un `#day-title`, premier titre de sa carte. */
.slots-section #day-title { margin: var(--space-5) 0 var(--space-3); }
/* RDV-151 : titre du jour au moins aussi grand que les heures. */
.slots-section h3#day-title { font-size: var(--step-1); font-weight: 600; }
/* Le cadre d'une page intégrée (RDV-24) est la fenêtre : une requête de média suffit. */
@media (width < 40rem) {
  .type-card { grid-template-columns: 1fr; }
  .type-card .change { grid-column: 1; grid-row: auto; margin-top: var(--space-2); }
}
/* Bande (RDV-149) : 7 colonnes égales si 7 cases de 3rem (« Aucun » en
   14 px) tiennent, sinon 4 puis 3 : aucun jour seul sur sa rangée. Le seuil
   en rem suit la taille de texte du navigateur ; en dessous de 4 cases (gros
   zoom sur téléphone), autant de colonnes que la place le permet (1.4.10),
   un jour pouvant alors rester seul sur la dernière rangée.
   Jour libre : lien ; jour choisi : plein, à l'accent ; jour sans créneau :
   fond gris, quel qu'en soit le motif. L'état est toujours écrit (1.4.1). */
.strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr)); gap: var(--space-2);
  margin: 0; padding: 0; list-style: none;
}
@container (width >= 13.5rem) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (width >= 24rem) { .strip { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.strip :where(a, span.none) {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
  min-height: var(--target); padding: var(--space-2) .125rem; border: var(--line) solid transparent;
  border-radius: var(--radius); min-width: 0; color: var(--muted); line-height: var(--leading-tight); text-align: center;
  text-decoration: none; overflow-wrap: anywhere;
}
.strip :is(.weekday, .state) { font-size: var(--step--1); }
.strip .date { font-size: var(--step-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.strip a { border-color: var(--border-strong); background: var(--surface); color: var(--ink); }
.strip a .date { font-weight: 700; }
.strip a :is(.weekday, .state) { color: var(--ink-2); }
.strip a:hover { background: var(--hover); }
.strip a[aria-current] { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.strip a[aria-current] :is(.weekday, .state) { color: var(--on-brand); }
.strip span.none { background: var(--hover); }
.strip + .empty { margin-top: var(--space-5); }
.periods .next::after { content: "\00a0\203A"; content: "\00a0\203A" / ""; }
.periods a:not(.next)::before { content: "\2039\00a0"; content: "\2039\00a0" / ""; }
.empty { font-weight: 600; color: var(--ink); }
.via { margin-top: var(--space-6); text-align: center; color: var(--muted); font-size: var(--step--1); }
.via p { margin: 0; }

/* RDV-172 : informations légales repliées en fin de page, conditions de vente
   du formulaire (maquette `design/rdv-172-infos-legales.figcraft`). Textes du
   consultant : retours à la ligne gardés, adresses longues coupées (320 px). */
.booking-page > details.legal, .sales-terms { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--line) solid var(--border); }
/* RDV-187 (TR-3) : soulignés en permanence, comme tout lien (1.4.1, G183). */
:is(details.legal, .terms-text) > summary {
  display: list-item; min-height: var(--target); padding-block: var(--space-2);
  color: var(--brand-dark); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: var(--offset);
}
:is(details.legal, .terms-text) > summary:hover { text-decoration-thickness: 2px; }
details.legal dl { display: grid; gap: var(--space-3); margin: var(--space-2) 0 0; font-size: var(--step--1); }
details.legal dl > div { margin: 0; }
/* Terme au-dessus de sa valeur : adresses sur plusieurs lignes (maquette). */
details.legal dt { display: block; color: var(--muted); }
details.legal dt::after { content: none; }
details.legal dd { display: block; }
details.legal dd, .terms-text .terms { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.terms-text .terms { margin-top: var(--space-2); }
.sales-terms > .field { margin-top: var(--space-4); }
/* Pages sans carte (types, créneaux) : le bloc prend l'aspect d'une carte. */
.booking-page:is(:has(.type-card), :has(.types), :has(.book-card)) > details.legal {
  padding: var(--space-4) var(--space-6); background: var(--surface);
  border: var(--line) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card);
}

/* RDV-85 : photo du consultant (Réglages, page de réservation). */
.photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.photo-preview, .owner-photo { display: block; flex: none; width: 4rem; height: 4rem; border-radius: var(--radius-full); object-fit: cover; }

/* RDV-86 : étapes de l'accueil. */
.steps ul { margin: 0; padding: 0; list-style: none; }
/* RDV-186 (AUJ-1) : pastille et lien toujours sur la même ligne, le lien passe à la ligne dans sa colonne. */
.steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; }
.step {
  min-width: 6rem; padding: var(--space-1) var(--space-3); border: var(--line) solid transparent; border-radius: var(--radius-full);
  font-size: var(--step--1); font-weight: 600; text-align: center; white-space: nowrap;
}
.done .step { background: var(--success-tint); color: var(--success); }
/* RDV-186 (AUJ-1) : pastille pleine sans bord, jamais la forme d'un bouton ; teinte de « Lien à envoyer ». */
.todo .step { background: var(--warning-tint); color: var(--warning); }
.optional .step { background: var(--hover); color: var(--muted); }
.todo .link { font-weight: 600; }
/* RDV-101 : page prête, étapes repliées ; `summary` à la taille d'un titre, sans titre dedans. */
details.steps > summary {
  display: list-item; min-height: var(--target); padding: var(--space-2) 0;
  font-size: var(--step-1); font-weight: 600; cursor: pointer;
}
details.steps[open] > summary { margin-bottom: var(--space-2); }
/* RDV-131 : types en grille de cartes (direction « Galet », ui.md §9 ;
   a11y §7). En-tête : titre et texte, bouton « Ajouter » à droite sur une
   page large. Carte : le titre est le seul lien, étiré par `::after` ;
   « Copier le lien » passe au-dessus (z-index) ; le rond « Modifier » est un
   décor du lien. Anneau de focus sur la carte entière, sans `overflow`. */
.types-head { margin-bottom: var(--space-2); }
.types-head ~ .hint { margin-bottom: var(--space-5); }
@media (width >= 48rem) {
  .types-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-6); align-items: center; }
  .types-head > * { grid-column: 1; }
  .types-head > .types-add { grid-column: 2; grid-row: 1 / span 3; }
}
.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-6);
  margin: 0; padding: 0; list-style: none;
}
.type-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6);
  background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.type-tile > * { margin: 0; }
/* Nom sans espace : il passe à la ligne au lieu de déborder (1.4.10). */
.type-tile { min-width: 0; overflow-wrap: anywhere; }
.type-tile h2 { font-size: var(--step-1); }
.type-tile h2 a { color: var(--ink); text-decoration: none; }
/* RDV-189 (TYP-2) : le rond « Modifier » sur la ligne du titre, sans rangée vide. */
.type-tile h2 a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.type-tile h2 a > span:first-child { min-width: 0; }
.type-tile h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
/* Anneau sur la zone étirée (toute la carte), sans dépendre de `:has`. */
.type-tile h2 a:focus-visible { outline: none; }
.type-tile h2 a:focus-visible::after { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
.type-tile h2 a:hover { text-decoration: underline; }
.type-tile .meta { color: var(--ink-2); }
.type-tile .pill { margin: 0; }
.type-tile .description {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; color: var(--ink-2);
}
/* Actions en bas : cartes d'une rangée alignées quelle que soit la description. */
.type-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-2); }
.type-actions > button { position: relative; z-index: 1; width: auto; }
/* RDV-174 : lien en clair d'un type, sélectionnable au-dessus du lien étiré. */
.type-tile textarea.url { position: relative; z-index: 1; resize: none; field-sizing: content; overflow-wrap: anywhere; }
.type-tile .round {
  display: inline-grid; place-items: center; flex: none; inline-size: var(--target); block-size: var(--target); margin-left: auto;
  border: var(--line) solid transparent; border-radius: var(--radius-full); background: var(--info-tint); color: var(--brand-dark);
}
.type-tile:has(h2 a:hover) .round { background: var(--brand); color: var(--on-brand); }
@media (forced-colors: active) {
  .type-tile, .type-tile .round { border-color: CanvasText; }
  .type-tile h2 a:focus-visible::after { outline-color: Highlight; }
}
/* RDV-87 : retrait d'un type. */
.retire { margin-top: var(--space-7); padding-top: var(--space-6); border-top: var(--line) solid var(--border); }
/* RDV-170 : « Changer l'ordre » sous « Ajouter ». Page « Réorganiser » en
   liste numérotée (maquette rdv-170-ordre-types) : numéro décoratif (le
   lecteur d'écran dit « 2 sur 5 » par la liste), nom et détails, puis
   « Monter » et « Descendre » dans des colonnes fixes, même quand l'un manque. */
.types-add { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
@media (width >= 48rem) { .types-add { align-items: flex-end; } }
.type-order { margin: 0 0 var(--space-4); padding: 0; list-style: none; counter-reset: type-order; }
.type-order > li {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: start;
  padding: var(--space-3) 0; border-bottom: var(--line) solid var(--border); counter-increment: type-order;
}
.type-order > li::before { content: counter(type-order) "."; content: counter(type-order) "." / ""; padding-top: var(--space-2); font-weight: 600; color: var(--ink-2); }
.type-order p { display: flex; flex-direction: column; margin: 0; padding-top: var(--space-2); overflow-wrap: anywhere; }
.type-order .meta { color: var(--ink-2); font-size: var(--step--1); }
/* Page étroite : boutons côte à côte sous le nom (1.4.10, 320 px). */
.type-order form { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.type-order button { width: 100%; gap: var(--space-1); padding-inline: var(--space-4); }
.type-order button[value="up"] { grid-area: 1 / 1; }
.type-order button[value="down"] { grid-area: 1 / 2; }
.type-order > li { scroll-margin-block: var(--space-7); }
@media (width >= 40rem) {
  .type-order > li { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
  .type-order form { grid-column: 3; grid-template-columns: repeat(2, 9rem); }
}

/* RDV-90 : adresse de la page ; le préfixe passe au-dessus du champ sur un écran étroit. */
.slug-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); max-width: var(--measure); }
.slug-row input[type="text"] { flex: 1 1 12rem; width: auto; }
.slug-prefix { color: var(--muted); overflow-wrap: anywhere; }

/* RDV-115 : Réglages, une carte et un formulaire par section. Une colonne par
   défaut ; titre et aide à gauche (16rem) dès que la carte a la place
   (requête de conteneur : vraie aussi à 200 % de zoom). « Enregistrer » sous
   les champs, dans leur colonne (revue UI : pas de bande de pied).
   RDV-171 : grille sur le formulaire enfant direct seulement ; les formulaires
   imbriqués dans `.setting-body` (domaine, agenda, logo) restent en bloc. */
.app-main .setting { max-width: none; margin: 0 0 var(--space-4); padding: var(--space-6); container-type: inline-size; }
.setting > :is(form, .setting-grid) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-7); }
.setting h3 { margin: 0 0 var(--space-1); font-size: var(--step-1); font-weight: 600; }
.setting-head .hint { margin-bottom: var(--space-5); }
.setting-body > :last-child { margin-bottom: 0; }
.setting-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-5); }
.setting-foot .notice { margin: 0; }
/* RDV-133 : bouton secondaire à sa largeur, même sous 30 rem (maquette). */
.setting-foot button { width: auto; }
/* RDV-133 : ancres « Règles » et « Compte », liens texte de 40 px (44 sous
   64 rem, ui.md §13), soulignés à la couleur du thème ; un peu d'air au-dessus
   du groupe visé. */
.anchors { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); margin: 0 0 var(--space-4); }
.anchors a { display: inline-flex; align-items: center; min-block-size: 2.5rem; color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: var(--offset); }
@media (width < 64rem) { .anchors a { min-block-size: var(--target); } }
/* RDV-195 : un onglet par adresse ; lien courant (`aria-current`, posé par le
   serveur) en gras souligné épais, pas la seule couleur (1.4.1). */
.anchors a[aria-current] { color: var(--ink); font-weight: 700; text-decoration-thickness: 3px; }
/* RDV-196 : pied du formulaire de l'onglet, hors des cartes, bouton plein ;
   puis les cartes à part, sous un intertitre et un filet (revue UI). */
.settings-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin: 0 0 var(--space-7); }
.separate { margin-top: var(--space-7); padding-top: var(--space-6); border-top: var(--line) solid var(--border); }
.separate > h2 { margin-top: 0; }
/* Marque d'un formulaire modifié (`unsaved.js`) : texte, bordure gardée en contraste forcé. */
:is(.setting-foot, .settings-foot) .unsaved { margin: 0; }
:is(.setting-foot, .settings-foot) .unsaved:not(:empty) { padding: var(--space-1) var(--space-3); border: var(--line) solid var(--ink-2); border-radius: var(--radius); background: var(--warning-tint); color: var(--ink); font-weight: 600; }
/* RDV-133 : avertissement de l'adresse en encadré d'alerte, graisse normale (maquette). */
.setting .warning { max-width: var(--measure); padding: var(--space-3) var(--space-4); border: var(--line) solid transparent; border-radius: var(--radius); background: var(--warning-tint); color: var(--ink-2); font-weight: 400; }
.error-summary h4 { margin: 0 0 var(--space-2); font-size: var(--step-0); }
.setting .error-summary { max-width: var(--measure); }
/* Nom du fichier choisi sur toute la largeur, pas coupé à 320 px. */
.setting input[type="file"] { width: 100%; }
@media (width <= 30rem) { .app-main .setting { padding: var(--space-4); } }
/* Deux thèmes par ligne dès 360 px : huit cartes d'une colonne seraient trop longues. */
.setting .themes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); }
@container (width >= 40rem) {
  .setting > :is(form, .setting-grid) { grid-template-columns: 16rem minmax(0, 1fr); }
  .setting-head { grid-row: 1 / span 2; }
  .setting-head .hint { margin-bottom: 0; }
  .setting-foot { grid-column: 2; }
}
/* Détail replié : marqueur natif gardé, cible de 24 px au moins (2.5.8). */
details.more { margin: 0 0 var(--space-4); font-size: var(--step--1); }
details.more > summary {
  display: list-item; min-height: 1.5rem; padding-block: var(--space-1); color: var(--brand-dark); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: var(--offset);
}
details.more > summary:hover { text-decoration-thickness: 2px; }
details.more p { margin: var(--space-2) 0 0; color: var(--muted); line-height: var(--leading-small); }

/* RDV-85, RDV-127 : gabarit des pages connectées, direction « Galet »
   (tasks/rdv-125/ui.md §10 à §12). Une seule navigation : barre latérale de
   `--sidebar` dans le flux à partir de 64rem, panneau du `<details>` « Menu »
   en dessous (zoom 200 % compris). Rien de collant ni de fixe : à grand
   texte, une barre collante cacherait l'élément qui a le focus (2.4.11). */
body.app { padding: 0; }
.skip {
  position: absolute; left: var(--space-4); top: -5rem; z-index: 2; padding: var(--space-3) var(--space-4);
  border: var(--focus) solid var(--focus-color); border-radius: var(--radius); background: var(--surface);
  color: var(--brand-dark); font-weight: 600;
}
.skip:focus { top: var(--space-4); }
.app-side { background: var(--surface); border-bottom: var(--line) solid var(--border); }
/* Logo et « Menu » sur une ligne qui passe à la ligne s'il le faut (320 px, grand texte). */
.app-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  margin: 0; padding: var(--space-2) var(--space-4); text-align: left;
}
.app-logo { display: inline-flex; align-items: center; min-height: var(--target); }
.app-logo img { display: block; width: 5.5rem; max-width: 100%; height: auto; }
/* Aspect du bouton secondaire ; libellé « Fermer le menu » une fois ouvert (ui.md §13). */
.app-menu > summary {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target); padding: var(--space-2) var(--space-5);
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-full); background: var(--surface);
  color: var(--ink); font-weight: 600; line-height: var(--leading-tight); list-style: none; cursor: pointer;
}
.app-menu > summary:hover { background: var(--hover); }
.app-menu > summary::-webkit-details-marker { display: none; }
/* RDV-187 : une icône SVG par état, retirée avec son libellé. */
.app-menu:not([open]) .menu-hide, .app-menu[open] .menu-show { display: none; }
/* RDV-209 : demandes à confirmer dans « Menu », retirées avec son libellé. */
.menu-show .nav-count { display: inline-block; margin-inline-start: var(--space-1); }
/* RDV-209 : rubrique courante, repère en texte sous le logo et « Menu »,
   jamais tronqué (320 px, texte à 200 %) ; plus discret que le `h1`. */
.app-section {
  flex: 1 1 100%; margin: 0; padding-bottom: var(--space-1); color: var(--ink-2);
  font-size: var(--step--1); font-weight: 600; line-height: var(--leading-tight); overflow-wrap: anywhere;
}
/* Le `<details>` n'a que son résumé : menu fermé, le panneau qui suit est
   retiré. Sans `:has`, il reste affiché : rien ne devient inaccessible. */
@media (width < 64rem) {
  .app-side:has(.app-menu:not([open])) .app-panel { display: none; }
  /* Menu ouvert : un trait sépare la barre du panneau (maquette). */
  .app-header:has(.app-menu[open]) { margin-bottom: var(--space-2); border-bottom: var(--line) solid var(--border); }
  /* RDV-209 : menu ouvert, l'entrée active donne la rubrique. */
  .app-header:has(.app-menu[open]) .app-section { display: none; }
}
/* Panneau dans le flux : il pousse la page au lieu de la couvrir (2.4.11, 1.4.10). */
.app-panel { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); }
.app-nav { display: flex; flex-direction: column; }
/* RDV-206 : titre de groupe marqué par la graisse et l'espace qui le précède. */
.nav-group { margin: var(--space-4) 0 var(--space-1); padding: 0 var(--space-4); color: var(--muted); font-size: var(--step--1); font-weight: 600; }
.app-nav ul + .nav-group { margin-top: var(--space-6); }
.app-nav ul { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.app-nav a {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--target); padding: var(--space-2) var(--space-4);
  border: var(--line) solid transparent; border-radius: var(--radius-full); color: var(--ink-2); text-decoration: none;
}
.app-nav a:hover { background: var(--hover); text-decoration: underline; }
/* RDV-142 : icône au trait devant chaque rubrique, couleur du texte ; taille fixe en rem (suit le zoom), jamais écrasée par le libellé. */
.nav-icon { flex: none; width: 1.25rem; height: 1.25rem; }
/* RDV-187 (TR-2) : icônes d'action, même technique que `.nav-icon`. */
.icon { flex: none; width: 1.25rem; height: 1.25rem; }
/* Page courante : fond plein et graisse, pas la couleur seule (1.4.1) ; le
   lien prend toute la largeur, la graisse ne décale rien. */
.app-nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.app-nav a[aria-current="page"]:hover { background: var(--brand-dark); }
.nav-count {
  margin-inline-start: auto; min-width: 1.5rem; padding: 0 var(--space-2);
  border: var(--line) solid transparent; border-radius: var(--radius-full);
  background: var(--warning-tint); color: var(--warning); font-size: var(--step--1); font-weight: 600; text-align: center;
}
/* RDV-135 : recherche de client. Libellé visible et indice au-dessus du champ
   (RDV-210 : à toutes les largeurs, sous le titre de Rendez-vous), champ et
   bouton séparés ; tout passe à la ligne plutôt que de déborder (1.4.10). */
.client-search { margin-bottom: var(--space-5); }
.client-search form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0; }
.client-search-text { display: flex; flex-direction: column; flex-basis: 100%; }
.client-search-text label { font-weight: 600; line-height: var(--leading-tight); }
.client-search-text .hint { margin: 0; }
.client-search input[type="search"] { flex: 0 1 16rem; min-width: 10rem; border-radius: var(--radius-full); }
.client-search button { width: auto; }
.search-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-4); }
.search-head h2 { margin: 0; }
/* Titre ciblé au chargement (annonce du résultat) : contour au clavier seulement. */
.search-head h2:focus:not(:focus-visible) { outline: none; }
.account {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-3); border-radius: var(--radius); background: var(--surface-2);
}
.avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); object-fit: cover;
  background: var(--brand); color: var(--on-brand); font-size: var(--step--1); font-weight: 600;
}
.account-id { min-width: 0; margin: 0; font-size: var(--step--1); line-height: var(--leading-small); }
.account-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.account-email { display: block; color: var(--muted); overflow-wrap: anywhere; }
.account form { grid-column: 1 / -1; margin: 0; }
/* RDV-207 : Formule et Clés d'accès empilées sur toute la largeur du bloc. */
.account > p:not(.account-id) { grid-column: 1 / -1; margin: 0; }
.account button.secondary { width: 100%; }
/* Compte sur bureau : bouton en bas de la barre latérale, panneau `popover` au-dessus. */
:is(button, a.button).account-button {
  justify-content: flex-start; gap: var(--space-3); width: 100%; margin-top: auto; padding: var(--space-2) var(--space-3);
  border: var(--line) solid transparent; border-radius: var(--radius); background: var(--surface-2);
  color: var(--ink); font-weight: 400; text-align: left;
}
/* `--hover` sur `--surface-2` ne se verrait pas : le contour marque le survol. */
:is(button, a.button).account-button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.account-button:has(+ :popover-open) { border-color: var(--brand); }
.account-button .account-id { flex: 1; }
/* RDV-140 : une ligne finie par « … », jamais coupée dans le mot ; texte entier
   dans le DOM, dans `title` et dans le panneau. Le bloc mobile n'est pas tronqué. */
.account-button .account-email { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Le panneau s'ouvre au-dessus du bouton : chevron vers le haut, retourné
   panneau ouvert (RDV-187). */
.account-button .icon { color: var(--muted); }
.account-button:has(+ :popover-open) .icon { rotate: 180deg; }
/* RDV-118 : `absolute` (rien n'est collant : le panneau défile avec la page) ;
   au-dessus du bouton avec le positionnement par ancre, s'il existe.
   shortcut: sans ancre, en bas de la fenêtre à côté de la barre ; à revoir
   si un navigateur visé n'a pas les ancres. */
/* E-mail entier (RDV-140) et déconnexion, à la largeur du bouton. */
.account-menu {
  position: fixed; inset: auto auto var(--space-4) calc(var(--sidebar) + var(--space-6));
  width: calc(var(--sidebar) - 2 * var(--space-3)); max-width: calc(100% - 2 * var(--space-4)); margin: 0;
  padding: var(--space-3); border: var(--line) solid var(--border);
  border-radius: var(--radius-card); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.account-menu form, .account-menu button { width: 100%; margin: 0; }
.account-menu .account-email { margin: 0 0 var(--space-3); font-size: var(--step--1); line-height: var(--leading-small); }
/* RDV-207 : liens groupés, bouton détaché comme sur mobile. */
.account-menu > p:not(.account-email) { margin: 0; }
.account-menu form { margin-top: var(--space-2); }
@supports (anchor-name: --a) {
  .account-button { anchor-name: --account; }
  .account-menu {
    position: absolute; position-anchor: --account; inset: auto;
    bottom: anchor(top); left: anchor(left); margin-bottom: var(--space-2);
  }
}
/* Sans `popover` : le panneau reste dans la barre, le bouton est retiré. */
@supports not selector(:popover-open) {
  .account-button { display: none; }
  .account-menu { position: static; width: auto; padding: 0; border: 0; box-shadow: none; }
}
.app-main { display: block; padding: var(--space-6) var(--space-4) var(--space-8); }
.app-main:focus { outline: none; }
.app-main > .card { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.app-main .field { max-width: var(--measure); }
/* Titres de section de la page seulement (Réglages) ; plus les titres placés
   dans une carte ou une liste (marge parasite des demandes, RDV-111). */
:is(.app-main > .card, .app-main > .card > form) > h2 { margin-top: var(--space-7); }
/* Listes en carte : les lignes portent leur propre espacement vertical. */
.app-main :is(.type-rows, .requests) { padding-block: 0; }
.app-main :is(.type-rows, .day-list, .requests) > li:first-child { border-top: 0; }
.app-main .day-list { margin-bottom: 0; }

@media (width >= 48rem) {
  .day-list > li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); column-gap: var(--space-6); align-items: start; }
  .day-list > li > h3 { grid-column: 1; grid-row: 1 / span 2; padding-top: var(--space-2); }
  .day-list > li > :not(h3) { grid-column: 2; }
  .day-list > li > p.meta { padding-top: var(--space-2); }
}
@media (width >= 64rem) {
  /* Cibles de 40 px sur ordinateur (RDV-111 : pages publiques comprises). */
  :root { --target: 2.5rem; }
  /* RDV-127 : barre latérale dans le flux, de toute la hauteur de la page. */
  body.app {
    display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-7);
    box-sizing: border-box; min-height: 100dvh; padding: var(--space-4) var(--space-7) 0 var(--space-4);
  }
  .app-side {
    display: flex; flex-direction: column; margin-bottom: var(--space-4); padding: var(--space-5) var(--space-3) var(--space-3);
    border: var(--line) solid transparent; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card);
  }
  .app-header { padding: 0 var(--space-3); }
  .app-menu, .app-section, .app-panel > .account { display: none; }
  .app-panel { flex: 1; padding: 0; }
  .nav-group { padding: 0 var(--space-3); }
  .app-nav a { padding-inline: var(--space-3); }
  .app-main { max-width: var(--container); padding: var(--space-4) 0 var(--space-9); }
}
/* Revue UI RDV-127 : sur une page longue, Réglages et le compte restaient
   hors de vue. La barre colle au haut de la fenêtre, jamais plus haute
   qu'elle : au-delà, elle défile seule (a11y.md §3 : aucun lien hors
   d'atteinte). Fenêtre basse : elle reste dans le flux. Elle ne recouvre
   pas `main` (2.4.11) ; son rembourrage garde l'anneau de focus entier
   malgré `overflow`. */
@media (width >= 64rem) and (height >= 36rem) {
  .app-side {
    position: sticky; top: var(--space-4); align-self: start;
    box-sizing: border-box; block-size: calc(100dvh - 2 * var(--space-4)); overflow-y: auto;
  }
}
@media (width < 64rem) {
  /* Compte de bureau retiré : celui du panneau suffit. Recherche : champ et
     bouton sur une ligne. */
  .account-button, .account-menu { display: none; }
  .client-search input[type="search"] { flex: 1 1 8rem; min-width: 0; }
  .zone .link { margin-left: 0; }
}
@media (width <= 30rem) {
  body { padding: var(--space-6) var(--space-4) var(--space-8); }
  button, a.button { width: 100%; }
  /* RDV-26 : Confirmer est dans son formulaire ; pleine largeur comme Refuser. */
  .actions > form { flex: 1 1 100%; }
}

/* Contraste forcé : les fonds disparaissent, les traits restent. */
@media (forced-colors: active) {
  .field-error, [aria-invalid="true"], .chip, .types a, .types li, .periods a, .strip a { border-color: CanvasText; }
  /* RDV-112 : jour choisi, sans le fond qui disparaît. */
  .strip a[aria-current] { border: var(--focus) solid Highlight; }
  .type-card, .book-card, .booking-page:has(.type-card) :is(.slots-section, .payment) { border-color: CanvasText; }
  /* RDV-151 : l'ombre du survol disparaît ; le contour la remplace. */
  .chip:hover { border-color: Highlight; }
  span.owner-photo { border: var(--line) solid CanvasText; }
  .theme-card { border-color: CanvasText; }
  .theme-card:hover { border-color: var(--brand); }
.theme-card:has(input:checked) { border-color: Highlight; }
  /* RDV-133 : aperçu décoratif ; sans ses fonds, il ne montre que deux cercles vides. */
  .theme-preview { display: none; }
  /* RDV-154 : la couleur choisie reste visible, bord du système. */
  .theme-colour input[type="color"] { forced-color-adjust: none; border-color: ButtonText; }
  .notice, .alert, .error-summary, .notice-row, .page-status, .chosen, .card, .record > section { border-color: CanvasText; }
  .app-nav a[aria-current="page"] { border-color: Highlight; text-decoration: underline; }
  .account-menu, .account-button, .nav-count, .app-side { border: var(--line) solid CanvasText; }
  .account-button:has(+ :popover-open) { outline: var(--line) solid Highlight; }
  .slots > li, .closure-warning, .tag { border-color: CanvasText; }
  /* RDV-118 : pastilles (fond perdu) et bouton « Menu ». */
  .app-menu > summary, .app-menu .nav-count { border-color: ButtonText; }
  .pill, .step { border: var(--line) solid CanvasText; }
  :focus-visible, .types a:focus-visible::after, .appointments .go a:focus-visible::after,
  :is(.notice, .alert, .error-summary):focus-visible { outline-color: Highlight; }
}

/* RDV-31 : salle d'attente, test local du micro et de la caméra. Aperçu en
   miroir, limité en hauteur sur téléphone (caméra avant en portrait). */
.device-check { margin: var(--space-6) 0; }
.device-check video {
  display: block; width: 100%; max-height: 40vh; aspect-ratio: 4 / 3;
  border-radius: var(--radius-card); background: var(--stage-bg); object-fit: cover; transform: scaleX(-1);
}
/* RDV-157 : à partir de 64rem, infos à gauche, test puis « Rejoindre » à
   droite ; ordre du DOM gardé (infos, test, Rejoindre). */
@media (width >= 64rem) {
  main.card:has(> .waiting) { max-width: 65rem; }
  .waiting { display: grid; grid-template-columns: 22rem minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 var(--space-7); }
  .waiting-info { grid-area: 1 / 1 / span 2; }
  .waiting .device-check { grid-area: 1 / 2; margin: 0 0 var(--space-6); }
  .waiting-join { grid-area: 2 / 2; }
}
.device-check .check-level { display: flex; flex-direction: column; gap: var(--space-2); font-weight: 600; }
/* Barre native trop fine dans Chrome : dessinée ici, native en couleurs forcées. */
.device-check meter {
  appearance: none; width: 100%; height: var(--space-3);
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-full); background: var(--border);
}
.device-check meter::-webkit-meter-bar { height: 100%; border: 0; background: none; }
.device-check meter::-webkit-meter-optimum-value { border-radius: var(--radius-full); background: var(--open); }
.device-check meter::-moz-meter-bar { border-radius: var(--radius-full); background: var(--open); }
@media (forced-colors: active) { .device-check meter { appearance: auto; } }

/* RDV-32 : état de la séance. Le texte dit l'état ; le glyphe (non lu) et le
   ton l'appuient, sans animation (2.2.2). `data-state` vient d'une liste fixe. */
.session { margin: var(--space-6) 0; }
.session .page-status::before { content: "\2026"; content: "\2026" / ""; margin-right: var(--space-2); }
.session .page-status[data-state="connected"] {
  --tone: var(--success); --tone-tint: var(--success-tint); --tone-ink: var(--success); border-color: transparent;
}
.session .page-status[data-state="connected"]::before { content: "\2713"; content: "\2713" / ""; }
.session .page-status:is([data-state="reconnecting"], [data-state="left"], [data-state="failed"],
  [data-state="elsewhere"], [data-state="gone"], [data-state="unsupported"], [data-state="playBlocked"]) {
  --tone: var(--warning); --tone-tint: var(--warning-tint); --tone-ink: var(--warning); border-color: var(--warning);
}
.session .page-status:is([data-state="reconnecting"], [data-state="left"], [data-state="failed"],
  [data-state="elsewhere"], [data-state="gone"], [data-state="unsupported"], [data-state="playBlocked"])::before {
  content: "\26A0"; content: "\26A0" / "";
}
/* RDV-157 (design/rdv-157-ecran-seance.figcraft, référence
   design/rdv-157-interface-video.html) : séance en cours, la page passe sur la
   scène sombre. Les jetons neutres et de ton prennent les valeurs `--stage-*` :
   encadrés, champs, boutons et chat suivent sans règle propre. `data-phase`
   vient de `session.js` ; fin de séance (`ended`) : page claire. */
:root:has(.session[data-phase="live"]:not([hidden])) {
  color-scheme: dark;
  --bg: var(--stage-bg); --surface: var(--stage-bg); --surface-2: var(--stage-surface); --hover: var(--stage-hover);
  --border: var(--stage-border); --border-strong: var(--stage-line); --focus-color: var(--stage-ink);
  --ink: var(--stage-ink); --ink-2: var(--stage-ink); --muted: var(--stage-ink-2);
  --brand: var(--stage-accent); --brand-dark: var(--stage-accent-2); --on-brand: var(--stage-on-accent);
  --info-tint: var(--stage-hover);
  --success: var(--stage-success); --success-tint: var(--stage-surface); --open: var(--stage-success);
  --warning: var(--stage-warning); --warning-tint: var(--stage-surface);
  --error: var(--stage-error); --error-dark: var(--stage-error); --error-tint: var(--stage-surface);
}
/* Logo (Bridgie ou du consultant) pensé pour un fond clair : posé sur un cartouche clair. */
:root:has(.session[data-phase="live"]:not([hidden])) :is(body > header, .app-logo) img {
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); background: var(--stage-ink);
}
/* Pastille « chiffrée de bout en bout », connexion établie seulement. */
.e2e {
  display: none; align-items: center; gap: var(--space-2); width: fit-content;
  padding: var(--space-1) var(--space-3); border: var(--line) solid var(--border); border-radius: var(--radius-full);
  background: var(--surface-2); font-size: var(--step--1); font-weight: 600;
}
.e2e svg { width: 1rem; height: 1rem; color: var(--success); }
.session:has(#session-status:is([data-state="connected"], [data-state="playBlocked"])) .e2e { display: flex; }
/* RDV-34 (design/rdv-34-seance.figcraft) : scène, prénom et vidéo de l'autre
   dans la même case ; sa caméra coupée, initiales et nom restent seuls. Aperçu
   local en vignette miroir, en haut à droite (le nom reste visible). Aucune
   animation. */
.session #session-play { width: 100%; }
.stage {
  display: grid; place-items: center; position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; max-height: 60svh; margin-top: var(--space-4);
  border-radius: var(--radius-card); background: var(--stage-video); color: var(--stage-ink);
}
.stage > * { grid-area: 1 / 1; }
.stage.audio { aspect-ratio: auto; padding: var(--space-5); }
.stage-name {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  margin: 0; padding: var(--space-4); font-size: var(--step-2); font-weight: 600; text-align: center;
}
.stage .initials {
  display: grid; place-items: center; width: 5rem; height: 5rem;
  border-radius: var(--radius-full); background: var(--stage-hover); font-size: var(--step-2);
}
.stage video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.stage[data-camera="off"] #session-remote { visibility: hidden; }
.stage .self {
  position: absolute; inset: var(--space-3) var(--space-3) auto auto;
  width: 28%; max-width: 10rem; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1);
  border: var(--line) solid var(--stage-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.stage .self[hidden] { display: none; }
@media (min-width: 48rem) { .stage:not(.audio) { aspect-ratio: 16 / 9; max-height: 70svh; } }
.session-peer { min-height: 1lh; margin: var(--space-2) 0; font-size: var(--step--1); color: var(--ink-2); }
/* RDV-157 : boutons ronds, icône et libellé ; une ligne dès 320 px. Coupé :
   rond clair, icône barrée et mot « coupé » ; jamais la couleur seule (1.4.1).
   « Quitter » en rouge. */
.session-controls {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); width: fit-content; max-width: 100%;
  margin: var(--space-4) auto; padding: var(--space-2);
  border: var(--line) solid var(--border); border-radius: var(--radius-card); background: var(--surface-2);
}
.session .control {
  flex-direction: column; justify-content: flex-start; gap: var(--space-1); width: auto; min-width: 4rem;
  padding: var(--space-1); border: 0; border-radius: var(--radius); background: none; color: var(--ink);
  font-size: var(--step--1);
}
.session .control:hover { background: var(--hover); }
.control-icon {
  display: grid; place-items: center; width: 3rem; height: 3rem;
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-full); background: var(--hover);
}
.control-icon svg { width: 1.5rem; height: 1.5rem; }
/* Le mot « coupé » garde sa place : la barre ne change pas de hauteur. */
.control .off { display: none; }
.control-state { visibility: hidden; }
.control[aria-pressed="false"] .on { display: none; }
.control[aria-pressed="false"] .off { display: block; }
.control[aria-pressed="false"] .control-state { visibility: visible; }
.control-state { font-weight: 400; }
.control[aria-pressed="false"] .control-icon { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.control[aria-disabled="true"] { cursor: not-allowed; }
.control[aria-disabled="true"] .control-icon { border-style: dashed; background: none; color: var(--muted); }
.control.leave .control-icon { border-color: var(--stage-danger); background: var(--stage-danger); color: var(--stage-on-danger); }
/* Fin de séance : scène et commandes retirées, l'état reste lu. */
.session[data-phase="ended"] :is(.stage, .session-peer, .session-controls, #session-media, #session-fallback) { display: none; }
/* RDV-137 (design/rdv-137-reseau-faible.figcraft) : pastille « Connexion
   faible » en haut à gauche de la scène (l'aperçu de soi est à droite).
   Pastille et avis de repli restent rendus (régions live) : vides, sans
   cadre. Coupure en cours : l'image figée de l'autre est atténuée, le texte
   de l'état dit la reconnexion. */
.stage .quality {
  position: absolute; inset: var(--space-3) auto auto var(--space-3); max-width: 60%; margin: 0;
  padding: var(--space-1) var(--space-3); border: var(--line) solid var(--stage-warning); border-radius: var(--radius-full);
  background: var(--stage-surface); color: var(--stage-ink); font-size: var(--step--1); font-weight: 600;
}
.stage .quality:empty { padding: 0; border: 0; }
#session-fallback { margin: var(--space-3) 0 0; }
.session:has(#session-status:is([data-state="reconnecting"], [data-state="left"])) #session-remote { opacity: 0.4; }
.session .page-status[data-state="quit"]::before { content: none; }
/* État de l'autre vide : pas de blanc entre la scène et la barre. */
.session-peer:empty { min-height: 0; margin: 0; }
/* Panneau du chat et des fichiers (RDV-35, RDV-36) : sous la scène, à côté
   quand la place le permet. */
.chat-panel {
  margin-top: var(--space-4); padding: var(--space-4);
  border: var(--line) solid var(--border); border-radius: var(--radius-card); background: var(--surface-2);
}
:is(main, .card):has(> .session) { container-type: inline-size; }
@media (width >= 64rem) { main.card:has(> .session) { max-width: 65rem; } }
@container (width >= 56rem) {
  .session:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 0 var(--space-7); align-items: start; }
  .session > :not(.room, .chat-panel) { grid-column: 1 / -1; }
  .chat-panel { margin-top: 0; }
}
/* RDV-35 (design/rdv-35-chat.figcraft) : journal qui défile, mes messages à
   droite et teintés ; l'auteur est toujours écrit (jamais la position seule). */
.chat-log {
  min-height: 3rem; max-height: 16rem; overflow-y: auto; margin: var(--space-3) 0 var(--space-4); padding: var(--space-3);
  border: var(--line) solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.chat-message {
  width: fit-content; max-width: 85%; margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-message.mine { margin-left: auto; background: var(--info-tint); }
.chat-message strong { display: block; font-size: var(--step--1); }
.session .chat-field { margin-bottom: var(--space-2); }
.chat-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: end; }
.chat-row textarea { flex: 1 1 16rem; }
.chat-row button { flex: 1 0 auto; max-width: 100%; }
@media (min-width: 30rem) { .chat-row button { flex-grow: 0; } }
#chat-send[aria-disabled="true"] { background: var(--surface-2); border-color: var(--border); color: var(--muted); cursor: not-allowed; }
/* RDV-36 (design/rdv-36-fichiers.figcraft) : fichier dans le journal, barre
   puis état ou lien sur leur propre ligne ; contrôle grisé comme Envoyer. */
.chat-message progress, .chat-message .file-state { display: block; }
.chat-message progress { width: 100%; margin: var(--space-1) 0; }
.chat-message .file-state { font-size: var(--step--1); }
.session .chat-file { margin: var(--space-4) 0 var(--space-2); }
#chat-file[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
#chat-file[aria-disabled="true"]::file-selector-button { background: var(--surface-2); border-color: var(--border); color: var(--muted); cursor: not-allowed; }
@media (forced-colors: active) {
  .chat-message { border: var(--line) solid CanvasText; }
  .control-icon, .e2e { border: var(--line) solid ButtonText; }
  .control[aria-pressed="false"] .control-icon { border: var(--line-strong) solid Highlight; }
  .control[aria-disabled="true"] .control-icon { border: var(--line) dashed GrayText; }
  .stage, .stage .self, .session-controls, .chat-panel, .stage .quality { border: var(--line) solid CanvasText; }
}

/* RDV-106, RDV-110 : accueil du consultant. RDV-128 : direction « Galet »
   (design/rdv-125/a-galet-accueil-*.png). RDV-148 (design/rdv-148-accueil.figcraft) :
   prochain rendez-vous, tuiles, « À traiter » et journée. Ordre du DOM =
   ordre de lecture (1.3.2) ; à partir de 80rem, « À traiter » passe en
   colonne à droite. */
.day-summary { margin: calc(-1 * var(--space-2)) 0 var(--space-6); color: var(--muted); }
/* Tuiles : `dl`, lien sur le libellé seul (a11y §4). RDV-148 : en flex, une
   tuile seule sur sa ligne s'étire : aucune case vide, quel que soit leur
   nombre (a11y.md §5). */
.tiles-section { container: tiles / inline-size; }
.tiles { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
.tiles > .tile {
  display: flex; flex: 1 1 12rem; flex-direction: column; min-height: 8rem; margin: 0; padding: var(--space-5);
  border: var(--line) solid transparent; border-radius: var(--radius-tile);
  background: var(--surface); box-shadow: var(--shadow-card);
}
/* RDV-148 : tuile à 0 moins forte qu'une tuile qui demande une action ; le
   nombre reste écrit (1.4.1), --muted sur --surface-2 à 4,5:1 au moins. */
.tiles > .tile.zero { border-color: var(--border); background: var(--surface-2); box-shadow: none; }
.tile.zero .tile-value { color: var(--muted); }
.tiles dt { display: block; font-weight: 600; }
.tiles dt::after { content: none; }
/* RDV-202 : libellé sans lien (« Aujourd'hui »), même boîte qu'un `a.link` :
   les nombres des tuiles restent alignés. */
.tile-label { display: inline-block; padding: var(--space-2) 0; padding-block: max(var(--space-2), (var(--target) - 1lh) / 2); }
.tiles dd { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-3) 0 0; }
.tile-value { color: var(--ink); font-size: var(--step-4); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.tile-note { color: var(--muted); font-size: var(--step--1); line-height: var(--leading-small); }
.home-board { display: grid; gap: var(--space-4); align-items: start; }
/* Carte et titre : règles communes (RDV-111). */
.home-board > section { min-width: 0; margin: 0; }
.empty-note { margin: 0; color: var(--muted); }
/* Prochain rendez-vous. */
.next h2 { margin-bottom: var(--space-1); }
.next-in { margin: 0 0 var(--space-3); color: var(--brand-dark); font-weight: 600; }
.day-items .link { justify-self: start; font-weight: 600; }
.next-when { margin: 0 0 var(--space-2); }
.next-day { display: block; color: var(--muted); font-size: var(--step--1); }
.next-when time { font-size: var(--step-3); font-weight: 650; line-height: var(--leading-tight); font-variant-numeric: tabular-nums; }
.next-who { margin: 0 0 var(--space-4); }
.next-who strong { display: block; font-size: var(--step-1); }
.next-who .what { color: var(--muted); font-size: var(--step--1); }
.next-access { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-4); }
.next-access .pill { margin: 0; }
.next-access.due { padding: var(--space-3) var(--space-4); border: var(--line) solid transparent; border-radius: var(--radius); background: var(--warning-tint); }
.next-access .hint { margin: 0; color: var(--ink-2); }
/* À traiter : sous-titres, lien « Tout voir », lignes en blocs. */
.todo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-4); margin-top: var(--space-4); }
.todo-head h3 { margin: 0; font-size: var(--step-0); font-weight: 600; }
.todo-head .link { display: inline-flex; align-items: center; min-height: var(--target); padding-block: 0; }
.todo-items { display: grid; gap: var(--space-3); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.todo-items > li { padding: var(--space-4); border: var(--line) solid transparent; border-radius: var(--radius); background: var(--surface-2); overflow-wrap: anywhere; }
.todo-items p { margin: 0; }
.todo-items .meta { margin: var(--space-1) 0 var(--space-3); }
/* RDV-148 : un seul bouton plein sur la page, choisi par le serveur (classe
   `secondary` sur les autres). Colonne étroite : boutons sur toute la ligne ;
   dès 30rem de carte, à la largeur de leur texte (ui §4). */
.home-board > .todo { container: todo / inline-size; }
.todo-items .actions > * { flex: 1 0 auto; }
.todo-items :is(.actions form, li > form) button, .todo-items > li > a.button { width: 100%; }
@container todo (width >= 30rem) {
  .todo-items .actions > * { flex: none; }
  .todo-items :is(.actions form, li > form) button, .todo-items > li > a.button { width: auto; }
}
/* Votre journée. */
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-4); }
.day-head .hint { margin: 0; }
.open-slots { margin: 0 0 var(--space-2); color: var(--open); font-size: var(--step--1); }
.open-slots span { white-space: nowrap; }
.open-slots::before {
  content: ""; display: inline-block; width: 1rem; height: var(--bar); margin-right: var(--space-2);
  vertical-align: middle; background: currentColor;
}
.open-slots.none { color: var(--muted); }
.open-slots.none::before { display: none; }
.day-note { margin: var(--space-3) 0; font-weight: 600; }
.day-items { margin: 0; padding: 0; list-style: none; }
.day-items > li {
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-3);
  padding: var(--space-3) 0; border-top: var(--line) solid var(--border); overflow-wrap: break-word;
}
.day-items > li:first-child, .day-items > .now + li { border-top: 0; }
.day-items time { font-weight: 700; font-variant-numeric: tabular-nums; }
.day-items .what { color: var(--muted); font-size: var(--step--1); }
.day-items :is(.pill, .button) { justify-self: start; }
/* RDV-155 : « Rejoindre la séance » sous la pastille. */
.day-items .button { margin-top: var(--space-2); }
.day-items .past { color: var(--muted); }
/* Heure actuelle : pastille 5,6:1 et trait, dans la liste à sa place. */
.day-items > .now { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0; border-top: 0; }
.day-items > .now::after { content: ""; flex: 1; height: var(--line-strong); background: var(--now); }
.day-items .now span {
  padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--now); color: var(--on-brand);
  font-size: var(--step--1); font-weight: 600; white-space: nowrap;
}
/* Heure à gauche dès qu'il y a la place ; en rem, suit le zoom et la taille du texte. */
@media (width >= 24rem) {
  .day-items > li { grid-template-columns: 7rem minmax(0, 1fr); }
  .day-items time { grid-row: span 4; }
  .day-items :is(.link, .what, .pill, .button) { grid-column: 2; }
}
/* RDV-148 : lien de la page prête sur une ligne, titre pour libellé ; le
   statut de copie passe dessous. */
.booking-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.booking-line > h2 { margin: 0; }
.booking-line > h2 > label { display: block; }
.booking-line > .copy { flex: 1 1 20rem; }
.booking-line > .copy-status { flex-basis: 100%; }
@media (width < 30rem) {
  .home-board > :is(.next, .todo, .day-line), .booking-line, .tiles > .tile { padding: var(--space-4); }
}
/* RDV-148 : colonne étroite, une tuile par ligne et compacte (libellé, puis
   nombre et note) : le premier écran du téléphone reste au prochain
   rendez-vous (ux §2, ui §15). */
@container tiles (width < 30rem) {
  .tiles > .tile {
    min-height: 0; flex-flow: row wrap; align-items: baseline; justify-content: space-between;
    gap: 0 var(--space-3); padding-block: var(--space-2);
  }
  /* RDV-162 : libellé sur toute la ligne, le nombre toujours dessous, tuile
     à 0 comprise (sans note, elle tenait sur la ligne du libellé). */
  .tiles dt { flex-basis: 100%; }
  .tiles dd { flex-flow: row wrap; align-items: baseline; margin: 0; }
  .tile-value { font-size: var(--step-2); }
}
@media (width >= 80rem) {
  /* Prochain rendez-vous à gauche, « À traiter » à droite, puis tuiles sur
     toute la largeur et journée à gauche. */
  /* Sans « À traiter » (rien à faire), une colonne. */
  .home-board:has(> .todo) { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); }
  .home-board > .next { grid-column: 1; grid-row: 1; }
  .home-board > .todo { grid-column: 2; grid-row: 1; }
  .home-board > .tiles-section { grid-column: 1 / -1; grid-row: 2; }
  .home-board > .day-line { grid-column: 1; grid-row: 3; }
}
@media (forced-colors: active) {
  .home-board > :is(.next, .todo, .day-line), .tiles > .tile, .todo-items > li, .next-access.due { border-color: CanvasText; }
  .day-items > .now::after, .open-slots::before { background: CanvasText; }
  .day-items .now span { border: var(--line) solid CanvasText; }
}

/* RDV-113 : page « Rendez-vous » (design/rdv-113-rendez-vous.figcraft).
   RDV-126 : segments de filtre (liens, a11y §6) ; segments contigus de 44 px.
   RDV-129 : le segment courant n'imite plus le bouton principal (revue UX) :
   teinte d'accent, texte foncé, bord de 2 px `--brand` (3:1 contre la piste)
   et coche ; le mot et `aria-current` portent l'état (1.4.1). Bord
   transparent sur tous : même taille, visible en contraste forcé. Piste
   étroite (téléphone, zoom) : cases égales en grille (une colonne à 320 px)
   plutôt que des rangées inégales qui ne se lisent plus comme une commande. */
.filters { container-type: inline-size; }
.filters ul {
  display: inline-flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 var(--space-4); padding: var(--space-1);
  border: var(--line) solid var(--border); border-radius: var(--radius-card); background: var(--surface); list-style: none;
}
.filters a {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--space-4);
  border: var(--line-strong) solid transparent; border-radius: var(--radius-full);
  color: var(--ink-2); font-weight: 600; text-decoration: none;
}
.filters a:hover { background: var(--hover); color: var(--ink); }
.filters a[aria-current="true"] { border-color: var(--brand); background: var(--info-tint); color: var(--brand-dark); }
.filters a[aria-current="true"]::before { content: "✓\00a0"; content: "✓\00a0" / ""; }
@container (width < 40rem) {
  .filters ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
  .filters a { display: flex; }
}
@media (forced-colors: active) {
  .filters ul { border-color: CanvasText; }
  .filters a[aria-current="true"] { border-color: Highlight; text-decoration: underline; }
}
/* RDV-129 : tableau de la liste (a11y §5) ; la légende est l'introduction.
   Une seule cible par ligne. RDV-188 (RDV-4) : le prénom, sans zone étirée
   sur la ligne (`tr` positionné, incertain sous Safari iOS) ; « Voir » de
   l'historique, sans zone étirée non plus. Sous 75rem, liste en cartes sans
   `display: block` sur les cellules : en-têtes masqués, prénom suivi du
   détail, colonnes date, type et état retirées (leur contenu est sous le prénom). */
.appointments {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.appointments caption { caption-side: top; margin-bottom: var(--space-4); color: var(--ink-2); text-align: start; }
.appointments :is(th, td) {
  padding: var(--space-4) var(--space-3); border-top: var(--line) solid var(--border);
  text-align: start; vertical-align: middle;
}
.appointments thead th { border-top: 0; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.appointments tr > :first-child { padding-inline-start: var(--space-6); }
.appointments tr > :last-child { padding-inline-end: var(--space-6); }
/* RDV-188 (RDV-3) : prénom coupé entre les mots seulement, colonne d'au moins 8 rem. */
.appointments tbody th { min-width: 8rem; font-weight: 600; }
.appointments tbody th, .appointments tbody th a { overflow-wrap: break-word; }
.appointments .go { white-space: nowrap; text-align: end; }
/* RDV-188 (RDV-2) : date en graisse normale, heure en gras. */
.appointments :is(.when, .row-more) time { font-weight: 400; }
.appointments .clock { font-weight: 600; }
.appointments .pill { margin: 0; white-space: nowrap; }
.appointments .row-more { display: none; }
/* RDV-185 : adresse sous le prénom, en texte sélectionnable. */
.appointments .client-email {
  display: block; width: fit-content;
  color: var(--muted); font-size: var(--step--1); font-weight: 400; overflow-wrap: anywhere;
}
/* Prénom lien : sa ligne seule, sans la hauteur de cible du lien isolé (la
   cellule porte l'espace autour ; 24 px au moins, 2.5.8). */
.appointments tbody th a.link { min-height: 1.5rem; padding-block: 0; }
/* Cartes aussi de 64 à 75rem : les colonnes et la barre latérale n'y
   tiennent pas sans défilement (a11y §5, B6). */
@media (width < 75rem) {
  /* En-têtes « Client » et « Action » gardés pour les lecteurs d’écran, sans
     hauteur ; ceux des colonnes retirées partent avec elles. */
  .appointments thead th { padding: 0; border: 0; line-height: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .appointments tbody tr:first-child > * { border-top: 0; }
  .appointments tr > :is(.when, .what, .state) { display: none; }
  .appointments :is(th, td) { padding-block: var(--space-4); }
  .appointments tr > :first-child { padding-inline-start: var(--space-4); }
  .appointments tr > :last-child { padding-inline-end: var(--space-4); }
  .appointments .row-more { display: grid; gap: var(--space-1); margin-top: var(--space-1); font-weight: 400; }
  .appointments .pills { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
}
/* RDV-144 : tableaux du suivi des séances (administrateur) ; défilent au
   clavier sur petit écran plutôt que de masquer des colonnes (1.4.10). */
.table-scroll { overflow-x: auto; margin-bottom: var(--space-6); }
.table-scroll:focus-visible { outline: var(--focus) solid var(--focus-color); }
.sessions { width: 100%; border-collapse: collapse; background: var(--surface); }
.sessions caption { caption-side: top; margin-bottom: var(--space-3); color: var(--ink-2); text-align: start; }
.sessions :is(th, td) { padding: var(--space-3); border-top: var(--line) solid var(--border); text-align: start; white-space: nowrap; }
.sessions thead th { border-top: 0; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.sessions td, .sessions time { font-variant-numeric: tabular-nums; }
/* RDV-45 : comparaison des formules ; les libellés longs passent à la ligne. */
.plans :is(th, td) { white-space: normal; }
.plans td { min-width: 6rem; }
/* RDV-178 : consigne à la mesure de lecture ; tableau dans une carte, prix
   dans l'en-tête de colonne, libellés lisibles à 320 px (1.4.10). */
.plan-lead { max-width: var(--measure); }
/* Lien dans une phrase : en ligne, exempté de la taille de cible (2.5.8). */
.plan-lead a.link { display: inline; padding: 0; }
.plan-lead + .actions { margin-bottom: var(--space-4); }
.plans-wrap:focus-visible { outline-offset: calc(-1 * var(--focus)); }
:is(.plans, .invoices) caption { font-size: var(--step-1); font-weight: 600; color: var(--ink); }
/* RDV-46 : formulaire de paiement avant la carte des formules ; montants des
   factures alignés à droite. */
.plan-form { margin-bottom: var(--space-6); }
.invoices :is(th, td):nth-child(n+4) { text-align: end; }
.plans thead th { vertical-align: bottom; color: var(--ink); font-size: var(--step-0); font-weight: 400; }
.plans thead :is(strong, .year) { display: block; }
.plans .price { font-size: var(--step-2); font-weight: 700; line-height: var(--leading-tight); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plans :is(.per, .year) { color: var(--muted); font-size: var(--step--1); }
.plans tbody th { min-width: 10rem; font-weight: 400; color: var(--ink); }
.plans .no { color: var(--muted); }
.plans .pill { margin: 0; }
@media (max-width: 30rem) {
  .app-main .plans-wrap { padding: var(--space-4); }
  .plans :is(th, td) { padding: var(--space-2); }
}
/* RDV-158 : charge des relais. Pic : part de la capacité, débit en dessous ;
   total séparé par un trait plus fort, pas seulement par la graisse. */
.relays .sub { display: block; color: var(--muted); font-size: var(--step--1); }
.relays tfoot :is(th, td) { border-top: var(--line-strong) solid var(--ink-2); }
/* RDV-126 : pastille d'état. Le mot porte l'état ; la puce est un décor. */
.pill {
  display: inline-block; margin-top: var(--space-1); padding: 0 var(--space-3) 0 var(--space-2);
  border: var(--line) solid transparent; border-radius: var(--radius-full);
  font-size: var(--step--1); font-weight: 600; line-height: var(--leading-small);
}
.pill::before { content: "\2022\00a0"; content: "\2022\00a0" / ""; }
/* Bord pointillé : la demande se distingue des autres états quel que soit le thème. */
.pill.request { border: var(--line) dashed var(--ink-2); background: var(--info-tint); color: var(--brand-dark); }
.pill.due { background: var(--warning-tint); color: var(--warning); }
.pill.done { background: var(--success-tint); color: var(--success); }
/* RDV-198 : « Prévu », « À partir du… » : information neutre, le mot porte l'état. */
.pill:is(.neutral, .later) { background: var(--hover); color: var(--ink-2); }
/* RDV-158 : relais à ajouter ou muet (le mot porte l'état). */
.pill.alert { background: var(--error-tint); color: var(--error-dark); }
.empty-state { padding: var(--space-6); background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.empty-state p:last-child { margin-bottom: 0; }
/* RDV-130 : détail d'un rendez-vous (fiche, puis panneau de l'agenda).
   Informations et actions côte à côte si la place le permet, sinon l'une
   sous l'autre, dans l'ordre du DOM : largeur de base des cartes, sans
   requête, pour suivre le conteneur et non la fenêtre. */
.record { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4); }
.record > section { min-width: 0; margin: 0; }
.record-facts { flex: 999 1 26rem; container-type: inline-size; }
/* Sans actions, les cartes ne s'étirent pas : libellé et valeur restent proches. */
.record:not(:has(> .record-actions)) > section { max-width: 48rem; }
.record-actions { flex: 1 1 18rem; }
/* RDV-175 : carte du client sur sa propre ligne, sous les informations ;
   actions à la largeur de leur texte. RDV-187 (FIC-1) : effacement en bouton
   `danger`, comme « Annuler le rendez-vous… » ; plus d'écart avec l'export
   contre une touche à côté. */
.record-client { flex: 1 1 100%; container-type: inline-size; }
.record-client > p { max-width: var(--measure); }
.record-client .actions { align-items: center; column-gap: var(--space-6); }
/* Étroit : boutons en pleine largeur, l'un sous l'autre. */
@container (width < 30rem) { .record-client a.button { width: 100%; } }
.record > section > h2 { margin-bottom: var(--space-4); }
.record > section > :last-child { margin-bottom: 0; }
/* Libellé discret au-dessus de sa valeur ; côte à côte sur une carte large. */
.record .facts { margin: 0 0 var(--space-4); }
.record .facts > div { display: grid; gap: var(--space-1); margin: 0; padding: var(--space-3) 0; border-top: var(--line) solid var(--border); }
.record .facts > div:first-child { border-top: 0; padding-top: 0; }
.record .facts dt { color: var(--muted); font-weight: 400; }
.record .facts dt::after { content: none; }
.record .facts dd { font-weight: 600; }
.record .facts dd .pill { margin: 0; }
.record .facts .reason { display: block; margin-top: var(--space-1); color: var(--ink-2); font-weight: 400; }
@container (width >= 30rem) {
  .record .facts > div { grid-template-columns: 9rem minmax(0, 1fr); column-gap: var(--space-4); align-items: baseline; }
}
/* Actions empilées, pleine largeur, comme la maquette. */
.record-actions .actions { flex-direction: column; align-items: stretch; }
.record-actions :is(a.button, button) { width: 100%; }
.record-actions .actions .hint { margin: 0; }
/* Précédente | Page N | Suivante, sur une ligne à toutes les largeurs. */
.pager { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); margin-top: var(--space-4); }
.pager a.button { width: auto; gap: var(--space-1); white-space: nowrap; }
.pager a[rel="prev"] { grid-column: 1; justify-self: start; }
/* RDV-40 : entrée de l'export CSV, sous la liste. */
.export-entry { margin-top: var(--space-6); }
.pager p { grid-column: 2; margin: 0; text-align: center; color: var(--muted); font-size: var(--step--1); }
.pager a[rel="next"] { grid-column: 3; justify-self: end; }
/* RDV-188 (RDV-5) : très étroit (320 px), boutons sur la première ligne,
   « Page N » entier sur la seconde. */
@media (width < 24rem) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager p { grid-column: 1 / -1; grid-row: 2; }
  .pager a[rel="next"] { grid-column: 2; }
}
:is(button, a.button).secondary.danger { border-color: var(--error); color: var(--error); }
:is(button, a.button).secondary.danger:hover { background: var(--error-tint); }
/* RDV-141 : accent et rouge d'alerte peuvent avoir la même luminance (a11y.md
   §11 ; couleur libre) : l'action qui détruit porte aussi un symbole, décoratif (texte vide). */
:is(button, a.button).secondary.danger::before { content: "\26A0\FE0E\00a0"; content: "\26A0\FE0E\00a0" / ""; }

/* RDV-119 : assistant de premier usage (maquette design/rdv-119-premier-usage.figcraft).
   Une colonne ; liste des étapes masquée sur mobile, « Étape n sur 3 » reste. */
.setup { max-width: var(--measure); }
.setup .lead { color: var(--ink-2); }
.setup-position { margin: 0 0 var(--space-2); color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }
.setup-bar { display: flex; gap: var(--space-1); margin-bottom: var(--space-3); }
.setup-bar span { flex: 1; height: .25rem; border-radius: var(--radius-full); background: var(--border); }
.setup-bar .on { background: var(--brand); }
.setup-steps { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-4); padding: 0; list-style: none; color: var(--ink-2); font-size: var(--step--1); }
.setup-steps [aria-current] { color: var(--ink); }
@media (width < 40rem) { .setup-steps { display: none; } }
.setup-day-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0 var(--space-4); }
.setup-day-list .check { margin-top: 0; }
@media (forced-colors: active) { .setup-bar .on { background: Highlight; } .setup-bar span { border: var(--line) solid CanvasText; } }
.setup .inline + .hint { margin-top: var(--space-2); }
/* Accueil : « Reprendre l'assistant » détaché de la liste. */
.steps > ul + p { margin-top: var(--space-5); }

/* RDV-38 (S8) : agenda à la semaine (design/rdv-125/a-galet-agenda-*.png,
   a11y.md §8). Une seule structure : les sept jours en liste, puis, à partir
   de 80rem, en grille à l'échelle des heures. Lignes de 15 min partagées par
   sous-grille ; positions `at-N` (début) et `span-N` (lignes) générées en fin
   de feuille (agenda_page.rs). Revue UX : lignes de hauteur fixe, la
   hauteur dit la durée ; un bloc garde 2,75rem au moins et passe devant le
   suivant au survol et au focus. Dans la grille, le type est lu mais pas
   montré, et chaque ligne de texte finit par « … » plutôt que de couper un
   mot (nom accessible, liste du jour et détail gardent le texte entier) ;
   jamais sur le lien, dont l'anneau de focus reste entier. */
.agenda-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-6); margin-bottom: var(--space-5); }
.agenda-head h1 { margin-bottom: var(--space-1); }
.agenda-zone { margin: 0; color: var(--ink-2); }
.week-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.week-bar h2 { margin: 0; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.week-bar a.button { width: auto; }
.week-step {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  inline-size: var(--target); block-size: var(--target);
  border: var(--line) solid var(--border-strong); border-radius: var(--radius-full);
  background: var(--surface); color: var(--ink); font-size: var(--step-2); line-height: 1; text-decoration: none;
}
.week-step:hover { background: var(--hover); }
/* Bande des jours (sous 80rem) : ancres vers la liste de chaque jour. RDV-140 :
   7 colonnes égales sur toute la largeur, une rangée même à 320 px (cases
   de 37 px : 2.5.8 tenu, 2.5.5 cédé). */
.day-band ul {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1);
  margin: 0 0 var(--space-5); padding: 0; list-style: none;
}
.day-band a {
  display: flex; flex-direction: column; align-items: center; min-block-size: var(--target);
  padding: var(--space-2) 0; border: var(--line-strong) solid transparent; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); line-height: var(--leading-tight); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.day-band a:hover { background: var(--hover); }
.band-name, .band-count { color: var(--ink-2); font-size: var(--step--1); }
.band-number { font-weight: 700; }
/* Jours en liste. RDV-181 (TR-6) : jour courant en disque d'accent seul,
   sans cadre qui ressemble à l'anneau de focus. */
.week-hours, .week-day > [aria-hidden="true"] { display: none; }
.week-days { display: grid; gap: var(--space-6); margin: 0; padding: 0; list-style: none; }
.week-day, .day-run { scroll-margin-top: var(--space-4); }
.week-day h3 { margin: 0 0 var(--space-3); font-size: var(--step-1); }
.week-day[aria-current="date"] .day-number, .day-band a[aria-current="date"] .band-number {
  display: inline-grid; place-items: center; min-inline-size: 1.75rem; block-size: 1.75rem; padding-inline: var(--space-1);
  border: var(--line) solid transparent; border-radius: var(--radius-full); background: var(--brand); color: var(--on-brand);
}
.day-empty { margin: 0; color: var(--muted); }
/* RDV-181 (AGE-2, AGE-3) : plages du jour écrites ; jours vides consécutifs
   réunis en une ligne, dans la liste seulement. */
.day-open { margin: 0 0 var(--space-3); color: var(--open); }
.day-run p { margin: 0; color: var(--muted); }
@media (width < 80rem) { .week-day.in-run { display: none; } }
.agenda-legend { display: none; }
/* Flex et non grille : les classes `at-N` ne servent qu'à la grille. */
.day-blocks { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
/* Bloc : un seul lien ; le mot du statut et un trait de forme portent l'état
   (bord gauche plein, bord entier pour une demande), jamais l'accent seul.
   Liste : heure et prénom sur une ligne, puis type et état entier ; le mot
   court ne sert qu'à la grille. */
.block a {
  display: block; min-block-size: var(--target);
  padding: var(--space-3) var(--space-4); border: var(--line) solid transparent; border-inline-start: var(--bar) solid transparent;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card);
  color: var(--ink); line-height: var(--leading-small); text-decoration: none; overflow-wrap: anywhere;
}
.block a:hover { background: var(--hover); }
.block-head :is(time, strong) { font-weight: 650; }
.block-short { display: none; }
.block-type, .block-state { display: block; color: var(--ink-2); font-size: var(--step--1); }
.block-state { font-weight: 600; }
.block.due a { border-inline-start-color: var(--warning); }
.block.done a { border-inline-start-color: var(--success); }
/* Bord plein : le pointillé désigne la plage ouverte (RDV-181). */
.block.request a { border: var(--line-strong) solid var(--ink-2); }
.block.neutral a { background: var(--surface-2); }
/* RDV-181 (TR-6) : bloc choisi en barre d'accent plus large que celle de
   l'état, avec `aria-current` ; plus d'anneau confondu avec le focus. */
.block.selected a { border-inline-start: calc(var(--bar) + var(--line-strong)) solid var(--brand); }
.block a:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
/* Liste du jour (grille seulement) et détail. */
.agenda-below { display: grid; gap: var(--space-5); margin-top: var(--space-6); align-items: start; }
.agenda-list { display: none; }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-4); margin-bottom: var(--space-3); }
.detail-head h2 { margin: 0; }
#detail { scroll-margin-top: var(--space-4); }
#detail:focus { outline: none; }
#detail:focus-visible { outline: var(--focus) solid var(--focus-color); outline-offset: var(--offset); }
@media (width >= 80rem) {
  .day-band { display: none; }
  .week-grid {
    display: grid; grid-template-columns: 3.5rem repeat(7, minmax(0, 1fr));
    grid-template-rows: auto; grid-auto-rows: 1.5rem; gap: 0 var(--space-2);
    padding: var(--space-5) var(--space-4) var(--space-4) var(--space-2);
    border: var(--line) solid transparent; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card);
  }
  .week-hours {
    display: grid; grid-column: 1; grid-row-start: 2; grid-template-rows: subgrid;
    color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums;
  }
  /* Libellé posé sur le trait de son heure. */
  .week-hours > span { grid-column: 1; translate: 0 -.65lh; }
  .week-days { display: grid; grid-column: 2 / -1; grid-row-start: 1; grid-template-columns: subgrid; grid-template-rows: subgrid; gap: inherit; }
  .week-day { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .week-day > * { grid-column: 1; }
  .week-day::before { content: ""; grid-column: 1; grid-row: 2 / -1; border-radius: var(--radius-sm); background: var(--surface-2); }
  .week-day > [aria-hidden="true"] { display: block; }
  .week-day h3 {
    display: flex; flex-direction: column; align-items: center; grid-row: 1; margin: 0 0 var(--space-3);
    color: var(--ink-2); font-size: var(--step--1); font-weight: 400;
  }
  .week-day .day-number { color: var(--ink); font-size: var(--step-1); font-weight: 650; }
  .day-month, .day-empty, .day-open, .block-type, .block-state {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .day-run { display: none; }
  /* RDV-181 (AGE-2) : bord pointillé à 3:1 et légende sous la grille. */
  .open, .legend-open { border: var(--line) dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
  .agenda-legend { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--ink-2); font-size: var(--step--1); }
  .legend-open { inline-size: 1.5rem; block-size: 1rem; }
  .day-shade { padding: var(--space-3) var(--space-1) 0; color: var(--muted); font-size: var(--step--1); text-align: center; }
  .day-shade.closed {
    border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 600;
    background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--hover) 6px 12px);
  }
  .now-line { align-self: start; z-index: 1; block-size: var(--line-strong); background: var(--now); }
  .day-blocks { display: grid; grid-row: 2 / -1; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); grid-auto-columns: minmax(0, 1fr); gap: 0 var(--space-1); }
  .block { display: flex; min-block-size: var(--target); padding-block-end: 2px; }
  .block { position: relative; }
  .block:is(:hover, :focus-within) { z-index: 2; }
  /* RDV-181 (AGE-1) : deux lignes, visibles dès 30 min : heure et prénom,
     finis par « … » seulement s'ils dépassent, puis le mot court de l'état,
     jamais coupé (il tient dans une colonne à 1280 px). Interligne serré et
     marge réduite : les deux lignes tiennent dans les 3rem d'un bloc de
     30 min ; elles ne rétrécissent jamais (1.4.12 : elles débordent). */
  .block a {
    display: flex; flex-direction: column; flex: 1; min-inline-size: 0;
    padding: calc(var(--space-1) / 2) var(--space-2); box-shadow: none; font-size: var(--step--1); line-height: var(--leading-tight);
  }
  .block-head, .block-short { flex: none; }
  .block-head { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .block-short { display: block; color: var(--ink-2); font-weight: 600; }
  .block.due a { background: var(--warning-tint); }
  .block.done a { background: var(--success-tint); }
  .block.neutral a { background: var(--hover); }
  .block-head { font-size: var(--step-0); }
  .agenda-below { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .agenda-list {
    display: block; padding: var(--space-6);
    border: var(--line) solid transparent; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card);
  }
  .agenda-list h2 { font-size: var(--step-1); }
  .day-rows { margin: 0; padding: 0; list-style: none; }
  .day-rows > li {
    display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
    padding: var(--space-3) 0; border-top: var(--line) solid var(--border);
  }
  .day-rows > li:first-child { border-top: 0; }
  .day-rows time { font-weight: 650; font-variant-numeric: tabular-nums; }
  .row-who { display: flex; flex-direction: column; }
  .row-who .link { padding-block: 0; font-weight: 600; }
  .row-who .what { color: var(--muted); font-size: var(--step--1); }
  .day-rows .pill { margin: 0; }
}
@media (forced-colors: active) {
  .week-grid, .agenda-list, .block a, .open, .legend-open, .day-band a { border-color: CanvasText; }
  .block.selected a { border-inline-start-color: Highlight; }
  .now-line { background: CanvasText; }
  .week-day[aria-current="date"] .day-number, .day-band a[aria-current="date"] .band-number { border-color: Highlight; }
}

/* RDV-173 (maquette design/rdv-173-presentation.figcraft) : présentation du
   consultant sous son nom, sur la page d'entrée de réservation. Largeur de
   lecture bornée, retours à la ligne gardés, mot long coupé (1.4.10) ; marge
   basse plus grande qu'une ligne vide : la consigne n'a pas l'air d'en faire
   partie (revue UX). `slots.js` la replie à quatre lignes sur écran étroit. */
.bio { max-width: 65ch; margin: 0 0 var(--space-6); color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.bio.folded { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; margin-bottom: 0; }
.bio + .intro { margin-top: 0; }
:is(button, a.button).bio-more {
  display: flex; width: fit-content; min-height: var(--target); margin: 0 0 var(--space-5); padding: 0;
  border-color: transparent; background: none; color: var(--brand-dark);
  text-decoration: underline; text-underline-offset: var(--offset);
}
:is(button, a.button).bio-more:hover { border-color: transparent; background: none; text-decoration-thickness: 2px; }
/* Compteur de `counter.js` : nombre, et couleur d'erreur au-delà (1.4.1). */
.hint.counter { margin: var(--space-1) 0 0; }
.hint.counter.over { color: var(--error); font-weight: 600; }
/* RDV-38 : lignes de la grille de l'agenda, générées par agenda_page.rs. */
.at-1 { grid-row-start: 1; } .span-1 { grid-row-end: span 1; }
.at-2 { grid-row-start: 2; } .span-2 { grid-row-end: span 2; }
.at-3 { grid-row-start: 3; } .span-3 { grid-row-end: span 3; }
.at-4 { grid-row-start: 4; } .span-4 { grid-row-end: span 4; }
.at-5 { grid-row-start: 5; } .span-5 { grid-row-end: span 5; }
.at-6 { grid-row-start: 6; } .span-6 { grid-row-end: span 6; }
.at-7 { grid-row-start: 7; } .span-7 { grid-row-end: span 7; }
.at-8 { grid-row-start: 8; } .span-8 { grid-row-end: span 8; }
.at-9 { grid-row-start: 9; } .span-9 { grid-row-end: span 9; }
.at-10 { grid-row-start: 10; } .span-10 { grid-row-end: span 10; }
.at-11 { grid-row-start: 11; } .span-11 { grid-row-end: span 11; }
.at-12 { grid-row-start: 12; } .span-12 { grid-row-end: span 12; }
.at-13 { grid-row-start: 13; } .span-13 { grid-row-end: span 13; }
.at-14 { grid-row-start: 14; } .span-14 { grid-row-end: span 14; }
.at-15 { grid-row-start: 15; } .span-15 { grid-row-end: span 15; }
.at-16 { grid-row-start: 16; } .span-16 { grid-row-end: span 16; }
.at-17 { grid-row-start: 17; } .span-17 { grid-row-end: span 17; }
.at-18 { grid-row-start: 18; } .span-18 { grid-row-end: span 18; }
.at-19 { grid-row-start: 19; } .span-19 { grid-row-end: span 19; }
.at-20 { grid-row-start: 20; } .span-20 { grid-row-end: span 20; }
.at-21 { grid-row-start: 21; } .span-21 { grid-row-end: span 21; }
.at-22 { grid-row-start: 22; } .span-22 { grid-row-end: span 22; }
.at-23 { grid-row-start: 23; } .span-23 { grid-row-end: span 23; }
.at-24 { grid-row-start: 24; } .span-24 { grid-row-end: span 24; }
.at-25 { grid-row-start: 25; } .span-25 { grid-row-end: span 25; }
.at-26 { grid-row-start: 26; } .span-26 { grid-row-end: span 26; }
.at-27 { grid-row-start: 27; } .span-27 { grid-row-end: span 27; }
.at-28 { grid-row-start: 28; } .span-28 { grid-row-end: span 28; }
.at-29 { grid-row-start: 29; } .span-29 { grid-row-end: span 29; }
.at-30 { grid-row-start: 30; } .span-30 { grid-row-end: span 30; }
.at-31 { grid-row-start: 31; } .span-31 { grid-row-end: span 31; }
.at-32 { grid-row-start: 32; } .span-32 { grid-row-end: span 32; }
.at-33 { grid-row-start: 33; } .span-33 { grid-row-end: span 33; }
.at-34 { grid-row-start: 34; } .span-34 { grid-row-end: span 34; }
.at-35 { grid-row-start: 35; } .span-35 { grid-row-end: span 35; }
.at-36 { grid-row-start: 36; } .span-36 { grid-row-end: span 36; }
.at-37 { grid-row-start: 37; } .span-37 { grid-row-end: span 37; }
.at-38 { grid-row-start: 38; } .span-38 { grid-row-end: span 38; }
.at-39 { grid-row-start: 39; } .span-39 { grid-row-end: span 39; }
.at-40 { grid-row-start: 40; } .span-40 { grid-row-end: span 40; }
.at-41 { grid-row-start: 41; } .span-41 { grid-row-end: span 41; }
.at-42 { grid-row-start: 42; } .span-42 { grid-row-end: span 42; }
.at-43 { grid-row-start: 43; } .span-43 { grid-row-end: span 43; }
.at-44 { grid-row-start: 44; } .span-44 { grid-row-end: span 44; }
.at-45 { grid-row-start: 45; } .span-45 { grid-row-end: span 45; }
.at-46 { grid-row-start: 46; } .span-46 { grid-row-end: span 46; }
.at-47 { grid-row-start: 47; } .span-47 { grid-row-end: span 47; }
.at-48 { grid-row-start: 48; } .span-48 { grid-row-end: span 48; }
.at-49 { grid-row-start: 49; } .span-49 { grid-row-end: span 49; }
.at-50 { grid-row-start: 50; } .span-50 { grid-row-end: span 50; }
.at-51 { grid-row-start: 51; } .span-51 { grid-row-end: span 51; }
.at-52 { grid-row-start: 52; } .span-52 { grid-row-end: span 52; }
.at-53 { grid-row-start: 53; } .span-53 { grid-row-end: span 53; }
.at-54 { grid-row-start: 54; } .span-54 { grid-row-end: span 54; }
.at-55 { grid-row-start: 55; } .span-55 { grid-row-end: span 55; }
.at-56 { grid-row-start: 56; } .span-56 { grid-row-end: span 56; }
.at-57 { grid-row-start: 57; } .span-57 { grid-row-end: span 57; }
.at-58 { grid-row-start: 58; } .span-58 { grid-row-end: span 58; }
.at-59 { grid-row-start: 59; } .span-59 { grid-row-end: span 59; }
.at-60 { grid-row-start: 60; } .span-60 { grid-row-end: span 60; }
.at-61 { grid-row-start: 61; } .span-61 { grid-row-end: span 61; }
.at-62 { grid-row-start: 62; } .span-62 { grid-row-end: span 62; }
.at-63 { grid-row-start: 63; } .span-63 { grid-row-end: span 63; }
.at-64 { grid-row-start: 64; } .span-64 { grid-row-end: span 64; }
.at-65 { grid-row-start: 65; } .span-65 { grid-row-end: span 65; }
.at-66 { grid-row-start: 66; } .span-66 { grid-row-end: span 66; }
.at-67 { grid-row-start: 67; } .span-67 { grid-row-end: span 67; }
.at-68 { grid-row-start: 68; } .span-68 { grid-row-end: span 68; }
.at-69 { grid-row-start: 69; } .span-69 { grid-row-end: span 69; }
.at-70 { grid-row-start: 70; } .span-70 { grid-row-end: span 70; }
.at-71 { grid-row-start: 71; } .span-71 { grid-row-end: span 71; }
.at-72 { grid-row-start: 72; } .span-72 { grid-row-end: span 72; }
.at-73 { grid-row-start: 73; } .span-73 { grid-row-end: span 73; }
.at-74 { grid-row-start: 74; } .span-74 { grid-row-end: span 74; }
.at-75 { grid-row-start: 75; } .span-75 { grid-row-end: span 75; }
.at-76 { grid-row-start: 76; } .span-76 { grid-row-end: span 76; }
.at-77 { grid-row-start: 77; } .span-77 { grid-row-end: span 77; }
.at-78 { grid-row-start: 78; } .span-78 { grid-row-end: span 78; }
.at-79 { grid-row-start: 79; } .span-79 { grid-row-end: span 79; }
.at-80 { grid-row-start: 80; } .span-80 { grid-row-end: span 80; }
.at-81 { grid-row-start: 81; } .span-81 { grid-row-end: span 81; }
.at-82 { grid-row-start: 82; } .span-82 { grid-row-end: span 82; }
.at-83 { grid-row-start: 83; } .span-83 { grid-row-end: span 83; }
.at-84 { grid-row-start: 84; } .span-84 { grid-row-end: span 84; }
.at-85 { grid-row-start: 85; } .span-85 { grid-row-end: span 85; }
.at-86 { grid-row-start: 86; } .span-86 { grid-row-end: span 86; }
.at-87 { grid-row-start: 87; } .span-87 { grid-row-end: span 87; }
.at-88 { grid-row-start: 88; } .span-88 { grid-row-end: span 88; }
.at-89 { grid-row-start: 89; } .span-89 { grid-row-end: span 89; }
.at-90 { grid-row-start: 90; } .span-90 { grid-row-end: span 90; }
.at-91 { grid-row-start: 91; } .span-91 { grid-row-end: span 91; }
.at-92 { grid-row-start: 92; } .span-92 { grid-row-end: span 92; }
.at-93 { grid-row-start: 93; } .span-93 { grid-row-end: span 93; }
.at-94 { grid-row-start: 94; } .span-94 { grid-row-end: span 94; }
.at-95 { grid-row-start: 95; } .span-95 { grid-row-end: span 95; }
.at-96 { grid-row-start: 96; } .span-96 { grid-row-end: span 96; }
.at-97 { grid-row-start: 97; } .span-97 { grid-row-end: span 97; }
