/* Sillon · landing page. Tokens first, then components; components only read var(--…). */

@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("fonts/spectral-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/libre-franklin-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette (see IDENTITE.md) */
  --encre: #13233b;
  --encre-2: #1c3150;
  --encre-3: #2a4366;
  --ardoise: #55626f;
  --ardoise-bleue: #7893b8;
  --ardoise-claire: #a9b6c6;
  --ble: #eadfc2;
  --ble-fonce: #7a5c22;
  --ble-trait: #a47a2c;
  --depart: #4c6a88;
  --lumiere: #ff9f33;
  --chaux: #f2f3ef;
  --chaux-2: #e6e8e2;
  --pierre: #c9cdc5;

  /* Semantic */
  --fond: var(--chaux);
  --texte: var(--encre);
  --texte-2: var(--ardoise);
  --filet: var(--pierre);
  --fond-nuit: var(--encre);
  --texte-nuit: var(--ble);
  --texte-nuit-2: var(--ardoise-claire);
  --focus: var(--lumiere);

  /* Type */
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --t-xs: 0.8125rem;
  --t-s: 0.9375rem;
  --t-m: 1.125rem;
  --t-l: 1.375rem;
  --t-xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-xxl: clamp(2.5rem, 1.4rem + 4.6vw, 5.25rem);
  --interligne: 1.6;
  --interligne-serre: 1.12;

  /* Space */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: 4.5rem;
  --e-9: clamp(4.5rem, 3rem + 6vw, 8rem);
  --goutiere: clamp(1rem, 0.5rem + 3vw, 3rem);
  --largeur: 75rem;
  --mesure: 36rem;

  /* Shape */
  --rayon: 3px;
  --rayon-bouton: 2px;
  --trait: 1px;
  --fenetre: 0.875rem;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --d-court: 160ms;
  --d-moyen: 240ms;
  --d-long: 1400ms;
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--serif);
  font-size: var(--t-m);
  line-height: var(--interligne);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

[hidden] {
  display: none !important;
}

p {
  margin: 0 0 var(--e-4);
}

a {
  color: inherit;
  text-decoration-thickness: var(--trait);
  text-underline-offset: 0.2em;
}

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

.chiffre {
  font-family: var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
}

.evitement {
  position: absolute;
  left: var(--e-4);
  top: -4rem;
  z-index: 10;
  padding: var(--e-2) var(--e-4);
  background: var(--chaux);
  color: var(--encre);
  font-family: var(--sans);
}
.evitement:focus {
  top: var(--e-4);
}

/* Note calls: a small superscript number, never a decoration */
.appel {
  font-family: var(--sans);
  font-size: 0.68em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.15em;
  text-decoration: none;
  color: var(--texte-2);
  padding: 0 0.1em;
}
.appel:hover {
  text-decoration: underline;
}

/* Buttons ------------------------------------------------------------------ */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: var(--e-3) var(--e-5);
  border: var(--trait) solid transparent;
  border-radius: var(--rayon-bouton);
  font-family: var(--sans);
  font-size: var(--t-s);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--d-court) var(--ease-out), background-color var(--d-court) ease, color var(--d-court) ease;
}
.bouton:active {
  transform: scale(0.97);
}
.bouton--clair {
  background: var(--ble);
  color: var(--encre);
}
.bouton--encre {
  background: var(--encre);
  color: var(--chaux);
}
.bouton--lumiere {
  background: var(--ble);
  color: var(--encre);
  box-shadow: 0.25rem 0.25rem 0 var(--encre-3);
}
.bouton--fantome {
  background: transparent;
  color: var(--texte-nuit);
  border-color: var(--encre-3);
}
@media (hover: hover) and (pointer: fine) {
  .bouton--clair:hover,
  .bouton--lumiere:hover {
    background: var(--chaux);
  }
  .bouton--encre:hover {
    background: var(--encre-2);
  }
  .bouton--fantome:hover {
    border-color: var(--ardoise-claire);
  }
}

.lien-fort {
  font-family: var(--sans);
  font-size: var(--t-s);
  font-weight: 600;
  background: none;
  border: 0;
  padding: var(--e-2) 0;
  color: var(--encre);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: var(--trait);
  text-underline-offset: 0.3em;
}
.lien-fort--clair {
  color: var(--ble);
}

/* Header ------------------------------------------------------------------- */
.entete {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--e-6);
  padding: var(--e-5) var(--goutiere);
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ble);
}
.entete__logo img {
  width: 6.5rem;
  height: auto;
}
.entete__nav {
  display: flex;
  gap: var(--e-5);
}
.entete__nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: var(--t-s);
}
.entete__nav a:hover {
  text-decoration: underline;
}
.entete__statut {
  margin: 0 0 0 auto;
  color: var(--ardoise-claire);
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: grid;
  align-items: end;
  padding: var(--e-9) var(--goutiere) var(--e-8);
  color: var(--ble);
  background: var(--encre);
  isolation: isolate;
}
.hero__fond {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__repli,
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__photo {
  object-position: 50% 60%;
}
/* Legibility veil: ink rises from the bottom left, where the text sits */
.hero__fond::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(19 35 59 / 0.92) 0%, rgb(19 35 59 / 0.55) 38%, rgb(19 35 59 / 0) 70%),
    linear-gradient(to right, rgb(19 35 59 / 0.6) 0%, rgb(19 35 59 / 0) 60%);
}
.hero__texte {
  max-width: 50rem;
}
.hero__titre {
  margin: 0;
  font-weight: 300;
  font-size: var(--t-xxl);
  line-height: 1.02;
  letter-spacing: -0.018em;
  text-wrap: balance;
  max-width: 15ch;
}
.hero__trace {
  width: min(26rem, 70%);
  height: auto;
  margin: var(--e-4) 0 var(--e-5);
  overflow: visible;
}
.hero__trace-ligne {
  fill: none;
  stroke: var(--ble);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.hero__trace-fenetre {
  fill: var(--lumiere);
}
.hero__chapo {
  max-width: 34rem;
  font-size: var(--t-l);
  line-height: 1.45;
  color: var(--ble);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-4) var(--e-6);
  margin-top: var(--e-6);
}
.hero__pilote {
  margin: var(--e-5) 0 0;
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ardoise-claire);
}
.hero__pilote .appel,
.pied .appel,
.demo .appel {
  color: var(--ardoise-claire);
}
.hero__legende {
  position: absolute;
  right: var(--goutiere);
  bottom: var(--e-4);
  margin: 0;
  font-family: var(--sans);
  font-size: 0.6875rem;
  color: var(--ardoise-claire);
  max-width: 18rem;
  text-align: right;
}

/* One orchestrated entrance: the furrow draws, then the window lights */
@media (prefers-reduced-motion: no-preference) {
  .hero__trace-ligne {
    animation: tracer var(--d-long) var(--ease-in-out) 200ms both;
  }
  .hero__trace-fenetre {
    animation: allumer 400ms var(--ease-out) 1500ms both;
  }
}
@keyframes tracer {
  from {
    stroke-dashoffset: 1;
  }
}
@keyframes allumer {
  from {
    opacity: 0;
  }
}

/* Generic sections ---------------------------------------------------------- */
.section {
  padding: var(--e-9) var(--goutiere);
}
.section > * {
  max-width: var(--largeur);
  margin-inline: auto;
}
.titre-section {
  margin-top: 0;
  margin-bottom: var(--e-5);
  font-weight: 300;
  font-size: var(--t-xl);
  line-height: var(--interligne-serre);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* Constat: text left, diverging bars right */
.constat {
  display: grid;
  gap: var(--e-7);
  max-width: calc(var(--largeur) + 2 * var(--goutiere));
  margin-inline: auto;
}
.constat__texte {
  max-width: var(--mesure);
  margin: 0;
}
/* two-column sections: children sit in their grid cell, not centred in it */
.constat > *,
.livrables > * {
  max-width: none;
  margin-inline: 0;
}
@media (min-width: 60rem) {
  .constat {
    grid-template-columns: 5fr 6fr;
    align-items: center;
  }
}

.solde {
  margin: 0;
  position: relative;
  font-family: var(--sans);
  font-size: var(--t-s);
  --demi: 50%;
}
.solde__graphe {
  position: relative;
}
.solde__axe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(5.5rem + (100% - 5.5rem - 4.5rem) * 0.5);
  border-left: var(--trait) solid var(--encre);
}
.solde__axe span {
  position: absolute;
  top: -1.5rem;
  transform: translateX(-50%);
  font-size: var(--t-xs);
  color: var(--texte-2);
}
.solde__ligne {
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.5rem;
  align-items: center;
  gap: 0;
  padding: var(--e-3) 0;
}
.solde__age {
  color: var(--texte-2);
}
.solde__piste {
  position: relative;
  height: 2.25rem;
}
/* scale: 400 ‰ fills one half of the track */
.solde__barre {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(var(--valeur) / 400 * 50%);
}
.solde__barre--depart {
  right: 50%;
  background: var(--depart);
  border-radius: var(--rayon) 0 0 var(--rayon);
}
.solde__barre--retour {
  left: 50%;
  background: var(--ble-trait);
  border-radius: 0 var(--rayon) var(--rayon) 0;
}
.solde__valeur {
  padding-left: var(--e-3);
  font-size: var(--t-l);
}
.solde figcaption {
  margin-top: var(--e-4);
  font-size: var(--t-xs);
  line-height: 1.5;
  color: var(--texte-2);
  max-width: 34rem;
}

/* Problème: window inventory */
.probleme {
  padding-top: 0;
}
.probleme__corps {
  display: grid;
  gap: var(--e-7);
}
.probleme__texte {
  max-width: var(--mesure);
}
.probleme__titre {
  font-size: var(--t-xxl);
  line-height: 1;
  padding-top: var(--e-8);
  border-top: var(--trait) solid var(--filet);
}
.probleme__chute {
  font-style: italic;
  font-size: var(--t-l);
  line-height: 1.4;
  margin-top: var(--e-5);
}
@media (min-width: 60rem) {
  .probleme__corps {
    grid-template-columns: 6fr 5fr;
    align-items: start;
  }
}

.inventaire {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-s);
}
.inventaire__grille {
  display: grid;
  grid-template-columns: repeat(7, var(--fenetre-grande));
  gap: var(--e-3);
  margin-bottom: var(--e-5);
  --fenetre-grande: 2rem;
}
.inventaire__grille .f {
  width: var(--fenetre-grande);
  height: calc(var(--fenetre-grande) * 1.3);
}
.f {
  display: inline-block;
  width: var(--fenetre);
  height: calc(var(--fenetre) * 1.3);
  border-radius: 1px;
  border: 1.5px solid var(--encre);
  vertical-align: -0.15em;
}
.f--allumee {
  background: var(--lumiere);
}
.f--chiffre {
  background: var(--ardoise-claire);
  border-color: var(--ardoise);
}
.f--vide {
  background: transparent;
  border-color: var(--ardoise);
  border-style: dashed;
}
.f--evaluee {
  outline: 2px solid var(--encre);
  outline-offset: 3px;
}
.legende {
  list-style: none;
  margin: 0 0 var(--e-4);
  padding: 0;
  display: grid;
  gap: var(--e-2);
}
.legende li {
  display: flex;
  align-items: center;
  gap: var(--e-3);
}
.legende .chiffre {
  font-size: var(--t-m);
  min-width: 1.4em;
  text-align: right;
}
.legende .f--evaluee {
  outline-offset: 2px;
}
.inventaire figcaption {
  font-size: var(--t-xs);
  color: var(--texte-2);
}

/* Méthode: four stations along one furrow */
.methode__tete {
  display: grid;
  gap: var(--e-4);
}
.methode__intro {
  max-width: var(--mesure);
  color: var(--texte-2);
}
.methode__corps {
  display: grid;
  gap: var(--e-7);
  margin-top: var(--e-7);
}
@media (min-width: 60rem) {
  .methode__corps {
    grid-template-columns: 7fr 4fr;
    align-items: start;
  }
  /* photograph missing: the steps take the whole width */
  .methode__corps:has(> .fenetres[hidden]) {
    grid-template-columns: 1fr;
  }
}
.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: etape;
  position: relative;
}
/* the furrow: a vertical line linking the stations */
.etapes::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 1.2rem;
  bottom: 1.2rem;
  border-left: 1.5px solid var(--ble-trait);
}
.etape {
  position: relative;
  padding: 0 0 var(--e-6) 3.5rem;
  counter-increment: etape;
}
.etape:last-child {
  padding-bottom: 0;
}
.etape::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  background: var(--fond);
  border: 1.5px solid var(--ble-trait);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: var(--t-m);
  color: var(--encre);
}
.etape--lumiere::before {
  border-radius: 1px;
  background: var(--lumiere);
  border-color: var(--encre);
}
.etape__titre {
  margin: 0 0 var(--e-2);
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-l);
  line-height: 1.3;
  padding-top: 0.05rem;
}
.etape p {
  max-width: 34rem;
  margin: 0;
}

.fenetres {
  margin: 0;
}
.fenetres__cadre {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 30% 62%, var(--lumiere) 0 3px, transparent 4px),
    radial-gradient(circle at 58% 48%, var(--lumiere) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 70%, var(--lumiere) 0 3px, transparent 4px),
    var(--encre-2);
  border-radius: var(--rayon);
  overflow: hidden;
}
.fenetres__cadre img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fenetres figcaption {
  margin-top: var(--e-3);
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--texte-2);
}

.garde-fous {
  margin-top: var(--e-7);
  padding: var(--e-5) var(--e-5) var(--e-4);
  background: var(--chaux-2);
  border-left: 3px solid var(--encre);
  max-width: 48rem;
  margin-inline: 0;
}
@media (min-width: 60rem) {
  .garde-fous {
    margin-left: max(0px, calc((100% - var(--largeur)) / 2));
  }
}
.garde-fous h3 {
  margin: 0 0 var(--e-2);
  font-family: var(--sans);
  font-size: var(--t-s);
  font-weight: 700;
}
.garde-fous__delai {
  font-size: var(--t-s);
  color: var(--texte-2);
}

/* Demo: the night field ----------------------------------------------------- */
.demo {
  background: var(--fond-nuit);
  color: var(--texte-nuit);
  padding: var(--e-9) var(--goutiere);
}
.demo > * {
  max-width: var(--largeur);
  margin-inline: auto;
}
.etiquette-fictif {
  display: inline-block;
  margin: 0 0 var(--e-5);
  padding: var(--e-2) var(--e-4);
  font-family: var(--sans);
  font-size: var(--t-s);
  color: var(--ble);
  border: 1.5px dashed var(--ble);
  border-radius: var(--rayon);
}
.demo__tete {
  display: block;
}
.demo__tete > * {
  max-width: 44rem;
}
.demo__intro {
  color: var(--texte-nuit-2);
}

.demo__commandes {
  display: grid;
  gap: var(--e-5) var(--e-6);
  margin-top: var(--e-6);
  align-items: end;
}
@media (min-width: 50rem) {
  .demo__commandes {
    grid-template-columns: 1fr 1fr auto;
  }
}
.curseur label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--e-4);
  font-family: var(--sans);
  font-size: var(--t-s);
  color: var(--texte-nuit-2);
  margin-bottom: var(--e-2);
}
.curseur output {
  font-size: var(--t-l);
  color: var(--ble);
  min-width: 3.5ch;
  text-align: right;
}

/* Range input, styled as a furrow with a window for a thumb */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2.75rem;
  background: transparent;
  margin: 0;
  cursor: pointer;
  touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--ardoise-bleue);
}
input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--ardoise-bleue);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.5rem;
  margin-top: -0.7rem;
  background: var(--ble);
  border: 2px solid var(--encre);
  border-radius: 1px;
  transition: transform var(--d-court) var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 1.25rem;
  height: 1.5rem;
  background: var(--ble);
  border: 2px solid var(--encre);
  border-radius: 1px;
}
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.1);
}
input[type="range"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo__scene {
  display: grid;
  gap: var(--e-5);
  margin-top: var(--e-6);
}
@media (min-width: 60rem) {
  .demo__scene {
    grid-template-columns: 1fr 15rem;
    align-items: start;
  }
}
.champ {
  margin: 0;
  position: relative;
}
.champ__svg {
  width: 100%;
  height: auto;
  touch-action: pan-y;
  cursor: ew-resize;
  overflow: visible;
}
.champ__svg .axe text,
.champ__svg .rappel text,
.champ__svg .curseur-temps text {
  font-family: var(--sans);
  font-size: 12px;
  fill: var(--texte-nuit-2);
}
.champ__svg .rappel line {
  stroke: var(--encre-3);
  stroke-dasharray: 3 4;
}
.champ__svg .rappel.est-passe line {
  stroke: var(--ardoise-bleue);
}
.champ__svg .rappel.est-passe text {
  fill: var(--ble);
}
.champ__svg .curseur-temps line {
  stroke: var(--ble);
  stroke-width: 1;
}
.champ__svg .curseur-temps text {
  fill: var(--ble);
  font-weight: 600;
}
.champ__svg .survol line {
  stroke: var(--ardoise-claire);
  stroke-dasharray: 2 3;
}
.sillon-suivi {
  fill: none;
  stroke: var(--ardoise-bleue);
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.8;
}
.sillon-retour {
  fill: none;
  stroke: var(--ble);
  stroke-width: 2.6;
  stroke-linecap: round;
}
.sillon-non {
  fill: none;
  stroke: var(--ardoise);
  stroke-width: 2;
  stroke-linecap: round;
}
.champ__svg .etiquette {
  font-family: var(--sans);
  font-size: 12.5px;
  paint-order: stroke;
  stroke: var(--fond-nuit);
  stroke-width: 5px;
  stroke-linejoin: round;
  pointer-events: none;
}
.champ__svg .etiquette--non {
  fill: var(--texte-nuit-2);
}
.champ__svg .etiquette--suivis {
  fill: var(--ardoise-claire);
}
.champ__svg .etiquette--revenus {
  fill: var(--ble);
  font-weight: 600;
}
.champ__bulle {
  position: absolute;
  top: 0;
  z-index: 2;
  padding: var(--e-2) var(--e-3);
  font-family: var(--sans);
  font-size: var(--t-xs);
  line-height: 1.4;
  background: var(--ble);
  color: var(--encre);
  border-radius: var(--rayon);
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%);
}
.champ__legende,
.hameau figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2) var(--e-5);
  margin-top: var(--e-3);
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--texte-nuit-2);
}
.champ__unite {
  margin-left: auto;
}
.cle {
  display: inline-block;
  width: 1.25rem;
  height: 0;
  margin-right: var(--e-2);
  vertical-align: middle;
  border-top: 2px solid;
}
.cle--suivi {
  border-color: var(--ardoise-bleue);
}
.cle--retour {
  border-color: var(--ble);
}
.cle--non {
  border-color: var(--encre-3);
}
.cle--lumiere {
  width: 0.6rem;
  height: 0.75rem;
  border: 0;
  background: var(--lumiere);
}

.hameau {
  margin: 0;
}
.hameau__svg {
  width: 100%;
  height: auto;
  max-width: 22rem;
}
.hameau .maison {
  fill: var(--encre-2);
}
.hameau .toit {
  fill: var(--encre-3);
}
.hameau .fenetre {
  fill: var(--encre);
  stroke: var(--encre-3);
  stroke-width: 1;
  transition: fill var(--d-moyen) ease;
}
.hameau .fenetre.est-allumee {
  fill: var(--lumiere);
  stroke: var(--lumiere);
}
.hameau .secret text {
  font-family: var(--sans);
  font-size: 13px;
  fill: var(--ble);
}
.hameau .secret rect {
  fill: var(--encre);
  stroke: var(--ble);
  stroke-dasharray: 3 3;
}

.compteurs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-5) var(--e-5);
  margin: var(--e-7) auto 0;
}
@media (min-width: 60rem) {
  .compteurs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.compteur {
  padding-top: var(--e-3);
  border-top: 2px solid var(--encre-3);
}
.compteur--lumiere {
  border-top-color: var(--lumiere);
}
.compteur dt {
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--texte-nuit-2);
}
.compteur dd {
  margin: var(--e-1) 0 0;
}
.compteur .chiffre {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ble);
}
.compteur--lumiere .chiffre {
  color: var(--lumiere);
}
.compteur__sur {
  display: block;
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--texte-nuit-2);
}
.demo__phrase {
  margin-top: var(--e-6);
  font-size: var(--t-l);
  line-height: 1.45;
  max-width: 48rem;
  margin-inline: auto;
  min-height: 4.4em;
}
.demo__phrase,
.demo__h4 {
  margin-left: max(0px, calc((100% - var(--largeur)) / 2));
}
.demo__h4 {
  font-family: var(--sans);
  font-size: var(--t-s);
  color: var(--texte-nuit-2);
  max-width: 44rem;
}
.demo__tableau {
  margin-top: var(--e-6);
  font-family: var(--sans);
  font-size: var(--t-s);
}
.demo__tableau summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ble);
  padding: var(--e-2) 0;
}
.tableau-defile {
  overflow-x: auto;
  margin-top: var(--e-3);
}
.demo table {
  border-collapse: collapse;
  min-width: 36rem;
  width: 100%;
}
.demo caption {
  text-align: left;
  color: var(--texte-nuit-2);
  font-size: var(--t-xs);
  padding-bottom: var(--e-2);
}
.demo th,
.demo td {
  padding: var(--e-2) var(--e-3);
  border-bottom: var(--trait) solid var(--encre-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.demo th {
  font-weight: 500;
  color: var(--texte-nuit-2);
  vertical-align: bottom;
}
.demo th:first-child,
.demo td:first-child {
  text-align: left;
}

/* Livrables ----------------------------------------------------------------- */
.livrables {
  display: grid;
  gap: var(--e-7);
  max-width: calc(var(--largeur) + 2 * var(--goutiere));
  margin-inline: auto;
}
@media (min-width: 60rem) {
  .livrables {
    grid-template-columns: 6fr 5fr;
    align-items: start;
  }
}
.livrables__liste {
  margin: 0;
}
.livrables__liste dt {
  font-weight: 500;
  font-size: var(--t-l);
  line-height: 1.3;
  margin-top: var(--e-5);
}
.livrables__liste dt:first-child {
  margin-top: 0;
}
.livrables__liste dd {
  margin: var(--e-1) 0 0;
  max-width: 34rem;
  color: var(--texte-2);
}

.bilan {
  margin: 0;
}
.bilan__feuille {
  background: #fff;
  color: var(--encre);
  padding: var(--e-6) var(--e-5) var(--e-5);
  border: var(--trait) solid var(--pierre);
  box-shadow: 0.5rem 0.5rem 0 var(--chaux-2);
  font-family: var(--sans);
  font-size: var(--t-s);
  transform: rotate(-0.6deg);
}
.bilan__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
  margin-bottom: var(--e-5);
}
.bilan__tampon {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ble-fonce);
  border: 1.5px dashed var(--ble-trait);
  padding: var(--e-1) var(--e-2);
  border-radius: var(--rayon);
}
.bilan__sur {
  margin: 0;
  font-size: var(--t-xs);
  color: var(--texte-2);
}
.bilan__territoire {
  font-family: var(--serif);
  font-size: var(--t-l);
  line-height: 1.25;
  margin: var(--e-1) 0 var(--e-5);
}
.bilan__chiffres {
  display: grid;
  gap: var(--e-1);
  margin-bottom: var(--e-4);
}
.bilan__chiffres p {
  margin: 0;
}
.bilan__chiffres .chiffre {
  font-size: var(--t-l);
  margin-right: var(--e-1);
}
.bilan__lumiere .f {
  margin-left: var(--e-2);
  vertical-align: -0.05em;
}
.bilan__graphe {
  width: 100%;
  margin: var(--e-3) 0 var(--e-4);
  overflow: visible;
}
.bilan__graphe text {
  font-family: var(--serif);
  font-size: 13px;
  fill: var(--encre);
}
.bilan__graphe .bilan__etiquette {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--texte-2);
}
.bilan__axe {
  stroke: var(--encre);
}
.bilan__barre {
  fill: var(--lumiere);
}
.bilan__barre--a-venir {
  fill: none;
  stroke: var(--ardoise);
  stroke-dasharray: 3 3;
}
.bilan__fourchette {
  font-size: var(--t-xs);
}
.bilan__limite {
  margin: 0;
  padding-top: var(--e-3);
  border-top: var(--trait) solid var(--chaux-2);
  font-size: var(--t-xs);
  color: var(--texte-2);
}
.bilan figcaption {
  margin-top: var(--e-5);
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--texte-2);
}

/* Prix ---------------------------------------------------------------------- */
.prix {
  padding-top: 0;
}
.prix__tete {
  padding-top: var(--e-8);
  border-top: var(--trait) solid var(--filet);
}
.prix__montant {
  font-size: var(--t-xl);
  line-height: 1.2;
  font-weight: 300;
}
.prix__montant > .chiffre {
  font-size: var(--t-xxl);
  display: block;
  line-height: 1;
  margin-bottom: var(--e-2);
}
.prix__corps {
  display: grid;
  gap: var(--e-7);
  margin-top: var(--e-6);
}
@media (min-width: 60rem) {
  .prix__corps {
    grid-template-columns: 6fr 5fr;
  }
}
.prix__texte {
  max-width: var(--mesure);
}

.fourchettes {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-s);
  --piste: 100;
}
.fourchettes__echelle {
  position: relative;
  height: 1.25rem;
  margin: 0 2.5rem var(--e-3) 0;
  font-size: var(--t-xs);
  color: var(--texte-2);
  border-bottom: var(--trait) solid var(--pierre);
}
.fourchettes__echelle span {
  position: absolute;
  left: calc(var(--x) * 1%);
  transform: translateX(-50%);
  white-space: nowrap;
}
.fourchettes__echelle span:first-child {
  transform: none;
}
.fourchettes__echelle span:last-child {
  transform: none;
}
.fourchette {
  margin: var(--e-5) 2.5rem var(--e-5) 0;
}
.fourchette__nom {
  margin: 0 0 var(--e-2);
  font-weight: 600;
}
.fourchette__piste {
  position: relative;
  height: 1.25rem;
  background: repeating-linear-gradient(to right, var(--chaux-2) 0 1px, transparent 1px 20%);
}
.fourchette__bande {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--de) * 1%);
  width: calc((var(--a) - var(--de)) * 1%);
  background: var(--encre);
  border-radius: var(--rayon);
}
.fourchette--test .fourchette__bande {
  background: transparent;
  border: 2px dashed var(--ble-trait);
}
.fourchette__mediane {
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  left: calc(var(--x) * 1%);
  width: 3px;
  margin-left: -1.5px;
  background: var(--chaux);
}
.fourchette__valeurs {
  margin: var(--e-2) 0 0;
  color: var(--texte-2);
}
.fourchette__valeurs .chiffre {
  color: var(--encre);
  font-size: var(--t-m);
}
.fourchettes figcaption {
  font-size: var(--t-xs);
  color: var(--texte-2);
  line-height: 1.5;
}

/* Risques ------------------------------------------------------------------- */
.risques__liste {
  display: grid;
  gap: var(--e-6) var(--e-7);
  margin: var(--e-5) auto 0;
}
@media (min-width: 50rem) {
  .risques__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.risques__liste dt {
  font-weight: 500;
  font-size: var(--t-l);
  line-height: 1.3;
}
.risques__liste dd {
  margin: var(--e-2) 0 0;
  color: var(--texte-2);
  max-width: 32rem;
}

/* Appel final ---------------------------------------------------------------- */
.appel-final {
  position: relative;
  padding: var(--e-9) var(--goutiere);
  background: var(--encre-2);
  color: var(--ble);
  overflow: hidden;
}
.appel-final__sillons {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 40%;
  color: var(--encre-3);
}
.appel-final__texte {
  position: relative;
  max-width: var(--largeur);
  margin-inline: auto;
}
.appel-final__texte p {
  color: var(--ardoise-claire);
  font-size: var(--t-l);
  max-width: 34rem;
}
.appel-final .titre-section {
  max-width: 22ch;
}
.appel-final .bouton {
  margin-top: var(--e-4);
}

/* Footer and sources -------------------------------------------------------- */
.pied {
  background: var(--encre);
  color: var(--texte-nuit-2);
  padding: var(--e-8) var(--goutiere) var(--e-7);
  font-family: var(--sans);
  font-size: var(--t-xs);
  line-height: 1.6;
}
.pied > * {
  max-width: var(--largeur);
  margin-inline: auto;
}
.pied__tete {
  display: grid;
  gap: var(--e-3);
  padding-bottom: var(--e-6);
  border-bottom: var(--trait) solid var(--encre-3);
}
.pied__tete img {
  width: 6rem;
  height: auto;
  margin-bottom: var(--e-2);
}
.pied__tete p {
  max-width: 40rem;
  margin: 0;
  font-size: var(--t-s);
}
.pied a {
  color: var(--ble);
}
.pied__titre {
  margin-top: var(--e-6);
  margin-bottom: var(--e-3);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-l);
  color: var(--ble);
}
.sources {
  padding-left: 1.5rem;
  display: grid;
  gap: var(--e-3);
}
.sources li {
  max-width: 60rem;
  padding-left: var(--e-2);
  scroll-margin-top: var(--e-6);
}
.sources li::marker {
  font-family: var(--serif);
  color: var(--ble);
}
.sources li:target {
  color: var(--ble);
}
.retour-appel {
  text-decoration: none;
  margin-left: var(--e-1);
}
.pied__colophon {
  margin-top: var(--e-6);
  color: var(--ardoise-claire);
}

/* Fausse porte (dialog) ----------------------------------------------------- */
.porte {
  width: min(36rem, calc(100vw - 2 * var(--e-4)));
  max-height: calc(100svh - 2 * var(--e-4));
  padding: 0;
  border: 0;
  border-radius: var(--rayon);
  background: var(--chaux);
  color: var(--encre);
  box-shadow: 0.5rem 0.5rem 0 var(--encre-3);
  font-family: var(--sans);
  font-size: var(--t-s);
  opacity: 1;
  transform: scale(1);
  transition: opacity var(--d-moyen) var(--ease-out), transform var(--d-moyen) var(--ease-out), overlay var(--d-moyen) allow-discrete, display var(--d-moyen) allow-discrete;
}
.porte:not([open]) {
  opacity: 0;
  transform: scale(0.97);
}
@starting-style {
  .porte[open] {
    opacity: 0;
    transform: scale(0.97);
  }
}
.porte::backdrop {
  background: rgb(19 35 59 / 0.72);
}
.porte__formulaire,
.porte__merci {
  padding: var(--e-5);
}
.porte__tete {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--e-4);
}
.porte h2 {
  margin: 0 0 var(--e-3);
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-xl);
  line-height: 1.15;
}
.porte__fermer {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem -0.5rem 0 0;
  border: 0;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--encre);
  cursor: pointer;
  border-radius: var(--rayon);
}
.porte__franchise {
  padding: var(--e-3) var(--e-4);
  background: var(--chaux-2);
  border-left: 3px solid var(--lumiere);
}
.question {
  margin: var(--e-5) 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: var(--e-1);
}
.question legend {
  padding: 0;
  margin-bottom: var(--e-2);
  font-family: var(--serif);
  font-size: var(--t-m);
  font-weight: 500;
}
.question__aide {
  display: block;
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 400;
  color: var(--texte-2);
}
.question label {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  min-height: 3rem;
  padding: var(--e-1) var(--e-2);
  border-radius: var(--rayon);
  cursor: pointer;
}
.question label:has(input:checked) {
  background: var(--ble);
}
.question input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--encre);
  flex: none;
}
.porte__erreur {
  margin: var(--e-4) 0 0;
  color: #8a2a1c;
  font-weight: 600;
}
.porte__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-4) var(--e-5);
  margin-top: var(--e-5);
}

/* Sticky action bar (mobile only) ------------------------------------------ */
.barre-cta {
  display: none;
}
@media (max-width: 47.99rem) {
  .barre-cta {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 4;
    padding: var(--e-3) var(--e-4) calc(var(--e-3) + env(safe-area-inset-bottom));
    background: var(--encre);
    border-top: var(--trait) solid var(--encre-3);
    transform: translateY(0);
    transition: transform var(--d-moyen) var(--ease-out), visibility 0s;
  }
  .barre-cta[data-visible="false"] {
    transform: translateY(100%);
    visibility: hidden;
    transition: transform var(--d-court) var(--ease-out), visibility 0s var(--d-court);
  }
  .barre-cta .bouton {
    width: 100%;
    padding-inline: var(--e-3);
    font-size: var(--t-xs);
  }
  .pied {
    padding-bottom: 6rem;
  }
}

/* Small screens ------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .entete__nav,
  .entete__statut {
    display: none;
  }
  .hero {
    min-height: 92svh;
    padding-top: 6rem;
  }
  .hero__legende {
    position: static;
    grid-row: 2;
    text-align: left;
    margin-top: var(--e-5);
  }
  .hero__actions .bouton {
    width: 100%;
  }
  .inventaire__grille {
    --fenetre-grande: 1.75rem;
    gap: var(--e-2);
  }
  .champ__unite {
    margin-left: 0;
  }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .entete__statut {
    display: none;
  }
}

/* Reduced motion: keep colour changes, drop movement ------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bouton,
  .porte,
  input[type="range"]::-webkit-slider-thumb {
    transition-property: opacity, background-color, color;
  }
  .bouton:active {
    transform: none;
  }
  .porte:not([open]),
  .porte[open],
  .barre-cta,
  .barre-cta[data-visible="false"] {
    transform: none;
  }
}

@media (forced-colors: active) {
  .f--allumee,
  .cle--lumiere,
  .hameau .fenetre.est-allumee {
    forced-color-adjust: none;
  }
}
