@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "B612 Mono";
  src: url("fonts/b612-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "B612 Mono";
  src: url("fonts/b612-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bardage: #1D4D36;
  --bardage-sombre: #163D2A;
  --case: #245A40;
  --case-lue: #306B4F;
  --tole: #E9ECEA;
  --tole-2: #DCE1DE;
  --encre: #121715;
  --gris: #4F5A55;
  --givre: #DCEBE2;
  --givre-2: #A9C7B6;
  --defaut: #D13A28;
  --rouille: #9A5A35;
  --gris-pied: #9AA39F;

  --sans: "Mona Sans", "Arial", sans-serif;
  --mono: "B612 Mono", ui-monospace, monospace;
  --gouttiere: clamp(16px, 4vw, 48px);
  --large: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--tole);
  color: var(--encre);
  font: 400 1.0625rem/1.55 var(--sans);
  font-stretch: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--bardage); color: var(--givre); }
:focus-visible { outline: 2px solid var(--bardage); outline-offset: 3px; }
.accueil :focus-visible, .mentions :focus-visible, .infos :focus-visible, .pied :focus-visible { outline-color: var(--givre); }
h1, h2, h3 { margin: 0; font-family: var(--sans); text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saut { position: absolute; left: 8px; top: -60px; z-index: 30; background: var(--givre); color: var(--encre); padding: 8px 12px; }
.saut:focus { top: 8px; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: miter; stroke-linecap: square; }
.enveloppe { width: min(100% - 2 * var(--gouttiere), var(--large)); margin-inline: auto; }

/* ---------- En-tête ---------- */
.tete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  height: 52px; padding-inline: var(--gouttiere);
  background: var(--bardage-sombre); color: var(--givre);
  border-bottom: 1px solid var(--case);
  font-size: .9375rem;
}
.tete__nav { display: none; gap: 24px; }
.tete__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.tete__nav a:hover { text-decoration: underline; }
.tete__etat { margin: 0 auto 0 0; color: var(--givre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tete__etat b { color: var(--givre); font-weight: 700; }
.tete__tel {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-family: var(--mono); font-weight: 700; font-size: .9375rem; text-decoration: none;
  min-height: 44px;
}
.tete__tel:hover { text-decoration: underline; }

/* ---------- Accueil : la lecture des calculateurs ---------- */
.accueil {
  display: flex; flex-direction: column;
  min-height: calc(100svh - 52px);
  background: var(--bardage);
  color: var(--givre);
}
.lecture { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 300px; padding: 2px; }
.grille {
  flex: 1 1 auto;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 2px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, minmax(44px, 1fr));
}
.grille li {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px;
  background: var(--case-lue);
  color: var(--givre);
  font: 400 .6875rem/1.2 var(--mono);
  letter-spacing: .02em; text-transform: uppercase;
  hyphens: manual;
}
.grille li:nth-child(n+21) { display: none; }
.grille .defaut { background: var(--defaut); color: #fff; font-weight: 700; }
.grille .defaut span { font-size: .625rem; font-weight: 400; letter-spacing: .04em; }
.compteur {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 0; padding: 7px 8px 5px;
  font: 400 .6875rem/1.3 var(--mono); color: var(--givre-2);
  font-variant-numeric: tabular-nums; text-transform: uppercase; letter-spacing: .04em;
}
.compteur::before { content: "Lecture des calculateurs"; }
/* état « pas encore lu », posé par main.js seulement */
.js-lecture .grille li { background: var(--case); color: #C3DACC; }
.js-lecture .grille .defaut span { visibility: hidden; }
.js-lecture .accroche { font-weight: 200; }

.barre {
  display: grid; gap: 20px;
  padding: 22px var(--gouttiere) 26px;
  background: var(--tole); color: var(--encre);
  border-top: 2px solid var(--bardage-sombre);
}
.barre h1 {
  font-size: clamp(1.9rem, calc((100vw - 2 * var(--gouttiere)) / 9.25), 5.75rem);
  font-weight: 800; font-stretch: 125%;
  line-height: .9; letter-spacing: -.02em;
  white-space: nowrap;
}
.barre__metier { margin: 10px 0 0; max-width: 34ch; color: var(--gris); font-size: 1rem; line-height: 1.4; }
.accroche {
  margin: 0;
  font-size: clamp(1.6rem, 6.4vw, 2.75rem);
  font-weight: 800; font-stretch: 100%;
  line-height: 1.04; letter-spacing: -.01em;
  max-width: 17ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 18px;
  border: 2px solid var(--bardage); color: var(--bardage);
  font: 700 1rem/1 var(--sans); text-decoration: none;
  transition: background-color .2s cubic-bezier(.16,1,.3,1), color .2s cubic-bezier(.16,1,.3,1);
}
.bouton:hover { background: var(--bardage); color: var(--givre); }
.bouton--plein { background: var(--bardage); color: var(--givre); }
.bouton--plein:hover { background: var(--bardage-sombre); border-color: var(--bardage-sombre); }
.bouton--clair { border-color: var(--givre); color: var(--givre); }
.bouton--clair:hover { background: var(--givre); color: var(--bardage); }
.bouton:active { transform: translateY(1px); }

/* ---------- Sections ---------- */
section h2 {
  font-size: clamp(1.9rem, 5.6vw, 3.5rem);
  font-weight: 800; font-stretch: 118%;
  line-height: 1; letter-spacing: -.015em;
  max-width: 20ch;
}
.intro { max-width: 60ch; margin: 16px 0 0; color: var(--gris); }
.cas, .prestations, .avis { padding-block: clamp(64px, 10vw, 128px); }
.cas + .prestations { padding-top: 0; }

/* Ailleurs → ici */
.releve { margin-top: clamp(32px, 5vw, 56px); border-top: 2px solid var(--encre); }
.releve__tete { display: none; }
.releve__ligne {
  display: grid; gap: 4px 12px;
  grid-template-columns: 1fr auto;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--tole-2);
}
.releve__panne::before, .releve__apres::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--defaut); vertical-align: .08em; }
.releve__panne { grid-column: 1 / -1; font-weight: 700; font-stretch: 112%; font-size: 1.1875rem; line-height: 1.2; }
.releve__avant { grid-column: 1 / -1; color: var(--gris); }
.releve__fleche { display: none; }
.releve__apres { grid-column: 1 / -1; font-weight: 600; }
.releve__apres::before { background: var(--case-lue); }
.releve__qui { grid-column: 1 / -1; margin-top: 4px; font: 400 .75rem/1.3 var(--mono); color: var(--gris); }

/* Prestations */
.famille {
  display: grid; gap: 12px;
  padding: 28px 0 30px;
  border-top: 1px solid var(--tole-2);
}
.famille:first-of-type { margin-top: clamp(32px, 5vw, 56px); border-top: 2px solid var(--encre); }
.famille h3 { font-size: 1.5rem; font-weight: 750; font-stretch: 115%; line-height: 1.05; letter-spacing: -.01em; }
.famille ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 62ch; }
.famille li { position: relative; padding-left: 20px; }
.famille li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--case-lue); }
.famille strong { font-weight: 650; }
.preuve { margin: 4px 0 0; max-width: 56ch; font-style: italic; color: var(--gris); }
.preuve span { display: block; margin-top: 6px; font: normal 400 .75rem/1.3 var(--mono); }

/* Mentions : une case par mention */
.mentions { padding-block: clamp(64px, 10vw, 120px); background: var(--bardage); color: var(--givre); }
.mentions .intro { color: var(--givre-2); }
.barres { list-style: none; margin: clamp(32px, 5vw, 48px) 0 0; padding: 0; display: grid; gap: 14px; }
.barres li {
  display: grid; align-items: center; gap: 6px 12px;
  grid-template-columns: 1fr auto;
}
.barres__mot { font-weight: 650; font-stretch: 112%; font-size: 1.125rem; line-height: 1.1; }
.barres__nb { font: 700 .9375rem/1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.barres__cases {
  grid-column: 1 / -1; grid-row: 2;
  height: 18px;
  width: calc(var(--n) / 24 * (100% + 3px));
  background: repeating-linear-gradient(90deg, var(--givre) 0 calc(100% / var(--n) - 3px), transparent 0 calc(100% / var(--n)));
  transform-origin: left center;
}
.barres li:first-child .barres__cases { background-image: repeating-linear-gradient(90deg, #fff 0 calc(100% / var(--n) - 3px), transparent 0 calc(100% / var(--n))); }

/* Avis */
.avis__liste { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--encre); }
.avis__liste li { padding: 24px 0 26px; border-bottom: 1px solid var(--tole-2); }
.note { display: flex; gap: 3px; margin: 0 0 12px; }
.note i { width: 10px; height: 10px; background: var(--bardage); }
.avis blockquote { margin: 0; font-size: 1.125rem; line-height: 1.5; font-style: italic; max-width: 60ch; }
.qui { margin: 12px 0 0; font: 400 .75rem/1.3 var(--mono); color: var(--gris); }
.avis__plus { margin: 28px 0 0; font-weight: 700; }

/* Infos pratiques */
.infos { padding-block: clamp(64px, 10vw, 120px) clamp(80px, 10vw, 120px); background: var(--bardage); color: var(--givre); }
.infos__grille { display: grid; gap: 48px; }
.horaires { width: 100%; margin-top: 28px; border-collapse: separate; border-spacing: 0 3px; font: 400 .875rem/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.horaires th, .horaires td { white-space: nowrap; padding: 12px 10px; text-align: left; }
.horaires td { background: var(--case-lue); border-left: 3px solid var(--bardage); }
.horaires thead th { padding: 0 10px 4px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--givre-2); font-weight: 400; }
.horaires tbody th { padding-left: 0; font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.horaires td.ferme { background: var(--bardage-sombre); color: var(--givre-2); }
.horaires tr.aujourdhui td:not(.ferme) { background: var(--givre); color: var(--bardage-sombre); font-weight: 700; }
.horaires tr.aujourdhui th::after { content: "aujourd'hui"; display: block; font-size: .8125rem; font-weight: 400; color: var(--givre-2); }
.infos__tel { margin: 24px 0 0; }
.infos__tel a { font: 800 clamp(2rem, 8vw, 3rem)/1 var(--sans); font-stretch: 115%; letter-spacing: -.01em; text-decoration: none; }
.infos__tel a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.infos__lieu h3 { font-size: 1.5rem; font-weight: 750; font-stretch: 112%; line-height: 1.1; max-width: 22ch; }
.infos__lieu p { color: var(--givre); max-width: 52ch; }
.portail { margin: 24px 0; }
.portail img { width: 100%; aspect-ratio: 1024 / 601; object-fit: cover; filter: saturate(.85); }
.portail figcaption { margin-top: 8px; font-size: .875rem; color: var(--givre-2); }
.carte { min-height: 320px; background: var(--case); }
.carte iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; filter: grayscale(.35); }

/* Pied */
.pied { padding: 48px 0 104px; background: var(--encre); color: var(--tole-2); font-size: .9375rem; border-top: 3px solid var(--rouille); }
.pied__grille { display: grid; gap: 16px; }
.pied p { margin: 0; }
.pied__nom { white-space: nowrap; font-weight: 800; font-stretch: 125%; font-size: 1.5rem; letter-spacing: -.02em; color: var(--tole); }
.pied__demo { font-size: .8125rem; color: var(--gris-pied); }

/* Barre mobile */
.mobile {
  position: fixed; inset: auto 0 0 0; z-index: 25;
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--bardage-sombre);
}
.mobile a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding-bottom: env(safe-area-inset-bottom);
  font: 700 1.0625rem/1 var(--sans); text-decoration: none;
  background: var(--tole); color: var(--bardage);
}
.mobile a:first-child { background: var(--bardage); color: var(--givre); }

/* ---------- Tablette et ordi ---------- */
@media (min-width: 720px) {
  .grille { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, minmax(52px, 1fr)); }
  .grille li:nth-child(n+21) { display: flex; }
  .grille li:nth-child(n+37) { display: none; }
  .releve__tete {
    display: grid; grid-template-columns: 1.1fr 1.3fr 32px 1.5fr .8fr; gap: 20px;
    padding: 12px 0; border-bottom: 1px solid var(--tole-2);
    font: 400 .6875rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--gris);
  }
  .releve__ligne { grid-template-columns: 1.1fr 1.3fr 32px 1.5fr .8fr; gap: 20px; align-items: baseline; padding: 22px 0; }
  .releve__panne, .releve__avant, .releve__apres, .releve__qui { grid-column: auto; }
  .releve__fleche { display: block; font: 700 1.25rem/1 var(--mono); color: var(--bardage); }

  .releve__qui { margin-top: 0; text-align: right; }
  .famille { grid-template-columns: minmax(200px, 1fr) 2fr; gap: 12px 48px; }
  .famille ul, .preuve { grid-column: 2; }
  .famille h3 { grid-row: 1 / span 2; }
  .barres li { grid-template-columns: 11rem 1fr 3rem; }
  .barres__cases { grid-column: 2; grid-row: 1; }
  .avis__liste { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .infos__grille { grid-template-columns: 1fr 1fr; column-gap: 64px; }
  .carte { grid-column: 1 / -1; min-height: 400px; }
  .carte iframe { min-height: 400px; }
  .pied { padding-bottom: 56px; }
  .pied__grille { grid-template-columns: 1.2fr 2fr 2fr 1.4fr; align-items: start; }
  .mobile { display: none; }
}
@media (min-width: 1024px) {
  .tete__nav { display: flex; }
  .tete__etat { margin-left: 24px; }
  .grille { grid-template-columns: repeat(8, 1fr); }
  .grille li:nth-child(n+37) { display: flex; }
  .grille li { padding: 10px 12px; font-size: .75rem; }
  .barre {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end; column-gap: 56px;
    padding-block: 30px 34px;
  }
  .accroche { font-size: clamp(2rem, 3.1vw, 3rem); }
  .barre h1 { font-size: min(5.3vw, 6.25rem); }
}
@media (max-width: 719px) {
  body { padding-bottom: 56px; }
  .barre .actions { display: none; }
  .accueil { min-height: calc(100svh - 52px - 56px); }
  .horaires { font-size: .8125rem; }
  .horaires td { padding: 10px 8px; }
  .horaires tbody th { font-size: .9375rem; padding-right: 6px; }
  .tete { gap: 12px; font-size: .75rem; }
  .grille li { font-size: .625rem; padding: 7px; }
  .compteur::before { content: "Lecture"; }
  .horaires { font-size: .8125rem; }
  .tete__tel .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
}
