/* 
   QU4TREPLAY - EXCLUSIVE OTT THEME 
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --play-bg: #0b1622;
    --play-surface: #1a242f;
    --play-accent: #e8471c;
    --play-qu4tre: #e8471c;
    --play-text: #ffffff;
    --play-text-muted: #a0a0a0;
    --play-radius: 12px;
    --play-radius-inner: 8px;
    --play-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --play-header-height: 80px;
    --play-container-padding: 110px;
}

* {
    box-sizing: border-box;
}

body.play-theme {
    background-color: var(--play-bg) !important;
    color: var(--play-text) !important;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header Sticky */
.play-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: var(--play-header-height);
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0) 100%);
    display: flex;
    align-items: center;
    padding: 0 var(--play-container-padding);
    transition: var(--play-transition);
}

.play-header.scrolled {
    background: rgba(11, 22, 34, 0.98);
    backdrop-filter: blur(20px);
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.play-logo img {
    height: 40px;
    width: auto;
}

.play-nav {
    margin-left: 50px;
    display: flex;
    gap: 32px;
}

.play-nav-link {
    color: var(--play-text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: var(--play-transition);
    text-transform: uppercase;
}

.play-nav-link:hover,
.play-nav-link.active {
    color: var(--play-text);
}

.play-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.play-search-btn {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.play-search-btn:hover {
    opacity: 1;
}

/* Hero Section */
.play-hero {
    position: relative;
    width: 100%;
    height: 85vh;
    background-color: #000;
    overflow: hidden;
}

.play-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out;
}

.play-hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.play-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--play-bg) 0%, rgba(11, 22, 34, 0.2) 60%, rgba(11, 22, 34, 0) 100%),
        linear-gradient(0deg, var(--play-bg) 0%, rgba(11, 22, 34, 0) 50%);
}

.play-hero-content {
    position: absolute;
    left: var(--play-container-padding);
    bottom: 22%;
    max-width: 650px;
    z-index: 110;
    transition: var(--play-transition);
}

.play-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 900;
    margin: 0 0 20px;
    line-height: 1;
    letter-spacing: -2px;
}

.play-hero-logo {
    max-width: 450px;
    max-height: 200px;
    margin-bottom: 30px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.8));
}

.play-hero-desc {
    font-size: 1.15rem;
    color: #cecece;
    margin-bottom: 35px;
    line-height: 1.6;
    display: block;
    overflow: visible;
}

.play-hero-actions {
    display: flex;
    gap: 16px;
}

.btn-qu4treplay-prime {
    background: #ffffff;
    color: #000000;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, background 0.2s;
}

.btn-qu4treplay-prime:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* HERO CAROUSEL BORDER GLOW */
@property --hero-glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes heroBorderGlowContinuous {
    0% {
        --hero-glow-angle: 0deg;
        opacity: 1;
    }
    100% {
        --hero-glow-angle: 360deg;
        opacity: 1;
    }
}

@keyframes heroBorderGlowHoverSweep {
    0% {
        --hero-glow-angle: 0deg;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    85% {
        --hero-glow-angle: 360deg;
        opacity: 1;
    }
    100% {
        --hero-glow-angle: 360deg;
        opacity: 0;
    }
}

#playHeroCarousel .btn-qu4treplay-prime {
    position: relative;
    isolation: isolate;
    background: #ffffff !important;
    color: #000000 !important;
}

#playHeroCarousel .btn-qu4treplay-prime > * {
    position: relative;
    z-index: 3;
}

#playHeroCarousel .btn-qu4treplay-prime::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    padding: 2px;
    box-sizing: border-box;
    background: conic-gradient(
        from var(--hero-glow-angle),
        transparent 0deg,
        transparent 250deg,
        rgba(232, 71, 28, 0.35) 280deg,
        var(--play-accent, #e8471c) 320deg,
        #ffffff 345deg,
        var(--play-accent, #e8471c) 355deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) border-box;
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) border-box;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#playHeroCarousel .btn-qu4treplay-prime::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 12px;
    padding: 4px;
    box-sizing: border-box;
    background: conic-gradient(
        from var(--hero-glow-angle),
        transparent 0deg,
        transparent 260deg,
        var(--play-accent, #e8471c) 320deg,
        rgba(255, 255, 255, 0.9) 345deg,
        var(--play-accent, #e8471c) 355deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) border-box;
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) border-box;
    mask-composite: exclude;
    filter: blur(6px);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#playHeroCarousel .btn-qu4treplay-prime.has-intro-glow::before,
#playHeroCarousel .btn-qu4treplay-prime.has-intro-glow::after {
    animation: heroBorderGlowContinuous 1.4s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
    #playHeroCarousel .btn-qu4treplay-prime:not(.has-intro-glow):hover::before,
    #playHeroCarousel .btn-qu4treplay-prime:not(.has-intro-glow):hover::after {
        animation: heroBorderGlowHoverSweep 1.6s ease-out 1;
    }
}

#playHeroCarousel .btn-qu4treplay-prime:not(.has-intro-glow):focus-visible::before,
#playHeroCarousel .btn-qu4treplay-prime:not(.has-intro-glow):focus-visible::after {
    animation: heroBorderGlowHoverSweep 1.6s ease-out 1;
}

@media (prefers-reduced-motion: reduce) {
    #playHeroCarousel .btn-qu4treplay-prime::before,
    #playHeroCarousel .btn-qu4treplay-prime::after {
        animation: none !important;
        opacity: 0 !important;
    }
}

.btn-qu4treplay-sec {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, background 0.2s;
}

.btn-qu4treplay-sec:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: scale(1.05);
}

/* Swimlane & Containers */
.qu4tre-play-main {
    position: relative;
    z-index: 10;
}

.qu4tre-play-grid {
    padding-left: var(--play-container-padding);
    margin-top: -80px;
    padding-bottom: 100px;
    position: relative;
    z-index: 20;
}

.play-swimlane {
    margin-bottom: 56px;
}

.play-swimlane-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.play-swimlane-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.play-swimlane-title::after {
    content: "\203A";
    color: var(--play-accent);
    font-size: 2rem;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: 300;
}

.play-swimlane-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.play-swimlane-scroll::-webkit-scrollbar {
    display: none;
}

/* CARDS  */
.play-card {
    flex: 0 0 auto;
    width: 280px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    transition: var(--play-transition);
}

.play-card-portrait {
    width: 180px;
}

.play-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--play-radius);
    overflow: hidden;
    background-color: var(--play-surface);
    transition: var(--play-transition);
}

.play-card-portrait .play-card-img-wrapper {
    aspect-ratio: 2/3;
}

.play-card:hover .play-card-img-wrapper {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.play-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--play-transition);
}

.play-card:hover .play-card-overlay {
    opacity: 1;
}

.overlay-play-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: var(--play-transition);
}

.play-card:hover .overlay-play-btn {
    transform: scale(1);
}

.play-badge-qu4treplay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--play-accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-live-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.play-live-bar-fill {
    height: 100%;
    background: var(--play-accent);
}

.play-card-info {
    padding: 14px 0 0;
    display: flex;
    flex-direction: column;
}

.play-card-meta {
    font-size: 0.8rem;
    color: var(--play-accent);
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 2px 0;
    padding: 0;
    letter-spacing: 0.5px;
    height: 1.2rem;
    line-height: 1.2rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.play-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: #fff;
    white-space: normal;
    line-height: 1.35;
    height: 4.05em;
    box-sizing: border-box;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;

    overflow: hidden;
    overflow-wrap: break-word;
}

.play-card-portrait .play-card-title {
    height: 2.7em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* EPISODES GRID */
.play-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px 20px;
    align-items: stretch;
    padding-right: var(--play-container-padding);
}

.play-episodes-grid .play-card {
    width: 100%;
    height: 100%;
}

/* PAGINATION OTT */
.play-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-right: var(--play-container-padding);
    margin-top: 60px;
}

.play-pagination .pagination {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center;
    gap: 10px;
}

.play-pagination .text-muted, 
.play-pagination .small {
    display: none !important;
}

.play-pagination .page-item .page-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.play-pagination .page-item.active .page-link {
    background: var(--play-accent);
    border-color: var(--play-accent);
    font-weight: 700;
}

.play-pagination .page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
}

.play-pagination .page-item .page-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Bottom Nav hidden by default (desktop) */
.play-bottom-nav {
    display: none;
}

/* Footer */
.play-footer {
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.qu4tre-play-grid .play-footer {
    padding-right: var(--play-container-padding);
}

.play-footer-logo img {
    height: 60px;
    opacity: 0.6;
    margin-bottom: 40px;
}

.play-footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.play-footer-link {
    color: var(--play-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.play-footer-link:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
    :root {
        --play-container-padding: 50px;
    }
}

@media (max-width: 768px) {
    :root {
        --play-container-padding: 24px;
        --play-header-height: 70px;
        --play-bottom-nav-height: 80px;
    }

    .qu4tre-play-body {
        padding-bottom: var(--play-bottom-nav-height); /* Espace pour la barre de nav mobile */
    }

    .play-header {
        display: grid !important;
        grid-template-columns: 1fr;
        justify-items: center;
        align-items: center;
        padding: 0 !important;
        height: var(--play-header-height);
        position: fixed;
        width: 100%;
        left: 0;
        top: 0;
    }

    .play-logo {
        margin: 0 !important;
        padding: 0 !important;
        display: flex;
        justify-content: center;
        align-items: center;
        grid-column: 1;
        width: 100%;
    }

    .play-logo a {
        display: flex;
        justify-content: center;
    }

    .play-nav {
        display: none !important;
    }

    .play-header-right {
        display: none !important;
    }

    .play-footer {
        padding: 60px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .play-footer-logo {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 0 auto 30px;
    }

    .play-footer-logo img {
        height: 40px;
        max-width: 220px;
        display: block;
        margin: 0 auto;
    }

    .play-footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .play-hero {
        height: 75vh;
        min-height: 560px;
    }

    .play-hero-bg {
        object-position: center;
    }

    .play-hero-gradient {
        background: linear-gradient(0deg, var(--play-bg) 25%, rgba(11, 22, 34, 0.5) 65%, rgba(11, 22, 34, 0.1) 100%);
    }

    .play-hero-content {
        left: var(--play-container-padding);
        right: var(--play-container-padding);
        bottom: 5%;
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .play-hero-logo {
        max-width: 220px;
        margin-bottom: 5px;
    }

    .play-hero-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .play-hero-desc {
        font-size: 0.95rem;
        display: block !important;
        -webkit-line-clamp: none !important;
        line-clamp: none !important;
        -webkit-box-orient: horizontal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-height: none !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
        color: #e0e0e0;
    }

    .play-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn-qu4treplay-prime,
    .btn-qu4treplay-sec {
        padding: 12px 24px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    @media (max-width: 380px) {

        .btn-qu4treplay-prime,
        .btn-qu4treplay-sec {
            padding: 10px 16px;
            font-size: 0.8rem;
        }

        .play-hero-title {
            font-size: 1.8rem;
        }
    }

    .qu4tre-play-grid {
        margin-top: -30px;
        padding-bottom: 120px;
    }

    .play-swimlane {
        margin-bottom: 40px;
    }

    .play-swimlane-title {
        font-size: 1.25rem;
    }

    .play-card {
        width: 220px;
    }

    .play-card-portrait {
        width: 140px;
    }

    .play-card-info {
        padding: 10px 0 0;
    }

    .play-card-title {
        font-size: 0.95rem;
    }

    .play-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px 14px;
    }

    .play-footer-links {
        flex-direction: column;
        gap: 20px;
    }

    .play-player-wrapper {
        aspect-ratio: auto !important;
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 24px;
    }

    .play-direct-info h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        letter-spacing: -1px;
    }

    .play-direct-info p {
        font-size: 1rem;
    }

    /* Bottom Navigation Bar Styles */
    .play-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(70px + env(safe-area-inset-bottom, 0px));
        background: rgba(5, 5, 5, 0.85);
        /* Slightly darker for contrast */
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        display: flex;
        align-items: flex-start;
        /* Items pushed to top part of bar */
        justify-content: space-around;
        padding: 12px 10px env(safe-area-inset-bottom, 10px);
        z-index: 2100;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .play-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.5);
        gap: 6px;
        transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .play-bottom-nav-item.active {
        color: var(--play-accent);
        transform: translateY(-2px);
        /* Slight lift for active state */
    }

    .play-bottom-nav-item.active .play-bottom-nav-icon {
        filter: drop-shadow(0 0 8px rgba(232, 71, 28, 0.4));
    }

    .play-bottom-nav-icon {
        width: 24px;
        height: 24px;
    }

    .play-bottom-nav-label {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    :root {
        --play-container-padding: 16px;
    }

    .play-hero-title {
        font-size: 1.8rem;
    }

    .play-hero-logo {
        max-width: 180px;
    }

    .play-logo img {
        height: 32px;
    }
}

/* DIRECT IMMERSIVE - Grand Écran */
.play-direct-page {
    padding-top: calc(var(--play-header-height) + 20px);
}

.play-direct-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--play-container-padding);
}

.play-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--play-radius);
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
}



.play-direct-info {
    margin-bottom: 60px;
}

.play-direct-info .meta {
    font-size: 0.95rem;
    color: var(--play-accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.play-direct-info h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    margin: 15px 0 20px;
    letter-spacing: -1.5px;
    line-height: 1.2;
    max-width: 1100px;
}

.play-direct-info p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    line-height: 1.6;
}

.play-direct-next-header {
    margin-bottom: 30px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.play-direct-info,
.play-player-wrapper {
    animation: fadeIn 0.8s ease-out forwards;
}