/* Nom du fichier : public/css/style.css */

:root {
    --primary-blue: #0ea5e9;
    --secondary-green: #10b981;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --premium-color: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-light); color: var(--text-dark); }

/* En-tête */
header { background-color: var(--white); padding: 20px 50px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.logo { font-size: 24px; font-weight: bold; color: var(--primary-blue); text-decoration: none; }
.logo span { color: var(--secondary-green); }
.nav-links { display: flex; align-items: center; }
.nav-links a { margin-left: 20px; text-decoration: none; color: var(--text-dark); font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-blue); }
.btn-login { background-color: var(--primary-blue); color: var(--white) !important; padding: 10px 20px; border-radius: 50px; text-align: center; }

/* Bannière */
.hero { background: linear-gradient(135deg, rgba(14,165,233,0.1) 0%, rgba(16,185,129,0.1) 100%); padding: 80px 20px; text-align: center; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; color: var(--text-dark); }

.search-bar { max-width: 600px; margin: 0 auto 20px auto; display: flex; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 50px; overflow: hidden; background: var(--white); }
.search-bar input { flex: 1; padding: 15px 25px; border: none; outline: none; font-size: 16px; width: 100%; min-height: 50px;}
.search-bar button { background-color: var(--secondary-green); color: var(--white); border: none; padding: 0 30px; cursor: pointer; font-size: 16px; font-weight: bold; transition: 0.3s; min-height: 50px;}
.search-bar button:hover { background-color: #059669; }

.accueil-filters { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 10px; }
.accueil-filter-btn { padding: 10px 20px; background: var(--white); border: 2px solid #e2e8f0; border-radius: 50px; cursor: pointer; font-weight: bold; color: var(--text-muted); font-size: 14px; transition: 0.3s; }
.accueil-filter-btn:hover, .accueil-filter-btn.active { border-color: var(--primary-blue); color: var(--primary-blue); }
.accueil-filter-btn.active { background: var(--primary-blue); color: white; }

/* --- NOUVEAU DESIGN DES CARTES VIDÉOS --- */
.videos-section { padding: 50px; max-width: 1200px; margin: 0 auto; min-height: 50vh; }
.section-title { margin-bottom: 30px; font-size: 1.8rem; border-left: 5px solid var(--primary-blue); padding-left: 15px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }

.video-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.3s; cursor: pointer; position: relative; animation: fadeIn 0.4s ease; }
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* Le conteneur de l'image (Sombre par défaut pour bien encadrer) */
.thumbnail-container { position: relative; height: 180px; background-color: #0f172a; overflow: hidden; }
.thumbnail-container img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.4s ease, opacity 0.4s ease; }

/* Effet de survol (Zoom léger sur l'image) */
.video-card:hover .thumbnail-container img { transform: scale(1.05); opacity: 0.6; }

/* Le bouton Play superposé (Style YouTube/Netflix) */
.play-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; background: rgba(0, 0, 0, 0.6);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    color: white; font-size: 18px; transition: 0.3s ease; pointer-events: none;
    border: 2px solid rgba(255,255,255,0.8); z-index: 5;
}
.play-overlay i { margin-left: 3px; } /* Recadrage optique de l'icône Play */
.video-card:hover .play-overlay { background: var(--primary-blue); border-color: var(--primary-blue); transform: translate(-50%, -50%) scale(1.1); }

.badge { position: absolute; top: 10px; right: 10px; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; color: var(--white); z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.badge.premium { background-color: var(--premium-color); }
.badge.free { background-color: var(--secondary-green); }

.video-info { padding: 15px; }
.video-title { font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; color: #0f172a; }
.video-disease { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 5px; }

/* Stats Admin */
.stats-cards-container { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.stat-card { flex: 1 1 200px; background: white; padding: 25px 20px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 20px; border-left: 5px solid #0ea5e9; }
.stat-card .stat-icon { font-size: 2.5rem; color: #e2e8f0; }
.stat-card .stat-details h3 { font-size: 13px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.stat-card .stat-details .stat-number { font-size: 2rem; font-weight: bold; color: #0f172a; }

/* Modal Admin */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15,23,42,0.95); justify-content: center; align-items: center; }
.modal-content { background: #000; padding: 15px; border-radius: 12px; max-width: 800px; width: 95%; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.close-modal { position: absolute; top: -40px; right: 0; color: white; font-size: 35px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.close-modal:hover { color: #ef4444; }
.admin-video-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.btn-play { background-color: #0ea5e9; margin-bottom: 5px; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Mobile */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 15px 20px; gap: 15px; }
    .nav-links { flex-direction: column; width: 100%; gap: 10px; }
    .nav-links a { margin-left: 0; width: 100%; text-align: center; padding: 5px 0; }
    .btn-login { display: block; width: 100%; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 40px 15px; }
    .search-bar { flex-direction: column; border-radius: 15px; display: flex; }
    .search-bar input { border-radius: 15px 15px 0 0; text-align: center; border-bottom: 1px solid #e2e8f0; }
    .search-bar button { padding: 15px; border-radius: 0 0 15px 15px; width: 100%; }
    .videos-section { padding: 30px 15px; }
    .video-grid { grid-template-columns: 1fr; }
    .admin-video-thumb { width: 80px; height: 45px; }
    .stats-cards-container { flex-direction: column; }
}