#srm-map-container {
    display: flex;
    height: 600px;
    width: 100%;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

#srm-sidebar {
    width: 380px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    z-index: 1000;
}

#srm-map {
    flex: 1;
    background: #f1f5f9;
}

/* Search Box */
.srm-search-box {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.srm-search-box h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.srm-search-box p {
    margin: 0 0 15px 0;
    color: #64748b;
    font-size: 13px;
}

.srm-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.srm-filter-group {
    flex: 1;
}

.srm-filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
}

.srm-toggle-partner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
}

.srm-toggle-partner label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
}

/* Switch */
.srm-toggle-partner input {
    display: none;
}

.slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

#srm-search-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

#srm-search-btn:hover {
    background: #059669;
}

/* Results List */
#srm-results-count {
    padding: 10px 20px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#srm-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
}

.srm-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.srm-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.srm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.srm-item-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
}

.srm-badge-partner {
    background: #fff7ed;
    color: #c2410c;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.srm-item-loc {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.srm-item-quality {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.srm-item-actions {
    display: flex;
    gap: 10px;
}

.srm-btn-phone {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px 10px 10px 10px !important;
}

.srm-btn-phone {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #d1fae5 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer; /* Ensure pointer for button */
}

.srm-btn-phone:hover {
    border-radius: 10px 10px 10px 10px !important;
}

/* Pagination */
.srm-pagination {
    /* Inline styles handling layout, but we can override or add here */
    padding-bottom: 10px;
}

.srm-page-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    transition: all 0.2s;
}

.srm-page-btn:hover {
    background: #f8fafc;
    color: #10b981;
    border-color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    #srm-map-container {
        flex-direction: column-reverse; /* Map on top, List below often better for mobile, or keep column if list is search-first */
        /* keeping column as requested usually list first for search is okay, but map is key. 
           Let's stick to column logic: List first nicely allows searching before seeing map. */
        flex-direction: column;
        height: auto;
    }
    
    #srm-sidebar {
        width: 100%;
        height: auto;
        /* Limit list height on mobile so user sees map immediately */
        max-height: 60vh;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    #srm-map {
        height: 50vh; /* clearly defined height */
        min-height: 300px;
    }

    /* Stack filters on mobile */
    .srm-filters {
        flex-direction: column;
        gap: 10px;
    }

    .srm-toggle-partner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: center;
    }

    .srm-toggle-partner label {
        justify-content: center;
        margin-bottom: 5px;
    }

    #srm-search-btn {
        width: 100%; /* Full width button on mobile */
        padding: 12px;
    }
}

/* Map Popups */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 280px !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

.srm-map-popup {
    display: flex;
    flex-direction: column;
}

.srm-popup-header {
    background: #f8fafc;
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.srm-partner-popup .srm-popup-header {
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

.srm-popup-header h4 {
    margin: 0 0 5px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a;
}

.srm-popup-badge {
    display: inline-block;
    background: #f97316;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.srm-popup-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.srm-popup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.srm-popup-row .dashicons {
    color: #94a3b8;
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.srm-popup-row a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.srm-popup-row a:hover {
    text-decoration: underline;
}

.srm-popup-siret {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
}

.srm-popup-quality {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.srm-tag-rge, .srm-tag-qualipv {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: white;
}

.srm-tag-rge {
    background: #3b82f6; /* Blue for RGE */
}

.srm-tag-qualipv {
    background: #10b981; /* Green for QualiPV */
}

/* Optionnel : Si tu veux que la carte prenne toute la largeur sans limite mais avec plus de hauteur */
@media (min-width: 2560px) {
    #srm-map-container {
        height: 900px;
    }
}
