/* --- Conteneur principal --- */
.wk-filter-container {
    display: flex;
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile sans couper le menu */
    gap: 12px;
    padding: 10px 0;
    margin-bottom: 25px;
    position: relative;
    z-index: 100; /* S'assure que tout le bloc passe au-dessus du reste */
}

/* --- Groupe / Bouton --- */
.wk-filter-group {
    position: relative;
}

.wk-dropdown-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wk-dropdown-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.wk-dropdown-btn.active {
    background: #ff3b3b;
    color: #ffffff;
    border-color: #ff3b3b;
}

/* --- Menu déroulant (Correction du chevauchement) --- */
.wk-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 240px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    padding: 8px;
    z-index: 1000; /* Passe largement au-dessus des cartes du Médallium */
}

/* Affichage du menu */
.wk-filter-group.open .wk-dropdown-menu {
    display: flex;
}

/* --- Lignes d'options --- */
.wk-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.wk-option:hover {
    background: #f7fafc;
}

.wk-option input[type="checkbox"] {
    display: none;
}

/* Zone d'image (carré propre sans déformation) */
.wk-option-img-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    border-radius: 6px;
    margin-right: 10px;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.wk-option-img-box img {
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
}

/* État sélectionné */
.wk-option input[type="checkbox"]:checked + .wk-option-img-box {
    border-color: #ff3b3b;
    background: #fff5f5;
}

.wk-option span {
    font-size: 14px;
    color: #4a5568;
}

.wk-option input[type="checkbox"]:checked ~ span {
    font-weight: bold;
    color: #ff3b3b;
}