/* Hallmark · checked: 2026-11-14 · genre: modern-minimal (inferred)
 * floor: 0 FAIL · fixed: 34, 26a (footer ring on ink), 26b, 48, 54, 63, F16, F26
 * then restyled in the brand's own system (2026-11-14, "améliore le design existant fois 1000"):
 * hero fills the first screen (44c), section heads at 52px (78), sections given mass (77):
 * a register across the grid, three statements, two names, the address set big on ink;
 * then a sorting floor: orange, yellow and rose in flat fields, robots on the plane (robots.js)
 * dismissed 34 at 320px: scrollWidth equals the viewport; the clipped rings are decor, measured in Chrome
 * waive 80: the rings are the brand pattern (Damien, 2026-09-04) and the robots are the page's idea, kept by request
 * waive 19: the em dash only separates the site name in <title>, a template of the studio engine
 * built: the project · redesign: restyle (brand kept: paper, plane, rings, Omnes, Figtree) · v2.0.0 */

/* bureauduclic.ch — une feuille quadrillée bleue, encre marine, un plan isométrique où les
   anneaux respirent en sonar et où une flotte de robots trie des colis. Le quadrillage est là dès le premier
   rendu, sans tracé d'entrée (Damien, 2026-09-04 : « affiche la grille directement »). */

/* ---------- Polices ---------- */

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

/* ---------- Jetons ---------- */

:root {
  --ink: #1f2536;
  --white: #ffffff;
  --rose: #fbe8f2;
  --blue: #c0d3eb;
  /* Les couleurs du centre de tri (2026-11-14) : l'orange des robots, le jaune des colis, le
     rose de la marque en plus soutenu. En aplats francs, jamais en dégradé. Encre dessus. */
  --orange: #f26a3d;
  --veil: rgb(255 255 255 / 0.36); /* l'aplat des sections alternées */
  --yellow: #f6c744;
  --rose-strong: #f3a6c6;
  /* Le bleu des stations : une peinture au sol neutre, plus dense que le papier. Jaune, vert
     et rose sont réservés aux signaux de négociation. */
  --dock: #94b3df;
  /* Le vert de la voie libre : les dalles du robot qui passe, après négociation. */
  --green: #5bc59b;
  /* Papier bleu, motif blanc (Damien, 2026-09-04, « pour un moment ») ; le rose reste à portée.
     Sur l'encre, le texte est blanc : boutons et mot du logo. Changer --paper suffit. */
  --paper: var(--blue); /* le rose (var(--rose)) a été revu le 2026-09-04 et écarté : motif trop pâle dessus */
  --pattern: var(--white);
  --grid-line: color-mix(in oklab, var(--pattern) 70%, transparent);
  --ring: var(--pattern);
  --ring-base: 0.45;
  --ink-soft: color-mix(in oklab, var(--ink) 72%, var(--paper));
  /* Opacités du fondu du motif (mask-image) : seule la couche alpha compte. */
  --fade-40: rgb(0 0 0 / 0.4);
  --fade-75: rgb(0 0 0 / 0.75);
  --fade-35: rgb(0 0 0 / 0.35);
  --fade-full: rgb(0 0 0);

  /* Le module : conteneur de 12 colonnes, cellule de proportion --cell-ratio (7/6 sur la feuille
     de construction, 1 pour un carré). Sous 1152 px la cellule suit la fenêtre. */
  --cols: 12;
  --cell-ratio: 1;
  --cell-w: min(6rem, calc(100vw / var(--cols)));
  --cell-h: calc(var(--cell-w) * var(--cell-ratio));
  --site-w: calc(var(--cell-w) * var(--cols));
  --gutter: calc(var(--cell-w) / 2);
  --inset: 0.75rem;

  --font-display: "Omnes", "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Figtree", ui-sans-serif, system-ui, sans-serif;

  /* Rythme : tout multiple de 24 px, quatre lignes par cellule de 96 px. Les lignes du
     quadrillage tombent ainsi entre deux lignes de texte, jamais dedans. */
  --text: 1rem;
  --text-s: 0.9375rem;
  --text-l: 1.125rem;
  --leading: 1.5rem;
  --h3: 1.375rem;
  --h2: clamp(2.25rem, 1.4rem + 2.4vw, 3.25rem);
  --h1: clamp(2.75rem, 1.2rem + 4.6vw, 5.5rem);
  /* Texte sur l'encre (la correspondance, le pied de page). */
  --on-ink-soft: color-mix(in oklab, var(--white) 78%, var(--ink));
  --on-ink-line: color-mix(in oklab, var(--white) 16%, var(--ink));
}

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

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

html {
  overflow-x: clip;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text) / var(--leading) var(--font-text);
  -webkit-font-smoothing: antialiased;
}

html {
  scrollbar-color: var(--ink-soft) var(--paper);
  caret-color: var(--ink);
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

p,
ul,
ol,
dl {
  margin: 0 0 var(--leading);
}

strong {
  font-weight: 700;
}

/* ---------- Le plan isométrique ---------- */

/* Projection : rotateX(56°) puis rotateZ(-45°), sans perspective — donc une transformation
   affine 2D : x' = 0,70711 (x + y), y' = 0,39531 (y - x). Le calque, lui, reste plat et suit
   la page ; c'est ce qui permet de couvrir toute sa hauteur sans calque 3D géant. Le contenu
   reste à plat par-dessus ; il ne s'inscrit plus dans la grille, c'est le prix du relief. */
:root {
  --iso-x: 0.70711;
  --iso-y: 0.39531;
  --iso-cell: 6rem;
  --iso: matrix(0.70711, -0.39531, 0.70711, 0.39531, 0, 0);
}

.rings {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
  z-index: 0;
  /* Fondu en haut et en bas de page : le motif s'atténue sous l'en-tête et avant le pied de
     page, comme un plan qui se prolonge à l'infini (Damien, 2026-09-04). Doux dans les deux
     sens (« moins violent ») : 40 % tout en haut, plein à 840 px ; plein jusqu'à 1 080 px du
     bas, 35 % au bord du pied de page. */
  -webkit-mask-image: linear-gradient(to bottom, var(--fade-40) 0, var(--fade-75) 360px, var(--fade-full) 840px, var(--fade-full) calc(100% - 1080px), var(--fade-35) calc(100% - 48px));
  mask-image: linear-gradient(to bottom, var(--fade-40) 0, var(--fade-75) 360px, var(--fade-full) 840px, var(--fade-full) calc(100% - 1080px), var(--fade-35) calc(100% - 48px));
}

/* Le quadrillage projeté est périodique : une tuile de 2·iso-x × 2·iso-y cellules contient
   exactement ses deux diagonales, une couche par famille de lignes. Les nœuds sont aux coins
   des tuiles, donc en (0, 0). Affiché tel quel au chargement. */
.rings::before,
.rings::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: calc(2 * var(--iso-x) * var(--iso-cell)) calc(2 * var(--iso-y) * var(--iso-cell));
}
.rings::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='0' x2='100' y2='100' stroke='%23fff' stroke-opacity='.7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
.rings::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='100' x2='100' y2='0' stroke='%23fff' stroke-opacity='.7' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

/* ---------- Les anneaux : neuf ellipses de rayons 1 à 9 cellules ---------- */

/* Les foyers du fond à 65 % : le sonar reste en retrait du réseau de cubes sans s'effacer
   (Damien, 2026-09-04 : 45 % choisi sur planche, puis « augmente la visibilité des sonars »).
   Le quadrillage, lui, garde sa pleine valeur. */
.rings .ripple {
  opacity: 0.65;
}
.ripple {
  position: absolute;
  width: calc(var(--iso-cell) * 18);
  height: calc(var(--iso-cell) * 18);
  margin: calc(-9 * var(--iso-cell)) 0 0 calc(-9 * var(--iso-cell));
  transform-origin: 50% 50%;
  transform: var(--iso);
  pointer-events: none;
}
.ripple svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ripple ellipse {
  cx: 50%;
  cy: 50%;
  rx: calc(var(--n) * var(--iso-cell));
  ry: calc(var(--n) * var(--iso-cell));
  fill: none;
  stroke: var(--ring);
  stroke-width: 1;
  opacity: var(--ring-base);
}
.ripple ellipse:nth-child(1) { --n: 1; }
.ripple ellipse:nth-child(2) { --n: 2; }
.ripple ellipse:nth-child(3) { --n: 3; }
.ripple ellipse:nth-child(4) { --n: 4; }
.ripple ellipse:nth-child(5) { --n: 5; }
.ripple ellipse:nth-child(6) { --n: 6; }
.ripple ellipse:nth-child(7) { --n: 7; }
.ripple ellipse:nth-child(8) { --n: 8; }
.ripple ellipse:nth-child(9) { --n: 9; }

/* Les foyers : le damier de neuf cellules du plan, mais chaque foyer est décalé de quelques
   cellules (toujours sur un nœud), un tiers est supprimé (un quart d'abord, puis quatre foyers
   de plus : « un peu moins de sonar », puis celui du bord gauche dont les anneaux passaient
   derrière les cubes ; les foyers 3 et 5 sont plafonnés pour la même raison — Damien,
   2026-09-04), le nombre d'anneaux varie et chaque
   foyer bat avec sa propre phase — sinon le réseau fait moquette (Damien, 2026-09-04). Deux
   foyers ne sont jamais à moins de 13 cellules l'un de l'autre, ni à moins de 560 px de
   hauteur dans la même colonne projetée. Coordonnées --u/--v en cellules du plan. */
.rings .ripple {
  left: calc(var(--iso-x) * (var(--u) + var(--v)) * var(--iso-cell));
  top: calc(var(--iso-y) * (var(--v) - var(--u)) * var(--iso-cell));
}
.rings .ripple:nth-child(1) { --u: 21; --v: 19; --phase: -2.8s; }
.rings .ripple:nth-child(1) ellipse:nth-child(n+6) { display: none; }
.rings .ripple:nth-child(2) { --u: 11; --v: 10; --phase: -1.0s; }
.rings .ripple:nth-child(3) { --u: -6; --v: 10; --phase: -2.9s; }
.rings .ripple:nth-child(3) ellipse:nth-child(n+7) { display: none; }
.rings .ripple:nth-child(4) { --u: 7; --v: 26; --phase: -3.1s; }
.rings .ripple:nth-child(4) ellipse:nth-child(n+6) { display: none; }
.rings .ripple:nth-child(5) { --u: -12; --v: 29; --phase: -0.0s; }
.rings .ripple:nth-child(5) ellipse:nth-child(n+6) { display: none; }
.rings .ripple:nth-child(6) { --u: -29; --v: 28; --phase: -3.1s; }
.rings .ripple:nth-child(6) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(7) { --u: -17; --v: 56; --phase: -2.2s; }
.rings .ripple:nth-child(7) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(8) { --u: -36; --v: 39; --phase: -0.7s; }
.rings .ripple:nth-child(9) { --u: -35; --v: 52; --phase: -0.9s; }
.rings .ripple:nth-child(10) { --u: -42; --v: 65; --phase: -0.9s; }
.rings .ripple:nth-child(11) { --u: -60; --v: 61; --phase: -1.5s; }
.rings .ripple:nth-child(11) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(12) { --u: -47; --v: 82; --phase: -0.2s; }
.rings .ripple:nth-child(12) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(13) { --u: -60; --v: 84; --phase: -1.3s; }
.rings .ripple:nth-child(13) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(14) { --u: -81; --v: 79; --phase: -0.1s; }
.rings .ripple:nth-child(14) ellipse:nth-child(n+6) { display: none; }
.rings .ripple:nth-child(15) { --u: -62; --v: 98; --phase: -2.7s; }
.rings .ripple:nth-child(15) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(16) { --u: -70; --v: 111; --phase: -2.9s; }
.rings .ripple:nth-child(16) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(17) { --u: -84; --v: 102; --phase: -3.0s; }
.rings .ripple:nth-child(17) ellipse:nth-child(n+8) { display: none; }
.rings .ripple:nth-child(18) { --u: -81; --v: 120; --phase: -0.6s; }
.rings .ripple:nth-child(18) ellipse:nth-child(n+6) { display: none; }
.rings .ripple:nth-child(19) { --u: -102; --v: 100; --phase: -1.3s; }
.rings .ripple:nth-child(19) ellipse:nth-child(n+6) { display: none; }

/* Sonar : aucune géométrie ne bouge. Une onde d'opacité part de chaque foyer et traverse ses
   anneaux l'un après l'autre ; chaque foyer a sa phase, et le retard négatif fait que le plan
   est déjà vivant au premier rendu. */
.rings ellipse {
  animation: sonar 3.5s cubic-bezier(0.3, 0, 0.5, 1) infinite;
  animation-delay: calc(var(--phase, 0s) + var(--n) * 0.18s - 3.5s);
}

@keyframes sonar {
  0%, 100% { opacity: var(--ring-base); stroke-width: 1; }
  7% { opacity: 1; stroke-width: 2; }
  26% { opacity: var(--ring-base); stroke-width: 1; }
}

/* ---------- Le centre de tri ---------- */

/* Le centre de tri (posé par robots.js) : un canvas posé dans la page, sous le contenu,
   au-dessus du quadrillage ; il défile avec elle (le script en règle la position et la
   hauteur). Il ne prend aucun pointeur. */
.robots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- En-tête ---------- */

.site-header {
  position: relative;
  z-index: 1;
  width: var(--site-w);
  min-height: var(--cell-h);
  margin-inline: auto;
  padding: 0 var(--inset);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  color: var(--ink);
  text-decoration: none;
}
.brand .logo {
  height: clamp(2.75rem, 2rem + 1.5vw, 3.5rem);
  width: auto;
  overflow: visible;
}
.logo__plate,
.logo__burst {
  fill: currentColor;
}
.logo__word {
  fill: var(--white);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1rem, 0.5rem + 1.5vw, 2rem);
}
.site-nav a {
  display: inline-block;
  padding: 0.6rem 0;
  font: 500 1rem / 1 var(--font-display);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a:active,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* ---------- Sections : 12 colonnes, chaque note sa composition ---------- */

/* Refonte du 2026-11-14 (Antoine : « améliorer le design existant fois 1000 », « soit
   libre ») : le système reste, papier, plan, sonar, Omnes et Figtree ; l'échelle et
   la composition changent. Un hero qui tient l'écran, des titres de section à la mesure de la
   page, des sections qui ont de la masse, une fin de page en pleine encre. */

main {
  position: relative;
  z-index: 1;
}

main > section {
  width: var(--site-w);
  margin-inline: auto;
  padding-block: calc(var(--leading) * 7) calc(var(--leading) * 3);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, var(--cell-w)));
  align-content: start;
}

main > section > * {
  grid-column: 1 / 8;
  padding-inline: var(--inset);
  min-width: 0;
}

main > section > h2 {
  grid-column: 1 / 10;
  font-size: var(--h2);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: calc(var(--leading) * 1.5);
  overflow-wrap: break-word;
}
main > section > h2[id] {
  scroll-margin-top: var(--leading);
}

.lede {
  font-size: var(--text-l);
  line-height: calc(var(--leading) * 1.25);
}

.note {
  font: 500 var(--text) / var(--leading) var(--font-display);
}

main ul:not([class]) {
  list-style: none;
  padding: 0 var(--inset);
}
main ul:not([class]) > li {
  position: relative;
  padding-left: 1.25rem;
}
main ul:not([class]) > li + li {
  margin-top: calc(var(--leading) / 2);
}
main ul:not([class]) > li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--leading) 1.75rem;
  margin-top: calc(var(--leading) / 2);
}
.cta > a {
  font: 600 var(--text) / var(--leading) var(--font-text);
  text-decoration: none;
}
.cta > a:not(.mail) {
  background: var(--ink);
  color: var(--white);
  padding: 0.9rem 1.5rem;
  box-shadow: inset 0 0 0 1px var(--ink);
  transition: background-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.cta > a:not(.mail):hover {
  background: var(--orange);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--orange);
}
.cta > a:not(.mail):active {
  transform: translateY(1px);
}
.cta > a.mail {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ---------- Hero : le premier écran entier, le titre à gauche, le réseau à droite ---------- */

[data-editable="hero"] {
  min-height: calc(100svh - var(--cell-h));
  padding-block: calc(var(--leading) * 3) calc(var(--leading) * 4);
  align-content: center;
}
[data-editable="hero"] > * {
  grid-column: 1 / 7;
}
[data-editable="hero"] > h1 {
  grid-column: 1 / 8;
  font-size: var(--h1);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: calc(var(--leading) * 1.5);
  overflow-wrap: break-word;
}
[data-editable="hero"] > .lede {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: calc(var(--leading) * 1.5);
}
/* La légende du centre de tri : n'existe que là où les robots roulent (JavaScript, écran
   large, mouvement autorisé). Trois pastilles aux couleurs des dalles. */
.hint {
  margin: calc(var(--leading) * 2) 0 0;
  max-width: 30rem;
  font-size: var(--text-s);
  color: var(--ink-soft);
}
.hint span {
  white-space: nowrap;
}
.hint span::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.4em;
  background: var(--yellow);
}
.hint span:nth-of-type(2)::before {
  background: var(--green);
}
.hint span:nth-of-type(3)::before {
  background: var(--rose-strong);
}
.hint span:nth-of-type(4)::before {
  background: var(--orange);
}
html:not(.js) .hint {
  display: none;
}
@media (max-width: 45rem), (prefers-reduced-motion: reduce) {
  .hint {
    display: none;
  }
}

/* ---------- L'objet du Bureau : une déclaration, puis la réponse en retrait ---------- */

[data-editable="objet"] > h2 {
  grid-column: 4 / 12;
}
[data-editable="objet"] > .lede {
  grid-column: 4 / 12;
  font: 500 clamp(1.375rem, 1rem + 1.1vw, 1.875rem) / 1.35 var(--font-display);
  letter-spacing: -0.01em;
  margin-bottom: calc(var(--leading) * 1.5);
}
[data-editable="objet"] > p:not(.lede) {
  grid-column: 7 / 12;
}

/* ---------- Notices et tarif : ni numéros, ni filets ----------
   Le registre à deux colonnes, numéroté et rayé de filets, sentait le gabarit (Antoine,
   2026-11-16). Les attributions et les mandats sont des notices sur deux colonnes, séparées par
   le vide ; les honoraires, un tarif imprimé à points de conduite. */

:is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) > dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-auto-flow: row dense;
  padding: 0;
  margin: 0;
}
:is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) dt,
:is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) dd {
  margin: 0;
  padding-inline: var(--inset);
}
:is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) dt {
  font: 600 var(--h3) / 1.25 var(--font-display);
}
:is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) dd {
  padding-top: calc(var(--leading) / 2);
  font-size: var(--text-l);
  line-height: 1.6;
}

/* Les notices : l'intitulé au-dessus du texte, deux par rangée. */
:is([data-editable="expertises"], [data-editable="mandats"]) :is(dt, dd):nth-of-type(odd) {
  grid-column: 1 / 7;
}
:is([data-editable="expertises"], [data-editable="mandats"]) :is(dt, dd):nth-of-type(even) {
  grid-column: 7 / -1;
}
:is([data-editable="expertises"], [data-editable="mandats"]) dd {
  padding-right: var(--cell-w);
}
:is([data-editable="expertises"], [data-editable="mandats"]) dt:nth-of-type(n + 3) {
  margin-top: calc(var(--leading) * 2.5);
}
[data-editable="expertises"] > h2 {
  margin-bottom: calc(var(--leading) * 2);
}
:is([data-editable="mandats"], [data-editable="honoraires"], [data-editable="equipe"]) > .lede {
  margin-bottom: calc(var(--leading) * 2);
}

/* Les tables (mandats, tarif) : encadrées en tête et en pied d'un filet gras-maigre à l'encre,
   comme un tableau imprimé ; entre les lignes, le pointillé du tarif. Pas de filet plein par
   ligne, pas de numéros. */
:is([data-editable="mandats"], [data-editable="honoraires"]) > dl {
  --gras: 3px;
  --rule-ink: linear-gradient(var(--ink) 0 0);
  padding-block: calc(var(--leading) * 0.75);
  background:
    var(--rule-ink) 0 0 / 100% var(--gras) no-repeat,
    var(--rule-ink) 0 6px / 100% 1px no-repeat,
    var(--rule-ink) 0 calc(100% - 6px) / 100% 1px no-repeat,
    var(--rule-ink) 0 100% / 100% var(--gras) no-repeat;
}
[data-editable="mandats"] dt:nth-of-type(n) {
  grid-column: 1 / 5;
  margin-top: 0;
}
[data-editable="mandats"] dd:nth-of-type(n) {
  grid-column: 5 / -1;
  padding-right: var(--cell-w);
}
[data-editable="mandats"] :is(dt, dd):nth-of-type(n) {
  padding-block: var(--leading);
  border-bottom: 2px dotted color-mix(in oklab, var(--ink) 45%, transparent);
}
[data-editable="mandats"] :is(dt, dd):last-of-type {
  border-bottom: 0;
}

/* Les aplats alternés : une section sur deux repose sur un voile blanc, de bord à bord, qui
   laisse voir le sol. La structure se lit ainsi : papier, voile, papier, voile, papier, encre. */
:is([data-editable="expertises"], [data-editable="equipe"]) {
  margin-top: calc(var(--leading) * 4);
  padding-block: calc(var(--leading) * 5);
  border-image: linear-gradient(var(--veil) 0 0) fill 0 / / 0 100vw;
}

/* Le tarif : intitulé, points de conduite, prix ; l'explication dessous. */
[data-editable="honoraires"] > dl {
  grid-column: 1 / 9;
}
[data-editable="honoraires"] :is(dt, dd) {
  grid-column: 1 / -1;
}
[data-editable="honoraires"] dt:first-of-type {
  margin-top: calc(var(--leading) * 0.75);
}
[data-editable="honoraires"] dd:last-of-type {
  margin-bottom: calc(var(--leading) * 0.75);
}
[data-editable="honoraires"] dt {
  display: flex;
  align-items: baseline;
}
[data-editable="honoraires"] dt + dd ~ dt {
  margin-top: calc(var(--leading) * 1.5);
}
[data-editable="honoraires"] dt > span {
  flex: 1;
  display: flex;
  align-items: baseline;
}
[data-editable="honoraires"] dt > span::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  margin-inline: 0.75rem;
  border-bottom: 2px dotted var(--ink-soft);
  transform: translateY(-0.2em);
}
[data-editable="honoraires"] dt > strong {
  font-weight: 600;
  white-space: nowrap;
}
[data-editable="honoraires"] dd {
  max-width: 38rem;
  font-size: var(--text);
}
[data-editable="honoraires"] > .cta {
  grid-column: 1 / -1;
  margin-top: calc(var(--leading) * 2);
  padding-inline: var(--inset);
}

/* ---------- Les maisons : trois phrases en grand ---------- */

[data-editable="pour-qui"] > .lede {
  margin-bottom: calc(var(--leading) * 2);
}
.quotes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--leading) * 1.5) var(--gutter);
  list-style: none;
  padding: 0;
  margin: 0;
}
.quotes > li {
  position: relative;
  padding: var(--leading) var(--inset) 0 calc(var(--inset) + 1.5rem);
  font: 500 clamp(1.25rem, 1rem + 0.7vw, 1.5rem) / 1.35 var(--font-display);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.quotes > li::before {
  content: "«";
  position: absolute;
  left: var(--inset);
  top: var(--leading);
  color: var(--ink-soft);
}
.quotes > li::after {
  content: "\202F»";
  color: var(--ink-soft);
}

/* ---------- Le personnel : deux noms en grand ---------- */

.people {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  list-style: none;
  padding: 0;
  margin: 0;
}
.people > li {
  padding: 0 var(--inset);
}
.people > li:nth-child(1) {
  grid-column: 1 / 6;
  margin-right: calc(-1 * var(--cell-w));
}
.people > li:nth-child(2) {
  grid-column: 7 / -1;
}
.people > li > p:not(.role) {
  max-width: 34rem;
}
.people h3 {
  font: 600 clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: calc(var(--leading) / 2);
}
.people .role {
  font: 500 var(--text) / var(--leading) var(--font-display);
  color: var(--ink-soft);
  margin-bottom: var(--leading);
}

/* ---------- La correspondance : pleine encre, l'adresse en grand ---------- */

[data-editable="contact"] {
  margin-top: calc(var(--leading) * 5);
  padding-block: calc(var(--leading) * 5) calc(var(--leading) * 5);
  color: var(--white);
  /* Fond d'encre sur toute la largeur de la fenêtre, sans sortir de la grille du site ;
     le quadrillage y continue, en blanc très léger. */
  border-image: linear-gradient(var(--ink) 0 0) fill 0 / / 0 100vw;
  position: relative;
  isolation: isolate;
}
[data-editable="contact"]::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='0' x2='100' y2='100' stroke='%23fff' stroke-opacity='.09' vector-effect='non-scaling-stroke'/%3E%3Cline x1='0' y1='100' x2='100' y2='0' stroke='%23fff' stroke-opacity='.09' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: calc(2 * var(--iso-x) * var(--iso-cell)) calc(2 * var(--iso-y) * var(--iso-cell));
  pointer-events: none;
}
[data-editable="contact"] > h2 {
  color: var(--white);
}
[data-editable="contact"] > p:not(.cta) {
  grid-column: 1 / 7;
  font-size: var(--text-l);
  line-height: 1.6;
  color: var(--on-ink-soft);
}
[data-editable="contact"] > .cta {
  grid-column: 1 / -1;
  margin-top: calc(var(--leading) * 1.5);
  gap: var(--leading) 2.5rem;
}
[data-editable="contact"] .cta > a:not(.mail) {
  background: var(--orange);
  color: var(--ink);
  box-shadow: none;
}
[data-editable="contact"] .cta > a:not(.mail):hover {
  background: var(--yellow);
}
[data-editable="contact"] .cta > a.mail {
  font: 600 clamp(1.5rem, 0.9rem + 2.2vw, 2.75rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration-color: var(--orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}
[data-editable="contact"] a:focus-visible {
  outline-color: var(--white);
}
main:has(> [data-editable="contact"]:last-child) + .site-footer {
  margin-top: 0;
  border-top: 1px solid var(--on-ink-line);
}

/* ---------- Pages secondaires ---------- */

[data-editable="body"] > h2 {
  font-size: var(--h3);
  line-height: var(--leading);
  margin: var(--leading) 0 calc(var(--leading) / 2);
}
[data-editable="body"] > h2:first-child {
  margin-top: 0;
}
[data-editable="pratique"] > p {
  font-size: var(--text-l);
  line-height: 1.6;
}

/* ---------- Pied de page : une ligne, petit texte, peu d'air ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--leading) * 7);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
}
.site-footer__inner {
  width: var(--site-w);
  margin-inline: auto;
  padding: calc(var(--leading) / 2) var(--inset);
}
.site-footer p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  line-height: var(--leading);
}
.site-footer a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover {
  border-bottom-color: var(--white);
}
/* Sur l'encre, l'anneau de focus passe en blanc : en encre, il était invisible (Hallmark 26a). */
.site-footer a:focus-visible {
  outline-color: var(--white);
}

/* ---------- Écrans moyens ---------- */

@media (max-width: 64rem) {
  [data-editable="hero"] > *,
  [data-editable="hero"] > h1 {
    grid-column: 1 / 9;
  }
  [data-editable="objet"] > h2,
  [data-editable="objet"] > .lede {
    grid-column: 1 / 12;
  }
  [data-editable="objet"] > p:not(.lede) {
    grid-column: 4 / 12;
  }
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* ---------- Petits écrans : tout s'empile sur les douze colonnes ---------- */

@media (max-width: 45rem) {
  :root {
    --inset: var(--gutter);
    /* Douze colonnes sur 390 px : les anneaux se serrent, on les atténue. */
    --ring-base: 0.28;
  }

  /* Grille du plan plus serrée : cellule de 64 px au lieu de 96, anneaux et robots suivent.
     Les foyers, posés en
     cellules, remontent d'un tiers : les trois derniers sont redescendus pour couvrir le bas
     de la page, qui est plus longue sur mobile. */
  :root {
    --iso-cell: 4rem;
  }
  .rings .ripple:nth-child(17) { --u: -128; --v: 132; }
  .rings .ripple:nth-child(18) { --u: -150; --v: 152; }
  .rings .ripple:nth-child(19) { --u: -138; --v: 146; }

  /* En-tête sur deux rangées : le logo, puis le menu sur toute la largeur, quatre entrées
     réparties, une ligne de 48 px — un menu voulu, pas un retour à la ligne. */
  .site-header {
    padding: var(--leading) var(--gutter) 0;
    row-gap: 0;
    min-height: 0;
  }
  .brand {
    height: calc(var(--leading) * 2);
    align-items: center;
  }
  .site-nav {
    flex-basis: 100%;
  }
  .site-nav ul {
    justify-content: space-between;
    gap: 0;
  }
  .site-nav a {
    padding: calc(var(--leading) / 2) 0;
    font-size: var(--text-s);
    line-height: var(--leading);
    color: var(--ink);
  }

  /* Titres et respiration ramenés à l'échelle de l'écran (tour mobile du 2026-09-04) :
     h1 36/42 au lieu de 48/54, h2 28/36, 168 px entre deux blocs au lieu de 240. */
  main > section {
    padding-block: calc(var(--leading) * 5) calc(var(--leading) * 2);
  }
  main > section:first-child {
    padding-top: calc(var(--leading) * 6);
  }
  [data-editable="hero"] {
    min-height: 0;
    padding-block: calc(var(--leading) * 4) calc(var(--leading) * 3);
  }
  [data-editable="hero"] > .lede {
    font-size: var(--text-l);
  }
  .site-footer {
    margin-top: calc(var(--leading) * 5);
  }

  main > section > *,
  main > section > h2,
  [data-editable="hero"] > *,
  [data-editable="hero"] > h1,
  [data-editable="objet"] > h2,
  [data-editable="objet"] > .lede,
  [data-editable="objet"] > p:not(.lede),
  [data-editable="contact"] > p:not(.cta) {
    grid-column: 1 / -1;
  }
  [data-editable="contact"] {
    margin-top: calc(var(--leading) * 3);
    padding-block: calc(var(--leading) * 3);
  }
  .people {
    row-gap: calc(var(--leading) * 2);
  }

  :is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) :is(dt, dd):nth-of-type(n),
  .quotes > li,
  .people > li:nth-child(1),
  .people > li:nth-child(2) {
    grid-column: 1 / -1;
  }
  :is([data-editable="expertises"], [data-editable="mandats"]) dt:nth-of-type(n + 2) {
    margin-top: calc(var(--leading) * 2);
  }
  [data-editable="honoraires"] dt {
    flex-wrap: wrap;
  }
  [data-editable="honoraires"] > dl {
    grid-column: 1 / -1;
  }
  [data-editable="mandats"] dt:nth-of-type(n) {
    margin-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }
  [data-editable="mandats"] dd:nth-of-type(n) {
    padding-top: calc(var(--leading) / 2);
    padding-right: var(--inset);
  }
  :is([data-editable="expertises"], [data-editable="equipe"]) {
    margin-top: calc(var(--leading) * 3);
    padding-block: calc(var(--leading) * 3.5);
  }
  [data-editable="honoraires"] dt > span {
    flex: 1 1 8rem;
  }
  :is([data-editable="expertises"], [data-editable="mandats"], [data-editable="honoraires"]) dd {
    padding-right: var(--inset);
    font-size: var(--text);
  }
  .people > li:nth-child(1) {
    margin-right: 0;
  }
}

/* ---------- Mouvement réduit : tout est dessiné d'emblée ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ripple ellipse {
    animation: none !important;
    opacity: 0.7;
  }
  .cta > a:not(.mail) {
    transition: none;
  }
}

/* ---------- Les planches (posées par closeup.js, petits écrans seulement) ----------
   Sur mobile, le centre de tri n'a pas de place pour rouler : trois planches montrent
   l'automate en gros plan entre les grandes sections, comme les gravures d'un traité. */
.plate {
  position: relative;
  z-index: 1;
  width: var(--site-w);
  margin: calc(var(--leading) * 4) auto 0;
  padding: 0 var(--inset);
}
.plate canvas {
  display: block;
  width: 100%;
  /* La planche est une loupe : son propre sol, à grande échelle, cache le quadrillage et la
     flotte du fond. */
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--ink) 35%, var(--paper));
}
.plate figcaption {
  margin-top: calc(var(--leading) * 0.5);
  font-size: var(--text-s);
  color: var(--ink-soft);
  font-style: italic;
}
.plate__n {
  font-style: normal;
  font-family: var(--font-display);
  color: var(--ink);
  margin-right: 0.35em;
}
main > .plate + section {
  padding-top: calc(var(--leading) * 3);
}
