/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #E50914;
    --secondary: #2196F3;
    --dark-bg: #141414;
    --lighter-bg: #1f1f1f;
    --card-bg: #2a2a2a;
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --sidebar-width: 250px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --gradient: linear-gradient(135deg, #E50914 0%, #b2070f 100%);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 20px; 
}




/* --- CONTENU --- */
.section-title {
    margin: 40px 0 20px; 
    font-size: 1.8rem; 
    border-left: 4px solid var(--primary); 
    padding-left: 15px;
    position: relative;
}

.content-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background-color: var(--card-bg); 
    border-radius: var(--border-radius); 
    overflow: hidden;
    transition: var(--transition); 
    cursor: pointer;
    display: flex; 
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow);
    border-color: rgba(229, 9, 20, 0.3);
}

.card-thumb {
    height: 200px; 
    width: 100%; 
    background-color: #333; 
    position: relative;
    overflow: hidden;
}

.card-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.card-duration {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

.card-body { 
    padding: 20px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

.card-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 15px; 
}

.card-title { 
    font-size: 1.2rem; 
    font-weight: 600; 
    margin-bottom: 10px; 
    line-height: 1.4; 
}

.card-desc { 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    line-height: 1.6; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    flex: 1;
}

/* --- FOOTER
footer { 
    margin-top: auto; 
    padding: 50px 0 30px; 
    background: #000; 
    color: var(--text-muted); 
    border-top: 1px solid rgba(255,255,255,0.1); 
    font-size: 0.9rem; 
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
 --- */

/* --- ADMIN --- */
#admin-view {
    display: flex;
    height: 100vh;
    overflow: hidden;
}


/* --- STATISTIQUES --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary);
    margin: 15px 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}
/* Styles pour le programme TV */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.program-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

.program-card.current {
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

.program-time {
    padding: 15px;
    background: rgba(0,0,0,0.3);
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.program-card.current .program-time {
    background: rgba(229, 9, 20, 0.1);
    color: var(--primary);
    font-weight: bold;
}

.program-content {
    padding: 20px;
}

.program-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.program-type.live {
    background: rgba(229, 9, 20, 0.2);
    color: #E50914;
}

.program-type.video {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.program-type.pub {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.program-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: white;
    line-height: 1.3;
}

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

.program-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.program-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.1);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    width: 50%;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 40px;
}

.timeline-time {
    position: absolute;
    top: 0;
    right: -100px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.timeline-item:nth-child(even) .timeline-time {
    right: auto;
    left: -100px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .program-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 40px;
        padding-right: 0;
    }
    
    .timeline-time {
        left: -10px !important;
        right: auto !important;
        top: -10px;
    }
}

/* Animation pour le programme en cours */
@keyframes highlight {
    0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(229, 9, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

.program-card.current {
    animation: highlight 2s infinite;
}


/* Overlay pour le programme en cours */
.now-playing-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    animation: pulse 2s infinite;
}

/* Programme suivant */
.up-next {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196F3;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.up-next h4 {
    color: #2196F3;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Style pour les heures */
.time-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary);
}

/* Programme terminé */
.program-past {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.program-past .program-time {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
}
/* --- Footer 
.site-footer {
    background: #0f0f0f;
    color: #ddd;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

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

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a,
.footer-col address a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover,
.footer-col address a:hover {
    color: var(--primary-color);
}

.footer-col address {
    font-style: normal;
    line-height: 1.6;
}

.footer-col address i {
    width: 18px;
    text-align: center;
    margin-right: 8px;
    color: var(--primary-color);
}

.footer-logo img {
    margin-bottom: 1rem;
    display: block;
}

.footer-slogan {
    opacity: 0.8;
    margin: 0.8rem 0 1.2rem;
    line-height: 1.5;
}--- */

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.stats-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.stat-item i {
    color: var(--primary-color);
    margin-top: 4px;
}