/**
 * Lean's Movies - Lecteur Vidéo Futuriste
 */

.watch-page {
    background: var(--bg-primary);
}

.watch-page .main-header {
    background: rgba(10, 10, 15, 0.8);
}

.watch-content {
    padding: 0;
}

.player-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

.external-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-lg);
}

.external-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: var(--radius-lg);
    z-index: 10;
}

.loading-message {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 500;
}

.retry-btn {
    padding: 12px 24px;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.retry-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(229, 9, 20, 0.4);
}

/* Personnalisation du lecteur vidéo */
video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.film-details {
    padding: 0;
}

.film-title-large {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.film-meta-large {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.film-meta-large span {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-secondary);
}

.film-meta-large span:first-child {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    font-weight: 600;
}

.film-description-large {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
}

.episode-breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.episode-breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
}

.episode-breadcrumb a:hover {
    text-decoration: underline;
}

.episode-navigation {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.btn-episode-nav {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-episode-nav:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.similar-films {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.similar-films h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Bouton de téléchargement */
.download-section {
    margin-top: 24px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #2ed573 0%, #26d063 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.4);
    background: linear-gradient(135deg, #26d063 0%, #2ed573 100%);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-download svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-watch-direct:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-watch-direct svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Section de signalement */
.report-section {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.report-section h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.report-form .form-group {
    margin-bottom: 16px;
}

.report-form label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.report-form select,
.report-form input,
.report-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.report-form select:focus,
.report-form input:focus,
.report-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.report-form textarea {
    min-height: 100px;
    resize: vertical;
}

.report-form button {
    padding: 12px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.report-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.report-message {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.report-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #28a745;
}

.report-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* ========================================
   MEDIA QUERIES - RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .player-section {
        padding: 16px;
    }

    .video-container {
        margin-bottom: 24px;
        border-radius: var(--radius-md);
    }

    .film-title-large {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .film-meta-large {
        gap: 8px;
        margin-bottom: 20px;
    }

    .film-meta-large span {
        padding: 6px 12px;
        font-size: 13px;
    }

    .film-description-large {
        font-size: 14px;
        line-height: 1.7;
    }

    .similar-films {
        margin-top: 40px;
        padding-top: 32px;
    }

    .similar-films h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .report-section {
        margin-top: 32px;
        padding: 20px 16px;
    }

    .report-section h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .report-form select,
    .report-form input,
    .report-form textarea {
        padding: 11px 14px;
        font-size: 16px; /* Minimum 16px pour éviter zoom iOS */
    }

    .report-form button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    .loading-message {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .retry-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .player-section {
        padding: 12px;
    }

    .video-container {
        margin-bottom: 20px;
        border-radius: var(--radius-sm);
    }

    .film-title-large {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .film-meta-large {
        gap: 6px;
        margin-bottom: 16px;
    }

    .film-meta-large span {
        padding: 5px 10px;
        font-size: 12px;
    }

    .film-description-large {
        font-size: 13px;
        line-height: 1.6;
    }

    .similar-films {
        margin-top: 32px;
        padding-top: 24px;
    }

    .similar-films h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .report-section {
        margin-top: 24px;
        padding: 16px 12px;
    }

    .report-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .report-form .form-group {
        margin-bottom: 14px;
    }

    .report-form label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .report-form select,
    .report-form input,
    .report-form textarea {
        padding: 10px 12px;
        font-size: 16px;
    }

    .report-form textarea {
        min-height: 80px;
    }

    .report-form button {
        width: 100%;
        padding: 11px;
        font-size: 16px;
    }

    .report-message {
        padding: 12px;
        font-size: 13px;
    }

    .loading-message {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .retry-btn {
        padding: 9px 18px;
        font-size: 13px;
    }

    .episode-navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
        padding-top: 24px;
    }

    .btn-episode-nav {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
        font-size: 13px;
    }
}
