:root {
  --green: #2f7d32;
  --green-dark: #1d5220;
  --red: #c62828;
  --ink: #1f2522;
  --muted: #66706a;
  --bg: #f7f6f1;
  --card: #ffffff;
  --line: #e2e0d8;
  --radius: 12px;
  --velo: #c62828;
  --rando: #2f7d32;
  --nordique: #1565c0;
  --trail: #e65100;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line);
       display: flex; align-items: center; gap: 1rem; padding: .5rem 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--muted); font-size: .8rem; }
.brand img { height: 46px; width: auto; }
.top nav { display: flex; gap: .2rem; margin-left: auto; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); padding: .45rem .7rem; border-radius: 8px; font-weight: 500; }
.top nav a:hover { background: var(--bg); }
.top nav a[aria-current] { background: var(--green); color: #fff; }
.burger { display: none; margin-left: auto; font-size: 1.5rem; background: none; border: 0; cursor: pointer; }
@media (max-width: 860px) {
  .brand span { display: none; }
  .burger { display: block; }
  .top nav { display: none; width: 100%; flex-direction: column; }
  .nav-open .top nav { display: flex; }
}

/* Accueil */
.hero { background: center/cover no-repeat #333; color: #fff; }
.hero-inner { background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.15)); padding: 15vh 16px; }
.hero-inner > * { max-width: 1140px; margin-left: auto; margin-right: auto; }
.hero h1 { margin: 0 auto .5rem; }
.banner { background: center/cover no-repeat #333; min-height: 34vh; display: flex; align-items: flex-end; }
.banner h1 { color: #fff; margin: 0; padding: 1.2rem 16px; width: 100%; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); }

.btn { display: inline-block; background: var(--red); color: #fff; padding: .65rem 1.1rem; border-radius: 999px;
       text-decoration: none; font-weight: 600; margin: .25rem .25rem .25rem 0; border: 2px solid var(--red); }
.btn.ghost { background: transparent; color: var(--red); }
.btn.ghost.light { color: #fff; border-color: #fff; }
.btn.whatsapp { background: #25d366; border-color: #25d366; }

/* Grilles et cartes */
.grid { display: grid; gap: 16px; }
.cards4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cards3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
        box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card-body { display: block; padding: .8rem 1rem; }
.card-body strong { display: block; }
.card-body small { color: var(--muted); }
.card.section { border-top: 5px solid var(--green); }
.card.velo { border-color: var(--velo); } .card.rando { border-color: var(--rando); }
.card.nordique { border-color: var(--nordique); } .card.trail { border-color: var(--trail); }

.split { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.box { background: var(--card); border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid var(--line); margin-top: 2rem; }
.video { position: relative; aspect-ratio: 16/9; margin-top: 1rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* Galeries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 1rem 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.flyers { display: flex; flex-wrap: wrap; gap: 8px; }
.flyers img { width: 140px; border-radius: 6px; }
.event { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 100; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 1rem; }
.lb-close { top: 0; right: 0; } .lb-prev { left: 0; } .lb-next { right: 0; }

.sponsors .logos { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.sponsors img { height: 70px; width: auto; filter: grayscale(.2); }
.table { width: 100%; border-collapse: collapse; }
.table td { border-bottom: 1px solid var(--line); padding: .5rem; }
.list { padding-left: 1.1rem; } .list li { margin: .35rem 0; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin: .8rem 0; }
.post img { max-height: 300px; }

footer { margin-top: 4rem; background: var(--green-dark); color: #dfe9df; padding: 2rem 0; }
footer a { color: #fff; }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
footer .muted { color: #a9bfa9; }
.when { color: var(--red); font-weight: 600; margin: .8rem 0 -.6rem; }
.when::first-letter { text-transform: uppercase; }
