/* Interactions et composants partagés (v1.2) :
   apparition au défilement, sommaire flottant, FAQ dépliable, calculateur kilométrage,
   « et ensuite ? », pastilles d'infos, dépliant « en savoir plus », compris / non compris,
   galerie, avis Google, états de survol et d'appui. */

/* ---------- apparition au défilement (js/20-vie.js) ---------- */
.lha-js .lha-apparait{
  opacity:0; transform:translate3d(0,14px,0);
  transition:opacity .55s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--lha-delai,0ms);
}
.lha-js .lha-apparait.est-visible{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.lha-js .lha-apparait{opacity:1;transform:none;transition:none}}

/* ---------- appui sur les boutons ---------- */
body.lha-page #page-container .lha .et_pb_button:active,
.lha-page .lha a.lha-bt:active{transform:translateY(1px)}
body.lha-page #page-container .lha .et_pb_button{transition:background-color .15s, box-shadow .15s, transform .1s!important}

/* ---------- ancres : laisser la place de l'en-tête collant ---------- */
.lha-page .lha.et_pb_section[id]{scroll-margin-top:calc(var(--lha-entete-h,72px) + 16px)}

/* ---------- sommaire : état « vous êtes ici » ---------- */
.lha-page .lha-pastilles a{transition:background-color .15s ease, box-shadow .15s ease, color .15s ease}
.lha-page .lha-pastilles a[aria-current="location"]{background:var(--lha-forest900);color:#fff;box-shadow:none}
.lha-page .lha-pastilles a[aria-current="location"]::before{color:#e9c98a}

/* ---------- sommaire flottant ---------- */
.lha-sommaire-flottant{
  position:fixed; z-index:90; left:0; right:0; top:var(--lha-entete-h,72px);
  background:rgba(247,244,239,.94); border-bottom:1px solid var(--lha-border);
  -webkit-backdrop-filter:saturate(1.2) blur(10px); backdrop-filter:saturate(1.2) blur(10px);
  font-family:var(--lha-sans);
  transform:translateY(-8px); opacity:0; transition:opacity .2s ease, transform .2s ease;
}
body.admin-bar .lha-sommaire-flottant{top:calc(var(--lha-entete-h,72px) + 32px)}
@media (max-width:782px){body.admin-bar .lha-sommaire-flottant{top:var(--lha-entete-h,72px)}}
.lha-sommaire-flottant.est-visible{opacity:1;transform:none}
.lha-sommaire-flottant ul{
  display:flex; gap:6px; max-width:1228px; margin:0 auto; padding:8px 24px; list-style:none;
  overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.lha-sommaire-flottant ul::-webkit-scrollbar{display:none}
.lha-sommaire-flottant li{flex:0 0 auto;list-style:none;margin:0;padding:0}
.lha-sommaire-flottant a{
  display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:999px;
  font:500 14px/1 var(--lha-sans); color:var(--lha-muted); text-decoration:none; white-space:nowrap;
  transition:background-color .15s ease, color .15s ease;
}
.lha-sommaire-flottant a::before{display:none!important}
.lha-sommaire-flottant a:hover{color:var(--lha-ink);background:var(--lha-sunken)}
.lha-sommaire-flottant a[aria-current="location"]{background:var(--lha-forest900);color:#fff}
.lha-sommaire-flottant a:focus-visible{outline:3px solid var(--lha-accent);outline-offset:1px}
@media (max-width:767px){.lha-sommaire-flottant ul{padding:6px 16px}}
@media (prefers-reduced-motion:reduce){.lha-sommaire-flottant{transition:none}}

/* ---------- FAQ dépliable (un <details> par question, dans un module texte « lha-faq ») ---------- */
.lha-page .lha-faq details{border-bottom:1px solid var(--lha-border)}
.lha-page .lha-faq details:first-child{border-top:1px solid var(--lha-border)}
.lha-page .lha-faq summary{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  min-height:60px; padding:14px 4px; cursor:pointer; list-style:none;
  font:600 17px/1.4 var(--lha-sans); color:var(--lha-ink);
  transition:color .15s ease;
}
.lha-page .lha-faq summary::-webkit-details-marker{display:none}
.lha-page .lha-faq summary::after{
  content:""; flex:0 0 28px; width:28px; height:28px; border-radius:50%;
  background:var(--lha-sage100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6f52' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 7v10M7 12h10'/%3E%3C/svg%3E") center/16px no-repeat;
  transition:transform .25s ease, background-color .15s ease;
}
.lha-page .lha-faq details[open] > summary::after{transform:rotate(45deg);background-color:#d6dfcf}
.lha-page .lha-faq summary:hover{color:var(--lha-primary-h)}
.lha-page .lha-faq summary:focus-visible{outline:3px solid var(--lha-accent);outline-offset:2px;border-radius:6px}
.lha-page .lha .lha-faq details > :not(summary){padding:0 48px 18px 4px;font-size:16px;line-height:1.65;color:var(--lha-muted)}
.lha-page .lha .lha-faq details > p + p{padding-top:0;margin-top:-6px}
.lha-page .lha .lha-faq details ul{padding-left:4px}
.lha-page .lha .lha-faq details li{position:relative;padding-left:18px;font-size:16px;line-height:1.6;color:var(--lha-muted)}
.lha-page .lha .lha-faq details li + li{margin-top:4px}
.lha-page .lha .lha-faq details li::before{content:"";position:absolute;left:3px;top:.68em;width:5px;height:5px;border-radius:50%;background:var(--lha-sage400)}
@supports (interpolate-size:allow-keywords){
  .lha-page .lha-faq details{interpolate-size:allow-keywords}
  .lha-page .lha-faq details::details-content{height:0;overflow:clip;transition:height .28s ease, content-visibility .28s allow-discrete}
  .lha-page .lha-faq details[open]::details-content{height:auto}
}
@media (prefers-reduced-motion:reduce){
  .lha-page .lha-faq details::details-content{transition:none}
  .lha-page .lha-faq summary::after{transition:none}
}

/* ---------- dépliant « en savoir plus » dans un texte ---------- */
.lha-page .lha details.lha-plus{margin-top:10px}
.lha-page .lha details.lha-plus > summary{
  display:inline-flex; align-items:center; gap:6px; min-height:44px; cursor:pointer; list-style:none;
  font:600 14px/1.2 var(--lha-sans); color:var(--lha-primary);
}
.lha-page .lha details.lha-plus > summary::-webkit-details-marker{display:none}
.lha-page .lha details.lha-plus > summary::after{
  content:""; width:8px; height:8px; margin-left:2px; border-right:1.6px solid currentColor; border-bottom:1.6px solid currentColor;
  transform:rotate(45deg) translate(-2px,-2px); transition:transform .2s ease;
}
.lha-page .lha details.lha-plus[open] > summary::after{transform:rotate(-135deg) translate(-1px,-1px)}
.lha-page .lha details.lha-plus > summary:hover{color:var(--lha-primary-h);text-decoration:underline;text-underline-offset:3px}
.lha-page .lha details.lha-plus > summary:focus-visible{outline:3px solid var(--lha-accent);outline-offset:2px;border-radius:4px}
.lha-page .lha details.lha-plus > :not(summary){margin-top:8px;font-size:15px;line-height:1.6;color:var(--lha-muted)}
.lha-page .lha details.lha-plus ul{display:flex;flex-direction:column;gap:4px}
.lha-page .lha details.lha-plus li{position:relative;padding-left:16px;font-size:15px;line-height:1.55;color:var(--lha-muted);border:0!important;display:block!important}
.lha-page .lha details.lha-plus li::before{content:"";position:absolute;left:2px;top:.62em;width:5px;height:5px;border-radius:50%;background:var(--lha-sage400)}

/* ---------- pastilles d'infos (badges) ---------- */
.lha-page .lha .lha-badges ul{display:flex;flex-wrap:wrap;gap:8px}
.lha-page .lha .lha-badges li{
  display:inline-flex; align-items:center; min-height:34px; padding:0 14px; border-radius:999px;
  background:var(--lha-raised); border:1px solid var(--lha-border);
  font:500 14px/1.2 var(--lha-sans); color:var(--lha-ink);
}
.lha-page .lha .lha-badges li::before{width:17px;height:17px;color:var(--lha-primary);margin-right:8px}

/* ---------- compris / pas compris ---------- */
.lha-page .lha .lha-compris{display:grid;grid-template-columns:1fr 1fr;gap:24px 40px}
.lha-page .lha-compris h3{font:600 16px/1.3 var(--lha-sans);margin-bottom:12px;color:var(--lha-ink)}
.lha-page .lha-compris li{position:relative;padding:8px 0 8px 30px;font-size:15px;line-height:1.55;border-top:1px solid var(--lha-border)}
.lha-page .lha-compris li:first-child{border-top:0}
.lha-page .lha-compris li::before{
  content:""; position:absolute; left:0; top:10px; width:20px; height:20px; border-radius:50%;
  background:var(--lha-sage100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6f52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}
.lha-page .lha-compris .non li::before{
  background:#efe6dc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f5a22' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center/13px no-repeat;
}
.lha-page .lha-compris li b{font-weight:600}
.lha-page .lha-compris li span{display:block;color:var(--lha-muted);font-size:14px}

/* ---------- calculateur kilométrage (module Code « lha-calc-km ») ---------- */
.lha-page .lha .lha-calc-km{
  background:var(--lha-raised); border:1px solid var(--lha-border); border-radius:var(--lha-r-lg);
  padding:28px; font-family:var(--lha-sans);
}
.lha-page .lha-calc-km h3{font:600 20px/1.3 var(--lha-display);margin:0 0 4px;color:var(--lha-ink)}
.lha-page .lha-calc-km .lha-calc-aide{font-size:14px;line-height:1.5;color:var(--lha-muted);margin:0 0 18px}
.lha-page .lha-calc-champs{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}
.lha-page .lha-calc-champs label{display:block;font:600 14px/1.3 var(--lha-sans);color:var(--lha-ink);margin-bottom:6px}
.lha-page .lha-calc-champs .lha-calc-unite{position:relative}
.lha-page .lha-calc-champs input{
  width:100%; min-height:48px; padding:10px 64px 10px 14px; box-sizing:border-box;
  border:1px solid var(--lha-border-strong); border-radius:var(--lha-r-md); background:#fff;
  font:500 17px/1.2 var(--lha-sans); color:var(--lha-ink); font-variant-numeric:tabular-nums;
  -moz-appearance:textfield;
}
.lha-page .lha-calc-champs input::-webkit-outer-spin-button,
.lha-page .lha-calc-champs input::-webkit-inner-spin-button{opacity:1}
.lha-page .lha-calc-champs input:focus{outline:3px solid var(--lha-accent);outline-offset:1px;border-color:var(--lha-ink)}
.lha-page .lha-calc-champs .lha-calc-unite span{position:absolute;right:36px;top:50%;transform:translateY(-50%);font-size:14px;color:var(--lha-muted);pointer-events:none}
.lha-page .lha-calc-sortie{min-height:150px}
/* sans JavaScript, le calculateur ne peut pas calculer : on ne garde que la note qui explique les tarifs */
html:not(.lha-js) .lha-page .lha-calc-champs,
html:not(.lha-js) .lha-page .lha-calc-sortie,
html:not(.lha-js) .lha-page .lha-calc-aide{display:none}
.lha-page .lha-calc-sortie p{margin:0}
.lha-page .lha-calc-compris{font-size:14px;color:var(--lha-muted);margin-bottom:12px!important;font-variant-numeric:tabular-nums}
.lha-page .lha-calc-barres{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.lha-page .lha-calc-barre{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr) 72px;align-items:center;gap:12px;font-size:14px}
.lha-page .lha-calc-barre span{color:var(--lha-muted)}
.lha-page .lha-calc-barre i{
  display:block; height:12px; border-radius:999px; background:var(--lha-sunken); position:relative; overflow:hidden;
}
.lha-page .lha-calc-barre i::after{
  content:""; position:absolute; inset:0; border-radius:999px; background:var(--lha-border-strong);
  transform-origin:left; transform:scaleX(var(--lha-part,0)); transition:transform .35s cubic-bezier(.2,.7,.2,1);
}
.lha-page .lha-calc-barre.est-mieux i::after{background:var(--lha-primary)}
.lha-page .lha-calc-barre b{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:var(--lha-ink)}
.lha-page .lha-calc-barre.est-mieux span{color:var(--lha-ink);font-weight:600}
.lha-page .lha-calc-conseil{font-size:16px;line-height:1.55;color:var(--lha-ink);padding:12px 14px!important;border-radius:var(--lha-r-md);background:var(--lha-sage100)}
.lha-page .lha-calc-vide{font-size:15px;color:var(--lha-muted)}
.lha-page .lha-calc-km .lha-calc-note{font-size:13px;line-height:1.5;color:var(--lha-muted);margin-top:14px}
@media (max-width:560px){
  .lha-page .lha .lha-calc-km{padding:20px}
  .lha-page .lha-calc-champs{grid-template-columns:1fr}
  .lha-page .lha-calc-barre{grid-template-columns:1fr 72px;row-gap:6px}
  .lha-page .lha-calc-barre i{grid-column:1 / -1;grid-row:2}
}
@media (prefers-reduced-motion:reduce){.lha-page .lha-calc-barre i::after{transition:none}}

/* ---------- « Et ensuite ? » : la suite logique en bas de page ---------- */
.lha-page .lha.lha-s-suite{padding-top:8px;padding-bottom:40px}
.lha-page .lha-suite h2{font:600 13px/1 var(--lha-sans);letter-spacing:.09em;text-transform:uppercase;color:var(--lha-muted);margin-bottom:16px}
.lha-page .lha .lha-suite ul{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 32px;border-top:1px solid var(--lha-border-strong)}
.lha-page .lha-suite li{list-style:none;margin:0;padding:0}
.lha-page .lha .lha-suite a{
  display:grid; grid-template-columns:minmax(0,1fr) 28px; grid-template-rows:auto auto; column-gap:12px;
  padding:20px 0 22px; text-decoration:none; color:var(--lha-ink); height:100%; box-sizing:border-box;
}
.lha-page .lha-suite a b{font:600 21px/1.25 var(--lha-display);letter-spacing:-.01em;grid-column:1}
.lha-page .lha-suite a span{grid-column:1;margin-top:6px;font-size:15px;line-height:1.5;color:var(--lha-muted)}
.lha-page .lha-suite a::after{
  content:""; grid-column:2; grid-row:1; align-self:center; width:28px; height:28px; border-radius:50%;
  background:var(--lha-sage100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6f52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12h11M12.5 7l5 5-5 5'/%3E%3C/svg%3E") center/15px no-repeat;
  transition:transform .2s ease, background-color .15s ease;
}
.lha-page .lha .lha-suite a:hover b{color:var(--lha-primary-h);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1.5px}
.lha-page .lha .lha-suite a:hover::after{transform:translateX(4px);background-color:#d6dfcf}
@media (max-width:767px){
  .lha-page .lha .lha-suite ul{grid-template-columns:1fr}
  .lha-page .lha-suite li + li a{border-top:1px solid var(--lha-border)}
}
@media (prefers-reduced-motion:reduce){.lha-page .lha-suite a::after{transition:none}}

/* ---------- galerie (module Divi « Galerie », classe « lha-galerie ») ---------- */
.lha-page .lha .lha-galerie .et_pb_gallery_items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.lha-page .lha .lha-galerie .et_pb_gallery_item{width:auto!important;margin:0!important;clear:none!important;float:none!important;display:block!important}
.lha-page .lha .lha-galerie .et_pb_gallery_image{border-radius:var(--lha-r-md);overflow:hidden;background:var(--lha-sunken)}
.lha-page .lha .lha-galerie .et_pb_gallery_image img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;transition:transform .5s cubic-bezier(.2,.7,.2,1)}
.lha-page .lha .lha-galerie .et_pb_gallery_image a:hover img{transform:scale(1.04)}
.lha-page .lha .lha-galerie .et_overlay{display:none!important}
.lha-page .lha .lha-galerie .et_pb_gallery_item:first-child{grid-column:span 2;grid-row:span 2}
@media (max-width:767px){
  .lha-page .lha .lha-galerie .et_pb_gallery_items{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media (prefers-reduced-motion:reduce){.lha-page .lha .lha-galerie img{transition:none!important}}

/* ---------- avis Google en direct (extension Trustindex) ---------- */
.lha-page .lha .lha-avis-google{min-height:120px}
.lha-page .lha .lha-avis-google .ti-widget{font-family:var(--lha-sans)!important}

/* ---------- cartes : réactions au survol, seulement si elles mènent quelque part ---------- */
.lha-page .lha .et_pb_column.lha-van-carte{transition:border-color .15s ease, box-shadow .2s ease, transform .2s ease}
.lha-page .lha .et_pb_column.lha-van-carte:hover{border-color:var(--lha-border-strong);box-shadow:0 14px 30px -18px rgba(27,42,34,.35)}
.lha-page .lha .lha-van-carte .lha-van-img img{transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.lha-page .lha .lha-van-carte:hover .lha-van-img img{transform:translateX(4px)}
body.lha-page .lha .lha-carnet .et_pb_post{position:relative;transition:box-shadow .2s ease, border-color .15s ease}
body.lha-page .lha .lha-carnet .et_pb_post:hover{border-color:var(--lha-border-strong);box-shadow:0 14px 30px -18px rgba(27,42,34,.35)}
body.lha-page .lha .lha-carnet .entry-title a::after{content:"";position:absolute;inset:0;z-index:1}
body.lha-page .lha .lha-carnet .entry-featured-image-url img{transition:transform .5s cubic-bezier(.2,.7,.2,1)}
body.lha-page .lha .lha-carnet .et_pb_post:hover .entry-featured-image-url img{transform:scale(1.03)}
body.lha-page .lha .lha-carnet .entry-featured-image-url{overflow:hidden}
@media (prefers-reduced-motion:reduce){
  .lha-page .lha .lha-van-carte .lha-van-img img,
  body.lha-page .lha .lha-carnet .entry-featured-image-url img{transition:none}
}

/* ---------- tablette ---------- */
@media (max-width:980px){
  .lha-page .lha .lha-suite ul{grid-template-columns:1fr 1fr}
}
@media (max-width:767px){
  .lha-page .lha .lha-compris{grid-template-columns:1fr}
  .lha-page .lha .lha-suite ul{grid-template-columns:1fr}
}
