/* =========================================
   1. VARIABLES & BASE
   ========================================= */
:root {
    --bg-color: #0f0f0f;
    --sidebar-bg: #0f0f0f;
    --header-bg: #0f0f0f;
    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --hover-bg: #272727;
    --border-color: #303030;
    
    /* COULEURS MARQUE */
    --accent-color: #8951dc; /* Violet */
    --accent-dark: #6235a4;
    
    --header-height: 64px;
    --sidebar-width: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-primary); overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.yt-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
    background-color: var(--header-bg); display: flex; justify-content: space-between;
    align-items: center; padding: 0 16px; 
    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;
    position: relative; z-index: 101; 
}

.logo { 
    font-size: 1.2rem; font-weight: bold; letter-spacing: -1px; 
    display: flex; align-items: center; height: 100%;
}
.logo span { color: var(--accent-color); }

.search-bar-container {
    display: flex; background: #121212; border: 1px solid var(--border-color);
    border-radius: 40px; overflow: hidden; width: 500px;
}
.search-bar-container input {
    background: transparent; border: none; color: var(--text-primary);
    padding: 8px 15px; width: 100%; outline: none; font-size: 1rem;
}
.search-btn { background: #222; border: none; padding: 0 20px; color: var(--text-secondary); cursor: pointer; }

/* PHOTO DE PROFIL */
.header-right { display: flex; align-items: center; padding-right: 15px; }
.profile-pic {
    width: 55px; height: 55px; border-radius: 50%; object-fit: cover; cursor: pointer;
    transition: transform 0.2s, border 0.2s; border: 2px solid transparent;
}
.profile-pic:hover { transform: scale(1.05); border-color: var(--accent-color); }

/* SIDEBAR */
.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: 12px; 
    z-index: 150; 
    transition: transform 0.3s ease; 
}
.yt-sidebar.closed { transform: translateX(-100%); }

.sidebar-link {
    display: flex; align-items: center; padding: 10px 12px; border-radius: 10px;
    margin-bottom: 4px; color: var(--text-primary); transition: background 0.2s;
}
.sidebar-link:hover { background-color: var(--hover-bg); }
.sidebar-link.active { background-color: rgba(137, 81, 220, 0.15); font-weight: bold; color: var(--accent-color); }
.sidebar-link i { margin-right: 20px; font-size: 1.2rem; width: 24px; text-align: center; }
.sidebar-divider { border: 0; border-top: 1px solid var(--border-color); margin: 12px 0; }
.sidebar-title { font-size: 1rem; font-weight: bold; padding: 8px 12px; }
.icon-round {
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; margin-right: 20px; font-size: 0.8rem;
}
.bg-red { background: #cc0000; color: white; }
.bg-blue { background: #0077b5; color: white; }
.bg-green { background: #25d366; color: white; }

/* 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; }


/* =========================================
   3. STRUCTURE CHAÎNE
   ========================================= */
.channel-cover {
    width: 100%; height: 16vw; min-height: 150px; max-height: 280px;
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    background-size: cover; background-position: center;
    pointer-events: none;
}

.channel-header-section {
    display: flex; align-items: flex-start; gap: 24px; padding: 20px 50px 0 50px;
}
.channel-avatar-big {
    width: 130px; height: 130px; border-radius: 50%; object-fit: cover;
    margin-top: -10px; border: 4px solid var(--bg-color);
}
.channel-meta h1 { font-size: 2rem; margin-bottom: 5px; margin-top: 10px; }
.channel-meta .handle { color: var(--text-secondary); margin-bottom: 10px; font-size: 0.95rem; }
.channel-meta .sub-count { color: var(--text-secondary); font-size: 0.9rem; }
.subscribe-btn {
    background-color: var(--text-primary); color: black; border: none;
    padding: 10px 24px; border-radius: 24px; font-weight: bold; cursor: pointer;
    margin-top: 15px; transition: 0.3s;
}
.subscribe-btn:hover { background-color: #d9d9d9; }

.channel-tabs {
    display: flex; gap: 30px; padding: 0 50px;
    border-bottom: 1px solid var(--border-color); margin-top: 20px;
}
.tab-link {
    padding: 15px 0; color: var(--text-secondary); font-weight: 500; text-transform: uppercase;
    font-size: 0.95rem; border-bottom: 3px solid transparent; cursor: pointer;
}
.tab-link:hover { color: var(--text-primary); }
.tab-link.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }


/* =========================================
   4. CONTENU & GRILLE VIDÉOS
   ========================================= */
.projects-container { padding: 24px 50px; min-height: 120vh; }
.home-container { padding: 24px; }

.categories-bar { display: flex; gap: 12px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 5px; }
.cat-btn {
    background: var(--hover-bg); color: var(--text-primary); border: none;
    padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 500; transition: 0.3s;
    white-space: nowrap;
}
.cat-btn.active, .cat-btn:hover { background: var(--text-primary); color: var(--bg-color); }

.videos-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; row-gap: 40px;
    position: relative; z-index: 10;
}

.video-card {
    cursor: pointer; transition: transform 0.3s, border-color 0.3s;
    border: 2px solid transparent; border-radius: 12px; padding: 10px;
}
.video-card:hover { border-color: var(--accent-color); background-color: #1a1a1a; }

.thumbnail-container {
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: 8px; overflow: hidden; background: #1f1f1f;
}
.thumbnail-container img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%); transition: filter 0.4s ease, transform 0.4s ease;
}
.video-card:hover .thumbnail-container img { filter: grayscale(0%); transform: scale(1.05); }

/* --- STYLE SUPERPOSITION (FOOTBALL PLAISIR) --- */
.thumbnail-container .thumb-bg {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) brightness(0.6);
    transition: filter 0.4s ease, transform 0.4s ease;
}
.thumbnail-container .thumb-logo-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80px; height: auto; z-index: 2; mix-blend-mode: screen; 
    transition: transform 0.4s ease;
}
.video-card:hover .thumb-bg { filter: grayscale(0%) brightness(1); transform: scale(1.05); }
.video-card:hover .thumb-logo-overlay { transform: translate(-50%, -50%) scale(1.1); }

.duration {
    position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8);
    color: white; font-size: 0.8rem; padding: 3px 6px; border-radius: 4px;
}
.video-info { display: flex; margin-top: 12px; }

.details .title { 
    font-size: 1rem; font-weight: bold; margin-bottom: 4px; color: var(--text-primary);
    text-transform: uppercase; line-height: 1.3;
}
.details .description { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 4px; }
.details .meta { font-size: 0.85rem; color: var(--text-secondary); }


/* =========================================
   5. BIO CRÉATIVE & TÉMOIGNAGES
   ========================================= */
.bio-creative-wrapper {
    max-width: 1100px; 
    padding: 30px 50px; /* Padding réduit (était 40px) */
    display: grid; 
    grid-template-columns: 1.6fr 1fr; /* Gauche un peu plus large */
    gap: 40px; /* Gap réduit (était 50px) */
    /* Correction hauteur : on laisse le contenu définir la hauteur + marge bas */
    min-height: calc(100vh - 80px); 
    align-items: start; /* Important : empêche d'étirer les boites */
}

.bio-story-card { 
    background: #1f1f1f; 
    border-radius: 12px; 
    padding: 25px; /* RÉDUIT (était 30px) pour faire moins "gros" */
    border-left: 4px solid var(--accent-color); 
}

.bio-story-card h2 { 
    margin-bottom: 15px; 
    font-size: 1.3rem; /* RÉDUIT pour l'élégance */
    color: #fff; 
    text-transform: uppercase;
}

.bio-story-text p { 
    margin-bottom: 12px; 
    line-height: 1.5; /* Interligne plus serré */
    color: #ccc; 
    font-size: 0.95rem; /* Texte un peu plus fin */
}

.bio-stats-panel { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; /* Espacement réduit entre les blocs de droite */
}

.stat-card { 
    background: #181818; 
    border-radius: 8px; 
    padding: 20px; 
    border: 1px solid #333; 
}

.stat-card h3 { 
    font-size: 0.95rem; 
    margin-bottom: 12px; 
    color: #aaa; 
    text-transform: uppercase; 
    font-weight: bold;
}

/* --- STYLE COMPETENCES (TAGS) --- */
.skills-grid {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.skill-tag {
    display: flex; align-items: center; gap: 6px;
    background: #252525; padding: 6px 10px; border-radius: 4px;
    font-size: 0.85rem; color: #fff; border: 1px solid #333;
    transition: 0.2s;
}
.skill-tag:hover { border-color: var(--accent-color); background: #2a2a2a; }
.skill-tag i { color: var(--accent-color); font-size: 0.8rem; }

.soft-skills-list ul { list-style: none; padding-left: 2px; }
.soft-skills-list li { 
    margin-bottom: 6px; color: #ccc; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
.soft-skills-list li i { color: var(--accent-color); font-size: 0.7rem; }

.contact-grid { display: grid; gap: 8px; }
.contact-item { 
    display: flex; align-items: center; gap: 10px; background: #252525; 
    padding: 10px; border-radius: 6px; color: #fff; font-size: 0.9rem; transition: 0.2s;
}
.contact-item:hover { background: #333; }
.contact-item i { color: var(--accent-color); }

/* Le reste du CSS (Community feed etc) ne change pas */
.community-feed { max-width: 800px; padding: 40px 50px; min-height: 120vh; }
.post-card { border: 1px solid var(--border-color); border-radius: 4px; padding: 20px; margin-bottom: 20px; }
.post-header { display: flex; gap: 15px; margin-bottom: 15px; }
.post-avatar {
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-weight: bold; color: white;
}
.post-author { font-weight: bold; font-size: 0.95rem; }
.post-date { color: var(--text-secondary); font-size: 0.8rem; }
.post-text { margin-bottom: 15px; line-height: 1.5; color: var(--text-primary); }
.post-actions { display: flex; gap: 20px; color: var(--text-secondary); font-size: 0.9rem; }

/* =========================================
   6. MODAL & CUSTOM VIDEO PLAYER
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000; display: none;
    justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }
.modal-content {
    width: 80%; max-width: 900px; background: #212121; border-radius: 12px;
    padding: 0; overflow: hidden; position: relative; max-height: 90vh; overflow-y: auto;
}
.close-modal-btn {
    position: absolute; top: 10px; right: 10px; background: transparent; border: none;
    color: white; font-size: 1.5rem; cursor: pointer; z-index: 10;
}

/* CONTAINER VIDEO CUSTOM */
.modal-player-container { 
    width: 100%; aspect-ratio: 16/9; background: black; 
    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; }

/* CONTROLS CUSTOM */
.custom-controls {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 15px 20px;
    display: flex; align-items: center; gap: 15px;
    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.2rem; cursor: pointer;
    transition: color 0.2s;
}
.control-btn:hover { color: var(--accent-color); }

.progress-container {
    flex-grow: 1; height: 5px; background: rgba(255,255,255,0.3);
    border-radius: 5px; cursor: pointer; position: relative;
}
.progress-bar-filled {
    width: 0%; height: 100%; background: var(--accent-color);
    border-radius: 5px; position: relative;
}
.progress-bar-filled::after {
    content: ''; position: absolute; right: -6px; top: -3px;
    width: 12px; height: 12px; 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: 20px; }
.modal-title { font-size: 1.4rem; margin-bottom: 10px; }
.modal-meta-bar { color: #aaa; margin-bottom: 15px; }
.modal-description-box { background: #333; padding: 15px; border-radius: 8px; margin-bottom: 15px; line-height: 1.5; }
.action-btn {
    display: inline-block; padding: 10px 20px; background: var(--accent-color);
    color: white; border-radius: 20px; font-weight: bold;
}

/* ... (Garde tout le CSS précédent) ... */

/* =========================================
   7. NOTIFICATION POP-UP (ACCUEIL)
   ========================================= */
.profile-notification {
    position: fixed;
    top: 100px; /* Juste sous le header */
    right: 20px;
    width: 300px;
    background: #1f1f1f;
    border: 2px solid var(--accent-color); /* Cadre Violet */
    border-radius: 12px;
    padding: 20px;
    z-index: 900; /* Au-dessus du contenu, sous le menu burger */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    /* Animation d'entrée */
    transform: translateX(150%); /* Caché à droite par défaut */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Effet rebond */
}

.profile-notification.show {
    transform: translateX(0); /* Apparition */
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.notif-badge {
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    /* Animation Clignotement (Gros indicateur visuel) */
    animation: pulseGlow 1.5s infinite alternate;
}

.notif-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.1rem;
}
.notif-close:hover { color: #fff; }

.notif-content h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

.notif-content p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.4;
}

.notif-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: white;
    color: black;
    font-weight: bold;
    padding: 10px 0;
    border-radius: 20px;
    transition: 0.3s;
}
.notif-btn:hover {
    background: #e0e0e0;
    transform: scale(1.02);
}
.notif-btn i { color: var(--accent-color); margin-left: 5px; }

/* Animation du Badge */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(137, 81, 220, 0.7); transform: scale(1); }
    100% { box-shadow: 0 0 10px 4px rgba(137, 81, 220, 0); transform: scale(1.05); }
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .yt-sidebar { display: none; } 
    .yt-sidebar.open-mobile { display: block; width: 240px; transform: translateX(0); }
    .yt-content { margin-left: 0; }
    .videos-grid { grid-template-columns: repeat(2, 1fr); }
    .bio-creative-wrapper { grid-template-columns: 1fr; }
    .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; }
    .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 */
#site-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000; z-index: 99999;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    font-family: 'Oswald', sans-serif;
    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: #fff; font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; gap: 15px; text-shadow: 0 0 5px rgba(0,0,0,0.5); }
.loader-timecode { font-family: 'Courier New', monospace; font-weight: normal; }
.loader-battery { position: absolute; top: 40px; right: 40px; color: #fff; font-size: 1.5rem; }
.loader-frame .corner { position: absolute; width: 40px; height: 40px; border: 3px solid rgba(255, 255, 255, 0.5); }
.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: 300px; }
.loader-logo { font-size: 3rem; font-weight: bold; letter-spacing: -2px; color: #fff; margin-bottom: 10px; animation: pulse 2s infinite; }
.loader-logo span { color: var(--accent-color); }
.loader-status { color: #aaa; margin-bottom: 20px; font-size: 0.9rem; font-family: 'Roboto', sans-serif; letter-spacing: 1px; }
.loader-bar-bg { width: 100%; height: 4px; background: #333; border-radius: 2px; 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 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes loadBar { 0% { width: 0%; } 40% { width: 40%; } 70% { width: 60%; } 100% { width: 100%; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(0.98); } }