/* =========================================================
   EPM Projets Map – Design CSS (XD-like) — CLEAN
   - No border radius on cards
   - Card shadow
   - Red bar only on hover/active
   - Map sticky on desktop
   - Bottom gradient overlay on map
   - roundbg replaces picto-rond (list + popup offsets)

   IMPORTANT (fix Elementor responsive):
   - Do NOT set --epm-iw-w / --epm-iw-title-fs / --epm-iw-row-fs inside .epm-map
     otherwise Elementor responsive vars get overridden.
   - We use var(..., fallback) in breakpoints instead.
========================================================= */

:root{
  --epm-blue:#0b3f6b;
  --epm-red:#d0021b;
  --epm-shadow:0 8px 24px rgba(0,0,0,.12);
  --epm-shadow-soft:0 6px 18px rgba(0,0,0,.10);
  --epm-sticky-top:0px;

  /* LIST card */
  --epm-li-h:auto;
  --epm-li-min-h:160px;
  --epm-li-min-h-featured:190px;

  --epm-li-img-w:36%;
  --epm-li-img-h:180px;

  --epm-li-title-fs:16px;
  --epm-li-meta-fs:13px;

  --epm-li-btn-minw:220px;
  --epm-li-btn-fs:15px;

  /* roundbg sizing */
  --epm-li-badge-w:32px;
  --epm-li-badge-h:32px;
  --epm-li-ico-w:17px;
  --epm-li-ico-h:17px;

  --epm-iw-badge-w:32px;
  --epm-iw-badge-h:32px;
  --epm-iw-ico-w:17px;
  --epm-iw-ico-h:17px;

  /* roundbg offsets (list + popup) */
  --epm-li-badge-bg-x:-5px;
  --epm-li-badge-bg-y:0px;

  --epm-iw-badge-bg-x:-5px;
  --epm-iw-badge-bg-y:0px;

  /* optional: shrink a specific mask if it looks "too fat" */
  --epm-ico-mask-size:contain;
}

/* =========================================================
   Filters
========================================================= */

.epm-filters{
  display:grid;
  gap:10px;
  margin:16px 0 18px;
}

/* Search */
.epm-search-wrap{ position:relative; }
.epm-search-wrap .epm-search{
  width:100%;
  border:2px solid var(--epm-blue);
  padding:12px 12px 12px 44px;
  font-size:14px;
  font-weight:400;
  border-radius:0;
  background:#fff;
  color:#0b1f33;
  font-family:'Vinci',sans-serif;
}
.epm-search-wrap::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:16px;height:16px;
  transform:translateY(-50%);
  background:var(--epm-blue);
  -webkit-mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-size:contain;
  mask-repeat:no-repeat;
  mask-position:center;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 1 0 5.29 14.03l4.34 4.34 1.41-1.41-4.34-4.34A8 8 0 0 0 10 2Zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 1 0 5.29 14.03l4.34 4.34 1.41-1.41-4.34-4.34A8 8 0 0 0 10 2Zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12Z'/%3E%3C/svg%3E");
}

/* Bar */
.epm-filters-bar{
  display:flex;
  align-items:center;
  gap:0;
  background:var(--epm-blue);
  border-radius:0;
  overflow:hidden;
  height:44px;
}
.epm-filters-bar .epm-dd{
  flex:1 1 0;
  position:relative;
  height:100%;
}
.epm-filters-bar .epm-dd + .epm-dd{
  border-left:1px solid rgba(255,255,255,.18);
}
.epm-filters-bar select{
  width:100%;
  height:100%;
  border:0;
  background:transparent;
  color:#fff;
  padding:0 34px 0 16px;
  font-size:14px;
  font-family:'Vinci',sans-serif;
  font-weight:400;
  outline:none;
  appearance:none;
  -webkit-appearance:none;
}
.epm-filters-bar select option{
  color:#0b1f33;
  background:#fff;
}
.epm-filters-bar .epm-dd::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  width:14px;height:14px;
  transform:translateY(-50%);
  background:#fff;
  -webkit-mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-size:contain;
  mask-repeat:no-repeat;
  mask-position:center;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5H7Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5H7Z'/%3E%3C/svg%3E");
}

.epm-filters-bar .epm-dd{
  min-width:0;
}

@media (max-width:1360px){
  .epm-filters-bar select,
  .epm-filters .epm-featured-toggle{
    font-size:12px;
  }

  .epm-filters .epm-featured-toggle{
    padding:0 10px;
  }
}

.epm-filters .epm-reset,
.epm-filters .epm-featured-toggle{
  border:0;
  background:transparent;
  color:#fff;
  padding:0 12px;
  font-family:'Vinci',sans-serif;
  font-size:13px;
  font-weight:400;
  cursor:pointer;
  height:100%;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-left:1px solid rgba(255,255,255,.18);
  white-space:nowrap;
}

.epm-list-sentinel{
  width:100%;
  height:1px;
}
.epm-filters .epm-reset{
  width:44px;
  min-width:44px;
  flex:0 0 44px;
  padding:0;
  justify-content:center;
  font-size:0;
}

.epm-filters .epm-reset::before{
  content:"";
  width:16px;height:16px;
  background:#fff;
  -webkit-mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-size:contain;
  mask-repeat:no-repeat;
  mask-position:center;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6V3L8 7l4 4V8c2.76 0 5 2.24 5 5a5 5 0 0 1-9.58 2H5.26A7 7 0 0 0 19 13c0-3.87-3.13-7-7-7Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6V3L8 7l4 4V8c2.76 0 5 2.24 5 5a5 5 0 0 1-9.58 2H5.26A7 7 0 0 0 19 13c0-3.87-3.13-7-7-7Z'/%3E%3C/svg%3E");
}

.epm-filters .epm-featured-toggle::before{
  content:"";
  width:16px;height:16px;
  background:#fff;
  -webkit-mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-size:contain;
  mask-repeat:no-repeat;
  mask-position:center;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 17.27 6.18 3.73-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 17.27 6.18 3.73-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

.epm-filters .epm-featured-toggle.is-active{
  background:rgba(255,255,255,.12);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
}


/* =========================================================
   List
========================================================= */

.epm-list{
  display:grid;
  gap:12px;
  justify-items:center;
}

.epm-li{
  width:var(--epm-li-card-w, 100%);
  max-width:100%;
  text-decoration:none !important;
  color:inherit;
  cursor:pointer;
  content-visibility:auto;
  contain-intrinsic-size:240px 1px;
}

.epm-li:not(.epm-li--has-more){
  width:min(var(--epm-li-card-w, 100%), var(--epm-li-card-w-compact, 100%));
}

.epm-li--has-more{
  width:100%;
}

.epm-li-card{
  position:relative;
  display:grid;
  grid-template-columns:var(--epm-li-img-w, 36%) minmax(0, 1fr);
  gap:0;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:var(--epm-shadow-soft);
  border-radius:0;
  overflow:hidden;
  width:100%;
  max-width:100%;
  height:var(--epm-li-h, auto);
  min-height:var(--epm-li-min-h, 160px);
}

.epm-li-card--has-more{
  min-height:max(var(--epm-li-min-h, 160px), var(--epm-li-min-h-featured, 190px));
}


/* red bar only on hover/active */
.epm-li-card::before{
  content:"";
  position:absolute;
  top:0;left:0;
  width:10px;height:100%;
  background:var(--epm-red);
  opacity:0;
  transition:opacity .15s ease;
}
.epm-li:hover .epm-li-card::before,
.epm-li.is-active .epm-li-card::before{
  opacity:1;
}

.epm-li-main{
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-width:0;
}
.epm-li-title{
  font-size:var(--epm-li-title-fs,16px);
  font-weight:800;
  color:var(--epm-blue);
  margin:0 0 4px;
  line-height:1.06;
}
.epm-li-title{
  font-size:var(--epm-li-title-fs,16px);
  font-weight:800;
  color:var(--epm-blue);
  margin:0 0 4px;
  line-height:1.06;
}

.epm-li-title-main{
  display:block;
}

.epm-li-subtitle{
  display:block;
  margin-top:4px;
  font-size:.78em;
  line-height:1.25;
  font-weight:500;
  color:rgba(0,0,0,.62);
}
.epm-li-year-inline{
  font-size:.72em;
  font-weight:700;
  color:rgba(0,0,0,.55);
  white-space:nowrap;
}

.epm-li-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
  font-size:var(--epm-li-meta-fs,13px);
  font-weight:400;
  font-family:'Vinci',sans-serif;
  color:rgba(0,0,0,.72);
  margin:2px 0 0;
}

.epm-meta{
  display:flex;
  width:100%;
  align-items:center;
  gap:8px;
  min-width:0;
}
.epm-meta-delivery .epm-meta-value{ font-weight:700; }

.epm-li-actions{ margin-top:auto; padding-top:6px; }
.epm-btn,
.epm-btn:link,
.epm-btn:visited,
.epm-btn:hover,
.epm-btn:focus,
.epm-btn:active,
.epm-li-more,
.epm-li-more:link,
.epm-li-more:visited,
.epm-li-more:hover,
.epm-li-more:focus,
.epm-li-more:active{
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 8px;
  min-width:min(var(--epm-li-btn-minw, 220px), 100%);
  background:var(--epm-red);
  color:#fff !important;
  fill:#fff;
  font-size:var(--epm-li-btn-fs,15px);
  font-weight:600;
  border:0;
  text-decoration:none !important;
}

.epm-btn .epm-btn-text,
.epm-li-more .epm-btn-text,
.epm-btn .elementor-button-icon,
.epm-li-more .elementor-button-icon{
  color:#fff !important;
}

.epm-btn-ico{
  display:inline-flex;
  width:18px;height:18px;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.12);
}

/* image */
.epm-li-img{
  position:relative;
  display:flex;
  align-items:stretch;
  height:100%;
}

.epm-li-badge{
  position:absolute;
  top:10px;
  left:10px;
  z-index:2;
  max-width:calc(100% - 20px);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  color:var(--epm-blue);
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}

.epm-li-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:0;
}

.epm-li-card--img-left .epm-li-img{ order:1; }
.epm-li-card--img-left .epm-li-main{ order:2; }

/* =========================================================
   Icons (mask)
========================================================= */

.epm-ico{
  width:14px;
  height:14px;
  display:inline-block;
  background:currentColor;
  -webkit-mask-size:var(--epm-ico-mask-size, contain);
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-size:var(--epm-ico-mask-size, contain);
  mask-repeat:no-repeat;
  mask-position:center;
  opacity:.95;
}

/* --- roundbg (replacement for picto-rond) ----------------
   Works if class roundbg is on:
   - a wrapper element (recommended)
   - OR the icon element itself (fallback)
---------------------------------------------------------- */

/* base (works for generic DOM and Elementor wrappers) */
.roundbg,
.roundbg.elementor-widget-container,
.roundbg.elementor-image,
.roundbg.elementor-widget-icon{
  width:var(--epm-li-badge-w,32px);
  height:var(--epm-li-badge-h,32px);
  min-width:var(--epm-li-badge-w,32px);
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  position:relative !important;
  overflow:visible !important;
  line-height:0 !important;
  border-radius:999px;
  isolation:isolate; /* so ::before z-index behaves */
}

/* grey circle */
.roundbg::before,
.roundbg.elementor-widget-container::before,
.roundbg.elementor-image::before,
.roundbg.elementor-widget-icon::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  background:rgba(0,0,0,.08);
  transform:translate(var(--epm-li-badge-bg-x,-5px), var(--epm-li-badge-bg-y,0px));
  z-index:-1;
}

/* popup sizing + offsets */
.epm-iw .roundbg,
.epm-iw-row .roundbg,
.epm-iw .roundbg.elementor-widget-container,
.epm-iw-row .roundbg.elementor-widget-container{
  width:var(--epm-iw-badge-w,32px);
  height:var(--epm-iw-badge-h,32px);
  min-width:var(--epm-iw-badge-w,32px);
}
.epm-iw .roundbg::before,
.epm-iw-row .roundbg::before,
.epm-iw .roundbg.elementor-widget-container::before,
.epm-iw-row .roundbg.elementor-widget-container::before{
  transform:translate(var(--epm-iw-badge-bg-x,-5px), var(--epm-iw-badge-bg-y,0px));
}

/* icon size inside roundbg */
.roundbg .epm-ico{
  width:var(--epm-li-ico-w,17px);
  height:var(--epm-li-ico-h,17px);
  position:relative;
  z-index:1;
}
.epm-iw .roundbg .epm-ico,
.epm-iw-row .roundbg .epm-ico{
  width:var(--epm-iw-ico-w,17px);
  height:var(--epm-iw-ico-h,17px);
}

/* if roundbg is on the icon itself */
.roundbg.epm-ico{
  width:var(--epm-li-ico-w,17px);
  height:var(--epm-li-ico-h,17px);
}
.epm-iw .roundbg.epm-ico,
.epm-iw-row .roundbg.epm-ico{
  width:var(--epm-iw-ico-w,17px);
  height:var(--epm-iw-ico-h,17px);
}

/* masks */
.epm-ico-pin{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z'/%3E%3C/svg%3E");
}
.epm-ico-star{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 17.3 6.18 3.7-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 17.3 6.18 3.7-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}
.epm-ico-calendar{
  -webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDRoLTFWMmgtMnYySDhWMkg2djJINWMtMS4xIDAtMiAuOS0yIDJ2MTVjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0wIDE3SDVWOWgxNHYxMnptMC0xNEg1VjZoMTR2MXoiLz48L3N2Zz4=");
  mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDRoLTFWMmgtMnYySDhWMkg2djJINWMtMS4xIDAtMiAuOS0yIDJ2MTVjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0wIDE3SDVWOWgxNHYxMnptMC0xNEg1VjZoMTR2MXoiLz48L3N2Zz4=");
  /* if you still see "cropping", uncomment:
  -webkit-mask-size:86% 86%;
  mask-size:86% 86%;
  */
}
.epm-ico-briefcase{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v3H2V8a2 2 0 0 1 2-2h4V4a2 2 0 0 1 2-2Zm4 4V4h-4v2h4Zm8 7v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7h20Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v3H2V8a2 2 0 0 1 2-2h4V4a2 2 0 0 1 2-2Zm4 4V4h-4v2h4Zm8 7v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7h20Z'/%3E%3C/svg%3E");
}

/* =========================================================
   Map wrapper + gradient
========================================================= */

.epm-map-wrap{ position:relative; }
.epm-map-wrap.is-sticky{
  position:sticky;
  top:var(--epm-sticky-top);
  align-self:start;
}
.epm-map{
  width:100%;
  border-radius:0;
  overflow:hidden;
  height:var(--epm-map-h,650px);
  min-height:0;
  box-shadow:none;
}

.epm-map-wrap::after{
  display:none;
}
/* =========================================================
   Google InfoWindow overrides
========================================================= */

.epm-map .gm-style .gm-style-iw,
.epm-map .gm-style .gm-style-iw-c{
  width: var(--epm-iw-w, 360px) !important;
  max-width: min(var(--epm-iw-w, 360px), 92vw) !important;
}
.epm-map .gm-style .gm-style-iw-c{
  padding:0 !important;
  border-radius:12px;
  overflow:hidden;
}
.epm-map .gm-style .gm-style-iw-d{
  padding:0 !important;
  overflow:hidden !important;
  max-width: min(var(--epm-iw-w, 360px), 92vw) !important;
}

/* keep Elementor typography */
.epm-map .gm-style .gm-style-iw-c,
.epm-map .gm-style .gm-style-iw-c *{
  font-family:inherit !important;
}

/* Google header shouldn't push content */
.epm-map .gm-style .gm-style-iw-chr{
  position:absolute !important;
  top:0 !important;
  right:0 !important;
  height:0 !important;
  z-index:5;
}
.epm-map .gm-style .gm-style-iw-ch{ display:none !important; }

/* close button */
.epm-map .gm-style .gm-ui-hover-effect{
  top:8px !important;
  right:8px !important;
  width:44px !important;
  height:44px !important;
  margin:0 !important;
  opacity:1 !important;
  background:var(--epm-blue) !important;
  border-radius:0 !important;
}
.epm-map .gm-style .gm-ui-hover-effect:hover{
  background:var(--epm-red) !important;
}
.epm-map .gm-style .gm-ui-hover-effect > span{
  background:#fff !important;
  width:24px !important;
  height:24px !important;
  margin:10px !important;
}

/* =========================================================
   InfoWindow content
========================================================= */

.epm-iw{
  width:100%;
  font-family:inherit;
  padding:0;
  min-width:0;
}
.epm-iw-img{ margin:0; }
.epm-iw-img img{
  display:block;
  width:100%;
  height:140px;
  object-fit:cover;
  margin:0;
}
.epm-iw-body{ padding:14px; }

.epm-iw-h3{
  margin:0 0 10px;
  font-size: var(--epm-iw-title-fs, 20px) !important;
  line-height:1.2;
  font-family:inherit;
}
.epm-iw-list{
  display:grid;
  gap:8px;
  margin:0 0 16px;
}
.epm-iw-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.epm-iw-row strong{ font-weight:700; }
.epm-iw-txt{
  font-size: var(--epm-iw-row-fs, 14px);
  color:#111;
}

.epm-map .epm-iw .epm-btn{
  min-width:0 !important;
  width:100%;
  box-sizing:border-box;
  margin-top:12px;
}

/* =========================================================
   Misc states
========================================================= */

.epm-no-results{
  margin:20px 0;
  padding:14px 16px;
  background:#f7f7f7;
  border-left:4px solid #0a4c8a;
  font-weight:600;
}

.epm-li.is-active{
  outline:2px solid rgba(10,76,138,.25);
}

.epm-li.epm-squeeze{ animation:epmSqueeze .55s ease; }
@keyframes epmSqueeze{
  0%{ transform:scale(1); }
  30%{ transform:scale(.97); }
  60%{ transform:scale(1.02); }
  100%{ transform:scale(1); }
}

/* true disabled (not clickable) */
.is-disabled{
  opacity:.45;
  pointer-events:none;
}

/* =========================================================
   Responsive
========================================================= */

/* <=1280: stop sticky */
@media (max-width:1280px){
  .epm-map-wrap.is-sticky{
    position:relative;
    top:auto;
    align-self:stretch;
  }
  .epm-map{ width:100%; }
}

@media (max-width:1024px){
  /* Déplace la zone du bouton close à gauche */
  .epm-map .gm-style .gm-style-iw-chr{
    left:0 !important;
    right:auto !important;
  }

  /* Place la croix en haut à gauche (sur l'image) */
  .epm-map .gm-style .gm-ui-hover-effect{
    left:8px !important;
    right:auto !important;
    top:8px !important;
    z-index:10 !important; /* au cas où */
  }
}

/* TABLET <=1024: keep 2 columns (no stack), make image flexible */
@media (max-width:1024px){
  .epm-li-card{
    grid-template-columns: 1fr minmax(240px, 42%);
  }
  .epm-btn{
    min-width:min(320px, 100%);
  }

  /* InfoWindow (popup) mobile:
     - fallback width if Elementor doesn't set it
     - allow scrolling
     - horizontal layout (image left / text right)
  */
  .epm-map .gm-style .gm-style-iw,
  .epm-map .gm-style .gm-style-iw-c{
    width: var(--epm-iw-w, min(92vw, 340px)) !important;
    max-width: min(var(--epm-iw-w, min(92vw, 340px)), 92vw) !important;
  }
  .epm-map .gm-style .gm-style-iw-d{
    max-width: min(var(--epm-iw-w, min(92vw, 340px)), 92vw) !important;
    max-height:55vh !important;
    overflow:auto !important;
  }

  .epm-iw{
    display:flex;
    align-items:stretch;
    padding:0;
  }

  .epm-iw-img{
    flex:0 0 40%;
    margin:0;
  }

  .epm-iw-img img{
    width:100%;
    height:100%;
    min-height:110px;
    object-fit:cover;
  }

  .epm-iw-body{
    flex:1 1 auto;
    padding:12px;
    min-width:0;
  }

  .epm-iw-h3{
    font-size: var(--epm-iw-title-fs, 16px) !important;
    margin:0 0 8px;
  }

  .epm-iw-txt{
    font-size: var(--epm-iw-row-fs, 12px);
  }

  .epm-iw-list{ gap:6px; margin:0 0 10px; }

  .epm-map .epm-iw .epm-btn{
    margin-top:10px;
    min-width:0 !important;
    width:100%;
  }
}

/* MOBILE <=767: stack */
@media (max-width:767px){
  .epm-li-card{ grid-template-columns:1fr; height:auto; }
  .epm-li-main{ padding:16px 16px 18px; }
  .epm-li-title{ font-size:18px; }
  .epm-li-meta{ font-size:13px; }
  .epm-btn{ width:100%; min-width:0; font-size:16px; }

  .epm-li-img{ order:1; height:var(--epm-li-img-h, 160px); min-height:0; }
  .epm-li-main{ order:2; }
  .epm-li-img img{ width:100%; height:100%; object-fit:cover; }

  /* filters stacked nicer on small screens */
  .epm-filters-bar{
    flex-wrap:wrap;
    height:auto;
  }
  .epm-filters-bar .epm-dd,
  .epm-filters .epm-reset,
  .epm-filters .epm-featured-toggle{
    width:100%;
    justify-content:center;
    height:44px;
    border-left:0 !important;
    border-top:1px solid rgba(255,255,255,.18);
  }
}

/* very small popup <=480 (fallback only, doesn't override Elementor vars) */
@media (max-width:480px){
  .epm-map .gm-style .gm-style-iw,
  .epm-map .gm-style .gm-style-iw-c{
    width: var(--epm-iw-w, 92vw) !important;
    max-width: 92vw !important;
  }
  .epm-map .gm-style .gm-style-iw-d{
    max-width: 92vw !important;
  }
}