/* ============================================================
   LEAFLET POI BAR — styles
   Fichier à placer dans : css/leaflet-poi-bar.css
   ============================================================ */

/* Root overlay — couvre tout le conteneur de carte */
.lpb-root {
    position: absolute;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
}

/* ---- BARRE CATÉGORIES (état par défaut) ---- */
.lpb-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    pointer-events: all;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid #e8ecf0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
    padding: 6px 10px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 2px;
    min-height: 58px;
    box-sizing: border-box;
}
.lpb-bar::-webkit-scrollbar { display: none; }

.lpb-categories {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.lpb-cat-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
    transition: background 0.15s;
    min-width: 54px;
    color: #4a5568;
    font-family: inherit;
}
.lpb-cat-btn:hover {
    background: #f0f4f8;
}
.lpb-cat-btn.lpb-cat-active {
    background: #edf9f5;
}
.lpb-cat-icon {
    width: 28px;
    height: 28px;
    display: block;
}
.lpb-cat-label {
    font-size: 10px;
    margin-top: 3px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
}

/* ---- BARRE ACTIVE (sous-type chargé) ---- */
.lpb-active-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    pointer-events: all;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid #e8ecf0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
    padding: 10px 16px;
    gap: 10px;
    box-sizing: border-box;
}
.lpb-active-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0,0,0,0.10);
}
.lpb-active-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #263238;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lpb-clear-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #78909c;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.lpb-clear-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* ---- PANNEAU SOUS-CATÉGORIES ---- */
.lpb-subpanel {
    position: absolute;
    bottom: 58px;  /* hauteur de .lpb-bar */
    left: 0;
    right: 0;
    pointer-events: all;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid #e8ecf0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 14px 10px;
    box-sizing: border-box;
    max-height: 50%;
    overflow-y: auto;
}

.lpb-subpanel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.lpb-subpanel-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #263238;
    text-transform: capitalize;
}
.lpb-sub-caticon {
    width: 22px;
    height: 22px;
}
.lpb-icon-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #78909c;
    font-size: 13px;
    transition: all 0.15s;
    flex-shrink: 0;
    font-family: inherit;
}
.lpb-icon-btn:hover {
    background: #f0f4f8;
    border-color: #cbd5e0;
    color: #263238;
}

.lpb-subtypes {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.lpb-sub-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f7f9fb;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.15s;
    font-family: inherit;
}
.lpb-sub-btn:hover {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
    color: #263238;
    transform: translateY(-1px);
}
.lpb-sub-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(0,0,0,0.08);
}

/* ---- AVERTISSEMENT ZOOM ---- */
.lpb-zoom-warning {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 30, 30, 0.75);
    color: #fff;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ---- LOADER ---- */
.lpb-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lpb-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(55, 230, 173, 0.25);
    border-top-color: #37e6ad;
    border-radius: 50%;
    animation: lpb-spin 0.65s linear infinite;
    background: rgba(255,255,255,0.7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 2px;
    box-sizing: border-box;
}
@keyframes lpb-spin {
    to { transform: rotate(360deg); }
}

/* ---- POPUP ---- */
.lpb-popup-wrapper .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.lpb-popup-wrapper .leaflet-popup-content {
    margin: 0;
    width: auto !important;
}
.lpb-popup-wrapper .leaflet-popup-tip-container {
    margin-top: -1px;
}
.lpb-popup {
    padding: 12px 14px 10px;
    min-width: 190px;
    max-width: 280px;
    font-family: inherit;
}
.lpb-popup-meta {
    font-size: 11px;
    color: #90a4ae;
    margin-bottom: 4px;
    font-style: italic;
}
.lpb-popup-name {
    font-size: 15px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 3px;
    line-height: 1.3;
}
.lpb-popup-loc {
    font-size: 12px;
    color: #78909c;
    margin-bottom: 8px;
}
.lpb-popup-price {
    font-size: 13px;
    color: #263238;
    padding: 6px 0 4px;
    border-top: 1px solid #f0f4f8;
}
.lpb-popup-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
    padding-top: 8px;
    border-top: 1px solid #f0f4f8;
    margin-top: 2px;
    transition: color 0.15s;
}
.lpb-popup-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

/* ---- MODE PLEIN ÉCRAN ---- */
/* Leaflet fullscreen place la carte en position:fixed — on s'assure que
   le lpb-root reste contenu et visible */
.leaflet-container:-webkit-full-screen .lpb-root,
.leaflet-container:-moz-full-screen .lpb-root,
.leaflet-container:-ms-fullscreen .lpb-root,
.leaflet-container:fullscreen .lpb-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

/* ---- RESPONSIVE MOBILE ---- */
@media (max-width: 768px) {
    .lpb-cat-label {
        display: none;
    }
    .lpb-cat-btn {
        min-width: 42px;
        padding: 4px 5px;
    }
    .lpb-cat-icon {
        width: 24px;
        height: 24px;
    }
    .lpb-bar {
        min-height: 48px;
        padding: 5px 6px;
    }
    .lpb-subpanel {
        bottom: 48px;
    }
    .lpb-zoom-warning {
        font-size: 11px;
        padding: 6px 12px;
        white-space: normal;
        text-align: center;
        max-width: 80%;
    }
}
