/* === Series Senegalaises Styles === */

/* Channel filter */
.series-channel-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}
.channel-tab {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.channel-tab:hover { background: #e0e0e0; }
.channel-tab.active {
    background: var(--color-primary, #ff9900);
    color: #fff;
}

/* Series section */
.series-section { margin: 30px 0; }
.series-section h2 { font-size: 1.3rem; margin-bottom: 16px; }

/* Episodes grid */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.episodes-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Episode card */
.episode-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.episode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.episode-card.episode-current {
    outline: 2px solid var(--color-primary, #ff9900);
}

.episode-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #eee;
}
.episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.episode-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.episode-info { padding: 10px 12px; }
.episode-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.episode-meta {
    display: flex;
    gap: 10px;
    font-size: 0.78rem;
    color: #777;
}

/* Series grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.series-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.series-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #eee;
}
.series-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.series-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-live { background: #27ae60; color: #fff; }
.badge-ended { background: #95a5a6; color: #fff; }

.series-info { padding: 10px 12px; }
.series-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.series-meta {
    display: flex;
    gap: 10px;
    font-size: 0.78rem;
    color: #777;
}

/* Series detail page - header */
.series-header {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.series-header-thumb {
    flex-shrink: 0;
    width: 200px;
    border-radius: 8px;
    overflow: hidden;
}
.series-header-thumb img { width: 100%; height: auto; }
.series-header-info h1 { font-size: 1.5rem; margin: 0 0 10px; }
.series-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #555;
}
.series-header-meta span {
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 12px;
}
.meta-status.status-live { background: #e8f5e9; color: #27ae60; font-weight: 600; }
.meta-genre { background: #e3f2fd; color: #1565c0; }

.series-description { margin: 20px 0; line-height: 1.7; }
.series-description p { margin-bottom: 12px; }

/* Episode page */
.video-player-container { margin-bottom: 20px; }
.video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}

.episode-page-info { margin-bottom: 20px; }
.episode-page-info h1 { font-size: 1.3rem; margin: 0 0 10px; }
.episode-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #555;
}
.meta-series-link {
    color: var(--color-primary, #ff9900);
    font-weight: 600;
    text-decoration: none;
}
.meta-series-link:hover { text-decoration: underline; }

.episode-content { margin: 20px 0; line-height: 1.7; }
.episode-content p { margin-bottom: 12px; }
.episode-highlights { margin-top: 16px; }
.episode-highlights h3 { font-size: 1rem; margin-bottom: 8px; }
.episode-highlights ul { padding-left: 20px; }
.episode-highlights li { margin-bottom: 6px; }

/* Episode navigation */
.episode-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 24px 0;
    flex-wrap: wrap;
}
.ep-nav-btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.ep-nav-prev, .ep-nav-next {
    background: var(--color-primary, #ff9900);
    color: #fff;
}
.ep-nav-prev:hover, .ep-nav-next:hover { opacity: 0.9; }
.ep-nav-list {
    background: #f0f0f0;
    color: #333;
}
.ep-nav-list:hover { background: #e0e0e0; }
.ep-nav-disabled {
    background: #f5f5f5;
    color: #bbb;
    cursor: default;
}

/* Trailer badge */
.trailer-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #e65100;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.series-trailers { opacity: 0.95; }

.no-results { text-align: center; padding: 40px; color: #999; }

/* FAQ in series pages */
.series-page .faq-section { margin: 30px 0; }
.series-page .faq-item { border-bottom: 1px solid #eee; }
.series-page .faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.series-page .faq-toggle { font-size: 1.2rem; color: var(--color-primary, #ff9900); }
.series-page .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    line-height: 1.6;
    color: #555;
}
.series-page .faq-item.open .faq-answer { padding-bottom: 14px; }

/* SEO content */
.series-page .seo-content { margin: 30px 0; line-height: 1.7; }
.series-page .seo-content p { margin-bottom: 12px; }

/* Mobile responsive */
@media (max-width: 767px) {
    .episodes-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .episodes-grid-small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .series-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .episode-title { font-size: 0.8rem; }
    .series-header { flex-direction: column; }
    .series-header-thumb { width: 100%; }
    .episode-page-info h1 { font-size: 1.1rem; }
    .episode-navigation { flex-direction: column; }
    .ep-nav-btn { text-align: center; }
}
