:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;

  /* Palette GPMF */
  --primary: #d93200; /* rouge */
  --secondary: #d1e8f6; /* bleu clair */

  /* Alpha variants — use these instead of hardcoding rgba(217, 50, 0, ...) */
  --primary-bg-subtle: rgba(217, 50, 0, 0.06);
  --primary-bg-hover: rgba(217, 50, 0, 0.1);
  --primary-border-subtle: rgba(217, 50, 0, 0.2);
  --primary-border: rgba(217, 50, 0, 0.25);

  --border: rgba(16, 24, 40, 0.1);
  --shadow: 0 10px 25px rgba(16, 24, 40, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}
html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(
      1200px 520px at 10% 0%,
      rgba(0, 105, 217, 0.12),
      transparent 55%
    ),
    radial-gradient(
      900px 450px at 90% 10%,
      rgba(209, 232, 246, 0.85),
      transparent 55%
    ),
    var(--bg);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size:
    100% 100%,
    100% 100%,
    auto;
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(246, 247, 251, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  height: 46px;
  width: auto;
  display: block;
}
.brand-title {
  color: var(--text);
  font-size: 20px;
  margin-left: 4px;
  font-weight: 850;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  display: none; /* visible only on mobile */
}
.site-header .brand img {
  height: 56px;
  width: auto;
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

main {
  padding: 26px 0 50px;
  flex: 1;
}

h1 {
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.12;
  margin: 14px 0 10px;
}
h2 {
  font-size: clamp(20px, 2.2vw, 28px);
  margin: 26px 0 12px;
}
h3 {
  font-size: 18px;
  margin: 0 0 6px;
}
p {
  margin: 10px 0;
}
.muted {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-clickable {
  position: relative;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}

.card-clickable:hover {
  border-color: rgba(16, 24, 40, 0.2);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.11);
  transform: translateY(-1px);
}

.card-stretched-link {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-12 {
  grid-column: span 12;
}
.col-8 {
  grid-column: span 8;
}
.col-6 {
  grid-column: span 6;
}
.col-4 {
  grid-column: span 4;
}
.col-3 {
  grid-column: span 3;
}

@media (max-width: 980px) {
  .col-8,
  .col-6,
  .col-4,
  .col-3 {
    grid-column: span 12;
  }
}

.hero {
  padding: 22px;
  border-radius: calc(var(--radius) + 6px);
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero .subtitle {
  font-size: 16px;
  color: var(--muted);
  max-width: 70ch;
}

.reprise-date {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary-border-subtle);
  background: var(--primary-bg-subtle);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 650;
  border: 1px solid transparent;
  text-decoration: none !important;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}
.btn:focus {
  outline: none;
}
.btn:focus-visible {
  box-shadow:
    0 0 0 4px rgba(217, 50, 0, 0.22),
    0 8px 20px rgba(16, 24, 40, 0.08);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.btn-primary {
  background: var(--primary);
  color: white !important;
  box-shadow: 0 10px 20px rgba(217, 50, 0, 0.25);
}

.btn-primary:hover {
  filter: brightness(0.98);
}
.btn-ghost {
  background: rgba(16, 24, 40, 0.02);
  border-color: var(--border);
  color: var(--text) !important;
}
.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.08);
}
.btn-outline {
  border-color: var(--border);
  background: var(--card);
  color: var(--text) !important;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
  white-space: nowrap;
}
.btn-outline:hover {
  transform: translateY(-1px);
  background: var(--primary-bg-subtle);
  border-color: var(--primary-border);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.12);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

a.badge:hover {
  border-color: rgba(16, 24, 40, 0.25);
  background: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.badge-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 18px rgba(16, 24, 40, 0.18);
  margin-bottom: 0px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.badge-hero:hover {
  opacity: 0.82;
  text-decoration: none;
}

.badge-hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.kpi {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-top: -30px;
  font-size: 14px;
}
.card-link:hover {
  text-decoration: underline;
}

iframe {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

footer {
  padding: 22px 0 22px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-logo {
  height: 82px;
  border-radius: 12px;
  width: auto;
  max-width: min(260px, 48vw);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.footer-title {
  font-weight: 850;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-logo {
    height: 42px;
    max-width: 78vw;
  }
}

/* =========================
   Calendrier / Programme
   ========================= */

.cal-lang {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 8px 0 12px;
}

.cal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 18px;
}

.event-card {
  margin-top: -24px;
  margin-bottom: 14px;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 14px;
  flex-wrap: wrap;
}

.cal-title {
  font-weight: 800;
  color: var(--text);
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

/* Grille du calendrier (entête + semaines) */
.cal-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.cal-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

/* Cellules génériques */
.cal-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  min-height: 44px;
}

/* Entêtes (Lun..Dim) */
.cal-headcell {
  background: rgba(209, 232, 246, 0.65);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

/* Jours cliquables = boutons */
button.cal-day {
  width: 100%;
  padding: 8px 8px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* reset bouton */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}

button.cal-day:hover {
  background: rgba(209, 232, 246, 0.55);
  border-color: var(--primary-border);
}

.cal-empty {
  background: transparent;
  border: 1px dashed rgba(16, 24, 40, 0.12);
}

/* Numéro de jour */
.cal-daynum {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}

/* Jours avec séance */
.cal-event {
  border-color: var(--primary-border);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

/* Aujourd'hui */
.cal-today {
  background: rgba(209, 232, 246, 0.7);
  border-color: rgba(26, 86, 219, 0.35);
}

.cal-today .cal-daynum {
  color: #1a56db;
  font-weight: 800;
}

/* Jour sélectionné */
.cal-selected {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 6px 16px rgba(217, 50, 0, 0.35) !important;
}

.cal-selected .cal-daynum {
  color: #fff;
}

.cal-selected .cal-dot {
  background: rgba(255, 255, 255, 0.8);
}

.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  align-self: flex-end;
  margin-top: 6px;
}

/* Panneau détails */
.cal-details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* Meta (date/heure/lieu) */
.details-meta {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(209, 232, 246, 0.35);
  display: grid;
  gap: 4px;
}

/* Badges */
.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 6px;
}

.badge-soft {
  background: rgba(209, 232, 246, 0.8);
  border-color: var(--primary-border-subtle);
}

/* Cartes par niveau */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 980px) {
  .levels-grid {
    grid-template-columns: 1fr;
  }
}

.level-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  padding: 14px;
}

.level-title {
  font-weight: 800;
  margin-bottom: 10px;
}

/* Blocs “Séance” / “Supplémentaires” avec séparations */
.block {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
}

.block-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.block-body {
  color: var(--text);
}

/* Conseil */
.advice {
  margin-top: 14px;
  border: 1px solid var(--primary-border-subtle);
  background: var(--primary-bg-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.advice-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.training-notes {
  margin-top: 18px;
}

.two-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.note-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card);
}

.note-card h3 {
  margin-top: 0;
}

.quote {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

table.borg {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

table.borg th,
table.borg td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.borg thead th {
  background: var(--bg);
  font-weight: 800;
}

table.borg tr:last-child td {
  border-bottom: none;
}

.article-hero {
  margin: 16px 0 20px;
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.article-hero figcaption {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.sponsor-card {
  margin: 0;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.sponsor-card a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsor-card img {
  max-width: 100%;
  height: 90px;
  object-fit: contain;
}

.sponsor-card figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.sponsor-card a:hover img {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}

/* Navigation */
.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Items */
.site-nav a {
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
}
.site-nav a:hover {
  background: var(--primary-bg-hover);
  border-color: var(--primary-border-subtle);
}

/* Dropdown */
.nav-item {
  position: relative;
}

.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 100;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.dropdown a:hover {
  background: rgba(16, 24, 40, 0.06);
}

/* Accordion "Groupes" (Notre proposition / mission) */
.groups-accordion {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.group-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.group-item:hover {
  border-color: rgba(16, 16, 40, 0.2);
  transform: translateY(-1px);
  transition:
    border-color 0.15s,
    transform 0.15s;
}

.group-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
}

.group-item > summary::-webkit-details-marker {
  display: none;
}

.group-item > summary::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.2s ease;
}

.group-item[open] > summary::after {
  transform: rotate(180deg);
}

.group-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--primary-border);
  background: var(--primary-bg-subtle);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  margin-left: auto;
}

.group-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-allure {
  font-size: 0.78em;
  font-weight: 400;
  color: var(--muted);
}

.group-meta {
  font-size: 0.9em;
  padding: 12px 16px 12px;
}

.group-meta ul {
  margin: 0;
  padding-left: 18px;
}

.group-meta li {
  margin: 4px 0;
}

.group-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.group-content ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.group-content ul::before {
  content: "Moniteurs";
  display: inline-flex;
  align-items: center;
  padding: 5px 0px 0px 5px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 100%;
}

.group-content li {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.875em;
}

.group-item[open] > summary {
  background: var(--primary-bg-subtle);
}

/* =========================
   Utilitaires
   ========================= */

.mt-16 {
  margin-top: 16px;
}
.mt-32 {
  margin-top: 32px;
}
/* =========================
   Course (Morat-Fribourg)
   ========================= */

.strava-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 responsive */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
}
.strava-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.list {
  margin: 10px 0 0;
  padding-left: 18px;
}

/* =========================
   Membres d'honneur
   ========================= */

.membres-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.membre-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.membre-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.membre-desc {
  color: var(--text);
}

/* =========================
   Galerie Photos & Lightbox
   ========================= */

#photo-status {
  margin: 1rem 0;
}

#photo-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
#photo-menu a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
#photo-menu a.active {
  font-weight: 600;
  border-color: var(--muted);
}
.menu-page-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.menu-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.menu-page-btn:not(:disabled):hover {
  background: rgba(16, 24, 40, 0.06);
}
.menu-page-info {
  font-size: 13px;
  color: var(--muted);
  padding: 0 4px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--bg);
  cursor: zoom-in;
}
.lb {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
}
.lb.open {
  display: flex;
}
.lb-topbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  z-index: 10000;
}
.lb-btn {
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.lb-img {
  max-width: min(1200px, 95vw);
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: #111;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  line-height: 1;
  border: 0;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 10000;
}
.lb-prev {
  left: 14px;
}
.lb-next {
  right: 14px;
}
.lb-caption {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  padding: 0 18px;
  word-break: break-word;
  z-index: 10000;
}

/* =========================
   Statistiques
   ========================= */

.stats-grid .card,
.stat-card {
  height: 100%;
}
.stat-label {
  color: var(--muted);
  font-size: 0.95rem;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 6px;
}
.stat-help {
  color: var(--muted);
  margin-top: 4px;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table-wrap th {
  font-size: 0.95rem;
}
.chart-box {
  position: relative;
  height: 320px;
  width: 100%;
}
.chart-box canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.stats-summary-list p {
  margin: 0 0 8px;
}
.card-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 700px) {
  .chart-box {
    height: 260px;
  }
  .card-title-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   Tracées hivernaux
   ========================= */

.traces-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .traces-layout {
    grid-template-columns: 1fr;
  }
}
.traces-panel {
  position: sticky;
  top: 16px;
}
@media (max-width: 900px) {
  .traces-panel {
    position: static;
  }
}
.traces-panel-header {
  margin-bottom: 10px;
}
.traces-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trace-item {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
  cursor: pointer;
}
.trace-item:hover {
  transform: translateY(-1px);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.trace-item.is-active {
  outline: 1px solid var(--border);
  border-color: var(--primary-border);
}
.trace-title {
  font-weight: 700;
  color: var(--text);
}
.traces-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.traces-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.map-box {
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}

.map-box--lg {
  height: 440px;
}

/* =========================
   Marqueurs carte RDV
   ========================= */

.map-fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: #fff;
  border: none;
  cursor: pointer;
  color: #333;
}
.map-fullscreen-btn:hover {
  background: #f4f4f4;
}
.map-fullscreen-btn svg {
  display: block;
  fill: currentColor;
}
#map-rdv:fullscreen,
#map-rdv:-webkit-full-screen {
  height: 100vh !important;
  width: 100vw !important;
}

.map-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: white;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.map-pin--rdv {
  background: var(--primary);
}
.map-pin--parking {
  background: #1a56db;
}

.map-label {
  background: white !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  color: var(--text) !important;
}
/* Masquer la petite flèche du tooltip Leaflet */
.map-label::before {
  display: none !important;
}

.map-label--rdv {
  border-color: var(--primary-border) !important;
}
.map-label--parking {
  border-color: rgba(26, 86, 219, 0.35) !important;
}
.map-pin--bus {
  background: #047857;
}
.map-label--bus {
  border-color: rgba(4, 120, 87, 0.35) !important;
}

.acces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  .acces-grid {
    grid-template-columns: 1fr;
  }
}

.acces-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.acces-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.acces-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.acces-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.acces-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.acces-link:hover {
  text-decoration: underline;
}

.map-links-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 12px 0 6px;
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.map-link:hover {
  border-color: rgba(16, 24, 40, 0.25);
  background: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.elevation-chart {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
}

.elevation-svg {
  display: block;
  width: 100%;
  height: auto;
}

.trace-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.trace-stat {
  font-size: 0.9rem;
  color: var(--muted);
  background: rgba(16, 24, 40, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

.trace-item-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
}

/* =========================
   Navigation mobile (hamburger)
   ========================= */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header-inner {
    justify-content: space-between;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .brand {
    min-width: 0;
  }

  .brand-title {
    display: inline;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(246, 247, 251, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 10px 16px 16px;
    gap: 2px;
    z-index: 49;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a,
  .site-nav .nav-item > a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  /* Flèche indiquant le dropdown */
  .has-dropdown > a::after {
    content: " ▾";
    font-size: 11px;
    opacity: 0.55;
  }

  /* Désactiver le hover, utiliser la classe .is-open via JS */
  .has-dropdown:hover .dropdown {
    display: none;
  }
  .has-dropdown.is-open .dropdown {
    display: block;
  }

  .has-dropdown .dropdown {
    position: static;
    min-width: unset;
    box-shadow: none;
    border: 1px solid var(--border);
    background: rgba(209, 232, 246, 0.3);
    border-radius: 10px;
    margin: 4px 0 6px 10px;
    padding: 4px;
  }

  .dropdown a {
    border-radius: 8px;
    padding: 10px 12px;
  }
}

/* Strava */
.strava-section {
  text-align: center;
  padding: 1rem 0;
}
.strava-section p {
  max-width: 480px;
  margin: 0 auto 1.5rem;
}
.strava-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #fc4c02;
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(252, 76, 2, 0.28);
  transition:
    filter 0.15s,
    transform 0.15s;
}
.strava-btn:hover {
  filter: brightness(0.93);
}

/* =========================
   Diaporama accueil
   ========================= */

.slideshow-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.slideshow-frame a {
  display: block;
}

.slideshow-frame img {
  display: block;
  width: 100%;
  height: 600px;
  object-fit: contain;
  background: #000;
}

.slideshow-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Flyer popup — temporaire jusqu'au 2026-05-20 ─────────────────────────── */
.flyer-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9000;
}
.flyer-modal.open {
  display: flex;
}
body.flyer-modal-open {
  overflow: hidden;
}
.flyer-modal-inner {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 680px;
  width: 100%;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.flyer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.flyer-modal-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.flyer-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
  transition: color 0.15s;
}
.flyer-modal-close:hover {
  color: var(--text);
}
.flyer-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.flyer-tab {
  padding: 5px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.flyer-tab:hover {
  background: var(--primary-bg-hover);
  border-color: var(--primary-border);
}
.flyer-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.flyer-modal-body {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.flyer-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}
.flyer-iframe.active {
  display: block;
}
.flyer-mobile-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.flyer-mobile-fallback.active {
  display: flex;
}
@media (max-width: 600px) {
  .flyer-modal-inner {
    height: 80vh;
    border-radius: var(--radius-sm);
  }
}
