/* ================================================================
   CAPITAINE RANDO — Design System v2
   Chargé après index.css pour surcharger les valeurs legacy
   ================================================================ */

/* ── Variables ───────────────────────────────────────────────────── */
:root {
  --vert-nuit:     #122E0C;
  --vert-epicea:   #245518;
  --vert-foret:    #3D7A28;
  --vert-feuille:  #6BAD52;
  --vert-pousse:   #A8D48A;
  --vert-lichen:   #D6EBC8;
  --vert-brume:    #F2F8EF;
  --creme-blanc:   #FAFAF7;
  --creme-doux:    #F5F3ED;
  --creme-calcaire:#EEE9DC;
  --creme-sable:   #E4DCC8;
  --neutre-gres:   #D6CDB4;
  --neutre-pierre: #C8BBAA;
  --neutre-ecorce: #7A7163;
  --neutre-tourbe: #554D41;
  --neutre-humus:  #342E25;
  --accent-lac:    #7AAFB5;

  --cr-primary:       var(--vert-foret);
  --cr-primary-dark:  var(--vert-epicea);
  --cr-primary-light: var(--vert-feuille);
  --cr-bg:            var(--creme-calcaire);
  --cr-surface:       var(--creme-blanc);
  --cr-text:          var(--neutre-tourbe);
  --cr-text-dark:     var(--neutre-humus);
  --cr-border:        var(--neutre-gres);
}

/* ── Header country (pages thème / pays) ────────────────────────── */
.header-country {
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 5px;
  margin-left: 0;
  margin-right: 0;
}
@media (max-width: 767px) {
  .header-country { padding-top: 0 !important; min-height: 420px; }
  .header-country .container { position: relative !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; padding: 24px 16px; min-height: 420px; }
}

/* ── Jumbotron heading global ────────────────────────────────────── */
h1.jumbotron-heading,
h1.jumbotron2-heading { color: var(--creme-doux) !important; }

/* ── Jumbotron hero ──────────────────────────────────────────────── */
.jumbotron {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.jumbotron::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
  z-index: 0;
}
.jumbotron .container {
  position: relative;
  z-index: 1;
}
.jumbotron h1,
.jumbotron .jumbotron-heading,
.jumbotron .lead,
.jumbotron p,
.jumbotron small {
  color: var(--creme-doux) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* ── Base ────────────────────────────────────────────────────────── */
body {
  font-family: 'Outfit', 'Montserrat', sans-serif;
  background: var(--cr-bg);
  color: var(--cr-text);
}

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

ul li { color: var(--cr-text); }

/* ── Typographie titres ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', serif;
  text-transform: none;
  color: var(--vert-epicea);
}

/* Zones éditoriales et debug : conserver la police sans-serif */
.footer-debug h3,
.footer-debug *,
.admin-panel *,
.trumbowyg-box *,
.trumbowyg-editor * {
  font-family: 'Consolas', 'Monaco', monospace;
}

/* ── Liens ───────────────────────────────────────────────────────── */
a { color: var(--cr-primary); }

/* ── Header ──────────────────────────────────────────────────────── */
.lightHeader {
  background: var(--creme-blanc);
  box-shadow: 0 2px 8px rgba(18, 46, 12, .08);
}
.navbar-brand { color: var(--vert-nuit); }
.navbar-brand span { color: var(--vert-nuit); font-family: 'DM Serif Display', serif; font-size: 1.1rem; text-transform: none; }
.navbar-brand strong { font-family: 'DM Serif Display', serif; font-size: 1.4rem; }
.navbar-brand img { width: 60px; margin-top: -10px; }

.nav-activity-link {
  color: var(--neutre-humus);
  border-radius: 10px;
  transition: color .2s, background .2s, transform .2s;
}
.nav-activity-link i {
  color: var(--neutre-humus);
  transition: color .2s, transform .25s cubic-bezier(.34,1.56,.64,1);
}
.nav-activity-link span {
  color: var(--neutre-humus);
  transition: color .2s;
}
.nav-activity-link:hover,
.nav-activity-link.active {
  color: var(--cr-primary);
  background: var(--vert-brume);
  text-decoration: none;
}
.nav-activity-link:hover i,
.nav-activity-link.active i {
  color: var(--cr-primary);
  transform: translateY(-3px);
}
.nav-activity-link:hover span,
.nav-activity-link.active span { color: var(--cr-primary); }

.btn-search-trigger:hover { color: var(--cr-primary); }
.ac-item:hover { background: var(--vert-brume); }
.ac-type { color: var(--cr-primary); }
.theme-search-icon { color: var(--cr-primary); }
.theme-ac-type { color: var(--cr-primary); background: var(--vert-brume); }
.theme-ac-item:hover { color: var(--cr-primary); background: var(--vert-brume); }

/* ── Navbar dropdown ─────────────────────────────────────────────── */
.lightHeader .navbar-nav > li > a:hover { color: var(--cr-primary) !important; }
.navbar-nav > li.active a,
.navbar-nav > li.active a:hover {
  color: var(--cr-primary) !important;
  border-color: var(--cr-primary);
}
.navbar-nav li.nav-item .header_pays a,
.navbar-nav li.nav-item .header_pays .atc { color: var(--cr-primary); }
.navbar-nav li.nav-item .header_pays a:hover,
.navbar-nav li.nav-item .header_pays .atc:hover,
.navbar-nav li.nav-item .header_pays a.hover { background: var(--cr-primary); color: #fff; }

.navbar-light .navbar-nav .dropdown-menu .nav-link { color: var(--cr-primary); }
.navbar-light .navbar-nav .dropdown-menu .nav-link:hover { background: var(--cr-primary); }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { background: var(--vert-foret); }
.footer p,
.footer li,
.footer a,
.footer span,
.footer small { color: var(--vert-lichen) !important; }
.footer h5 { color: var(--creme-doux) !important; }
.footer a:hover { color: var(--creme-blanc) !important; opacity: 1; }
.footer-bottom { background: var(--vert-nuit); }
.footer-bottom p,
.footer-bottom a { color: var(--vert-pousse) !important; }

/* ── Boutons — override Bootstrap 5 CSS vars ─────────────────────── */
.btn-primary {
  --bs-btn-bg:           var(--cr-primary);
  --bs-btn-border-color: var(--cr-primary);
  --bs-btn-hover-bg:           var(--cr-primary-dark);
  --bs-btn-hover-border-color: var(--cr-primary-dark);
  --bs-btn-active-bg:          var(--cr-primary-dark);
  --bs-btn-active-border-color:var(--cr-primary-dark);
  --bs-btn-focus-shadow-rgb:   61, 122, 40;
  background-color: var(--cr-primary) !important;
  border-color: var(--cr-primary) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--cr-primary-dark) !important;
  border-color: var(--cr-primary-dark) !important;
  color: #fff !important;
}

.btn-outline-primary {
  --bs-btn-color:              var(--cr-primary);
  --bs-btn-border-color:       var(--cr-primary);
  --bs-btn-hover-bg:           var(--cr-primary);
  --bs-btn-hover-border-color: var(--cr-primary);
  --bs-btn-active-bg:          var(--cr-primary-dark);
  color: var(--cr-primary);
  border-color: var(--cr-primary);
}
.btn-outline-primary:hover {
  background-color: var(--cr-primary) !important;
  border-color: var(--cr-primary) !important;
  color: #fff !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--cr-primary) !important;
  border-color: var(--cr-primary) !important;
  color: #fff !important;
}

.buttonCustomPrimary {
  background-color: var(--cr-primary);
  border: 2px solid var(--cr-primary);
  color: #fff !important;
  text-transform: none;
}
.buttonCustomPrimary:hover {
  background-color: var(--cr-primary-dark);
  border-color: var(--cr-primary-dark);
}

.btn-cta { background: var(--cr-primary); border-color: var(--cr-primary); }
.btn-cta:hover { background: var(--cr-primary-dark) !important; border-color: var(--cr-primary-dark) !important; color: #fff; opacity: 1; }
.btn-cta:hover .btn-cta-left { background: transparent !important; }
.btn-cta .btn-cta-right { background: var(--cr-primary-dark); }
a.footer-cta { background: var(--vert-epicea); }
a.footer-cta .btn-cta-left { background: var(--vert-nuit); }

/* ── Booking / prix ──────────────────────────────────────────────── */
.bookingDetails { background-color: var(--cr-primary); }
.btn-search { background: var(--neutre-humus); border-color: var(--neutre-humus); }
.btn-search:hover { background: var(--cr-primary); border-color: var(--cr-primary); }


/* ── Badge "Circuit en liberté" ─────────────────────────────────── */
h1 span.liberte,
h4 span.liberte { background: #A05C3B !important; }

/* ── Fiche circuit — hero title aligné col-md-8 ─────────────────── */
.circuit-hero-title { padding-left: 30px; }
.circuit-hero-title h1 { font-size: 2rem; }
@media (max-width: 767px) {
  .circuit-hero-title { padding-left: 20px; }
  .circuit-hero-title h1 { font-size: 1.4rem; }
}

/* ── Fiche circuit — sous-titres h2 ─────────────────────────────── */
#main-content > h2.mb-3,
.article h2 { font-size: 1.4rem; }
@media (max-width: 767px) {
  #main-content > h2.mb-3,
  .article h2 { font-size: 1.15rem; }
}

/* ── Liens courants ──────────────────────────────────────────────── */
.media-heading a { color: var(--cr-primary); }
.media-heading a:hover { color: var(--vert-epicea); }
.text-primary { color: var(--cr-primary) !important; }
a.link_black { color: var(--neutre-humus); }

/* ── Menu hub pays ───────────────────────────────────────────────── */
.nav-pays-wrapper { margin-bottom: 1rem; }

/* ── POI tabs nav ────────────────────────────────────────────────── */
.poi-tabs-nav { background: var(--creme-calcaire); box-shadow: none; border: none; }

/* ── Nav country / onglets ───────────────────────────────────────── */
.nav-country { border: none !important; }
.nav-country li.nav-item a { color: var(--neutre-humus) !important; border-radius: 5px; border: none !important; }
.nav-country li.nav-item a:hover,
.nav-country li.nav-item a.active { background: var(--cr-primary) !important; color: #fff !important; border-radius: 5px; }
.nav-country li.nav-item .dropdown-menu a:hover,
.nav-country li.nav-item .dropdown-menu a.active { background: var(--cr-primary) !important; color: #fff !important; }

.poi-tab-link:hover,
.poi-tab-link.active { color: var(--cr-primary); border-bottom-color: var(--cr-primary); }
.poi-tabs-nav .nav-country li.nav-item { margin-right: 4px; }
.poi-tabs-nav .nav-country li.nav-item a,
.poi-tabs-nav .nav-country li.nav-item a.nav-link { border-radius: 5px; }
.poi-tabs-nav .nav-country li.nav-item a:hover,
.poi-tabs-nav .nav-country li.nav-item a.active {
  color: var(--cr-primary);
  border-bottom-color: var(--cr-primary);
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination a { border-color: var(--vert-nuit); background: var(--vert-nuit); }
.pagination span.current,
.pagination a:hover {
  border-color: var(--vert-nuit);
  background: var(--vert-nuit);
  border-bottom: 5px solid var(--cr-primary);
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card { background: var(--cr-surface); }
.card:hover { box-shadow: 0 4px 16px rgba(18, 46, 12, .1) !important; }
.card .card-title a:hover { color: var(--cr-primary) !important; }

.value-prop-block {
  background: var(--cr-surface);
  border: none;
  box-shadow: none;
}
.value-prop-links a {
  border-color: var(--vert-lichen);
  color: var(--vert-epicea);
  background: var(--vert-brume);
}
.value-prop-links a:hover {
  background: var(--cr-primary);
  color: #fff;
  border-color: var(--cr-primary);
}

.dest-link:hover { background: var(--vert-brume); color: var(--cr-primary); }

.poi-section-block {
  background: var(--cr-surface);
  border: none;
  box-shadow: none;
}

/* ── Sidebar circuits ────────────────────────────────────────────── */
.sidebar-title { border-bottom-color: var(--cr-primary); color: var(--vert-epicea); }
.sidebar-circuit-title a:hover { color: var(--cr-primary); }

/* ── Articles / contenus SEO ─────────────────────────────────────── */
.article h2 { border-bottom-color: var(--cr-primary); color: var(--vert-nuit); }
.article h3 { background: var(--cr-primary); }
.article ul li::marker { color: var(--cr-primary); }
.article strong { color: var(--vert-nuit); }

.top5-pays { background: var(--vert-brume); border-left-color: var(--cr-primary); }
.top5-pays h3 { background: var(--cr-primary); }
.top5-pays ul li::marker { color: var(--cr-primary); }

/* ── Encadrés du capitaine ───────────────────────────────────────── */
.encadre-capitaine { background: var(--creme-sable); border-left-color: var(--cr-primary-dark); }
.encadre-capitaine.conseils { background: var(--vert-brume); border-color: var(--vert-nuit); }
.encadre-capitaine.bon-plan { background: var(--vert-brume); border-color: var(--cr-primary); }
.encadre-capitaine.resume { background: var(--vert-brume); border-color: var(--accent-lac); }

/* ── Pays limitrophes ────────────────────────────────────────────── */
.pays-limitrophes { border-top: none !important; }
.lien-limitrophe { border-color: var(--cr-primary); color: var(--cr-primary); }
.lien-limitrophe:hover { background: var(--cr-primary); color: #fff; }

/* ── Grille thèmes (landing pages) ──────────────────────────────── */
.theme-section-title { border-bottom-color: var(--cr-primary); }
.theme-country-more { border-color: var(--cr-primary); }
.theme-country-more .theme-country-name { color: var(--cr-primary); }
.theme-country-more:hover .theme-country-overlay { background: rgba(61, 122, 40, .15); }
.theme-suggestion-pill:hover { background: rgba(61, 122, 40, .25); color: #fff; }

/* ── Comment ça marche ───────────────────────────────────────────── */
.how-it-works { background: var(--creme-doux); border-color: var(--neutre-gres); }
.hiw-steps::before {
  background: linear-gradient(90deg, var(--cr-primary) 0%, var(--cr-primary) 50%, var(--neutre-gres) 50%);
}
.hiw-icon { border-color: var(--cr-primary); color: var(--cr-primary); }
.hiw-step-accent .hiw-icon {
  background: var(--cr-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(61, 122, 40, .3);
}
.hiw-step-accent .hiw-num { color: var(--cr-primary); }

/* ── Liste group ─────────────────────────────────────────────────── */
.list-group-item.active {
  background-color: var(--cr-primary);
  border-color: var(--cr-primary);
}

/* ── Admin ───────────────────────────────────────────────────────── */
a.top_bloc_admin { background: var(--cr-primary); }

/* ── Formulaires ─────────────────────────────────────────────────── */
.my_form { background: var(--vert-brume); box-shadow: 0 0 3px var(--vert-feuille); border-color: var(--vert-lichen); }

/* ── Bloc "Partez à l'aventure" pleine largeur ───────────────────── */
.themes-fullbleed {
  width: 100%;
  padding: 1rem 0 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.themes-fullbleed ul.themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: left;
  margin-bottom: 0;
}

.themes-fullbleed ul.themes li {
  display: block;
  margin: 0;
}

.themes-fullbleed ul.themes li a {
  position: relative;
  display: block;
  width: 100%;
  height: 180px;
}

.themes-fullbleed ul.themes li a img {
  width: 100%;
  height: 180px;
  position: absolute;
  inset: 0;
  object-fit: cover;
  border-radius: 10px;
}

.themes-fullbleed ul.themes li a h6 {
  width: 100%;
  height: 180px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px;
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  text-transform: none;
  color: var(--creme-doux);
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
  background: transparent;
  border-radius: 10px;
  z-index: 10;
}

.themes-fullbleed ul.themes li a img {
  transition: transform .4s ease !important;
}
.themes-fullbleed ul.themes li a h6 {
  background: transparent !important;
  transition: font-size .3s ease !important;
}
.themes-fullbleed ul.themes li a:hover img {
  transform: scale(0.88) !important;
  transition: transform .4s ease !important;
  z-index: 9 !important;
}
.themes-fullbleed ul.themes li a:hover h6 {
  transform: none !important;
  font-size: 1.7rem !important;
  background: transparent !important;
  z-index: 20 !important;
}

@media (max-width: 767px) {
  .themes-fullbleed { padding: 1.5rem 1rem; }
  .themes-fullbleed ul.themes { grid-template-columns: repeat(2, 1fr); }
  .themes-fullbleed ul.themes li a,
  .themes-fullbleed ul.themes li a img { height: 140px; }
  .themes-fullbleed ul.themes li a h6 { height: 140px; font-size: 1.1rem; }
}

/* ── Pre-footer ──────────────────────────────────────────────────── */
.pre-footer { background: var(--creme-doux); }

/* ── Bouton "Voir le circuit" ────────────────────────────────────── */
.buttonTransparent a {
  color: var(--cr-primary);
  border-color: var(--cr-primary);
  border-bottom-color: var(--cr-primary);
}
.buttonTransparent a:hover,
.buttonRight a:hover {
  background: var(--cr-primary);
  border-color: var(--cr-primary);
  border-bottom-color: var(--cr-primary);
}

/* ── Breadcrumbs ─────────────────────────────────────────────────── */
p.breadcrumbs a { background: transparent; }
p.breadcrumbs strong { background: transparent; }

/* ── Liste cercles numérotés ─────────────────────────────────────── */
ol.favth-list-circle li:before {
  background: var(--cr-primary);
}

/* ── Badges type-poi (DISTANCE, DURÉE, etc.) ────────────────────── */
.poi-content .badge.text-bg-secondary,
.card .badge.text-bg-secondary {
  background-color: #C8A856 !important;
  color: #fff !important;
}

/* ── Cartes régions POI ──────────────────────────────────────────── */
.poi-region-card {
  background: var(--creme-blanc);
  border-radius: 10px;
  border: 1px solid var(--neutre-gres);
  transition: background .2s, border-color .2s;
}
.poi-region-nb { font-size: 1.6rem; font-weight: 800; color: var(--vert-epicea); }
.poi-region-label { font-size: .85rem; font-weight: 600; color: var(--neutre-ecorce); margin-top: 2px; }
.poi-region-card:hover { background: var(--cr-primary) !important; border-color: var(--cr-primary) !important; }
.poi-region-card:hover .poi-region-nb,
.poi-region-card:hover .poi-region-label { color: #fff !important; }

/* ── Drapeaux uniformes ──────────────────────────────────────────── */
.dest-flag { width: 22px !important; height: 15px !important; object-fit: cover; }

/* ── Pill nav-pays ───────────────────────────────────────────────── */
.nav-pays-drop-item:hover { color: var(--cr-primary); }
.nav-pays-drop-item.active { color: var(--cr-primary); }
