/* Styles des filtres */
#katalog-filterrow {
    width: 100%;
    gap: 12px;
}

#katalog-filterrow select.filteroptions {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("https://septeo.elearningtouch.info/blocks/katalog/pix/chevron.png");
    background-repeat: no-repeat;
    background-position: center right 4px;
    background-size: 20px 20px;
}


.icon {
    max-width: 100%;
    max-height: 100%;
}

.path-blocks-katalog .filtercontrol {
    width: 250px;
}

.path-blocks-katalog .filtercontrol>h5 {
    border: 0;
    padding: 8px 0;
}

.path-blocks-katalog .filtercontrol .filteroptions label:hover {
    background-color: #f1f1f1;
}

.path-blocks-katalog .filtercontrol .filteroptions input:checked+label {
    background-color: #e7eef7;
}

.path-blocks-katalog .filtercontrol .filteroptions input {
    display: none;
}

.path-blocks-katalog .filtercontrol .filteroptions .filter-optiongroup.haschilds {
    border-bottom: 0;
}

.path-blocks-katalog .filtercontrol .filteroptions>li {
    max-width: unset;
}

.filter-item {
    position: relative;
    padding: 8px 16px;
}

.filter-item:hover {
    background-color: #F8FAFC;
}

.filter-item input[type="radio"] {
    display: none;
}

.filter-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.filter-option label {
    padding: 8px;
}

.filter-options {
    text-decoration: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

#page-blocks-katalog-index select.filteroptions {
    background: rgba(255, 255, 255, 1);
    height: 44px;
    padding: 8px 26px 8px 12px;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid rgba(219, 223, 241, 1);
}

#page-blocks-katalog-courseslist .filterfulltext {
    margin-left: 0;
    margin: 20px 0;
    padding-top: 16px;
}

.filterfulltext {
    width: 250px;
    position: relative;
}

.filtersrow {
    flex-direction: row;
    display: flex;
}

.filterscolbox {
    flex-direction: row;
    display: flex;
    margin-top: 12px;
}

.filteroptions {
    display: flex;
}

#katalog-resultscol {
    padding-left: 0;
}

/* Modification du style des selects */
#katalog-filterrow select.filteroptions {
    appearance: none;
    background-image: url(https://septeo.elearningtouch.info/blocks/katalog/pix/chevron.png);
    background-repeat: no-repeat;
    background-position: center right 4px;
    background-size: 20px 20px;
}

select::-ms-expand {
    display: none;
}

select:hover {
    border-color: #BBBBBB;
}

select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Updated Course Detail Page Styles */
.catalog-return {
    margin-bottom: 20px;
}

.catalog-return a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 16px;
}

.course-detail-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    padding: 20px 0;
}

.course-header {
    margin-bottom: 30px;
}

.course-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.course-tagline {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.course-content-layout {
    display: flex;
    width: 100%;
    gap: 40px;
}

.course-main-content {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-right: 20px;
}

.course-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.course-description {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
}

.course-dual-content {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.course-half-section {
    flex: 1;
    background-color: #f8f9fc;
    border-radius: 8px;
    padding: 20px;
}

.course-full-section {
    background-color: #f8f9fc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 8px;
}

.course-half-section h2,
.course-full-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.rich-text-content {
    color: #444;
    line-height: 1.5;
    font-size: 16px;
}

/* Right zone (1/3) */
.course-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.course-image {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.course-image img,
.course-image video {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    object-fit: cover;
    object-position: center;
}

.course-info-card {
    background-color: white;
    border-radius: 0 0 8px 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.info-fields-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customfield-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-weight: 600;
    color: #555;
}

.field-value {
    color: #333;
    font-size: 16px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 12px 0;
    border-top: 1px solid #EAEEF4;
    border-bottom: 1px solid #EAEEF4;
}

.rating-value {
    font-weight: 600;
    font-size: 18px;
}

.participants-count {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.course-access-button {
    background-color: #4a89dc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.course-access-button:hover {
    background-color: #3b7bd4;
    color: white;
    text-decoration: none;
}

/* Course info box styling */
.course-info-summary {
    margin-top: 20px;
}

.course-info-summary .info-item {
    margin-bottom: 10px;
    display: flex;
}

.course-info-summary .info-label {
    font-weight: bold;
    margin-right: 5px;
}

.course-detail-section {
    margin-bottom: 30px;
}

.detail-list {
    list-style: disc;
    padding-left: 20px;
}

/* New course detail layout */
.course-detail-container {
    display: flex;
    gap: 30px;
    padding: 20px 0;
}

.course-main-content {
    flex: 2;
    padding-right: 20px;
}

.course-sidebar {
    flex: 1;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Course description section */
.course-section {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.course-section h3 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

/* 50/50 fields layout */
.course-fields-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.field-column {
    flex: 1;
}

.custom-field-item {
    margin-bottom: 15px;
}

.custom-field-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #80899C;
}

.field-value {
    font-size: 16px;
}

/* Sidebar styling */
.course-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.course-image {
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.course-image img,
.course-image video {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    object-fit: cover;
    object-position: center;
}

.sidebar-fields {
    margin-bottom: 20px;
}

.sidebar-field-item {
    padding: 12px 0;
    border-bottom: 1px solid #EAEEF4;
}

.sidebar-field-item:last-child {
    border-bottom: none;
}

.sidebar-field-item h4 {
    font-size: 14px;
    color: #80899C;
    margin-bottom: 5px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 12px 0;
    border-top: 1px solid #EAEEF4;
    border-bottom: 1px solid #EAEEF4;
}

.course-participants {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    color: #80899C;
    font-size: 14px;
}

.course-access {
    margin-top: 20px;
}

.course-access .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background-color: #4890EB;
    border: none;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pdf-download {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4890EB;
    text-decoration: none;
    font-size: 14px;
}

/* Styles pour le popup de commentaires - alignés avec elt_septeo */
#page-blocks-katalog-detail .detail-foot {
    display: none;
    /* Caché par défaut */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: white;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 24px;
    /* Rendre indépendant du layout de la page */
    margin: 0 auto;
    box-sizing: border-box;
}

/* Overlay pour le fond sombre derrière le popup */
.detail-foot-overlay {
    display: none;
    /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    width: 100%;
    height: 100%;
}

/* Bouton de fermeture */
#detail-foot-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Rendre les éléments déclencheurs clickables */
.comments-trigger {
    cursor: pointer;
}

/* Pour les versions mobiles */
@media (max-width: 715px) {
    #page-blocks-katalog-detail .detail-foot {
        width: 95%;
        padding: 16px;
    }
}

#page-blocks-katalog-detail .ranking-detail {
    max-width: none;
    padding-right: 20px;
    width: 100%;
    margin-bottom: 2rem;
}

/* Styles pour la section de commentaires */
#page-blocks-katalog-detail .course-comments>div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 25px;
    border: solid 1px grey;
    border-radius: 8px;
    padding: 10px;
    gap: 1rem;
}

#page-blocks-katalog-detail .course-comments>div img.userpicture {
    border-radius: 50%;
    margin-right: 10px;
    width: 30px;
    height: 30px;
}

.comment-body {
    align-self: center;
}

#page-blocks-katalog-detail .date-comment {
    font-size: 10px;
    margin: 0;
}

#page-blocks-katalog-detail .label-etoile {
    width: 90px;
}

/* Style pour le résumé de la notation */
#page-blocks-katalog-detail .ranking-summary {
    display: flex;
    padding: 15px 0;
    border-top: 1px solid #EAEEF4;
    border-bottom: 1px solid #EAEEF4;
    margin: 15px 0;
    gap: 15px;
}

#page-blocks-katalog-detail .ranking-summary>div {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
    border-right: 1px solid #EAEEF4;
}

#page-blocks-katalog-detail .ranking-summary>div:last-child {
    border-right: none;
}

#page-blocks-katalog-detail .ranking-summary label {
    font-size: 14px;
    color: #80899C;
    margin-bottom: 5px;
}

/* Styles pour le détail des notes dans le popup */
#page-blocks-katalog-detail .ranking-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#page-blocks-katalog-detail .rating-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #f1f1f1;
    border-radius: 4px;
    overflow: hidden;
}

#page-blocks-katalog-detail .rating-bar>div {
    height: 100%;
    background-color: #4890EB;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .course-content-layout {
        flex-direction: column;
    }

    .course-dual-content {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
    }

    .course-detail-container {
        flex-direction: column-reverse;
    }

    .course-main-content {
        padding-right: 0;
    }

    .course-fields-row {
        flex-direction: column;
        gap: 15px;
    }
}

@media screen and (max-width: 600px) {
    #katalog-filterrow {
        display: block !important;
    }
}

.block_katalog-courseslist .coursebox.state-waiting .panel-body::after {
    content: "Le cours débute bientôt";
    font-size: 16px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 161px;
    background-color: rgba(20, 20, 20, 0.6);
    text-align: center;
    padding-top: 68px;
    color: white;
    padding-top: 68px;
}

.block_katalog-courseslist .coursebox.state-waiting .waiting-label {
    background-color: transparent;
    text-transform: uppercase;
    font-size: 23px;
    font-weight: bold;
    border-top: 2px solid;
    border-bottom: 2px solid;
    left: 30px;
    right: 30px;
    width: calc(100% - 60px);
}

#page-blocks-katalog-index .block_katalog-courseslist .coursebox .katalog-ranking-stars {
    position: absolute;
    top: 0.2rem;
    left: 0.75rem;
}

#page-blocks-katalog-index .block_katalog-courseslist .coursebox .panel-body {
    text-align: left;
}

#block-region-side-pre .block_katalog-courseslist .coursebox.panel {
    width: 100%;
    min-width: 240px;
}

#page-blocks-katalog-detail .catalog-return a {
    padding-left: 20px;
    padding-right: 20px;
}

#page-blocks-katalog-detail #page {
    padding: 48px !important;
    margin-left: 0;
}

.panel-info {
    display: flex;
    height: 100px;
    justify-content: center;
}

.course-progress-wrapper {
    width: 100%;
}

#page-blocks-katalog-detail .drawer-left {
    display: none;
}

#theme_boost-drawers-courseindex .drawer-left,
#theme_boost-drawers-blocks .drawer-left {
    background-color: #FFF;
    width: 0;
    display: none;
}

.progress-label {
    width: fit-content !important;
    height: fit-content;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 10;
}

.filtersrow {
    flex-direction: row;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filtercontrol {
    width: auto;
    min-width: 200px;
}

.block_katalog-courseslist .courses-list,
.block_katalog-courseslist.coursebox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Filtres verticaux */
.filtersrow.vertical-filters {
    flex-direction: column;
    align-items: stretch;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filtersrow.vertical-filters .filtercontrol {
    width: 100%;
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.filtersrow.vertical-filters .filtercontrol:last-child {
    border-bottom: none;
}

.filtersrow.vertical-filters .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.filtersrow.vertical-filters .accordion-header:hover {
    color: var(--primary);
}

.filtersrow.vertical-filters .accordion-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

.filtersrow.vertical-filters .accordion-header .chevron {
    font-size: 12px;
    color: #999;
}

.filtersrow.vertical-filters .accordion-body {
    padding-bottom: 15px;
}

/* Style de la recherche */
.filtersrow.vertical-filters .filterfulltext {
    position: relative;
    width: 100%;
}

.filtersrow.vertical-filters .filterfulltext input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-color: #f9f9f9;
    transition: all 0.2s;
}

.filtersrow.vertical-filters .filterfulltext input:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.filtersrow.vertical-filters .filterfulltext button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Bouton Reset */
.filtersrow.vertical-filters .refreshbutton {
    text-align: center;
}

.filtersrow.vertical-filters .refreshbutton a {
    display: inline-block;
    padding: 5px 15px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    border: none;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.filtersrow.vertical-filters .refreshbutton a:hover {
    background: #e0e0e0;
    color: #333;
}

#page-blocks-katalog-index #page.drawers .main-inner,
#page-blocks-katalog-index #region-main,
#page-blocks-katalog-index .page-header-headings {
    background: none !important;
}

.panel.panel-elt.coursebox {
    background-color: #FFF;
}