/* Les Écluses du Récollet — feuille de style commune */

:root {
  --teal: #0b5d6b;
  --teal-dark: #08434d;
  --teal-soft: #e3eff1;
  --orange: #f2672a;
  --ink: #1d2a30;
  --muted: #5b6b72;
  --line: #d9e3e7;
  --bg: #ffffff;
  --bg-alt: #f3f7f9;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --narrow: 44rem;
  --wide: 72rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

h1, h2, h3 {
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--teal-dark);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: 0; }

p { margin: 0 0 1.1em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: #fff; padding: .5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 100; }

/* ---------- Barre supérieure ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: .55rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--teal-dark);
  min-width: 0;
}
.brand img { width: 44px; height: 44px; border-radius: 4px; flex: none; object-fit: cover; }
.brand span { font-size: 1rem; font-weight: 500; letter-spacing: .02em; line-height: 1.2; }
.brand small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--teal); }
.nav a[aria-current="page"] { color: var(--teal); border-bottom-color: var(--orange); }

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

.section { padding: 4.5rem 1.25rem; }
.section--alt { background: var(--bg-alt); }
.narrow { max-width: var(--narrow); margin: 0 auto; }
.wide { max-width: var(--wide); margin: 0 auto; }

.kicker {
  display: block;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .9rem;
}
.lead { font-size: 1.22rem; line-height: 1.6; color: var(--muted); font-weight: 300; }

.intro { padding-top: 4rem; padding-bottom: 3rem; text-align: left; }

/* ---------- Bandes photo pleine largeur ---------- */

.band { margin: 0; background: var(--teal-soft); }
.band img {
  width: 100%;
  height: clamp(260px, 56vw, 620px);
  object-fit: cover;
}
.band--portrait img { height: clamp(320px, 70vw, 720px); object-position: center 60%; }
.band figcaption {
  max-width: var(--wide); margin: 0 auto;
  padding: .7rem 1.25rem;
  font-size: .85rem; color: var(--muted);
}

/* ---------- Fiche technique ---------- */

.figures {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.figures li { padding: 1.6rem 1.2rem 1.4rem 0; border-right: 1px solid var(--line); }
.figures li + li { padding-left: 1.2rem; }
.figures li:last-child { border-right: 0; }
.figures strong {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 200; line-height: 1;
  color: var(--teal);
  margin-bottom: .5rem;
}
.figures strong sup, .figures strong em { font-size: .4em; font-style: normal; font-weight: 400; vertical-align: top; margin-left: .15em; color: var(--muted); }
.figures span { font-size: .92rem; color: var(--muted); line-height: 1.45; display: block; }
.note { font-size: .85rem; color: var(--muted); margin-top: 1.5rem; }

/* ---------- Stepper ---------- */

.stepper {
  list-style: none; margin: 3rem 0 0; padding: 0;
  counter-reset: step;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4rem;
  position: relative;
}
.stepper::before {
  content: ""; position: absolute;
  top: 1.3rem; left: 1.3rem; right: 1.3rem; height: 2px;
  background: var(--line);
}
.stepper li { position: relative; counter-increment: step; padding-top: 3.6rem; }
.stepper li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--teal);
  color: var(--teal); font-weight: 500;
  border-radius: 2px;
}
.stepper li:last-child::before { border-color: var(--orange); color: var(--orange); }
.stepper h3 { margin-bottom: .4rem; }
.stepper p { font-size: .95rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* ---------- Cartes simples ---------- */

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; }
.cols > div { border-top: 3px solid var(--teal); padding-top: 1.1rem; }
.cols > div.accent { border-top-color: var(--orange); }
.cols p { font-size: .97rem; color: var(--muted); }

.links { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; text-decoration: none; color: var(--ink); }
.links a span:last-child { color: var(--orange); }
.links a:hover span:first-child { color: var(--teal); }

/* ---------- Tableaux ---------- */

.table-wrap { margin-top: 2.5rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
caption { text-align: left; font-size: .85rem; color: var(--muted); padding-bottom: .8rem; }
th, td { text-align: left; vertical-align: top; padding: .95rem .9rem .95rem 0; border-bottom: 1px solid var(--line); }
thead th {
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid var(--teal);
}
td.km { font-variant-numeric: tabular-nums; color: var(--teal); font-weight: 500; white-space: nowrap; width: 6.5rem; }
td.stop { font-weight: 500; width: 30%; }
td.see { color: var(--muted); }

/* ---------- Encadré ---------- */

.aside {
  border-left: 3px solid var(--orange);
  background: #fff;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
}
.section--alt .aside { background: #fff; }
.aside p:last-child { margin-bottom: 0; }

dl.terms { margin: 2rem 0 0; }
dl.terms dt { font-weight: 500; color: var(--teal-dark); margin-top: 1.2rem; }
dl.terms dd { margin: .2rem 0 0; color: var(--muted); }

/* ---------- Pied de page ---------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 3rem 1.25rem 2rem; font-size: .9rem; color: var(--muted); }
.footer__inner { max-width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer h2 { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .35rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--teal); }
.footer__base { max-width: var(--wide); margin: 2.5rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .8rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figures li { border-bottom: 1px solid var(--line); padding-left: 0 !important; padding-right: 1rem; }
  .figures li:nth-child(2n) { border-right: 0; padding-left: 1.2rem !important; }
  .cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .stepper { grid-template-columns: 1fr; gap: 1.8rem; }
  .stepper::before { top: 1.3rem; bottom: 1.3rem; left: 1.25rem; right: auto; width: 2px; height: auto; }
  .stepper li { padding-top: .25rem; padding-left: 4rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topbar__inner { flex-direction: column; align-items: flex-start; gap: .4rem; padding: .5rem 1rem; }
  .nav { gap: .1rem 1.1rem; font-size: .9rem; }
  .brand img { width: 40px; height: 40px; }
  .section { padding: 3rem 1rem; }
  .band figcaption { padding: .6rem 1rem; }
  .figures { grid-template-columns: 1fr; }
  .figures li, .figures li:nth-child(2n) { border-right: 0; padding: 1.2rem 0 !important; }
  .footer__inner { grid-template-columns: 1fr; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border-bottom: 1px solid var(--line); padding: .9rem 0; }
  td { border: 0; padding: .1rem 0; }
  td.km, td.stop { width: auto; }
}

.measure { max-width: var(--narrow); }
.spaced { margin-top: 2.5rem; }
