/* Styles pour la page vidéo */
@font-face {
    font-family: 'ApfelGrotezk-Satt';
    src: url('../data/Polices-Labeleco/Apfel/ApfelGrotezk-Satt.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(circle at 15% 20%, #3d0c88 0%, #17003f 45%, #0a001f 100%);
    color: white;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(145deg, rgba(10, 0, 31, 0.7), rgba(23, 0, 63, 0.84));
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

#vidSwiper {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: calc(100% - 40px);
    height: auto;
    padding: 20px;
    box-sizing: border-box;
}

.vertical-swiper {
    width: 100vw;
    height: auto;
    overflow: visible;
}

.page-slide {
    display: block;
    margin-bottom: 28px;
}

#vidSwiper > .swiper-wrapper {
    display: block;
    transform: none !important;
}

#vidSwiper > .swiper-wrapper > .page-slide {
    width: 100% !important;
    height: auto;
}

#vidSwiper > .swiper-wrapper > .page-slide:last-child {
    margin-bottom: 0;
}

#vidSwiper > .vertical-pagination {
    display: none;
}

.vertical-pagination .swiper-pagination-bullet-active {
    background: #FFDE07;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1400;
    margin-bottom: 20px;
    padding: 15px;
    background:
        linear-gradient(135deg, rgba(23, 0, 63, 0.96) 0%, rgba(61, 12, 136, 0.92) 58%, rgba(255, 222, 7, 0.42) 100%),
        radial-gradient(circle at top right, rgba(255, 222, 7, 0.28), transparent 42%);
    border: 1px solid rgba(255, 222, 7, 0.22);
    box-shadow: 0 10px 24px rgba(10, 0, 31, 0.22);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    gap: 16px;
}

nav span {
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* ---- Search bar ---- */
.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 340px;
    z-index: 1450;
}

.search-input {
    width: 100%;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 222, 7, 0.45);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    border-color: #FFDE07;
    background: rgba(255, 222, 7, 0.08);
}

/* Hide browser default clear button */
.search-input::-webkit-search-cancel-button { display: none; }

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #17003f;
    border: 1px solid rgba(255, 222, 7, 0.4);
    border-radius: 10px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 1600;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.search-results[hidden] { display: none; }

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

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

.search-result-item:hover,
.search-result-item[aria-selected="true"] {
    background: rgba(255, 222, 7, 0.15);
}

.search-result-item .result-title {
    font-weight: 700;
    color: #FFDE07;
}

.search-result-item .result-title mark {
    background: none;
    color: #fff;
    font-weight: 900;
    text-decoration: underline;
}

.search-result-item .result-tag {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.search-no-result {
    padding: 12px 16px;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-style: italic;
}

.back-btn {
    color: #FFDE07;
    text-decoration: none;
    font-weight: bold;
}

.back-btn:hover {
    color: #E5C500;
}

.eco-pulse-card {
    position: relative;
    z-index: 1;
    background-image:
        linear-gradient(120deg, rgba(23, 0, 63, 0.78), rgba(10, 0, 31, 0.76)),
        url('../img/labeleco.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(255, 222, 7, 0.45);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 0 20px 0;
    box-shadow: 0 10px 35px rgba(255, 222, 7, 0.18);
    backdrop-filter: blur(4px);
    display: grid;
    gap: 12px;
}

.eco-pulse-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.eco-kicker {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #ffde07;
}

.live-toggle-btn {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 222, 7, 0.55);
    background: rgba(255, 222, 7, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.live-toggle-btn:hover,
.live-toggle-btn:focus-visible {
    background: rgba(255, 222, 7, 0.26);
    box-shadow: 0 6px 16px rgba(255, 222, 7, 0.28);
    transform: translateY(-1px);
    outline: none;
}

.live-toggle-btn.is-live {
    background: rgba(255, 222, 7, 0.35);
    color: #17003f;
    box-shadow: 0 0 0 1px rgba(255, 222, 7, 0.3), 0 0 18px rgba(255, 222, 7, 0.42);
}

.live-toggle-btn.pre-live {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

.live-message {
    margin: 0;
    font-size: 0.8rem;
    color: #FFDE07;
    opacity: 0.9;
    font-style: italic;
}

.eco-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.eco-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
}

.eco-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.eco-reaction-btn {
    border: 1px solid rgba(255, 222, 7, 0.4);
    background: rgba(255, 222, 7, 0.12);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.eco-reaction-btn:hover,
.eco-reaction-btn:focus-visible {
    background: rgba(255, 222, 7, 0.28);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 15px rgba(255, 222, 7, 0.25);
    outline: none;
}

.eco-feedback {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
}

body.eco-boost {
    animation: ecoFlash 0.45s ease;
}

@keyframes ecoFlash {
    0% {
        filter: saturate(100%);
    }
    30% {
        filter: saturate(145%);
    }
    100% {
        filter: saturate(100%);
    }
}

.main-video-title {
    margin: 0 0 16px 0;
    color: #fff;
    font-family: 'ApfelGrotezk-Satt', 'Segoe UI', Arial, sans-serif;
    font-size: clamp(1.25rem, 1.9vw, 1.8rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.01em;
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    padding-left: 0;
    margin-left: 0;
}

.player-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 20px;
}

.main-video-column {
    min-width: 0;
}

.main-player iframe,
.main-player video {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    border: none;
}

.live-fullscreen-video {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
    top: -9999px;
}

.live-fullscreen-video:fullscreen,
.live-fullscreen-video:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    opacity: 1;
    pointer-events: auto;
    left: 0;
    top: 0;
    background: #000;
}

.live-comments-panel {
    border: 1px solid rgba(255, 222, 7, 0.35);
    border-radius: 12px;
    background: rgba(7, 2, 24, 0.85);
    overflow: hidden;
    min-height: 100%;
}

.live-comments-header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.live-comments-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #ffde07;
}

.live-comments-header p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.live-comments-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
}

.live-comment-item {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 7px 9px;
}

.live-comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.68);
}

.live-comment-item p {
    margin: 0;
    font-size: 0.84rem;
}

.live-comment-form {
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.live-comment-form input {
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px;
}

.live-comment-form input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.live-comment-form button {
    border: none;
    border-radius: 10px;
    background: #ffde07;
    color: #17003f;
    font-weight: 800;
    cursor: pointer;
    padding: 0 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.chapter-list {
    background: #17003f;
    padding: 20px;
    border-radius: 10px;
    min-height: 400px;
}

.chapter-list h4 {
    margin: 0 0 15px 0;
    color: #FFDE07;
    font-weight: bold;
}

.chapter-item {
    padding: 10px;
    margin-bottom: 5px;
    background: #17003f;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.chapter-item:hover {
    background: #2A0A66;
    color: #fff;
}

.clips-section h3 {
    color: #FFDE07;
    margin-bottom: 20px;
    font-weight: bold;
}

.clips-section {
    margin-top: 36px;
}

.clips-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.clips-header h3 {
    margin-bottom: 0;
}

.carousel-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 222, 7, 0.5);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(61, 12, 136, 0.95), rgba(23, 0, 63, 0.95));
    color: #FFDE07;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover {
    transform: translateY(-1px);
    border-color: #FFDE07;
    background: linear-gradient(135deg, rgba(88, 26, 184, 0.98), rgba(33, 0, 79, 0.98));
}

.carousel-btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.clip-card iframe {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    border: none;
}

.clip-card video {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
    background: #000;
    object-fit: cover;
}
.clips-section .swiper-slide.clip-card {
    height: auto !important;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 10px;
    overflow: visible;
    width: 300px !important;
    flex-shrink: 0;
}

.clips-section .swiper-slide.clip-card video {
    height: 180px;
    border-radius: 10px;
    width: 100%;
    object-fit: cover;
    background: #000;
    display: block;
}

.clip-info {
    padding: 8px 4px 4px;
}

.clip-title {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clip-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Swiper horizontal scroll styles */
.clips-section .swiper {
    overflow: hidden;
    border-radius: 10px;
    margin-top: 15px;
    width: 100%;
}

.clips-section .swiper-wrapper {
    display: flex;
}

.clips-section .swiper-pagination {
    position: relative;
    bottom: auto;
    padding-top: 10px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
    gap: 24px;
    align-items: stretch;
    margin-top: 12px;
    margin-bottom: 8px;
}

.description-block {
    margin-top: 0;
    border-radius: 12px;
    background: rgba(23, 0, 63, 0.54);
    padding: 8px 0 8px 0;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

.description-block p {
    color: #fff;
    margin: 0;
    width: 100%;
    max-width: none;
    line-height: 1.75;
}

.description-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 222, 7, 0.9);
}

.final-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media screen and (max-width: 900px) {
    .clips-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-wrapper {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-player video {
        height: 300px;
    }

    .chapter-list {
        min-height: auto;
    }

    .live-comment-form {
        grid-template-columns: 1fr;
    }

    .eco-pulse-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .eco-actions {
        gap: 8px;
    }
}

.quiz-card {
    background: #17003f;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.quiz-card h3 {
    color: #FFDE07;
    margin-bottom: 15px;
}

.quiz-card p {
    margin-bottom: 15px;
}

.quiz-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.quiz-btn {
    background: #FFDE07;
    color: #17003f;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.quiz-btn:hover {
    background: #E5C500;
    color: #17003f;
}

#resultText {
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    background: #17003f;
    transition: background 0.3s ease;
}

.second-slide-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.second-slide-layout .action-buttons {
    margin-top: 8px;
    padding-bottom: 2px;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ffffff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #17003f;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-primary:hover {
    background: #3d0c88;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-secondary {
    background: #17003f;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background: #3d0c88;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
