:root {
    /* PALETTE AVEC PLUS DE CONTRASTE */
    --bg-body: #ffffff;
    --bg-gradient-1: #f8fafc;
    --bg-gradient-2: #f1f5f9;
    
    --glass-panel: rgba(255, 255, 255, 0.98);
    --glass-border: 1px solid rgba(203, 213, 225, 0.6);
    --glass-shadow: 0 8px 32px rgba(2, 132, 199, 0.08);
    
    --accent-primary: #0369a1; /* Plus foncé pour plus de contraste */
    --accent-secondary: #0284c7;
    --accent-tertiary: #0ea5e9;
    --accent-success: #059669;
    --accent-warning: #d97706;
    --accent-error: #dc2626;
    
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #475569;
    --text-muted: #64748b;
    
    --card-bg: #ffffff;
    --card-hover: #f8fafc;
    --card-border: 1px solid rgba(203, 213, 225, 0.5);
    --card-shadow: 0 4px 24px rgba(2, 132, 199, 0.06);
    
    --radius-xl: 28px;
    --radius-l: 20px;
    --radius-m: 14px;
    --radius-s: 10px;
    
    --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 20px 64px rgba(0, 0, 0, 0.15);
    
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    --transition-fast: 200ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    color: var(--text-main);
    background: linear-gradient(135deg, 
        var(--bg-gradient-1) 0%, 
        var(--bg-gradient-2) 50%, 
        #e2e8f0 100%);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* --- SCROLLBAR ÉLÉGANTE --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(203, 213, 225, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        var(--accent-primary), 
        var(--accent-secondary));
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        var(--accent-secondary), 
        var(--accent-tertiary));
}

/* --- LAYOUT PRINCIPAL --- */
#sidebar {
    width: 440px;
    min-width: 440px;
    background: var(--glass-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: var(--glass-border);
    padding: 40px 32px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--glass-shadow);
    overflow-y: auto;
    position: relative;
    transition: width var(--transition-slow) var(--ease-smooth);
}

#sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(180deg, 
        rgba(2, 132, 199, 0.05) 0%, 
        transparent 100%);
    pointer-events: none;
}

/* --- HEADER PROFESSIONNEL --- */
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.5);
    animation: slideDown 0.6s var(--ease-smooth) backwards;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--accent-primary);
    position: relative;
    padding: 8px 16px;
    background: rgba(2, 132, 199, 0.08);
    border-radius: var(--radius-m);
    border: 1px solid rgba(2, 132, 199, 0.15);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

.logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(2, 132, 199, 0.12), 
        transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.logo:hover::after {
    opacity: 1;
}

.subtitle {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    margin: 8px 0 32px 0;
    letter-spacing: 0.2px;
    line-height: 1.6;
    animation: slideDown 0.6s var(--ease-smooth) 0.1s backwards;
}

/* --- INPUTS ÉLÉGANTS (FIXÉ) --- */
#inputs-container {
    margin-bottom: 24px;
}

.control-group {
    margin-bottom: 24px;
    animation: slideUp 0.5s var(--ease-smooth) backwards;
}

.control-group:nth-child(1) { animation-delay: 0.1s; }
.control-group:nth-child(2) { animation-delay: 0.2s; }
.control-group:nth-child(3) { animation-delay: 0.3s; }
.control-group:nth-child(4) { animation-delay: 0.4s; }

label {
    display: block;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.input-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
    /* CORRECTION : On retire le padding qui décalait tout */
    padding: 0; 
    border-radius: var(--radius-m);
    transition: background var(--transition-normal);
    position: relative;
    z-index: 1;
}

/* On ajoute un padding uniquement au survol si on veut l'effet, 
   mais le plus propre est de laisser sans padding pour l'alignement */
.input-group-row:hover {
    background: transparent; /* On retire le fond gris qui nécessitait le padding */
}

.name-input {
    width: 33% !important;   /* On réduit la taille (ajustez ce % si besoin) */
    min-width: 80px;         /* On empêche qu'il devienne trop petit sur mobile */
    flex-shrink: 0;          /* On interdit au champ de s'écraser */
    
    /* Style cosmétique (gardez le vôtre) */
    font-weight: 600;
    color: var(--accent-primary) !important;
}

.addr-input {
    flex-grow: 1 !important; /* L'instruction magique : "Prends tout l'espace vide" */
    width: auto !important;  /* On retire les largeurs fixes */
    min-width: 0;            /* Indispensable pour éviter les bugs d'affichage */
}

/* CORRECTION IMPORTANTE : Garantir que les inputs soient cliquables */
/* CORRECTION IMPORTANTE : Garantir que les inputs soient cliquables */
input[type="text"], select {
    background: white;
    border: 1px solid rgba(203, 213, 225, 0.8); /* Bordure un peu plus visible */
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    
    /* Propriétés vitales pour le fonctionnement */
    position: relative;
    z-index: 10; /* Doit être supérieur au conteneur */
    pointer-events: auto !important; /* Force le clic */
    cursor: text;
    
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-subtle);
}

/* On s'assure que le conteneur ne bloque pas */
.input-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
    position: relative;
    z-index: 5;
    /* On retire l'animation scaleIn qui peut bloquer l'input pendant le chargement */
    animation: fadeIn 0.3s ease forwards;
}

/* Correction supplémentaire */
input[type="text"]:hover, 
select:hover {
    border-color: rgba(148, 163, 184, 0.8);
    cursor: text;
}

/* Pour les champs focus */
input[type="text"]:focus, 
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 0 3px rgba(2, 132, 199, 0.15),
        var(--shadow-soft);
    transform: translateY(-1px);
    background: white;
    z-index: 3;
}

/* Style placeholder */
input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- BOUTONS SOBRES AVEC PLUS DE CONTRASTE --- */
.btn-secondary {
    background: white;
    color: var(--accent-primary);
    padding: 14px 20px;
    width: 100%;
    border-radius: var(--radius-m);
    border: 1px solid rgba(2, 132, 199, 0.3);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) var(--ease-smooth);
    
    /* AJOUTS POUR CENTRAGE */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-secondary:hover {
    background: rgba(2, 132, 199, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    color: var(--accent-primary);
}

.btn-primary {
    background: linear-gradient(135deg, 
        var(--accent-primary) 0%, 
        var(--accent-secondary) 100%);
    color: white;
    padding: 16px 24px;
    width: 100%;
    border-radius: var(--radius-m);
    font-size: 15px;
    font-weight: 600;
    margin-top: 24px;
    border: none;
    box-shadow: 
        0 4px 16px rgba(2, 132, 199, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal) var(--ease-smooth);
    
    /* AJOUTS POUR CENTRAGE */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.25), 
        transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(2, 132, 199, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(2, 132, 199, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* --- FILTRES MINIMALISTES AVEC CONTRASTE --- */
.price-filter {
    display: flex;
    background: white;
    padding: 4px;
    border-radius: var(--radius-m);
    border: 1px solid rgba(203, 213, 225, 0.6);
    gap: 4px;
    box-shadow: var(--shadow-subtle);
}

.price-btn {
    flex: 1;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: all var(--transition-normal) var(--ease-smooth);
    cursor: pointer;
}

.price-btn.selected {
    background: rgba(2, 132, 199, 0.15);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
    font-weight: 700;
}

.price-btn:hover:not(.selected) {
    background: rgba(226, 232, 240, 0.5);
    color: var(--accent-primary);
}

/* --- BOUTON SUPPRIMER RAFFINÉ --- */
.btn-delete {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
    border-radius: var(--radius-s);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-smooth);
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* --- SECTION RÉSULTATS AVEC CONTRASTE --- */
#results-area {
    margin-top: 32px;
}

#status-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.5);
    background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.05), transparent);
    padding: 12px 16px;
    border-radius: var(--radius-s);
}

.resto-item {
    background: white;
    border: var(--card-border);
    border-radius: var(--radius-m);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-smooth);
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
}

.resto-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.resto-item:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-soft);
    background: var(--card-hover);
}

.resto-item:hover::before {
    opacity: 1;
}

/* --- CARTE AVEC STYLE COLORÉ --- */
#map {
    flex: 1;
    height: 100%;
    background: #e2e8f0;
    position: relative;
    border-left: 1px solid rgba(203, 213, 225, 0.6);
    /* On retire le z-index ici pour éviter les conflits */
}

/* On retire les filtres qui altèrent les couleurs naturelles */
.leaflet-tile-pane {
    /* filter: saturate(1.1) ... -> SUPPRIMÉ */
    filter: none;
}

/* On supprime le voile bleu par dessus la carte */
#map::after {
    display: none; 
}

/* Style spécifique pour les marqueurs (On garde l'ombre) */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* --- OVERLAY TECHNOLOGIQUE AVEC CONTRASTE --- */
#overlay-panel {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5); /* Plus foncé */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-smooth);
    padding: 20px;
}

#overlay-panel:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    background: white;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh; /* On utilise 90% de la hauteur d'écran */
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-large);
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    
    /* --- LIGNE MAGIQUE POUR LE SCROLL --- */
    overflow-y: auto;  /* Active l'ascenseur vertical si ça dépasse */
    overflow-x: hidden; /* Empêche le scroll horizontal global */
    
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all 0.4s var(--ease-smooth) 0.1s;
    border: 1px solid rgba(203, 213, 225, 0.6);
}

#overlay-panel:not(.hidden) .overlay-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(226, 232, 240, 0.8);
    color: var(--text-secondary);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
    font-weight: 300;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* --- GRILLE PHOTOS --- */
.photos-gallery {
    display: flex;          /* Alignement horizontal */
    gap: 16px;             /* Espace entre photos */
    margin: 24px 0;
    padding-bottom: 15px;   /* Espace pour la barre de scroll */
    overflow-x: auto;       /* Active le scroll horizontal */
    overflow-y: hidden;
    min-height: 200px;      /* Force la hauteur min */
    
    /* Scroll fluide */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.resto-photo {
    height: 200px;          /* Hauteur fixe */
    min-width: 300px;       /* Largeur fixe minimale (empêche l'écrasement) */
    object-fit: cover;      /* L'image remplit le cadre sans déformation */
    border-radius: var(--radius-m);
    transition: all var(--transition-normal);
    border: 1px solid rgba(203, 213, 225, 0.6);
    box-shadow: var(--shadow-subtle);
    flex-shrink: 0;         /* Interdit à l'image de rétrécir */
}

.resto-photo:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-medium);
}

/* --- LAYOUT OVERLAY --- */
.overlay-grid {
    display: flex;          /* Flex est plus souple que Grid ici */
    flex-wrap: wrap;        /* Passe à la ligne sur mobile */
    gap: 32px;
    margin-top: 20px;
}

.column-left, .column-right {
    flex: 1;                /* Chacun prend 50% */
    min-width: 320px;       /* Largeur min avant de passer à la ligne */
}

@media (max-width: 1024px) {
    .overlay-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

#itineraries-grid, #reviews-container {
    overflow: visible; 
}

/* --- CARTES TRAJETS --- */
.route-card {
    background: white;
    border: var(--card-border);
    border-radius: var(--radius-m);
    padding: 20px;
    margin-bottom: 16px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-subtle);
    position: relative;
}

.route-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(2, 132, 199, 0.3);
    background: var(--card-hover);
}

.duration {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 12px;
    display: block;
}

.transit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.line-badge {
    padding: 4px 10px;
    background: var(--accent-primary);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- AVIS STYLÉS AVEC CONTRASTE --- */
.review-card {
    background: white;
    border: var(--card-border);
    border-radius: var(--radius-m);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-subtle);
    position: relative;
}

.review-card:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(2, 132, 199, 0.2);
    background: var(--card-hover);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 600;
}

.review-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    font-style: normal;
    padding: 8px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    margin-top: 8px;
}

/* --- MARQUEURS MODERNES --- */
.custom-marker {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow-medium);
    font-size: 18px;
    background: white;
    transition: all var(--transition-normal);
}

.custom-marker:hover {
    transform: scale(1.2);
    z-index: 1000;
}

.marker-friend {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: 2px solid white;
}

.marker-resto {
    background: linear-gradient(135deg, #d97706, #ea580c);
    color: white;
    border: 2px solid white;
}

/* --- LOADER TECHNOLOGIQUE --- */
.loader-box {
    margin-top: 24px;
    animation: fadeIn 0.3s ease;
    background: white;
    border-radius: var(--radius-m);
    padding: 20px;
    border: var(--card-border);
    box-shadow: var(--shadow-subtle);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(203, 213, 225, 0.5);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        var(--accent-primary), 
        var(--accent-secondary));
    border-radius: 3px;
    transition: width 0.8s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    animation: shimmer 1.5s infinite;
}

.status-text {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* --- ANIMATIONS --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    #sidebar {
        width: 380px;
        min-width: 380px;
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        min-width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: var(--glass-border);
    }
    
    #map {
        height: 50vh;
    }
}

/* --- AMÉLIORATIONS VISUELLES --- */
.overlay-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.5);
}

#overlay-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

#overlay-meta {
    font-size: 14px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 500;
}

/* --- ICÔNES DANS LES SELECT --- */
#transport-mode option {
    padding: 8px;
}

/* --- TOOLTIPS RAFFINÉS --- */
.leaflet-tooltip {
    background: rgba(15, 23, 42, 0.95);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- ÉTATS DÉSACTIVÉS --- */
button:disabled,
button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- FOCUS VISIBLE POUR ACCESSIBILITÉ --- */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* --- STYLES AJOUTÉS POUR LE SCRIPT --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-medium);
    z-index: 9999;
    animation: toastIn 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-success {
    background: var(--accent-success);
}

.toast-error {
    background: var(--accent-error);
}

.toast-warning {
    background: var(--accent-warning);
}

@keyframes toastIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

/* --- STYLES POUR LES CHAMPS D'ERREUR --- */
.input-group-row.error .addr-input {
    border-color: var(--accent-error) !important;
    background: rgba(239, 68, 68, 0.05);
}

.input-group-row.warning .name-input {
    border-color: var(--accent-warning) !important;
    background: rgba(245, 158, 11, 0.05);
}

/* --- STYLES POUR LES BOUTONS DANS RESTAURANT --- */
.resto-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.resto-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    flex: 1;
}

.resto-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

.resto-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.resto-item .btn-view,
.resto-item .btn-center {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(203, 213, 225, 0.6);
    background: white;
    border-radius: var(--radius-s);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.resto-item .btn-view:hover,
.resto-item .btn-center:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.price-level {
    background: rgba(203, 213, 225, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* --- NO RESULTS STYLE --- */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    background: white;
    border-radius: var(--radius-m);
    border: var(--card-border);
}

.no-results p {
    margin-bottom: 16px;
}

.btn-suggest {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-s);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-suggest:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

/* --- CORRECTION DES INPUTS --- */

/* 1. On force l'input adresse à s'agrandir */
.addr-input {
    flex: 1 1 auto !important; /* S'agrandit pour remplir le vide */
    width: auto !important;    /* Annule le width: 100% qui casse le flex */
    min-width: 0 !important;   /* Empêche le champ d'être écrasé */
}

/* 2. On s'assure que les clics fonctionnent partout */
input[type="text"], select {
    pointer-events: auto !important; /* Force la détection du clic */
    z-index: 10 !important;          /* Place l'input au-dessus du décor */
    position: relative;
    
    /* On garde le style existant */
    background: white;
    border: 1px solid rgba(203, 213, 225, 0.8);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-s);
    font-family: inherit;
    font-size: 14px;
    box-shadow: var(--shadow-subtle);
}

/* Ajustement du conteneur pour éviter les blocages */
.input-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
    position: relative;
    z-index: 5;
    overflow: visible; /* Important pour les ombres */
}

.progress-fill.success {
    background: var(--accent-success) !important; /* Vert (défini dans :root) */
    box-shadow: 0 0 20px var(--accent-success);   /* Glow vert */
}

.status-text.success {
    color: var(--accent-success) !important;
    font-weight: 700;
    transition: color 0.3s;
}

.progress-fill.success::after {
    animation: none !important; /* Arrête le mouvement */
    display: none !important;   /* Cache le reflet blanc */
}

.route-card-wrapper h3 {
    color: #000000 !important;   /* Noir forcé */
    font-size: 18px !important;  /* Taille bien visible */
    font-weight: 800 !important; /* Gras */
    margin: 15px 0 10px 0 !important;
    opacity: 1 !important;       /* On s'assure qu'il n'est pas transparent */
    display: block !important;   /* On s'assure qu'il n'est pas caché */
    z-index: 10 !important;
    position: relative;
}

/* --- SELECT STYLISÉS (Custom Dropdown) --- */
select {
    /* 1. On supprime le style par défaut moche du navigateur */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* 2. On ajoute notre propre flèche bleue (SVG encodé) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230369a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center; /* Position de la flèche */
    background-size: 16px; /* Taille de la flèche */
    
    /* 3. Style visuel cohérent avec les inputs */
    background-color: white;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    padding-right: 45px !important; /* On laisse de la place pour la flèche à droite */
    
    /* Ombre et transition */
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s ease;
}

/* Au survol */
select:hover {
    border-color: var(--accent-primary);
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* Au clic (Focus) */
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}

/* Style des options (Le menu ouvert) */
select option {
    font-weight: 500;
    padding: 12px;
    background-color: white;
    color: var(--text-main);
}