/**
 * Styles pour la carte interactive des réalisations
 */

/* Container principal */
.atse-map-container {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar gauche avec la liste */
.atse-map-sidebar {
    width: 350px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    height: 600px; /* Hauteur par défaut, sera ajustée par JS */
}

.atse-map-sidebar-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.atse-map-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #303030;
}

.atse-map-count {
    background: #D45F2C;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Liste des réalisations */
.atse-map-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    max-height: calc(100% - 80px); /* Hauteur maximale moins le header */
    scrollbar-width: thin;
    scrollbar-color: #D45F2C #f0f0f0;
}

/* Styles pour la barre de défilement (Webkit) */
.atse-map-sidebar-list::-webkit-scrollbar {
    width: 8px;
}

.atse-map-sidebar-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.atse-map-sidebar-list::-webkit-scrollbar-thumb {
    background: #D45F2C;
    border-radius: 4px;
}

.atse-map-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: #b8512a;
}

.atse-map-list-item {
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.atse-map-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.atse-map-list-item.active {
    border-color: #D45F2C;
    box-shadow: 0 4px 12px rgba(212, 95, 44, 0.2);
}

.atse-map-list-ville {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #303030;
    font-weight: 600;
}

.atse-map-list-details {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.atse-map-list-installateur {
    font-weight: 500;
    color: #303030;
}

.atse-map-list-separator {
    margin: 0 8px;
    color: #ccc;
}

.atse-map-list-puissance {
    color: #666;
}

.atse-map-list-dept {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.atse-dept-landes {
    background: #e3f2fd;
    color: #1976d2;
}

.atse-dept-pays-basque {
    background: #f3e5f5;
    color: #7b1fa2;
}

.atse-dept-gironde {
    background: #fff3e0;
    color: #f57c00;
}

/* Zone de la carte */
.atse-map-wrapper {
    flex: 1;
    position: relative;
}

.atse-map {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Marqueur personnalisé */
.atse-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.atse-marker-pin {
    width: 30px;
    height: 30px;
    background: #D45F2C;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.atse-marker-pin::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Popup de la carte */
.atse-map-popup {
    min-width: 200px;
}

.atse-map-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.atse-map-popup h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #303030;
}

.atse-map-popup p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.atse-map-popup strong {
    color: #303030;
}

/* Responsive */
@media (max-width: 992px) {
    .atse-map-container {
        flex-direction: column;
    }
    
    .atse-map-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .atse-map-wrapper {
        height: 500px;
    }
}

@media (max-width: 576px) {
    .atse-map-sidebar-header {
        padding: 15px;
    }
    
    .atse-map-sidebar-header h3 {
        font-size: 1rem;
    }
    
    .atse-map-list-item {
        padding: 12px;
    }
    
    .atse-map-list-ville {
        font-size: 1rem;
    }
    
    .atse-map-list-details {
        font-size: 0.85rem;
    }
    
    .atse-map-wrapper {
        height: 400px;
    }
}

/* Scrollbar personnalisée pour la liste */
.atse-map-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.atse-map-sidebar-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.atse-map-sidebar-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.atse-map-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}
