/* Mobile styles */
@media (max-width: 480px) {
    #top-menu-container {
        gap: 6px;
    }
    
    #menu-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .menu-text {
        display: none;
    }
}

/* Tablet and mobile filters */
@media (max-width: 768px) {
    #filters-container {
        height: 38%;
    }
    
    .filter-column {
        min-width: calc(38% - 3px);
        max-width: calc(38% - 3px);
        padding: 10px;
    }
    
    #filters-content {
        gap: 4px;
        padding: 4px 4px 20px 4px;
        /* Permettre scroll horizontal uniquement dans les filtres */
        touch-action: pan-x;
    }
    
    .filter-items {
        padding-bottom: 15px;
        /* Permettre scroll vertical dans les listes */
        touch-action: pan-y;
    }
    
    .filter-item {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        margin-bottom: 2px;
        padding: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: block;
        width: 100%;
        box-sizing: border-box;
        /* Permettre tap sur les filtres */
        touch-action: auto;
    }
    
    .filter-item:hover, .filter-item:active {
        background: rgba(0, 122, 255, 0.2);
        border-color: rgba(0, 122, 255, 0.4);
        transform: translateY(-1px);
    }
    
    .filter-item label {
        cursor: pointer;
        display: flex;
        align-items: center;
        width: 100%;
        font-size: 12px;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.8);
        margin: 0;
        padding: 0;
        /* Permettre tap sur les labels */
        touch-action: auto;
    }
    
    .filter-item input[type="checkbox"] {
        margin-right: 6px;
        transform: scale(0.9);
        /* Permettre tap sur les checkboxes */
        touch-action: auto;
    }
    
    .filter-column h4 {
        font-size: 11px;
        margin: 0 0 6px 0;
    }
    
    .filter-search {
        padding: 4px 8px;
        font-size: 14px;
        /* Permettre focus sur les champs de recherche */
        touch-action: auto;
    }
    
    #filters-close-icon {
        bottom: calc(38% + 10px);
        width: 26px;
        height: 26px;
        /* Permettre tap sur le bouton fermer */
        touch-action: auto;
    }
    
    .setting-description {
        margin-left: 0;
        margin-top: 4px;
    }
    
    /* S'assurer que les éléments UI sont interactifs */
    .setting-toggle {
        touch-action: auto;
    }
    
    .toggle-slider {
        touch-action: auto;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    #filters-container {
        height: 32%;
    }
    
    .filter-column {
        min-width: calc(36% - 2px);
        max-width: calc(36% - 2px);
        padding: 8px;
    }
    
    #filters-content {
        gap: 3px;
        padding: 3px 3px 25px 3px;
    }
    
    .filter-items {
        padding-bottom: 20px;
    }
    
    .filter-item {
        padding: 7px;
        margin-bottom: 2px;
    }
    
    .filter-item label {
        font-size: 11px;
    }
    
    .filter-item input[type="checkbox"] {
        transform: scale(0.9);
    }
    
    #filters-close-icon {
        bottom: calc(32% + 10px);
        right: 15px;
        width: 24px;
        height: 24px;
    }
}

/* Desktop: 5.5 colonnes visibles */
@media (min-width: 768px) {
    .filter-column {
        min-width: calc(18.18% - 6px);
        max-width: calc(18.18% - 6px);
    }
    
    #filters-content {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
    
    #filters-content::-webkit-scrollbar {
        height: 8px;
    }
    
    #filters-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    
    #filters-content::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 10px;
    }
    
    #filters-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .filter-column {
        min-width: calc(18.18% - 6px);
        max-width: calc(18.18% - 6px);
    }
}