/* ── Search & Sort bar ──────────────────────────────────────────────────────── */

#wa-search-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.20) 0%,
        rgba(255, 255, 255, 0.10) 100%);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 30px;
}

/* ── Search ─────────────────────────────────────────────────────────────────── */

.wa-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    min-width: 200px;
}

.wa-search-icon {
    position: absolute;
    left: 14px;
    font-size: 1.1em;
    pointer-events: none;
    user-select: none;
    opacity: 0.75;
}

#wa-search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.92);
    color: #1e3a5f;
    font-size: 1em;
    font-weight: 600;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

#wa-search-input::placeholder {
    color: #8aabcc;
    font-weight: 400;
}

#wa-search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.20);
}

/* ← supprime l'icône native du navigateur sur type="search" */
#wa-search-input::-webkit-search-cancel-button { display: none; }

.wa-search-clear {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(74, 144, 226, 0.18);
    color: #2a5298;
    font-size: 0.8em;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.wa-search-clear:hover {
    background: rgba(74, 144, 226, 0.35);
    transform: scale(1.15);
}

/* ── Sort buttons ───────────────────────────────────────────────────────────── */

.wa-sort-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wa-sort-label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
}

.wa-sort-btn {
    padding: 9px 16px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.50);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.85em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.wa-sort-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.80);
    transform: translateY(-2px);
}

.wa-sort-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    color: #1e3a5f;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.45);
    transform: translateY(-2px);
}

/* ── "No results" message ───────────────────────────────────────────────────── */

.wa-no-results {
    text-align: center;
    color: white;
    font-size: 1.15em;
    font-weight: 700;
    padding: 40px 20px;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── Play badge on cards ────────────────────────────────────────────────────── */

.wa-play-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #FF9800 0%, #F44336 100%);
    color: white;
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    #wa-search-sort-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 18px;
    }

    .wa-search-wrap {
        flex: unset;
    }

    .wa-sort-wrap {
        justify-content: center;
    }

    .wa-sort-btn {
        font-size: 0.8em;
        padding: 8px 12px;
    }
}

@media (max-width: 400px) {
    .wa-sort-btn {
        font-size: 0.75em;
        padding: 7px 10px;
    }
}