/* Bien en Dordogne Core — coquille (header à méga-menu + footer). Chargé sur tout le site. */
:root { --bdc-hh: 72px; }
.bdc-header, .bdc-footer { font-family: var(--bd-font, 'Instrument Sans', 'Segoe UI', system-ui, sans-serif); -webkit-font-smoothing: antialiased; }
.bdc-header *, .bdc-footer * { box-sizing: border-box; }
.bdc-header :where(ul, p), .bdc-footer :where(ul, p) { margin: 0; padding: 0; list-style: none; }
.bdc-header a, .bdc-footer a { text-decoration: none; }

/* L'ancienne coquille (snippet) et le header embarqué de l'accueil s'effacent devant celle-ci. */
body.bdc-chrome .bd-header { display: none !important; }
body.bdc-chrome:not(.home) .bd-footer { display: none !important; }
body.bdc-chrome:not(.bdc-overlay-header) #page-container { padding-top: var(--bdc-hh) !important; }

/* ---------------------------------------------------------------- Barre */
.bdc-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; color: #fff; }
body.admin-bar .bdc-header { top: 32px; }
.bdc-header__bar {
  position: relative; height: var(--bdc-hh);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 3vw, 36px);
  transition: background .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s, backdrop-filter .35s;
}
body:not(.bdc-overlay-header) .bdc-header__bar,
.bdc-header.is-scrolled .bdc-header__bar,
.bdc-header.is-open .bdc-header__bar {
  background: rgba(15,21,18,.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255,255,255,.07);
}
body.bdc-overlay-header .bdc-header:not(.is-scrolled):not(.is-open) .bdc-header__bar::before {
  content: ''; position: absolute; inset: 0 0 -48px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,21,18,.6), rgba(15,21,18,0));
}
.bdc-brand { justify-self: center; font-weight: 620; font-size: 1.22rem; letter-spacing: -.02em; color: #fff !important; white-space: nowrap; }
.bdc-brand em { font-style: normal; color: var(--bd-ocre-clair, #E4C48B); }
.bdc-cta {
  justify-self: end; padding: 11px 20px; border-radius: 999px; background: #fff; color: #1C1B17 !important;
  font-size: .92rem; font-weight: 580; white-space: nowrap;
  transition: transform .2s cubic-bezier(.22,.61,.36,1), box-shadow .2s, background .2s;
}
.bdc-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.35); background: var(--bd-ocre-clair, #E4C48B); }

/* ---------------------------------------------------------------- Méga-menu */
.bdc-mnav { justify-self: start; }
.bdc-mnav__list { display: flex; gap: 2px; }
.bdc-mnav__item { position: static; }
.bdc-mnav__top {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 999px;
  font: inherit; font-size: .93rem; font-weight: 520; color: rgba(255,255,255,.92) !important;
  background: transparent; border: 0; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.bdc-mnav__top:hover, .bdc-mnav__item.is-open > .bdc-mnav__top, .bdc-mnav__top[aria-current] { background: rgba(255,255,255,.12); color: #fff !important; }
.bdc-mnav__top:focus-visible, .bdc-cta:focus-visible, .bdc-burger:focus-visible, .bdc-panel a:focus-visible, .bdc-mmenu a:focus-visible, .bdc-mmenu summary:focus-visible { outline: 2px solid var(--bd-ocre-clair, #E4C48B); outline-offset: 2px; }
.bdc-chev { transition: transform .25s; opacity: .8; }
.bdc-mnav__item.is-open .bdc-chev { transform: rotate(180deg); }

.bdc-panel {
  position: absolute; top: calc(100% + 6px); left: clamp(16px, 3vw, 36px);
  width: min(980px, calc(100vw - 32px));
  padding: 26px 28px 18px; border-radius: 26px;
  background: rgba(17,23,20,.97); border: 1px solid rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .22s ease, transform .28s cubic-bezier(.22,.61,.36,1), visibility 0s linear .28s;
}
.bdc-mnav__item.is-open > .bdc-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.bdc-panel__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; }
.bdc-panel__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px 28px; align-content: start; }
.bdc-panel__t { font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--bd-ocre-clair, #E4C48B); margin-bottom: 10px !important; }
.bdc-panel__t a { color: inherit !important; }
.bdc-panel__col li a, .bdc-panel__solo {
  display: block; padding: 6px 0; font-size: 1rem; line-height: 1.35; color: rgba(255,255,255,.84) !important;
  transition: color .2s, transform .2s;
}
.bdc-panel__col li a:hover, .bdc-panel__solo:hover { color: #fff !important; transform: translateX(3px); }
.bdc-panel__solo { font-size: 1.08rem; font-weight: 560; color: #fff !important; }
.bdc-panel__solo small { display: block; margin-top: 3px; font-size: .84rem; font-weight: 400; color: rgba(255,255,255,.55); }
.bdc-panel__feats { display: flex; gap: 12px; }
.bdc-panel__feat { position: relative; display: block; width: 210px; height: 250px; border-radius: 18px; overflow: hidden; isolation: isolate; background: #1b241f; }
.bdc-panel__feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.bdc-panel__feat:hover img { transform: scale(1.05); }
.bdc-panel__feat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,14,12,.9)); }
.bdc-panel__feat span { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-size: 1.08rem; font-weight: 580; line-height: 1.2; color: #fff; }
.bdc-panel__feat small { display: block; margin-top: 4px; font-size: .8rem; font-weight: 400; color: rgba(255,255,255,.72); }
.bdc-panel__all { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 14px; width: 100%; border-top: 1px solid rgba(255,255,255,.08); font-size: .9rem; font-weight: 560; color: var(--bd-ocre-clair, #E4C48B) !important; }
.bdc-panel__all svg { transition: transform .2s; }
.bdc-panel__all:hover svg { transform: translateX(4px); }

/* ---------------------------------------------------------------- Burger + menu mobile */
.bdc-burger {
  display: none; justify-self: start; position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); background: rgba(15,21,18,.35); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bdc-burger span { position: absolute; left: 13px; right: 13px; height: 1.6px; border-radius: 2px; background: #fff; transition: transform .3s cubic-bezier(.22,.61,.36,1), top .3s; }
.bdc-burger span:first-child { top: 17px; }
.bdc-burger span:last-child { top: 25px; }
.bdc-burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.bdc-burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.bdc-mmenu { position: fixed; left: 0; right: 0; bottom: 0; top: var(--bdc-hh); background: #0F1512; overflow-y: auto; overscroll-behavior: contain; }
body.admin-bar .bdc-mmenu { top: calc(var(--bdc-hh) + 46px); }
.bdc-mmenu[hidden] { display: none; }
.bdc-mmenu__in { padding: 12px 22px 40px; animation: bdcMenuIn .35s cubic-bezier(.22,.61,.36,1); }
@keyframes bdcMenuIn { from { opacity: 0; transform: translateY(-10px); } }
.bdc-mmenu__top {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 2px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  font-size: 1.55rem; font-weight: 540; letter-spacing: -.02em; color: #fff !important; cursor: pointer; list-style: none;
}
.bdc-mmenu__top::-webkit-details-marker { display: none; }
.bdc-mmenu__grp[open] .bdc-chev { transform: rotate(180deg); }
.bdc-mmenu__links { display: flex; flex-direction: column; padding: 8px 2px 18px; }
.bdc-mmenu__links a { padding: 9px 0; font-size: 1.06rem; color: rgba(255,255,255,.82) !important; }
.bdc-mmenu__t { margin: 14px 0 2px !important; font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--bd-ocre-clair, #E4C48B); }
.bdc-mmenu__all { color: var(--bd-ocre-clair, #E4C48B) !important; font-weight: 560; }
.bdc-mmenu__cta { display: flex; justify-content: center; margin-top: 28px; padding: 16px; border-radius: 999px; background: var(--bd-ocre, #C9964B); color: #221A0E !important; font-weight: 600; font-size: 1.05rem; }
.bdc-mmenu__foot { margin-top: 22px !important; text-align: center; font-size: .82rem; color: rgba(255,255,255,.45); }
html.bdc-menu-lock, html.bdc-menu-lock body { overflow: hidden; }

@media (max-width: 1024px) {
  .bdc-mnav { display: none; }
  .bdc-burger { display: block; }
}
@media (max-width: 480px) {
  :root { --bdc-hh: 64px; }
  .bdc-brand { font-size: 1.08rem; }
  .bdc-cta { padding: 9px 14px; font-size: .84rem; }
}

/* ---------------------------------------------------------------- Footer */
.bdc-footer { position: relative; overflow: hidden; isolation: isolate; background: #0F1512; color: rgba(255,255,255,.72); padding: clamp(64px, 8vw, 104px) 0 28px; }
.bdc-footer__bg { position: absolute; inset: 0; z-index: -1; opacity: .16; }
.bdc-footer__bg img { width: 100%; height: 100%; object-fit: cover; }
.bdc-footer__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0F1512 0%, rgba(15,21,18,.6) 50%, #0F1512 100%); }
.bdc-footer .bdc-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }
.bdc-footer__top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 40px 32px; }
.bdc-footer__brand .bdc-brand { display: inline-block; font-size: 1.4rem; margin-bottom: 14px; }
.bdc-footer__brand p { max-width: 34ch; font-size: .98rem; line-height: 1.6; }
.bdc-footer__mail { display: inline-block; margin-top: 16px; color: #fff !important; border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 2px; font-weight: 520; }
.bdc-footer__t { font-size: .74rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--bd-ocre-clair, #E4C48B); margin-bottom: 14px !important; }
.bdc-footer__col li a { display: inline-block; padding: 5px 0; font-size: .96rem; color: rgba(255,255,255,.8) !important; transition: color .2s; }
.bdc-footer__col li a:hover { color: #fff !important; }
.bdc-footer__pro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-top: 56px; padding: 22px 26px; border-radius: 22px; border: 1px solid rgba(228,196,139,.25); background: rgba(201,150,75,.06); }
.bdc-footer__pro p { font-size: .98rem; }
.bdc-footer__pro strong { color: #fff; font-weight: 600; }
.bdc-footer__pro a { color: var(--bd-ocre-clair, #E4C48B) !important; font-weight: 600; white-space: nowrap; }
.bdc-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: rgba(255,255,255,.5); }
@media (max-width: 767px) {
  .bdc-footer__top { grid-template-columns: 1fr 1fr; }
  .bdc-footer__brand { grid-column: 1 / -1; }
}

/* Accueil : cartes « Lieux à voir » entièrement cliquables (lien étendu depuis le titre). */
.bd-bento .bd-card h3 a { color: inherit !important; text-decoration: none; }
.bd-bento .bd-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: 24px; }
.bd-bento .bd-card h3 a:focus-visible { outline: none; }
.bd-bento .bd-card h3 a:focus-visible::after { outline: 2px solid var(--bd-ocre-clair, #E4C48B); outline-offset: 4px; }

/* Très petits écrans (1.3.4) : le bouton de l'en-tête dépassait de 15 px à 320 px de large. */
@media (max-width: 350px) {
  .bdc-cta { padding: 8px 11px; font-size: .78rem; }
}

/* Écrans peu hauts (1.3.6 — tablette Wacom, portables 720 px) : le méga-menu débordait sous le bas de l'écran
   (« Que faire » : 683 px). Le panneau ne dépasse plus jamais la fenêtre (défilement interne en dernier recours),
   et un panneau à 4 colonnes et plus empile ses vignettes pour laisser les colonnes tenir sur une seule ligne. */
.bdc-panel {
  max-height: calc(100vh - var(--bdc-hh) - 20px); max-height: calc(100dvh - var(--bdc-hh) - 20px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
body.admin-bar .bdc-panel { max-height: calc(100vh - var(--bdc-hh) - 52px); max-height: calc(100dvh - var(--bdc-hh) - 52px); }
.bdc-panel__in:has(.bdc-panel__col:nth-child(4)) .bdc-panel__cols { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 22px 24px; }
.bdc-panel__in:has(.bdc-panel__col:nth-child(4)) .bdc-panel__feats { flex-direction: column; }
.bdc-panel__in:has(.bdc-panel__col:nth-child(4)) .bdc-panel__feat { flex: 1 1 0; height: auto; min-height: 140px; }
@media (min-width: 1025px) and (max-height: 800px) {
  .bdc-panel { top: calc(100% + 4px); padding: 20px 24px 12px; }
  .bdc-panel__in { gap: 22px; }
  .bdc-panel__cols { gap: 16px 22px; }
  .bdc-panel__t { margin-bottom: 6px !important; }
  .bdc-panel__col li a, .bdc-panel__solo { padding: 4px 0; font-size: .95rem; }
  .bdc-panel__feat { height: 200px; }
  .bdc-panel__all { margin-top: 14px; padding-top: 10px; }
}

/* Hero de l'accueil sur écrans peu hauts (1.3.7) : même défaut que les heros du plugin — le hero collant,
   plus haut que l'écran, gardait son pied (chiffres, « Découvrir ») sous la ligne de flottaison.
   Contenu resserré sous 800 px de haut + point d'accroche calculé par chrome.js. */
.bd-hero { top: var(--bdc-hero-top, 0px); }
@media (min-width: 768px) and (max-height: 800px) {
  .bd-hero-inner { padding-top: calc(72px + 2svh); padding-bottom: 16px; }
  .bd-hero .bd-h1 { font-size: min(5.2rem, 11.5vh); margin-top: 16px; }
  .bd-hero .bd-ghost { margin-top: 10px; }
  .bd-hero-foot { padding-bottom: 18px; }
  .bd-scroll-cue { bottom: 16px; }
}
