/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

header {
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Structure de l'application */
.app-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 992px) {
    .app-container {
        flex-direction: row;
    }
    
    .search-panel {
        width: 35%;
    }
    
    .map-container {
        width: 65%;
    }
}

/* Panel de recherche */
.search-panel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.select-input, input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.select-input:disabled, input[type="text"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary {
    background-color: #3498db;
    color: white;
}

.primary:hover:not(:disabled) {
    background-color: #2980b9;
}

.secondary {
    background-color: #95a5a6;
    color: white;
}

.secondary:hover:not(:disabled) {
    background-color: #7f8c8d;
}

.location-btn {
    background-color: #2ecc71;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-btn:hover:not(:disabled) {
    background-color: #27ae60;
}

.voice-btn {
    flex: 1;
    margin: 0 5px;
}

/* Conteneur de carte */
.map-container {
    position: relative;
}

#map {
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Autocomplétion */
.autocomplete {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border-radius: 0 0 4px 4px;
    display: none;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

/* Informations sur l'itinéraire */
.route-info {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.route-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-weight: 600;
    color: #7f8c8d;
    display: block;
}

.info-value {
    font-size: 18px;
    font-weight: bold;
    color: #16a085;
}

/* Navigation vocale */
.voice-control {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.voice-control h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.voice-buttons {
    display: flex;
    margin-bottom: 10px;
}

.voice-instruction {
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 4px;
    font-style: italic;
}

/* Statut du trajet */
.journey-status {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(44, 62, 80, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.status-icon {
    font-size: 24px;
}

/* Chargement */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 15px;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}