/* Style de base pour mobile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow: hidden;
}

.map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

.sidebar {
    position: absolute;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 0 0 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    max-height: 100%;
    overflow-y: auto;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a73e8;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-container {
    position: relative;
    width: 100%;
}

/* Style pour les résultats de recherche */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    font-family: 'Roboto', Arial, sans-serif;
}

/* En-tête des types de résultats */
.result-type-header {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5f6368;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Élément de résultat individuel */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f3f4;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item.active,
.search-result-item:active {
    background-color: #e8f0fe;
}

/* Style pour l'icône */
.search-result-item i {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    font-size: 16px;
}

/* Détails du résultat */
.result-details {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 0.95rem;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.result-subtitle {
    font-size: 0.8rem;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-type {
    display: inline-block;
    font-size: 0.7rem;
    color: #5f6368;
    background-color: #f1f3f4;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 4px;
}

/* Style pour l'absence de résultats */
.search-result-item.no-results {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
    text-align: center;
}

.search-result-item.no-results i {
    font-size: 24px;
    margin: 0 auto 12px;
    color: #9aa0a6;
}

.search-result-item.no-results .result-details {
    text-align: center;
}

.search-result-item.no-results .result-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-item.no-results .result-subtitle {
    font-size: 0.85rem;
    color: #9aa0a6;
}

/* Style pour le champ de recherche */
#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
}

#search-input:focus {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

/* Style pour le conteneur de recherche */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

/* Animation de chargement */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading .search-result-item:after {
    content: '';
    position: absolute;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.input-group {
    display: flex;
    gap: 5px;
}

.btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn:hover {
    background-color: #1557b0;
}

.route-info {
    margin: 1rem 0;
    padding: 0.8rem;
    background: #f5f9ff;
    border-radius: 4px;
    border-left: 4px solid #1a73e8;
}

.route-info p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.current-location {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

#location-status {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Style pour les écrans plus grands */
@media (min-width: 768px) {
    .sidebar {
        width: 350px;
        height: 100%;
        border-radius: 0;
    }
    
    .map {
        left: 350px;
        width: calc(100% - 350px);
    }
}

/* Style pour les contrôles de la carte */
.ol-control {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    padding: 2px;
}

.ol-control button {
    background-color: #1a73e8;
    color: white;
    border: none;
    margin: 1px;
    font-size: 1.2rem;
    height: 1.875rem;
    width: 1.875rem;
    line-height: 1.875rem;
    text-align: center;
    border-radius: 2px;
}

.ol-control button:hover {
    background-color: #1557b0;
}
