﻿/* MOTEUR DE RECHERCHE COMPACT - PAGES GÉO    */

.advanced-search-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 30px 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    position: relative;
}

.advanced-search-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 0px 0 10px 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    position: relative;
    z-index: 10;
    isolation: isolate;
}

/* Header compact */
.search-compact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: white;
}

.search-compact-header i {
    font-size: 24px;
    opacity: 0.9;
}

.search-compact-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* Formulaire compact */
.search-compact-form {
    margin-bottom: 16px;
    position: relative;
    z-index: 100;
}

.search-compact-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-main-input {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.search-main-input:focus-within {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    z-index: 101;
}

.search-main-input > i {
    color: #667eea;
    font-size: 18px;
    margin-right: 12px;
}

.search-input-compact {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #2d3748;
    background: transparent;
}

.search-input-compact::placeholder {
    color: #a0aec0;
}

.btn-search-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 50;
    position: relative;
}

.btn-search-compact:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-search-compact i {
    font-size: 16px;
}

/* Suggestions autocomplete */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin: 0;
}

.search-suggestions.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
}

.suggestion-item:first-child {
    border-radius: 12px 12px 0 0;
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.suggestion-item:hover {
    background: #f7fafc;
    padding-left: 20px;
}

.suggestion-item i {
    color: #667eea;
    font-size: 14px;
    flex-shrink: 0;
}

.suggestion-text {
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.suggestion-text strong {
    color: #667eea;
    font-weight: 600;
}

/* Info de résultat */
.search-result-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-bottom: 16px;
    position: relative;
    z-index: 5;
}

.search-query-display {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-query-display i {
    opacity: 0.8;
}

.search-query-display strong {
    font-weight: 600;
}

.clear-search {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Options d'élargissement */
.search-expand-options {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.expand-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

.expand-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.expand-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

.expand-link i {
    font-size: 12px;
    opacity: 0.9;
}

/* RESPONSIVE                                  */

@media (max-width: 768px) {
    .advanced-search-container {
        padding: 20px 16px;
        border-radius: 12px;
        margin: 20px 0 30px 0;
    }
    
    .search-compact-header {
        margin-bottom: 16px;
    }
    
    .search-compact-header h3 {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .search-compact-header i {
        font-size: 20px;
    }
    
    .search-compact-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-main-input {
        min-height: 48px;
    }
    
    .btn-search-compact {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .search-expand-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 12px;
    }
    
    .expand-link {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .search-suggestions {
        max-height: 200px;
    }
}

/* ANIMATIONS                                  */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-search-container {
    animation: slideIn 0.4s ease-out;
}

/* Scrollbar pour suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 12px 12px 0;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
