@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #0a0a0a;
    --bg-surface: #141414;
    --bg-hover: #262626;
    --border-color: #2a2a2a;
    --text-main: #f3f3f3;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --accent-hover: #dddddd;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* NAVBAR */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; height: 64px;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px); /* Effet verre dépoli moderne */
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px; z-index: 100; border-bottom: 1px solid var(--border-color);
}
.navbar .logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; }
.btn-primary {
    background: var(--accent); color: #000; padding: 8px 18px;
    border-radius: 6px; font-weight: 600; font-size: 0.9rem; transition: 0.2s;
    border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); }

.avatar-nav { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); }
.nav-actions { display: flex; align-items: center; gap: 16px; }

/* SIDEBAR */
.sidebar {
    position: fixed; top: 64px; left: 0; bottom: 0; width: 250px;
    background-color: var(--bg-main); padding: 24px 12px;
    border-right: 1px solid var(--border-color);
}
.sidebar a {
    display: flex; align-items: center; padding: 10px 16px; border-radius: 8px;
    margin-bottom: 4px; font-size: 0.95rem; font-weight: 500; transition: 0.2s; color: var(--text-muted);
}
.sidebar a:hover { background-color: var(--bg-hover); color: var(--text-main); }

/* MAIN CONTENT */
.main-content { margin-top: 64px; margin-left: 250px; padding: 32px; }

/* VIDEO GRID */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; row-gap: 40px; }
.video-card { cursor: pointer; }
.thumbnail-container {
    overflow: hidden; border-radius: var(--radius); aspect-ratio: 16/9; margin-bottom: 12px;
    background: var(--bg-surface); border: 1px solid var(--border-color);
}
.thumbnail { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.video-card:hover .thumbnail { transform: scale(1.05); }
.video-info { display: flex; gap: 12px; }
.video-info img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.video-title { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { font-size: 0.85rem; color: var(--text-muted); }

/* FORMS (Login / Upload) */
.form-container {
    background: var(--bg-surface); padding: 40px; border-radius: var(--radius);
    max-width: 500px; margin: 40px auto; border: 1px solid var(--border-color);
}
.form-container h2 { margin-bottom: 24px; font-size: 1.5rem; letter-spacing: -0.5px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-control {
    width: 100%; padding: 12px 16px; background: var(--bg-main);
    border: 1px solid var(--border-color); color: var(--text-main);
    border-radius: 8px; font-family: 'Inter', sans-serif; transition: 0.2s;
}
.form-control:focus { border-color: var(--accent); outline: none; }
/* --- LECTEUR VIDÉO CUSTOM --- */
.custom-player-container {
    position: relative; width: 100%; background: #000; border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
}
.custom-player-container video { width: 100%; height: 100%; object-fit: contain; outline: none; }

.player-controls {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding: 20px 20px 10px 20px; display: flex; flex-direction: column;
    opacity: 0; transition: opacity 0.3s ease; z-index: 10;
}
.player-title-top {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 20px; font-size: 1.2rem; font-weight: 600;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    opacity: 0; transition: opacity 0.3s ease; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); z-index: 10;
}
.custom-player-container:hover .player-controls,
.custom-player-container:hover .player-title-top { opacity: 1; }

.controls-bottom { display: flex; align-items: center; gap: 15px; margin-top: 12px; }

/* --- LECTEUR VIDÉO CUSTOM --- */
.custom-player-container {
    position: relative; /* C'EST ÇA QUI GARDE LES CONTRÔLES PAR DESSUS */
    width: 100%; 
    background: #000; 
    border-radius: var(--radius);
    overflow: hidden; 
    aspect-ratio: 16/9; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.custom-player-container video { width: 100%; height: 100%; object-fit: contain; outline: none; }

.player-controls {
    position: absolute; /* PAR DESSUS LA VIDÉO */
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding: 20px 20px 10px 20px; 
    display: flex; flex-direction: column;
    opacity: 0; transition: opacity 0.3s ease; z-index: 10;
}
.player-title-top {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 20px; font-size: 1.2rem; font-weight: 600;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    opacity: 0; transition: opacity 0.3s ease; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); z-index: 10;
    color: white;
}
.custom-player-container:hover .player-controls,
.custom-player-container:hover .player-title-top { opacity: 1; }

.controls-bottom { display: flex; align-items: center; gap: 15px; margin-top: 12px; }

/* Boutons Icones SVG Lecteur */
.icon-btn {
    background: transparent !important; 
    border: none !important; 
    color: white; 
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 6px; border-radius: 50%; transition: all 0.2s ease;
}
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.icon-btn:hover { color: var(--accent); background: rgba(255,255,255,0.1) !important; }
.icon-btn:active { transform: scale(0.8); }

.progress-container { width: 100%; background: rgba(255,255,255,0.3); height: 4px; cursor: pointer; border-radius: 5px; position: relative; transition: height 0.2s; }
.progress-container:hover { height: 6px; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; border-radius: 5px; pointer-events: none; position: relative; }
.progress-bar::after { content: ''; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; opacity: 0; transition: opacity 0.2s; }
.progress-container:hover .progress-bar::after { opacity: 1; }
.time-display { font-size: 0.85rem; color: #eee; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }


/* --- LAYOUT DE LA PAGE WATCH --- */
.watch-layout { display: flex; gap: 24px; max-width: 1600px; margin: 0 auto; align-items: flex-start; }
.watch-main { flex: 1; min-width: 0; }
.watch-sidebar { width: 400px; display: flex; flex-direction: column; gap: 15px; }


/* --- INFOS VIDÉO ET LIKES --- */
.watch-header { margin-top: 15px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; }
.watch-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.watch-actions { display: flex; align-items: center; background: var(--bg-surface); border-radius: 30px; border: 1px solid var(--border-color); overflow: hidden; height: fit-content; }

/* Boutons d'action (Like/Dislike) */
.btn-action {
    display: flex; align-items: center; gap: 8px; background: transparent; border: none; 
    color: var(--text-main); font-weight: 600; font-size: 0.95rem; 
    padding: 10px 18px; cursor: pointer; transition: all 0.2s ease;
}
.btn-action svg { width: 22px; height: 22px; fill: currentColor; }
.btn-action:hover { background: var(--bg-hover); }
.btn-action:active { transform: scale(0.9); }

.btn-like.active { color: #3ea6ff; }
.btn-like.active svg { fill: #3ea6ff; }
.btn-dislike.active { color: #ff4e4e; }
.btn-dislike.active svg { fill: #ff4e4e; }

.watch-actions .separator { width: 1px; height: 24px; background: var(--border-color); margin: 0; }

