/* ==========================================================================
   CHARTE GRAPHIQUE CODE A-Z - MINIMALISTE DARK TECH (NOIR, BLANC, ROUGE)
   ========================================================================== */
:root {
    --bg-dark: #07070a;       /* Noir profond d'arrière-plan */
    --bg-card: #121216;       /* Gris sombre tech pour les cartes et conteneurs */
    --accent: #ff4757;        /* Rouge vif chirurgical pour les éléments d'action */
    --accent-hover: #ff2a3f;  /* Rouge survol */
    --text-main: #ffffff;     /* Blanc pur lisible */
    --text-muted: #9494a1;    /* Gris neutre pour les textes secondaires */
    --radius-sm: 8px;
    --radius-md: 16px;
    --transition-premium: 0.5s cubic-bezier(0.25, 1, 0.4, 1);
}

/* Reset Global & Typographie */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a{
    text-decoration: none;
    color: inherit;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

.filter-btn i {
    margin-right: 8px; /* Espace parfait entre l'icône et le texte */
    transition: transform 0.2s ease; /* Pour des micro-interactions sympas */
    display: inline-block;
    width: 1em;
    text-align: center;
}

/* Effet interactif au survol */
.filter-btn:hover i {
  transform: scale(1.15); 
  color: var(--accent-hover);
}
/* ==========================================================================
   HEADER & BARRE DE RECHERCHE
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    background: rgba(7, 7, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
}
.blog {
    position: relative; 
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.blog i {
    font-size: 1rem;
    margin-right: 6px;
    color: var(--accent);
}
.blog::after {
    content: '';
    position: absolute;
    bottom: -2px; 
    left: 0;
    width: 0; 
    height: 3px;
    background-color: var(--accent);
    transition: width 0.3s ease; 
}
/* .blog:hover {
    color: var(--accent);
} */

.blog:hover::after {
    width: 100%;
}

.logo span { 
    color: var(--accent); 
    text-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}

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

.search-container i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-card);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent);
    background: #16161c;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.15);
}

/* --- Rideau d'accueil --- */
.curtain-lock-scroll {
    overflow: hidden;
}

.curtain-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000; /* au-dessus de toutes les modales (1000) */
    background: var(--bg-dark);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.4, 1), visibility 0.6s;
}

.curtain-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Lien Blog, fixe en haut à droite du rideau */
.curtain-blog-link {
    position: fixed;
    top: 24px;
    right: 5%;
    z-index: 10;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.curtain-blog-link i {
    color: var(--accent);
}

.curtain-blog-link:hover {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .curtain-blog-link {
        top: 16px;
        right: 16px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* Hero avec diaporama */
.curtain-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.curtain-backdrop-layer {
    position: absolute;
    inset: 0;
}

.curtain-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.8s ease;
}

.curtain-slide.active {
    opacity: 1;
}

.curtain-dark-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(7, 7, 10, 0.55) 0%, rgba(7, 7, 10, 0.92) 75%);
}

.curtain-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 600px;
}

.curtain-logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.curtain-logo span {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}

.curtain-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.curtain-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.curtain-enter-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px 44px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.35);
}

.curtain-enter-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

/* Carrousel "Nouveautés du moment" */
.curtain-trending {
    padding: 50px 5% 20px;
}

.curtain-trending h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-left: 3%;
}

.curtain-trending-wrapper {
    position: relative;
}

.curtain-trending-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 3% 20px;
    scrollbar-width: none;
}

.curtain-trending-row::-webkit-scrollbar {
    display: none;
}

.curtain-trending-card {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.curtain-trending-card img {
    width: 140px;
    height: 205px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s ease;
}

.curtain-trending-card:hover img {
    transform: translateY(-4px);
}

.curtain-trending-rank {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.curtain-trending-arrow {
    position: absolute;
    top: 0;
    bottom: 20px;
    right: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, var(--bg-dark) 70%);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

@media (max-width: 768px) {
    .curtain-trending-card {
        width: 105px;
    }
    .curtain-trending-card img {
        width: 105px;
        height: 155px;
    }
    .curtain-trending-rank {
        font-size: 0.68rem;
        padding: 3px 10px;
    }
}

/* Section "Pourquoi Refuge Pop ?" */
.curtain-reasons {
    padding: 70px 8% 20px;
    text-align: center;
}

.curtain-reasons h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.curtain-reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.curtain-reason-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: left;
}

.curtain-reason-icon {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 14px;
}

.curtain-reason-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.curtain-reason-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ */
.curtain-faq {
    padding: 60px 8%;
    max-width: 800px;
    margin: 0 auto;
}

.curtain-faq h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
}

.curtain-faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.curtain-faq-question {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    padding: 20px 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.curtain-faq-question i {
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.curtain-faq-item.open .curtain-faq-question i {
    transform: rotate(45deg);
}

.curtain-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.curtain-faq-item.open .curtain-faq-answer {
    max-height: 200px;
}

.curtain-faq-answer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0 4px 20px;
}

/* CTA final */
.curtain-final-cta {
    text-align: center;
    padding: 50px 20px 70px;
}

.curtain-final-cta p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Footer du rideau */
.curtain-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 20px;
    text-align: center;
}

.curtain-footer-brand {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.curtain-footer-brand span {
    color: var(--accent);
}

.curtain-footer-text {
    color: var(--text-muted);
    font-size: 0.78rem;
    max-width: 500px;
    margin: 0 auto 16px;
    line-height: 1.5;
}

.curtain-footer-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.curtain-footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    transition: all 0.2s ease;
}

.curtain-footer-socials a:hover {
    background: var(--accent);
    color: #fff;
}

.curtain-footer-copyright {
    color: #666;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .curtain-content h1 {
        font-size: 1.8rem;
    }
    .curtain-content p {
        font-size: 0.9rem;
    }
    .curtain-reasons-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3.5rem 20px 2rem;
    background: radial-gradient(circle at top, rgba(255, 71, 87, 0.04) 0%, transparent 60%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
}

/* BARRE DE FILTRES */
.filters-container {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 1rem 5% 2rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.35);
}

/* --- Menu déroulant "Genre" --- */
.genre-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.genre-dropdown-toggle {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.genre-dropdown-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.genre-dropdown-toggle.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.35);
}

.genre-caret {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.genre-dropdown-toggle.open .genre-caret {
    transform: rotate(180deg);
}

.genre-dropdown-menu {
    position: fixed; /* échappe au rognage overflow de .filters-container (position: absolute y était piégé) */
    background: #16161c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 4px;
    min-width: 340px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.genre-dropdown-menu.hidden {
    display: none;
}

.genre-option {
    background: none;
    border: 1px solid transparent;
    color: #ddd;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.genre-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.genre-option.active {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent);
}

/* ==========================================================================
   GRILLE ET SYSTÈME DE SUBSTITUTION DE LA CARTE (HOVER PREMIUM)
   ========================================================================== */
.movie-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 5% 4rem;
    width: 100%;
}

.movie-card {
    position: relative;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
    height: 280px;
    overflow: hidden;
    cursor: pointer;
    
    /* Configuration Flexbox élastique pour le redimensionnement en ligne */
    width: 170px;
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 210px;
    
    /* Animation fluide synchronisée */
    transition: flex-grow var(--transition-premium),
                max-width var(--transition-premium),
                transform 0.4s ease,
                box-shadow 0.4s ease;
}

/* Fixation des images structurelles */
.movie-card .poster-img,
.movie-card .backdrop-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* État initial : L'affiche verticale est visible, l'horizontale est invisible */
.movie-card .poster-img {
    z-index: 2;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.4, 1);
}

.movie-card .backdrop-img {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.4, 1);
}

/* L'overlay de contenu masqué initialement */
.movie-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    opacity: 0;
    background: linear-gradient(180deg, rgba(7, 7, 10, 0.2) 0%, rgba(7, 7, 10, 0.95) 85%);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 0.35s ease;
    pointer-events: none; /* S'active uniquement en hover */
}

/* --------------------------------------------------
   🔥 MÉCANIQUE INTERACTIVE : EXPANSION ET SUBSTITUTION
   ----------------------------------------------------- */
@media (min-width: 769px) {
    .movie-card:hover {
        flex-grow: 100;
        max-width: 380px; /* Devient un format cinéma large */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
        transform: translateY(-4px);
    }

    /* Disparition de l'image verticale */
    .movie-card:hover .poster-img {
        opacity: 0;
    }

    /* Révélation de l'image horizontale */
    .movie-card:hover .backdrop-img {
        opacity: 1;
    }

    /* Affichage du texte et des boutons d'actions */
    .movie-card:hover .card-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Style interne du bloc de texte révélé */
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.card-year {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Boutons d'actions intégrés sur la carte */
.card-actions {
    display: flex;
    gap: 8px;
}

.card-actions button {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.card-actions .btn-play {
    background: var(--accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    gap: 6px;
}

.card-actions .btn-play:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.card-actions .btn-fav {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-actions .btn-fav:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-actions .btn-fav.active {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent);
    border-color: var(--accent);
}

/* ==========================================================================
   MODALES PREMIUM (APERÇU CINÉMATIQUE ET LECTEUR)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 4, 6, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.4, 1);
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    /* border-radius: var(--radius-md); */
    width: 100%;
    /* max-width: 1000px; */
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.4, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.mute-toggle {
    right: 72px; /* se place à côté du bouton de fermeture (40px + marge) */
}

/* La modale cinématique peut désormais dépasser 100vh (section "Films similaires") :
   on la rend scrollable et on ancre ses boutons à l'écran plutôt qu'au contenu,
   pour qu'ils restent toujours visibles même en scrollant. */
#movieModal {
    align-items: flex-start;
    overflow-y: auto;
}

#closeModal,
#muteToggle {
    position: fixed;
}
.personal-fullscreen-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 6; /* au-dessus de l'overlay (z-index: 5) */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.personal-fullscreen-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Disposition immersive de la modale principale */
.cinematic-layout {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #000;
}

.video-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.video-background-wrapper iframe {
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scale(1.35); /* Supprime l'affichage natif parasite */
}

.video-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 7, 10, 0.1) 0%, rgba(7, 7, 10, 0.8) 50%, #121216 100%);
    z-index: 2;
}

.cinematic-details {
    position: relative;
    z-index: 3;
    padding: 3.5rem 3rem;
    max-width: 750px;
}

.cinematic-details h2 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.tags {
    display: flex;
    gap: 8px;
}

.title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.title-logo-wrap {
    height: 90px;
    width: 100%;
    max-width: 320px;
    display: flex;
    align-items: center;
}

.title-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.brand-logo-img {
    height: 60px;
    width: 60px;
    vertical-align: middle;
    margin-right: 4px;
}

.tag-accent {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.tag-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tag-views i {
    color: var(--accent);
}

.synopsis {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Grand Bouton d'action principal */
.play-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.play-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.45);
}

.cinematic-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-fav-btn {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-fav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-fav-btn.active {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent);
    border-color: var(--accent);
}

.share-btn-wrap {
    position: relative;
}

.share-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #16161c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 15;
}

.share-menu.hidden {
    display: none;
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.2s ease;
}

.share-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.share-menu-item i {
    width: 16px;
    text-align: center;
}

/* --- Suggestions "Films similaires" dans la modale cinématique --- */
.similar-movies-section {
    margin-top: 42px;
    padding-top: 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.similar-movies-section.hidden {
    display: none;
}

.similar-movies-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.similar-movies-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.similar-movies-row::-webkit-scrollbar {
    display: none;
}

.similar-movie-card {
    flex-shrink: 0;
    width: 110px;
    cursor: pointer;
}

.similar-movie-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: transform 0.2s ease;
}

.similar-movie-card:hover img {
    transform: scale(1.05);
}

.similar-movie-card span {
    display: block;
    color: #ddd;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Interface de Lecture Finale Sécurisée */
.player-layout {
    max-width: clamp(800px, 65vw, 1600px);
    background: #050508;
}
.live-layout {
    max-width: clamp(900px, 70vw, 1700px);
    background: #050508;
}

.secure-player-container {
    padding: 5rem 2rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(255, 71, 87, 0.04) 0%, transparent 75%);
}

.player-icon-glow {
    font-size: clamp(3.5rem, 4vw, 5.5rem);
    color: var(--accent);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 15px rgba(255, 71, 87, 0.5));
}

.secure-player-container h2 {
    font-size: clamp(1.8rem, 2.2vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.secure-player-container p {
    color: var(--text-muted);
    max-width: clamp(480px, 45vw, 720px);
    margin: 0 auto;
    font-size: clamp(0.95rem, 1.1vw, 1.3rem);
}

.loading-bar-ux {
    width: 180px;
    height: 4px;
    background: rgba(255,255,255,0.04);
    margin: 30px auto 0;
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar-ux div {
    width: 40%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    animation: loadingUX 1.6s infinite ease-in-out;
}
.player-message {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 8px;
}

.player-message-error {
    color: var(--accent);
    font-weight: 600;
    margin-top: 12px;
    display: none;
}

.player-message-error.visible {
    display: block;
}


@keyframes loadingUX {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* Loader d'API */
.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.loader i {
    animation: spin 1s linear infinite;
    margin-right: 10px;
    color: var(--accent);
}

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

.personal-player-wrapper {
    display: none;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* ratio 16:9 en fallback universel, remplace aspect-ratio (non supporté sur certains navigateurs TV anciens) */
}

.personal-player-wrapper.active {
    display: block;
}

.personal-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.personal-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
}

/* --- Barre de contrôle du lecteur perso --- */
.personal-player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.75) 40%, rgba(0,0,0,0.85) 100%);
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.personal-player-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.ppc-playpause {
    flex-shrink: 0;
    width: clamp(36px, 3vw, 52px);
    height: clamp(36px, 3vw, 52px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: clamp(0.9rem, 1.1vw, 1.3rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ppc-playpause:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.ppc-time {
    flex-shrink: 0;
    color: #ddd;
    font-size: clamp(0.75rem, 0.9vw, 1.05rem);
    font-variant-numeric: tabular-nums;
    min-width: 42px;
    text-align: center;
}

.ppc-progress-track {
    position: relative;
    flex: 1;
    height: 20px; /* zone tactile large */
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.ppc-progress-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.ppc-progress-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
    width: 0%;
    pointer-events: none;
}

.ppc-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.15s ease;
}

.ppc-progress-track:hover .ppc-progress-thumb {
    transform: translate(-50%, -50%) scale(1.25);
}

/* Le bouton plein écran vit maintenant dans la barre, plus en position absolue flottante */
.personal-player-controls .personal-fullscreen-btn {
    position: static;
    flex-shrink: 0;
    margin-left: 4px;
}

/* pointeur de recherche */
.seek-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 10px 16px;
    border-radius: 50px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6;
}

.seek-indicator.left {
    left: 8%;
}

.seek-indicator.right {
    right: 8%;
}

.seek-indicator.visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Badge Disponible */
.badge-available {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    background: #1db954;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Compteur de vues - à l'opposé du badge "Nouveau" */
.badge-views {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
}

.badge-views i {
    color: var(--accent);
    font-size: 0.7rem;
}


/* Bouton "Charger plus" */
.load-more-container {
    text-align: center;
    padding: 10px 5% 60px;
}

.load-more-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 12px 36px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: var(--accent);
    color: #fff;
}

.load-more-btn.hidden {
    display: none;
}


/* --- Sous-filtres de catégories (Direct) --- */
.category-filters-container {
    display: flex;
    gap: 8px;
    padding: 0 5% 14px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.category-filters-container.hidden {
    display: none;
}

.category-btn {
    flex-shrink: 0;
    background: var(--bg-card, #1a1a1c);
    border: 1px solid transparent;
    color: #ccc;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    border-color: var(--accent);
}

.category-btn.active {
    background: var(--accent);
    color: #fff;
}

/* --- Cartes de chaînes --- */
.channel-card {
    background: var(--bg-card, #1a1a1c);
    border-radius: var(--radius-sm, 10px);
    width: 170px;
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 210px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
}

.channel-card:hover {
    transform: scale(1.05);
    background: #232325;
}

.channel-logo-frame {
    width: 80%;
    aspect-ratio: 16 / 10;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.channel-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.channel-name {
    color: #eee;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* --- Modale de lecture en direct --- */
.live-player-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
}

.live-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.live-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
}

.live-channel-info {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.55);
    padding: 6px 14px;
    border-radius: 50px;
}

.live-channel-info img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.live-channel-info span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.live-error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
    text-align: center;
    color: #ccc;
}

.live-error-message i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.live-error-message.hidden {
    display: none;
}


/* --- Disposition avec sidebar (Mondial) --- */
.content-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.content-layout .movie-grid {
    flex: 1;
    min-width: 0;
}

.mondial-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 5%;
}

.mondial-sidebar.hidden {
    display: none;
}

.sidebar-ad-box {
    background: var(--bg-card, #1a1a1c);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
}

.sidebar-ad-box h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #fff;
}

.sidebar-ad-box p {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 12px;
    line-height: 1.4;
}

.sidebar-ad-btn {
    display: block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- Cartes de match --- */
.match-card {
    background: var(--bg-card, #1a1a1c);
    border-radius: var(--radius-sm, 10px);
    width: 170px;
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
}

.match-card:hover {
    transform: scale(1.05);
    background: #232325;
}

.match-live-badge {
    background: rgba(255, 71, 87, 0.12);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.live-dot {
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 14px;
}

.match-flag-img {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.match-flag-img-small {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    vertical-align: middle;
    margin: 0 4px;
}

.match-vs {
    font-size: 0.75rem;
    color: #888;
    font-weight: 700;
}

.match-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #eee;
    text-align: center;
}

.match-datetime {
    font-size: 0.7rem;
    color: #999;
}

/* --- Lecteur de match (iframe partenaire) --- */
.match-player-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
}

.match-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Overlay publicitaire --- */
.house-ad-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.house-ad-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 50px;
}

.house-ad-media {
    display: block;
    width: 100%;
    height: 100%;
}

.house-ad-media img,
.house-ad-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.house-ad-skip {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
}

.house-ad-skip:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Choix de reprise de lecture --- */
.personal-resume-choice {
    position: absolute;
    inset: 0;
    z-index: 25; /* au-dessus de l'overlay pub (20) et des contrôles (8) */
    background: rgba(5, 5, 8, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.personal-resume-choice.hidden {
    display: none;
}

.resume-choice-box {
    max-width: 380px;
}

.resume-choice-text {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.resume-choice-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resume-choice-btn {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 0.2s ease;
}

.resume-choice-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.resume-choice-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}

.resume-choice-btn-primary:hover {
    background: var(--accent-hover);
}

/* Erreur du lecteur personnel */
.personal-player-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    color: #ccc;
    max-width: 80%;
}

.personal-player-error i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.personal-player-error.hidden {
    display: none;
}


/* Footer du site */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 5% 30px;
    text-align: center;
    background: #050506;
    text-align: left;
}

.footer-columns {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-col {
    flex: 1;
}

.footer-col-brand {
    flex: 1.5;
}

.footer-tagline {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 14px;
}

.footer-col-title {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.footer-socials a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
}

.footer-text-small {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 12px;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 200;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .footer-columns {
        flex-direction: column;
        gap: 28px;
    }
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand span {
    color: var(--accent);
}

.footer-text {
    font-size: 0.8rem;
    color: #999;
    max-width: 700px;
    margin: 0 auto 12px;
    line-height: 1.6;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-credit {
    font-size: 0.8rem;
    color: #bbb;
    margin: 20px 0 8px;
}

.footer-copyright {
    font-size: 0.75rem;
    color: #666;
}

/* Correction pour le débordement de l'iframe publicitaire */
.sidebar-ad-box iframe {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Maintient le ratio proportionnel */
    display: block;
}
@media (max-width: 768px) {
    .sidebar-ad-box {
        padding: 10px; /* Réduit le padding interne sur mobile */
    }
}

.ad-banner-mobile {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    min-height: 50px; /* Réserve l'espace pour éviter les sauts de contenu */
}

/* ==========================================================================
   VERSION RESPONSIVE MOBILE EXTRÊME (21e SIÈCLE ADAPTÉ)
   ========================================================================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 12px;
        padding: 1rem 20px;
    }

    .search-container {
        width: 100%;
    }

    .hero {
        padding: 2rem 15px 1rem;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .filters-container {
        justify-content: flex-start;
        padding: 0.5rem 20px 1.5rem;
    }

    .filter-btn,
    .genre-dropdown-toggle {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .genre-dropdown-menu {
        grid-template-columns: 1fr;
        min-width: 220px;
    }

    /* Grille Mobile : Passage en 2 colonnes ultra-stables */
    .movie-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px 3rem;
    }

    .movie-card,
    .channel-card,
    .match-card {
        width: 100%;
        max-width: none;
        height: 240px; /* Hauteur ajustée pour écran mobile */
    }

    /* Désactivation saine du hover d'élargissement sur écran tactile */
    .movie-card .poster-img {
        opacity: 1 !important;
        z-index: 2;
    }

    /* Remplacement par une info-bulle épurée et lisible en permanence au bas du poster */
    .movie-card .card-overlay {
        opacity: 1 !important;
        background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.9) 90%);
        padding: 8px;
    }

    .card-title {
        font-size: 0.85rem;
    }

    .card-year {
        font-size: 0.7rem;
        margin-bottom: 0;
    }

    .card-desc, 
    .card-actions {
        display: none !important; /* Nettoyage pour ne pas surcharger l'espace mobile tactile */
    }

    .badge-views {
        font-size: 0.65rem;
        padding: 3px 8px;
        bottom: 8px;
        right: 8px;
    }

    .badge-views i {
        font-size: 0.6rem;
    }

    /* Modales adaptatives sur Mobile */
    .modal-content {
        width: 100%;
    }

    .secure-player-container {
        padding: 3rem 0.5rem 1.5rem;
    }

    .cinematic-details {
        padding: 2rem 1.5rem;
    }

    .cinematic-details h2 {
        font-size: 1.8rem;
    }

    .synopsis {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .cinematic-actions {
        width: 100%;
    }

    .share-menu {
        right: auto;
        left: 0;
    }

    .play-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 24px;
    }
}

@media (max-width: 400px) {
    /* Optimisation pour très petits écrans */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px 2rem;
    }
    
    .movie-card,
    .channel-card,
    .match-card {
        height: 200px;
    }
    .content-layout {
        flex-direction: column;
    }

    .mondial-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding-right: 0;
    }
}

.support-modal-content {
    max-width: 480px;
    background: #111114;
    padding: 32px;
    border-radius: 16px;
}

.support-title {
    text-align: center;
    margin-bottom: 8px;
}

.support-subtitle {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.support-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    transition: transform 0.2s ease;
}

.support-btn:hover {
    transform: translateY(-2px);
}

.support-btn-wave {
    background: #1DC8DA;
}

.support-btn-djamo {
    background: #5B4CF5;
}

.support-divider {
    text-align: center;
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.support-numbers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 16px;
    border-radius: 10px;
}

.support-op {
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 600;
}

.support-num {
    color: #fff;
    font-size: 0.9rem;
    font-family: monospace;
}

.support-copy-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-copy-btn:hover {
    background: var(--accent-hover);
}