/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #1e293b;
    overflow-x: hidden;
}

.page {
    display: none;
    padding-top: 80px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-item {
    text-decoration: none;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 22px;
    position: relative;
    transition: color 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: #1e6afe;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1e6afe;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Page Catalogue */
.news-banner {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.news-icon {
    width: 40px;
    height: 40px;
    background-color: #eff6ff;
    color: #1e6afe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 15px;
}

.news-content { flex-grow: 1; }
.news-title { font-size: 0.85rem; font-weight: bold; color: #1e6afe; display: block; margin-bottom: 2px; }
.news-text { font-size: 0.9rem; color: #475569; }
.news-time { font-size: 0.85rem; color: #94a3b8; }
.section-title { font-size: 2rem; font-weight: 700; color: #0f172a; margin-bottom: 25px; }

.search-wrapper {
    position: relative;
    max-width: 500px;
    margin-bottom: 40px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}

.search-wrapper input:focus { border-color: #1e6afe; }
.loading-text { text-align: center; font-size: 1.1rem; color: #64748b; margin: 40px 0; }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

/* Cartes Films */
.movie-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.poster-container {
    position: relative;
    width: 100%;
    height: 340px;
    background-color: #1e293b;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.rating-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(15, 23, 42, 0.85);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.rating-badge i { color: #fbbf24; margin-right: 3px; }
.movie-details { padding: 20px; }
.movie-title { font-size: 1.05rem; font-weight: 600; color: #0f172a; margin-bottom: 8px; line-height: 1.4; }
.movie-meta { font-size: 0.85rem; color: #64748b; margin-bottom: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { background-color: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 500; }

.load-more-container { display: flex; justify-content: center; margin-top: 40px; }

/* Thème Sombre & Détails */
.dark-theme { background-color: #03031a; color: #ffffff; }
.dark-section { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.detail-container { max-width: 950px; }

.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: background 0.2s;
}

.back-btn:hover { background: rgba(255, 255, 255, 0.08); }

.movie-header-block {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.detail-poster {
    width: 240px;
    height: 360px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    background-color: #09092b;
}

.movie-header-info { flex: 1; }
.movie-header-info h2 { font-size: 2.2rem; margin-bottom: 10px; color: #fff; }
.movie-meta-row { color: #94a3b8; margin: 15px 0; font-size: 1rem; }
.movie-meta-row i { color: #fbbf24; }
.dark-theme .tag { background-color: rgba(255,255,255,0.08); color: #e2e8f0; }
.director-text { margin-top: 20px; font-weight: 600; color: #f8fafc; font-size: 1rem; }
.synopsis-text { margin-top: 12px; color: #94a3b8; line-height: 1.6; font-size: 0.95rem; text-align: justify; }

/* Lecteur Vidéo */
.player-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 40px;
    margin-top: 20px;
}

.player-section h3 { font-size: 1.4rem; margin-bottom: 20px; }

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.6);
    background: #000;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Demander & À propos */
.content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #09092b;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.text-block { max-width: 70%; }
.text-block h2 { font-size: 1.6rem; margin-bottom: 10px; }
.text-block p { color: #94a3b8; line-height: 1.5; }

.action-btn {
    background-color: #1e6afe;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover { background-color: #1656d6; }

.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 40px; }
.social-card { background-color: #ffffff; color: #0f172a; padding: 18px 24px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; text-decoration: none; font-weight: 600; }
.social-info i { margin-right: 10px; font-size: 1.2rem; }
.arrow { color: #94a3b8; }

.community-buttons { display: flex; gap: 20px; margin-bottom: 70px; }
.community-btn { flex: 1; border: none; color: white; padding: 15px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
.telegram-bg { background-color: #2ea6da; }
.discord-bg { background-color: #5865f2; }

.faq-section { display: flex; margin-bottom: 80px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 60px; }
.faq-header-block { width: 35%; }
.faq-header-block h2 { font-size: 3rem; }
.faq-header-block p { color: #94a3b8; }
.faq-list { width: 65%; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 25px 0; }
.faq-question { font-size: 1.2rem; font-weight: 500; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.toggle-icon { color: #64748b; }
.faq-answer { max-height: 0; overflow: hidden; color: #94a3b8; margin-top: 0; line-height: 1.6; transition: max-height 0.3s ease, margin-top 0.3s ease; }
.faq-answer.active { max-height: 200px; margin-top: 15px; }

.contact-section { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 50px; }
.contact-label { color: #64748b; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 15px; }
.contact-email { font-size: 1.1rem; margin-bottom: 30px; }
.contact-buttons { display: flex; gap: 20px; }
.contact-card-btn { background-color: #ffffff; color: #0f172a; padding: 15px 25px; border-radius: 12px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }

@media (max-width: 768px) {
    .movie-header-block { flex-direction: column; align-items: center; text-align: center; }
    .detail-poster { width: 200px; height: 300px; }
    .content-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    .text-block { max-width: 100%; }
    .community-buttons, .contact-buttons { flex-direction: column; }
    .faq-section { flex-direction: column; gap: 40px; }
    .faq-header-block, .faq-list { width: 100%; }
}