/* LSL Header Toolbar */

header.lsl__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Inter;
}

form.lsl__searchform {
  display: flex;
  align-items: center;
  gap: 1rem;
}

form.lsl__searchform input,
form.lsl__searchform select {
  background: transparent;
  border-radius: 0px;
  min-height: 47px;
  font-family: 'Transat';
}

form.lsl__searchform button[type='submit'] {
  background: black;
  color: white;
  border: 1px solid black;
  border-radius: 0px;
  padding: 9px 33px;
  font-family: var(--e-global-typography-text-font-family), Sans-serif;
  font-size: 18px;
}

form.lsl__searchform button[type='submit']:hover {
  background: var(--e-global-color-primary);
}

nav.lsl__viewactions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

a.lsl__viewlink {
  padding: 8px 16px;
  border: 1px solid #502c1e;
  background: transparent;
  color: #502c1e;
  text-align: center;
  font-family: var(--e-global-typography-text-font-family), Sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  transition: color 0.3s;
}

a.lsl__viewlink:hover {
  background: #502c1e;
  color: white;
}

a.lsl__viewlink.is-active {
  background: #502c1e;
  color: white;
}

span.lsl__viewtext {
  font-weight: 600;
}

button.lsl__viewbtn {
  background: transparent;
  color: #502c1e;
  border: 1px solid #502c1e;
  border-radius: 0px;
}

button.lsl__viewbtn:hover {
  background: #502c1e;
}

[data-mode='list'] button.lsl__viewbtn[data-view='list'],
[data-mode='map'] a.lsl__viewlink[data-view='map'],
[data-mode='combo'] button.lsl__viewbtn[data-view='combo'] {
  background: #502c1e;
  color: white;
}

button.lsl__viewbtn:focus {
  background: #502c1e !important;
}

a.lsl__viewlink.is-active {
  background: #502c1e;
  color: white;
}

/* LIST VIEW */

.lsl__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  row-gap: 3rem;
  margin-top: 3rem;
}

article.lsl__card {
  position: relative;
  flex: 0 1 calc((100% - 2 * 2rem) / 3) !important;
  font-family: 'Transat';
}

article.lsl__card.is-active {
  background: #4e2c1a !important;
  color: white !important;
}

article.lsl__card.is-active button {
  background: #4e2c1a !important;
  color: white !important;
}

img.lsl__card-image {
  min-height: 550px;
  max-height: 550px;
  object-fit: cover;
  width: 100%;
}

@media all and (max-width: 767px) {
  img.lsl__card-image {
    min-height: 350px;
    max-height: 350px;
  }
}

h2.lsl__card-title {
  color: #502c1e;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-transform: uppercase;
}

.lsl__card-address {
  color: #000;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
}

.lsl__card-hours {
  color: #d0ac8a;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  margin-top: 3px;
}

button.lsl__card-button {
  background: transparent;
  border: none;
  padding: 0;
  color: #502c1e;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  margin-top: 20px;
}

button.lsl__card-button:hover {
  color: #000;
  background: none;
}

.lsl__group-heading {
  font-size: 20px;
  font-weight: 600;
}

.lsl__view.lsl__view--listonly .lsl__grid:has(.lsl__group) {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  margin-top: 0px !important;
}

.lsl__view lsl__view--listonly .lsl__group .lsl__grid {
  margin-top: 2rem;
}

.lsl__view.lsl__view--listonly .lsl__group-heading {
  margin-top: 1rem;
}

.lsl__view.lsl__view--listonly .lsl__group .lsl__grid {
  margin-top: 20px;
}

.lsl__view.lsl__view--listonly span.lsl__badge.lsl__badge--distance {
  color: white;
}

h2.lsl__card-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: #d0ac8a;
  margin-top: 0.2rem;
}

/* Combo view */

.lsl__split {
  display: flex;
  gap: 1rem;
}

.lsl__panel.lsl__panel--list .lsl__grid {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-height: 650px;
  overflow: auto;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 10px 15px 10px 0px;
}

.lsl__panel.lsl__panel--list .lsl__grid {
  scrollbar-width: thin;
  scrollbar-color: #4e2c1a #faf7ee;
}

.lsl__panel.lsl__panel--list .lsl__grid::-webkit-scrollbar {
  width: 8px;
}

.lsl__panel.lsl__panel--list .lsl__grid::-webkit-scrollbar-track {
  background: #faf7ee;
}

.lsl__panel.lsl__panel--list .lsl__grid::-webkit-scrollbar-thumb {
  background-color: #4e2c1a;
  border-radius: 4px;
}

.lsl__panel.lsl__panel--list {
  width: 30%;
}

.lsl__panel.lsl__panel--list .lsl__grid article {
  width: 100%;
  cursor: pointer;
  background: white;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
  padding: 25px;
  transition: background 0.2s ease, color 0.2s ease;
}

.lsl__panel.lsl__panel--list .lsl__grid article:hover {
  background: #4e2c1a;
  color: white;
}

.lsl__panel.lsl__panel--list .lsl__grid article.lsl__card h3 {
  margin: 0;
  font-size: 23px;
  padding-bottom: 20px;
  max-width: 20ch;
}

.lsl__panel.lsl__panel--map {
  width: 70%;
  min-height: 500px;
  max-height: 650px;
}

section.lsl__section[data-section='combo'] {
  margin-top: 3rem;
}

.lsl__panel.lsl__panel--list .lsl__grid article.lsl__card .lsl__card-button-link {
  display: block;
  color: #502c1e;
  text-decoration: none;
  margin-top: 20px;
  width: fit-content;
}

.lsl__panel.lsl__panel--list .lsl__grid article:hover .lsl__card-button-link {
  color: white;
}

span.lsl__badge.lsl__badge--distance {
  position: absolute;
  top: 12px;
  right: 12px;
}

span.lsl__badge.lsl__badge--distance {
  position: absolute;
  top: 12px;
  right: 12px;
}

a.lsl__card-button-link i {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-left: 0.3rem;
  transform: translateY(10px);
}

a.lsl__card-button-link:hover i {
  opacity: 1;
  transform: translateY(0px);
}

article.lsl__card.is-active a.lsl__card-button-link {
  color: white !important;
}

/* Geocoder */
.mapboxgl-ctrl-geocoder.mapboxgl-ctrl {
  background: unset !important;
  box-shadow: none !important;
}

svg.mapboxgl-ctrl-geocoder--icon.mapboxgl-ctrl-geocoder--icon-search {
  top: 50%;
  transform: translate(0%, -50%);
}

input.mapboxgl-ctrl-geocoder--input {
  padding-left: 35px !important;
}

/* Map */

div#lsl-mapbox-placeholder-2,
div#lsl-mapbox-placeholder {
  width: 100%;
  height: 100%;
}

.lsl__mapwrap div#lsl-mapbox-placeholder {
  min-height: 550px;
}

.lsl__mapwrap {
  margin-top: 20px;
}

.mapboxgl-canvas {
  height: 100% !important;
  width: 100% !important;
}

.mapboxgl-control-container {
  display: none !important;
}

.lsl__panel--map .lsl__map {
  min-height: 650px;
}

.lsl__view.lsl__view--combo {
  margin-top: 20px;
}

.lsl__view {
  display: none;
}
.lsl[data-mode='combo'] .lsl__view--combo {
  display: block;
}
.lsl[data-mode='combo'] .lsl__view--listonly {
  display: none;
}

.lsl[data-mode='map'] .lsl__view--combo {
  display: block;
}
.lsl[data-mode='map'] .lsl__view--listonly {
  display: none;
}
.lsl[data-mode='map'] .lsl__panel--list {
  display: none;
}
.lsl[data-mode='map'] .lsl__split,
.lsl[data-mode='map'] .lsl__split .lsl__panel.lsl__panel--map {
  width: 100%;
  padding-top: 10px;
}

.lsl[data-mode='list'] .lsl__view--combo {
  display: none;
}

.lsl[data-mode='list'] .lsl__view--listonly {
  display: block;
}

.lsl__panel.lsl__panel--map {
  padding-top: 10px;
}

/* Marqueur */
.lsl-marker {
  cursor: pointer;
}

.lsl-marker-icon {
  width: 44px;
  height: 44px;
  color: #502c1e; /* Rouge pour le marqueur */
}

.lsl-marker-svg {
  width: 100%;
  height: 100%;
}

/* Popup */

.mapboxgl-popup-content {
  width: 320px;
  padding: 10px;
}

.lsl-popup-image {
  width: 100%;
  max-width: 140px;
  max-height: 150px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
  border-radius: 6px;
}

.lsl-popup-content {
  padding: 10px 0px 0px 0px;
  font-family: 'Transat', sans-serif;
}

.lsl-popup-title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: bold;
}

.lsl-popup-address {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: #666;
}

.lsl-popup-link {
  display: block;
  font-size: 16px;
  color: #502c1e;
  text-decoration: none;
  margin-top: 25px;
}

a.lsl-popup-link:focus {
  border: none !important;
  outline: none !important;
}

a.lsl-popup-link:focus-visible {
  border: none !important;
  outline: none !important;
}

.lsl-popup-link:hover {
  text-decoration: underline;
  color: #000;
}

button.mapboxgl-popup-close-button {
  background: #502c1e;
  border: none;
  color: white;
  padding: 0px 8px;
}

button.mapboxgl-popup-close-button:hover {
  background: #7e452f;
}

/* Marqueur origine (adresse saisie) — même icône, teinte différente */
.lsl-marker--origin .lsl-marker-icon {
  color: #002fff; /* ou #d0ac8a si tu préfères */
}

.lsl__notice.is-success {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  background-color: #dff0d8;
  border-color: #d0e9c6;
  color: #3c763d;
  padding: 10px;
}

.lsl__notice.is-error {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 10px;
  background-color: rgba(255, 154, 82, 0.3);
  border-color: #ff9a52;
  color: #232323;
}

button.lsl__notice-close {
  border: none !important;
  color: #502c1e !important;
  background: none !important;
  font-size: 22px !important;
}

button.lsl__notice-close:hover {
  background: none !important;
  border: none !important;
  color: #c8704e !important;
}

.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--pin-right > * {
  top: 50% !important;
  transform: translate(0%, -50%) !important;
}

p.lsl-popup-hours {
  display: flex;
  gap: 0.5rem;
  margin-top: 16px !important;
  font-size: 16px;
  align-items: center;
}

.lsl-popup-tel,
.lsl-popup-mail {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

p.lsl-popup-tel a,
p.lsl-popup-mail a {
  display: flex;
  gap: 0.5rem;
  color: #333333;
  font-size: 16px;
}

.lsl-popup-store-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

p.lsl-popup-tel a:hover,
p.lsl-popup-mail a:hover {
  color: var(--e-global-color-primary) !important;
}

/* RESPONSIVE */

@media all and (max-width: 1135px) {
  span.lsl__viewtext {
    display: none;
  }
}

@media all and (max-width: 1024px) {
  header.lsl__toolbar {
    flex-direction: column-reverse;
    align-items: start;
    gap: 1rem;
  }

  form.lsl__searchform {
    width: 100%;
  }

  article.lsl__card {
    position: relative;
    flex: 0 1 calc((100% - 2 * 1rem) / 2) !important;
    font-family: 'Transat';
  }

  .lsl__split {
    flex-direction: column;
  }

  .lsl__panel.lsl__panel--list {
    width: 100%;
  }

  .lsl__panel.lsl__panel--map {
    width: 100%;
  }
}

@media all and (max-width: 767px) {
  form.lsl__searchform {
    flex-wrap: wrap !important;
  }

  article.lsl__card {
    position: relative;
    flex: 0 1 calc((100% - 2 * 0rem) / 1) !important;
    font-family: 'Transat';
  }

  img.lsl__card-image {
    max-height: 350px;
    object-fit: cover;
  }

  h2.lsl__card-title {
    font-size: 18px !important;
  }

  .lsl__geocoder {
    min-width: 100% !important;
  }

  .mapboxgl-ctrl-geocoder.mapboxgl-ctrl {
    min-width: 100% !important;
  }
}
