:root {
  /* Surfaces */
  --surface-main: #F2F2F2; /*#F2F2F2;       /* fond principal des pages */
  --surface-contrast: #F0EFED;   /* fond de contraste — cards, sections alternées */
  --surface-nav: #F5F4F2;        /* fond nav et footer */

  /* Texte */
  --text-body: #1C1C1C;          /* texte courant */
  --text-strong: #111111;        /* titres */
  --text-muted: #6B7280;         /* dates, métadonnées, texte secondaire */
  --text-on-accent: #FFFFFF;     /* texte sur --accent (bouton filled) */

  /* Accent */
  --accent: #4A6FA5;             /* action principale — hover, focus, lien actif */
  --accent-subtle: #EBF0F8;      /* version atténuée — hover doux, bordures */

  /* Carte (MapLibre) */
  --map-trace-color: #00D4FF;
  --map-trace-width: 3;
  --map-pin-color: #00D4FF;
  --map-pin-size: 7;
  --map-pin-shape: circle;

  /* Légende carte */
  --legend-bg: rgba(250, 250, 250, 0.92);
  --legend-border-radius: 6px;
  --legend-padding-x: 0.875rem;
  --legend-padding-y: 0.625rem;
  --legend-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);

  /* Couleurs des tracés (doivent correspondre aux layers MapLibre) */
  --trace-roadtrip-color: #00D4FF;  /* road trip = même que --map-trace-color */
  --trace-hike-color: #4CAF50;      /* randonnée */
  --trace-walk-color: #FF9800;      /* balade */

  /* Couleurs des pins (doivent correspondre aux layers MapLibre) */
  --pin-photo-color: #E85D04;       /* pin de type photo */
  --pin-info-color: #4A6FA5;        /* pin de type info */

  /* Espacements */
  --space-sm: 0.75rem;

  /* Bordures */
  --border-light: #E2E0DC;
  --border-radius: 4px;

  /* Typographie */
  --font-title: system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
}

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

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

html {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

body {
  font-family: var(--font-body);
  background-color: var(--surface-main);
  color: var(--text-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1 {
  font-family: var(--font-title);
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-strong);
}

h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text-strong);
}

h3 {
  font-family: var(--font-title);
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-strong);
}

p {
  color: var(--text-body);
}

a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  color: var(--text-muted);
}

/* ── Fond flouté (pages contenu) ──────────────────────────── */
body.bg-image {
  background-image: url('/photos/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  --text-body: #FFFFFF;
  --text-strong: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.65);
  --border-light: rgba(255, 255, 255, 0.2);
  --surface-contrast: rgba(255, 255, 255, 0.08);
  --accent-subtle: rgba(255, 255, 255, 0.12);
}

body.bg-image::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

@media (min-width: 768px) {
  body.bg-image {
    background-attachment: fixed;
  }
}

/* ── Nav : immunisé contre bg-image ─────────────────────── */
body.bg-image .site-header {
  --text-body: #1C1C1C;
  --text-muted: #6B7280;
  --border-light: #E2E0DC;
  --accent-subtle: #EBF0F8;
  --surface-nav: #F5F4F2;
}

/* ── Footer : immunisé contre bg-image ──────────────────── */
body.bg-image footer {
  --text-body: #1C1C1C;
  --text-muted: #6B7280;
  --border-light: #E2E0DC;
  --surface-nav: #F5F4F2;
}

/* ── Colonne centrale opaque (journal, vlogs, anecdotes, carte) ── */
body.bg-image main {
  width: 50%;
  margin: 0 auto;
  background: var(--surface-main);
  color: var(--text-body);
  --text-body: #1C1C1C;
  --text-strong: #111111;
  --text-muted: #6B7280;
  --border-light: #E2E0DC;
  --surface-contrast: #F0EFED;
  --accent-subtle: #EBF0F8;
}

@media (max-width: 767px) {
  body.bg-image main {
    width: 100%;
  }
}
