﻿/* ================================
   THEME SYSTEM - DARK/LIGHT MODE
   ================================ */

/* Light theme (default) */
:root {
    --ion-background-color: #ffffff;
    --ion-background-color-rgb: 255, 255, 255;
    --ion-text-color: #000000;
    --ion-text-color-rgb: 0, 0, 0;
    --ion-color-step-50: #f2f2f2;
    --ion-color-step-100: #e6e6e6;
    --ion-color-step-150: #d9d9d9;
    --ion-color-step-200: #cccccc;
    --ion-color-step-250: #bfbfbf;
    --ion-color-step-300: #b3b3b3;
    --ion-color-step-350: #a6a6a6;
    --ion-color-step-400: #999999;
    --ion-color-step-450: #8c8c8c;
    --ion-color-step-500: #808080;
    --ion-color-step-550: #737373;
    --ion-color-step-600: #666666;
    --ion-color-step-650: #595959;
    --ion-color-step-700: #4d4d4d;
    --ion-color-step-750: #404040;
    --ion-color-step-800: #333333;
    --ion-color-step-850: #262626;
    --ion-color-step-900: #1a1a1a;
    --ion-color-step-950: #0d0d0d;
    --ion-toolbar-background: #f8f9fa;
    --ion-toolbar-border-color: #e0e0e0;
    --ion-toolbar-color: #000000;
    --ion-item-background: #ffffff;
    --ion-item-border-color: #e0e0e0;
    --ion-item-color: #000000;
    --ion-placeholder-color: #999999;
    --ion-tab-bar-background: #ffffff;
    --ion-tab-bar-border-color: #e0e0e0;
    --ion-tab-bar-color: #666666;
    --ion-tab-bar-color-selected: #3880ff;
    --ion-card-background: #ffffff;
    --ion-card-color: #000000;
}

/* Light theme (explicit) */
[data-theme="light"] {
    --ion-background-color: #ffffff;
    --ion-background-color-rgb: 255, 255, 255;
    --ion-text-color: #000000;
    --ion-text-color-rgb: 0, 0, 0;
    --ion-color-step-50: #f2f2f2;
    --ion-color-step-100: #e6e6e6;
    --ion-color-step-150: #d9d9d9;
    --ion-color-step-200: #cccccc;
    --ion-color-step-250: #bfbfbf;
    --ion-color-step-300: #b3b3b3;
    --ion-color-step-350: #a6a6a6;
    --ion-color-step-400: #999999;
    --ion-color-step-450: #8c8c8c;
    --ion-color-step-500: #808080;
    --ion-color-step-550: #737373;
    --ion-color-step-600: #666666;
    --ion-color-step-650: #595959;
    --ion-color-step-700: #4d4d4d;
    --ion-color-step-750: #404040;
    --ion-color-step-800: #333333;
    --ion-color-step-850: #262626;
    --ion-color-step-900: #1a1a1a;
    --ion-color-step-950: #0d0d0d;
    --ion-toolbar-background: #f8f9fa;
    --ion-toolbar-border-color: #e0e0e0;
    --ion-toolbar-color: #000000;
    --ion-item-background: #ffffff;
    --ion-item-border-color: #e0e0e0;
    --ion-item-color: #000000;
    --ion-placeholder-color: #999999;
    --ion-tab-bar-background: #ffffff;
    --ion-tab-bar-border-color: #e0e0e0;
    --ion-tab-bar-color: #666666;
    --ion-tab-bar-color-selected: #3880ff;
    --ion-card-background: #ffffff;
    --ion-card-color: #000000;
}

/* Dark theme */
[data-theme="dark"] {
    --ion-background-color: #121212;
    --ion-background-color-rgb: 18, 18, 18;
    --ion-text-color: #ffffff;
    --ion-text-color-rgb: 255, 255, 255;
    --ion-color-step-50: #0d0d0d;
    --ion-color-step-100: #1a1a1a;
    --ion-color-step-150: #262626;
    --ion-color-step-200: #333333;
    --ion-color-step-250: #404040;
    --ion-color-step-300: #4d4d4d;
    --ion-color-step-350: #595959;
    --ion-color-step-400: #666666;
    --ion-color-step-450: #737373;
    --ion-color-step-500: #808080;
    --ion-color-step-550: #8c8c8c;
    --ion-color-step-600: #999999;
    --ion-color-step-650: #a6a6a6;
    --ion-color-step-700: #b3b3b3;
    --ion-color-step-750: #bfbfbf;
    --ion-color-step-800: #cccccc;
    --ion-color-step-850: #d9d9d9;
    --ion-color-step-900: #e6e6e6;
    --ion-color-step-950: #f2f2f2;
    --ion-toolbar-background: #1e1e1e;
    --ion-toolbar-border-color: #333333;
    --ion-toolbar-color: #ffffff;
    --ion-item-background: #1e1e1e;
    --ion-item-border-color: #333333;
    --ion-item-color: #ffffff;
    --ion-placeholder-color: #999999;
    --ion-tab-bar-background: #1e1e1e;
    --ion-tab-bar-border-color: #333333;
    --ion-tab-bar-color: #999999;
    --ion-tab-bar-color-selected: #4c8dff;
    --ion-card-background: #1e1e1e;
    --ion-card-color: #ffffff;
    /* Override Ionic default colors for dark theme */
    --ion-color-light: #1e1e1e;
    --ion-color-light-rgb: 30, 30, 30;
    --ion-color-light-contrast: #ffffff;
    --ion-color-light-contrast-rgb: 255, 255, 255;
    --ion-color-light-shade: #1a1a1a;
    --ion-color-light-tint: #2a2a2a;
    --ion-color-dark: #f4f5f8;
    --ion-color-dark-rgb: 244, 245, 248;
    --ion-color-dark-contrast: #000000;
    --ion-color-dark-contrast-rgb: 0, 0, 0;
    --ion-color-dark-shade: #d7d8da;
    --ion-color-dark-tint: #f5f6f9;
}

/* Apply theme to body */
body {
    background-color: var(--ion-background-color);
    color: var(--ion-text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme support for common elements */
[data-theme="light"] ion-content {
    --background: var(--ion-background-color);
    --color: var(--ion-text-color);
}

[data-theme="light"] ion-header,
[data-theme="light"] ion-toolbar {
    --background: var(--ion-toolbar-background);
    --color: var(--ion-toolbar-color);
    --border-color: var(--ion-toolbar-border-color);
}

[data-theme="light"] ion-item {
    --background: var(--ion-item-background);
    --color: var(--ion-item-color);
    --border-color: var(--ion-item-border-color);
}

[data-theme="light"] ion-card {
    --background: var(--ion-card-background);
    --color: var(--ion-card-color);
}

[data-theme="light"] ion-tab-bar {
    --background: var(--ion-tab-bar-background);
    --border-color: var(--ion-tab-bar-border-color);
    --color: var(--ion-tab-bar-color);
    --color-selected: var(--ion-tab-bar-color-selected);
}

[data-theme="dark"] ion-content {
    --background: var(--ion-background-color);
    --color: var(--ion-text-color);
}

[data-theme="dark"] ion-header,
[data-theme="dark"] ion-toolbar {
    --background: var(--ion-toolbar-background);
    --color: var(--ion-toolbar-color);
    --border-color: var(--ion-toolbar-border-color);
}

[data-theme="dark"] ion-item {
    --background: var(--ion-item-background);
    --color: var(--ion-item-color);
    --border-color: var(--ion-item-border-color);
}

[data-theme="dark"] ion-card {
    --background: var(--ion-card-background);
    --color: var(--ion-card-color);
}

[data-theme="dark"] ion-tab-bar {
    --background: var(--ion-tab-bar-background);
    --border-color: var(--ion-tab-bar-border-color);
    --color: var(--ion-tab-bar-color);
    --color-selected: var(--ion-tab-bar-color-selected);
}

/* ================================
   TABLER ICONS INTEGRATION
   ================================ */

/* Support pour les icônes Tabler avec tabler-icons.min.css */
.tabler-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Classes utilitaires pour les tailles d'icônes Tabler */
.icon-xs {
    font-size: 12px;
}

.icon-sm {
    font-size: 16px;
}

.icon-md {
    font-size: 20px;
}

.icon-lg {
    font-size: 24px;
}

.icon-xl {
    font-size: 32px;
}

/* Intégration optimisée avec ion-icon pour compatibilité */
ion-icon.tabler {
    --ionicon-stroke-width: 2;
}

/* Styles pour les icônes Tabler dans les boutons */
.overlay-btn .ti {
    font-size: inherit;
    line-height: 1;
    color: inherit;
}

.playback-btn .ti {
    font-size: inherit;
    line-height: 1;
    color: inherit;
}

/* Amélioration des icônes Tabler dans les contrôles */
.tab .ti {
    font-size: 18px;
    margin-bottom: 2px;
}

.timeline-marker .ti {
    font-size: 16px;
    color: inherit;
}

.stat-item .ti {
    font-size: 24px;
    margin-bottom: 4px;
}

/* Support pour les icônes Tabler avec différents poids de trait */
.ti-stroke-1 {
    stroke-width: 1;
}

.ti-stroke-2 {
    stroke-width: 2;
}

.ti-stroke-3 {
    stroke-width: 3;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }



/* ================================
   ORIGINAL BLAZOR LOADING (FALLBACK)
   ================================ */

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* History Search Overlay Styles */
.history-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.overlay-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.overlay-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.vehicle-filter {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

.vehicle-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    background: white;
}

.date-row {
    margin-bottom: 16px;
}

    .date-row label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #555;
    }

    /* Styles pour les composants Syncfusion */
    .date-row .e-input-group,
    .date-row .e-date-wrapper {
        width: 100% !important;
    }

        .date-row .e-input-group .e-input {
            padding: 12px !important;
            font-size: 16px !important;
            border-radius: 8px !important;
            border: 1px solid #ddd !important;
        }

            .date-row .e-input-group .e-input:focus {
                border-color: #0071c1 !important;
                box-shadow: 0 0 0 0.2rem rgba(0, 113, 193, 0.25) !important;
            }

.period-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.period-btn {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

    .period-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .period-btn:active {
        background: #dee2e6;
    }

.validate-btn {
    width: 100%;
    padding: 14px;
    background: #0071c1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.2s;
}

    .validate-btn:hover {
        background: #005a9a;
    }

.close-btn {
    width: 100%;
    padding: 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

    .close-btn:hover {
        background: #545b62;
    }

/* Styles pour le dropdown de véhicules */
.vehicle-dropdown-section {
    margin-bottom: 20px;
}

    .vehicle-dropdown-section label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #555;
    }

.vehicle-dropdown .e-input-group,
.vehicle-dropdown .e-ddl {
    width: 100% !important;
}

    .vehicle-dropdown .e-input-group .e-input {
        padding: 12px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        border: 1px solid #ddd !important;
    }

        .vehicle-dropdown .e-input-group .e-input:focus {
            border-color: #0071c1 !important;
            box-shadow: 0 0 0 0.2rem rgba(0, 113, 193, 0.25) !important;
        }

/* Styles pour les éléments du dropdown */
.vehicle-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

    .vehicle-item:last-child {
        border-bottom: none;
    }

.vehicle-brand-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 4px;
    object-fit: contain;
}

.vehicle-info {
    flex: 1;
}

.vehicle-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.vehicle-details {
    font-size: 12px;
    color: #666;
}

/* Styles pour l'en-tête du dropdown */
.dropdown-header {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.header-icon {
    margin-right: 8px;
    font-size: 16px;
}

.header-text {
    font-size: 14px;
}

/* Styles pour la valeur sélectionnée */
.selected-vehicle {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.selected-brand-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 3px;
    object-fit: contain;
}

.selected-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* History Details Header Styles */
.history-details-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    margin: 0 12px;
    min-width: 0; /* Permet la compression */
}

.history-vehicle-info,
.history-period-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    min-width: 0; /* Permet la compression */
}

    .history-vehicle-info ion-icon,
    .history-period-info ion-icon {
        font-size: 16px;
        color: #2DD36F;
        flex-shrink: 0;
    }

.vehicle-name {
    font-weight: 600;
    color: #2DD36F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.period-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Enhanced Floating Playback Controls */
.floating-playback-controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.15);
    /* backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);*/
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 320px;
    max-width: 90vw;
    z-index: 1000;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Legacy playback controls (hidden) */
.playback-controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playback-main-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.playback-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(56, 128, 255, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(56, 128, 255, 0.3);
}

    .playback-btn:hover {
        background: rgba(49, 113, 224, 0.95);
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(56, 128, 255, 0.4);
    }

    .playback-btn:disabled {
        background: rgba(204, 204, 204, 0.6);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.playback-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(224, 224, 224, 0.6);
    backdrop-filter: blur(5px);
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .playback-slider::-webkit-slider-thumb {
        appearance: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(56, 128, 255, 0.95);
        cursor: pointer;
        box-shadow: 0 3px 12px rgba(56, 128, 255, 0.4);
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.2s ease;
    }

        .playback-slider::-webkit-slider-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 16px rgba(56, 128, 255, 0.5);
        }

    .playback-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(56, 128, 255, 0.95);
        cursor: pointer;
        border: 2px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 3px 12px rgba(56, 128, 255, 0.4);
    }

.playback-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    backdrop-filter: blur(5px);
}

.playback-position {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.playback-speed {
    color: rgba(56, 128, 255, 0.9);
    font-weight: 500;
}

.playback-speed-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.speed-btn {
    padding: 8px 14px;
    border: 1px solid rgba(56, 128, 255, 0.6);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: rgba(56, 128, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .speed-btn:hover {
        background: rgba(56, 128, 255, 0.2);
        color: rgba(56, 128, 255, 1);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(56, 128, 255, 0.2);
    }

    .speed-btn.active {
        background: rgba(56, 128, 255, 0.9);
        color: white;
        border-color: rgba(56, 128, 255, 1);
        box-shadow: 0 4px 16px rgba(56, 128, 255, 0.3);
    }

/* Responsive pour le dropdown */
@media (max-width: 480px) {
    .vehicle-brand-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }

    .selected-brand-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }

    .vehicle-name {
        font-size: 13px;
    }

    .vehicle-details {
        font-size: 11px;
    }
}

/* Responsive pour les contrôles de playback */
@media (max-width: 480px) {
    .floating-playback-controls {
        bottom: 60px;
        min-width: 280px;
        padding: 16px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .playback-controls {
        margin: 8px;
        padding: 12px;
    }

    .playback-main-controls {
        gap: 8px;
    }

    .playback-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .playback-info {
        font-size: 11px;
        padding: 6px 10px;
    }

    .playback-speed-controls {
        gap: 6px;
    }

    .speed-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Styles pour les boutons overlay de la carte */
.overlay-btn {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 8px;
}

    .overlay-btn:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* Styles spécifiques pour le bouton de tracé */
    .overlay-btn.path-visible {
        background: rgba(56, 128, 255, 0.9);
        color: white;
        animation: pathPulse 2s infinite;
    }

        .overlay-btn.path-visible:hover {
            background: rgba(56, 128, 255, 1);
            transform: scale(1.05);
        }

    .overlay-btn.path-hidden {
        background: rgba(255, 255, 255, 0.7);
        color: #666;
    }

        .overlay-btn.path-hidden:hover {
            background: rgba(255, 255, 255, 0.9);
            color: #333;
        }

/* Indicateur de statut pour le tracé */
.path-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2dd36f;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(45, 211, 111, 0.3);
}

    .path-indicator.active {
        animation: indicatorPulse 1.5s infinite;
    }

/* Animations */
@keyframes pathPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(56, 128, 255, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(56, 128, 255, 0.5);
    }
}

@keyframes indicatorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Styles pour les contrôles de zoom */
.zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
}

    .zoom-btn:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* Styles pour la carte  co-conduite */
.ecodrive-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.map-legend {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

    .legend-marker.excellent {
        background-color: #2DD36F;
    }

    .legend-marker.good {
        background-color: #FFD500;
    }

    .legend-marker.average {
        background-color: #FF8C00;
    }

    .legend-marker.poor {
        background-color: #FF4444;
    }



/* Styles pour la carte  co-conduite */
.ecodrive-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.map-legend {
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

    .legend-marker.excellent {
        background-color: #2DD36F;
    }

    .legend-marker.good {
        background-color: #FFD500;
    }

    .legend-marker.average {
        background-color: #FF8C00;
    }

    .legend-marker.poor {
        background-color: #FF4444;
    }





[data-theme="dark"] .e-grid .e-headercell {
    background-color: #333333 !important;
    color: #FFFFFF !important;
    border-bottom: 2px solid #F5A623 !important;
}

[data-theme="dark"] .e-grid .e-row {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #444444 !important;
}

    [data-theme="dark"] .e-grid .e-row:hover {
        background-color: #353535 !important;
    }

[data-theme="dark"] .e-grid .e-altrow {
    background-color: #2A2A2A !important;
}

    [data-theme="dark"] .e-grid .e-altrow:hover {
        background-color: #353535 !important;
    }

/* LIGHT THEME - Syncfusion DropDownList */
[data-theme="light"] .e-dropdownlist .e-input-group {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
}

[data-theme="light"] .e-dropdownlist .e-input {
    background-color: transparent !important;
    color: #000000 !important;
}

    [data-theme="light"] .e-dropdownlist .e-input::placeholder {
        color: #666666 !important;
    }

[data-theme="light"] .e-popup {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

[data-theme="light"] .e-list-item {
    background-color: #ffffff !important;
    color: #000000 !important;
}

    [data-theme="light"] .e-list-item:hover {
        background-color: #f5f5f5 !important;
    }

/* LIGHT THEME - Syncfusion Input Groups & Float Inputs */
[data-theme="light"] .e-input-group,
[data-theme="light"] .e-input-group.e-control-wrapper,
[data-theme="light"] .e-float-input,
[data-theme="light"] .e-float-input.e-input-group,
[data-theme="light"] .e-float-input.e-control-wrapper,
[data-theme="light"] .e-float-input.e-input-group.e-control-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

[data-theme="light"] .e-input-group .e-input,
[data-theme="light"] .e-float-input .e-input {
    background-color: transparent !important;
    color: #000000 !important;
}

[data-theme="light"] .e-input-group .e-input::placeholder,
[data-theme="light"] .e-float-input .e-input::placeholder {
    color: #666666 !important;
}

[data-theme="light"] .e-float-text,
[data-theme="light"] .e-label-top,
[data-theme="light"] .e-label-bottom {
    color: #000000 !important;
}

/* DARK THEME - Syncfusion DropDownList */
[data-theme="dark"] .e-dropdownlist .e-input-group {
    background-color: #2C2C2C !important;
    border: 1px solid #555555 !important;
}

[data-theme="dark"] .e-dropdownlist .e-input {
    background-color: transparent !important;
    color: #FFFFFF !important;
}

    [data-theme="dark"] .e-dropdownlist .e-input::placeholder {
        color: #888888 !important;
    }

[data-theme="dark"] .e-popup {
    background-color: #2C2C2C !important;
    border: 1px solid #555555 !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .e-list-item {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

    [data-theme="dark"] .e-list-item:hover {
        background-color: #353535 !important;
    }

/* DARK THEME - Syncfusion Input Groups & Float Inputs */
[data-theme="dark"] .e-input-group,
[data-theme="dark"] .e-input-group.e-control-wrapper,
[data-theme="dark"] .e-float-input,
[data-theme="dark"] .e-float-input.e-input-group,
[data-theme="dark"] .e-float-input.e-control-wrapper,
[data-theme="dark"] .e-float-input.e-input-group.e-control-wrapper {
    background-color: #2C2C2C !important;
    border: 1px solid #555555 !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .e-input-group .e-input,
[data-theme="dark"] .e-float-input .e-input {
    background-color: transparent !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .e-input-group .e-input::placeholder,
[data-theme="dark"] .e-float-input .e-input::placeholder {
    color: #888888 !important;
}

[data-theme="dark"] .e-float-text,
[data-theme="dark"] .e-label-top,
[data-theme="dark"] .e-label-bottom {
    color: #FFFFFF !important;
}

/* Global popup styles that work regardless of theme attribute location */
/* This applies when body or html has the theme data attribute */
body[data-theme="light"] .e-popup,
html[data-theme="light"] .e-popup {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

body[data-theme="light"] .e-list-item,
html[data-theme="light"] .e-list-item {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body[data-theme="light"] .e-list-item:hover,
html[data-theme="light"] .e-list-item:hover {
    background-color: #f5f5f5 !important;
}

/* LIGHT THEME - Global Input Groups & Float Inputs */
body[data-theme="light"] .e-input-group,
body[data-theme="light"] .e-input-group.e-control-wrapper,
body[data-theme="light"] .e-float-input,
body[data-theme="light"] .e-float-input.e-input-group,
body[data-theme="light"] .e-float-input.e-control-wrapper,
body[data-theme="light"] .e-float-input.e-input-group.e-control-wrapper,
html[data-theme="light"] .e-input-group,
html[data-theme="light"] .e-input-group.e-control-wrapper,
html[data-theme="light"] .e-float-input,
html[data-theme="light"] .e-float-input.e-input-group,
html[data-theme="light"] .e-float-input.e-control-wrapper,
html[data-theme="light"] .e-float-input.e-input-group.e-control-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
}

body[data-theme="light"] .e-input-group .e-input,
body[data-theme="light"] .e-float-input .e-input,
html[data-theme="light"] .e-input-group .e-input,
html[data-theme="light"] .e-float-input .e-input {
    background-color: transparent !important;
    color: #000000 !important;
}

body[data-theme="dark"] .e-popup,
html[data-theme="dark"] .e-popup {
    background-color: #2C2C2C !important;
    border: 1px solid #555555 !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .e-list-item,
html[data-theme="dark"] .e-list-item {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .e-list-item:hover,
html[data-theme="dark"] .e-list-item:hover {
    background-color: #353535 !important;
}

/* DARK THEME - Global Input Groups & Float Inputs */
body[data-theme="dark"] .e-input-group,
body[data-theme="dark"] .e-input-group.e-control-wrapper,
body[data-theme="dark"] .e-float-input,
body[data-theme="dark"] .e-float-input.e-input-group,
body[data-theme="dark"] .e-float-input.e-control-wrapper,
body[data-theme="dark"] .e-float-input.e-input-group.e-control-wrapper,
html[data-theme="dark"] .e-input-group,
html[data-theme="dark"] .e-input-group.e-control-wrapper,
html[data-theme="dark"] .e-float-input,
html[data-theme="dark"] .e-float-input.e-input-group,
html[data-theme="dark"] .e-float-input.e-control-wrapper,
html[data-theme="dark"] .e-float-input.e-input-group.e-control-wrapper {
    background-color: #2C2C2C !important;
    border: 1px solid #555555 !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .e-input-group .e-input,
body[data-theme="dark"] .e-float-input .e-input,
html[data-theme="dark"] .e-input-group .e-input,
html[data-theme="dark"] .e-float-input .e-input {
    background-color: transparent !important;
    color: #FFFFFF !important;
}

/* Additional global styles for dropdown elements */
.e-popup .e-list-parent {
    background-color: inherit !important;
}

/* Filter input styles in dropdown */
body[data-theme="light"] .e-filter-parent .e-input,
html[data-theme="light"] .e-filter-parent .e-input {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
}

body[data-theme="dark"] .e-filter-parent .e-input,
html[data-theme="dark"] .e-filter-parent .e-input {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
    border: 1px solid #555555 !important;
}

/* Dropdown header styles */
body[data-theme="light"] .e-list-header,
html[data-theme="light"] .e-list-header {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

body[data-theme="dark"] .e-list-header,
html[data-theme="dark"] .e-list-header {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #555555 !important;
}

/* Force padding 0 sur toutes les cellules Syncfusion */
.e-grid .e-rowcell,
.e-grid .e-headercell {
    padding: 0 !important;
}

/* LIGHT THEME - Syncfusion Grid Content & Selection */
[data-theme="light"] .e-grid .e-content {
    background-color: #ffffff !important;
    color: #000000 !important;
}

[data-theme="light"] .e-grid .e-rowcell {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-right: 1px solid #e0e0e0 !important;
}

[data-theme="light"] .e-grid .e-selectionbackground {
    background-color: #e3f2fd !important;
}

[data-theme="light"] .e-grid .e-active {
    background-color: #bbdefb !important;
    color: #1976d2 !important;
}

[data-theme="light"] .e-grid .e-rowcell.e-selectionbackground {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
}

/* DARK THEME - Syncfusion Grid Content & Selection */
[data-theme="dark"] .e-grid .e-content {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}

[data-theme="dark"] .e-grid .e-rowcell {
    background-color: #2C2C2C !important;
    color: #ffffff !important;
    border-right: 1px solid #444444 !important;
}

[data-theme="dark"] .e-grid .e-selectionbackground {
    background-color: #444444 !important;
}

[data-theme="dark"] .e-grid .e-active {
    background-color: #555555 !important;
    color: #F5A623 !important;
}

[data-theme="dark"] .e-grid .e-rowcell.e-selectionbackground {
    background-color: #444444 !important;
    color: #F5A623 !important;
}

/* Grid Selection Text Colors */
[data-theme="light"] .e-grid .e-row.e-rowselected .e-rowcell {
    color: #1976d2 !important;
    background-color: #e3f2fd !important;
}

[data-theme="dark"] .e-grid .e-row.e-rowselected .e-rowcell {
    color: #F5A623 !important;
    background-color: #444444 !important;
}

/* Non-selected rows text colors */
[data-theme="light"] .e-grid .e-row:not(.e-rowselected) .e-rowcell {
    color: #000000 !important;
    background-color: #ffffff !important;
}

[data-theme="dark"] .e-grid .e-row:not(.e-rowselected) .e-rowcell {
    color: #ffffff !important;
    background-color: #2C2C2C !important;
}

/* Summary row global styles */
[data-theme="light"] .e-grid .summary-row {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    font-weight: bold !important;
    border-top: 2px solid #1976d2 !important;
}

[data-theme="dark"] .e-grid .summary-row {
    background-color: #444444 !important;
    color: #F5A623 !important;
    font-weight: bold !important;
    border-top: 2px solid #F5A623 !important;
}

/* Additional Syncfusion Grid Elements */
/* Light Theme - Additional Elements */
[data-theme="light"] .e-grid .e-gridheader {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #1976d2 !important;
}

[data-theme="light"] .e-grid .e-gridcontent {
    background-color: #ffffff !important;
}

[data-theme="light"] .e-grid .e-table {
    background-color: #ffffff !important;
}

[data-theme="light"] .e-grid .e-emptyrow {
    background-color: #ffffff !important;
    color: #666666 !important;
}

/* Dark Theme - Additional Elements */
[data-theme="dark"] .e-grid .e-gridheader {
    background-color: #1e1e1e !important;
    border-bottom: 2px solid #F5A623 !important;
}

[data-theme="dark"] .e-grid .e-gridcontent {
    background-color: #1e1e1e !important;
}

[data-theme="dark"] .e-grid .e-table {
    background-color: #1e1e1e !important;
}

[data-theme="dark"] .e-grid .e-emptyrow {
    background-color: #2C2C2C !important;
    color: #cccccc !important;
}

/* Hover states for better UX */
[data-theme="light"] .e-grid .e-row:hover:not(.e-rowselected) .e-rowcell {
    background-color: #f5f5f5 !important;
    color: #000000 !important;
}

[data-theme="dark"] .e-grid .e-row:hover:not(.e-rowselected) .e-rowcell {
    background-color: #353535 !important;
    color: #ffffff !important;
}