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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgba(7, 41, 198, 0.75) 0%, rgba(0, 0, 0, 0.95) 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Grid Stations */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Station Card */
.station-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.station-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.station-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.bikes-available {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    color: #667eea;
}

.bike-icon {
    font-size: 2em;
    margin-right: 10px;
}

.bike-count {
    font-weight: bold;
    font-size: 1.3em;
}

.no-bikes {
    color: #e74c3c;
}

.some-bikes {
    color: #f39c12;
}

.many-bikes {
    color: #27ae60;
}

.status {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.open {
    color: #27ae60;
}

.closed {
    color: #e74c3c;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.active {
    filter: drop-shadow(0 0 5px #f39c12);
}

.favorite-badge {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-top: 10px;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, rgba(7, 41, 198, 0.75) 0%, rgba(0, 0, 0, 0.95) 100%);
    color: #ebe7de;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}

/* Station Info */
.station-info {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.history-table thead {
    background: #f5f5f5;
}

.history-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #667eea;
}

.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.history-table tbody tr:hover {
    background: #f9f9f9;
}

.status-open {
    color: #27ae60;
    font-weight: bold;
}

.status-closed {
    color: #e74c3c;
    font-weight: bold;
}

.bikes-many {
    color: #27ae60;
    font-weight: bold;
}

.bikes-some {
    color: #f39c12;
    font-weight: bold;
}

.bikes-none {
    color: #e74c3c;
    font-weight: bold;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map Container */
.map-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#stationMap {
    width: 100%;
    height: 100%;
}

.map-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

/* Bouton carte flottant */
.map-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0729c6 0%, #000 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    color: white;
}

.map-float-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.7);
}

.map-float-btn:active {
    transform: scale(0.95);
}

.map-float-btn svg {
    width: 28px;
    height: 28px;
}

/* Modal large pour la carte */
.modal-large {
    max-width: 1000px;
    width: 95%;
}

/* Styles pour les marqueurs Leaflet personnalisés */
.custom-marker {
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.custom-marker.no-bikes {
    border-color: #e74c3c;
    color: #e74c3c;
}

.custom-marker.some-bikes {
    border-color: #f39c12;
    color: #f39c12;
}

.custom-marker.many-bikes {
    border-color: #27ae60;
    color: #27ae60;
}

/* Popup Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.station-popup {
    text-align: center;
    min-width: 150px;
}

.station-popup h3 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1.1em;
}

.station-popup .bikes {
    font-size: 1.5em;
    font-weight: bold;
    margin: 5px 0;
}

.station-popup .status {
    font-size: 0.9em;
    margin-top: 5px;
}
