/* =====================================================================
 * Filtre implantologie V2 - Styles spécifiques
 * Wireframes Figma : "Filtre - Parcours Produit V2"
 * ===================================================================== */

/* --- Sidebar : structure générale --- */

.rotec-implant-filter__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f4f4;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 600;
}

.rotec-implant-filter__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #444;
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
    font-weight: 700;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.rotec-implant-filter__back:hover {
    background: #e0e0e0;
    color: #000;
    text-decoration: none;
}

.rotec-implant-filter__breadcrumb {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    line-height: 1.2;
    overflow: hidden;
}

.rotec-implant-filter__parent {
    font-size: 0.75rem;
    font-weight: 400;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rotec-implant-filter__current {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Niveau racine : deux SELECT empilés --- */

.rotec-implant-filter__pickers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.rotec-implant-filter__pickers .rotec-filter-block {
    margin-bottom: 0;
}

.rotec-implant-filter__select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 0.9rem;
}

.rotec-implant-filter__select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* --- Niveau 2 : checkboxes --- */

.rotec-filter-block {
    margin-bottom: 20px;
}

.rotec-filter-block__header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.rotec-filter-block__header label {
    font-weight: 600;
}

.rotec-filter-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 380px;
    overflow-y: auto;
}

.rotec-filter-options li {
    padding: 4px 0;
}

.rotec-filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.92rem;
}

.rotec-filter-options input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* --- Active Filters Bar (au-dessus de la grille produits) --- */

.rotec-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f9f9f9;
    border-radius: 4px;
}

.rotec-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Pastilles compatibilité (bleu) */
.rotec-active-filter--compatibility {
    background: #e0eaf3;
    color: #135e96;
    border: 1px solid #b6cce0;
}

.rotec-active-filter--compatibility:hover {
    background: #c8d8e8;
    color: #0a3b6c;
}

/* Pastilles catégorie (orange) */
.rotec-active-filter--category {
    background: #fbeadc;
    color: #b35900;
    border: 1px solid #f0c2b0;
}

.rotec-active-filter--category:hover {
    background: #f5d4b3;
    color: #7a3d00;
}

.rotec-active-filter__close {
    display: inline-block;
    margin-left: 2px;
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
}

.rotec-active-filters__clear {
    margin-left: auto;
    padding: 5px 10px;
    color: #b32d2e;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.rotec-active-filters__clear:hover {
    text-decoration: underline;
}

/* --- Responsive mobile --- */

@media (max-width: 768px) {
    .rotec-implant-filter__pickers {
        gap: 12px;
    }

    .rotec-filter-options {
        max-height: 280px;
    }

    .rotec-active-filters {
        padding: 10px;
    }

    .rotec-active-filters__clear {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding-top: 8px;
        border-top: 1px solid #e5e5e5;
    }
}
