/* 
 * Styles pour les popups personnalisables
 * Version 10.0
 */

/* Boutons du popup */
.atl-popup-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 2px;
    flex-shrink: 0;
}

.atl-popup-icon-btn:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Bouton info (toggle excerpt) */
button.atl-popup-icon-btn {
    border: none;
    outline: none;
}

button.atl-popup-icon-btn:active {
    transform: translateY(0);
}

/* Extrait du contenu */
.atl-popup-excerpt {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #555;
    max-height: 150px;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 10px;
    }
    to {
        opacity: 1;
        max-height: 150px;
        padding: 10px;
    }
}

/* Styles pour les popups compacts */
.atl-popup-content-compact {
    padding: 8px;
    min-width: 250px;
}

.atl-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.atl-popup-photo-mini {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.atl-popup-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    font-size: 24px;
}

.atl-popup-nom-compact {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.atl-popup-contact-compact {
    font-size: 13px;
    margin: 5px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.atl-popup-actions-compact {
    display: flex;
    gap: 2px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .atl-popup-content-compact {
        min-width: 220px;
    }
    
    .atl-popup-icon-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        margin: 1px;
    }
    
    .atl-popup-excerpt {
        font-size: 11px;
        max-height: 120px;
    }
    
    .atl-popup-actions-compact {
        gap: 1px;
    }
}

/* Styles pour les leaflet popups */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
}

/* Animation d'ouverture du popup */
.leaflet-popup {
    animation: popupFadeIn 0.3s ease;
}

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

/* Scrollbar personnalisée pour l'extrait */
.atl-popup-excerpt::-webkit-scrollbar {
    width: 6px;
}

.atl-popup-excerpt::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.atl-popup-excerpt::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.atl-popup-excerpt::-webkit-scrollbar-thumb:hover {
    background: #555;
}
