/* MAIN.CSS - VERSION COMPLÈTE ET PROPRE */
/* Remplacez TOUT le contenu de main.css par ce code */

/* Reset et base */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    position: fixed;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Prevent iOS zoom on input focus */
input[type="text"], input[type="search"], textarea {
    font-size: 16px !important;
}

/* Map container */
#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
}

/* Force Leaflet container sizing */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

/* Leaflet zoom controls repositioning */
.leaflet-control-zoom {
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    z-index: 2000 !important;
}

.leaflet-control-zoom a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Desktop specific fixes */
@media (min-width: 769px) {
    #map {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 1 !important;
    }
    
    body, html {
        position: relative;
        overflow: hidden;
    }
}

/* Animations pour les flux routiers */
.traffic-flow {
    animation: traffic-dash 2s linear infinite;
}

@keyframes traffic-dash {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -20; }
}

/* Routes principales avec effet pointillé clignotant */
.main-roads {
    animation: main-roads-blink 1.5s ease-in-out infinite;
}

@keyframes main-roads-blink {
    0% {
        stroke: #0066ff;
        stroke-opacity: 1;
        stroke-dasharray: 15, 10;
        stroke-dashoffset: 0;
    }
    50% {
        stroke: #00aaff;
        stroke-opacity: 0.7;
        stroke-dasharray: 15, 10;
        stroke-dashoffset: -25;
    }
    100% {
        stroke: #0066ff;
        stroke-opacity: 1;
        stroke-dasharray: 15, 10;
        stroke-dashoffset: -50;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 3px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .leaflet-touch .leaflet-control-zoom-in,
    .leaflet-touch .leaflet-control-zoom-out {
        font-size: 22px !important;
        width: 44px !important;
        height: 44px !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
}