/* recherche-horaires.css - Version améliorée */
.recherche-horaires-bus {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.recherche-horaires-bus h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.form-horaires {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-horaires .form-group {
    margin-bottom: 20px;
}

.form-horaires label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-horaires select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-horaires select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-horaires .checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.form-horaires .checkbox input {
    width: 18px;
    height: 18px;
}

.form-horaires .checkbox label {
    margin: 0;
    font-weight: normal;
}

.bouton {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.bouton:hover {
    background: linear-gradient(135deg, #2980b9, #1c6ea4);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Résultats améliorés */
.resultats-horaires {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resultats-horaires h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 22px;
}

.arret-selectionne {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 16px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Tableau amélioré */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.horaires-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.horaires-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.horaires-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.horaires-table tr:hover {
    background-color: #f8f9fa;
}

/* Styles des lignes */
.horaires-table tr.passe {
    color: #95a5a6;
    background-color: #fafafa;
}

.horaires-table tr.a-venir {
    background-color: #ffffff;
}

.horaires-table tr.prochain {
    background-color: #e8f5e8;
    font-weight: 600;
}

.horaires-table tr.prochain:hover {
    background-color: #d4edda;
}

/* Cellules spécifiques */
.heure-passage {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 80px;
}

.direction {
    color: #34495e;
    font-style: italic;
}

.statut {
    text-align: center;
    min-width: 80px;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.prochain {
    background-color: #28a745;
    color: white;
    margin-left: 8px;
}

.badge.passe {
    background-color: #6c757d;
    color: white;
}

.badge.a-venir {
    background-color: #17a2b8;
    color: white;
}

/* Statistiques */
.horaires-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.horaires-stats .stat {
    margin-right: 20px;
    color: #6c757d;
}

.horaires-stats .stat strong {
    color: #2c3e50;
}

/* Aucun résultat */
.aucun-horaire {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.aucun-horaire p {
    font-size: 16px;
    margin-bottom: 10px;
}

.suggestion {
    font-size: 14px !important;
    color: #3498db !important;
}

/* Responsive */
@media (max-width: 768px) {
    .recherche-horaires-bus {
        padding: 15px;
        margin: 10px;
    }
    
    .form-horaires {
        padding: 15px;
    }
    
    .horaires-table {
        font-size: 12px;
    }
    
    .horaires-table th,
    .horaires-table td {
        padding: 8px 6px;
    }
    
    .heure-passage {
        font-size: 14px;
    }
    
    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .horaires-stats {
        text-align: center;
    }
    
    .horaires-stats .stat {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .recherche-horaires-bus h2 {
        font-size: 22px;
    }
    
    .resultats-horaires h3 {
        font-size: 18px;
    }
    
    .horaires-table {
        font-size: 11px;
    }
}

/* styles pour les indicateurs de chargement */
select.loading {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233498db"><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z" opacity=".5"/><path d="M12 2a10 10 0 0 0-10 10h2a8 8 0 0 1 8-8z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    animation: spin 1s linear infinite;
}

select.error {
    border-color: #e74c3c !important;
    background-color: #fdedec;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px;
    background: #fdedec;
    border-radius: 3px;
    border-left: 3px solid #e74c3c;
}

body.loading {
    cursor: wait;
}

body.loading * {
    cursor: wait !important;
}

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

.loading-message {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #555;
}