/* ===================================
   MODULE DE RECHERCHE
   =================================== */

.search-container {
    position: relative;
    display: inline-block;
}

/* Icône de loupe */
.search-icon {
    cursor: pointer;
    font-size: 24px;
    color: #FFFFFF;
    padding: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.search-icon:hover {
    color: #FFD700;
    transform: scale(1.1);
}

/* Champ de recherche (caché par défaut) */
.search-input-container {
    position: fixed;
    top: 15px;
    right: 60px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.search-input-container.active {
    opacity: 1;
    visibility: visible;
}

.search-input {
    width: 300px;
    padding: 10px 40px 10px 15px;
    border: 2px solid #FFFFFF;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #223843;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.search-input:focus {
    background: #FFFFFF;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    border-color: #FFD700;
}

.search-input::placeholder {
    color: #999;
}

/* Bouton de fermeture */
.search-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #999;
    font-weight: bold;
    transition: color 0.3s ease;
}

.search-close:hover {
    color: #e74c3c;
}

/* Résultats de recherche */
.search-results {
    position: fixed;
    top: 60px;
    right: 60px;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-name {
    font-weight: bold;
    color: #223843;
    font-size: 15px;
    margin-bottom: 3px;
}

.search-result-info {
    font-size: 12px;
    color: #666;
}

.search-result-info .programme {
    color: #667eea;
    font-weight: 500;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #667eea;
    font-size: 14px;
}

/* Scrollbar personnalisée pour les résultats */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Animation du résultat */
.search-result-item {
    animation: fadeInResult 0.3s ease;
}

@keyframes fadeInResult {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-input {
        width: 200px;
    }
    
    .search-results {
        width: 300px;
    }
}
