/* ==========================================================================
   Cahier de laboratoire — Saindou Moudathirou Ben
   Papier quadrillé, double filet de marge, encre, stylo bleu, tampon rouge.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Papier et encres */
  --paper: #F2F4F0;
  --paper-slip: #FCFDFB;
  --grid: rgba(45, 93, 168, 0.075);
  --ink: #1C2A3A;
  --ink-2: #4A5866;
  --pen: #2D5DA8;
  --pen-strong: #234C8C;
  --pen-wash: rgba(45, 93, 168, 0.17);
  --red: #B23A2E;
  --rule: #C5CFD0;
  --rule-strong: #8F9DA6;
  --tape: rgba(214, 205, 158, 0.6);

  /* Typographie */
  --font-print: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  --step-3: clamp(2rem, 1.35rem + 2.4vw, 3rem);
  --step-4: clamp(2.75rem, 1.6rem + 3.4vw, 4.375rem);

  /* Espacements (grille de 8, papier de 24) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;

  /* Marge du cahier */
  --rule-x: 10px;
  --pad-left: 28px;
  --pad-right: 16px;
  --sheet-max: 1240px;

  --radius: 3px;
  --shadow-slip: 0 1px 1px rgba(28, 42, 58, 0.06), 0 14px 30px -16px rgba(28, 42, 58, 0.38);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  :root {
    --rule-x: 40px;
    --pad-left: 76px;
    --pad-right: 32px;
  }
}

@media (min-width: 1100px) {
  :root {
    --rule-x: 72px;
    --pad-left: 120px;
    --pad-right: 48px;
  }
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-print);
  font-size: var(--step-0);
  line-height: 1.6;
  font-stretch: 100%;
  caret-color: var(--pen);
  scrollbar-color: var(--rule-strong) var(--paper);
}

::selection {
  background: rgba(45, 93, 168, 0.24);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border: 3px solid var(--paper);
  border-radius: 8px;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

p,
li,
dd {
  text-wrap: pretty;
}

p {
  margin: 0;
}

a {
  color: var(--pen);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--pen-strong);
  text-decoration-thickness: 2px;
}

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

img,
svg {
  display: block;
}

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

.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -100px;
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--ink);
  color: var(--paper-slip);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus,
.skip-link:hover {
  top: var(--s-2);
  color: var(--paper-slip);
}

/* --------------------------------------------------------------------------
   En-tête imprimé du cahier
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  transition: box-shadow 0.3s var(--ease-out);
}

.masthead.is-scrolled {
  box-shadow: 0 10px 24px -20px rgba(28, 42, 58, 0.6);
}

.masthead__inner {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: 0 var(--pad-right) 0 var(--pad-left);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

/* Champs imprimés de l'en-tête de cahier */
.masthead__fields {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
}

.masthead__field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  line-height: 1.2;
  min-width: 0;
}

.masthead__field--wide {
  display: none;
}

@media (min-width: 1100px) {
  .masthead__field--wide {
    display: flex;
    margin-left: var(--s-3);
    padding-left: var(--s-3);
    border-left: 1px solid var(--rule-strong);
  }
}

.masthead__label {
  font-size: 0.6875rem;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--ink-2);
}

.masthead__title {
  color: var(--ink);
  text-decoration: none;
}

.masthead__title:hover {
  color: var(--ink);
}

.masthead__name {
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.125rem;
}

.masthead__value {
  font-size: 0.9375rem;
  font-weight: 560;
  font-stretch: 90%;
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 44px;
  padding: 0 var(--s-2);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
}

.site-nav {
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.65rem 0.25rem;
}

.site-nav a:hover {
  color: var(--pen);
  text-decoration: underline;
}

.site-nav__cta {
  color: var(--pen) !important;
}

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: var(--s-1) var(--pad-right) var(--s-2) var(--pad-left);
  box-shadow: 0 18px 30px -24px rgba(28, 42, 58, 0.6);
}

.site-nav.is-open li + li {
  border-top: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }

  .site-nav ul {
    display: flex;
    align-items: center;
    gap: var(--s-3);
  }

  .site-nav.is-open li + li {
    border: 0;
  }

  .site-nav__cta {
    padding: 0.55rem 0.9rem !important;
    border: 1px solid var(--pen);
    border-radius: var(--radius);
  }

  .site-nav__cta:hover {
    background: var(--pen-wash);
    text-decoration: none !important;
  }
}

/* --------------------------------------------------------------------------
   Page du cahier (filet de marge rouge)
   -------------------------------------------------------------------------- */

.sheet {
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: 0 var(--pad-right) 0 var(--pad-left);
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rule-x);
  width: 4px;
  border-left: 1px solid rgba(178, 58, 46, 0.55);
  border-right: 1px solid rgba(178, 58, 46, 0.55);
  pointer-events: none;
}

section[id] {
  scroll-margin-top: 80px;
}

/* --------------------------------------------------------------------------
   Impressions collées (ruban adhésif)
   -------------------------------------------------------------------------- */

.slip {
  position: relative;
  background: var(--paper-slip);
  border: 1px solid rgba(28, 42, 58, 0.09);
  box-shadow: var(--shadow-slip);
  border-radius: 2px;
  padding: var(--s-3);
}

.slip::before,
.slip::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 88px;
  height: 22px;
  background: var(--tape);
  box-shadow: 0 1px 1px rgba(28, 42, 58, 0.08);
  pointer-events: none;
}

.slip::before {
  left: 22px;
  transform: rotate(-4deg);
}

.slip::after {
  right: 26px;
  transform: rotate(5deg);
}

@media (min-width: 640px) {
  .slip {
    padding: var(--s-4);
  }
}

@media (min-width: 1000px) {
  .slip--tilt-left {
    transform: rotate(-0.6deg);
  }
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.12s var(--ease-out);
  touch-action: manipulation;
}

.btn--primary {
  background: var(--pen);
  color: var(--paper-slip);
  box-shadow: 0 1px 0 rgba(28, 42, 58, 0.2), 0 8px 18px -12px rgba(35, 76, 140, 0.8);
}

.btn--primary:hover {
  background: var(--pen-strong);
  color: var(--paper-slip);
  text-decoration: none;
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--primary[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn--link {
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  background: none;
  color: var(--pen);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.btn--link:hover {
  color: var(--pen-strong);
  text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Première page
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: var(--s-6);
  padding: var(--s-5) 0 var(--s-6);
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--s-6);
    align-items: start;
    padding: var(--s-6) 0 var(--s-7);
  }
}

.hero__name {
  font-size: var(--step-4);
  font-weight: 820;
  font-stretch: 70%;
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.hero__name span {
  display: block;
}

.hero__role {
  margin-top: var(--s-3);
  font-size: var(--step-2);
  font-weight: 560;
  font-stretch: 92%;
  color: var(--pen);
  line-height: 1.3;
}

.hero__lede {
  margin-top: var(--s-3);
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--ink);
}

.fields {
  margin: var(--s-4) 0 0;
  max-width: 34rem;
}

.fields > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--s-2);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.fields > div:first-child {
  border-top: 1px solid var(--rule);
}

.fields dt {
  font-size: var(--step--1);
  font-weight: 600;
  font-stretch: 85%;
  color: var(--ink-2);
  padding-top: 0.1rem;
}

.fields dd {
  margin: 0;
  font-weight: 560;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--pen);
  box-shadow: 0 0 0 3px var(--pen-wash);
  vertical-align: 0.08em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin-top: var(--s-4);
}

.hero__actions .btn--link {
  padding-left: 0;
  padding-right: 0;
}

/* --------------------------------------------------------------------------
   Démonstration : réponse tracée
   -------------------------------------------------------------------------- */

.demo {
  margin: var(--s-2) 0 0;
}

.demo__caption {
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.4;
  padding-right: var(--s-4);
}

.demo__note {
  display: block;
  margin-top: 0.25rem;
  font-weight: 500;
  font-style: italic;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.demo__tabs,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.demo__tabs {
  margin-top: var(--s-3);
}

.demo__tab,
.filter {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  font-stretch: 82%;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
  touch-action: manipulation;
}

.demo__tab:hover,
.filter:hover {
  border-color: var(--ink);
  background: rgba(28, 42, 58, 0.04);
}

.demo__tab[aria-selected="true"],
.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-slip);
}

.demo__panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}

.demo__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--ink-2);
  margin-bottom: 0.15rem;
}

.demo__q {
  font-weight: 650;
  font-size: 1.0625rem;
}

.demo__a {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.cite {
  display: inline-block;
  padding: 0 0.15em;
  border-radius: 2px;
  color: var(--pen);
  font-weight: 750;
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
  vertical-align: 0.3em;
  line-height: 1;
  transition: background-color 0.2s var(--ease-out);
}

.cite.is-active {
  background: var(--pen-wash);
}

.source {
  margin-top: var(--s-1);
  padding: var(--s-2);
  background: var(--paper);
  border: 1px dashed var(--rule-strong);
  border-radius: 2px;
}

.source__ref {
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--ink-2);
}

.source__text {
  margin-top: 0.4rem;
  font-size: 0.96875rem;
  line-height: 1.65;
}

.source mark {
  --hl: 100%;
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(var(--pen-wash), var(--pen-wash));
  background-repeat: no-repeat;
  background-position: 0 70%;
  background-size: var(--hl) 78%;
  padding: 0 0.1em;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: box-shadow 0.2s var(--ease-out);
}

.source mark.is-active {
  box-shadow: inset 0 -2px 0 var(--pen);
}

.stamp {
  align-self: flex-end;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--s-1);
  margin-right: var(--s-1);
  padding: 0.35rem 0.9rem 0.45rem;
  border: 2px solid var(--red);
  border-radius: 5px;
  color: var(--red);
  transform: rotate(-6deg);
  mix-blend-mode: multiply;
  line-height: 1.1;
}

.stamp__word {
  font-weight: 850;
  font-stretch: 72%;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
}

.stamp__detail {
  font-size: 0.75rem;
  font-weight: 650;
}

.demo__replay {
  margin-top: var(--s-1);
  font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 1000px) {
  .section {
    padding: var(--s-7) 0;
  }
}

.section__head {
  max-width: 44rem;
  margin-bottom: var(--s-5);
}

.section__head h2 {
  font-size: var(--step-3);
  font-weight: 780;
  font-stretch: 76%;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.section__intro {
  margin-top: var(--s-2);
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 60ch;
}

/* Offres : registre, une ligne par offre, chacune renvoie à sa preuve */

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ink);
}

.ledger__row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: var(--s-2);
  row-gap: var(--s-1);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--rule);
}

.ledger__row:first-child {
  border-top: 1px solid var(--ink);
}

.ledger__icon {
  grid-row: 1 / span 3;
  width: 28px;
  height: 28px;
  margin-top: 0.1rem;
  color: var(--pen);
}

.ledger__title,
.ledger__body,
.ledger__proof {
  grid-column: 2;
}

.ledger__title {
  font-size: var(--step-1);
  font-weight: 720;
  font-stretch: 90%;
  line-height: 1.25;
}

.ledger__row--lead .ledger__title {
  font-size: var(--step-2);
  font-stretch: 84%;
}

.ledger__body p {
  max-width: 62ch;
}

.ledger__tools,
.case__tools {
  margin-top: 0.35rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.ledger__proof {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration-thickness: 1px;
}

@media (min-width: 960px) {
  .ledger__row {
    grid-template-columns: 32px minmax(12rem, 0.9fr) minmax(0, 2fr) minmax(11rem, 0.8fr);
    column-gap: var(--s-4);
    align-items: start;
  }

  .ledger__icon {
    grid-row: auto;
  }

  .ledger__title,
  .ledger__body,
  .ledger__proof {
    grid-column: auto;
  }

  .ledger__proof {
    justify-self: end;
    text-align: right;
    min-height: 0;
    padding-top: 0.15rem;
  }
}

/* Méthode : une vraie séquence */

.protocol {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-4) var(--s-4);
}

@media (min-width: 700px) {
  .protocol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .protocol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.protocol li {
  counter-increment: step;
  padding-top: var(--s-2);
  border-top: 2px solid var(--ink);
}

.protocol li::before {
  content: counter(step);
  display: block;
  font-size: 3rem;
  font-weight: 300;
  font-stretch: 70%;
  line-height: 1;
  color: var(--pen);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
}

.protocol h3 {
  font-size: var(--step-1);
  font-weight: 720;
  font-stretch: 90%;
}

.protocol p {
  margin-top: var(--s-1);
  color: var(--ink);
}

.margin-note {
  display: flex;
  align-items: flex-end;
  gap: var(--s-1);
  margin-top: var(--s-4);
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--pen);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.margin-note svg {
  flex: none;
  margin-bottom: 0.4rem;
}

/* Résultats */

.filters {
  margin-bottom: var(--s-4);
}

.cases {
  display: grid;
  gap: var(--s-5) var(--s-6);
}

@media (min-width: 900px) {
  .cases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case--feature {
    grid-column: 1 / -1;
  }
}

.case {
  padding-top: var(--s-3);
  border-top: 2px solid var(--ink);
}

.case[hidden] {
  display: none;
}

.case__head h3 {
  font-size: var(--step-2);
  font-weight: 760;
  font-stretch: 84%;
  line-height: 1.15;
}

.case--feature .case__head h3 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  max-width: 30ch;
}

.case__context {
  margin-top: 0.4rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
}

.case > p {
  margin-top: var(--s-2);
  max-width: 68ch;
}

.case__aside {
  color: var(--ink-2);
}

.case > .case__tools {
  margin-top: var(--s-2);
}

/* Schéma d'architecture */

.pipeline {
  margin: var(--s-4) 0 0;
}

.pipeline figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--s-2);
}

.pipeline__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

@media (min-width: 900px) {
  .pipeline__steps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--s-4);
  }
}

.pipeline__steps li {
  position: relative;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-slip);
}

.pipeline__steps strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 720;
  font-stretch: 88%;
  line-height: 1.25;
}

.pipeline__steps span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-2);
}

.pipeline__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.05rem;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--pen);
  border-bottom: 1.5px solid var(--pen);
  transform: translateX(-50%) rotate(45deg);
}

@media (min-width: 900px) {
  .pipeline__steps li:not(:last-child)::after {
    left: auto;
    right: -1.3rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(-45deg);
  }
}

/* Mesures avec provenance */

.measures {
  width: 100%;
  margin-top: var(--s-3);
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.measures th,
.measures td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: baseline;
}

.measures thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom-color: var(--ink);
}

.measures tbody th {
  font-weight: 600;
}

.measures .num {
  font-size: 1.375rem;
  font-weight: 760;
  font-stretch: 78%;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  color: var(--ink);
}

.measures td:last-child {
  color: var(--ink-2);
  font-size: var(--step--1);
}

.case__more {
  margin-top: var(--s-3);
  padding-top: var(--s-1);
  border-top: 1px solid var(--rule);
}

.case__more[open] {
  padding-bottom: var(--s-1);
}

.case__more summary,
.legal summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 650;
  color: var(--pen);
  list-style: none;
}

.case__more summary::-webkit-details-marker,
.legal summary::-webkit-details-marker {
  display: none;
}

.case__more summary::before,
.legal summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease-out);
}

.case__more[open] summary::before,
.legal[open] summary::before {
  transform: rotate(45deg);
}

.case__more ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.case__more li + li {
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: no-preference) {

  .case__more[open] > ul,
  .legal[open] > dl {
    animation: unfold 0.35s var(--ease-out);
  }
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Parcours */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: grid;
  gap: 0.25rem var(--s-4);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--rule);
}


@media (min-width: 700px) {
  .timeline li {
    grid-template-columns: 11rem minmax(0, 1fr);
  }
}

.timeline__date {
  font-size: 0.9375rem;
  font-weight: 650;
  font-stretch: 85%;
  color: var(--pen);
  font-variant-numeric: tabular-nums;
}

.timeline__body h3 {
  font-size: var(--step-1);
  font-weight: 720;
  font-stretch: 90%;
  line-height: 1.3;
}

.timeline__body p {
  margin-top: 0.35rem;
  max-width: 64ch;
}

.tag {
  display: inline-block;
  margin-top: var(--s-1) !important;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* Matériel et méthodes : inventaire compact */

.inventory {
  margin: 0;
  border-bottom: 1px solid var(--ink);
}

.inventory > div {
  display: grid;
  gap: 0.25rem var(--s-4);
  padding: var(--s-2) 0;
  border-top: 1px solid var(--rule);
}

.inventory > div:first-child {
  border-top: 1px solid var(--ink);
}

@media (min-width: 800px) {
  .inventory > div {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
}

.inventory dt {
  font-weight: 720;
  font-stretch: 90%;
}

.inventory dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96875rem;
  max-width: 78ch;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 1000px) {
  .contact {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
  }
}

.form__row {
  display: grid;
  gap: 0 var(--s-3);
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  margin-bottom: var(--s-3);
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 650;
  font-size: 0.9375rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-bottom: 2px solid var(--ink-2);
  border-radius: 2px;
  background: var(--paper-slip);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231C2A3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-2);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--pen);
  box-shadow: 0 0 0 3px var(--pen-wash);
}

.field [aria-invalid="true"] {
  border-color: var(--red);
  border-bottom-color: var(--red);
}

.field__help {
  margin-top: 0.35rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.field__error {
  margin-top: 0.35rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--red);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
}

.form__status {
  font-weight: 600;
  font-size: 0.9375rem;
}

.form__status.is-success {
  color: var(--pen);
}

.form__status.is-error {
  color: var(--red);
}

.form__privacy {
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-2);
  max-width: 70ch;
}

.contact__direct p + p {
  margin-top: 0.4rem;
}

.contact__lead {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--pen);
  line-height: 1.1;
  margin-bottom: var(--s-1) !important;
}

.contact__mail {
  font-size: 1.25rem;
  font-weight: 700;
  font-stretch: 88%;
  overflow-wrap: anywhere;
}

.contact__direct a[href^="tel"] {
  color: var(--ink);
}

.contact__links {
  list-style: none;
  display: flex;
  gap: var(--s-3);
  margin: var(--s-3) 0 0;
  padding: 0;
}

.contact__links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Pied de page signé
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--ink);
  background: var(--paper);
}

.footer__inner {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: var(--s-4) var(--pad-right) var(--s-5) var(--pad-left);
  display: grid;
  gap: var(--s-2);
}

.signature {
  font-family: var(--font-hand);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--pen);
  transform: rotate(-3deg);
  transform-origin: left center;
  line-height: 1.1;
}

.legal dl {
  margin: var(--s-1) 0 0;
  display: grid;
  gap: var(--s-1);
  font-size: var(--step--1);
}

.legal dl > div {
  display: grid;
  gap: 0 var(--s-2);
}

@media (min-width: 640px) {
  .legal dl > div {
    grid-template-columns: 11rem minmax(0, 1fr);
  }
}

.legal dt {
  font-weight: 650;
}

.legal dd {
  margin: 0;
  color: var(--ink-2);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Pièces collées dans les résultats, marques d'audit, variantes de ruban
   -------------------------------------------------------------------------- */

.exhibit {
  margin: var(--s-3) 0 0;
  padding: var(--s-2) var(--s-3) var(--s-3);
  max-width: 30rem;
  font-size: 0.9375rem;
}

.exhibit__cap {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--s-1);
}

.exhibit__fields {
  margin: 0;
}

.exhibit__fields > div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: var(--s-2);
  padding: 0.35rem 0;
  border-top: 1px solid var(--rule);
}

.exhibit__fields dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.exhibit__fields dd {
  margin: 0;
}

.exhibit .cite {
  font-size: 0.75rem;
}

.exhibit__src {
  margin-top: var(--s-1);
  padding-top: var(--s-1);
  border-top: 1px dashed var(--rule-strong);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.exhibit__stages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.exhibit__stages li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s-1);
  padding: 0.35rem 0;
  border-top: 1px solid var(--rule);
}

.exhibit__stages svg {
  color: var(--pen);
  align-self: center;
}

.exhibit__cost {
  font-size: 0.75rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.exhibit__verdict {
  margin-top: var(--s-1);
  padding: 0.5rem 0.65rem;
  background: var(--pen-wash);
  border-radius: 2px;
  font-weight: 600;
}

.audit-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-right: 0.35rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: var(--red);
  transform: rotate(-4deg);
}

.slip--tape-single::after {
  display: none;
}

.slip--tape-single::before {
  left: 50%;
  width: 110px;
  transform: translateX(-50%) rotate(1.5deg);
}

.slip--tape-corners::before {
  top: -6px;
  left: -18px;
  width: 72px;
  transform: rotate(-38deg);
}

.slip--tape-corners::after {
  top: -6px;
  right: -18px;
  width: 64px;
  transform: rotate(41deg);
}

/* Le parcours se date dans la marge rouge, comme un cahier */

@media (min-width: 1100px) {
  .timeline li {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline__date {
    position: absolute;
    top: var(--s-3);
    left: calc(var(--rule-x) - var(--pad-left) - 4.75rem);
    width: 4rem;
    text-align: right;
    font-family: var(--font-hand);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.15;
    font-variant-numeric: normal;
  }

  .timeline__date time {
    display: block;
  }

  .timeline__date .dash {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Mouvement réduit
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
