


/* Container de recherche */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Container des résultats */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-results.show {
    opacity: 1;
    transform: translateY(0);
}

/* Éléments de résultat */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.search-result-description {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.search-result-arrow {
    margin-left: 12px;
    font-size: 18px;
    color: #007bff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-result-item:hover .search-result-arrow,
.search-result-item.selected .search-result-arrow {
    opacity: 1;
}

/* Mise en évidence des termes recherchés */
.search-result-title mark,
.search-result-description mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Message aucun résultat */
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-no-results p {
    margin: 0;
    font-style: italic;
}

/* Barre de défilement personnalisée */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        margin: 0 10px;
    }
    
    .search-input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .search-results {
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-title {
        font-size: 15px;
    }
    
    .search-result-description {
        font-size: 13px;
    }
}

/* Animation de chargement (optionnel) */
.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
