:root {
  --bg: #f5f8f7;
  --surface: #ffffff;
  --ink: #182720;
  --muted: #5c6f66;
  --primary: #0e6b4f;
  --primary-dark: #0a4d39;
  --primary-soft: #e3f1ec;
  --accent: #e39a2d;
  --blue: #2f6fb2;
  --red: #c23b2e;
  --green: #1e7d43;
  --line: #dfe8e3;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(14, 45, 35, 0.08);
  --maxw: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--primary-dark);
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }

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

.container {
  width: min(var(--maxw), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.02rem;
  line-height: 1.25;
}
.brand:hover { text-decoration: none; }
.brand-logo { flex: none; border-radius: 6px; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { background: var(--primary-soft); text-decoration: none; }
.main-nav a.active { background: var(--primary); color: #fff; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary-dark);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(227, 154, 45, 0.22), transparent 60%),
    linear-gradient(135deg, #0a4d39 0%, #0e6b4f 55%, #177a58 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}
.hero-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero-logo {
  flex: none;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .hero-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
  .hero-logo {
    position: static;
    width: 72px;
    height: 72px;
    opacity: 1;
  }
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.6rem;
}

/* ---------- Home Columns (Actu + Status + Nordic'Pass) ---------- */
.home-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.actu-col img,
.nordic-pass-section img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.right-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.status-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.nordic-pass-section {
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #3a2703; }
.btn-primary:hover { background: #f0ad4a; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-outline { border-color: var(--primary); color: var(--primary-dark); background: transparent; }
.btn-outline:hover { background: var(--primary-soft); }
.hero .btn-outline { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Layout ---------- */
.page { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.page > .container > h1 { margin-bottom: 1.4rem; }

.section { margin-bottom: 2.6rem; }
.section > h2 {
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery figure:hover img { transform: scale(1.04); }

.gallery figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; }
.card ul { margin-bottom: 0; }

/* ---------- Alerts / status ---------- */
.alert {
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  border: 1px solid;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: var(--surface);
}
.alert .dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.45rem;
}
.alert strong { display: block; margin-bottom: 0.15rem; }
.alert-closed { border-color: #f0c4bf; background: #fdf1ef; }
.alert-closed .dot { background: var(--red); }
.alert-info { border-color: #c9dce9; background: #eff6fb; }
.alert-info .dot { background: var(--blue); }
.alert-warn { border-color: #f2ddb8; background: #fdf6e7; }
.alert-warn .dot { background: var(--accent); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-bleue { background: #dcebfb; color: #1d5c9e; }
.badge-rouge { background: #fbe3e0; color: #a02c21; }
.badge-ouverte { background: #dff2e5; color: var(--green); }
.badge-fermee { background: #fbe3e0; color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.table-wrap table {
  table-layout: fixed;
}
.table-wrap th:first-child,
.table-wrap td:first-child { width: 50%; }
.table-wrap th.price,
.table-wrap td.price { width: 25%; text-align: right; }
thead th {
  text-align: left;
  background: var(--primary-dark);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.8rem 1.1rem;
  white-space: nowrap;
}
tbody td { padding: 0.75rem 1.1rem; border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #f7faf9; }
td.price, th.price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.table-note { font-size: 0.88rem; color: var(--muted); margin-top: -0.8rem; margin-bottom: 1.4rem; }

/* ---------- Piste cards ---------- */
.piste-card { display: flex; flex-direction: column; gap: 0.5rem; }
.piste-card .piste-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.piste-card h3 { margin: 0; }
.gpx-link { margin: 0.75rem 0 0; font-size: 0.9rem; }

.plan-pistes { margin: 0; }
.plan-pistes img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.map-view {
  height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 0;
}
.piste-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: auto;
}
.piste-meta strong { color: var(--ink); }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.field input, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fbfdfc;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.required { color: var(--red); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-feedback {
  display: none;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.92rem;
}
.form-feedback.visible { display: block; }

/* ---------- Lists (links / partners) ---------- */
.link-list { list-style: none; padding: 0; margin: 0; columns: 2; }
.link-list li { margin-bottom: 0.55rem; break-inside: avoid; }
@media (max-width: 640px) { .link-list { columns: 1; } }

.contact-block address { font-style: normal; }
.contact-block .tel { font-weight: 700; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.6rem 0 1.4rem;
  margin-top: 2rem;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.8rem;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; font-size: 0.93rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Benevolat callout ---------- */
.benevolat-callout {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin: 2rem 0;
}
.benevolat-callout h2 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}
.benevolat-callout .callout-intro {
  color: var(--primary-dark);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}
.callout-content {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.2rem;
}
.callout-text {
  flex: 1;
}
.callout-text p {
  margin-bottom: 0.75rem;
}
.callout-text p:last-child {
  margin-bottom: 0;
}
.callout-qr {
  flex: none;
}
.callout-qr img {
  background: #fff;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.callout-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.callout-form .btn {
  flex: none;
}
.callout-form span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .callout-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .callout-qr {
    margin-top: 1rem;
  }
  .benevolat-callout {
    padding: 1.4rem 1.5rem;
  }
}

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-columns { grid-template-columns: 1fr; }
}

/* ---------- Nordic'Pass Layout ---------- */
.nordic-pass-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.nordic-pass-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.nordic-pass-table-wrap .table-wrap table {
  table-layout: fixed;
}
.nordic-pass-table-wrap th:first-child,
.nordic-pass-table-wrap td:first-child { width: 65%; }
.nordic-pass-table-wrap th.price,
.nordic-pass-table-wrap td.price { width: 17.5%; text-align: right; }

/* Nordic'Pass : l'image passe sous le tableau dès que l'écran est étroit */
@media (max-width: 1100px) {
  .nordic-pass-layout { grid-template-columns: 1fr; }
  .nordic-pass-image img { width: 100%; }
}

/* ---------- Responsive nav ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    padding: 0.6rem 1.25rem 1rem;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.15rem; }
  .main-nav a { padding: 0.65rem 0.8rem; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand { font-size: 0.92rem; }
}
