/* ════════════════════════════════════════════════════════════
   v5 — Habillage commun des pages intérieures
   Chargé après style.css, sur toutes les pages sauf l'accueil.
   Les sélecteurs commencent par body:not(.home) pour passer
   devant les <style> internes de chaque page.
   ════════════════════════════════════════════════════════════ */

body:not(.home) {
  background: #f7f6f4;
  color: #1e211c;
}

/* ══ BANDEAU (hero) ══ */
body:not(.home) .fdh-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: clamp(340px, 48vh, 480px);
  padding: 5rem 0 3rem;
  overflow: hidden;
  isolation: isolate;
  background: #1e211c;
  color: #fff;
  text-align: left;
  border: 0;
}
body:not(.home) .fdh-hero::before,
body:not(.home) .fdh-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
body:not(.home) .fdh-hero::before {
  z-index: 0;
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/hero-crete-1200.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/hero-crete-1200.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/hero-crete-1200.jpg) type('image/jpeg'));
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
}
body:not(.home) .fdh-hero::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20,22,18,0.85) 0%, rgba(20,22,18,0.55) 55%, rgba(20,22,18,0.25) 100%),
    linear-gradient(0deg, rgba(20,22,18,0.55) 0%, rgba(20,22,18,0) 60%);
}
body:not(.home) .fdh-hero-grid,
body:not(.home) .fdh-hero-glow { display: none !important; }

/* Photo du bandeau selon la page */
body.page-template-template-trail-75 .fdh-hero::before,
body.page-template-template-inscription-trail75 .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-75.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-75.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-75.jpg) type('image/jpeg'));
  background-position: center 40%;
}
body.page-template-template-trail-larzac .fdh-hero::before,
body.page-template-template-inscription-larzac .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-29.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-29.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-29.jpg) type('image/jpeg'));
  background-position: center 45%;
}
body.page-template-template-nantaise .fdh-hero::before,
body.page-template-template-inscription-nantaise .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-13.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-13.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/course-13.jpg) type('image/jpeg'));
  background-position: center 55%;
}
body.page-template-template-mini-trails .fdh-hero::before,
body.page-template-inscription-mini-trail .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-mini.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-mini.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-mini.jpg) type('image/jpeg'));
}
body.page-template-page-programme .fdh-hero::before,
body.page-template-page-retrait .fdh-hero::before,
body.page-template-page-parkings .fdh-hero::before,
body.page-template-page-hebergements .fdh-hero::before,
body.page-template-template-infos .fdh-hero::before,
body.page-template-template-contact .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-village.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-village.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-village.jpg) type('image/jpeg'));
  background-position: center 40%;
}
body.page-template-template-classements .fdh-hero::before,
body.page-template-template-galerie .fdh-hero::before,
body.page-template-page-suivi-live .fdh-hero::before,
body.page-template-template-inscrits .fdh-hero::before,
body.page-template-template-courses .fdh-hero::before {
  background-image: url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-arrivee.jpg);
  background-image: image-set(url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-arrivee.webp) type('image/webp'), url(https://vps-806b8812.vps.ovh.net/wp-content/themes/festival-hospitaliers/assets/img/bandeau-arrivee.jpg) type('image/jpeg'));
  background-position: center 35%;
}

body:not(.home) .fdh-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Petite ligne au-dessus du titre */
body:not(.home) .fdh-badge-new {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: rgba(20,22,18,0.5);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0;
  text-transform: none;
}
body:not(.home) .fdh-badge-tag {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #ffc08f;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* Titre */
body:not(.home) .fdh-hero-title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  line-height: .9;
  letter-spacing: .005em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
body:not(.home) .fdh-title-white {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  color: #fff;
}
body:not(.home) .fdh-title-gradient {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  -webkit-text-fill-color: #fff;
}
body:not(.home) .fdh-hero-subtitle,
body:not(.home) .fdh-hero-subtitle-sm {
  margin: 0;
  max-width: 38em;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.86);
  letter-spacing: 0;
  text-transform: none;
}

/* Chiffres clés des pages course */
body:not(.home) .fdh-hero-stats {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch !important;
  justify-content: flex-start;
  gap: 0 !important;
  margin-top: .5rem;
  padding: 0 !important;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body:not(.home) .fdh-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: .2rem 1.5rem .2rem 0;
  margin-right: 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.2);
}
body:not(.home) .fdh-stat:last-child { border-right: 0; margin-right: 0; }
body:not(.home) .fdh-stat-sep { display: none; }
body:not(.home) .fdh-stat-val {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.9rem;
  line-height: 1;
  height: auto;
  color: #fff;
}
body:not(.home) .fdh-stat-label {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: .9rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,0.7);
}
body:not(.home) .fdh-stat--itra .fdh-itra-badge {
  height: 30px;
  border-radius: 4px;
  background: #fff;
  padding: 2px 4px;
}

/* ══ CONTENU ══ */
body:not(.home) .fdh-page-wrap,
body:not(.home) .fdh-home {
  background: #f7f6f4;
  color: #1e211c;
  font-family: 'Barlow', system-ui, sans-serif;
}
body:not(.home) .fdh-page-wrap { padding-top: 0; }
body:not(.home) .fdh-parcours {
  background: #f7f6f4;
  border-top: 0;
}
body:not(.home) .fdh-inner {
  max-width: 1240px;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Lien / bouton retour */
body:not(.home) .fdh-back-link,
body:not(.home) .fdh-back-btn {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  width: auto !important;
  max-width: max-content;
  margin-bottom: 2rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(30,33,28,0.12);
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1e211c;
  text-decoration: none;
  transform: none;
  transition: border-color 160ms ease, color 160ms ease;
}
body:not(.home) .fdh-back-link:hover,
body:not(.home) .fdh-back-btn:hover {
  border-color: #e8732a;
  color: #b4501a;
  transform: none;
}

/* Petit intitulé au-dessus des titres de section */
body:not(.home) .fdh-label {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #b4501a;
  margin-bottom: .3rem;
}
body:not(.home) .fdh-parcours-title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: .95;
  letter-spacing: 0;
  color: #1e211c;
}

/* Cartes */
body:not(.home) .fdh-card,
body:not(.home) .fdh-info-card,
body:not(.home) .fdh-contact-card,
body:not(.home) .fdh-social-card,
body:not(.home) .fdh-partenaire-card {
  background: #fff;
  border: 1px solid rgba(30,33,28,0.09);
  border-radius: 14px;
  box-shadow: none;
}
body:not(.home) a.fdh-card:hover {
  border-color: #e8732a;
  background: #fff;
  transform: none;
  box-shadow: 0 10px 30px rgba(30,33,28,0.08);
}
body:not(.home) .fdh-card-km {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #1e211c;
  -webkit-text-fill-color: #1e211c;
}
body:not(.home) .fdh-card-arrow { color: #b4501a; }

/* Boutons principaux */
body:not(.home) .fdh-btn-primary,
body:not(.home) .fdh-inscrip-btn,
body:not(.home) .fdh-regl-pdf-btn {
  border-radius: 999px;
  background: #e8732a;
  background-image: none;
  color: #fff;
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}
body:not(.home) .fdh-btn-primary:hover,
body:not(.home) .fdh-inscrip-btn:hover,
body:not(.home) .fdh-regl-pdf-btn:hover {
  background: #cf621e;
  transform: none;
  box-shadow: none;
}
body:not(.home) .fdh-inscrip-btn--outline {
  background: transparent;
  color: #1e211c;
  border: 1px solid rgba(30,33,28,0.2);
}
body:not(.home) .fdh-inscrip-btn--outline:hover { background: #fff; border-color: #e8732a; color: #b4501a; }

/* ══ MOBILE ══ */
@media (max-width: 700px) {
  body:not(.home) .fdh-hero { min-height: 300px; padding: 4rem 0 2rem; }
  body:not(.home) .fdh-hero::after {
    background: linear-gradient(0deg, rgba(20,22,18,0.9) 0%, rgba(20,22,18,0.55) 60%, rgba(20,22,18,0.35) 100%);
  }
  body:not(.home) .fdh-hero-content,
  body:not(.home) .fdh-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  body:not(.home) .fdh-stat { padding-right: 1rem; margin-right: 1rem; margin-bottom: .6rem; }
  body:not(.home) .fdh-stat-val { font-size: 1.5rem; }
}

/* ══ Contenu des cartes (lisibilité) ══ */
body:not(.home) .fdh-card h3 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0;
  color: #1e211c;
}
body:not(.home) .fdh-card p {
  font-size: 1rem;
  line-height: 1.55;
  color: #5b6056;
}
body:not(.home) .fdh-card-unit,
body:not(.home) .fdh-card-dplus {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #5b6056;
}
body:not(.home) .fdh-card-arrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 1.25rem;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  background: #e8732a;
  background-image: none;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  transition: background 160ms ease;
}
body:not(.home) .fdh-card:hover .fdh-card-arrow { padding-left: 1.15rem; background: #cf621e; }
body:not(.home) .fdh-inscrip-link {
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(30,33,28,0.09);
  font-size: 1rem;
  font-weight: 600;
  color: #b4501a;
}
body:not(.home) .fdh-inscrip-link:hover { border-color: #e8732a; }
