/* =========================================
   1. VARIABLES & BASE (NOIR, BLANC, VIOLET)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #050505;
    --sidebar-bg: #050505;
    --header-bg: rgba(5, 5, 5, 0.85); /* Transparence pour effet flou */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --hover-bg: #1a1a1a;
    --border-color: #252525;
    
    /* COULEURS MARQUE */
    --accent-color: #9d4edd; /* Violet moderne */
    --accent-dark: #7b2cbf;
    
    --header-height: 64px;
    --sidebar-width: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-primary); overflow-x: hidden; line-height: 1.5; }
body.no-scroll { overflow: hidden; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* =========================================
   2. HEADER & NAVIGATION GLASSMORPHISM
   ========================================= */
.yt-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
    background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px; 
    z-index: 200; border-bottom: 1px solid var(--border-color);
}

.header-left { display: flex; align-items: center; height: 100%; }
.menu-burger { 
    background: none; border: none; color: var(--text-primary); 
    font-size: 1.2rem; cursor: pointer; padding: 8px; margin-right: 16px; transition: 0.3s;
}
.menu-burger:hover { color: var(--accent-color); }

.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -1px; display: flex; align-items: center; height: 100%; }
.logo span { color: var(--accent-color); margin-left: 2px;}

.search-bar-container {
    display: flex; background: #121212; border: 1px solid var(--border-color);
    border-radius: 8px; overflow: hidden; width: 500px; transition: 0.3s;
}
.search-bar-container:focus-within { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(157, 78, 221, 0.2); }
.search-bar-container input {
    background: transparent; border: none; color: var(--text-primary);
    padding: 10px 15px; width: 100%; outline: none; font-size: 0.95rem; font-family: 'Inter', sans-serif;
}
.search-btn { background: #1a1a1a; border: none; border-left: 1px solid var(--border-color); padding: 0 20px; color: var(--text-secondary); cursor: pointer; transition: 0.2s; }
.search-btn:hover { color: var(--text-primary); background: #222; }

.header-right { display: flex; align-items: center; }
.profile-pic {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; border: 2px solid transparent;
}
.profile-pic:hover { transform: scale(1.05); border-color: var(--accent-color); box-shadow: 0 0 15px rgba(157, 78, 221, 0.4); }

/* =========================================
   3. SIDEBAR MINIMALISTE
   ========================================= */
.yt-sidebar {
    position: fixed; top: var(--header-height); left: 0; bottom: 0; width: var(--sidebar-width);
    background-color: var(--sidebar-bg); overflow-y: auto; padding: 20px 15px; 
    z-index: 150; transition: transform 0.3s ease; border-right: 1px solid var(--border-color);
}
.yt-sidebar.closed { transform: translateX(-100%); }

.sidebar-link {
    display: flex; align-items: center; padding: 12px 15px; border-radius: 8px;
    margin-bottom: 5px; color: var(--text-secondary); transition: all 0.2s; font-size: 0.95rem; font-weight: 400;
}
.sidebar-link:hover { background-color: var(--hover-bg); color: var(--text-primary); }
.sidebar-link.active { background-color: rgba(157, 78, 221, 0.1); color: var(--text-primary); font-weight: 600; }
.sidebar-link.active i { color: var(--accent-color); }
.sidebar-link i { margin-right: 15px; font-size: 1.1rem; width: 24px; text-align: center; }

.sidebar-divider { border: 0; border-top: 1px solid var(--border-color); margin: 20px 0; }
.sidebar-title { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 1px; padding: 0 15px 10px 15px; }

.icon-round { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; margin-right: 15px; font-size: 0.9rem; }
.bg-red { background: rgba(204, 0, 0, 0.1); color: #ff4d4d; border: 1px solid rgba(204, 0, 0, 0.2); }
.bg-blue { background: rgba(0, 119, 181, 0.1); color: #0077b5; border: 1px solid rgba(0, 119, 181, 0.2); }

/* MAIN CONTAINER */
.main-container { display: flex; padding-top: var(--header-height); }
.yt-content { margin-left: var(--sidebar-width); width: 100%; padding: 0; transition: margin-left 0.3s ease; }
.yt-content.full-width { margin-left: 0; }

/* =========================================
   4. STRUCTURE CHAÎNE
   ========================================= */
.channel-cover {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 1px solid var(--border-color); position: relative;
}
.channel-cover::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 100%); opacity: 0.5;
}

.channel-header-section { display: flex; align-items: flex-start; gap: 30px; padding: 30px 50px 0 50px; position: relative; }
.channel-avatar-big {
    width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
    margin-top: -50px; border: 4px solid var(--bg-color); z-index: 2; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.channel-meta h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 5px; letter-spacing: -1px; }
.channel-meta .handle { color: var(--text-secondary); margin-bottom: 5px; font-size: 1rem; }
.channel-meta .sub-count { color: var(--accent-color); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.subscribe-btn {
    background-color: var(--text-primary); color: var(--bg-color); border: none;
    padding: 10px 24px; border-radius: 30px; font-weight: 600; cursor: pointer;
    margin-top: 15px; transition: 0.3s; font-size: 0.95rem;
}
.subscribe-btn:hover { background-color: var(--accent-color); color: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3); }

.channel-tabs {
    display: flex; gap: 40px; padding: 0 50px; border-bottom: 1px solid var(--border-color); margin-top: 30px;
}
.tab-link {
    padding: 15px 0; color: var(--text-secondary); font-weight: 600;
    font-size: 1rem; border-bottom: 3px solid transparent; cursor: pointer; transition: 0.2s;
}
.tab-link:hover { color: var(--text-primary); }
.tab-link.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* =========================================
   5. CONTENU & GRILLE VIDÉOS PREMIUM
   ========================================= */
.projects-container { padding: 30px 50px; min-height: 100vh; }
.home-container { padding: 30px 40px; }

.categories-bar { display: flex; gap: 15px; margin-bottom: 30px; overflow-x: auto; padding-bottom: 5px; }
.cat-btn {
    background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-color);
    padding: 8px 20px; border-radius: 30px; cursor: pointer; font-weight: 500; transition: 0.3s; font-size: 0.9rem;
}
.cat-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.cat-btn.active { background: var(--text-primary); color: var(--bg-color); border-color: var(--text-primary); font-weight: 600; }

.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; row-gap: 40px; }

.video-card { cursor: pointer; transition: transform 0.3s ease; }
.video-card:hover { transform: translateY(-5px); }

.thumbnail-container {
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: 12px; overflow: hidden; background: #111; border: 1px solid var(--border-color);
}
.thumbnail-container img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(0.6); transition: filter 0.5s ease, transform 0.5s ease;
}
.video-card:hover .thumbnail-container img { filter: grayscale(0%); transform: scale(1.05); }

.duration {
    position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px);
    color: white; font-size: 0.75rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; letter-spacing: 0.5px;
}
.video-info { display: flex; margin-top: 15px; gap: 12px; }

.details .title { font-size: 1.05rem; font-weight: 600; line-height: 1.4; margin-bottom: 6px; color: var(--text-primary); transition: color 0.2s; }
.video-card:hover .title { color: var(--accent-color); }
.details .description { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 4px; }
.details .meta { font-size: 0.85rem; color: #777; }

/* =========================================
   6. BIO CRÉATIVE & TÉMOIGNAGES
   ========================================= */
.bio-creative-wrapper {
    max-width: 1100px; padding: 40px 50px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; min-height: 80vh; align-items: start;
}

.bio-story-card { 
    background: rgba(255,255,255,0.02); border-radius: 16px; padding: 35px; border: 1px solid var(--border-color); 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.bio-story-card h2 { margin-bottom: 20px; font-size: 1.5rem; color: #fff; font-weight: 800; letter-spacing: -0.5px; }
.bio-story-text p { margin-bottom: 15px; line-height: 1.7; color: var(--text-secondary); font-size: 1rem; }
.bio-story-text strong { color: #fff; }

.bio-stats-panel { display: flex; flex-direction: column; gap: 20px; }
.stat-card { background: rgba(255,255,255,0.02); border-radius: 12px; padding: 25px; border: 1px solid var(--border-color); }
.stat-card h3 { font-size: 0.95rem; margin-bottom: 15px; color: #fff; text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }

.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.skill-tag {
    display: flex; align-items: center; gap: 8px; background: rgba(157, 78, 221, 0.1); 
    padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; color: #fff; border: 1px solid rgba(157, 78, 221, 0.3); transition: 0.3s;
}
.skill-tag:hover { background: var(--accent-color); border-color: var(--accent-color); transform: translateY(-2px); }

.soft-skills-list ul { list-style: none; }
.soft-skills-list li { margin-bottom: 10px; color: var(--text-secondary); font-size: 0.95rem; display: flex; align-items: center; gap: 12px; }
.soft-skills-list li i { color: var(--accent-color); font-size: 0.8rem; }

.contact-grid { display: grid; gap: 10px; }
.contact-item { 
    display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
    padding: 15px; border-radius: 8px; color: #fff; font-size: 0.95rem; transition: 0.2s; font-weight: 500;
}
.contact-item:hover { background: rgba(157, 78, 221, 0.1); border-color: var(--accent-color); }
.contact-item i { color: var(--accent-color); font-size: 1.2rem; }

.community-feed { max-width: 800px; padding: 40px 50px; min-height: 80vh; }
.post-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); border-radius: 12px; padding: 25px; margin-bottom: 25px; transition: 0.3s; }
.post-card:hover { border-color: #444; }
.post-header { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.post-avatar { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: 1.1rem; }
.post-author { font-weight: 600; font-size: 1rem; color: #fff; }
.post-date { color: var(--text-secondary); font-size: 0.85rem; margin-top: 2px; }
.post-text { margin-bottom: 20px; line-height: 1.6; color: #ccc; font-style: italic; font-size: 0.95rem; }
.post-actions { display: flex; gap: 20px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.post-actions i { color: var(--accent-color); cursor: pointer; }

/* =========================================
   7. MODAL & CUSTOM VIDEO PLAYER (EFFET CINÉMA)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 1000; display: none; justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }
.modal-content {
    width: 90%; max-width: 1000px; background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 0; overflow: hidden; position: relative; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.close-modal-btn {
    position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.5); border: 1px solid #444;
    color: white; width: 35px; height: 35px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; z-index: 10; transition: 0.2s;
}
.close-modal-btn:hover { background: var(--accent-color); border-color: var(--accent-color); transform: scale(1.1); }

.modal-player-container { 
    width: 100%; aspect-ratio: 16/9; background: #000; 
    position: relative; display: flex; align-items: center; justify-content: center;
}
.modal-media-video { width: 100%; height: 100%; }
.modal-media-image { width: 100%; height: 100%; object-fit: cover; display: none; }

.custom-controls {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 20px 25px 15px 25px;
    display: flex; align-items: center; gap: 20px; opacity: 0; transition: opacity 0.3s; z-index: 5;
}
.modal-player-container:hover .custom-controls, .modal-player-container.paused .custom-controls { opacity: 1; }

.control-btn { background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; transition: color 0.2s; }
.control-btn:hover { color: var(--accent-color); }

.progress-container { flex-grow: 1; height: 6px; background: rgba(255,255,255,0.2); border-radius: 6px; cursor: pointer; position: relative; }
.progress-bar-filled { width: 0%; height: 100%; background: var(--accent-color); border-radius: 6px; position: relative; box-shadow: 0 0 10px var(--accent-color); }
.progress-bar-filled::after { content: ''; position: absolute; right: -6px; top: -4px; width: 14px; height: 14px; background: white; border-radius: 50%; transform: scale(0); transition: transform 0.2s; }
.progress-container:hover .progress-bar-filled::after { transform: scale(1); }

.modal-info-container { padding: 35px 40px; }
.modal-title { font-size: 1.8rem; margin-bottom: 10px; font-weight: 800; letter-spacing: -0.5px; }
.modal-meta-bar { color: var(--text-secondary); margin-bottom: 25px; font-size: 0.95rem; font-weight: 500; }
.badge { background: rgba(157, 78, 221, 0.15); color: var(--accent-color); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; margin-left: 10px; border: 1px solid rgba(157, 78, 221, 0.3); }

.modal-description-box { background: rgba(255,255,255,0.02); padding: 25px; border-radius: 12px; margin-bottom: 25px; line-height: 1.6; border: 1px solid var(--border-color); font-size: 0.95rem; color: #ccc; }
.modal-description-box strong { color: #fff; font-weight: 600; }
.modal-description-box ul { padding-left: 20px; margin-top: 10px; }
.modal-description-box li { margin-bottom: 5px; }

.action-btn {
    display: inline-block; padding: 12px 25px; background: var(--accent-color);
    color: white; border-radius: 30px; font-weight: 600; transition: 0.3s; font-size: 0.95rem;
}
.action-btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3); }

/* =========================================
   8. NOTIFICATION POP-UP
   ========================================= */
.profile-notification {
    position: fixed; top: 80px; right: 20px; width: 320px;
    background: rgba(20, 20, 20, 0.95); backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); border-radius: 16px; padding: 25px;
    z-index: 900; box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transform: translateX(150%); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.profile-notification.show { transform: translateX(0); }
.notif-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.notif-badge { background: var(--accent-color); color: white; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; box-shadow: 0 0 10px rgba(157, 78, 221, 0.5); }
.notif-close { background: none; border: none; color: #666; cursor: pointer; font-size: 1.2rem; transition: 0.2s; }
.notif-close:hover { color: #fff; }
.notif-content h3 { font-size: 1.1rem; color: #fff; margin-bottom: 8px; font-weight: 700; }
.notif-content p { font-size: 0.9rem; color: #aaa; margin-bottom: 20px; line-height: 1.5; }
.notif-btn {
    display: block; width: 100%; text-align: center; background: #fff; color: #000;
    font-weight: 700; padding: 12px 0; border-radius: 8px; transition: 0.3s; font-size: 0.9rem;
}
.notif-btn:hover { background: var(--accent-color); color: #fff; }

/* RESPONSIVE */
@media (max-width: 1000px) {
    .yt-sidebar { display: none; } 
    .yt-sidebar.open-mobile { display: block; width: 240px; transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.8); }
    .yt-content { margin-left: 0; }
    .bio-creative-wrapper { grid-template-columns: 1fr; padding: 30px 20px; }
    .channel-header-section { padding: 20px; flex-direction: column; text-align: center; align-items: center; }
    .channel-avatar-big { margin-top: -60px; }
    .channel-tabs { padding: 0 20px; justify-content: center; gap: 20px; }
    .projects-container, .community-feed, .home-container { padding: 20px; }
}
@media (max-width: 600px) {
    .videos-grid { grid-template-columns: 1fr; }
    .search-bar-container { display: none; }
    .loader-frame { display: none; }
}

/* LOADER (Ajusté en mode Premium) */
#site-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); z-index: 99999;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#site-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-cam-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 40px; pointer-events: none; box-sizing: border-box; }
.loader-rec-info { position: absolute; top: 40px; left: 40px; color: #ff4d4d; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 15px; }
.loader-timecode { font-family: monospace; font-weight: normal; color: #fff; }
.loader-battery { position: absolute; top: 40px; right: 40px; color: #fff; font-size: 1.3rem; }
.loader-frame .corner { position: absolute; width: 30px; height: 30px; border: 2px solid rgba(255, 255, 255, 0.3); }
.loader-frame .tl { top: 30px; left: 30px; border-right: none; border-bottom: none; }
.loader-frame .tr { top: 30px; right: 30px; border-left: none; border-bottom: none; }
.loader-frame .bl { bottom: 30px; left: 30px; border-right: none; border-top: none; }
.loader-frame .br { bottom: 30px; right: 30px; border-left: none; border-top: none; }
.loader-content { text-align: center; z-index: 2; width: 250px; }
.loader-logo { font-size: 2.5rem; font-weight: 800; letter-spacing: -1.5px; color: #fff; margin-bottom: 15px; }
.loader-logo span { color: var(--accent-color); }
.loader-status { color: #888; margin-bottom: 20px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; }
.loader-bar-bg { width: 100%; height: 3px; background: #222; border-radius: 3px; overflow: hidden; position: relative; }
.loader-bar-fill { width: 0%; height: 100%; background: var(--accent-color); box-shadow: 0 0 10px var(--accent-color); animation: loadBar 2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes loadBar { 0% { width: 0%; } 40% { width: 40%; } 70% { width: 60%; } 100% { width: 100%; } }