/* ===========================================================================
   SOS Fuite Vaucluse, habillage D : « Nuit et bande jaune ».

   Monde : nuit-premium-signal (librairie locale, famille vitrine-de-studio).
   Fond presque noir teinte d'eau, une seule encre vive, un jaune signal,
   geometrie en pastilles, matiere (eau, reseau, calcaire, grain) partout ou
   une couleur de plus aurait ete posee.

   Le jaune ne decore jamais. Il ne marque que ce que le lecteur fait de ses
   mains tout de suite et le moyen de joindre quelqu'un : la bande « En
   attendant », la vanne des planches, le numero, le bouton.
   =========================================================================== */

/* --- Jetons ------------------------------------------------------------- */

:root {
  --nuit-0: #04070A;
  --nuit-1: var(--bg);
  --nuit-2: #0A1016;
  --nuit-3: #0E171D;
  --nuit-4: #14212A;

  --signal: var(--primary);
  --signal-sourd: #C79E12;
  --encre: #0A0F13;

  --corps: #C7D4DB;
  --gris: #9AAAB4;
  --filet: rgba(233, 239, 242, .13);
  --filet-fort: rgba(233, 239, 242, .3);
  --filet-signal: rgba(255, 210, 51, .34);
  /* Limite d'un controle : 3:1 minimum (WCAG 1.4.11), au-dessus des filets
     decoratifs. */
  --contour: rgba(233, 239, 242, .5);
  --contour-champ: rgba(233, 239, 242, .42);
  --contour-noir: rgba(10, 15, 19, .62);

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Mesure de lecture : 500 px a 17 px donnent 68 caracteres par ligne,
     mesure relevee dans le navigateur, pas deduite du ch. */
  --mesure: 500px;
  --large: 1320px;
  --gouttiere: 40px;
  --rayon: 20px;
  --pil: 999px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.42'/%3E%3C/svg%3E");
  --fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD233' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 12h16'/%3E%3Cpath d='m13.2 5.7 6.3 6.3-6.3 6.3'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* --- Socle -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--nuit-1);
  color: var(--corps);
  font-family: var(--font-corps);
  font-size: 17px;
  line-height: 1.62;
  font-synthesis-weight: none;
  /* clip et non hidden : hidden ferait de body une boite de defilement et
     casserait le collant de l'entete et des panneaux. */
  overflow-x: clip;
}

/* La nuit n'est jamais un aplat : grain fin, hachure a 45 degres, deux
   nappes de lumiere diffuse. La page a de la matiere avant d'avoir du
   contenu. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(56rem 38rem at 12% -6%, rgba(90, 150, 170, .13), transparent 62%),
    radial-gradient(48rem 34rem at 92% 22%, rgba(255, 210, 51, .055), transparent 60%),
    repeating-linear-gradient(45deg, rgba(233, 239, 242, .022) 0 1px, transparent 1px 8px);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--grain);
  opacity: .28;
  mix-blend-mode: overlay;
}

main, header, footer { position: relative; z-index: 1; }

/* L'entete collante mesure 91 px : une ancre viserait le titre derriere elle. */
main [id], #contenu, #demande { scroll-margin-top: 108px; }

img, svg { max-width: 100%; }

a { color: inherit; }

::selection { background: var(--signal); color: var(--encre); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.saut-contenu {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  padding: 12px 22px;
  border-radius: var(--pil);
  background: var(--signal);
  color: var(--encre);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top .18s ease;
}
.saut-contenu:focus { top: 16px; }

.icone {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
}
.sprite-icones { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- Typographie -------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-titres);
  font-weight: 400;
  color: var(--texte);
  letter-spacing: -.012em;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 3.55vw, 54px);
  line-height: 1.07;
}
h2 { font-size: clamp(25px, 2.05vw, 32px); line-height: 1.16; }
h3 { font-size: 21px; line-height: 1.26; }

.etiquette {
  display: inline-block;
  margin: 16px 0 0;
  padding: 5px 13px;
  border: 1px solid var(--filet-signal);
  border-radius: var(--pil);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--signal);
}
.signal .etiquette { border-color: rgba(10, 15, 19, .42); color: var(--encre); }

.prose p, .prose li { max-width: var(--mesure); }

.prose p {
  margin: 0 0 1.05em;
  color: var(--corps);
}
.prose > *:last-child { margin-bottom: 0; }

.prose strong { color: var(--texte); font-weight: 600; }

.prose a {
  color: var(--texte);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--filet-signal);
  transition: text-decoration-color .15s ease, color .15s ease;
}
.prose a:hover { color: var(--signal); text-decoration-color: var(--signal); }

.prose ul { list-style: none; margin: 0 0 1.05em; padding: 0; }
.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: .55em;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .66em;
  width: 7px;
  height: 7px;
  background: var(--signal);
  transform: rotate(45deg);
}

.prose ol { margin: 0 0 1.05em; padding-left: 1.3em; }

/* Chaque quantite passe en chiffres tabulaires et porte un filet jaune : sur
   ce site, le chiffre est ce qui se verifie. */
.q {
  font-family: var(--font-mono);
  font-size: .9em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--texte);
  background: rgba(255, 210, 51, .085);
  border-bottom: 1px solid var(--filet-signal);
  padding: .06em .3em;
  border-radius: 3px;
  white-space: nowrap;
}

.prose--deux, .prose--trois { max-width: none; }
.prose--deux { columns: 2; column-gap: 56px; }
.prose--trois { columns: 3; column-gap: 48px; }
/* Deux colonnes de 592 px : le corps monte a 20 px pour rester entre 60 et
   75 caracteres par ligne. */
.prose--tete { font-size: 20px; line-height: 1.55; }
.prose--deux p, .prose--trois p { max-width: none; break-inside: avoid; }
.prose--deux > :first-child, .prose--trois > :first-child { margin-top: 0; }

/* --- Pastilles ---------------------------------------------------------- */

.pil {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--pil);
  border: 1px solid transparent;
  font-family: var(--font-corps);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.pil .icone { width: 16px; height: 16px; stroke-width: 1.8; }

.pil--signal { background: var(--signal); color: var(--encre); }
.pil--signal:hover { background: #FFE06B; }

.pil--contour { border-color: var(--contour); color: var(--texte); }
.pil--contour:hover { border-color: var(--signal); color: var(--signal); }

.pil--noir { background: var(--encre); color: var(--signal); }
.pil--noir:hover { background: #17222B; }

.pil--noir-contour { border-color: var(--contour-noir); color: var(--encre); }
.pil--noir-contour:hover { border-color: var(--encre); background: rgba(10, 15, 19, .07); }

.pil--large { display: flex; justify-content: center; width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* --- Entete ------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px var(--gouttiere);
}
.entete::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4, 7, 10, .92) 30%, rgba(4, 7, 10, 0));
  pointer-events: none;
}

.entete__pil {
  position: relative;
  max-width: var(--large);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 8px 8px 20px;
  border: 1px solid var(--filet);
  border-radius: var(--pil);
  background: rgba(10, 16, 22, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.entete__marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--texte);
  text-decoration: none;
  padding: 4px 0;
  flex: none;
}
.entete__signe { width: 20px; height: 20px; fill: none; stroke: var(--signal); stroke-width: 1.6; }
.entete__signe-eclat { stroke: var(--signal); stroke-width: 1.4; opacity: .65; }

/* Entre 900 et 1100 px, six entrees poussaient la pastille hors du viewport :
   le rang se fait glisser dans la pastille au lieu de l'elargir. */
.entete__nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.entete__nav::-webkit-scrollbar { display: none; }
.entete__nav ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.entete__nav a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--pil);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--gris);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.entete__nav a:hover { color: var(--texte); background: rgba(233, 239, 242, .06); }
.entete__nav a[aria-current="page"] {
  color: var(--texte);
  background: rgba(233, 239, 242, .08);
  box-shadow: inset 0 0 0 1px var(--filet);
}

.entete__tel { flex: none; font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .04em; padding: 11px 20px; }

/* --- Barre basse (telephone toujours atteignable sur telephone) --------- */

.barre-basse { display: none; }

/* --- Bandes ------------------------------------------------------------- */

main { counter-reset: bande; }
.bande { position: relative; counter-increment: bande; }
.bande > .large::after {
  content: counter(bande, decimal-leading-zero);
  position: absolute;
  top: 0;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  color: rgba(154, 170, 180, .8);
  pointer-events: none;
}
.bande--tete > .large::after, .bande--duo > .large::after { display: none; }
.bande--signal > .large::after { color: rgba(10, 15, 19, .42); }

.large {
  position: relative;
  max-width: var(--large);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

.titre-bande { margin-bottom: 30px; }

.entete-bande {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--filet);
}
.entete-bande .titre-bande { margin-bottom: 0; }

.chiffre-marge {
  margin: 0;
  flex: none;
  text-align: right;
  font-family: var(--font-titres);
  font-size: clamp(42px, 4.4vw, 70px);
  line-height: .86;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.chiffre-marge i {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gris);
}

/* Tete de page : la nuit, l'eau, et la planche du metier ------------------ */

.bande--tete {
  overflow: hidden;
  border-bottom: 1px solid var(--filet);
  padding: 74px 0 78px;
}
.voile-nuit {
  position: absolute;
  inset: 0;
  background: url(../../assets/theme/nuit.webp) 62% 42% / cover no-repeat;
  opacity: .95;
}
.bande--tete::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(4, 7, 10, .96) 2%, rgba(6, 10, 14, .84) 34%, rgba(6, 10, 14, .1) 62%, rgba(6, 10, 14, .52)),
    linear-gradient(to bottom, rgba(4, 7, 10, .8), transparent 26%, rgba(4, 7, 10, .5));
  pointer-events: none;
}
.bande--tete > .large { z-index: 2; }

.tete {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 48px;
  align-items: center;
}
.tete--nue { grid-template-columns: minmax(0, 820px); }

.tete__texte .chapeau { margin-top: 22px; }
.tete__texte .chapeau p {
  margin: 0 0 .85em;
  max-width: 550px;
  font-size: 18.5px;
  line-height: 1.58;
  color: var(--corps);
}
.tete__texte .chapeau p:first-child { color: var(--texte); }

.fil { margin-bottom: 20px; }
.fil ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
}
.fil li + li::before { content: ''; display: inline-block; width: 14px; height: 1px; background: var(--filet-fort); vertical-align: middle; margin-right: 8px; }
.fil a { display: inline-block; padding: 6px 0; color: var(--gris); text-decoration: none; }
.fil a:hover { color: var(--signal); }
.fil [aria-current="page"] { color: var(--texte); }

.plaque {
  position: relative;
  padding: 18px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background:
    linear-gradient(140deg, rgba(20, 33, 42, .8), rgba(6, 10, 14, .86)),
    repeating-linear-gradient(0deg, rgba(233, 239, 242, .04) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(233, 239, 242, .04) 0 1px, transparent 1px 26px);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .95);
}
.plaque::before, .plaque::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--signal);
}
.plaque::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.plaque::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

/* Planches --------------------------------------------------------------- */

.pl {
  display: block;
  width: 100%;
  height: auto;
  color: #E9EFF2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-cadre { stroke: #E9EFF2; stroke-width: 1; opacity: .22; }
.pl-t { stroke: #E9EFF2; stroke-width: 1.4; opacity: .55; }
.pl-t2 { stroke: #E9EFF2; stroke-width: 1.5; opacity: .88; }
.pl-t3 { stroke: #E9EFF2; stroke-width: 1.2; opacity: .34; }
.pl-vide { fill: #070B0E; }
.pl-eau { stroke: var(--signal); stroke-width: 1.9; opacity: .92; }
.pl-eau-fort { stroke-width: 2.1; opacity: 1; }
.pl-halo { stroke: var(--signal); stroke-width: 1; opacity: .3; fill: rgba(255, 210, 51, .07); }
.pl-goutte { fill: var(--signal); stroke: none; }
.pl-bouchon { color: #E9EFF2; opacity: .5; }
.pl-tartre { color: #E9EFF2; opacity: .75; }
.pl-fil { stroke: #E9EFF2; stroke-width: 1; opacity: .3; fill: none; }
.pl-regle { stroke: #E9EFF2; stroke-width: 1; opacity: .26; }
/* La taille est exprimee en unites du viewBox (680 de large) : elle est divisee
   par l'echelle de rendu du SVG. 13 unites donnent 11,6 px a 1440. */
.pl-lab text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  fill: #9AAAB4;
  stroke: none;
}
.pl-lab text.pl-lab-s { fill: var(--signal); }
/* Un bloc mis a l'echelle emporterait la taille du libelle avec lui. */
.pl-lab-mini text { font-size: 10.8px; letter-spacing: .11em; }

/* Le trace du reseau se dessine une fois : il montre par ou l'eau arrive et
   ou se trouve la vanne. C'est la seule animation du site. */
.pl-trace {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: tracer 2.4s cubic-bezier(.22, .61, .36, 1) .25s forwards;
}
@keyframes tracer { to { stroke-dashoffset: 0; } }

.mq { width: 40px; height: 40px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mq-t { stroke: #E9EFF2; stroke-width: 1.7; opacity: .8; }
.mq-t3 { stroke: #E9EFF2; stroke-width: 1.4; opacity: .34; fill: none; }
.mq-s { stroke: var(--signal); stroke-width: 2; }

/* Bande signal : le seul endroit jaune, celui des gestes immediats -------- */

.bande--signal {
  background: var(--signal);
  color: var(--encre);
}
.bande__hachure {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--encre) 0 9px, transparent 9px 22px);
}
.bande__hachure--mince { height: 7px; background: repeating-linear-gradient(-45deg, var(--signal) 0 7px, transparent 7px 18px); }

.signal {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 280px;
  gap: 48px;
  padding-top: 46px;
  padding-bottom: 46px;
  align-items: start;
}
.signal__titre h2 {
  color: var(--encre);
  font-size: clamp(30px, 2.7vw, 42px);
  line-height: 1.04;
}
.signal__corps p { color: rgba(10, 15, 19, .92); max-width: var(--mesure); }
.signal__corps strong { color: var(--encre); }
.signal__corps .q {
  color: var(--encre);
  background: rgba(10, 15, 19, .09);
  border-bottom-color: rgba(10, 15, 19, .45);
}
.signal__corps a { color: var(--encre); text-decoration-color: rgba(10, 15, 19, .45); }
.signal__corps a:hover { color: var(--encre); text-decoration-color: var(--encre); }
.signal__acte { display: flex; flex-direction: column; gap: 10px; }
.signal__acte .pil { justify-content: center; }

/* Bande du role : trois colonnes serrees --------------------------------- */

.bande--role .prose--tete {
  padding: 34px 40px 36px;
  border: 1px solid var(--filet);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(20, 33, 42, .5), rgba(7, 11, 14, .72));
}
.bande--role {
  padding: 62px 0 66px;
  background:
    linear-gradient(to bottom, rgba(10, 16, 22, .9), rgba(7, 11, 14, .4)),
    repeating-linear-gradient(-45deg, rgba(233, 239, 242, .028) 0 1px, transparent 1px 9px);
  border-bottom: 1px solid var(--filet);
}

/* Bande des quatre demandes ---------------------------------------------- */

.bande--cartes { padding: 64px 0; border-bottom: 1px solid var(--filet); }

.cartes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px 26px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background:
    linear-gradient(160deg, rgba(20, 33, 42, .72), rgba(8, 13, 17, .9));
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease;
}
.carte::after {
  content: '';
  position: absolute;
  inset: auto -30% -60% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 51, .1), transparent 68%);
  pointer-events: none;
}
.carte:hover { border-color: var(--filet-signal); transform: translateY(-2px); }
.carte__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--signal);
}
.carte__marque { display: block; height: 40px; }
/* Le texte de la carte est « Fuite d'eau : goutte tenace... ». Le lien passe
   en titre et le deux-points ouvre la glose, comme une entree de lexique.
   Aucun caractere n'est ajoute ni retire. */
.carte__texte { display: block; font-size: 15.5px; line-height: 1.54; color: var(--gris); }
.carte__texte a {
  display: block;
  margin-bottom: 8px;
  padding-right: 26px;
  font-family: var(--font-titres);
  font-size: 22px;
  line-height: 1.3;
  color: var(--texte);
  text-decoration: none;
  background: var(--fleche) right .34em / 15px 15px no-repeat;
}
.carte__texte a:hover { color: var(--signal); }

/* Bande a deux colonnes avec panneau collant ----------------------------- */

.bande--duo { padding: 68px 0 72px; border-bottom: 1px solid var(--filet); }
.duo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 64px;
  align-items: start;
}
/* Le panneau est plus court que le corps : la colonne reste une marge graduee
   sur toute la hauteur, au lieu de se vider. */
.duo::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: calc(var(--gouttiere) + 363px);
  width: 11px;
  border-left: 1px solid var(--filet);
  background: repeating-linear-gradient(to bottom, var(--filet) 0 1px, transparent 1px 44px);
  pointer-events: none;
}
.duo__corps { min-width: 0; }

.bloc { position: relative; padding-left: 26px; }
.bloc + .bloc { margin-top: 52px; padding-top: 44px; border-top: 1px solid var(--filet); }
.bloc::before {
  content: '';
  position: absolute;
  left: 0;
  top: .42em;
  bottom: .3em;
  width: 1px;
  background: linear-gradient(to bottom, var(--filet-signal), var(--filet) 30%, transparent);
}
.bloc + .bloc::before { top: calc(44px + .42em); }
.bloc__tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}
.chiffre-marge--bloc { font-size: clamp(34px, 3.2vw, 52px); }

.matiere {
  height: 210px;
  margin-top: 28px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  position: relative;
}
.matiere--calcaire { background: url(../../assets/theme/calcaire.webp) 50% 42% / cover no-repeat; }
.matiere::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--rayon);
  box-shadow: inset 0 -60px 60px -40px rgba(4, 7, 10, .95);
}

/* Panneau lateral -------------------------------------------------------- */

.panneau {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: linear-gradient(170deg, rgba(20, 33, 42, .72), rgba(6, 10, 14, .92));
}
.panneau--collant { position: sticky; top: 104px; }
.panneau__rail {
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 26px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--filet) 0 4px, transparent 4px 9px);
}
.panneau__titre {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
}
.panneau__titre--suite { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--filet); color: var(--gris); }

.panneau__sommaire {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  counter-reset: som;
}
.panneau__sommaire li {
  counter-increment: som;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  border-top: 1px solid var(--filet);
}
/* Le numero est pose par la liste, pas par le lien : un lecteur d'ecran ne doit
   pas annoncer « 01 En attendant ». */
.panneau__sommaire li::before {
  content: counter(som, decimal-leading-zero);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--gris);
}
.panneau__sommaire .est-geste::before { color: var(--signal); }
.panneau__sommaire li:first-child { border-top: 0; }
.panneau__sommaire a {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  line-height: 1.38;
  color: var(--gris);
  text-decoration: none;
  transition: color .15s ease;
}
.panneau__sommaire a:hover { color: var(--texte); }
.panneau__sommaire .est-geste a { color: var(--signal); font-weight: 600; }

.panneau .pil { margin-bottom: 10px; }
.panneau .pil:last-of-type { margin-bottom: 0; }

.panneau__villes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.panneau__villes li {
  padding: 5px 11px;
  border: 1px solid var(--filet);
  border-radius: var(--pil);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--gris);
}

.panneau__liens { list-style: none; margin: 0 0 22px; padding: 0; }
.panneau__liens li { border-top: 1px solid var(--filet); }
.panneau__liens li:first-child { border-top: 0; }
.panneau__liens a { display: block; padding: 10px 0; font-size: 14px; color: var(--gris); text-decoration: none; }
.panneau__liens a:hover { color: var(--texte); }
.panneau__liens a[aria-current="page"] { color: var(--signal); }

/* Bande de zone ---------------------------------------------------------- */

.bande--zone {
  position: relative;
  overflow: hidden;
  padding: 104px 0 112px;
  border-bottom: 1px solid var(--filet);
}
.voile-reseau {
  position: absolute;
  inset: 0;
  background: url(../../assets/theme/reseau.webp) 50% 50% / cover no-repeat;
  opacity: 1;
}
.bande--zone::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(4, 7, 10, .88) 14%, rgba(4, 7, 10, .66) 52%, rgba(4, 7, 10, .3)),
    linear-gradient(to bottom, rgba(4, 7, 10, .18), rgba(4, 7, 10, .62) 34%, rgba(4, 7, 10, .62) 70%, rgba(4, 7, 10, .18));
  pointer-events: none;
}
.bande--zone > .large { z-index: 2; }
.zone { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.zone__corps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.zone__corps p { max-width: none; }
.zone__titre h2 { font-size: clamp(26px, 2.2vw, 34px); }

/* Bande des sources ------------------------------------------------------ */

.bande--sources {
  padding: 52px 0 56px;
  background: rgba(4, 7, 10, .6);
  border-bottom: 1px solid var(--filet);
}
.bande--sources .titre-bande { font-size: 19px; }
.sources ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: src;
}
.sources li {
  counter-increment: src;
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--filet);
  font-size: 14px;
  line-height: 1.46;
}
.sources li::before {
  content: counter(src, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 15px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--signal);
}
.sources a { display: inline-block; padding: 3px 0; color: var(--gris); text-decoration: none; }
.sources a:hover { color: var(--texte); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }

/* FAQ -------------------------------------------------------------------- */

.bande--faq { padding: 64px 0 68px; border-bottom: 1px solid var(--filet); }
.faq { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.faq__titre { position: sticky; top: 104px; }
.faq__liste {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 0;
}
.faq__item {
  position: relative;
  padding: 24px 24px 26px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: linear-gradient(160deg, rgba(20, 33, 42, .55), rgba(7, 11, 14, .82));
}
.faq__num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--signal);
}
.faq dt {
  margin-bottom: 10px;
  font-family: var(--font-titres);
  font-size: 20px;
  line-height: 1.3;
  color: var(--texte);
}
.faq dd { margin: 0; max-width: 440px; font-size: 15px; line-height: 1.56; color: var(--gris); }
/* Trois questions sur deux colonnes laisseraient un trou : la derniere prend
   toute la largeur et se coupe elle-meme en deux. */
.faq__item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 40px;
  align-items: start;
}
.faq__item:last-child:nth-child(odd) dd { grid-column: 2; grid-row: 1 / span 2; }

/* Chemin des etapes ------------------------------------------------------ */

.bande--chemin { overflow: hidden; }
.bande--chemin::before {
  content: '';
  position: absolute;
  inset: 0 0 0 44%;
  background: url(../../assets/theme/reseau.webp) 62% 40% / cover no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 46%, #000 80%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 46%, #000 80%, transparent);
  pointer-events: none;
}
.bande--chemin > .large { z-index: 2; }
.bande--chemin {
  padding: 66px 0 78px;
  background:
    linear-gradient(to bottom, rgba(10, 16, 22, .92), rgba(7, 11, 14, .35)),
    repeating-linear-gradient(45deg, rgba(233, 239, 242, .028) 0 1px, transparent 1px 10px);
  border-bottom: 1px solid var(--filet);
}
/* Les cinq etapes descendent en diagonale, chacune decalee d'un cran vers la
   droite, reliees par un trace coude : c'est une route, pas une pile. */
.chemin {
  display: flex;
  flex-direction: column;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.etape {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, var(--mesure));
  gap: 20px;
  align-items: start;
  margin-left: calc(var(--i) * 160px);
}
.etape::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 44px;
  width: 160px;
  height: 100%;
  border-left: 1px dashed var(--filet-fort);
  border-bottom: 1px dashed var(--filet-fort);
  pointer-events: none;
}
.etape:last-child::after { display: none; }
.etape__repere { position: relative; display: block; width: 44px; height: 44px; }
.etape__repere svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.etape__repere .etape__halo { stroke: var(--signal); stroke-width: 1; opacity: .22; }
.etape__repere b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--signal);
}
.etape__texte { display: block; padding-top: 4px; font-size: 17px; line-height: 1.58; color: var(--corps); }
.etape__texte .q { font-size: .88em; }
.chemin__avant { margin-bottom: 28px; }
.chemin__apres {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--filet);
}
.chemin__apres p { font-size: 18px; color: var(--texte); max-width: 560px; }

/* Bande de la demande ---------------------------------------------------- */

.bande--demande {
  padding: 0 0 6px;
  background:
    linear-gradient(to bottom, rgba(10, 16, 22, .95), rgba(4, 7, 10, .95)),
    repeating-linear-gradient(45deg, rgba(233, 239, 242, .03) 0 1px, transparent 1px 9px);
}
.demande-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: start;
  padding-top: 58px;
  padding-bottom: 68px;
}

.demande { min-width: 0; }
.demande h2 {
  margin-bottom: 26px;
  font-size: clamp(27px, 2.3vw, 36px);
}

.formulaire { display: grid; gap: 16px; }
.champ { display: grid; gap: 7px; }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.champ label, .champ-case label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
}
.champ input, .champ textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--contour-champ);
  border-radius: 12px;
  background: rgba(4, 7, 10, .7);
  color: var(--texte);
  font-family: var(--font-corps);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .15s ease, background-color .15s ease;
}
.champ textarea { resize: vertical; min-height: 118px; border-radius: 14px; }
.champ input:hover, .champ textarea:hover { border-color: var(--contour); }
.champ input:focus-visible, .champ textarea:focus-visible {
  border-color: var(--signal);
  background: rgba(4, 7, 10, .95);
}

.champ-piege {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.champ-case {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--contour-champ);
  border-radius: 14px;
  background: rgba(4, 7, 10, .5);
}
.champ-case input { width: 24px; height: 24px; margin: -1.5px 0 0; accent-color: var(--signal); }
.champ-case label { text-transform: none; letter-spacing: normal; font-family: var(--font-corps); font-size: 13.5px; line-height: 1.5; }
.champ-case a { color: var(--texte); text-decoration-color: var(--filet-signal); text-underline-offset: 3px; }
/* Choix facultatifs (urgence, demandeur) : titre en étiquette mono, options
   aux contours et au fond des champs. */
.champ-choix { min-width: 0; margin: 0; padding: 0; border: 0; }
.champ-choix__titre {
  padding: 0;
  margin-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
}
.champ-choix__options { display: flex; flex-wrap: wrap; gap: 8px; }
.champ-choix__option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: 1px solid var(--contour-champ);
  border-radius: 12px;
  background: rgba(4, 7, 10, .7);
  color: var(--texte);
  font-family: var(--font-corps);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.champ-choix__option:hover { border-color: var(--contour); }
.champ-choix__option input { width: 17px; height: 17px; margin: 0; accent-color: var(--signal); }
.champ-choix__option:has(input:checked) { border-color: var(--signal); }

.bouton {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--pil);
  background: var(--signal);
  color: var(--encre);
  font-family: var(--font-corps);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease;
}
.bouton:hover { background: #FFE06B; }
.bouton:disabled { opacity: .6; cursor: default; }
.bouton .icone { width: 16px; height: 16px; stroke-width: 1.9; }

.formulaire__message { margin: 0; font-size: 14.5px; min-height: 1.4em; }
.formulaire__message--erreur { color: var(--signal); }
.formulaire__message--ok { color: #7FE0A8; }
.formulaire__noscript { font-size: 14.5px; color: var(--gris); }
.formulaire__noscript a { color: var(--signal); }

.demande-panneau {
  padding: 0 0 26px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: linear-gradient(170deg, rgba(20, 33, 42, .6), rgba(6, 10, 14, .92));
  overflow: hidden;
}
.demande-panneau__image {
  height: 200px;
  background: url(../../assets/theme/goutte.webp) 50% 40% / cover no-repeat;
  border-bottom: 1px solid var(--filet);
}
.demande-panneau .panneau__titre { margin: 22px 24px 14px; }
.demande-panneau .panneau__titre--suite { margin: 24px 24px 14px; padding-top: 20px; }
.demande-panneau__ligne {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 24px;
  padding: 11px 0;
  border-top: 1px solid var(--filet);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--texte);
  text-decoration: none;
  word-break: break-word;
}
.demande-panneau__ligne .icone { color: var(--signal); width: 15px; height: 15px; }
.demande-panneau__ligne:hover { color: var(--signal); }
.demande-panneau .panneau__villes { margin: 0 24px; }

/* Pied ------------------------------------------------------------------- */

.pied { background: var(--nuit-0); border-top: 1px solid var(--filet); }
.pied__hachure { height: 7px; background: repeating-linear-gradient(-45deg, var(--signal) 0 7px, transparent 7px 20px); opacity: .5; }
.pied__grille {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-top: 54px;
  padding-bottom: 56px;
}
.pied__marque {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--texte);
}
.pied__role { margin: 0; font-size: 14px; line-height: 1.6; color: var(--gris); max-width: 46ch; }
.pied__liste { list-style: none; margin: 0; padding: 0; }
.pied__liste li { border-top: 1px solid var(--filet); }
.pied__liste li:first-child { border-top: 0; }
.pied__liste a { display: block; padding: 9px 0; font-size: 14px; color: var(--gris); text-decoration: none; }
.pied__liste a:hover { color: var(--signal); }
.pied__mail {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 16px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gris);
  text-decoration: none;
  word-break: break-word;
}
.pied__mail .icone { color: var(--signal); width: 15px; height: 15px; }
.pied__mail:hover { color: var(--texte); }

/* --- Adaptation --------------------------------------------------------- */

@media (max-width: 1180px) {
  :root { --gouttiere: 28px; }
  /* Les deux colonnes fixes de la bande jaune etranglaient le texte a
     19 caracteres par ligne : l'acte descend sous le corps. */
  .signal { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; }
  .signal__acte { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .pl-lab text { font-size: 18px; letter-spacing: .06em; }
  .pl-lab-mini text { font-size: 15px; }
  .pl { overflow: visible; }
  .duo::before { right: calc(var(--gouttiere) + 322px); }
  .tete { grid-template-columns: 1fr 1.05fr; gap: 36px; }
  .duo { grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; }
  .demande-grille { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .cartes { grid-template-columns: repeat(2, 1fr); }
  .entete__nav a { font-size: 11.5px; padding: 7px 9px; }
  .faq { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .etape { margin-left: calc(var(--i) * 96px); }
  .sources ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  body { padding-bottom: 76px; }

  .entete { position: static; padding: 14px 20px; }
  .entete__pil { flex-wrap: wrap; border-radius: 22px; padding: 14px 16px; gap: 14px; }
  .entete__nav { flex-basis: 100%; order: 3; }
  .entete__nav ul { flex-wrap: wrap; gap: 2px; }
  .entete__marque { flex: 1 1 auto; }

  .barre-basse {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(4, 7, 10, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--filet);
  }
  .barre-basse .pil { flex: 1 1 0; justify-content: center; font-size: 14px; padding: 12px 14px; }

  .tete { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .bande--tete { padding: 48px 0 56px; }
  .bande--tete::after { background: linear-gradient(to bottom, rgba(4, 7, 10, .82), rgba(4, 7, 10, .68) 44%, rgba(4, 7, 10, .9)); }
  .signal { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .prose--tete { font-size: 18px; }
  .bande--role .prose--tete { padding: 26px 24px 28px; }
  .etape { margin-left: 0; }
  .etape::after { width: 0; border-bottom: 0; }
  .signal__acte { flex-direction: row; flex-wrap: wrap; }
  .zone { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .zone__corps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .duo, .demande-grille, .faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .panneau--collant, .faq__titre { position: static; }
  .duo::before { display: none; }
  main [id], #contenu, #demande { scroll-margin-top: 16px; }
  /* En une colonne, un paragraphe reprendrait toute la largeur : la mesure
     reste posee jusqu'a ce que l'ecran soit plus etroit qu'elle. */
  .prose--deux, .prose--trois { columns: 1; }
  .prose--deux p, .prose--trois p, .zone__corps p { max-width: var(--mesure); }
  .faq__liste { grid-template-columns: minmax(0, 1fr); }
  .faq__item:last-child:nth-child(odd) { grid-template-columns: minmax(0, 1fr); }
  .faq__item:last-child:nth-child(odd) dd { grid-column: 1; grid-row: auto; }
  .pied__grille { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 680px) {
  :root { --gouttiere: 16px; --rayon: 16px; }

  body { font-size: 16.5px; }
  h1 { font-size: clamp(28px, 7.6vw, 38px); }

  /* Le numero de bande viendrait buter dans le titre replie : il quitte
     l'ecran etroit. */
  .bande > .large::after { display: none; }
  /* La planche garde ses libelles lisibles une fois reduite a la largeur du
     telephone : le viewBox retrecit, la taille du texte remonte. */
  .pl-lab text { font-size: 19px; letter-spacing: .05em; }
  .pl-lab-mini text { font-size: 15.8px; }
  .pl-regle { display: none; }
  /* Un libelle grossi depasse le viewBox : il se pose dans la marge de la
     plaque au lieu d'etre coupe. */
  .pl { overflow: visible; }
  .prose--deux, .prose--trois { columns: 1; }
  .prose p, .prose li,
  .prose--deux p, .prose--trois p, .zone__corps p, .faq dd { max-width: none; }
  .cartes, .faq__liste, .sources ul { grid-template-columns: minmax(0, 1fr); }
  .chemin { gap: 26px; }
  .etape { grid-template-columns: 38px minmax(0, 1fr); gap: 14px; }
  .etape::after { left: 19px; top: 38px; }
  .etape__repere { width: 38px; height: 38px; }
  .etape__repere svg { width: 38px; height: 38px; }
  .champ-duo { grid-template-columns: minmax(0, 1fr); }
  .entete-bande, .bloc__tete { flex-direction: column; align-items: flex-start; gap: 16px; }
  .chiffre-marge { text-align: left; }
  .bande--duo, .bande--cartes, .bande--role, .bande--zone, .bande--chemin, .bande--faq { padding-top: 44px; padding-bottom: 46px; }
  .demande-grille { padding-top: 40px; padding-bottom: 48px; }
  .bloc { padding-left: 18px; }
  .bloc + .bloc { margin-top: 36px; padding-top: 32px; }
  .bloc + .bloc::before { top: calc(32px + .42em); }
  .plaque { padding: 16px; }
  .matiere { height: 160px; }
  .pied__grille { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .entete__tel { font-size: 12px; padding: 9px 14px; }
  .entete__marque { font-size: 11.5px; letter-spacing: .06em; gap: 8px; }
  .entete__signe { width: 17px; height: 17px; }
  .entete__pil { padding: 12px 12px; gap: 10px; }
  /* Le menu replie mangeait 225 px du premier ecran : il tient sur un rang
     qui se fait glisser, sans qu'aucun lien disparaisse. */
  .entete__nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .entete__nav ul::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pl-trace { animation: none; stroke-dashoffset: 0; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
