/* ===========================================
   RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: "Arial, Helvetica, sans-serif";
    font-size: 10px;
    background: #000;
    color: #080808;
    overflow-x: hidden;
}

#SITE_CONTAINER, .site-root {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

/* ===========================================
   BACKGROUND VIDEO & OVERLAYS
   =========================================== */
.pageBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.pageBackground video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    z-index: 0;
}

.scanlines-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.7) 0px,
        rgba(0, 0, 0, 0.7) 1px,
        transparent 2px,
        transparent 4px
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    mix-blend-mode: multiply;
}

/* ===========================================
   HEADER & NAVIGATION - DESKTOP
   =========================================== */
.SITE_HEADER {
    position: relative;
    width: 100%;
    min-width: 0;
    background: transparent;
}

.header-strip {
    width: 100%;
    min-width: 980px;
    margin: 0 auto;
    position: relative;
    height: 62px;
}

.header-content {
    width: 980px;
    height: 62px;
    margin: 0 auto;
    position: relative;
}

/* Logo Desktop */
.header-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 293px;
    height: 62px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Main Navigation */
.main-nav-container {
    position: absolute;
    left: 200px;
    top: 0;
    right: 120px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Bars */
.main-nav-container::before,
.main-nav-container::after {
    content: "";
    position: absolute;
    left: 95px;
    right: -125px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.main-nav-container::before { top: 18px; }
.main-nav-container::after { top: 43px; }

.main-nav {
    width: auto;
    position: relative;
    z-index: 2;
}

.main-nav ul {
    display: flex;
    list-style: none;
    height: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav li {
    display: inline-block;
    margin: 0;
    padding: 0;
    height: 25px;
}

.main-nav a {
    color: #9e9e9e;
    text-decoration: none;
    font-family: 'lulo-clean-w01-one-bold', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 25px;
    text-transform: uppercase;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    transition: color 0.4s ease;
    letter-spacing: 0.5px;
}

.main-nav a:hover {
    color: rgb(117, 117, 117);
}

.main-nav a.active {
    color: rgb(216, 16, 16);
}

/* Desktop Social Icons */
.social-icons {
    position: absolute;
    right: 20px;
    top: 0;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.social-icons img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.social-icons img:hover {
    opacity: 1;
}

/* ===========================================
   MAIN CONTENT AREA
   =========================================== */
.PAGES_CONTAINER {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding-top: 5px;
    z-index: 2;
}

.main-content {
    width: 980px;
    margin: 0 auto;
    position: relative;
    padding-top: 0;
    text-align: center;
}

/* Typography */
.main-title {
    color: #fff;
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    font-size: 27px;
    text-transform: uppercase;
    margin: 10px 0 20px;
    text-align: center;
    font-weight: 900;
    letter-spacing: 1px;
}

.title-spacing {
    margin-bottom: 60px;
    padding-top: 0;
}

/* Images & Media */
.bandeau-image {
    margin: 0 auto 30px;
    width: 980px;
    height: auto;
}

.bandeau-image img {
    width: 100%;
    height: auto;
    display: block;
}

.description-text {
    color: #9e9e9e;
    font-family: 'proxima-n-w01-reg', 'Arial', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4em;
    text-align: center;
    margin: 0 auto 30px;
    width: 800px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Social Section */
.social-section {
    margin: 0 auto 40px;
    display: flex;
    justify-content: center;
    gap: 40px; /* Espacement augmenté */
}

.social-icon {
    width: 32px;
    height: 32px;
    display: block;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.social-icon img:hover {
    opacity: 1;
}

/* Copyright */
.page-copyright {
    text-align: center;
    color: #666666;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ===========================================
   VIDEOS PAGE SPECIFIC
   =========================================== */
.videos-page {
    padding: 5px 0 40px;
    color: #ffffff;
}

.video-content-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 20px;
}

.video-column {
    flex: 0 0 500px;
}

.content-column {
    flex: 1;
    min-width: 0;
}

.episode-section {
    margin-bottom: 30px;
}

.episode-title {
    color: #fff;
    font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.episode-synopsis {
    color: #9e9e9e;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.episode-divider-full {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 25px 0;
}

/* Video Container */
.video-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
}

.video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
}

/* Videos Page Special Video Container */
.videos-page .video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 25px;
    padding-top: 56.25%; /* 16:9 */
}

.videos-page .video-container iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* ===========================================
   BURGER MENU & MOBILE NAVIGATION
   =========================================== */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 22px;
    z-index: 1000;
}

.burger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Container */
.mobile-nav-container {
    display: none;
}

/* ===========================================
   RESPONSIVE DESIGN - TABLET (1024px)
   =========================================== */
@media (max-width: 1024px) {
    .header-strip {
        min-width: 0;
    }

    .header-content, .main-content {
        width: 95%;
    }

    .description-text {
        width: 90%;
        font-size: 14px;
    }

    .bandeau-image {
        width: 100%;
    }

    .video-content-layout,
    .videos-page .video-content-layout {
        flex-direction: column;
        gap: 30px;
    }

    .video-column {
        flex: none;
        width: 100%;
    }

    .content-column {
        width: 100%;
    }

    /* Navigation Bars Adjustment */
    .main-nav-container {
        left: 180px;
        right: 140px;
    }

    .main-nav-container::before,
    .main-nav-container::after {
        left: 80px;
        right: -110px;
    }
}

/* ===========================================
   RESPONSIVE DESIGN - MOBILE (768px)
   =========================================== */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-strip {
        height: auto;
        min-height: 62px;
        min-width: 0;
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 15px;
        height: 62px;
        margin: 0;
        position: relative;
    }

    /* Logo Mobile - 2X PLUS GRAND */
    .header-logo {
        position: relative;
        left: auto;
        top: auto;
        width: 320px !important;
        height: auto !important;
        z-index: 1002;
    }

    .header-logo img {
        width: 320px !important;
        height: auto !important;
        max-width: 100%;
    }

    /* Burger Menu Visible */
    .burger-menu {
        display: flex !important;
        position: static !important;
        margin-left: auto;
        z-index: 1002;
    }

    /* Hide Desktop Navigation */
    .main-nav-container {
        display: none !important;
    }

    .social-icons {
        display: none !important;
    }

    /* Mobile Navigation */
    .mobile-nav-container {
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.98);
        padding: 20px 0;
        z-index: 999;
        display: none;
        flex-direction: column;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        overflow-y: auto;
    }

    body.nav-open .mobile-nav-container {
        display: flex;
    }

    .mobile-nav {
        width: 100%;
        display: block;
        flex-grow: 1;
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav li {
        width: 100%;
        text-align: center;
    }

    .mobile-nav a {
        display: block;
        padding: 18px 20px;
        color: #9e9e9e;
        text-decoration: none;
        font-family: 'lulo-clean-w01-one-bold', sans-serif;
        font-size: 16px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active {
        color: rgb(216, 16, 16);
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Mobile Social Icons */
    .mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        flex-shrink: 0;
    }

    .mobile-social-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-social-icons img {
        width: 24px;
        height: 24px;
        opacity: 0.8;
        transition: opacity 0.3s;
    }

    .mobile-social-icons img:hover {
        opacity: 1;
    }

    /* Main Content Mobile */
    .PAGES_CONTAINER {
        padding-top: 10px;
        max-width: 100%;
    }

    .main-content {
        width: 100%;
        padding: 0 15px 20px;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .main-title {
        font-size: 20px;
        letter-spacing: 0.2em;
        margin: 10px auto 25px;
    }

    .description-text {
        width: 100%;
        font-size: 14px;
        margin-bottom: 25px;
    }

    /* Social Section Mobile - ICÔNES PLUS GRANDES SUR MOBILE */
    .social-section {
        gap: 10px;
        margin-bottom: 30px;
    }

    .social-section .social-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .social-section .social-icon img {
        width: 100%;
        height: 100%;
    }

    /* Videos Page Mobile */
    .videos-page .episode-title {
        font-size: 22px;
    }

    .videos-page .episode-synopsis {
        font-size: 16px;
        line-height: 1.8;
    }
}

/* ===========================================
   CORRECTION LOGO MOBILE - TAILLES ADAPTATIVES
   =========================================== */
@media (max-width: 600px) {
    .header-content {
        height: 70px;
    }

    .header-logo {
        width: 280px !important;
    }

    .header-logo img {
        width: 280px !important;
        height: auto !important;
    }

    .mobile-nav-container {
        top: 70px;
    }

    .PAGES_CONTAINER {
        padding-top: 10px;
    }

    .main-content {
        padding: 10px 10px 20px;
    }

    .description-text {
        font-size: 12px;
        letter-spacing: 0.3em;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 240px !important;
    }

    .header-logo img {
        width: 240px !important;
        height: auto !important;
    }

    .main-title {
        font-size: 18px;
        letter-spacing: 0.15em;
    }

    .description-text {
        font-size: 12px;
        letter-spacing: 0.3em;
    }

    .social-section {
        gap: 8px;
    }

    .social-section .social-icon {
        width: 42px !important;
        height: 42px !important;
    }

    .mobile-social-icons {
        gap: 12px;
    }
    
    .mobile-social-icons img {
        width: 22px;
        height: 22px;
    }

    .episode-title {
        font-size: 18px;
    }

    .episode-synopsis {
        font-size: 12px;
    }
}

/* ===========================================
   UTILITY CLASSES & FIXES
   =========================================== */
.social-icons img,
.mobile-social-icons img,
.social-section img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Remove duplicate burger menu styles */
.header-left {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1002;
}

/* ===========================================
   GARANTIES DESKTOP
   =========================================== */
@media (min-width: 769px) {
    .header-logo img {
        width: 293px !important;
        height: 62px !important;
    }
    
    .social-section .social-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .burger-menu {
        display: none !important;
    }
    
    .mobile-nav-container {
        display: none !important;
    }
}

/* ===========================================
   FIX FINAL - ESPACEMENT HAUT DES PAGES
   =========================================== */
.PAGES_CONTAINER {
    padding-top: 5px !important;
    margin-top: 0 !important;
}

.main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.videos-page {
    padding-top: 5px !important;
    padding-bottom: 40px;
}

.videos-page .title-spacing {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important;
}

@media (max-width: 768px) {
    .PAGES_CONTAINER {
        padding-top: 5px !important;
    }
    
    .videos-page {
        padding-top: 5px !important;
    }
    
    .videos-page .title-spacing {
        margin-bottom: 20px !important;
    }
}

/* ===========================================
   CORRECTIONS FINALES POUR INDEX.PHP
   =========================================== */

/* Page index: pas de scroll */
body.page-index {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Container principal index */
.page-index .PAGES_CONTAINER {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 62px);
    padding-top: 0;
}

/* Cacher icônes réseaux dans le contenu sur desktop UNIQUEMENT page index */
@media (min-width: 769px) {
    body.page-index .social-section {
        display: none !important;
    }
}

/* Sur mobile, montrer les icônes dans le contenu */
@media (max-width: 768px) {
    .page-index .social-section {
        display: flex !important;
    }
}

/* Garantir le scroll sur autres pages */
body.page-videos,
body.page-univers,
body.page-equipe {
    overflow: auto !important;
}

/* Ajustement mobile pour page index */
@media (max-width: 768px) {
    .page-index .PAGES_CONTAINER {
        min-height: calc(100vh - 62px);
        justify-content: flex-start;
        padding-top: 20px;
    }
}

/* ===========================================
   CENTRAGE VERTICAL POUR MOBILE - PAGE INDEX
   =========================================== */

/* Page index sur mobile */
@media (max-width: 768px) {
    body.page-index {
        display: flex;
        flex-direction: column;
    }
    
    .page-index #SITE_CONTAINER {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .page-index .PAGES_CONTAINER {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        min-height: calc(100vh - 62px);
        padding-top: 0;
        padding-bottom: 20px;
    }
    
    .page-index .main-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        padding-top: 0;
        margin-top: 0;
    }
    
    /* Ajustement pour les écrans très courts */
    @media (max-height: 700px) {
        .page-index .PAGES_CONTAINER {
            justify-content: flex-start;
            padding-top: 20px;
        }
    }
    
    /* Ajustement pour les écrans très longs */
    @media (min-height: 1000px) {
        .page-index .PAGES_CONTAINER {
            justify-content: center;
            padding-top: 0;
        }
    }
}

/* ===========================================
   FIX SPÉCIFIQUE SAFARI MOBILE
   =========================================== */

@supports (-webkit-touch-callout: none) {
    /* Safari iOS spécifique */
    body.page-index {
        height: -webkit-fill-available;
    }
    
    .page-index .PAGES_CONTAINER {
        min-height: -webkit-fill-available;
    }
    
    /* Fix pour le 100vh sur Safari */
    .page-index {
        height: 100vh;
        height: -webkit-fill-available;
    }
}

/* ===========================================
   CORRECTION CHROME PAYSAGE - SUPPRESSION BARRES BLANCHES
   =========================================== */
@media (orientation: landscape) and (max-width: 900px) {
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        position: relative !important;
        min-height: 100vh !important;
        width: 100% !important;
    }
    
    /* Correction pour page index en paysage */
    body.page-index {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    .page-index .PAGES_CONTAINER {
        min-height: auto !important;
        display: block !important;
        padding: 20px 0 !important;
        justify-content: flex-start !important;
    }
    
    /* Correction header pour paysage */
    .header-content {
        padding: 0 10px !important;
        height: 60px !important;
    }
    
    /* Ajustement logo en paysage */
    .header-logo {
        width: 200px !important;
        max-width: 100% !important;
    }
    
    .header-logo img {
        width: 200px !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Garantir que le contenu n'est pas coupé */
    .main-content {
        padding: 10px 15px 30px !important;
        min-height: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Correction vidéos page en paysage */
    .videos-page .video-container {
        padding-top: 45% !important; /* Réduit pour paysage */
    }
    
    /* Ajustement burger menu en paysage */
    .burger-menu {
        top: 20px !important;
    }
}

/* ===========================================
   CORRECTION SPÉCIFIQUE CHROME MOBILE 100vh
   =========================================== */
/* Fix pour Chrome mobile 100vh */
@media (max-width: 768px) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .page-index .PAGES_CONTAINER {
        min-height: calc(100vh - 62px);
        min-height: calc(var(--vh, 1vh) * 100 - 62px);
    }
}

/* ===========================================
   AJUSTEMENT VIDÉOS POUR MOBILE - CORRECTION ERREUR 153
   =========================================== */
@media (max-width: 768px) {
    /* Correction pour éviter l'erreur 153 YouTube */
    .video-container iframe {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .videos-page .video-container {
        padding-top: 56.25% !important; /* 16:9 standard */
        height: 0 !important;
        position: relative !important;
        background: #000; /* Fond noir pour éviter le flash blanc */
    }
    
    .videos-page .video-container iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
    }
    
    /* Correction spécifique pour petites résolutions */
    @media (max-width: 480px) {
        .videos-page .video-container {
            padding-top: 56.25% !important;
            margin-bottom: 20px !important;
        }
    }
}

/* ===========================================
   FIX FINAL POUR LES ÉCRANS TRÈS ÉTROITS
   =========================================== */
@media (max-width: 360px) {
    .header-logo {
        width: 200px !important;
    }
    
    .header-logo img {
        width: 200px !important;
    }
    
    .main-title {
        font-size: 16px;
        letter-spacing: 0.1em;
    }
    
    .description-text {
        font-size: 11px;
        letter-spacing: 0.2em;
    }
}

/* ===========================================
   CORRECTION ERREUR 153 YOUTUBE - STYLES SPÉCIFIQUES
   =========================================== */

/* Garantir que les conteneurs vidéo ont une taille définie */
.video-container {
    background-color: #000 !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Style pour les placeholders */
.video-placeholder {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background: #111;
    cursor: pointer;
}

.video-placeholder:hover {
    background: #222;
}

/* Garantir que la page videos a le même fond que les autres */
body.page-videos .pageBackground video {
    display: block !important; /* S'assurer qu'il est visible */
    opacity: 1 !important; /* Pleine opacité comme les autres pages */
}

body.page-videos .background-overlay {
    background: rgba(0, 0, 0, 0.74) !important; /* Même valeur que les autres pages */
}

/* S'assurer que les iframes YouTube sont toujours visibles */
iframe[src*="youtube"], iframe[src*="youtu.be"] {
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Correction pour les appareils iOS */
@supports (-webkit-touch-callout: none) {
    .video-container iframe {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}
/* ===========================================
   FIX BUG RETOUR ARRIÈRE - VIDÉO BACKGROUND
   =========================================== */
.pageBackground {
    z-index: -2 !important;
    pointer-events: none !important;
}

/* Empêcher la vidéo background d'interférer */
.pageBackground video {
    z-index: -1 !important;
    pointer-events: none !important;
}

/* S'assurer que le contenu principal est au-dessus */
#SITE_CONTAINER, .site-root {
    position: relative !important;
    z-index: 1 !important;
}

/* Correction spécifique pour les iframes YouTube */
iframe[src*="youtube"], iframe[src*="youtu.be"] {
    z-index: 10 !important;
    position: relative !important;
}

/* Correction pour quand YouTube passe en plein écran */
iframe[src*="youtube"]:fullscreen,
iframe[src*="youtu.be"]:fullscreen {
    z-index: 999999 !important;
}

/* Correction pour iOS */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch !important;
    }
    
    .pageBackground {
        -webkit-transform: translate3d(0,0,0) !important;
    }
}

/* ===========================================
   FIX VIDEO BACKGROUND ON MOBILE
   =========================================== */
@media (max-width: 768px) {
    .pageBackground video {
        pointer-events: none !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ===========================================
   ADDITIONAL FIXES FOR MOBILE VIDEO BACKGROUND
   =========================================== */
/* Empêcher la vidéo de fond de passer en plein écran */
.pageBackground video {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* For iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .pageBackground video {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Désactiver les clics sur la vidéo de fond en mobile */
@media (max-width: 768px) {
    .pageBackground video {
        pointer-events: none !important;
    }
}

/* Correction z-index */
.pageBackground {
    z-index: -2 !important;
    pointer-events: none !important;
}

.pageBackground video {
    z-index: -1 !important;
    pointer-events: none !important;
}

/* FIX ALIGNEMENT TEXTE / VIDÉO SUR DESKTOP */
@media (min-width: 1025px) {
    .video-content-layout {
        display: flex;
        gap: 40px;
        align-items: flex-start;
        justify-content: center;
    }

    .video-column,
    .content-column {
        flex: 1 1 0;
        max-width: 50%;
    }
}

/* ===========================================
   LAYOUT PROPRES POUR VIDEOS.PHP EN DESKTOP
   =========================================== */
@media (min-width: 1025px) {

    /* 2 colonnes bien nettes pour chaque épisode */
    .videos-page .video-content-layout {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        align-items: start;
        justify-content: center;
        margin-top: 40px;
    }

    .videos-page .video-column,
    .videos-page .content-column {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* La vidéo prend toute sa colonne, ratio 16/9 */
    .videos-page .video-container {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 25px 0 !important;
        padding-top: 56.25% !important; /* 16:9 */
    }

    .videos-page .video-container iframe {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        display: block !important;
    }

    /* Texte bien à gauche dans sa colonne */
    .videos-page .episode-synopsis {
        text-align: left !important;
    }
}

/* Remettre le background vidéo derrière tout le site */
.pageBackground,
.pageBackground video {
    z-index: -10 !important;
    pointer-events: none !important;  /* Évite les clics accidentels */
}

.PAGES_CONTAINER,
.videos-page,
.main-content {
    position: relative;
    z-index: 10 !important;  /* Passe le contenu au-dessus */
}
/* ===========================
   📱 Mode paysage téléphone – VIDEOS.PHP
   =========================== */
@media (orientation: landscape) and (max-width: 900px) {

    /* Réduire taille des vidéos */
    .videos-page .video-container {
        max-width: 70% !important;   /* ➜ Réduit proportion vignette */
        margin: 0 auto 20px !important;
        padding-top: 40% !important; /* ➜ Ratio moins haut */
    }

    /* Réduction du texte + lisibilité */
    .videos-page .episode-title {
        font-size: 18px !important;
    }

    .videos-page .episode-synopsis {
        font-size: 13px !important;
        line-height: 1.4 !important;
        padding: 0 10px;
        width: 80%;
        margin: 0 auto 20px;
        text-align: center;
    }

    /* Centrer l’ensemble comme sur univers */
    .videos-page .video-content-layout {
        display: block !important;
        width: 100%;
        text-align: center;
    }
}
/* ==========================================================
   MOBILE HORIZONTAL – Correction espacements & taille vidéo
   ========================================================== */
@media (orientation: landscape) and (max-width: 950px) {

    .title-spacing{
        margin-bottom: 10px !important;
    }

    .main-title{
        margin-bottom: 10px !important;
        font-size: 22px !important;
    }

    .videos-page{
        padding-top: 0 !important;
    }

    .video-content-layout{
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px !important;
        margin-bottom: 25px !important;
    }

    .video-container iframe{
        width: 70% !important;
        height: auto !important;
        aspect-ratio: 16/9;
        display: block;
        margin: auto;
    }

    .episode-section{
        margin-top: 5px !important;
        padding-top: 0 !important;
        max-width: 75%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .episode-synopsis p{
        font-size: 14px;
        line-height: 1.4;
        margin-top: 8px !important;
    }

    .episode-divider-full{
        margin: 15px 0 !important;
    }
}
/* 🔥 Fix bloc noir sous vidéos en mode horizontal */
@media (orientation: landscape) and (max-width: 950px) {

    .video-container{
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .video-container iframe{
        width: 70% !important;          /* miniature réduite comme Univers */
        aspect-ratio: 16/9 !important;   /* ratio forcé */
        height: auto !important;         /* empêche le bloc noir */
        display: block;
        margin: auto;
        background:none !important;      /* au cas où YouTube force une couleur */
    }
}
/* ==========================================================
   MOBILE HORIZONTAL – VIDEOS : taille + espaces propres
   ========================================================== */
@media (orientation: landscape) and (max-width: 950px) {

    /* Titre */
    .videos-page .title-spacing {
        margin-top: 5px !important;
        margin-bottom: 8px !important;
    }

    .videos-page .main-title {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }

    /* Conteneur global */
    .videos-page {
        padding-top: 0 !important;
    }

    /* Bloc vidéo + texte en colonne compacte */
    .videos-page .video-content-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px !important;
        margin-bottom: 18px !important;
    }

    /* 🔥 On neutralise le système de "padding-top:56.25%" 
       qui créait un grand bloc noir */
    .videos-page .video-container {
        position: static !important;
        padding-top: 0 !important;
        max-width: 70vw !important;
        margin: 10px auto !important;
    }

    .videos-page .video-container iframe {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        display: block;
    }

    /* Texte de l’épisode */
    .videos-page .episode-section {
        margin-top: 4px !important;
        padding-top: 0 !important;
        max-width: 75vw;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .videos-page .episode-synopsis p {
        font-size: 14px;
        line-height: 1.4;
        margin-top: 6px !important;
    }

    /* Séparateur entre épisodes : moins d’espace */
    .videos-page .episode-divider-full {
        margin: 10px 0 !important;
    }
}
