/* =====================================================
   STYLES POUR LA RECHERCHE PHOTO GALLERY
   ===================================================== */

/* 🔍 Conteneur de recherche */
.photo-gallery-search-container {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 🔍 Champ de recherche */
.photo-gallery-search-input {
    flex: 1;
    padding: 10px 40px 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
}

.photo-gallery-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.photo-gallery-search-input::placeholder {
    color: #999;
    font-style: italic;
}

/* 🧹 Bouton de nettoyage */
.photo-gallery-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #666;
}

.photo-gallery-search-clear:hover {
    background: #e0e0e0;
    color: #333;
}

.photo-gallery-search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

/* 📊 Statistiques de recherche */
.photo-gallery-search-stats {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    padding: 5px 15px;
    background: #f8f9fa;
    border-radius: 15px;
    display: none;
}

/* 🎯 Surlignage des termes trouvés */
.search-highlight {
    background: #ffeb3b;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 🌟 Indicateur de résultat de recherche */
.photo-gallery-search-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 🎯 Styles pour les vignettes lors de la recherche */
.photo-gallery-search-result.photo-gallery-search-match {
    box-shadow: 0 0 0 3px #4caf50;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.photo-gallery-search-result.photo-gallery-search-no-match {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.photo-gallery-search-result.photo-gallery-search-no-match:hover {
    opacity: 0.8;
}

/* 📱 Responsive pour mobiles */
@media (max-width: 768px) {
    .photo-gallery-search-container {
        margin-bottom: 10px;
    }
    
    .photo-gallery-search-input {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    
    .photo-gallery-search-clear {
        width: 20px;
        height: 20px;
        font-size: 10px;
        right: 8px;
    }
    
    .photo-gallery-search-stats {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .photo-gallery-search-indicator {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 3px;
        left: 3px;
    }
}

/* 🎨 Animation d'apparition pour les résultats */
.photo-gallery-search-result {
    animation: searchResultAppear 0.4s ease-out;
}

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

/* 🔄 Animation pour le chargement de recherche */
.photo-gallery-search-loading {
    position: relative;
}

.photo-gallery-search-loading::after {
    content: "";
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: searchSpin 1s linear infinite;
}

@keyframes searchSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}