/** Formations **/

.expanded {
    display: block !important;
}

.collapsed {
    display: none !important;
}

/* ── Infobar (disponibilité + lien présentation) ──────── */

.cdf-formation-infobar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem 0 1.25rem;
    border-bottom: 1px solid rgba(194, 198, 212, 0.22);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.cdf-availability-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #727783;
    margin: 0;
}

.cdf-availability-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #006c49;
    flex-shrink: 0;
}

.cdf-formation-infobar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #005EB8;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.cdf-formation-infobar-link:hover {
    color: #003d7a;
}

.cdf-infobar-ext-icon {
    font-size: 0.85rem !important;
    line-height: 1 !important;
    vertical-align: middle;
    transition: transform 0.15s;
}

.cdf-formation-infobar-link:hover .cdf-infobar-ext-icon {
    transform: translate(1px, -1px);
}

/* ── Sidebar / Tabs ───────────────────────────────────── */

.formation_content {
    font-family: 'Inter', -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    background: #f8f9ff;
}

.tabs {
    width: 220px;
    flex-shrink: 0;
    background: #ffffff;
    padding: 1.5rem 0 1.5rem;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    border-right: 1px solid #eff4ff;
}

.formation_content.tab-form .tabs {
    display: flex;
}

/* Heading "Étapes / Formation" */
.cdf-sidebar-heading {
    padding: 0 1.5rem 1.25rem;
}

.cdf-sidebar-title {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0b1c30;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.cdf-sidebar-subtitle {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a99b0;
    margin-top: 0.2rem;
}

/* Boutons d'étape */
.tab-btn {
    width: 100%;
    background: transparent;
    color: #8a99b0;
    border: none;
    border-right: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
    position: relative;
}

.tab-btn:hover {
    background: #f8f9ff;
    color: #424752;
}

.tab-btn.active {
    background: #f1f5ff;
    color: #005EB8;
    border-right-color: #005EB8;
}

.tab-btn.completed {
    color: #006c49;
}

.tab-btn.locked {
    color: #c2c6d4;
    cursor: default;
    opacity: 0.7;
}

/* Numéro de l'étape */
.cdf-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tab-btn.active   .cdf-step-num { background: #005EB8; color: #fff; border-color: #005EB8; }
.tab-btn.completed .cdf-step-num { background: #006c49; color: #fff; border-color: #006c49; }
.tab-btn.locked    .cdf-step-num { background: transparent; }

/* Label texte de l'étape */
.cdf-step-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Icône check / lock en fin de ligne */
.cdf-step-icon {
    font-size: 1rem !important;
    flex-shrink: 0;
    line-height: 1 !important;
}

.cdf-step-icon--check { color: #006c49; }
.cdf-step-icon--lock  { color: #c2c6d4; }

/* Barre de progression en bas de la sidebar */
.cdf-sidebar-progress {
    margin-top: auto;
    padding: 1.25rem 1.5rem 0.5rem;
}

.cdf-sidebar-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.cdf-sidebar-progress-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a99b0;
}

.cdf-sidebar-progress-pct {
    font-size: 0.6rem;
    font-weight: 700;
    color: #005EB8;
}

.cdf-sidebar-progress-track {
    height: 5px;
    border-radius: 9999px;
    background: #dce9ff;
    overflow: hidden;
}

.cdf-sidebar-progress-bar {
    height: 100%;
    border-radius: 9999px;
    background: #005EB8;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.formation_content .content-container {
    flex: 1;
    background: white;
    min-height: 600px;
    position: relative;
}

.formation_content.tab-form .content-container {
    /*border-radius: 12px;*/
    /*padding: 30px;*/
    /*box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);*/
}

.formation_content .content_header {
    padding: 15px;
    line-height: 1;
    /*background-color: #f1f1f1;*/
    background-color: #fff;
    border: 1px solid #303030;
    transition: all .3s ease-in-out;
    cursor: pointer;
    color: rgb(51, 51, 51);
    display: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 30px;
}

.formation_content.acc-form .content_header {
    display: block;
}

.formation_content .content_header:hover {
    color: white;
    background-color: #414141;
}

.formation_content .content_header.active {
    color: #da2d19;
    border-color: #da2d19;
    background-color: white;
}

.formation_content .content_header::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg aria-hidden='true' class='fa-accordion-icon e-font-icon-svg e-fas-plus' viewBox='0 0 448 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgb(51, 51, 51)' d='M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'%3E%3C/path%3E%3C/svg%3E");
    margin-left: 10px;
    margin-right: 10px;
}

.formation_content .content_header:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg aria-hidden='true' class='fa-accordion-icon e-font-icon-svg e-fas-plus' viewBox='0 0 448 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'%3E%3C/path%3E%3C/svg%3E");
}

.formation_content .content_header.active::before {
    background-image: url("data:image/svg+xml,%3Csvg aria-hidden='true' class='fa-accordion-icon e-font-icon-svg e-fas-minus' viewBox='0 0 448 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23da2d19' d='M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z'%3E%3C/path%3E%3C/svg%3E");
}

.formation_content .content {
    display: none;
    padding: 20px;
    position: relative;
}

.formation_content.acc-form .content {
    border: 1px solid #eee;
}

.formation_content .content.active {
    display: block;
}

.formation_content .content.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(230, 230, 230, 0.7);
    z-index: -1;
}

.formation_content .locked-message {
    display: none;
}

.formation_content .locked-message:not(:empty) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #424752;
    background: #eff4ff;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1.25rem;
}

.formation_content .locked-message:not(:empty)::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #005EB8;
    flex-shrink: 0;
}

.formation_content .video-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.formation_content .video_item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.formation_content .video-thumbnail {
    width: 80px;
    height: 50px;
    background: #f8f8f8;
}

.formation_content .passed_date {
    font-size: 80%;
    font-style: italic;
    text-align: right;
}



/** Galerie **/


.formation_cartridge {
    display: inline-block;
    text-align: center;
    width: 330px;
    height: 460px;
    box-sizing: border-box;
    margin: 10px;
    position: relative;
}

.formation_cartridge:hover {
    outline: 1px solid #da2d19;
}

.formation_cartridge.unavailable {
    background-color: rgba(211, 211, 211, 0.53);
}

.formation_cartridge.unavailable:hover {
    outline: 1px solid lightgrey;
}

.formation_cartridge.validated::after {
    content: '✓';
    color: #00cc99;
    font-size: 1.5em;
    position: absolute;
    top: -20px;
    right: -20px;
    border-radius: 50%;
    border: 1px solid lightgrey;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0.3em; /* Optional: add padding for better appearance */
    background: white;
    z-index: 20;
    width: 2em;
}

.formation_thumbnail {
    aspect-ratio: 768 / 499;
    overflow: hidden;
    position: relative;
}

.formation_thumbnail IMG {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.formation_gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.formation_name {
    color: #da2d19;
    text-transform: uppercase;
    margin-bottom: 10px;
    height: 50px;
}

.formation_summary {
    font-size: 90%;
    text-align: left;
    line-height: 1.9;
}

.formation_summary .fas {
    margin-right: 10px;
}

.formation_cartridge .keyword-tags {
    flex-wrap: wrap;
    gap: 6px;
    display: none;
    background: white;
    padding: 10px;
    border: 1px solid lightgrey;
    z-index: 20;
    position: relative;
}
.formation_cartridge:hover .keyword-tags {
    display: flex;
}


.formation_cartridge .keyword-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.formation_cartridge .keyword-tag:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
}


/* Swiper Carousel Styles */
.formation_gallery_swiper {
    width: 100%;
    padding: 20px 0;
    border: 1px solid transparent; /* Debug: to see if CSS is loaded */
}

.formation_gallery_swiper .swiper-wrapper {
    align-items: stretch;
}

.formation_cartridge.swiper-slide {
    margin: 10px;
    height: auto;
    display: flex;
    flex-direction: column;
    opacity: 0.9; /* Debug: to see if this style is applied */
}

.swiper-button-next,
.swiper-button-prev {
    color: #0073aa;
}

.swiper-pagination-bullet-active {
    background: #0073aa;
}

/* Debug: Highlight Swiper elements */
[data-swiper-debug="formation-gallery"] {
    outline: 2px solid yellow; /* Debug: show container exists */
    background-color: rgba(255, 255, 0, 0.05); /* Debug: subtle background */
}

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none; /* Hide navigation buttons on mobile, rely on swipe */
    }
}

/** galerie des vidéos **/

.video_item {
    list-style: none;
    width: 300px; /* adjust as needed */
    font-family: Arial, sans-serif;
    margin: 15px 15px 30px;
    position: relative;
}

.video_item a {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video_item a:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video_thumbnail {
    position: relative;
    display: block;
    width: 100%;
}

.video_thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.video_item a:hover .video_thumbnail img {
    transform: scale(1.05);
}

.video_duration {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

.video_title {
    display: block;
    font-weight: bold;
    font-size: 16px;
    margin: 10px 0 5px 10px;
}

.video_description {
    display: block;
    font-size: 14px;
    color: #555;
    margin: 0 0 10px 10px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 20px 20px 20px 0;
    margin: 0;
}


/** embed de la video */


.video_modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video_modal.show {
    display: block;
    opacity: 1;
}

.video_modal_content {
    margin: 5% auto;
    padding: 10px;
    border-radius: 10px;
    background-color: #fff;
    position: relative;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video_modal_close_btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.video_modal_close_btn:hover,
.video_modal_close_btn:focus {
    color: black;
    text-decoration: none;
}

.video_modal_player_container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video_modal_iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video_modal_spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.video_modal_iframe_loading .video_modal_spinner {
    display: block;
}

.formation_count {
    color: grey;
    font-style: italic;
    font-size: 80%;
}

/*.formation_gallery:has(> *:not([style*="display: none !important"])) {*/
/*    outline: 2px solid blue;*/
/*}*/


/****** Champ de recherche  *****/

.search-filter {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.search-input-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.clear-icon {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.clear-icon:hover {
    opacity: 1;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 75%;
}

.keyword-item:hover {
    background-color: #d1d5db;
}

.keyword-item.checked {
    background-color: rgba(255, 0, 0, 0.73);
    color: white;
}

.highlight {
    background-color: #FF0000BA;
    outline: 2px solid #FF0000BA;
    color: white;
}

.formation_gallery.formation_cartridge {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.formation_gallery .formation_cartridge.hidden {
    display: none !important;
}

.formation_cartridge.filtered-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.formation_gallery .formation_cartridge.my_phase {
    background-color: rgba(255, 0, 0, 0.24);
}

.warning {
    background-color: rgba(255, 0, 0, 0.58);
    color: white;
    padding: 15px;
}

A .formation_link_id {
    color: grey;
}

TR.cedef-formation-ligne.my_phase:not(.validee) {
    /*outline: 1px solid rgba(255, 0, 0, 0.58);*/
    background-color: rgba(255, 141, 141, 0.22);
}

TR.cedef-formation-ligne.validee {
    background-color: rgba(168, 168, 168, 0.22);
}

.internes-table TR.formation-obligatoire * {
    font-weight: bold;
}

.neve-main > .single-post-container .nv-single-post-wrap.col {
     max-width: 100%;
}

.start_formation_btn_div {

}


.bf_done_message {
    margin: auto;
    line-height: 30px;
    background-color: #da2d19;
    display: none;
    padding: 30px;
    color: white;
    text-align: center;
}

.step_done_date {
    font-style: italic;
}

.cedef_attestation_honneur_date {
    font-style: italic;
}


.hidden_if_empty:empty /*, .hidden_if_empty:not(:has(*)):not(:has(text))*/ {
    display: none;
}

.cedef_formation_info {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 1000px;
}

.formation_thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.formation_exceprt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.formation_periodes {
    background: #f9f9f9;
    padding: 1rem;
    border-left: 4px solid #d32f2f; /* Matching the red from the image */
}

.formation_periodes p {
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #666;
}

.formation_periodes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.formation_periodes li {
    font-size: 1rem;
    color: #d32f2f;
    font-weight: 600;
}

.hidden_if_empty:empty {
    display: none;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .cedef_formation_info {
        grid-template-columns: 1fr;
    }
}

/* ── Description de galerie Vimeo ────────────────────────────────────────── */

.cdf-vimeo-description {
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    color: var(--md-sys-color-on-surface, #0b1c30);
    line-height: 1.6;
}

.cdf-vimeo-description p:last-child {
    margin-bottom: 0;
}

/* ── Vidéo unique ─────────────────────────────────────────────────────────── */

.cdf-single-video {
    margin: 0 0 24px;
}

.cdf-single-video__player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.cdf-single-video__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cdf-single-video__title {
    margin: 10px 0 0;
    font-family: 'Manrope', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface, #0b1c30);
}

/* ── Template Diva : liste latérale + lecteur ─────────────────────────────── */
.cdf-diva-wrapper--single {
    grid-template-columns: 1fr;
    min-height: 360px;
}
.cdf-diva-wrapper--single .cdf-diva-player {
    padding: 0;
    min-height: 360px;
}

.cdf-diva-wrapper {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 0;
    background: var(--md-sys-color-surface, #f5f8fc);
    border-radius: 8px;
    overflow: hidden;
}

.cdf-diva-menu {
    overflow-y: auto;
    padding: 12px 0;
    background: var(--md-sys-color-surface-container-low, #eef2f7);
    border-right: none;
}

.cdf-diva-menu h4 {
    font-family: 'Manrope', sans-serif;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant, #4a637a);
    padding: 16px 16px 6px;
    margin: 0;
}

.cdf-diva-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
    transition: background 120ms;
}

.cdf-diva-menu button:hover {
    background: var(--md-sys-color-surface-container, #dde5ef);
}

.cdf-diva-menu button.active {
    background: var(--md-sys-color-surface-container-highest, #c8d4e2);
}

.cdf-diva-menu button .video-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface, #0b1c30);
}

.cdf-diva-menu button .video-author {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    color: var(--md-sys-color-on-surface-variant, #4a637a);
    margin-top: 2px;
}

.cdf-diva-player {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--md-sys-color-surface-container-low, #eef2f7);
}

.cdf-diva-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
}

@media (max-width: 768px) {
    .cdf-diva-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto 56vw;
    }
    .cdf-diva-menu {
        border-right: none;
        border-bottom: 1px solid var(--md-sys-color-outline-variant, #c5d3df);
        max-height: 260px;
    }
}

/* ── Diva compact : liste plus dense, proche de la maquette designer ── */

.cdf-diva-wrapper--compact .cdf-diva-menu {
    padding: 4px 0;
}

.cdf-diva-wrapper--compact .cdf-diva-menu h4 {
    padding: 10px 12px 4px;
    font-size: .7rem;
}

.cdf-diva-wrapper--compact .cdf-diva-menu button {
    padding: 6px 12px;
    border-radius: 0;
    margin: 1px 0;
    width: 100%;
}

.cdf-diva-wrapper--compact .cdf-diva-menu button.active {
    background: var(--md-sys-color-surface-container-highest, #c8d4e2);
    border-radius: 0;
}

.cdf-diva-wrapper--compact .cdf-diva-menu button .video-title {
    font-size: .85rem;
}

.cdf-diva-wrapper--compact .cdf-diva-menu button .video-author {
    font-size: .75rem;
    margin-top: 1px;
}
/* ── Attestation links (summary tab) ─────────────────────────────────────── */
.cdf-attestation-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.cdf-attestation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    background: #00478d;
    color: #fff;
}
.cdf-attestation-btn:hover {
    background: #003570;
    color: #fff;
    text-decoration: none;
}
.cdf-attestation-btn--dl {
    background: transparent;
    color: #00478d;
    box-shadow: inset 0 0 0 2px #00478d;
}
.cdf-attestation-btn--dl:hover {
    background: #e8f0f8;
    color: #00478d;
}
.cdf-attestation-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Bouton info étudiant ── */
.cdf-sidebar-info-btn {
    display: block;
    margin: 8px auto 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #b0bac5;
    background: transparent;
    color: #7a8799;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: .6;
    transition: opacity .15s, border-color .15s, color .15s;
}
.cdf-sidebar-info-btn:hover {
    opacity: 1;
    border-color: #00478d;
    color: #00478d;
}

/* ── Dialog info étudiant ── */
.cdf-student-info-overlay.cdf-si-hidden { display: none; }
.cdf-student-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 48, .45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s;
}
.cdf-student-info-overlay.cdf-si-visible {
    opacity: 1;
}
.cdf-student-info-dialog {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px 22px;
    max-width: 480px;
    width: 92%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    transform: translateY(-10px);
    transition: transform .18s;
}
.cdf-student-info-overlay.cdf-si-visible .cdf-student-info-dialog {
    transform: translateY(0);
}
.cdf-student-info-dialog h2 {
    margin: 0 0 14px;
    font-size: 17px;
    color: #0b1c30;
    font-family: Manrope, sans-serif;
}
.cdf-student-info-dialog p,
.cdf-student-info-dialog li {
    font-size: 14px;
    color: #3a4a5a;
    line-height: 1.6;
    font-family: Inter, sans-serif;
}
.cdf-student-info-dialog ul {
    margin: 8px 0 12px 18px;
    padding: 0;
}
.cdf-student-info-dialog li {
    margin-bottom: 7px;
}
.cdf-student-info-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #7a8799;
    line-height: 1;
    padding: 0;
}
.cdf-student-info-close:hover {
    color: #0b1c30;
}
.cdf-student-info-footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}
.cdf-student-info-ok {
    background: #00478d;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.cdf-student-info-ok:hover {
    background: #003570;
}
