/* === BARRE DE RECHERCHE HEADER === */

.header-search-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    
    /* Liquid Glass Style - Fond Noir + Bordure Multicolore */
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 50px;
    
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)),
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 100% 100%, 300% 300%;
    
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    min-width: 140px;
    
    animation: borderFlow 8s ease infinite;
}

.header-search-pill:hover {
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.65), rgba(5, 5, 5, 0.65)),
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(59, 130, 246, 0.2);
}

.header-search-pill.active {
    min-width: 400px;
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)),
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.3);
}

#headerTitle {
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.header-search-pill.active #headerTitle {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.header-search-input {
    position: absolute;
    left: 16px;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: white;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.1s;
}

.header-search-input:focus,
.header-search-input:active {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    outline-width: 0 !important;
    outline-offset: 0 !important;
}

.header-search-pill.active .header-search-input {
    opacity: 1;
    pointer-events: auto;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.header-search-pill.active .header-search-icon {
    opacity: 1;
}

/* Résultats de recherche */
.header-search-results {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    right: 0;
    
    /* Liquid Glass Style - Fond Noir */
    background-color: transparent;

    /* Fluid Multicolor Border Setup */
    border: 2px solid transparent; 
    border-radius: 24px;

    /* Fond NOIR avec Glass Effect + Bordure Multicolore */
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: 
        linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), /* Fond Noir Glass */
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6); /* Bordure Multicolore */
    background-size: 100% 100%, 300% 300%;
    
    /* Blur Effect (Apple Liquid Glass) */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    /* Glow Effect Subtil */
    box-shadow: 
        0 20px 60px -10px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(59, 130, 246, 0.3);

    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;

    /* Hide Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;

    z-index: 1000;
    
    animation: 
        slideDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        borderFlow 8s ease infinite;
}

.header-search-results::-webkit-scrollbar {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes borderFlow {
    0% { background-position: 0% 0%, 0% 50%; }
    50% { background-position: 0% 0%, 100% 50%; }
    100% { background-position: 0% 0%, 0% 50%; }
}

.header-search-result-item {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 4px;
    border-radius: 16px;
}

.header-search-result-item:last-child {
    border-bottom: none;
    margin-bottom: 8px;
}

.header-search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-search-result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.header-search-result-content {
    flex: 1;
    min-width: 0;
}

.header-search-result-title {
    color: white;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-result-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-no-results {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Catégories de résultats */
.header-search-category {
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4px;
}

.header-search-category:first-child {
    margin-top: 0;
    border-top: none;
}

/* Scrollbar pour les résultats */
.header-search-results::-webkit-scrollbar {
    width: 6px;
}

.header-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.header-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.header-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
