/* Style pour la popup des catégories enfants */
.subcategory-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.subcategory-popup.show {
    opacity: 1;
    visibility: visible;
}

.subcategory-popup-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.subcategory-popup.show .subcategory-popup-content {
    transform: scale(1);
}

.subcategory-popup-header {
    background: #DD725B;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.subcategory-popup-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.subcategory-popup-title .category-emoji {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
}

.subcategory-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.subcategory-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.subcategory-popup-list {
    padding: 14px 18px 18px;
    max-height: 62vh;
    overflow-y: auto;
}

/* En-tête de groupe (une sous-catégorie qui contient d'autres sous-catégories) */
.subcategory-popup-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 8px;
    padding: 0 4px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #DD725B;
    border-bottom: 1px solid #f0e2de;
}

.subcategory-popup-group:first-child {
    margin-top: 0;
}

/* Groupe imbriqué (niveau 2+) : un peu plus discret, avec un trait vertical */
.subcategory-popup-group.is-nested {
    color: #a85446;
    font-size: 0.72rem;
    border-left: 2px solid #eabfb5;
    border-bottom: none;
    padding: 2px 0 2px 8px;
    margin: 10px 0 6px;
}

.subcategory-popup-group .subcategory-emoji {
    font-size: 1rem;
}

.subcategory-popup-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #faf7f6;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    border: 1.5px solid #f1e7e4;
}

.subcategory-popup-item:hover {
    background: #fff;
    transform: translateX(2px);
    border-color: #DD725B;
    box-shadow: 0 4px 14px rgba(221, 114, 91, 0.15);
}

.subcategory-popup-item .subcategory-emoji {
    font-size: 1.4rem;
    margin-right: 13px;
    min-width: 26px;
    text-align: center;
}

.subcategory-popup-item h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: #333;
}

/* Chevron à droite des feuilles cliquables */
.subcategory-popup-chevron {
    margin-left: auto;
    padding-left: 12px;
    font-size: 1.4rem;
    line-height: 1;
    color: #DD725B;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .subcategory-popup-content {
        width: 95%;
        max-width: 350px;
    }
    
    .subcategory-popup-title {
        font-size: 1.3rem;
    }
    
    .subcategory-popup-item {
        padding: 12px;
    }
    
    .subcategory-popup-item h3 {
        font-size: 1rem;
    }
} 