/* Module de recherche */
.search-module {
    width: 100%;
    max-width: 500px;
}

/* Dashboard actions */
.dashboard-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dashboard-actions .btn {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-header {
    margin-bottom: 25px;
}

.search-header .btn-back {
    margin-bottom: 15px;
    padding: 8px 15px;
    font-size: 13px;
}

.search-header h2 {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-header h2 i {
    color: #3498db;
}

/* Formulaire de recherche */
.search-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.search-field {
    margin-bottom: 20px;
}

.search-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #aaa;
}

.search-field label i {
    color: #3498db;
    width: 16px;
}

.search-field select,
.search-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.search-field select:focus,
.search-field input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.search-field select option {
    background: #1a1a2e;
    color: #fff;
}

.search-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.search-dates .search-field {
    margin-bottom: 20px;
}

.btn-search {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Résultats de recherche */
.search-results {
    max-height: calc(100vh - 500px);
    overflow-y: auto;
}

.search-hint {
    text-align: center;
    color: #888;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-hint i {
    color: #3498db;
}

.loading {
    text-align: center;
    color: #3498db;
    padding: 30px;
}

.loading i {
    margin-right: 10px;
}

.error {
    text-align: center;
    color: #e74c3c;
    padding: 30px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.no-results i {
    font-size: 3rem;
    color: #555;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #aaa;
}

.no-results span {
    font-size: 0.9rem;
}

/* Header des résultats */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    font-size: 14px;
    color: #888;
}

.region-badge {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Liste des résultats */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-result-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #3498db;
    transform: translateX(5px);
}

.search-result-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #fff;
}

.result-date {
    font-size: 13px;
    color: #888;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-date i {
    color: #3498db;
}

.result-desc {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.event-region {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-creator {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.live-indicator {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulse-live 2s infinite;
}

.live-indicator i {
    font-size: 8px;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Marqueurs de recherche */
.marker.search-marker {
    z-index: 15;
}

.marker.highlighted {
    transform: translate(-50%, -100%) scale(1.4);
    z-index: 20;
}

.marker.highlighted svg {
    fill: #f39c12 !important;
    filter: drop-shadow(0 0 10px rgba(243, 156, 18, 0.5));
}

/* Région active sur la carte */
#map-container svg path.region-active {
    fill: rgba(52, 152, 219, 0.3) !important;
    stroke: #3498db;
    stroke-width: 2;
}

/* Boutons hero */
.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-search-hero {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-search-hero:hover {
    background: #3498db;
    color: #fff;
}

/* Container des résultats (home-right) */
.search-results-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: opacity 0.2s;
}
.search-results-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.search-results-container.loading::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Placeholder initial */
.search-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    padding: 40px;
}

.search-placeholder i {
    font-size: 4rem;
    color: #3498db;
    margin-bottom: 20px;
    opacity: 0.5;
}

.search-placeholder.error i {
    color: #e74c3c;
}

.search-placeholder p {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #aaa;
}

.search-placeholder span {
    font-size: 0.9rem;
}

/* Carte de la région */
.region-map-container {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.region-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.region-map-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.events-count {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.region-map {
    position: relative;
    padding: 20px;
    min-height: 250px;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.region-map svg {
    max-height: 300px;
}

/* Marqueurs sur la carte de région */
.marker.region-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -100%);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}

.marker.region-marker:hover,
.marker.region-marker.highlighted {
    transform: translate(-50%, -100%) scale(1.3);
    z-index: 20;
}

.marker.region-marker.highlighted svg {
    fill: #f39c12 !important;
    filter: drop-shadow(0 0 8px rgba(243, 156, 18, 0.6));
}

/* Liste des résultats dans home-right */
.search-results-list {
    flex: 1;
    overflow-y: auto;
}

.search-results-list .results-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-results-list .results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 14px;
}

.search-results-list .results-count i {
    color: #3498db;
}

/* Cartes de résultat avec highlight */
.search-result-card.highlighted {
    background: rgba(52, 152, 219, 0.15);
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.2);
}

/* Tips de recherche */
.search-tips {
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    border-left: 3px solid #3498db;
}

.search-tips p {
    margin: 0;
    font-size: 13px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-tips i {
    color: #f39c12;
}

/* Responsive */
@media (max-width: 900px) {
    .search-results-container {
        padding: 15px;
    }
    
    .region-map {
        min-height: 200px;
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .search-module {
        max-width: 100%;
    }
    
    .search-dates {
        grid-template-columns: 1fr;
    }
    
    .search-results {
        max-height: none;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}