/* Styles pour les passages à niveau */

/* Marqueurs PN */
.pn-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.pn-icon {
    background: transparent !important;
    border: none !important;
}

/* Clusters */
.pn-cluster {
    background-color: #3b82f6;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.pn-cluster div {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.pn-cluster-small {
    background-color: #22c55e;
}

.pn-cluster-medium {
    background-color: #f59e0b;
}

.pn-cluster-large {
    background-color: #ef4444;
}

.cluster-warning {
    background-color: #f59e0b !important;
}

.cluster-danger {
    background-color: #ef4444 !important;
}

/* Popup PN */
.pn-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.pn-popup-content {
    padding: 15px;
}

.pn-popup-content h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* Loader */
.pn-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Bouton toggle PN */
#toggle-pn {
    background-color: #6366f1;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}

#toggle-pn:hover {
    background-color: #4f46e5;
}

#toggle-pn.active {
    background-color: #4f46e5;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background-color: #22c55e;
}

.notification-error {
    background-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Légende PN */
.pn-legend {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 14px;
    z-index: 2000;
}

.pn-legend-title {
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e5e7eb;
}

.pn-legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.pn-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
