/* Général */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    display: flex;
    height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Thème clair */
body.light {
    background-color: #f5f5f5;
    color: #333;
}

/* Thème sombre */
body.dark {
    background-color: #181818;
    color: #f5f5f5;
}

body.dark .sidebar {
    background-color: #282828;
    color: #ddd;
}

body.dark .filter-input {
    background-color: #333;
    color: #f5f5f5;
    border: 1px solid #555;
}

body.dark .apply-button {
    background-color: #007bff;
    color: #f5f5f5;
}

body.dark .apply-button:hover {
    background-color: #0056b3;
}

body.dark .compare-button {
    background-color: #28a745;
    color: #f5f5f5;
}

body.dark .compare-button:hover {
    background-color: #218838;
}

body.dark .legend {
    background-color: #333;
    color: #f5f5f5;
    border-color: #555;
}

/* Sidebar */
.sidebar {
    width: 25%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar h1 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #007bff;
}

.sidebar .filter-section {
    margin-bottom: 20px;
}

.sidebar .filter-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.sidebar .filter-input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Boutons */
.apply-button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.apply-button:hover {
    background-color: #0056b3;
}

.compare-button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: white;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.compare-button:hover {
    background-color: #218838;
}

.zone-list {
    margin-top: 10px;
    list-style-type: none;
    padding: 0;
}

.zone-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

/* Carte */
#map {
    width: 75%;
    height: 100%;
    position: relative;
}

/* Légende */
.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.legend h4 {
    margin-top: 0;
    font-size: 16px;
    font-weight: bold;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}

.green {
    background-color: green;
}

.yellow {
    background-color: yellow;
}

.red {
    background-color: red;
}

/* Time control styles */
.time-control {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 400px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2000;
}

.time-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.time-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
}

.time-nav:hover {
    color: #0056b3;
}

.time-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.time-range {
    flex: 1;
    margin: 0 5px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.time-range:hover,
.time-range.active {
    background-color: #007bff;
    color: white;
}

.time-slider-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.time-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    margin-right: 10px;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.live-indicator {
    font-size: 12px;
    color: red;
    font-weight: bold;
}

/* Sidebar header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
    transition: transform 0.3s ease, color 0.3s ease;
}

.toggle-button:hover {
    color: #0056b3;
}

/* Barre de recherche */
.search-bar {
    margin-bottom: 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    outline: none;
}

.search-bar input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

body.dark .search-bar input {
    background-color: #333;
    color: #f5f5f5;
    border: 1px solid #555;
}

/* Section de comparaison */
.comparison-results {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

body.dark .comparison-results {
    background-color: #333;
    border-color: #555;
    color: #f5f5f5;
}

.comparison-results p {
    font-size: 14px;
    margin: 0 0 10px;
}

.comparison-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

body.dark .comparison-card {
    border-color: #555;
}


img {
    width: 40%;
    height: auto;
}

#timeline-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 400px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2000;
}

.time-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.time-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
}

.time-nav:hover {
    color: #0056b3;
}

.time-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.time-range {
    flex: 1;
    margin: 0 5px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.time-range:hover,
.time-range.active {
    background-color: #007bff;
    color: white;
}

.time-slider-container {
    display: flex;
    align-items: center;
    width: 100%;
}

#timeline-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    margin-right: 10px;
}

#timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.live-indicator {
    font-size: 12px;
    color: red;
    font-weight: bold;
}


#controls {

        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        width: 400px;
        font-family: 'Roboto', sans-serif;
        font-size: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 2000;
    
}

#timeline-slider {
    margin: 0 10px;
    width: 200px;
}

#timeline-date {
    font-weight: bold;
}

/* =========================
   Section de comparaison
   ========================= */
   .compare-section select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.compare-section h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #007bff;
}

.compare-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.compare-section input[type="text"],
.compare-section select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.compare-section button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.compare-section button:hover {
    background-color: #218838;
}

.compare-result {
    margin-top: 10px;
    font-size: 14px;
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Mode sombre pour la section comparaison */
body.dark .compare-section input[type="text"],
body.dark .compare-section select {
    background-color: #333;
    color: #f5f5f5;
    border: 1px solid #555;
}

body.dark .compare-result {
    background-color: #333;
    color: #f5f5f5;
    border-color: #555;
}

.filter-input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}
