/* ==========================================================================
   GR67 - Tour des Cevennes
   Charte : vert foret / schiste / creme papier, accent rouge balise GR
   Titres : Bitter (slab, esprit signaletique) - Textes : Source Sans 3
   (fichier en ASCII : accents en entites dans les gabarits)
   ========================================================================== */

:root {
  --gr-foret:        #2f4a3a;   /* vert chene vert / chataignier */
  --gr-foret-fonce:  #1f3329;
  --gr-schiste:      #3a4046;   /* textes, gris bleute du schiste */
  --gr-rouge:        #c0392b;   /* rouge du balisage GR */
  --gr-rouge-fonce:  #9c2b20;
  --gr-creme:        #f7f2e8;   /* fond papier (topoguide) */
  --gr-pierre:       #e8dfcf;   /* fond alterne, filets */
  --gr-blanc:        #ffffff;

  --gr-font-title: 'Bitter', Georgia, serif;
  --gr-font-text:  'Source Sans 3', 'Segoe UI', Arial, sans-serif;

  --gr-header-h:        92px;   /* haut de page */
  --gr-header-h-sticky: 64px;   /* une fois colle au scroll */
  --gr-radius: 4px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--gr-header-h-sticky) + 16px); /* ancres sous le header */
}
body {
  background-color: var(--gr-creme);
  color: var(--gr-schiste);
  font-family: var(--gr-font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
}
/* Largeur des .container : Bootstrap-em les fixe en em, donc relatives a la
   taille de texte du bloc (le pied de page, ecrit plus petit, etait plus etroit).
   En rem, la largeur est la meme partout et suit toujours le zoom texte (RGAA 10.4).
   Valeurs Bootstrap (540/720/960 px) ; en grand ecran, 1211 px, largeur
   validee de la maquette. */
@media (min-width: 36em) { .container { max-width: 33.75rem; } }
@media (min-width: 48em) { .container { max-width: 45rem; } }
@media (min-width: 62em) { .container { max-width: 60rem; } }
@media (min-width: 75em) { .container { max-width: 75.7rem; } }
h1, h2, h3, h4,
.h1, .h2, .h3, .h4 {
  font-family: var(--gr-font-title);
  font-weight: 700;
  color: var(--gr-foret-fonce);
  line-height: 1.2;
}
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 2.2rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 1.6rem 0 .6rem; }

a {
  color: var(--gr-rouge-fonce);
  text-underline-offset: 3px;
}
a:hover,
a:focus {
  color: var(--gr-rouge);
}
/* Focus : regle de base pour TOUT element (filet de securite, RGAA 10.7) */
:focus-visible {
  outline: 2px solid var(--gr-rouge);
  outline-offset: 3px;
}
/* Un mot trop long passe a la ligne au lieu d'elargir la page (RGAA 10.4 / 10.11) */
html {
  overflow-wrap: break-word;
}
/* Fonds sombres : le rouge ne contraste pas assez (< 3:1), contour creme */
.site_footer a:focus-visible,
#side-menu-container a:focus-visible,
.home_hero a:focus-visible,
.page_header a:focus-visible {
  outline-color: var(--gr-creme);
}
/* Liens dans les textes : soulignes (ne pas reposer sur la seule couleur) */
main p a:not([class]),
main li a:not([class]),
main address a:not([class]),
.site_footer address a {
  text-decoration: underline;
}
main p a:not([class]):hover,
main li a:not([class]):hover {
  text-decoration-thickness: 2px;
}
img {
  max-width: 100%;
  height: auto;
}
section {
  position: relative;
}

/* Lien d'evitement */
.skip_link {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 2000;
  padding: 8px 14px;
  background: var(--gr-foret-fonce);
  color: #fff;
}
.skip_link:focus {
  top: 10px;
  color: #fff;
}

/* Motif balise GR : bande blanche au-dessus d'une bande rouge */
.balise_stripe {
  display: block;
  height: 6px;
  background: linear-gradient(to bottom, var(--gr-blanc) 0 50%, var(--gr-rouge) 50% 100%);
}

/* --------------------------------------------------------------------------
   Logo (typographique, en attendant un vrai logo)
   -------------------------------------------------------------------------- */

.site_logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gr-foret-fonce);
  text-decoration: none;
  white-space: nowrap;
}
.site_logo:hover,
.site_logo:focus {
  color: var(--gr-foret);
  text-decoration: none;
}
.site_logo_mark {
  display: block;
  width: 34px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: width 0.3s;
}
.site_logo_mark i {
  display: block;
  height: 22px;
  background: linear-gradient(to bottom, var(--gr-blanc) 0 50%, var(--gr-rouge) 50% 100%);
  transition: height 0.3s;
}
.site_logo_txt {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.site_logo_txt strong {
  font-family: var(--gr-font-title);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: font-size 0.3s;
}
.site_logo_txt em {
  margin-top: 3px;
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gr-schiste);
}

/* --------------------------------------------------------------------------
   Header : sticky, se compacte au scroll (classe is_sticky posee en JS)
   -------------------------------------------------------------------------- */

.site_header {
  position: sticky;
  top: 0;
  z-index: 1000;              /* au-dessus du volet : le bouton sert aussi a fermer */
  background-color: var(--gr-creme);
  transition: box-shadow 0.3s, background-color 0.3s;
}
.site_header.is_sticky {
  background-color: rgba(247, 242, 232, 0.97);
  box-shadow: 0 4px 18px rgba(31, 51, 41, 0.12);
}
.site_header_inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--gr-header-h);
  transition: min-height 0.3s;
}
.site_header.is_sticky .site_header_inner {
  min-height: var(--gr-header-h-sticky);
}
.site_header.is_sticky .site_logo_txt strong {
  font-size: 1.5rem;
}
.site_header.is_sticky .site_logo_mark {
  width: 28px;
}
.site_header.is_sticky .site_logo_mark i {
  height: 18px;
}

/* Connecte en admin : la barre GSite (36px, fixe) ne doit pas masquer le header */
#container_gsite_header {
  height: 36px;
}
.with_taskbar_gsite .site_header {
  top: 36px;
}

/* --------------------------------------------------------------------------
   Menu horizontal (grand ecran)
   Markup GSite : ul.main_menu > li.item_node[_selected] > a + ul.ul_2
   -------------------------------------------------------------------------- */

.main_nav {
  display: none;
  margin-left: auto;
}
.main_menu,
.main_menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.main_menu {
  display: flex;
  align-items: center;
}
.main_menu > li {
  position: relative;
  display: flex;
  align-items: center;
}
.main_menu > li > a {
  display: block;
  padding: 10px 14px;
  color: var(--gr-foret-fonce);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  white-space: nowrap;
}
.main_menu > li.childs_multi > a {
  padding-right: 4px;
}
/* Bouton chevron (scripts/menu_gr67.php) : ouvre le sous-menu au clavier et au clic.
   Zone de 28 x 28 px (RGAA / WCAG 2.5.8 : au moins 24 px). */
.sub_toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--gr-foret-fonce);
  cursor: pointer;
}
.sub_toggle::before {           /* chevron dessine (decor : le nom vient du texte sr-only) */
  content: '';
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
/* Fleche "ouvert" : sous-menu ouvert par le chevron OU affiche au survol
   (le chevron montre toujours l'etat visible ; .is-ferme = ferme malgre le survol) */
.sub_toggle[aria-expanded="true"]::before,
.main_menu > li:hover:not(.is-ferme) > .sub_toggle::before {
  margin-top: 4px;
  transform: rotate(-135deg);
}
.sub_toggle:hover {
  background: var(--gr-pierre);
}
/* Soulignement rouge : survol et rubrique courante */
.main_menu > li > a::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 3px;
  background: var(--gr-rouge);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.main_menu > li:hover > a::before,
.main_menu > li.is-open > a::before,
.main_menu > li[class*="_selected"] > a::before {
  transform: scaleX(1);
}

/* Sous-menu : ouvert au survol (souris) ou par le chevron (.is-open).
   Plus d'ouverture automatique au focus : au clavier, Tab passe de rubrique en rubrique.
   Ferme : visibility hidden = ni visible, ni tabulable, ni lu (RGAA 10.8). */
.main_menu > li > ul {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 260px;
  padding: 8px 0;
  background: var(--gr-blanc);
  border-top: 3px solid var(--gr-rouge);
  box-shadow: 0 12px 28px rgba(31, 51, 41, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.main_menu > li:hover > ul,
.main_menu > li.is-open > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* visible tout de suite a l'ouverture : sinon un Tab rapide apres Entree sauterait le sous-menu */
  transition: opacity 0.2s, transform 0.2s, visibility 0s;
}
/* Echap pendant le survol : le sous-menu reste ferme jusqu'a ce que la souris sorte */
.main_menu > li.is-ferme:hover > ul {
  opacity: 0;
  visibility: hidden;
}
.main_menu > li > ul a {
  display: block;
  padding: 9px 20px;
  color: var(--gr-schiste);
  text-decoration: none;
}
.main_menu > li > ul a:hover,
.main_menu > li > ul a:focus,
.main_menu > li > ul li[class*="_selected"] > a {
  background: var(--gr-creme);
  color: var(--gr-rouge-fonce);
}

/* Bouton "Gites d'etape" */
.btn_gites,
.btn_gr {
  display: inline-block;
  padding: 11px 22px;
  border: 2px solid var(--gr-rouge);
  border-radius: var(--gr-radius);
  background: var(--gr-rouge);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn_gites:hover,
.btn_gites:focus,
.btn_gr:hover,
.btn_gr:focus {
  background: var(--gr-rouge-fonce);
  border-color: var(--gr-rouge-fonce);
  color: #fff;
  text-decoration: none;
}
.btn_gr_light {
  background: transparent;
  border-color: #fff;
}
.btn_gr_light:hover,
.btn_gr_light:focus {
  background: #fff;
  border-color: #fff;
  color: var(--gr-foret-fonce);
}
.site_header .btn_gites {
  display: none;
}

/* --------------------------------------------------------------------------
   Bouton menu (petit ecran) : burger qui devient croix
   -------------------------------------------------------------------------- */

.mnu_toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;              /* zone tactile confortable */
  min-height: 44px;
  margin-left: auto;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--gr-foret-fonce);
  font-family: var(--gr-font-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.mnu_toggle_icon {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}
.mnu_toggle_icon span,
.mnu_toggle_icon span::before,
.mnu_toggle_icon span::after {
  position: absolute;
  left: 0;
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.35s, background-color 0.35s;
}
.mnu_toggle_icon span { top: 7px; }
.mnu_toggle_icon span::before,
.mnu_toggle_icon span::after { content: ''; }
.mnu_toggle_icon span::before { top: -7px; }
.mnu_toggle_icon span::after  { top: 7px; }
.mnu_toggle.is-opened .mnu_toggle_icon span { background-color: transparent; }
.mnu_toggle.is-opened .mnu_toggle_icon span::before { transform: translateY(7px) rotate(45deg); }
.mnu_toggle.is-opened .mnu_toggle_icon span::after  { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Volet mobile (sidr, a droite, sous le header)
   -------------------------------------------------------------------------- */

#side-menu-container.sidr {
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 999;
  width: 100%;
  max-width: 420px;
  height: 100%;
  overflow-y: auto;
  padding: calc(var(--gr-header-h-sticky) + 30px) 32px 40px;
  background-color: var(--gr-foret-fonce);
  color: var(--gr-creme);
  visibility: hidden;               /* ferme : hors tabulation et lecteurs d'ecran */
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
}
#side-menu-container.sidr.is-visible {
  visibility: visible;
}
html.menu_open {
  overflow: hidden;                 /* sur html, pas body : sinon le sticky casse */
}
/* Voile sur la page quand le volet est ouvert */
html.menu_open body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(20, 30, 25, 0.45);
}
.menu_open .site_header {
  box-shadow: none;
}

.side_menu,
.side_menu ul,
.lang_links {
  margin: 0;
  padding: 0;
  list-style: none;
}
.side_menu > li {
  border-bottom: 1px solid rgba(247, 242, 232, 0.15);
}
.side_menu > li > a {
  display: block;
  padding: 14px 0;
  color: var(--gr-creme);
  font-family: var(--gr-font-title);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}
.side_menu ul {
  padding: 0 0 12px 14px;
  border-left: 3px solid var(--gr-rouge);
  margin-bottom: 12px;
}
.side_menu ul a {
  display: block;
  padding: 6px 0;
  color: rgba(247, 242, 232, 0.85);
  text-decoration: none;
}
.side_menu a:hover,
.side_menu a:focus,
.side_menu li[class*="_selected"] > a {
  color: #fff;
  text-decoration: underline;
}
/* Le premier sous-element repete souvent le parent (GSite) : on le garde, c'est la page d'entree */
.btn_gites_menu {
  display: block;
  margin: 28px 0 22px;
  text-align: center;
}
.lang_links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.95rem;
}
.lang_links a {
  color: rgba(247, 242, 232, 0.8);
}
.lang_links a:hover,
.lang_links a:focus {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Grand ecran (>= 1200px) : menu horizontal, pas de burger
   -------------------------------------------------------------------------- */

@media (min-width: 75em) {
  .main_nav { display: block; }
  .site_header .btn_gites { display: inline-block; }
  .mnu_toggle,
  #side-menu-container { display: none !important; }
}

/* --------------------------------------------------------------------------
   Accueil : visuel plein ecran + chiffres cles
   -------------------------------------------------------------------------- */

.home_hero {
  display: flex;
  align-items: flex-end;
  min-height: min(78vh, 720px);
  padding: 120px 0 70px;
  background: var(--gr-foret) url('images/accueil-cevennes.jpg') no-repeat 50% 50% / cover;
  color: #fff;
}
/* Degrade pour la lisibilite du texte */
.home_hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 32, 26, 0.88) 0%, rgba(20, 32, 26, 0.72) 60%, rgba(20, 32, 26, 0.3) 100%); /* texte lisible quelle que soit la photo (RGAA 3.2) */
}
.home_hero .container {
  position: relative;
}
.home_hero_txt {
  max-width: 720px;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45); /* lisibilite si la photo est claire */
}
.home_hero_btns a {
  text-shadow: none;
}
.home_hero_kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: var(--gr-rouge);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.home_hero_title {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
}
.home_hero_lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  max-width: 600px;
}
.home_hero_btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.key_figures {
  background: var(--gr-foret-fonce);
  color: var(--gr-creme);
}
.key_figures_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.key_figures_list li {
  padding: 22px 12px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.3;
}
.key_figures_list strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-family: var(--gr-font-title);
  font-size: 1.7rem;
}
@media (min-width: 48em) {
  .key_figures_list { grid-template-columns: repeat(4, 1fr); }
  .key_figures_list li + li { border-left: 1px solid rgba(247, 242, 232, 0.15); }
}

/* --------------------------------------------------------------------------
   Pages interieures : bandeau titre + fil d'Ariane
   -------------------------------------------------------------------------- */

.page_header {
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  padding: 60px 0 36px;
  background: var(--gr-foret) url('images/accueil-cevennes.jpg') no-repeat 50% 40% / cover;
  color: #fff;
}
.page_header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 32, 26, 0.88), rgba(20, 32, 26, 0.6)); /* RGAA 3.2 */
}
.page_header .container {
  position: relative;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.page_title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
}
.breadcrumb_nav {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.breadcrumb_nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb_nav li + li::before {
  content: '/';
  margin: 0 8px;
  opacity: 0.6;
}
.breadcrumb_nav a {
  color: #fff;
  text-decoration: none;
}
.breadcrumb_nav a:hover,
.breadcrumb_nav a:focus {
  text-decoration: underline;
}
.breadcrumb_nav li:last-child a {
  opacity: 0.8;
}

/* Sous-pages de la rubrique (boutons sous le bandeau)
   Markup GSite : nav.sub_nav > .container > ul.sub_nav_list > li.item_node[_selected]_level_2 > a */
.sub_nav {
  padding: 40px 0 0;
}
.sub_nav:not(:has(li)) {
  display: none;                /* rubrique sans sous-pages */
}
.sub_nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sub_nav a {
  display: inline-block;
  padding: 9px 18px;
  border: 2px solid var(--gr-foret);
  border-radius: 999px;
  color: var(--gr-foret-fonce);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.sub_nav a:hover,
.sub_nav a:focus {
  background: var(--gr-foret);
  color: #fff;
  text-decoration: none;
}
.sub_nav li[class*="_selected"] > a,
.sub_nav a[aria-current="page"] {
  background: var(--gr-foret);
  border-color: var(--gr-foret);
  color: #fff;
}
.page_content {
  padding: 0;
}

/* --------------------------------------------------------------------------
   Sections (maquette) : serviront de base aux sections GSite GR-...
   -------------------------------------------------------------------------- */

/* Les couleurs d'une section passent par des variables. Elles sont fixees :
   - dans GSite, par les themes de section (Local/gr67/sections_themes/*.css),
   - dans la maquette, par les classes sec_alt (sable) et sec_dark (vert).
   Sans theme : fond creme du site. */
.sec {
  padding: clamp(48px, 6vw, 90px) 0;
  background: var(--sec-bg, transparent);
  color: var(--sec-fg, var(--gr-schiste));
}
.sec_alt {
  --sec-bg: var(--gr-pierre);
  --sec-shadow: var(--gr-creme);
}
.sec_dark {
  --sec-bg: var(--gr-foret);
  --sec-fg: var(--gr-creme);
  --sec-title: #fff;
  --sec-link: #fff;
  --sec-kicker: #f3c9c4;
  --sec-focus: var(--gr-creme);
  --sec-shadow: var(--gr-foret-fonce);
  --sec-map-bg: var(--gr-foret-fonce);
}
.sec_title,
.sec .txt_img_txt h3,
.sec .txt_simple h3,
.cta_band_title {
  color: var(--sec-title, var(--gr-foret-fonce));
}
.sec_title {
  margin-top: 0;
}
.sec .txt_img_txt a:not([class]),
.sec .txt_simple a:not([class]),
.sec .sec_intro a,
.sec .cta_band_txt a,
.sec .txt_img_txt .card_gr_more,
.sec .press_link {
  color: var(--sec-link, var(--gr-rouge-fonce));
}
.sec a:focus-visible {
  outline-color: var(--sec-focus, var(--gr-rouge));
}
/* Petit sur-titre avec la marque balise */
.sec_kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--sec-kicker, var(--gr-rouge-fonce));
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sec_kicker::before {
  content: '';
  width: 26px;
  height: 12px;
  background: linear-gradient(to bottom, var(--gr-blanc) 0 50%, var(--gr-rouge) 50% 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.sec_intro {
  max-width: 760px;
}
/* Cible des ancres : decalee sous le header colle */
.id_ancre {
  display: block;
  position: relative;
  top: calc(-1 * var(--gr-header-h-sticky) - 20px);
  visibility: hidden;
}
/* Sections qui se suivent avec le meme fond : on ne double pas l'espace.
   Maquette : .sec voisines. GSite : chaque section est dans un <section
   class="document_section [theme_xxx]"> (meme theme : regle dans le fichier du theme) */
.sec:not(.sec_alt):not(.sec_dark) + .sec:not(.sec_alt):not(.sec_dark),
.sec_alt + .sec_alt,
.document_section:not([class*="theme_"]) + .document_section:not([class*="theme_"]) > .sec {
  padding-top: 0;
}
/* Marges reglables par section : champ "Classe CSS pour la section" de GSite.
   GSite pose la classe sur la <section> avec le prefixe "parent_" (pb-0 donne parent_pb-0).
   0 = aucune marge, 1 = demi-marge. Plusieurs classes possibles, separees par un espace (ex. pt-1 pb-0).
   !important : l'emporte sur les regles automatiques (sections de meme fond collees). */
.parent_pt-0 > .sec, .parent_py-0 > .sec { padding-top: 0 !important; }
.parent_pb-0 > .sec, .parent_py-0 > .sec { padding-bottom: 0 !important; }
.parent_pt-1 > .sec, .parent_py-1 > .sec { padding-top: clamp(24px, 3vw, 45px) !important; }
.parent_pb-1 > .sec, .parent_py-1 > .sec { padding-bottom: clamp(24px, 3vw, 45px) !important; }

/* Texte simple : meme largeur que les autres sections (decision du 19/11/2026,
   la colonne centree de 820px paraissait en retrait) */

/* Texte + image */
.txt_img {
  display: grid;
  gap: 28px 56px;
  align-items: center;
}
.txt_img_img img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--gr-radius);
  box-shadow: 14px 14px 0 var(--sec-shadow, var(--gr-pierre));
}
@media (min-width: 62em) {
  .txt_img { grid-template-columns: 1fr 1fr; }
  .txt_img_reverse .txt_img_img { order: 2; }
}

/* Variante "petite image" (pages interieures, photos de petite taille) */
@media (min-width: 62em) {
  .txt_img_small { grid-template-columns: minmax(0, 360px) 1fr; align-items: start; }
  .txt_img_small.txt_img_reverse { grid-template-columns: 1fr minmax(0, 360px); }
}
.txt_img_small .txt_img_img img {
  aspect-ratio: auto;
}
/* Colonne image empilee (etapes : carte + profil) */
.txt_img_stack img {
  margin-bottom: 18px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}
.txt_img_stack p {
  margin: 0;
}
/* Etape sans aucune image : le texte prend toute la largeur */
.txt_img_stack:not(:has(img)) {
  display: none;
}
@media (min-width: 62em) {
  .txt_img_small:has(> .txt_img_stack:not(:has(img))) { grid-template-columns: 1fr; }
}
.txt_img_stack img.is-zoomable {
  cursor: zoom-in;
}

/* Carte detaillee en grand (fenetre <dialog> creee par gr67.js) */
.zoom_dialog {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.zoom_dialog::backdrop {
  background: rgba(31, 51, 41, 0.88);
}
.zoom_dialog img {
  display: block;
  max-width: 96vw;
  max-height: calc(96vh - 60px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--gr-radius);
  background: #fff;
}
.zoom_close {
  display: block;
  min-height: 44px;
  margin: 0 0 12px auto;
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: var(--gr-radius);
  background: var(--gr-creme);
  color: var(--gr-foret-fonce);
  font-weight: 600;
  cursor: pointer;
}
.zoom_close:hover {
  background: #fff;
}
.zoom_dialog :focus-visible {
  outline-color: var(--gr-creme);
}
.txt_img_txt > h2:first-child,
.txt_simple > h2:first-child {
  margin-top: 0;
}

/* Galerie de petites images */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.gallery img {
  border-radius: var(--gr-radius);
}

/* Tableaux (etapes) */
.sec .table {
  background: var(--gr-blanc);
  color: var(--gr-schiste);
}
.sec .table th {
  font-weight: 600;
}

/* Tableaux saisis dans l'editeur GSite : aucune classe a ajouter.
   La boite "Tableau" (scripts/ckeditor/ck_config.js) produit <caption>, <th scope>,
   sans attribut de presentation ; tout le style vient d'ici. :where() = specificite nulle,
   les tableaux du theme (.table_ravito...) gardent leur propre style. */
:where(.type-text, .page_content, .txt_simple, .txt_img_txt) table {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
  background: var(--gr-blanc);
  color: var(--gr-schiste);
}
:where(.type-text, .page_content, .txt_simple, .txt_img_txt) caption {
  caption-side: top;
  padding: 0 0 0.5rem;
  color: var(--sec-fg, var(--gr-schiste));
  font-weight: 600;
  text-align: left;
}
:where(.type-text, .page_content, .txt_simple, .txt_img_txt) :is(th, td) {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gr-pierre);
  text-align: left;
  vertical-align: top;
}
:where(.type-text, .page_content, .txt_simple, .txt_img_txt) :is(thead th, th[scope="col"]) {
  background: var(--gr-foret);       /* blanc sur vert : 8,7:1 */
  color: #fff;
}
:where(.type-text, .page_content, .txt_simple, .txt_img_txt) th[scope="row"] {
  background: var(--gr-creme);
  color: var(--gr-foret-fonce);
}
/* Tableau plus large que l'ecran : defilement dans le bloc de texte, pas dans la page (RGAA 10.11) */
:where(.type-text, .page_content):has(> table, > * > table) {
  overflow-x: auto;
}

/* Tableau du ravitaillement */
.table_ravito caption {
  caption-side: top;
  padding-top: 0;
  color: var(--sec-fg, var(--gr-schiste));
  font-style: italic;
}
.table_ravito th[scope="row"] {
  min-width: 140px;
  color: var(--gr-foret-fonce);
  font-family: var(--gr-font-title);
}
.table_ravito th[scope="row"] small {
  display: block;
  color: var(--gr-schiste);
  font-family: var(--gr-font-text);
  font-weight: 400;
}
.table_ravito td:last-child {
  min-width: 150px;
}
.table_ravito thead th {
  border-bottom: 3px solid var(--gr-rouge);
}
/* Petit ecran : chaque ligne devient une fiche (pas de defilement horizontal) */
@media (max-width: 47.9375em) {
  .table_ravito thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table_ravito tr,
  .table_ravito th,
  .table_ravito td {
    display: block;
    width: 100%;
  }
  .table_ravito tr {
    margin-bottom: 14px;
    border-top: 3px solid var(--gr-rouge);
  }
  .table_ravito td {
    border-top: 0;
    padding-top: 0;
  }
}

/* Plan du site */
.plan_du_site ul {
  padding-left: 1.2em;
}
.plan_du_site > ul > li {
  margin-bottom: 10px;
  font-family: var(--gr-font-title);
  font-weight: 700;
}
.plan_du_site ul ul {
  font-family: var(--gr-font-text);
  font-weight: 400;
}
/* Plan du site genere par GSite (ul#sitemap_full) : meme rendu que la maquette.
   map.css du coeur (colonnes, filets, capitales) neutralise ; .sitemap en tete pour
   passer devant ses selecteurs a id. Le lien racine "gr67" (doublon d'Accueil) est masque. */
.sitemap ul#sitemap_full,
.sitemap ul#sitemap_full ul {
  margin: 0;
  padding: 0 0 0 1.2em;
  columns: auto;
  list-style: disc;
}
.sitemap ul#sitemap_full {
  padding-left: 0;
  list-style: none;
}
.sitemap ul#sitemap_full > li > ul {
  padding-left: 1.2em;
}
.sitemap ul#sitemap_full li {
  margin: 0 0 4px;
  list-style-type: inherit;
}
.sitemap ul#sitemap_full > li > ul > li {
  margin-bottom: 14px;
}
.sitemap ul#sitemap_full > li > .div_map_depth_0 {
  display: none;
}
.sitemap ul#sitemap_full a {
  display: inline;
  margin: 0;
  border: 0;
  color: var(--gr-foret);
  font-size: 1em;
  font-weight: 400;
  line-height: 1.65;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-transform: none;
}
.sitemap ul#sitemap_full .map_depth_1 a {
  color: var(--gr-foret-fonce);
  font-family: var(--gr-font-title);
  font-size: 1.1em;
  font-weight: 700;
}
.sitemap ul#sitemap_full a:hover,
.sitemap ul#sitemap_full a:focus {
  color: var(--gr-rouge-fonce);
  text-decoration-thickness: 2px;
}
.sitemap > br {
  display: none;
}
/* Page sans section : meme marge que les sections (.sec) autour du plan */
.sitemap {
  padding: clamp(48px, 6vw, 90px) 0;
}
/* Gabarit plan.html : menus secondaires (langues, informations) a la suite du plan */
.page_plan .sitemap {
  padding-bottom: 0;
}
.sitemap_more,
.sitemap_more ul {
  margin: 0;
  padding: 0 0 0 1.2em;
  list-style: disc;
}
.sitemap_more {
  margin-bottom: clamp(48px, 6vw, 90px);
}
.sitemap_more > li {
  margin-bottom: 14px;
}
.sitemap_more ul li {
  margin: 0 0 4px;
}
.sitemap_more_title {
  color: var(--gr-foret-fonce);
  font-family: var(--gr-font-title);
  font-size: 1.1em;
  font-weight: 700;
}
.sitemap_more a {
  color: var(--gr-foret);
  line-height: 1.65;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.sitemap_more a:hover,
.sitemap_more a:focus {
  color: var(--gr-rouge-fonce);
  text-decoration-thickness: 2px;
}

/* Video (YouTube) a la place de l'image */
.video_frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--gr-radius);
  background: var(--gr-foret-fonce);
  box-shadow: 14px 14px 0 var(--sec-shadow, var(--gr-pierre));
}
.video_frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Sans JavaScript (ou lien non reconnu) : lien centre dans le cadre */
.video_fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}
.video_fallback:hover,
.video_fallback:focus {
  color: #fff;
}

/* Lien presse : vignette + libelle */
.press_link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-weight: 600;
}
.press_link img {
  border: 1px solid var(--gr-pierre);
  background: #fff;
}

/* Les 7 etapes : cartes numerotees
   RGAA 6.1 : un seul lien par tuile (sur l'itineraire), zone de clic etendue a la tuile
   par a::after ; le contour de focus entoure toute la tuile (:has). */
.etapes_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 18px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.etape_card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  border-radius: var(--gr-radius);
  background: var(--gr-blanc);
  color: var(--gr-schiste);
  box-shadow: 0 1px 2px rgba(31, 51, 41, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.etape_card:hover,
.etape_card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(31, 51, 41, 0.14);
}
.etape_card::before {         /* barre balise en haut de la carte (decor) */
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  width: 40px;
  height: 6px;
  background: linear-gradient(to bottom, var(--gr-blanc) 0 50%, var(--gr-rouge) 50% 100%);
}
.etape_card p {
  margin: 0;
}
.etape_num {                  /* affiche au-dessus de l'itineraire, apres lui dans le code */
  order: -1;
  color: #8f7f62;               /* pierre foncee : 3,9:1 sur blanc (gros texte) */
  font-family: var(--gr-font-title);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.etape_route {
  margin: 8px 0 12px !important;
  color: var(--gr-foret-fonce);
  font-family: var(--gr-font-title);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}
.etape_link,
.etape_link:hover,
.etape_link:focus {
  color: inherit;
  text-decoration: none;
}
.etape_link::after {          /* zone de clic = toute la tuile */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.etape_link:hover {
  text-decoration: underline;
}
.etape_link:focus-visible {
  outline: none;
}
.etape_card:has(.etape_link:focus-visible) {
  outline: 2px solid var(--sec-focus, var(--gr-rouge));
  outline-offset: 3px;
}
.etape_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.92rem;
}
.etape_meta b {
  color: var(--gr-rouge-fonce);
}
/* Champs non remplis dans GSite : la balise de la valeur est supprimee, on masque son libelle */
.etape_dist:not(:has(b)),
.etape_duree:not(:has(.etape_val)),
.etape_meta:not(:has(b)):not(:has(.etape_val)) {
  display: none;
}
.etape_txt p {
  margin: 0;
}
/* Tuile "carte" : fond vert, pas de ligne distance / duree */
.etape_card_map {
  background: var(--sec-map-bg, var(--gr-foret)); /* plus sombre sur un theme vert */
  color: var(--gr-creme);
}
.etape_card_map .etape_route {
  margin-top: 0 !important;
  color: #fff;
}
.etape_card_map .etape_meta,
.etape_card_map .etape_num {
  display: none;
}
.etape_card_map .card_gr_more {
  margin-top: 12px;
  color: #f3c9c4;
}

/* Cartes avec photo : liste, un seul lien (sur le titre), zone de clic etendue */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 24px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.card_gr {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--gr-radius);
  background: var(--gr-blanc);
  color: var(--gr-schiste);
  box-shadow: 0 1px 2px rgba(31, 51, 41, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card_gr:hover,
.card_gr:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(31, 51, 41, 0.14);
}
.card_gr img {
  order: -1;                    /* photo en haut, titre en premier dans le code */
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.card_gr_body {
  padding: 18px 20px 22px;
}
.card_gr_title {
  margin: 0 0 6px;
}
.card_gr_link,
.card_gr_link:hover,
.card_gr_link:focus {
  color: var(--gr-foret-fonce);
  text-decoration: none;
}
.card_gr_link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card_gr_link:hover {
  text-decoration: underline;
}
.card_gr_link:focus-visible {
  outline: none;
}
.card_gr:has(.card_gr_link:focus-visible) {
  outline: 2px solid var(--sec-focus, var(--gr-rouge));
  outline-offset: 3px;
}
.card_gr_body p {
  margin-bottom: 4px;
}
.card_gr_more {
  display: inline-block;
  margin-top: 8px;
  color: var(--gr-rouge-fonce);
  font-weight: 600;
}
.card_gr_more::after {          /* fleche decorative */
  content: ' \2192';
}

/* Bandeau contact */
.cta_band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta_band_txt {
  max-width: 640px;
  font-size: 1.15rem;
}
.cta_band p {
  margin: 0;
}
.cta_band strong,
.cta_band_title {
  display: block;
  color: var(--sec-title, var(--gr-foret-fonce));
  font-family: var(--gr-font-title);
  font-size: 1.6rem;
  font-weight: 700;
}
.cta_phone,
.cta_phone:hover,
.cta_phone:focus {
  color: var(--sec-title, var(--gr-foret-fonce));
  font-family: var(--gr-font-title);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.cta_phone:hover,
.cta_phone:focus {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Admin GSite : apercu des fonds dans le choix du theme de section
   Markup GSite : .theme_list_sel > div.theme_xxx > div > input + label.
   Le CSS du theme pose les variables --sec-* sur ".theme_xxx > div" :
   la vignette les lit comme une vraie section.
   -------------------------------------------------------------------------- */

.theme_list_sel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.theme_list_sel > div {
  display: flex;                /* la vignette prend toute la hauteur de la rangee */
}
.theme_list_sel > div > div {
  position: relative;
  flex: 1;
  min-height: 110px;
  padding: 14px 16px;
  border-radius: var(--gr-radius);
  background: var(--sec-bg, var(--gr-creme));
  color: var(--sec-fg, var(--gr-schiste));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.theme_list_sel input:checked + label {
  outline: 3px solid var(--gr-rouge);
  outline-offset: 6px;
  border-radius: 2px;
}
.theme_list_sel label {
  display: block;
  margin: 0;
  cursor: pointer;
}
/* Petite balise GR comme sur les sur-titres */
.theme_list_sel label::before {
  content: '';
  display: block;
  width: 26px;
  height: 12px;
  margin-bottom: 8px;
  background: linear-gradient(to bottom, #fff 0 50%, var(--gr-rouge) 50% 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.theme_list_sel label strong {
  display: block;
  color: var(--sec-title, var(--gr-foret-fonce));
  font-family: var(--gr-font-title);
  font-size: 1.1rem;
  line-height: 1.15;
}
.theme_list_sel .theme_file_name {
  display: block;
  margin-top: 4px;
  color: var(--sec-fg, var(--gr-schiste));
  font-family: var(--gr-font-text);
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}
/* Exemple de lien dans la couleur du theme */
.theme_list_sel label::after {
  content: 'Exemple de lien';
  display: inline-block;
  margin-top: 8px;
  color: var(--sec-link, var(--gr-rouge-fonce));
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.site_footer {
  background: var(--gr-foret-fonce);
  color: rgba(247, 242, 232, 0.85);
  font-size: 0.97rem;
}
.site_footer .container {
  padding-top: 48px;
  padding-bottom: 24px;
}
.site_footer a {
  color: #fff;
}
.site_logo_footer,
.site_logo_footer:hover,
.site_logo_footer:focus {
  color: #fff;
}
.site_logo_footer .site_logo_txt em {
  color: rgba(247, 242, 232, 0.7);
}
.footer_col {
  margin-bottom: 28px;
}
.footer_intro {
  margin: 18px 0;
  max-width: 380px;
}
.footer_contact {
  font-style: normal;
}
.footer_title {
  margin-bottom: 12px;
  color: #fff;
  font-family: var(--gr-font-title);
  font-weight: 700;
  font-size: 1.1rem;
}
.footer_menu {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.footer_menu li {
  margin-bottom: 6px;
}
.footer_menu a {
  text-decoration: none;
}
.footer_menu a:hover,
.footer_menu a:focus {
  text-decoration: underline;
}
.footer_legal {
  border-top: 1px solid rgba(247, 242, 232, 0.12);
  font-size: 0.88rem;
}
.legal_menu {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal_menu li + li::before {   /* separateur decoratif */
  content: '\00b7';
  margin: 0 8px;
}
.legal_menu a {
  text-decoration: none;
}
.legal_menu a:hover,
.legal_menu a:focus {
  text-decoration: underline;
}
.footer_legal .container {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Petits ecrans
   -------------------------------------------------------------------------- */

@media (max-width: 35.9375em) {
  :root { --gr-header-h: 72px; }
  .site_logo_txt strong { font-size: 1.55rem; }
  .site_logo_txt em { font-size: 0.72rem; }
  /* Libelle masque visuellement mais lu par les lecteurs d'ecran (nom du bouton) */
  .mnu_toggle_label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .home_hero { min-height: 70vh; padding-bottom: 48px; background-position: 75% 50%; }
  .page_header { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
