/* Territoires WP 0.3.19 : filtre au-dessus du panneau, design or et zoom responsive. */
/* Territoires WP 0.3.8 — fond cartographique transparent, sans bordure.
   La largeur viewport tient compte du scroll vertical dans Divi sans débordement horizontal. */
.twp-shell{
  position:relative;isolation:isolate;box-sizing:border-box;
  /* Fallback 100 % du parent avant chargement du JS ; pas de 100vw qui inclut la scrollbar. */
  --twp-view-width:100%;--twp-view-half:50%;--twp-view-offset:0px;
  width:var(--twp-view-width);max-width:none!important;
  margin:0 0 28px calc(50% - var(--twp-view-half) + var(--twp-view-offset))!important;
  padding:0 clamp(18px,2.7vw,48px) clamp(18px,2.7vw,48px);border:0;border-radius:0;
  --twp-accent:#B3975C;
  background:transparent;color:#242725;font:400 15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.twp-shell *{box-sizing:border-box}
.twp-shell .twp-overline{font-size:11px;letter-spacing:.15em;font-weight:800;color:#B3975C}
.twp-shell .twp-sidebar-stack{position:absolute;top:0;right:0;bottom:auto;width:clamp(310px,27vw,420px);display:flex;flex-direction:column;gap:16px;min-width:0;min-height:0;align-self:stretch}
.twp-shell .twp-filter{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap;margin:0;padding:2px 0 0;min-width:0}
.twp-shell .twp-filter label{font-size:13px;font-weight:750;color:#343c37}
.twp-shell .twp-filter select{flex:1 1 185px;min-width:0;max-width:280px;padding:10px 14px;border:1px solid #ccd4cb;border-radius:9px;color:#27352b;background:#fff;font:inherit}
.twp-shell .twp-count{font-size:12px;color:#687168}
.twp-shell .twp-layout{position:relative;display:grid;grid-template-columns:minmax(0,1fr) clamp(310px,27vw,420px);gap:clamp(14px,1.7vw,28px);align-items:start}
.twp-shell .twp-stage{position:relative;min-width:0;min-height:0;border:0;border-radius:0;background:#fff;overflow:hidden;display:flex;flex-direction:column}
.twp-shell .twp-map-top{display:flex;gap:14px;flex-wrap:wrap;justify-content:space-between;align-items:baseline;padding:17px 22px 2px}
.twp-shell .twp-map-label{font-size:12px;font-weight:750;color:#57625d}
.twp-shell .twp-map-instruction{font-size:11px;color:#69736d}
.twp-shell .twp-map-frame{position:relative;flex:0 0 auto;display:flex;min-height:0;align-items:stretch;justify-content:center}
.twp-shell .twp-map-viewport{position:relative;flex:1;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.twp-shell .twp-map{--twp-map-reference-height:760px;background:var(--twp-map-canvas,#fff);display:block;width:100%;height:var(--twp-map-reference-height);min-height:550px;max-height:none;overflow:hidden;cursor:default;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.twp-shell .twp-map.is-zoomed{cursor:grab;touch-action:none}
.twp-shell .twp-map.is-dragging{cursor:grabbing}
.twp-shell .twp-shape{fill:var(--twp-map-region-fill,#fff);stroke:var(--twp-map-outline,#B3975C);stroke-width:var(--twp-map-fallback-contour-width,1.8px);stroke-dasharray:var(--twp-map-contour-dash,none);stroke-linecap:var(--twp-map-contour-cap,butt);stroke-linejoin:round}
/* La carte IGN garde son aspect validé, mais n'est plus survolable ou cliquable. */
.twp-shell .twp-regions .twp-region{fill:var(--twp-map-region-fill,#fff);stroke:var(--twp-map-outline,#B3975C);stroke-width:var(--twp-map-contour-width,.72px);stroke-dasharray:var(--twp-map-contour-dash,none);stroke-linecap:var(--twp-map-contour-cap,butt);stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none;outline:none}
.twp-shell .twp-marker{cursor:pointer;outline:none}
.twp-shell .twp-halo{fill:var(--twp-pin-highlight-color,var(--twp-pin-color,#a95137));opacity:.18;pointer-events:none}
.twp-shell .twp-pin-body{fill:var(--twp-pin-color,#a95137);stroke:#fff;stroke-width:2;stroke-linejoin:round}
.twp-shell .twp-pin-glyph{fill:#fff;pointer-events:none}
.twp-shell .twp-center{fill:#fff;pointer-events:none}
.twp-shell .twp-marker:hover .twp-halo,.twp-shell .twp-marker:focus .twp-halo,.twp-shell .twp-marker.is-active .twp-halo{opacity:.45;stroke:var(--twp-pin-highlight-color,var(--twp-pin-color,#a95137))}
/* Pin actif : couleur globale configurable, à pleine opacité ; halo masqué pour éviter un disque semi-transparent. */
.twp-shell .twp-marker.is-active .twp-pin-body{fill:var(--twp-selected-pin-color,#000000);fill-opacity:1;opacity:1}
.twp-shell .twp-marker.is-active .twp-halo,.twp-shell .twp-marker.is-active:hover .twp-halo,.twp-shell .twp-marker.is-active:focus .twp-halo{opacity:0;stroke:none}
.twp-shell .twp-marker:focus-visible .twp-pin-body{stroke:#1b4d3a}
.twp-shell .twp-zoom-controls{position:absolute;z-index:5;right:18px;top:14px;display:grid;gap:0;background:#fff;border:1px solid #d2d7d0;box-shadow:0 7px 22px #26352c19;border-radius:12px;overflow:hidden}
.twp-shell .twp-zoom-controls button{width:42px;height:41px;border:0;border-bottom:1px solid #e8ece6;border-radius:0;display:flex;align-items:center;justify-content:center;padding:0;font:600 25px/1 system-ui,sans-serif;color:#273b30;background:white;cursor:pointer}
.twp-shell .twp-zoom-controls button:last-child{border-bottom:0}
.twp-shell .twp-zoom-controls button:hover:not(:disabled){background:#fff6f0;color:#934c31}
.twp-shell .twp-zoom-controls button:disabled{color:#aeb9b0;cursor:default;background:#fafaf8}
.twp-shell .twp-zoom-controls svg{width:19px;height:19px}
.twp-shell .twp-hover-tooltip{position:absolute;z-index:7;pointer-events:none;left:0;top:0;max-width:260px;transform:translate(-50%,calc(-100% - 14px));border-radius:8px;background:#000;color:#fff;font-size:12px;font-weight:700;padding:8px 11px;box-shadow:0 8px 18px #0004;text-align:center;white-space:pre-line}
.twp-shell .twp-hover-tooltip.is-below{transform:translate(-50%,14px)}
.twp-shell .twp-hover-tooltip[hidden]{display:none}
.twp-shell .twp-map-foot{font-size:10px;color:#69726d;padding:8px 20px 16px}
.twp-shell .twp-side{align-self:flex-start;flex:0 0 auto;min-height:0;overflow:hidden;background:#fff;border:1px solid #e3e5de;border-radius:18px;padding:24px 20px;min-width:0;display:flex;flex-direction:column}
.twp-shell .twp-side h3{font-size:24px;color:#27342a;margin:9px 0 18px;padding:0;font-weight:700;line-height:1.15}
.twp-shell .twp-side .twp-items{display:flex;flex:0 0 auto;flex-direction:column;gap:9px;height:var(--twp-five-items-height,auto);max-height:var(--twp-five-items-height,none);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px 5px 3px 1px;min-height:0}
.twp-shell .twp-item{appearance:none;border:1px solid #d9ded7;border-radius:12px;background:#fbfbf9;text-align:left;padding:9px 10px;cursor:pointer;color:#25342b;display:flex;flex-direction:row;align-items:center;gap:12px;font:inherit;min-width:0;width:100%}
.twp-shell .twp-item:hover,.twp-shell .twp-item:focus-visible,.twp-shell .twp-item.is-active{border-color:#B3975C;background:rgba(179,151,92,.12);outline:2px solid transparent}
/* Vignettes dans « Explorer les lieux » et le sélecteur de proximité. */
.twp-shell .twp-item-media{display:flex;flex:0 0 84px;width:84px;height:76px;overflow:hidden;border-radius:8px;background:#e7ebe5;align-items:center;justify-content:center}
.twp-shell .twp-item-image{display:block;width:100%;height:100%;max-width:none;margin:0;padding:0;object-fit:cover;object-position:center}
.twp-shell .twp-item-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:#e7ebe5;color:#839389}
.twp-shell .twp-item-placeholder svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.twp-shell .twp-item-copy{display:flex;flex-direction:column;gap:4px;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.twp-shell .twp-item-title{font-weight:750;font-size:14px;line-height:1.3}
.twp-shell .twp-item small{font-size:12px;line-height:1.4;color:#6c746d;overflow-wrap:anywhere}
.twp-shell .twp-item .twp-item-subtitle{display:block;font-size:12px;line-height:1.45;font-weight:400;color:#6c746d;white-space:normal;overflow-wrap:anywhere}
/* Les distinctions occupent leur propre rangée sous la localisation, sans modifier la vignette. */
.twp-shell .twp-item{align-items:flex-start}
.twp-shell .twp-item-copy{padding-top:2px;gap:3px}
.twp-shell .twp-item-awards{display:flex;align-items:center;flex-wrap:nowrap;gap:3px;width:100%;max-width:100%;min-height:0;overflow-x:auto;overflow-y:hidden;margin-top:4px;white-space:nowrap;scrollbar-width:thin}
.twp-shell .twp-item-award-icon{display:block;flex:0 0 auto;width:auto!important;height:auto!important;min-width:0;max-width:none!important;max-height:none!important;object-fit:contain;margin:0;padding:0;border:0;background:transparent}
@media(max-width:390px){.twp-shell .twp-item-awards{gap:2px}}

.twp-shell .twp-empty{font-size:13px;color:#687168}
/* Fenêtre fiche : image bord à bord en partie supérieure, puis nom et lien. */
.twp-shell .twp-popover{position:absolute;z-index:8;left:22px;top:64px;bottom:auto;width:min(370px,calc(100% - 44px));padding:0;background:#fff;border:1px solid #d8dcd5;border-radius:16px;box-shadow:0 18px 45px #26352c38;overflow:hidden}
.twp-shell .twp-popover[hidden]{display:none}
.twp-shell .twp-pop-media{height:195px;width:100%;background:#e0e8df;overflow:hidden}
.twp-shell .twp-pop-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center;max-width:none;margin:0;padding:0}
.twp-shell .twp-pop-image[hidden],.twp-shell .twp-pop-placeholder[hidden]{display:none}
.twp-shell .twp-pop-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(138deg,#c4d0c4,#e8e4d9)}
.twp-shell .twp-pop-placeholder svg{width:60px;height:60px;fill:none;stroke:#65806f;stroke-width:1.6}
.twp-shell .twp-pop-body{padding:18px 21px 21px}
.twp-shell .twp-pop-title{font-size:20px;line-height:1.2;color:#28352b;padding:0;margin:0 0 6px;font-weight:760}
.twp-shell .twp-pop-text{font-size:13px;color:#697269;line-height:1.5;margin:0 0 15px;padding:0}
.twp-shell .twp-pop-link{display:inline-flex;align-items:center;gap:9px;font-size:13px;font-weight:750;color:#B3975C;text-decoration:none !important;border-bottom:0 !important;padding-bottom:0}
.twp-shell .twp-pop-link:hover{color:#B3975C;opacity:.8;text-decoration:none !important;border-bottom:0 !important}
.twp-shell .twp-pop-link:focus-visible{text-decoration:none !important;border-bottom:0 !important}
.twp-shell .twp-pop-link[hidden]{display:none}
.twp-shell .twp-pop-link svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.twp-shell .twp-close{position:absolute;z-index:2;right:10px;top:10px;width:33px;height:33px;border:0;border-radius:50%;background:#fffdf2ed;color:#27352b;font:400 24px/1 system-ui,sans-serif;display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 2px 8px #2224;cursor:pointer}
.twp-shell button:focus-visible,.twp-shell .twp-pop-link:focus-visible,.twp-shell .twp-map:focus-visible{outline:3px solid #B3975C;outline-offset:3px}
@media(max-width:900px){
 .twp-shell .twp-layout{grid-template-columns:minmax(0,1fr)}
 .twp-shell .twp-sidebar-stack{position:static;inset:auto;width:auto;min-height:0;align-self:stretch}
 .twp-shell .twp-side{flex:none;min-height:0;overflow:visible;align-self:stretch}
 .twp-shell .twp-stage{min-height:0}
 .twp-shell .twp-map{--twp-map-reference-height:600px;min-height:470px;max-height:none}
 .twp-shell .twp-side .twp-items{display:flex;flex-direction:column;flex:none;grid-template-columns:none;max-height:var(--twp-five-items-height,none);overflow-y:auto}
}
@media(max-width:600px){
 .twp-shell{padding:0 14px 18px;margin-top:0!important}
 .twp-shell .twp-filter select{width:100%;max-width:none}
 .twp-shell .twp-map-instruction{display:none}
 .twp-shell .twp-map{--twp-map-reference-height:360px;min-height:360px;max-height:none}
 .twp-shell .twp-stage{min-height:0}
 .twp-shell .twp-side{padding:20px 16px}
 .twp-shell .twp-side .twp-items{grid-template-columns:none}
 .twp-shell .twp-popover{width:min(330px,calc(100% - 28px));left:14px;top:58px;bottom:auto}
 .twp-shell .twp-pop-media{height:150px}
 .twp-shell .twp-zoom-controls{right:10px;top:10px}
 .twp-shell .twp-zoom-controls button{width:37px;height:37px}
}
@media (prefers-reduced-motion:reduce){.twp-shell *{scroll-behavior:auto!important}}

/* Sélecteur contextuel pour les marqueurs géographiquement proches.
   Aucun marqueur n'est déplacé, regroupé ou redimensionné. */
.twp-shell .twp-nearby{position:absolute;z-index:9;max-height:none;overflow:visible;display:flex;flex-direction:column;padding:0;background:#fff;border:1px solid #d9ded7;border-radius:13px;box-shadow:0 14px 36px #20352a38;color:#26342c;font:inherit}
.twp-shell .twp-nearby[hidden]{display:none}
.twp-shell .twp-nearby-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 12px 10px 15px;background:#f7f8f5;border-bottom:1px solid #e7e9e4}
.twp-shell .twp-nearby-heading strong{font-size:13px;font-weight:750;line-height:1.3}
.twp-shell .twp-nearby-close{appearance:none;flex:none;border:0;border-radius:50%;width:27px;height:27px;padding:0;background:#fff;color:#2b3b30;font:22px/1 system-ui,sans-serif;cursor:pointer}
.twp-shell .twp-nearby-choices{overflow:visible;padding:7px}
.twp-shell .twp-nearby-choice{appearance:none;display:flex;flex-direction:row;align-items:center;gap:10px;width:100%;min-width:0;padding:8px;border:1px solid transparent;border-radius:8px;background:#fff;text-align:left;color:#26352b;cursor:pointer;font:inherit}
.twp-shell .twp-nearby-choice + .twp-nearby-choice{border-top:1px solid #edf0eb}
.twp-shell .twp-nearby-media{flex:0 0 64px;width:64px;height:60px}
.twp-shell .twp-nearby-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.twp-shell .twp-nearby-title{font-size:13px;font-weight:730;line-height:1.25}
.twp-shell .twp-nearby-choice small{display:block;font-size:11px;line-height:1.35;color:#68736b}
.twp-shell .twp-nearby-choice:hover,.twp-shell .twp-nearby-choice:focus-visible{background:rgba(179,151,92,.12);border-color:#B3975C;outline:2px solid transparent}
.twp-shell .twp-nearby-close:focus-visible{outline:2px solid #B3975C;outline-offset:2px}

/* Couleur harmonisée des liens présents dans Territoires WP. */
.twp-shell a,.twp-shell a:visited{color:#B3975C!important;opacity:1;text-decoration:none!important;transition:opacity .18s ease}
.twp-shell a:hover{color:#B3975C!important;opacity:.8}
.twp-shell a:focus-visible{outline:3px solid #B3975C;outline-offset:3px}

/* Logo superposé au bloc carte : indépendant du SVG et du zoom. */
.twp-shell .twp-map-brand{position:absolute;top:18px;left:22px;z-index:6;pointer-events:none;max-width:min(200px,36%)}
.twp-shell .twp-map-brand img{display:block;width:auto;height:auto;max-width:100%;max-height:100px;object-fit:contain}
@media(max-width:600px){.twp-shell .twp-map-brand{top:12px;left:12px;max-width:32%}.twp-shell .twp-map-brand img{max-height:68px}}

/* 0.3.28 : la fiche reste dans la partie visible de la carte pendant le scroll. */
.twp-shell .twp-popover{overscroll-behavior:contain;scrollbar-width:thin}
.twp-shell .twp-map-top{justify-content:flex-end}
@media(max-width:600px){.twp-shell .twp-map-top{padding:0}}

/* 0.3.41 — Présentation exclusivement mobile : carte invisible, liste en premier.
   Le seuil 600px est strictement celui du mobile déjà utilisé par Territoires WP. */
.twp-shell .twp-client-card{display:contents}
.twp-shell .twp-mobile-press-link{display:none!important}
@media(max-width:600px){
  .twp-shell .twp-stage{display:none!important}
  .twp-shell .twp-layout{display:block}
  .twp-shell .twp-sidebar-stack{position:static;width:100%;gap:16px}
  .twp-shell .twp-client-card{display:block;min-width:0}
  .twp-shell .twp-client-card .twp-item{width:100%}
  .twp-shell .twp-client-card.has-open-link .twp-item{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}
  .twp-shell .twp-mobile-press-link:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;gap:9px;box-sizing:border-box;width:100%;padding:12px 14px;border:1px solid #B3975C;border-top:0;border-radius:0 0 12px 12px;background:#fbfbf9;color:#B3975C!important;font-size:13px;font-weight:750;line-height:1.3;text-decoration:none!important}
  .twp-shell .twp-mobile-press-link svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .twp-shell .twp-mobile-press-link:focus-visible{outline:3px solid #B3975C;outline-offset:2px}
}

/* v0.3.44 : logo uniquement sur mobile, à droite du titre des établissements.
   Le logo reste administrable depuis Apparence de la carte. Aucun changement tablette/desktop. */
.twp-shell .twp-mobile-logo{display:none}
@media(max-width:600px){
  .twp-shell .twp-side-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin-bottom:18px}
  .twp-shell .twp-side-heading-copy{flex:1 1 auto;min-width:0}
  .twp-shell .twp-side-heading h3{margin:9px 0 0}
  .twp-shell .twp-mobile-logo{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;width:clamp(56px,19vw,90px);max-width:32%;margin:0;text-align:right}
  .twp-shell .twp-mobile-logo img{display:block;width:auto;height:auto;max-width:100%;max-height:90px;object-fit:contain}
}
