/* SB Distribution — page « Nos revendeurs » : liste + carte Leaflet (fond CARTO sombre). Variables --sb-* de custom.css. */
.sb-stores__head { padding: calc(var(--sb-header-h) + clamp(32px, 6vw, 72px)) var(--sb-gutter) clamp(24px, 4vw, 48px); max-width: 60rem; }
.sb-stores__eyebrow { margin: 0 0 1rem; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; color: var(--sb-grey); }
.sb-stores__title { margin: 0 0 1rem; font-size: var(--sb-title); font-weight: 500; }
.sb-stores__intro { margin: 0; max-width: 38rem; font-size: var(--sb-text-lg); font-weight: 300; line-height: 1.35; color: rgba(245,245,245,.8); }

.sb-stores { padding: 0 var(--sb-gutter) clamp(48px, 7vw, 96px); background: var(--sb-black); color: var(--sb-white); font-family: var(--sb-font); }
.sb-stores__layout { display: grid; gap: clamp(20px, 3vw, 40px); }
.sb-stores__mapcol { order: -1; }
.sb-stores__map { height: 60vh; min-height: 360px; background: var(--sb-black-3); border: 1px solid var(--sb-line); }
@media (min-width: 992px) {
  .sb-stores__layout { grid-template-columns: 3fr minmax(300px, 2fr); align-items: start; }
  .sb-stores__mapcol { order: -1; position: sticky; top: calc(var(--sb-bar-h) + 16px); }
  .sb-stores__map { height: calc(100vh - var(--sb-bar-h) - 32px); height: calc(100svh - var(--sb-bar-h) - 32px); }
}
@media (min-width: 1200px) {
  .sb-stores__mapcol { top: 16px; }
  .sb-stores__map { height: calc(100vh - 32px); height: calc(100svh - 32px); }
}

/* Outils */
.sb-stores__tools { display: flex; gap: .75rem; margin-bottom: .75rem; }
.sb-stores__search { flex: 1; margin: 0; }
.sb-stores__input {
  width: 100%; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--sb-line); border-radius: 0; background: transparent;
  color: var(--sb-white); font: 400 var(--sb-text) var(--sb-font);
}
.sb-stores__input::placeholder { color: var(--sb-grey); }
.sb-stores__input:focus { outline: 0; border-bottom-color: var(--sb-white); }
.sb-stores__near {
  padding: .6rem 1rem; border: 1px solid var(--sb-white); border-radius: 0; background: transparent; color: var(--sb-white);
  font: 500 .9rem var(--sb-font); cursor: pointer; transition: background .3s var(--sb-ease), color .3s var(--sb-ease);
}
.sb-stores__near:hover, .sb-stores__near:focus-visible { background: var(--sb-paper); color: var(--sb-black); }
.sb-stores__near[disabled] { opacity: .5; cursor: default; }
.sb-stores__status { min-height: 1.4em; margin: 0 0 .5rem; font-size: .9rem; color: var(--sb-grey); }

/* Liste */
.sb-stores__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sb-line); }
.sb-stores__item { border-bottom: 1px solid var(--sb-line); }
.sb-stores__item.is-hidden { display: none; }
.sb-stores__select {
  display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; width: 100%; padding: 1rem 0 1rem 1.1rem; position: relative;
  border: 0; background: none; color: var(--sb-white); text-align: left; font-family: var(--sb-font); cursor: pointer;
}
.sb-stores__select::before {
  content: ""; position: absolute; left: 0; top: 1.45rem; width: 6px; height: 6px; border-radius: 50%; background: var(--sb-brand);
  opacity: 0; transform: scale(.5); transition: opacity .3s var(--sb-ease), transform .3s var(--sb-ease);
}
.sb-stores__item.is-active .sb-stores__select::before { opacity: 1; transform: none; }
.sb-stores__select:focus-visible { outline: 2px solid var(--sb-brand); outline-offset: -2px; }
.sb-stores__name { font-size: var(--sb-text); font-weight: 500; line-height: 1.25; }
.sb-stores__city { grid-column: 1; font-size: var(--sb-text); color: var(--sb-grey); }
.sb-stores__distance { grid-column: 2; grid-row: 1 / span 2; align-self: start; font-size: .85rem; color: var(--sb-grey); white-space: nowrap; }
.sb-stores__distance:empty { display: none; }
.sb-stores__details { display: none; padding: 0 0 1.25rem 1.1rem; font-size: var(--sb-text); line-height: 1.5; }
.sb-stores__item.is-active .sb-stores__details { display: block; }
.sb-stores__address { margin: 0 0 .75rem; font-style: normal; color: rgba(245,245,245,.85); }
.sb-stores__hours { margin: 0 0 .75rem; }
.sb-stores__hours summary { cursor: pointer; color: var(--sb-grey); }
.sb-stores__times { margin-top: .5rem; border-collapse: collapse; }
.sb-stores__times th { padding: .15rem 1rem .15rem 0; font-weight: 400; color: var(--sb-grey); text-align: left; }
.sb-stores__times td { padding: .15rem 0; }
.sb-stores__links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; }
.sb-stores__links a { color: var(--sb-white); text-decoration: underline; text-decoration-color: var(--sb-line); text-underline-offset: .2em; }
.sb-stores__links a:hover { text-decoration-color: var(--sb-brand); }

/* Carte */
.sb-stores__map .leaflet-container { background: var(--sb-black-3); font-family: var(--sb-font); }
.sb-marker { width: 12px; height: 12px; border-radius: 50%; background: var(--sb-paper); border: 2px solid var(--sb-black); box-sizing: border-box; transition: transform .3s var(--sb-ease), background .3s var(--sb-ease); }
.sb-marker.is-active { background: var(--sb-brand); transform: scale(1.5); }
.sb-marker--me { background: var(--sb-brand); border-color: #fff; }
.sb-stores__map .leaflet-popup-content-wrapper { border-radius: 0; background: var(--sb-black); color: var(--sb-white); box-shadow: none; border: 1px solid var(--sb-line); }
.sb-stores__map .leaflet-popup-tip { background: var(--sb-black); box-shadow: none; }
.sb-stores__map .leaflet-popup-content { margin: 14px 18px; font-size: .95rem; line-height: 1.4; }
.sb-stores__map .leaflet-popup-content strong { display: block; margin-bottom: .25rem; font-weight: 500; }
.sb-stores__map .leaflet-popup-content a { color: var(--sb-white); text-decoration: underline; text-underline-offset: .2em; }
.sb-stores__map .leaflet-popup-close-button { color: var(--sb-grey); }
.sb-stores__map .leaflet-control-zoom a { border-radius: 0 !important; background: var(--sb-black); color: var(--sb-white); border-color: var(--sb-line); }
.sb-stores__map .leaflet-control-zoom a:hover { background: var(--sb-black-3); }
.sb-stores__map .leaflet-bar { border: 1px solid var(--sb-line); box-shadow: none; }
.sb-stores__map .leaflet-control-attribution { background: rgba(11,11,11,.8); color: var(--sb-grey); font-size: 11px; }
.sb-stores__map .leaflet-control-attribution a { color: var(--sb-grey); }
@media (prefers-reduced-motion: reduce) { .sb-marker, .sb-stores__select::before, .sb-stores__near { transition: none; } }

/* Fond de carte OpenStreetMap (sans clé) passé en sombre : inversion + désaturation des tuiles seulement */
.leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(0.72) contrast(1.15); }
.leaflet-container { background: var(--sb-black-2); }
/* Croix d'effacement du champ de recherche : couleur de marque (remplace le bouton natif bleu du navigateur) */
.sb-stores__input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-left: .5rem; cursor: pointer; background: var(--sb-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sb-stores__input { accent-color: var(--sb-brand); caret-color: var(--sb-brand); }
