/*
 * Topic Filter Styles - Learning Center Search
 */

.learning-center-page .jumbo {
    height: 18vh;
    background-image: url('../../images/learning-jumbo.webp') !important;
}

.learning-center-page .jumbo h1 span {
    color: var(--yellow) !important;
}

/* Reset any theme conflicts */
.learning-center-sidebar input[type="checkbox"] {
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    background-color: #23346ae8 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 1px !important;
    cursor: pointer !important;
    position: relative !important;
    display: inline-block !important;
    vertical-align: middle !important;
    appearance: none;
    width: 20px;
    height: 20px;
    transition: background 0.2s ease;
}

.learning-center-sidebar input[type="checkbox"]:checked {
    background: #23346ae8 !important;
}

.learning-center-sidebar input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: var(--yellow); /* carré blanc */
    border-radius: 2px;
}

.learning-center-search {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    gap: 0;
    min-height: 600px;
}

/* Sidebar Styles */
.learning-center-sidebar {
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: 100vh;
    width: 90%;
    position: sticky;
    top: 0;
    background: var(--s-blue) !important;
    padding: 25px 25px;
    color: white;
}

.learning-center-sidebar label {
    color: var(--yellow);
    font-weight: 900;
}

.learning-center-sidebar form {
    color: white;
}

.sidebar-header h3 {
    font-size: 26px !important;
    line-height: 1em !important;
    font-weight: normal;
    margin: 0 0 15px 0;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-header h2 {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 30px 0;
    color: white;
}

/* Filter Form Styles */
.topic-filter-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* Keywords Section */
.filter-section {
    margin-bottom: 30px;
}

.filter-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: white;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    color: #fff;
    font-size: 16px;
    background-color: #23346ae8 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.1s ease;
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-input::placeholder {
    color: #999;
}

/* Applications Section */
.applications-section {
    margin-bottom: 40px;
}

/* Filter Items */
.filter-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Checkboxes - Force visibility and functionality */
.filter-checkbox {
    width: 16px !important;
    height: 16px !important;
    margin-right: 12px;
    cursor: pointer !important;
    accent-color: white !important;
    background: #23346ae8 !important;
    border-radius: 3px;
    display: inline-block !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Labels */
.filter-label {
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    cursor: pointer;
    color: white;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Fix label click behavior */
.filter-label:before,
.filter-label:after {
    content: none !important;
}

.filter-name {
    font-size: 14px;
    color: white;
    pointer-events: none; /* Prevent text selection interference */
}

.parent-item .filter-name {
    font-weight: 600;
    font-size: 15px;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    min-width: 25px;
    text-align: center;
}

/* Child Categories - Indented */
.child-item {
    margin-left: 20px;
    opacity: 0.9;
}

.child-item .filter-name {
    font-size: 13px;
    font-weight: normal;
}

.child-item .filter-count {
    background: rgba(255, 255, 255, 0.15);
    font-size: 11px;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
}

.btn {
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.1s ease;
}

.btn-primary {
    padding: 14px 20px;
    background: white;
    color: var( --s-blue);
    filter: brightness(0.92);
}

.btn-primary:hover {
    background: var(--yellow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--s-blue);
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
}

.btn-secondary:hover {
    background: #081d4c;
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    color: var(--yellow);
}

.filter-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px -25px;
    background: transparent;
}

.btn.btn-secondary {
    margin-top: 10px;
    display: block;
}

/* Ternary Button */
.btn-ternary {
    background: var(--orange);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.btn-ternary:hover {
    background: #fa9177;
    color: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Main Content Area */
.learning-center-content {
    flex: 1;
    padding: 40px;
    background: #f8fafc;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 28px;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.content-header p {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

/* Results Styles */
.topic-results {
    margin-top: 0;
    padding: 15px 0 0 0;
}

.topic-item {
    margin-bottom: 0;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    transition: none;
    transition: 0.2s;
}

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

.topic-item:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
    background: #f4f5f9;
    padding-left: 10px;
}

.topic-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    color: var(--s-blue) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}


.topic-title h3 {
    font-size: 20px !important;
    line-height: 1.6;
}

.topic-title:hover h3 {
    text-decoration: none;
}

.topic-title-plain {
    color: var(--s-blue) !important;
}

.topic-excerpt {
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
    font-weight: 300;
}

.topic-category {
    display: inline-block;
    background: #dce5ff;
    margin-right: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    text-decoration: none;
}

/* Pagination */
.topic-pagination {
    margin-top: 40px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.topic-pagination .page-numbers {
    display: inline-block;
    padding: 12px 16px;
    margin: 0 4px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: var(--s-blue);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-bottom: 30px;
}

.topic-pagination .page-numbers:hover,
.topic-pagination .page-numbers.current {
    background: var(--s-blue);
    color: white;
    border-color: var(--s-blue);
    text-decoration: none;
}

.topic-pagination .page-numbers.prev,
.topic-pagination .page-numbers.next {
    display: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 40px;
    background: transparent;
    border-radius: 0;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.no-results h3 {
    font-size: 20px;
    color: #1e293b;
    margin: 0 0 12px 0;
    font-weight: 600;
    
}

.no-results p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.no-results p {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .learning-center-search {
        flex-direction: column;
    }
    
    .learning-center-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }
    
    .learning-center-content {
        padding: 30px 20px;
    }
    
    .filter-actions {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .learning-center-sidebar {
        padding: 20px;
    }
    
    .sidebar-header h2 {
        font-size: 24px;
    }
    
    .learning-center-content {
        padding: 20px 15px;
    }
    
    .topic-item {
        padding: 20px;
    }
    
    .topic-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .filter-actions {
        flex-direction: column;
    }
    
    .category-children {
        margin-left: 15px;
    }
    
    .topic-pagination .page-numbers {
        padding: 8px 12px;
        font-size: 14px;
    }
}
