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

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --dark-color: #1a1a1a;
    --light-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --text-primary: #333;
    --text-secondary: #666;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

/* Header avec logo */
.header {
    padding: 24px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header h1 {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============ CONTRÔLES ============ */
.controls {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
    flex-shrink: 0;
}

.control-group {
    margin-bottom: 18px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group select:hover {
    border-color: var(--primary-color);
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Radius input */
.radius-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

#radius {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#radius::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
    transition: all 0.2s ease;
}

#radius::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

#radius::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
    transition: all 0.2s ease;
}

#radius::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

#radius-value {
    min-width: 45px;
    text-align: right;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95em;
    flex-shrink: 0;
}

/* Bouton */
.btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============ LISTE DES STATIONS ============ */
.stations-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.stations-list h2 {
    font-size: 1.05em;
    margin-bottom: 14px;
    color: var(--text-primary);
    font-weight: 700;
    flex-shrink: 0;
}

.stations {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Carte de station */
.station-card {
    padding: 14px;
    background: white;
    border: 1.5px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.station-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateX(3px);
    border-left-color: var(--secondary-color);
    background: var(--light-bg);
}

.station-card.active {
    background: rgba(255, 107, 53, 0.05);
    border: 1.5px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.15);
}

.station-name {
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 0.98em;
}

.station-brand {
    font-size: 0.8em;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.station-distance {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.station-address {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fuel-prices {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.fuel-badge {
    background: white;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.fuel-badge.available {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.05) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.fuel-badge.available:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(247, 147, 30, 0.1) 100%);
}

/* Messages */
.loading {
    text-align: center;
    color: #999;
    padding: 20px 10px;
    font-style: italic;
    font-size: 0.9em;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9em;
    border-left: 4px solid #c62828;
}

.no-stations {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px 10px;
    font-size: 0.95em;
}

/* Scrollbar personnalisée */
.stations-list::-webkit-scrollbar {
    width: 6px;
}

.stations-list::-webkit-scrollbar-track {
    background: transparent;
}

.stations-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.stations-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============ CARTE ============ */
.map-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    display: block;
}

.leaflet-container {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-popup-content {
    font-size: 0.9em;
    max-width: 250px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 50%;
    }

    .map-container {
        width: 100%;
        height: 50%;
    }
}
