/**
 * Styles spécifiques pour les lignes TEC
 * Région Wallonne
 */

/* Styles pour les lignes TEC */
.lignes-tec-layer path {
    cursor: pointer;
    transition: stroke-width 0.2s ease, opacity 0.2s ease;
}

.lignes-tec-layer path:hover {
    stroke-width: 5 !important;
    opacity: 0.9;
    z-index: 1000;
}

/* Animation de chargement pour les lignes TEC */
.lignes-tec-loading {
    position: relative;
}

.lignes-tec-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup personnalisé pour les lignes TEC */
.leaflet-popup-content-wrapper.lignes-tec-popup {
    background: rgba(39, 238, 245, 0.95);
    color: #000;
    border: 2px solid #27EEF5;
    border-radius: 8px;
}

.leaflet-popup-content-wrapper.lignes-tec-popup .leaflet-popup-content {
    font-size: 13px;
    line-height: 1.5;
}

.leaflet-popup-content-wrapper.lignes-tec-popup .leaflet-popup-content strong {
    color: #004d99;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Tooltip pour les lignes TEC */
.lignes-tec-tooltip {
    background: rgba(39, 238, 245, 0.9);
    border: 1px solid #27EEF5;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Indicateur de zone de chargement */
.lignes-tec-bbox-indicator {
    position: absolute;
    pointer-events: none;
    border: 2px dashed rgba(39, 238, 245, 0.5);
    background: rgba(39, 238, 245, 0.1);
    z-index: 400;
}

/* Animation de pulsation pour les nouvelles lignes chargées */
@keyframes ligne-tec-pulse {
    0% {
        stroke-opacity: 0.3;
        stroke-width: 1;
    }
    50% {
        stroke-opacity: 1;
        stroke-width: 4;
    }
    100% {
        stroke-opacity: 1;
        stroke-width: 3;
    }
}

.lignes-tec-layer path.newly-loaded {
    animation: ligne-tec-pulse 0.6s ease-out;
}

/* Styles pour différents types de lignes (si nécessaire) */
.lignes-tec-layer path.ligne-tec-express {
    stroke-dasharray: 10, 5;
}

.lignes-tec-layer path.ligne-tec-local {
    stroke-dasharray: none;
}

/* Overlay d'information de chargement */
.lignes-tec-loading-overlay {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(39, 238, 245, 0.95);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    display: none;
}

.lignes-tec-loading-overlay.visible {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Compteur de lignes chargées */
.lignes-tec-counter {
    position: absolute;
    bottom: 50px;
    right: 80px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    border: 1px solid #27EEF5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 900;
    display: none;
}

.lignes-tec-counter.visible {
    display: block;
}

.lignes-tec-counter-value {
    color: #27EEF5;
    font-weight: bold;
    font-size: 13px;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .lignes-tec-layer path:hover {
        stroke-width: 4 !important;
    }
    
    .lignes-tec-loading-overlay {
        bottom: 60px;
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .lignes-tec-counter {
        bottom: 40px;
        right: 60px;
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .lignes-tec-counter-value {
        font-size: 12px;
    }
    
    .leaflet-popup-content-wrapper.lignes-tec-popup .leaflet-popup-content {
        font-size: 12px;
    }
}