/* ════════════════════════════════════════════════════════════════
   CATEGORY BAR ICONS — compact blue line icons in soft blue tiles.
   Selected category = solid blue tile with a white icon.
   Selectors are scoped with .q-category-nav so they win over page CSS
   (page styles load after this file).
   ════════════════════════════════════════════════════════════════ */

.cat-ic {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

/* ── Bar buttons ── */
.q-category-nav .qcat-btn {
    gap: 5px;
    min-width: 64px;
    padding: 2px 2px;
    background: transparent;
    border-color: transparent;
}

.q-category-nav .qcat-btn:hover,
.q-category-nav .qcat-btn.active {
    background: transparent;
    border-color: transparent;
}

/* Pinned buttons (Général / Tout / Enregistrés): same look as the others */
.q-category-nav .q-category-static {
    padding-top: 2px;
    padding-bottom: 2px;
}

.q-category-nav .q-category-static .qcat-btn {
    background: transparent !important;
    border-color: transparent !important;
    min-width: 64px !important;
}

.q-category-nav .qcat-btn .cat-tile {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f9ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    font-size: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.q-category-nav .qcat-btn .cat-tile i {
    font-size: 0.9rem;
    color: inherit !important;
}

.q-category-nav .qcat-btn > span:not(.cat-tile) {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
}

.q-category-nav .qcat-btn:hover .cat-tile {
    background: #eff6ff;
    border-color: #93c5fd;
}

.q-category-nav .qcat-btn:hover > span:not(.cat-tile) {
    color: #1d4ed8;
}

.q-category-nav .qcat-btn.active .cat-tile,
.q-category-nav .q-category-static .qcat-btn.active .cat-tile {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.q-category-nav .qcat-btn.active .cat-ic {
    stroke-width: 2;
}

.q-category-nav .qcat-btn.active > span:not(.cat-tile) {
    color: #2563eb;
    font-weight: 700;
}

.q-category-nav .qcat-btn:focus-visible {
    outline: none;
}

.q-category-nav .qcat-btn:focus-visible .cat-tile {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* No extra underline under the selected one: the blue tile says it */
.q-category-nav .qcat-btn.active::after {
    display: none !important;
}

.q-category-nav .v-line-divider {
    height: 32px;
}

@media (max-width: 768px) {
    .q-category-nav .qcat-btn,
    .q-category-nav .q-category-static .qcat-btn {
        min-width: 60px !important;
        padding: 2px 0 !important;
    }

    .q-category-nav .qcat-btn .cat-tile {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .q-category-nav .qcat-btn .cat-ic {
        width: 17px;
        height: 17px;
    }

    .q-category-nav .qcat-btn > span:not(.cat-tile) {
        font-size: 0.64rem;
    }
}

/* ── "Tout" pop-up list ── */
.cat-explore-item .cat-tile,
#categoryExplorerModal .cat-explore-item span.cat-tile {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: #f5f9ff !important;
    border: 1px solid #dbeafe !important;
    color: #2563eb !important;
    font-size: inherit !important;
    line-height: 1 !important;
}

.cat-explore-item .cat-tile i {
    font-size: 0.9rem !important;
    width: auto !important;
    color: inherit !important;
}

.cat-explore-item .cat-ic {
    width: 17px;
    height: 17px;
}

/* Each item = icon + name together in one bordered card */
#categoryExplorerModal .cat-explore-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transform: none !important;
}

#categoryExplorerModal .cat-explore-item span.cat-tile {
    background: #ffffff !important;
}

#categoryExplorerModal .cat-explore-item:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

#categoryExplorerModal .cat-explore-item:hover span.cat-tile {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

#categoryExplorerModal .cat-explore-item.active {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

#categoryExplorerModal .cat-explore-item.active span:not(.cat-tile) {
    color: #2563eb !important;
}

#categoryExplorerModal .cat-explore-item.active span.cat-tile {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

#categoryExplorerModal .cat-explore-item.active .cat-ic {
    stroke-width: 2;
}

#categoryExplorerModal .modal-header-icon .cat-ic {
    width: 20px;
    height: 20px;
}
