/* ===== LAYOUT PRINCIPAL ===== */
.catalog-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.catalog-main {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 1023px) {
    .catalog-main {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ===== SIDEBAR FILTRES ===== */
.catalog-sidebar {
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .catalog-sidebar {
        /*max-height: calc(100vh - 200px);*/
        max-height: 1500px;
        position: sticky;
        top: 150px;
        overflow-y: auto;
        padding-right: 0.5rem;
    }

    .catalog-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .catalog-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .catalog-sidebar::-webkit-scrollbar-thumb {
        background: #0c4a6e;
        border-radius: 3px;
    }

    .catalog-sidebar::-webkit-scrollbar-thumb:hover {
        background: #3d63b8;
    }
}

@media (max-width: 1023px) {
    .catalog-sidebar {
        width: 100%;
    }
}

/* ===== CONTENU PRINCIPAL (CATALOGUE) ===== */
.catalog-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ===== SECTION FILTRES ===== */
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .filters-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 0;
    }
}

/* ===== GROUPE FILTRE ===== */
.filter-group {
    width: 100%;
}

/* ===== HEADER FILTRE ===== */
.filter-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(100, 120, 150, 0.3);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(30, 50, 80, 0.3));
    color: #e0f2fe;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-header:hover {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.5), rgba(15, 40, 71, 0.4));
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .filter-header {
        cursor: default;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(30, 50, 80, 0.3));
        border-color: rgba(100, 120, 150, 0.3);
        color: #e0f2fe;
    }

    .filter-header:hover {
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(30, 50, 80, 0.3));
        border-color: rgba(100, 120, 150, 0.3);
        color: #e0f2fe;
    }
}

.filter-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.filter-title {
    flex: 1;
}

.filter-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filter-toggle-icon.rotated {
    transform: rotate(180deg);
}

@media (min-width: 1024px) {
    .filter-toggle-icon {
        display: none;
    }
}

/* ===== CONTENU FILTRE ===== */
.filter-content {
    display: none;
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(100, 120, 150, 0.2);
    backdrop-filter: blur(8px);
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.filter-content::-webkit-scrollbar {
    width: 4px;
}

.filter-content::-webkit-scrollbar-track {
    background: transparent;
}

.filter-content::-webkit-scrollbar-thumb {
    background: #0c4a6e;
    border-radius: 2px;
}

.filter-content.active {
    display: flex;
}

@media (min-width: 1024px) {
    .filter-content {
        display: flex !important;
        margin-top: 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
        max-height: none;
        overflow: visible;
        padding: 1rem;
        background: rgba(15, 23, 42, 0.3);
    }

    #list_genres .filter-content {
        max-height: 500px;
        overflow-y: auto;
    }
}

/* ===== SEARCH BAR GENRES ===== */
.genre-search-container {
    display: none;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 1024px) {
    .genre-search-container {
        display: flex;
    }
}

.genre-search-container input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(100, 120, 150, 0.3);
    background: rgba(51, 65, 85, 0.3);
    color: #cbd5e1;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.3s ease;
}

.genre-search-container input:focus {
    background: rgba(51, 65, 85, 0.5);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
}

.genre-search-container input::placeholder {
    color: rgba(203, 213, 225, 0.4);
}

/* ===== CHECKBOX ITEMS ===== */
.filter-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.4), rgba(30, 41, 59, 0.3));
    border: 1px solid rgba(100, 120, 150, 0.3);
    color: #cbd5e1;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-checkbox-item:hover {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(51, 65, 85, 0.4));
    border-color: rgba(148, 163, 184, 0.5);
    color: #ffffff;
}

.filter-checkbox-item.checked {
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.5), rgba(7, 89, 133, 0.4));
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
}

.filter-checkbox-item.hidden {
    display: none;
}

.filter-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: #0ea5e9;
    margin: 0;
    flex-shrink: 0;
}

.filter-checkbox-item span {
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1024px) {
    .filter-checkbox-item {
        display: flex;
        width: 100%;
    }
}

/* ===== SEARCHBAR ===== */
.searchbar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border: 1px solid rgba(100, 120, 150, 0.3);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(30, 50, 80, 0.3));
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.searchbar-container:focus-within {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.5), rgba(15, 40, 71, 0.4));
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.searchbar-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: #0ea5e9;
    flex-shrink: 0;
}

.searchbar-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    outline: none;
}

.searchbar-input::placeholder {
    color: rgba(203, 213, 225, 0.5);
}

/* ===== BOUTONS ACTION ===== */
.catalog-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid rgba(100, 120, 150, 0.3);
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.5), rgba(7, 89, 133, 0.4));
    color: #e0f2fe;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.catalog-btn:hover {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.6), rgba(8, 145, 178, 0.5));
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.catalog-btn-reset {
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.5), rgba(28, 25, 23, 0.4));
    border-color: rgba(120, 113, 108, 0.3);
    padding: 0.6rem;
}

.catalog-btn-reset:hover {
    background: linear-gradient(135deg, rgba(87, 83, 78, 0.6), rgba(68, 64, 60, 0.5));
    border-color: rgba(168, 162, 158, 0.5);
    box-shadow: 0 6px 16px rgba(120, 113, 108, 0.3);
}

.catalog-btn-random {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.5), rgba(31, 41, 55, 0.4));
    border-color: rgba(107, 114, 128, 0.3);
}

.catalog-btn-random:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.6), rgba(75, 85, 99, 0.5));
    border-color: rgba(156, 163, 175, 0.5);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.3);
}

.catalog-btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.catalog-btn-icon-large {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
}

@media (max-width: 768px) {
    .catalog-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* ===== ACTION BUTTONS CONTAINER ===== */
.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.2);
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

/* ===== CATALOGUE GRID ===== */
#list_catalog {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.2);
    border-radius: 6px;
    padding: 2rem 1rem;
    width: 100%;
    flex: 1;
}

/* ===== PAGINATION ===== */
#list_pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

/* catalogue - NEW VERSION */
#list_types, #list_langues, #list_genres {
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}

#list_types.active, #list_langues.active, #list_genres.active {
    max-height: 4000px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Sur PC: toujours visible */
@media (min-width: 1024px) {
    #list_types, #list_langues, #list_genres {
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: all !important;
    overflow: visible !important;
    }
}

.transition-transform {
    transition: transform 0.3s ease;
}

#iconTypes.open, #iconLangues.open, #iconGenres.open {
    transform: rotate(180deg);
}

#iconTypes.rotated, #iconLangues.rotated, #iconGenres.rotated {
    transform: rotate(180deg);
}