/* File: public/css/browsing-sidebar.css
 * Styles du composant browsing-sidebar (extraits de browsing-sidebar.blade.php).
 * Servi en static via <link> dans layouts/app.blade.php (pas de @push, pas de Vue strip).
 */

.filters-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
}

.filter-group-header h6 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0F1111;
}

.filter-group-header i.fa-chevron-down {
    transition: transform 0.3s;
    font-size: 0.75rem;
    color: #6c757d;
}

.filter-group-header[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0F1111;
}

.filter-item {
    padding-left: 0.5rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-inputs input {
    flex: 1;
}

.filter-group-standard {
    box-shadow: none;
}

/* ── Color swatches (axe `color`) ──────────────────────────── */
.color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 6px;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin: 0;
    position: relative;
}

.color-swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.color-swatch .swatch-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    transition: box-shadow .12s ease, transform .12s ease;
}

.color-swatch:hover .swatch-dot {
    transform: scale(1.05);
}

.color-swatch input:checked + .swatch-dot {
    box-shadow: 0 0 0 2px #003e4d;
    border-color: #003e4d;
}

.color-swatch .swatch-label {
    font-size: 11px;
    color: #0F1111;
    text-align: center;
    line-height: 1.1;
}

.color-swatch input:checked ~ .swatch-label {
    text-decoration: underline;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   CHECKBOX CUSTOM Bootik24 (case personnalisée + aperçu au survol)
   ─────────────────────────────────────────────────────────────────
   Cible toutes les checkboxes du sidebar via .filter-auto/.facet-checkbox.
   Garde le <input> natif (accessibilite clavier + screen reader). Override
   l'apparence avec appearance:none + SVG check inject via background-image.
   ════════════════════════════════════════════════════════════════ */
input.filter-auto[type="checkbox"],
input.filter-auto[type="radio"],
input.facet-checkbox[type="checkbox"],
input.facet-radio[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px !important;
    height: 16px !important;
    border: 1.5px solid #b4b4b4;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    transition: background-color .15s ease-out, border-color .15s ease-out;
}
input.filter-auto[type="radio"],
input.facet-radio[type="radio"] {
    border-radius: 50%;   /* radios restent ronds */
}
/* Survol (non coché) : la case se REMPLIT en gris avec une coche blanche —
   aperçu clair de « ce que ça donnera au clic », feedback avant sélection. */
input.filter-auto[type="checkbox"]:hover:not(:checked),
input.facet-checkbox[type="checkbox"]:hover:not(:checked) {
    border-color: #999;
    background-color: #999;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><polyline points='3.5,8.5 6.5,11.5 12.5,4.5' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}
input.filter-auto[type="radio"]:hover:not(:checked),
input.facet-radio[type="radio"]:hover:not(:checked) {
    border-color: #999;
    background: #ededed;
}
/* Coché : case remplie couleur brand navy + coche blanche. */
input.filter-auto[type="checkbox"]:checked,
input.facet-checkbox[type="checkbox"]:checked {
    background-color: var(--corporate-brand, #022d94);
    border-color: var(--corporate-brand, #022d94);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><polyline points='3.5,8.5 6.5,11.5 12.5,4.5' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}
input.filter-auto[type="radio"]:checked,
input.facet-radio[type="radio"]:checked {
    border: 1.5px solid var(--corporate-brand, #022d94);
    background-image: radial-gradient(circle, var(--corporate-brand, #022d94) 45%, transparent 50%);
}
input.filter-auto[type="checkbox"]:focus-visible,
input.filter-auto[type="radio"]:focus-visible,
input.facet-checkbox[type="checkbox"]:focus-visible,
input.facet-radio[type="radio"]:focus-visible {
    outline: 2px solid var(--corporate-brand, #022d94);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   Filtre PRIX — histogramme de répartition + slider double poignée
   Couleur brand navy (#022d94) ; barres hors plage grisées, in-range colorées.
   Aucun style inline (règle projet) : tout piloté par ces classes.
   ══════════════════════════════════════════════════════════════════ */
.b24-price-title { font-weight: 700; margin-bottom: 8px; }

/* Histogramme : barres alignées en bas, hauteur = part relative des produits */
.b24-price-hist {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;   /* barres à largeur fixe réparties sur toute la largeur */
    gap: 1px;
    height: 54px;
    margin-bottom: 6px;
    padding: 0 1px;
}
.b24-price-bar {
    flex: 0 0 auto;
    width: 7px;                       /* largeur de barre — ajustable au pixel près */
    background: #dfe3e8;              /* hors plage : gris */
    border-radius: 1px 1px 0 0;
    transition: background .12s ease;
}
.b24-price-bar.in-range {
    background: var(--corporate-brand, #022d94);  /* dans la plage : navy brand */
}

/* Slider double poignée */
.b24-price-slider { position: relative; height: 28px; margin-bottom: 10px; }
.b24-price-track {
    position: absolute; top: 12px; left: 0; right: 0; height: 4px;
    background: #dfe3e8; border-radius: 2px;
}
.b24-price-range {
    position: absolute; top: 12px; height: 4px; left: 0; width: 100%;
    background: var(--corporate-brand, #022d94); border-radius: 2px;
}
.b24-price-handle {
    position: absolute; top: 4px; width: 18px; height: 18px; margin-left: -9px;
    background: #fff; border: 3px solid var(--corporate-brand, #022d94);
    border-radius: 50%; cursor: grab;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    z-index: 10; touch-action: none;
}
.b24-price-handle:active { cursor: grabbing; }
#priceHandleMax { z-index: 11; }

/* Champs min / max */
.b24-price-inputs { display: flex; align-items: center; gap: 6px; }
.b24-price-input {
    flex: 1 1 0; min-width: 0;        /* s'adapte à la largeur (sidebar étroite) */
    height: 32px; padding: 2px 8px;
    border: 1px solid #c5ccd6; border-radius: 6px;
    font-size: 13px; text-align: center; color: #1a2230;
}
.b24-price-input:focus { outline: 2px solid var(--corporate-brand, #022d94); outline-offset: 1px; border-color: transparent; }
.b24-price-sep  { flex: 0 0 auto; font-size: 13px; line-height: 1; color: #667; padding: 0 1px; }
.b24-price-unit { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: #445; }

/* ══════════════════════════════════════════════════════════════════
   Options de facette (checkbox / radio) — affordance de survol :
   ligne entière cliquable + libellé en couleur brand souligné au survol.
   ══════════════════════════════════════════════════════════════════ */
.b24-facet-opt { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.b24-facet-opt-box { width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; }
.b24-facet-opt-label { font-size: 13px; color: #0F1111; flex: 1; }
.b24-facet-opt-count { font-size: 11px; color: #888; flex-shrink: 0; }
.b24-facet-opt:hover .b24-facet-opt-label {
    color: var(--corporate-brand, #022d94);
    text-decoration: underline;
}
