/* ───────────────────────────────────────────── */
/*                 FONTS SMBG                    */
/* ───────────────────────────────────────────── */
@font-face {
    font-family: 'Futura';
    src: url('assets/fonts/FuturaLT.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Empêche totalement tout flash / fond visible */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: transparent !important;
    font-family: 'Futura', sans-serif;
}

/* ───────────────────────────────────────────── */
/*                VOLET GAUCHE                   */
/* ───────────────────────────────────────────── */
#sidebar-left {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 275px;
    background-color: #04253d;
    color: #E1782C;
    padding: 10px;
    overflow: hidden;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #sidebar-left {
        width: 240px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #sidebar-left {
        width: 210px;
    }
}

#sidebar-left .sidebar-inner {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 40px;
}
#sidebar-left .sidebar-inner::-webkit-scrollbar { width: 0; }

/* LOGO SMBG */
#logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 25px;
    text-align: center;
}

#logo-smbg {
    width: 161px;
    height: auto;
    display: block;
    transform: translateX(-25px);
}

/* COMPTEUR */
#compteur-annonces {
    font-size: 17px;
    font-weight: bold;
    color: #E1782C;
    margin-top: 2px;
    margin-bottom: 6px;
}

/* LIGNE DE SÉPARATION */
.separator-smbg {
    width: 230px;
    height: 1px;
    background-color: rgba(225,120,44,0.45);
    margin: 0 auto 15px auto;
}

/* BLOCS & TITRES */
.filter-block,
.slider-block {
    max-width: 230px;
    margin-left: auto;
    margin-right: auto;
}

.filter-title {
    font-size: 16px;
    font-weight: bold;
    color: #E1782C;
    margin-top: 16px;
    margin-bottom: 8px;
    text-align: left;
}

/* CHECKBOXES */
.checkbox-line {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.checkbox-line label {
    margin-left: 6px;
    color: #E1782C;
    cursor: pointer;
}

/* ✔ DÉCALAGE DES DÉPARTEMENTS */
.departement-indent {
    margin-left: 15px !important;
}

.departements-container {
    margin-left: 5px;
}

/* SLIDERS */
.slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.biglot-label {
    font-size: 14px;
    color: #E1782C;
    display: flex;
    align-items: center;
    gap: 4px;
}

.slider-block { 
    margin-bottom: 18px;
}

.slider-values {
    color: #E1782C;
    font-size: 14px;
    font-weight: bold;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 22px;
}

.slider-track input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: none;
    position: absolute;
    top: 8px;
    margin: 0;
    pointer-events: none;
}

.slider-track::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(198,123,66,0.4);
    border-radius: 100px;
}

.slider-track input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #E1782C;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #04253d;
    cursor: pointer;
    pointer-events: all !important;
    margin-top: -5px;
}

.slider-track input[type="range"]::-moz-range-thumb {
    background: #E1782C;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #04253d;
    cursor: pointer;
    pointer-events: all !important;
}

/* BOUTON RESET */
#btn-reset {
    width: 230px;
    padding: 10px;
    background-color: #E1782C;
    color: #04253d;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    margin-top: 25px;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ───────────────────────────────────────────── */
/*                     CARTE                     */
/* ───────────────────────────────────────────── */
#map-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 275px;
    right: 0;
    background: transparent !important;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #map-container {
        left: 240px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #map-container {
        left: 210px;
    }
}

#map {
    width: 100%;
    height: 100%;
    background: transparent !important;
}

.leaflet-container {
    background: #d8d8d8 !important;
}

/* ✔ PINS — VERSION CORRIGÉE */
.smbg-pin {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #04253d;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-family: 'Futura';
}

.smbg-pin div {
    pointer-events: none !important;
    font-weight: bold;
    color: white;
    font-size: 13px;
}

.smbg-pin-selected {
    border-color: #E1782C !important;
}

.leaflet-marker-pane {
    z-index: 600 !important;
}

.leaflet-marker-icon * {
    pointer-events: none !important;
}

/* ───────────────────────────────────────────── */
/*                 VOLET DROIT                   */
/* ───────────────────────────────────────────── */

#sidebar-right {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 325px;

    background-color: #04253d;
    color: #E1782C;
    padding: 10px;
    overflow: hidden;

    transform: translateX(100%);
    transition: transform 0.35s ease;

    z-index: 2000;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #sidebar-right {
        width: 280px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #sidebar-right {
        width: 240px;
    }
}

#sidebar-right.open {
    transform: translateX(0%);
}

#sidebar-right .sidebar-inner {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 140px;
    scrollbar-width: none;
}

#sidebar-right .sidebar-inner::-webkit-scrollbar {
    width: 0;
}

#ref-annonce {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #ref-annonce {
        font-size: 22px;
    }

    .info-line {
        font-size: 13px;
        padding: 6px 0;
    }

    .btn-maps {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #ref-annonce {
        font-size: 20px;
    }

    .info-line {
        font-size: 12px;
        padding: 5px 0;
    }

    .btn-maps {
        font-size: 12px;
        padding: 5px 8px;
    }
}

.info-line {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(198,123,66,0.4);
}

.info-line-no-border {
    border-bottom: none !important;
}

.info-key {
    width: 40%;
    font-weight: bold;
}

.info-value {
    width: 60%;
}

.btn-maps {
    background-color: #E1782C;
    color: #04253d;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 60%;
    margin-left: 40%;
    margin-top: 6px;
    font-weight: bold;
}

/* ───────────────────────────────────────────── */
/*                 CARROUSEL BAS                 */
/* ───────────────────────────────────────────── */

#carousel-wrapper {
    position: fixed;
    bottom: 20px;

    left: calc(275px + 12px);
    right: calc(325px + 30px);

    height: 160px;

    z-index: 2000;

    align-items: center;
    justify-content: center;

    display: none;
}

@media (max-width: 1500px) {
    #carousel-wrapper {
        height: 140px;
        left: calc(240px + 12px);
        right: calc(280px + 30px);
    }
}

@media (max-width: 1300px) {
    #carousel-wrapper {
        height: 120px;
        left: calc(210px + 12px);
        right: calc(240px + 30px);
    }
}

#photo-carousel {
    height: 150px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;

    padding-left: 20px;
    padding-right: 20px;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #photo-carousel {
        height: 130px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #photo-carousel {
        height: 110px;
    }
}

#photo-carousel::-webkit-scrollbar {
    display: none;
}

#photo-carousel img {
    height: 140px;
    margin-right: 10px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    position: relative;
    top: 6px;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #photo-carousel img {
        height: 120px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #photo-carousel img {
        height: 100px;
    }
}

#photo-carousel img:hover {
    outline: 3px solid #E1782C;
    box-shadow: 0 0 10px rgba(225,120,44,0.6);
}

#carousel-wrapper::before,
#carousel-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2100;
    pointer-events: none;
}

#carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

#carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

.car-arrow {
    position: absolute;
    width: 42px;
    height: 42px;
    background: #E1782C;
    color: #04253d;
    font-size: 22px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
}

#carousel-left  { left: -20px; }
#carousel-right { right: -20px; }

/* ───────────────────────────────────────────── */
/*               ZOOM PLEIN ÉCRAN                */
/* ───────────────────────────────────────────── */

#photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#photo-lightbox .lightbox-inner {
    position: relative;
}

#photo-lightbox img#lightbox-image {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}


/* ───────────────────────────────────────────── */
/*                MODULE ENSEIGNES               */
/* ───────────────────────────────────────────── */

#module-enseignes {
    position: absolute;
    top: 20px;
    left: 20px;

    width: 270px;
    background: rgba(5, 38, 61, 0.95);
    backdrop-filter: blur(4px);

    border-radius: 14px;
    padding: 16px;

    box-shadow: 0 10px 28px rgba(0,0,0,0.35);

    color: #E1782C;
    font-family: 'Futura', sans-serif;

    z-index: 550;
    display: none;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    #module-enseignes {
        width: 240px;
        padding: 12px;
    }

    .module-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    #search-enseigne,
    #search-activite {
        font-size: 13px;
        padding: 8px 10px;
    }

    .distance-label {
        font-size: 13px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    #module-enseignes {
        width: 220px;
        padding: 10px;
    }

    .module-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    #search-enseigne,
    #search-activite {
        font-size: 12px;
        padding: 7px 9px;
    }

    .distance-label {
        font-size: 12px;
    }
}

/* ───────────── TITRE ───────────── */

.module-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* ───────────── STRUCTURE INTERNE ───────────── */

.module-search,
.module-distance,
#selected-enseignes,
#selected-activites {
    width: 100%;
}

.search-label,
.distance-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.module-search {
    position: relative;
    margin-bottom: 20px;
}

.module-distance {
    margin-top: 18px;
}

/* ───────────── INPUTS ───────────── */

#search-enseigne,
#search-activite {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;
    border-radius: 8px;

    border: none;
    outline: none;

    font-size: 14px;
    font-family: 'Futura', sans-serif;

    background: #f2f2f2;
    color: #04253d;
}

#search-enseigne:focus,
#search-activite:focus {
    background: #ffffff;
}

/* ───────────── AUTOCOMPLETE ───────────── */

#autocomplete-enseigne,
#autocomplete-activite {
    position: relative;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 5;
}

.autocomplete-item {
    padding: 8px 10px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #f2f2f2;
}

/* ───────────── TAGS SÉLECTIONNÉS ───────────── */

.selected-item {
    background: #E1782C;
    color: #04253d;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.selected-item span.remove {
    cursor: pointer;
    font-weight: bold;
}

/* ───────────── SLIDER DISTANCE ───────────── */

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 32px;
}

/* Track */
#distance-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(225,120,44,0.35);
    border-radius: 2px;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

/* Chrome thumb */
#distance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #E1782C;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    margin-top: -7px;
}

/* Firefox thumb */
#distance-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #E1782C;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Firefox track */
#distance-slider::-moz-range-track {
    height: 4px;
    background: rgba(225,120,44,0.35);
    border-radius: 2px;
}

/* ───────────── POINTS ───────────── */

.distance-dots {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: auto;
    z-index: 2;
}

.distance-dots span {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #E1782C;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.15s ease;

    pointer-events: auto;
    z-index: 3;
}

.distance-dots span:hover {
    transform: translate(-50%, -50%) scale(1.25);
}

/* Alignement exact bord gauche / bord droit */
.distance-dots span:nth-child(1) { left: 0%; transform: translate(0, -50%); }
.distance-dots span:nth-child(2) { left: 33.33%; }
.distance-dots span:nth-child(3) { left: 66.66%; }
.distance-dots span:nth-child(4) { left: 100%; transform: translate(-100%, -50%); }

/* ───────────── LABELS ───────────── */

.distance-values {
    position: relative;
    width: 100%;
    margin-top: 10px;
    font-size: 12px;
}

/* 💻 Laptop */
@media (max-width: 1500px) {
    .distance-values {
        font-size: 11px;
    }
}

/* 💻 Petit laptop */
@media (max-width: 1300px) {
    .distance-values {
        font-size: 10px;
    }
}

.distance-values span {
    position: absolute;
    white-space: nowrap;
    transform: translateX(-50%);
}

.distance-values span:nth-child(1) { left: 0%; transform: translateX(0); }
.distance-values span:nth-child(2) { left: 33.33%; }
.distance-values span:nth-child(3) { left: 66.66%; }
.distance-values span:nth-child(4) { left: 100%; transform: translateX(-100%); }

/* ───────────── BOUTON RESET ───────────── */

.btn-launch-retail {
    width: 100%;
    margin-top: 45px;
    padding: 9px 12px;
    background: #C67B42;
    border: none;
    border-radius: 6px;
    color: #04253d;
    font-family: 'Futura';
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-reset-enseignes {
    width: 100%;
    margin-top: 30px;
    padding: 9px 12px;

    background: #E1782C;
    border: none;
    border-radius: 6px;

    color: #04253d;
    font-family: 'Futura', sans-serif;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: 0.2s ease;
}

.btn-reset-enseignes:hover {
    opacity: 0.85;
}

/* ───────────── COMPTEUR ───────────── */

#enseigne-count {
    margin-top: 14px;
    font-size: 13px;
}

/* ============================================================
   RETAIL MODULE – LOADER + HIERARCHIE
   ============================================================ */

/* ───────────── LOADER BAR ───────────── */

#retail-loader {
    position: relative;
    width: 100%;
    height: 3px;
    margin-bottom: 12px;
    overflow: hidden;
    display: none;
}

#retail-loader.active {
    display: block;
}

#retail-loader::before {
    content: "";
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #E1782C;
    animation: retailLoading 1s linear infinite;
}

@keyframes retailLoading {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* ───────────── ACCORDION GROUP ───────────── */

.retail-group {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(225,120,44,0.25);
    padding-bottom: 6px;
}

.retail-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0;
}

.retail-group-header span.arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.retail-group.open .retail-group-header span.arrow {
    transform: rotate(90deg);
}

.retail-subgroups {
    display: none;
    margin-top: 6px;
    margin-left: 8px;
}

.retail-group.open .retail-subgroups {
    display: block;
}

.retail-subgroups label {
    display: flex;
    align-items: center;
    font-size: 13px;
    margin-bottom: 4px;
    cursor: pointer;
}

.retail-subgroups input {
    margin-right: 6px;
}

/* ───────────── COULEUR DOT ───────────── */

.retail-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* ============================================================
   RETAIL DROPDOWN + LOADER
   ============================================================ */

/* Wrapper pour positionnement relatif */
.retail-activity-wrapper {
    position: relative;
}

/* Dropdown */
.retail-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}

.retail-dropdown.open {
    display: block;
}

/* Loader */
#retail-loader {
    position: relative;
    width: 100%;
    height: 3px;
    margin-bottom: 10px;
    overflow: hidden;
    display: none;
}

#retail-loader.active {
    display: block;
}

#retail-loader::before {
    content: "";
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #E1782C;
    animation: retailLoading 1s linear infinite;
}

@keyframes retailLoading {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* Accordion */
.retail-group {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 6px;
}

.retail-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0;
}

.retail-group-header span.arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.retail-group.open .retail-group-header span.arrow {
    transform: rotate(90deg);
}

.retail-subgroups {
    display: none;
    margin-top: 6px;
    margin-left: 8px;
}

.retail-group.open .retail-subgroups {
    display: block;
}

.retail-subgroups label {
    display: flex;
    align-items: center;
    font-size: 13px;
    margin-bottom: 4px;
    cursor: pointer;
}

.retail-subgroups input {
    margin-right: 6px;
}

.retail-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* =========================
   MODULE TITLE BAR
========================= */

.module-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 6px 0;
    cursor: default;
}

.module-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================
   SPINNER
========================= */

.loader-inline {
    width: 14px;
    height: 14px;

    border: 2px solid rgba(255,255,255,0.25);
    border-top: 2px solid #E1782C;

    border-radius: 50%;
    animation: spin 0.8s linear infinite;

    margin-left: 22px;   /* 🔥 plus d’espace visuel */
    display: none;
}

.loader-inline.active {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   TOGGLE BUTTON
========================= */

.toggle-retail {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    padding: 0 6px;
}

/* =========================
   COLLAPSE MODULE
========================= */

#module-enseignes.collapsed .module-search,
#module-enseignes.collapsed .module-distance,
#module-enseignes.collapsed #selected-activites,
#module-enseignes.collapsed #selected-enseignes,
#module-enseignes.collapsed #enseigne-count {
    display: none;
}

/* =========================
   AUTOCOMPLETE ENSEIGNE
========================= */

.autocomplete-dropdown {
    position: relative;
    background: #0b2c3d;
    border: 1px solid #1f4558;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
    z-index: 1000;
}

.autocomplete-item {
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
}

.autocomplete-item:hover {
    background: #1f4558;
}

.selected-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
