/* Variables CSS - Harmonisées avec la page d'accueil */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4d94;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fb;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header et navigation - Identique à la page d'accueil */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Section Hero avec carousel */
.hero-section {
    height: 60vh;
    min-height: 400px;
    position: relative;
    margin-top: 0;
    overflow: hidden;
    background-color: var(--dark-color);
}

.trailers-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.trailer-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
}

.trailer-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.trailer-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trailer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 2;
}

.trailer-info {
    position: absolute;
    bottom: 3rem;
    left: 2rem;
    right: 2rem;
    z-index: 3;
    max-width: 600px;
}

.trailer-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.trailer-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.trailer-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.trailer-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0.5rem;
}

.trailer-indicators .indicator {
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
}

.trailer-indicators .indicator.active {
    background-color: var(--accent-color);
    width: 50px;
}

.trailer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.trailer-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.trailer-nav.prev {
    left: 1rem;
}

.trailer-nav.next {
    right: 1rem;
}

/* Contenu principal */
.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Grille de contenu */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Cartes de contenu */
.film-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.film-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.film-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--gray-color);
}

.film-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.film-card:hover .film-thumbnail img {
    transform: scale(1.1);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.film-card:hover .thumbnail-overlay {
    opacity: 1;
}

.btn-play-preview {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-play-preview:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

.film-info {
    padding: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    margin-bottom: 0.8rem;
}

.film-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.film-info p {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.film-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Système de notation */
.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 1.2rem;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.star.selected {
    color: var(--warning-color);
}

.star:hover {
    color: var(--warning-color);
}

.average-rating {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 600;
}

.vote-count {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Menu d'actions */
.film-actions {
    position: relative;
}

.film-actions-menu {
    position: relative;
}

.menu-toggle-btn {
    background: var(--light-color);
    color: var(--dark-color);
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.menu-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.film-actions-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    box-shadow: var(--box-shadow);
    margin-bottom: 0.5rem;
}

.film-actions-dropdown.show {
    display: flex;
}

.film-actions-dropdown button {
    width: 100%;
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    background: transparent;
    color: var(--dark-color);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.film-actions-dropdown button:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Boutons */
.btn {
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-pay {
    background: linear-gradient(135deg, var(--warning-color), #ff9800);
    color: var(--dark-color);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.btn-game {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-download {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    border-radius: var(--border-radius);
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: var(--danger-color);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2001;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    transform: scale(1.1);
    background: #c82333;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-video-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: black;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-size: 1rem;
}

.modal-description {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.modal-rating {
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions button {
    flex: 1;
    min-width: 150px;
}

/* Modal des épisodes */
.episodes-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.episodes-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #eee;
    background: var(--light-color);
}

.episodes-modal-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.episodes-modal-header p {
    color: var(--gray-color);
    line-height: 1.5;
}

.episodes-container {
    padding: 2rem;
}

.season-container {
    margin-bottom: 2rem;
}

.season-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.episodes-grid {
    display: grid;
    gap: 1rem;
}

.episode-card {
    display: flex;
    background: white;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.episode-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.episode-thumbnail {
    position: relative;
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    background: var(--gray-color);
    overflow: hidden;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.episode-card:hover .episode-overlay {
    opacity: 1;
}

.btn-play-episode {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-play-episode:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

.episode-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.episode-info h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.episode-description {
    font-size: 0.9rem;
    color: var(--gray-color);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.episode-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.episode-meta .duration {
    color: var(--gray-color);
}

.episode-meta .price {
    color: var(--warning-color);
    font-weight: 600;
}

/* Bannière d'abonnement */
.subscription-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.subscription-active,
.subscription-inactive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.subscription-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.subscription-badge.active {
    background: var(--success-color);
    color: white;
}

.subscription-badge.inactive {
    background: var(--danger-color);
    color: white;
}

.subscription-expiry {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.hidden {
    display: none;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.info {
    background: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: #ddd;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        z-index: 99;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    /* Liens de navigation sur mobile */
    .nav-links a {
        color: var(--dark-color);
        padding: 1rem;
        border-radius: var(--border-radius);
    }

    .nav-links a:hover {
        background-color: #f0f2f5;
    }

    .nav-links a.active {
        background-color: #eef2ff;
        color: var(--primary-color);
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .hero-section {
        height: 50vh;
        min-height: 300px;
    }
    
    .trailer-title {
        font-size: 1.8rem;
    }
    
    .trailer-description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .user-info span {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-video-container {
        height: 250px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
    }
    
    .episode-card {
        flex-direction: column;
    }
    
    .episode-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .trailer-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}