/* =============================================
   MENU CATÉGORIES SIDEBAR
   ============================================= */

.reuniloc-categories-menu {
    background: white;
    border-radius: var(--reuniloc-radius);
    box-shadow: var(--reuniloc-shadow);
    padding: 0;
}

.reuniloc-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reuniloc-cat-item {
    border-bottom: 1px solid var(--reuniloc-border);
}

.reuniloc-cat-item:last-child {
    border-bottom: none;
}

/* Header de catégorie parente */
.reuniloc-cat-header {
    display: flex;
    align-items: center;
    position: relative;
}

.reuniloc-cat-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.reuniloc-cat-parent.open .reuniloc-cat-toggle {
    transform: rotate(90deg);
}

.reuniloc-icon-chevron::before {
    content: '›';
    font-size: 20px;
    font-weight: bold;
    color: var(--reuniloc-gray);
}

/* Liens de catégories */
.reuniloc-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    color: var(--reuniloc-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.reuniloc-cat-parent > .reuniloc-cat-header > .reuniloc-cat-link {
    padding-left: 0;
    font-weight: 600;
}

.reuniloc-cat-link:hover {
    background-color: var(--reuniloc-light);
    color: var(--reuniloc-primary);
}

.reuniloc-cat-item.active > .reuniloc-cat-link,
.reuniloc-cat-item.active > .reuniloc-cat-header > .reuniloc-cat-link {
    background-color: var(--reuniloc-primary);
    color: white;
    font-weight: 600;
}

.reuniloc-cat-item.active > .reuniloc-cat-link:hover,
.reuniloc-cat-item.active > .reuniloc-cat-header > .reuniloc-cat-link:hover {
    background-color: #008c5a;
}

/* Nom de la catégorie */
.reuniloc-cat-name {
    flex: 1;
}

/* Compteur d'annonces */
.reuniloc-cat-count {
    font-size: 12px;
    color: var(--reuniloc-gray);
    background: var(--reuniloc-light);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.reuniloc-cat-item.active .reuniloc-cat-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Sous-liste (enfants) */
.reuniloc-cat-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8f9fa;
}

.reuniloc-cat-parent.open .reuniloc-cat-sublist {
    max-height: 1000px;
}

.reuniloc-cat-child .reuniloc-cat-link {
    padding-left: 45px;
    font-size: 14px;
    font-weight: normal;
}

.reuniloc-cat-child .reuniloc-cat-link::before {
    content: '→';
    margin-right: 8px;
    color: var(--reuniloc-gray);
}

.reuniloc-cat-child.active .reuniloc-cat-link::before {
    color: white;
}

/* Animation hover sur toggle */
.reuniloc-cat-toggle:hover .reuniloc-icon-chevron::before {
    color: var(--reuniloc-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .reuniloc-categories-menu {
        margin-bottom: 20px;
    }
}

/* Style alternatif : Accordéon simple */
.reuniloc-categories-menu.style-accordion .reuniloc-cat-parent {
    border: 1px solid var(--reuniloc-border);
    border-radius: var(--reuniloc-radius);
    margin-bottom: 5px;
}

.reuniloc-categories-menu.style-accordion .reuniloc-cat-item {
    border-bottom: none;
}

/* Style alternatif : Flat (sans bordures) */
.reuniloc-categories-menu.style-flat {
    box-shadow: none;
    border: 1px solid var(--reuniloc-border);
}

.reuniloc-categories-menu.style-flat .reuniloc-cat-item {
    border-bottom: none;
}

.reuniloc-categories-menu.style-flat .reuniloc-cat-link:hover {
    background-color: transparent;
    color: var(--reuniloc-primary);
    padding-left: 20px;
}
