/* ==========================================================================
   Store Locator — design polished
   Palette : #00a19a (teal) · #ee7203 (orange) · #1a2243 (dark) · #5a6378 (mid)
   ========================================================================== */

.store-locator-section {
    padding: 56px 0;
}

.store-locator-warning {
    background: #fff8e6;
    border: 1px solid #f5d97a;
    color: #6b5018;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}
.store-locator-warning a { color: #6b5018; text-decoration: underline; }

/* ---------- Container ---------- */
.store-locator {
    display: grid;
    grid-template-columns: 400px 1fr;
    height: 75vh;
    min-height: 580px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 40px rgba(26,34,67,0.08),
                0 2px 6px rgba(26,34,67,0.04);
}


/* ---------- Sidebar ---------- */
.store-locator__sidebar {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #eef0f5;
    min-width: 0;
}

/* Search */
.store-locator__search {
    padding: 18px 20px;
    border-bottom: 1px solid #eef0f5;
    background: #fff;
    position: relative;
}
.store-locator__search-icon {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #8a93a7;
    pointer-events: none;
}
.store-locator__search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #e0e3eb;
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fc;
    color: #1a2243;
    box-sizing: border-box;
    transition: all .2s ease;
}
.store-locator__search input::placeholder { color: #8a93a7; }
.store-locator__search input:focus {
    outline: none;
    border-color: #00a19a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,161,154,0.12);
}

/* Custom scrollbar */
.store-locator__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: 70vh;
    scrollbar-width: thin;
    scrollbar-color: #cdd2dd transparent;
    padding-bottom: 20px;
}
.store-locator__list::-webkit-scrollbar { width: 8px; }
.store-locator__list::-webkit-scrollbar-track { background: transparent; }
.store-locator__list::-webkit-scrollbar-thumb {
    background: #cdd2dd;
    border-radius: 4px;
    border: 2px solid #fff;
}
.store-locator__list::-webkit-scrollbar-thumb:hover { background: #00a19a; }


/* ---------- Item ---------- */
.store-locator__item {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f1f5;
    cursor: pointer;
    transition: background .2s ease, padding-left .2s ease;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    border-left: 3px solid transparent;
}
.store-locator__item:hover {
    background: #f8fcfb;
}
.store-locator__item.is-active {
    background: #00a19a0d;
    border-left-color: #00a19a;
}
.store-locator__item-body {
    flex: 1;
    min-width: 0;
}

/* Photos thumb */
.sl-photos--thumb {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef0f5;
    box-shadow: 0 2px 8px rgba(26,34,67,0.06);
}
.sl-photos--thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Titre */
.store-locator__item-title {
    font-weight: 700;
    margin: 0 0 6px;
    font-size: 15px;
    color: #1a2243;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Adresse avec icône */
.store-locator__item-address {
    margin: 0 0 10px;
    font-size: 13px;
    color: #5a6378;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.store-locator__item-address svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    margin-top: 3px;
    color: #8a93a7;
}

/* Meta (téléphone + liens) avec icônes */
.store-locator__item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 13px;
    align-items: center;
}
.store-locator__item-meta a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ee7203;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s ease;
}
.store-locator__item-meta a svg {
    width: 13px;
    height: 13px;
}
.store-locator__item-meta a:hover {
    color: #c95a00;
}
.store-locator__item-meta .sl-phone {
    color: #1a2243;
    font-weight: 700;
}
.store-locator__item-meta .sl-phone:hover { color: #00a19a; }

/* ---------- Horaires (active uniquement dans sidebar) ---------- */
.store-locator__item-hours {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e0e3eb;
}
.store-locator__item.is-active .store-locator__item-hours {
    display: block;
}

/* Horaires structurés (ancienne entité) */
.sl-hours {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sl-hours__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 12.5px;
}
.sl-hours__day {
    color: #1a2243;
    font-weight: 600;
    min-width: 70px;
}
.sl-hours__times {
    color: #5a6378;
    text-align: right;
    font-size: 11.5px;
}
.sl-hours__row--closed .sl-hours__day,
.sl-hours__row--closed .sl-hours__times {
    color: #b0b6c4;
    font-style: italic;
    font-weight: normal;
}

/* Horaires libres (Memo) — affichés en grille jour/horaires */
.sl-hours-raw {
    font-size: 12.5px;
    color: #1a2243;
}
.sl-hours-raw__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}
.sl-hours-raw__day {
    font-weight: 600;
    color: #1a2243;
    flex-shrink: 0;
}
.sl-hours-raw__times {
    color: #5a6378;
    text-align: right;
    font-size: 11.5px;
    line-height: 1.5;
}
.sl-hours-raw__row--full {
    color: #5a6378;
    padding: 2px 0;
}

/* ---------- No results ---------- */
.store-locator__no-results {
    padding: 32px 20px;
    text-align: center;
    color: #8a93a7;
    font-style: italic;
}
.store-locator__loading {
    padding: 24px 20px;
    text-align: center;
    color: #5a6378;
    font-size: 13px;
    font-style: italic;
}
/* Bandeau "Aucun magasin à X. Voici les plus proches" */
.store-locator__hint {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin: 12px 16px;
    background: linear-gradient(135deg, #fff8ee 0%, #fef0d9 100%);
    border: 1px solid #f0d28a;
    border-left: 4px solid #ee7203;
    border-radius: 12px;
    list-style: none;
    box-shadow: 0 2px 8px rgba(238,114,3,0.08);
    animation: knSlideIn .25s ease-out;
}
.store-locator__hint-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ee7203;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.store-locator__hint-icon svg {
    width: 18px;
    height: 18px;
}
.store-locator__hint-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.store-locator__hint-title {
    color: #1a2243;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.store-locator__hint-sub {
    color: #6b5018;
    font-size: 12.5px;
    line-height: 1.4;
}
.store-locator__hint-sub strong {
    color: #ee7203;
    font-weight: 700;
}

@keyframes knSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Badge distance — pill teal en haut à droite de l'item */
.store-locator__item.has-distance { padding-right: 70px; } /* place pour le badge */

.sl-distance {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #00a19a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px 4px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0,161,154,0.25);
    line-height: 1;
    z-index: 1;
}
.sl-distance svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* ---------- Map ---------- */
.store-locator__map {
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: #e9ecef;
    position: relative;
}
.store-locator__map-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8a93a7;
    font-style: italic;
}

/* ---------- Infowindow Google ---------- */
.sl-iw {
    font-size: 13px;
    max-width: 290px;
    color: #1a2243;
    padding: 4px 2px;
}
.sl-iw h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2243;
    letter-spacing: -0.01em;
}
.sl-iw__address {
    margin: 0 0 10px;
    color: #5a6378;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.sl-iw__address svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    margin-top: 3px;
    color: #8a93a7;
}

/* Gallery photos infowindow */
.sl-photos--gallery {
    display: flex;
    gap: 6px;
    margin: 0 0 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.sl-photos--gallery img {
    width: 130px;
    height: 95px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sl-iw__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 10px 0;
    align-items: center;
    font-size: 12.5px;
}
.sl-iw__links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ee7203;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s ease;
}
.sl-iw__links a svg {
    width: 13px;
    height: 13px;
}
.sl-iw__links a:hover { color: #c95a00; }
.sl-iw__links .sl-phone {
    color: #1a2243;
}
.sl-iw__links .sl-phone:hover { color: #00a19a; }

.sl-iw .sl-hours,
.sl-iw .sl-hours-raw {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e3eb;
}

/* ==========================================================================
   Responsive — Tablet (≤ 900px) + Phone (≤ 480px)
   ========================================================================== */

@media (max-width: 900px) {
    .store-locator-section {
        padding: 32px 0 24px;
        margin-top: 24px; /* dégage le header */
    }

    /* Layout flex column-reverse : map en haut, sidebar (search + list) en bas */
    .store-locator {
        display: flex;
        flex-direction: column-reverse;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 6px 24px rgba(26,34,67,0.08);
    }

    /* Sidebar (sous la map) : sticky search + list */
    .store-locator__sidebar {
        border-right: none;
        border-top: 1px solid #eef0f5;
    }

    /* Search reste sticky en haut du bloc sidebar */
    .store-locator__search {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 14px 16px;
    }
    .store-locator__search-icon { left: 28px; }
    .store-locator__search input { padding: 10px 12px 10px 38px; font-size: 14px; }

    /* Liste compacte sous la map */
    .store-locator__list {
        max-height: 40vh;
        min-height: 280px;
    }

    /* Items plus compacts */
    .store-locator__item {
        padding: 14px 16px;
        gap: 12px;
    }
    .sl-photos--thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }
    .store-locator__item-title { font-size: 14px; }
    .store-locator__item-address { font-size: 12.5px; margin-bottom: 8px; }
    .store-locator__item-meta { font-size: 12.5px; gap: 6px 12px; }

    /* Map : grande (60% écran) au top */
    .store-locator__map {
        height: 60vh;
        min-height: 420px;
    }

    /* Hint plus compact */
    .store-locator__hint {
        margin: 10px 12px;
        padding: 12px 14px;
        gap: 10px;
        border-radius: 10px;
    }
    .store-locator__hint-icon {
        width: 32px;
        height: 32px;
    }
    .store-locator__hint-icon svg { width: 16px; height: 16px; }
    .store-locator__hint-title { font-size: 13px; }
    .store-locator__hint-sub { font-size: 11.5px; }

    /* Badge distance */
    .sl-distance {
        top: 12px;
        right: 12px;
        font-size: 10.5px;
        padding: 3px 8px 3px 6px;
    }
    .sl-distance svg { width: 10px; height: 10px; }
    .store-locator__item.has-distance { padding-right: 58px; }
}

@media (max-width: 480px) {
    .store-locator-section { padding: 24px 0 16px; margin-top: 16px; }

    .store-locator { border-radius: 10px; }

    .store-locator__search { padding: 12px 14px; }

    /* Liste très compacte sous la map */
    .store-locator__list { max-height: 35vh; min-height: 240px; }

    .store-locator__item {
        padding: 12px 14px;
        gap: 10px;
    }
    .sl-photos--thumb {
        width: 56px;
        height: 56px;
        border-radius: 8px;
    }
    .store-locator__item-title { font-size: 13.5px; }
    .store-locator__item-address { font-size: 12px; gap: 5px; }
    .store-locator__item-address svg { width: 12px; height: 12px; margin-top: 2px; }
    .store-locator__item-meta { font-size: 12px; gap: 5px 10px; }
    .store-locator__item-meta a svg { width: 12px; height: 12px; }

    /* Horaires actives */
    .sl-hours__row, .sl-hours-raw__row { font-size: 12px; padding: 3px 0; }
    .sl-hours__day, .sl-hours-raw__day { min-width: 64px; }

    /* Map : ~65% écran */
    .store-locator__map { height: 65vh; min-height: 380px; }

    /* Infowindow */
    .sl-iw { max-width: 250px; }
    .sl-photos--gallery img { width: 110px; height: 80px; }

    /* Hint minimal */
    .store-locator__hint { margin: 8px 10px; padding: 10px 12px; }
    .store-locator__hint-icon { width: 28px; height: 28px; }
    .store-locator__hint-icon svg { width: 14px; height: 14px; }
    .store-locator__hint-title { font-size: 12.5px; }
    .store-locator__hint-sub { font-size: 11px; }

    /* Badge distance compact */
    .sl-distance { top: 10px; right: 10px; font-size: 10px; padding: 2px 6px 2px 5px; }
    .store-locator__item.has-distance { padding-right: 52px; }
}

.gm-style .gm-style-iw-d {
        margin-right: -7px;
}