/* style.css - Version redesign avec style gpx_pure_css.html */
:root {
    /* Nouvelle palette de couleurs inspirée de gpx_pure_css.html */
    --strava-orange: #FC4C02;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --orange-600: #ea580c;
    
    /* Couleurs fonctionnelles basées sur la nouvelle palette */
    --color-bg: var(--gray-100);
    --color-sidebar: var(--gray-50);
    --color-primary: var(--gray-900);
    --color-primary-light: var(--gray-700);
    --color-primary-dark: var(--gray-900);
    --color-accent: var(--strava-orange);
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-text: var(--gray-900);
    --color-text-light: var(--gray-600);
    --color-border: var(--gray-300);
    --color-card: #FFFFFF;
    
    /* Espacements inchangés */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Typographie */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-xxl: 1.5rem;
    
    /* Ombres améliorées */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Import de la police Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--color-bg);
    min-height: 100vh;
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Style du Fil d'Ariane (Breadcrumb) */
.breadcrumb {
    padding: 10px 20px;
    background-color: var(--color-bg); 
    margin-bottom: 5px; /* Espace entre le fil et le contenu */
}


.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    font-size: var(--text-sm);
}

.breadcrumb li {
    display: inline;
    margin-right: 8px;
    color: var(--gray-600);
}

.breadcrumb li a {
    color: var(--color-primary); /* Rendre le lien noir ou couleur principale */
    text-decoration: none;
}

.breadcrumb li a:hover {
    text-decoration: underline;
    color: var(--color-accent); /* Utiliser votre couleur d'accentuation (orange Strava) */
}

/* Style du séparateur */
.breadcrumb li:nth-child(even) {
    margin-right: 8px;
}

/* Style de la page actuelle (non cliquable) */
.breadcrumb li span[aria-current="page"] {
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Règle pour l'affichage mobile si nécessaire */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 8px 15px;
    }
}

/* ===== SIDEBAR REDESIGN ===== */
.sidebar {
    background: var(--color-sidebar);
    padding: var(--space-lg);
    overflow-y: auto;
    border-right: 1px solid var(--color-border);
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex-shrink: 0;
    position: relative;
}

.map-container {
    position: relative;
    flex: 1;
    height: 100%;
    min-width: 640px;
}

#map {
    height: 100%;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ===== SECTION UNIFIÉE ===== */
.unified-section {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.unified-section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ===== BOUTON EXPORT REDESIGN ===== */
.export-button-container {
    position: fixed;
    top: 60px; /* Juste un peu plus bas que l'original */
    right: var(--space-md);
    z-index: 1000;
}

.export-button {
    padding: var(--space-md);
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    min-height: 40px;
}

.export-button:hover {
    background: var(--orange-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== INPUT FILE REDESIGN ===== */
.file-input-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    text-align: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.file-input-label:hover {
    background: var(--orange-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== BOUTONS REDESIGN ===== */
.selection-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.operations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.btn {
    padding: var(--space-sm);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: var(--text-sm);
    background: var(--gray-600);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 40px;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--gray-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-400);
    transform: none;
    box-shadow: none;
}

.btn-info {
    background: var(--color-accent);
}

.btn-info:hover {
    background: var(--orange-600);
}

/* Bouton POI - Violet (seulement quand actif) */
#poi-btn:not(:disabled) {
    background: #9F7AEA;
}

#poi-btn:not(:disabled):hover {
    background: #805AD5;
}

/* Bouton Simuler - Bleu (seulement quand actif) */
#simulator-btn:not(:disabled) {
    background: #4299E1;
}

#simulator-btn:not(:disabled):hover {
    background: #3182CE;
}

/* Bouton Pente - Cyan/Turquoise */
#slope-btn {
    background: #0BC5EA;
}

#slope-btn:hover {
    background: #00B5D8;
}

/* Bouton Tout sélectionner/désélectionner - Orange foncé */
#select-all-btn {
    background: #D69E2E;
}

#select-all-btn:hover {
    background: #B7791F;
}

.btn-primary {
    background: var(--gray-800);
}

.btn-primary:hover {
    background: var(--gray-900);
}

.btn-secondary {
    background: var(--gray-500);
}

.btn-secondary:hover {
    background: var(--gray-600);
}

.btn-danger {
    background: var(--color-danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: var(--color-success);
}

.btn-success:hover {
    background: #047857;
}

/* ===== STYLES POUR LA VISUALISATION DES PENTES ===== */
.btn-active {
    box-shadow: 0 0 0 3px rgba(11, 197, 234, 0.4) !important;
    background: #0BC5EA !important;
    color: white !important;
}

#geolocation-btn.btn-active {
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.4) !important;
    background: #38A169 !important;
}

.btn-active:hover {
    background: #00B5D8 !important;
}

/* État actif spécifique pour le bouton pente */
#slope-btn.btn-active {
    box-shadow: 0 0 0 3px rgba(11, 197, 234, 0.4) !important;
    background: #00B5D8 !important;
}

#slope-btn.btn-active:hover {
    background: #0097A7 !important;
}

/* Styles pour les tooltips de pente */
.slope-tooltip {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 12px;
    padding: 8px;
    backdrop-filter: blur(5px);
}

.slope-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Légende pour les pentes */
/* LÃ©gende pour les pentes */
.slope-legend {
    position: absolute;
    bottom: 80px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 1000;
    backdrop-filter: blur(10px);
    max-width: 200px;
}

/* LÃ©gende pentes - Mode mobile/tablette */
@media (max-width: 1200px) {
    .slope-legend {
        position: fixed;
        bottom: calc(var(--mobile-dock-height) + var(--mobile-profile-height));
        left: 0;
        right: 0;
        max-width: 100vw;
        width: 100vw;
        border-radius: 16px 16px 0 0;
        z-index: 899;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
        padding: 16px;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .slope-legend h4 {
        text-align: center;
        margin-bottom: 12px;
        font-size: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .slope-legend h4::after {
        content: 'Ã—';
        font-size: 24px;
        cursor: pointer;
        font-weight: 400;
        color: var(--gray-600);
    }
}

@media (max-width: 767px) {
    .slope-legend {
        bottom: var(--mobile-dock-height);
    }
    
    .slope-legend-item {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .slope-color-box {
        width: 24px;
        height: 14px;
    }
}

.slope-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
}

.slope-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 11px;
}

.slope-color-box {
    width: 20px;
    height: 12px;
    margin-right: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== LISTE DES TRACES REDESIGN ===== */
.track-list {
    max-height: 800px; /* Augmenté de 240px à 400px */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.track-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.track-item:hover {
    background: var(--gray-50);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-accent);
}

.track-item.selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(252, 76, 2, 0.2);
    background: rgba(252, 76, 2, 0.05);
}

.track-name {
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.track-stats {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    display: flex;
    gap: var(--space-md);
}

/* ===== PANEAU STATS REDESIGN ===== */
.stats-panel {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: var(--space-md);
    margin-top: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
}

.stat-label {
    color: var(--color-text-light);
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: var(--color-primary);
}

/* ===== BOUTON GÉOLOCALISATION MOBILE ===== */
.geolocation-btn-mobile {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: var(--color-primary);
    font-size: 24px;
    display: none; /* Caché par défaut sur desktop */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.geolocation-btn-mobile:hover {
    background: white;
    color: var(--color-accent);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.geolocation-btn-mobile.btn-active {
    background: #38A169;
    color: white;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.4);
}

.geolocation-btn-mobile.btn-active:hover {
    background: #2F855A;
}

/* ===== CONTROLES OVERLAY REDESIGN ===== */
.controls-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.overlay-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-sm);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    backdrop-filter: blur(10px);
}

.overlay-btn:hover {
    background: white;
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

/* ===== TOAST REDESIGN ===== */
.toast {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--color-success);
    backdrop-filter: blur(10px);
    max-width: 400px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}


/* Styles pour le routing OSRM */
.routing-overlay {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    border: 1px solid #e2e8f0;
}

/* Mobile : bandeau ultra-compact au-dessus du dock */
@media (max-width: 767px) {
    .routing-overlay {
        position: fixed;
        bottom: var(--mobile-dock-height);
        left: 0;
        right: 0;
        top: auto;
        width: 100vw;
        height: 56px;
        border-radius: 0;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #e2e8f0;
    }
    
    /* Masquer l'en-tête sur mobile */
    .routing-overlay .routing-header {
        display: none;
    }
    
    /* Content devient le bandeau horizontal */
    .routing-content {
        padding: 0;
        max-height: none;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
    
    /* Zone 1 : Sélecteur de profil (icônes) */
    .routing-content .form-group {
        margin: 0;
        flex: 0 0 auto;
        padding: 0 8px;
        border-right: 1px solid #e2e8f0;
    }
    
    .routing-content .form-group label {
        display: none;
    }
    
    .routing-content #routing-profile {
        appearance: none;
        -webkit-appearance: none;
        background: none;
        border: none;
        font-size: 24px;
        padding: 8px;
        cursor: pointer;
        width: 48px;
        height: 48px;
        text-align: center;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .routing-content #routing-profile:active {
        background: rgba(252, 76, 2, 0.1);
        transform: scale(0.95);
    }
    
    /* Options du select - style icônes uniquement */
    #routing-profile option {
        font-size: 14px;
    }
    
    /* Zone 2 : Actions (boutons icônes) */
    .routing-actions {
        position: static;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0;
        padding: 0;
        margin: 0;
        background: none;
        border: none;
        height: 56px;
    }
    
    .routing-actions .btn {
        flex: 0 0 auto;
        min-width: 56px;
        height: 56px;
        padding: 0;
        font-size: 24px;
        background: none;
        color: var(--gray-700);
        border: none;
        border-left: 1px solid #e2e8f0;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: none;
    }
    
    .routing-actions .btn:active {
        background: rgba(252, 76, 2, 0.1);
        transform: scale(0.95);
    }
    
    .routing-actions .btn:disabled {
        opacity: 0.3;
        background: none;
    }
    
    /* Couleurs différenciées par action */
    .routing-actions #clear-routing-btn {
        color: #e53e3e;
    }
    
    .routing-actions #save-routing-btn {
        color: #38a169;
    }
    
    .routing-actions #fit-routing-btn {
        color: #4299e1;
    }
    
    /* Masquer les textes des boutons */
    .routing-actions .btn .icon {
        display: none;
    }
    
    .routing-actions .btn .text {
        display: none;
    }
    
    /* Utiliser data-icon pour afficher les icônes via CSS */
    #clear-routing-btn::before {
        content: '🗑️';
    }
    
    #save-routing-btn::before {
        content: '💾';
    }
    
    #fit-routing-btn::before {
        content: '🔍';
    }
    
    /* Masquer les éléments non essentiels */
    .routing-content .routing-points,
    .routing-content .routing-stats,
    .routing-help {
        display: none !important;
    }
    
    /* Réduire le profil altimétrique quand routing actif */
    .routing-overlay.show ~ .elevation-profile-container {
        height: 60px;
        bottom: calc(var(--mobile-dock-height) + 56px);
    }
    
    .routing-overlay.show ~ .elevation-profile-container .elevation-stats-container {
        display: none;
    }
    
    .routing-overlay.show ~ .elevation-profile-container .elevation-profile-header::after {
        content: '⌃';
    }
}

/* Mode paysage mobile - légèrement plus compact */
@media (max-width: 767px) and (orientation: landscape) {
    .routing-overlay {
        height: 48px;
    }
    
    .routing-content {
        height: 48px;
    }
    
    .routing-actions .btn {
        min-width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .routing-content #routing-profile {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

.routing-overlay.show {
    display: block;
}

.routing-header {
    background: #4a5568;
    color: white;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.routing-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-routing {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.routing-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.routing-points-list {
    margin: 12px 0;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px;
}

.routing-point-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    margin-bottom: 4px;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 12px;
}

.routing-point-item:last-child {
    margin-bottom: 0;
}

.point-number {
    background: #4299e1;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.point-coords {
    flex: 1;
    margin: 0 8px;
    font-family: monospace;
}

.btn-remove-point {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.btn-remove-point:hover {
    background: #c53030;
}

.no-points {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 20px;
}

.routing-stats {
    background: #edf2f7;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 13px;
}

.routing-actions {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.routing-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

.routing-help {
    background: #fffaf0;
    border: 1px solid #fed7aa;
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    color: #744210;
}

.routing-help strong {
    color: #dd6b20;
}

/* ===== OVERLAY ELEVATION REDESIGN ===== */
.elevation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.elevation-overlay.show {
    display: flex;
}



/* Header plus compact */
.elevation-profile-header {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    font-size: var(--text-sm);
    background: var(--gray-200);
    border-bottom: 1px solid var(--color-border);
}

.elevation-profile-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.elevation-stats-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-xs);
    margin-left: auto; /* pousse les stats à droite */
}

.elevation-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    font-size: var(--text-sm);
    background: var(--gray-200);
    border-bottom: 1px solid var(--color-border);
    gap: 10px;
}

.elevation-profile-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.elevation-modal {
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-700);
    position: relative;
}

.elevation-modal h3 {
    color: #fff;
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: var(--text-xl);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.elevation-canvas-large {
    width: 800px;
    height: 400px;
    border-radius: var(--radius);
    background: var(--gray-800);
    border: 1px solid var(--gray-600);
}

.close-overlay {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gray-700);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: var(--text-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.close-overlay:hover {
    background: var(--color-accent);
    transform: scale(1.1);
}

/* ===== CONTROLES COMPACTS ===== */
.compact-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

/* Indicateur de couleur */
.track-color-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.track-color-indicator:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-md);
}

/* ===== OVERLAY COULEUR REDESIGN ===== */
.color-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.color-overlay.show {
    display: flex;
}

.color-modal {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    position: relative;
    text-align: center;
    border: 1px solid var(--color-border);
}

.color-modal h2 {
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: var(--text-xl);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.color-preview-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto var(--space-lg);
    border: 3px solid white;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preview-large:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.color-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color-quick-palette {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}

.color-quick {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.color-quick:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-lg);
}

.color-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.color-buttons button {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-md);
}

.color-confirm {
    background: var(--color-success);
    color: white;
}

.color-cancel {
    background: var(--color-danger);
    color: white;
}

.color-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== OVERLAY EXPORT REDESIGN ===== */
.legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.legal-overlay.show {
    display: flex;
}

.legal-modal {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow-y: auto;
    border: 1px solid var(--color-border);
}

.legal-modal h2 {
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: var(--text-xl);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.legal-content {
    font-size: var(--text-sm);
    line-height: 1.6;
}

.close-modal {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gray-600);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: var(--text-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.close-modal:hover {
    background: var(--color-accent);
    transform: scale(1.1);
}

/* ===== PROFIL ALTIMETRIQUE AMELIORE AVEC STATISTIQUES (bottom-right par défaut) ===== */
.elevation-profile-container {
    position: fixed;
    bottom: 80px;       /* laisse de la place pour les boutons overlay */
    right: 120px;       /* collé en bas à droite */
    left: auto;
    top: auto;
    transform: none;
    width: 420px;       /* taille minimale au chargement */
    height: 200px;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    z-index: 900;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    min-width: 300px;
    min-height: 140px;
    max-width: 95%;
    max-height: 450px;
}


.elevation-profile-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: 8px 12px;
    cursor: move;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.elevation-profile-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: var(--text-sm);
}

/* Adapter les stats pour être en ligne et compactes */
.elevation-stats-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-xs);
    margin-left: 12px;
}

.elevation-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 60px;
}
.elevation-profile-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: var(--text-sm);
}

.elevation-profile-actions {
    display: flex;
    gap: 4px;
}

.elevation-profile-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.elevation-profile-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Conteneur des statistiques intégrées */
.elevation-stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
    font-size: var(--text-xs);
}

.elevation-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.elevation-stat-label {
    font-weight: 500;
    opacity: 0.9;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elevation-stat-value {
    font-weight: 700;
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 60px;
    text-align: center;
}

.elevation-profile-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--gray-900);
}

#elevation-profile {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.elevation-profile-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: var(--text-xs);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    white-space: nowrap;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.elevation-profile-tooltip.show {
    opacity: 1;
}

.elevation-profile-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, var(--color-border) 50%);
}



/* État caché */
.elevation-profile-container.hidden {
    display: none;
}

/* Style de la ligne verticale pour la position actuelle */
.elevation-position-line {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #FFFF00;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* ===== STYLES POUR L'ÉDITION DES NOMS DE TRACES ===== */
.track-name-editable {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.track-name-text {
    flex: 1;
}

.track-edit-icon {
    opacity: 0.5;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 12px;
    flex-shrink: 0;
}

.track-edit-icon:hover {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

.track-name-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    font-size: var(--text-sm);
    font-family: inherit;
    background: var(--color-card);
    color: var(--color-text);
    flex: 1;
}

.track-name-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(252, 76, 2, 0.2);
}

.track-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer pour l'éditeur GPX - Style identique à la FAQ */
footer[role="contentinfo"] {
    width: 100%;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--gray-300);
    font-size: 0.875rem;
    border-top: 3px solid var(--color-accent);
    margin-top: 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer[role="contentinfo"] p {
    margin-bottom: 1rem;
    color: var(--gray-100);
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.footer-links a:hover {
    color: var(--color-accent);
    background: rgba(252, 76, 2, 0.1);
}

.footer-links a:not([href*="strava"]):hover {
    transform: translateY(-2px);
}

/* Style spécial pour le badge Strava */
.footer-links a[href*="strava"] {
    display: inline-block;
    background-color: #FC5200;
    color: #fff;
    padding: 5px 10px 5px 30px;
    font-size: 11px;
    font-family: Helvetica, Arial, sans-serif;
    white-space: nowrap;
    text-decoration: none;
    background-repeat: no-repeat;
    background-position: 10px center;
    border-radius: 3px;
    background-image: url('https://badges.strava.com/logo-strava-echelon.png');
    transition: all 0.3s ease;
}

.footer-links a[href*="strava"]:hover {
    background-color: #e04800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(252, 82, 0, 0.3);
}

.footer-links a[href*="strava"] img {
    margin-left: 2px;
    vertical-align: text-bottom;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    footer[role="contentinfo"] {
        padding: 1.5rem 1rem;
    }
    
    .footer-links a {
        font-size: 0.8125rem;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        height: 100vh;
    }
    
  .sidebar {
        width: 100%;
        max-height: none; /* suppression de la contrainte 40vh */
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-md);
    }
    
     .map-container {
        flex: 1;
        width: 100%;
        height: 100%;
        min-height: 100vh; /* occupe toute la hauteur */
    }
    
    .compact-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .elevation-canvas-large {
        width: 90vw;
        height: 300px;
    }
    
    .section-title::before {
        display: none;
    }
    
    .elevation-profile-container {
        width: 90%;
        left: 5%;
        transform: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        padding: var(--space-sm);
        gap: var(--space-md);
    }
    
    .unified-section {
        padding: var(--space-md);
    }
    
    .compact-controls {
        grid-template-columns: 1fr;
    }
    
    .selection-controls {
        grid-template-columns: 1fr;
    }
    
    .operations {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .elevation-profile-container {
        width: 95%;
        left: 2.5%;
        min-width: unset;
        max-width: unset;
        height: 220px;
    }
    
    .elevation-stats-container {
        gap: 8px;
    }
    
    .elevation-stat-item {
        flex: 1;
    }
    
    .elevation-stat-label {
        font-size: 9px;
    }
    
    .elevation-stat-value {
        font-size: var(--text-xs);
        min-width: 50px;
        padding: 2px 6px;
    }
    
    .elevation-profile-title span {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .compact-controls {
        grid-template-columns: 1fr;
    }
    
    .operations {
        grid-template-columns: 1fr;
    }
    
    .unified-section {
        padding: var(--space-sm);
    }
    
    .export-button {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    .btn {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    .elevation-profile-container {
        height: 200px;
        bottom: 20px;
        right: 80px;
    }

	.elevation-stats-container {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .elevation-stat-item {
        flex: 0 0 calc(50% - 6px);
    }
    
    .elevation-profile-header {
        padding: 6px 8px;
    }
    
  
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour accessibilité */
button:focus-visible,
.file-input-label:focus-visible,
.overlay-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Amélioration du contraste */
.track-stats,
.stat-label {
    color: var(--gray-600);
}

/* Flèches directionnelles */
.direction-arrow{ pointer-events: none; transform-origin: center; }

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Animation de pulse pour la géolocalisation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(66, 153, 225, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0);
    }
}

.geolocation-marker {
    background: none !important;
    border: none !important;
}

/* Animation d'apparition */
@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.elevation-profile-container {
    animation: slideUpIn 0.3s ease-out;
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .elevation-profile-container {
        animation: none;
    }
}

/* Mode sombre/clair adaptatif */
@media (prefers-color-scheme: dark) {
    .elevation-profile-container {
        background: var(--gray-800);
        border-color: var(--gray-600);
    }
}

/* État de chargement */
.elevation-profile-container.loading .elevation-profile-content::after {
    content: "Chargement...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gray-400);
    font-size: var(--text-sm);
}

/* Styles pour les POI */
.poi-category-section {
    margin-bottom: 16px;
}

.poi-item {
    transition: all 0.2s ease;
}

.poi-item:hover {
    background-color: #f8f9fa;
}

.poi-item label {
    transition: all 0.2s ease;
}

.poi-item label:hover {
    border-color: #4299E1 !important;
    background-color: #f0f7ff !important;
}

.poi-checkbox:checked + div {
    background-color: #e6f3ff !important;
    border-color: #4299E1 !important;
}

/* Marqueurs POI sur la carte */
.poi-marker {
    background: none;
    border: none;
    font-size: 18px;
    text-align: center;
    line-height: 1;
}

.poi-marker:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* Filtres POI */
.poi-category-filters {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.poi-category-filters label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
}

.poi-category-filters input[type="checkbox"] {
    margin: 0;
}

/* Styles pour l'overlay POI amélioré */
.poi-overlay-content {
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.poi-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.poi-radius-selector {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.poi-radius-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #2c3e50;
}

.poi-radius-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.poi-radius-btn {
    flex: 1;
    padding: 10px 16px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poi-radius-btn:hover {
    border-color: #4299E1;
    background: #f0f7ff;
}

.poi-radius-btn.active {
    background: #4299E1;
    border-color: #4299E1;
    color: white;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

.poi-stats {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 8px 0;
}

.poi-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.poi-category-section {
    margin-bottom: 20px;
}

.poi-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.poi-category-header:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.poi-category-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.poi-category-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #4299E1;
    font-weight: bold;
    margin-right: 4px;
}

.poi-category-section.collapsed .poi-category-arrow {
    transform: rotate(-90deg);
}

.poi-category-section.collapsed .poi-category-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.poi-category-list {
    max-height: 5000px;
    opacity: 1;
    overflow: visible;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.poi-category-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.poi-count {
    background: #4299E1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.poi-item {
    margin-bottom: 6px;
}

.poi-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poi-item-label:hover {
    border-color: #4299E1;
    background: #f8fafc;
}

.poi-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.poi-content {
    flex: 1;
    min-width: 0;
}

.poi-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.poi-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.poi-type {
    font-weight: 500;
    margin-bottom: 2px;
}

.poi-distance {
    color: #888;
}

.poi-additional {
    margin-top: 4px;
    color: #666;
}

.poi-checkbox {
    margin-top: 4px;
}

.poi-loading, .poi-empty, .poi-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.poi-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.poi-actions .btn {
    flex: 1;
}

/* Styles pour les popups POI */
.poi-popup {
    min-width: 220px;
}

.poi-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.poi-popup-icon {
    font-size: 18px;
}

.poi-popup-name {
    font-size: 14px;
    color: #2c3e50;
}

.poi-popup-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.poi-popup-details div {
    margin-bottom: 4px;
}

/* Marqueurs POI */
.poi-marker {
    background: none;
    border: none;
}

/* Styles pour la sélection par catégorie POI */
.poi-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.poi-category-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.poi-category-checkbox {
    display: none;
}

.poi-category-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.poi-category-checkbox:checked + .poi-category-checkbox-custom {
    background: #4299E1;
    border-color: #4299E1;
}

.poi-category-checkbox:checked + .poi-category-checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.poi-category-checkbox:indeterminate + .poi-category-checkbox-custom {
    background: #4299E1;
    border-color: #4299E1;
}

.poi-category-checkbox:indeterminate + .poi-category-checkbox-custom::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.poi-category-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.poi-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.poi-count {
    background: #4299E1;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.poi-category-actions {
    display: flex;
    gap: 4px;
}

.btn-category-select, .btn-category-deselect {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-category-select:hover {
    background: #38A169;
    color: white;
    border-color: #38A169;
}

.btn-category-select.selected {
    background: #38A169;
    color: white;
    border-color: #38A169;
}

.btn-category-deselect:hover {
    background: #E53E3E;
    color: white;
    border-color: #E53E3E;
}

.poi-category-list {
    margin-top: 8px;
}

/* Amélioration des items POI */
.poi-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.poi-item-label:hover {
    border-color: #4299E1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poi-checkbox {
    margin-top: 4px;
    accent-color: #4299E1;
}

.poi-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.poi-content {
    flex: 1;
    min-width: 0;
}

.poi-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.poi-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.poi-type {
    font-weight: 500;
    margin-bottom: 2px;
    color: #4a5568;
}

.poi-distance {
    color: #718096;
    font-size: 11px;
}

.poi-additional {
    margin-top: 4px;
    color: #666;
    font-size: 11px;
}

/* Styles pour les actions globales */
.poi-global-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.poi-global-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

/* Styles pour la sélection par catégorie POI */
.poi-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.poi-category-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.poi-category-checkbox {
    display: none;
}

.poi-category-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.poi-category-checkbox:checked + .poi-category-checkbox-custom {
    background: #4299E1;
    border-color: #4299E1;
}

.poi-category-checkbox:checked + .poi-category-checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.poi-category-checkbox:indeterminate + .poi-category-checkbox-custom {
    background: #4299E1;
    border-color: #4299E1;
}

.poi-category-checkbox:indeterminate + .poi-category-checkbox-custom::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.poi-category-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.poi-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.poi-count {
    background: #4299E1;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.poi-category-actions {
    display: flex;
    gap: 4px;
}

.btn-category-select, .btn-category-deselect {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-category-select:hover {
    background: #38A169;
    color: white;
    border-color: #38A169;
}

.btn-category-deselect:hover {
    background: #E53E3E;
    color: white;
    border-color: #E53E3E;
}

.btn-category-select.selected {
    background: #38A169;
    color: white;
    border-color: #38A169;
}

.poi-category-list {
    margin-top: 8px;
}

/* Styles pour les sous-catégories POI */
.poi-subcategory-section {
    margin-bottom: 12px;
    padding-left: 24px;
}

.poi-subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.poi-subcategory-header:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

.poi-subcategory-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.poi-subcategory-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #4299E1;
    font-weight: bold;
}

.poi-subcategory-section:not(.collapsed) .poi-subcategory-arrow {
    transform: rotate(90deg);
}

.poi-subcategory-section.collapsed .poi-subcategory-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.poi-subcategory-list {
    max-height: 3000px;
    opacity: 1;
    padding-left: 32px;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.poi-subcategory-icon {
    font-size: 18px;
}

.poi-subcategory-header h4 {
    margin: 0;
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.poi-subcategory-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poi-subcount {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

.poi-subcategory-actions {
    display: flex;
    gap: 4px;
}

.btn-subcategory-select, .btn-subcategory-deselect {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.btn-subcategory-select:hover {
    background: #38A169;
    color: white;
    border-color: #38A169;
}

.btn-subcategory-deselect:hover {
    background: #E53E3E;
    color: white;
    border-color: #E53E3E;
}

.btn-subcategory-select.selected {
    background: #38A169;
    color: white;
    border-color: #38A169;
}


/* Amélioration des items POI */
.poi-item-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}


.poi-item-label:hover {
    border-color: #4299E1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poi-checkbox {
    margin-top: 4px;
    accent-color: #4299E1;
}

.poi-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.poi-content {
    flex: 1;
    min-width: 0;
}

.poi-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.poi-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.poi-type {
    font-weight: 500;
    margin-bottom: 2px;
    color: #4a5568;
}

.poi-distance {
    color: #718096;
    font-size: 11px;
}

.poi-additional {
    margin-top: 4px;
    color: #666;
    font-size: 11px;
}

/* Styles pour les actions globales */
.poi-global-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.poi-global-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

/* Styles pour l'overlay POI amélioré */
.poi-overlay-content {
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.poi-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.poi-search-container {
    position: relative;
    margin-bottom: 12px;
}

.poi-search-container input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
}

.poi-stats {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 8px 0;
}

.poi-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.poi-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.poi-actions .btn {
    flex: 1;
}

.poi-loading, .poi-empty, .poi-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Styles pour les popups POI */
.poi-popup {
    min-width: 220px;
}

.poi-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.poi-popup-icon {
    font-size: 18px;
}

.poi-popup-name {
    font-size: 14px;
    color: #2c3e50;
}

.poi-popup-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.poi-popup-details div {
    margin-bottom: 4px;
}

/* Marqueurs POI */
.poi-marker {
    background: none;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .poi-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .poi-category-info {
        align-self: flex-end;
    }
    
    .poi-global-actions {
        flex-direction: column;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .poi-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .poi-category-info {
        align-self: flex-end;
    }
    
    .poi-global-actions {
        flex-direction: column;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .poi-category-filters {
        grid-template-columns: 1fr;
    }
}

/* ===== STYLES POUR LES FORMULAIRES DANS LES MODALES ===== */
.form-group {
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary);
    font-size: var(--text-sm);
}

.input-field {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--gray-50);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(252,76,2,0.15);
}

/* === Formulaire Simulation (2 colonnes modernes) === */
.legal-modal .legal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
}

.legal-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-modal .form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.legal-modal .form-group .text-sm-info {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 2px;
}

/* Zone d'aperçu = pleine largeur */
#simulation-preview {
    grid-column: 1 / -1;
}

/* Boutons de validation = pleine largeur */
#simulation-overlay .legal-modal > div:last-child {
    grid-column: 1 / -1;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    .legal-modal .legal-content {
        grid-template-columns: 1fr;
    }
}


.form-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.form-group label {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.form-group .text-sm-info {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.text-sm-info {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--space-xs);
    font-style: italic;
}

/* Styles pour les informations de temps */
.time-data-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 12px;
    color: #1976d2;
}

.time-data-info.warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

/* CORRECTION : Styles pour les options désactivées dans les selects */
#interval-type option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
}

#interval-type option:not(:disabled) {
    color: #333 !important;
    background-color: white !important;
}

/* Amélioration de l'accessibilité pour les options désactivées */
#interval-type option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
}

#interval-type option:not(:disabled) {
    color: #333 !important;
    background-color: white !important;
}

/* Style pour le groupe de temps quand il est actif */
#time-group:not(.hidden) {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Assurez-vous que la classe hidden existe */
.hidden {
    display: none !important;
}


/* ===== VARIABLES RESPONSIVE ===== */
:root {
    --mobile-header-height: 50px;
    --mobile-dock-height: 60px;
    --mobile-profile-height: 120px;
    --tablet-sidebar-width: 280px;
    --touch-target-size: 48px;
}

/* ===== BREAKPOINTS ===== */
@media (max-width: 767px) {
    /* MOBILE PORTRAIT/PAYSAGE */
    
    /* Masquer header/footer visuellement mais garder accessibilité */
    .breadcrumb,
    footer[role="contentinfo"] {
        position: absolute;
        left: -9999px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }
    
    /* Afficher le bouton géolocalisation mobile */
    .geolocation-btn-mobile {
        display: flex;
    }
    
    /* Masquer le bouton géolocalisation desktop */
    #geolocation-btn {
        display: none !important;
    }
    
    /* Layout principal mobile */
    .container {
        flex-direction: column;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport pour mobiles */
    }
    
    /* Sidebar transformée en menu latéral */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85vw;
        max-width: 320px;
        height: 100vh;
        z-index: 9000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Overlay pour fermer le menu */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 8999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Carte en plein écran */
    .map-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: calc(100vh - var(--mobile-dock-height) - var(--mobile-profile-height));
        min-width: auto;
    }
    
    #map {
        border-radius: 0;
    }
    
    /* Profil altimétrique - Bande fixe bas */
    .elevation-profile-container {
        position: fixed;
        bottom: var(--mobile-dock-height);
        left: 0;
        right: 0;
        width: 100vw;
        height: var(--mobile-profile-height);
        border-radius: 16px 16px 0 0;
        transform: none;
        resize: none; /* Désactiver resize mobile */
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    }
    
    /* État réduit du profil */
    .elevation-profile-container.collapsed {
        height: 40px;
    }
    
    .elevation-profile-container.collapsed .elevation-profile-content {
        display: none;
    }
    
    /* Bouton expansion profil */
    .elevation-profile-header::after {
        content: '⌃';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 20px;
        color: white;
        pointer-events: none;
    }
    
    .elevation-profile-container.collapsed .elevation-profile-header::after {
        content: '⌄';
    }
    
    /* Stats profil - Layout horizontal compact */
    .elevation-stats-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding: 4px 8px;
    }
    
    .elevation-stat-item {
        min-width: auto;
    }
    
    .elevation-stat-label {
        font-size: 9px;
    }
    
    .elevation-stat-value {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    /* DOCK D'ICÔNES - Barre inférieure */
    .mobile-dock {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-dock-height);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--color-border);
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 12px;
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    }
    
    .mobile-dock-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px;
        background: none;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        min-width: var(--touch-target-size);
        min-height: var(--touch-target-size);
        border-radius: 12px;
    }
    
    .mobile-dock-btn:active {
        background: var(--gray-200);
        transform: scale(0.95);
    }
    
    .mobile-dock-btn.active {
        background: rgba(252, 76, 2, 0.1);
        color: var(--color-accent);
    }
    
    .mobile-dock-btn .icon {
        font-size: 24px;
    }
    
    .mobile-dock-btn .label {
        font-size: 10px;
        font-weight: 600;
        text-align: center;
    }
    
    /* Cacher éléments desktop */
    .compact-controls,
    .selection-controls,
    .export-button-container,
    .controls-overlay {
        display: none !important;
    }
    
    /* Bouton menu hamburger */
    .mobile-menu-btn {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 9001;
        width: 44px;
        height: 44px;
        background: white;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        font-size: 24px;
    }
    
    /* Overlays modales - Plein écran mobile */
    .legal-overlay .legal-modal {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        padding: var(--space-md);
    }
    
    /* Export button - Intégré au dock */
    .export-button-container {
        display: none;
    }
}

/* ===== MOBILE PAYSAGE ===== */
@media (max-width: 767px) and (orientation: landscape) {
    .map-container {
        height: calc(100vh - 50px); /* Dock plus petit */
    }
    
    .elevation-profile-container {
        height: 80px; /* Profil plus compact */
        bottom: 50px;
    }
    
    .mobile-dock {
        height: 50px;
    }
    
    .elevation-stats-container {
        gap: 8px;
    }
}

/* ===== TABLETTE (768px - 1200px) ===== */
@media (min-width: 768px) and (max-width: 1200px) {
    .breadcrumb,
    footer[role="contentinfo"] {
        position: absolute;
        left: -9999px;
    }
    
    /* Afficher le bouton géolocalisation mobile sur tablette */
    .geolocation-btn-mobile {
        display: flex;
    }
    
    /* Masquer le bouton géolocalisation desktop sur tablette */
    #geolocation-btn {
        display: none !important;
    }
    
    .container {
        flex-direction: row;
    }
    
    /* Sidebar compacte */
    .sidebar {
        width: var(--tablet-sidebar-width);
        padding: var(--space-md);
    }
    
    .map-container {
        flex: 1;
    }
    
    /* Profil en overlay centré */
    .elevation-profile-container {
        bottom: 60px;
        right: 80px;
        width: 500px;
        height: 200px;
    }
    
    /* Dock desktop conservé mais optimisé */
    .compact-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .btn {
        padding: 10px;
        font-size: 13px;
    }
}



/* ===== BOTTOM SHEET MOBILE ===== */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 9500;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.bottom-sheet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.bottom-sheet-header button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

.tools-grid button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 12px;
    background: var(--gray-50);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tools-grid button:active {
    background: var(--color-accent);
    color: white;
    transform: scale(0.95);
}

.tools-grid button .icon {
    font-size: 32px;
    margin-bottom: 4px;
}

.tools-grid button .label {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.tools-grid button .sublabel {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
}

.tools-grid button:active .label,
.tools-grid button:active .sublabel {
    color: white;
}

/* ===== OPTIONS DE TRAÇAGE ===== */
.draw-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.draw-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.draw-option-card:active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(0.98);
}

.draw-option-card .option-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.draw-option-card .option-content {
    flex: 1;
}

.draw-option-card h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

.draw-option-card p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
}

.draw-option-card:active h4,
.draw-option-card:active p {
    color: white;
}

/* ===== INFO ANALYSE ===== */
.analyze-info {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
    margin: 0 20px 20px 20px;
    border: 1px solid var(--color-border);
}

.analyze-info p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-700);
}

.analyze-info p strong {
    color: var(--color-primary);
    font-weight: 700;
}

.routing-active-notice {
    margin-top: 16px;
    padding: 12px;
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-radius: 6px;
    text-align: center;
}

.routing-active-notice p {
    margin: 0 0 12px 0;
    color: #1976D2;
    font-weight: 500;
}


/* Optimisations overlay routing mobile */
@media (max-width: 767px) {
    .routing-stats-desktop {
        font-size: 12px;
        padding: 8px;
        margin: 8px 0;
    }
    
    .routing-help-desktop {
        display: none !important;
    }
    
    .routing-points h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .routing-point-item {
        padding: 8px;
        font-size: 13px;
    }
    
    .point-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .btn-remove-point {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}
/* Style pour les tooltips des traces */
.track-tooltip {
    background: white !important;
    border: 2px solid var(--color-primary) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    min-width: 200px !important;
}

.track-tooltip strong {
    color: var(--color-primary);
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.track-tooltip::before {
    border-top-color: var(--color-primary) !important;
}
