/* Itinérance alpine — feuille de style */
:root {
  --snow: #f6f4ef;
  --paper: #ffffff;
  --ink: #1d2830;
  --slate: #50606c;
  --mist: #8a97a0;
  --line: #e2ddd2;
  --night: #16222c;
  --accent: #b23a2e;      /* rouge balisage */
  --accent-dark: #8e2c22;
  --glacier: #2c6e8a;
  --olive: #b9bf55;       /* le vert du logo d'origine */
  --olive-dark: #8a9138;  /* sa version lisible sur fond clair */
  --radius: 4px;
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 18px/1.65 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--glacier); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--night); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- en-tête ---------- */
.site-header {
  position: relative;
  background: linear-gradient(180deg, #1a2a36 0%, #2b4152 70%, #3d5566 100%);
  color: #fff;
  padding-bottom: 70px;
  overflow: hidden;
}
.topbar { display: flex; justify-content: flex-end; gap: 22px; padding: 14px 0; font-size: 15px; }
.topbar a { color: #cfd9e0; text-decoration: none; }
.topbar a:hover, .topbar a[aria-current] { color: #fff; }
.brand { padding: 26px 0 8px; }
.brand a { color: #fff; text-decoration: none; }
.brand h1 { margin: 0; line-height: 0; }
.brand .logo { display: block; width: clamp(210px, 40vw, 360px); height: auto; }
.brand p { margin: 4px 0 0; font-family: var(--serif); font-style: italic; color: #b9c7d1; font-size: clamp(17px, 2.4vw, 22px); }
.ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; display: block; }

.sections { background: var(--snow); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.sections ul { list-style: none; margin: 0 auto; padding: 0 20px; max-width: var(--wrap); display: flex; gap: 6px; overflow-x: auto; }
.sections a {
  display: block; padding: 14px 18px; text-decoration: none; color: var(--slate);
  font-family: var(--serif); font-size: 20px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.sections a:hover { color: var(--ink); }
/* l'ancien site passait la rubrique courante en majuscules (text-transform sur
   menu-current et menu-parent) : on le reprend, parente comprise */
.sections a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); text-transform: uppercase; }

/* ---------- mise en page ---------- */
main { padding: 48px 0 20px; }   /* la frise fournit la respiration du bas */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; gap: 40px; } }

.quote { font-family: var(--serif); font-size: clamp(22px, 3vw, 28px); font-style: italic; margin: 0 0 6px; color: var(--night); }
.quote-src { color: var(--mist); margin: 0 0 36px; font-size: 16px; }
.lead { font-size: 20px; }

.levels { list-style: none; padding: 20px 24px; margin: 32px 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.levels li { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.dots { display: inline-flex; align-items: flex-end; gap: 3px; min-width: 46px; }
/* le petit randonneur du logo sert de pastille de niveau */
.walker { display: inline-block; width: auto; height: 23px; vertical-align: -5px; margin: 0; }
img[src$="puce.gif"] { width: auto; height: 23px; vertical-align: -5px; margin-right: 2px; }

/* ---------- colonne latérale ---------- */
aside h2 { font-size: 22px; margin: 0 0 14px; }
.side-block { margin-bottom: 40px; }
.promo { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.promo:hover { border-color: var(--accent); color: var(--ink); }
.promo img { display: block; margin: 0 auto 12px; max-height: 260px; }
.promo span { font-weight: 600; }

/* ---------- cartes d'articles ---------- */
.news { display: grid; gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; grid-template-columns: 1fr; gap: 16px; }
.card.has-cover { grid-template-columns: 180px 1fr; }
@media (max-width: 560px) { .card.has-cover { grid-template-columns: 1fr; } }
.card-cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; background: var(--line); }
.card h3 { margin: 0 0 4px; font-size: 22px; }
.card h3 a { color: var(--night); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card time { color: var(--mist); font-size: 15px; }
.card p { margin: 8px 0 0; color: var(--slate); }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 48px 0 18px; }
.section-title h2 { margin: 0; font-size: 30px; }

/* ---------- blog ---------- */
.blog-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.blog-tools input, .blog-tools select {
  font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
.blog-tools input { flex: 1 1 240px; }
.year { font-size: 26px; margin: 40px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.empty { color: var(--mist); font-style: italic; }

/* ---------- contenu (pages et articles) ---------- */
.page-title { font-size: clamp(32px, 5vw, 46px); margin: 0 0 8px; }
/* retiré de l'écran mais pas de la page : la structure des titres reste correcte */
.hors-ecran {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.meta { color: var(--mist); margin: 0 0 32px; }
.prose { max-width: 760px; }
.prose img { border-radius: 2px; margin: 8px 0; }
.prose img.walker, .prose img[src$="puce.gif"] { margin: 0 2px 0 0; border-radius: 0; }
/* logos de certification : ramenés à une vignette que le texte longe */
.prose p.has-badge { overflow: hidden; }
.prose img.badge {
  float: left; width: auto; margin: 2px 16px 6px 0;
  max-height: 64px;   /* UIMLA est carré : la hauteur le gouverne */
  max-width: 150px;   /* J+S et CCS sont très larges : la largeur les gouverne */
}
@media (max-width: 560px) { .prose img.badge { max-height: 50px; max-width: 120px; margin-right: 12px; } }
.prose table { border-collapse: collapse; width: 100%; margin: 20px 0; }
.prose td, .prose th { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose iframe { max-width: 100%; border: 0; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 22px; margin-top: 1.4em; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); font-family: var(--serif); font-style: italic; }

.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; max-width: 48%; }
.post-nav small { display: block; color: var(--mist); }
.back { display: inline-block; margin-bottom: 20px; text-decoration: none; font-size: 16px; }
.back::before { content: "← "; }
.notice { background: #fff7e6; border: 1px solid #f0d9a8; padding: 14px 18px; border-radius: var(--radius); font-size: 16px; }

/* ---------- photos encadrées et galerie ---------- */
.photo-rail { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 34px; padding: 0; }
.shot {
  flex: 1 1 190px; max-width: 264px; padding: 8px; line-height: 0; cursor: zoom-in;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(22, 34, 44, .07); text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.shot:hover, .shot:focus-visible { transform: translateY(-2px); border-color: var(--mist); box-shadow: 0 7px 18px rgba(22, 34, 44, .15); }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; margin: 0; }
@media (max-width: 560px) { .shot { flex-basis: 100%; max-width: none; } }

.lightbox {
  position: fixed; inset: 0; z-index: 50; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(9, 15, 20, .93);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  width: auto; height: auto; max-width: min(92vw, 600px); max-height: 84vh;
  padding: 10px; background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .55);
}
.lightbox button {
  flex: none; width: 46px; height: 46px; font-size: 30px; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%;
}
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* flèches posées sur les bords : elles tiennent à l'écran même en 320 px de large */
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close { position: absolute; top: 18px; right: 18px; font-size: 24px; }
.lb-count {
  position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center;
  color: #c2ced7; font-size: 15px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 560px) {
  .lightbox { padding: 10px; }
  .lightbox button { width: 38px; height: 38px; font-size: 24px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-close { top: 10px; right: 10px; font-size: 20px; }
}

/* ---------- menu des pages d'une rubrique ---------- */
.menu-rubrique {
  align-self: start; padding: 18px 22px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.menu-rubrique h2 { margin: 0 0 12px; font-size: 21px; }
.menu-rubrique h2 a { color: var(--night); text-decoration: none; }
.menu-rubrique h2 a:hover { color: var(--accent); }
.menu-rubrique ul { list-style: none; margin: 0; padding: 0; }
.menu-rubrique li { border-top: 1px solid var(--line); }
/* sans titre, le filet du premier élément n'aurait rien à séparer */
.menu-rubrique.sans-titre li:first-child { border-top: 0; }
.menu-rubrique a { display: block; padding: 9px 0; text-decoration: none; }
.menu-rubrique li a:hover { color: var(--accent); }
.menu-rubrique a[aria-current] { color: var(--ink); font-weight: 600; }
/* empilé, un menu de navigation sous tout le texte ne sert à rien : il passe devant */
@media (max-width: 900px) { .menu-rubrique { order: -1; } }

/* ---------- encart de contact (pages contact et qui-suis-je) ---------- */
.contact-card {
  align-self: start; padding: 20px 22px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-card h2 { margin: 0 0 14px; font-size: 21px; }
.contact-card p { margin: 0 0 10px; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-nom { font-weight: 600; color: var(--night); }
.contact-card a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-card a:hover { text-decoration: underline; }

/* ---------- frise du bas, reprise du site d'origine ---------- */
.frise {
  display: block; width: 100%; height: auto;
  margin: 0 0 -2px;   /* pleine largeur : l'horizon s'assoit sur le pied de page */
}
/* sur un écran étroit, la frise entière rendrait le randonneur minuscule :
   on recadre sur lui plutôt que de tout réduire */
@media (max-width: 700px) {
  .frise { height: 112px; object-fit: cover; object-position: 68% bottom; }
}

/* ---------- pied de page ---------- */
.site-footer { background: var(--night); color: #a9b6c0; font-size: 15px; padding: 28px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #dfe7ec; }
