* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0f;
    color: #e0e0e8;
    line-height: 1.6;
}

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

.site-header {
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1e1e2e;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.logo { font-size: 1.4rem; font-weight: bold; color: #7c5cff; text-decoration: none; }

nav { display: flex; align-items: center; flex-wrap: wrap; }
nav a {
    color: #c0c0d0;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s;
    font-size: 0.9rem;
}
nav a:hover { color: #7c5cff; }

main { padding: 40px 0; min-height: 70vh; }

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1040, #0a0a1f);
    border-radius: 16px;
    margin-bottom: 40px;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #7c5cff, #ff5cb0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.video-card {
    background: #16161f;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.3);
}
.video-card a { color: inherit; text-decoration: none; }
.thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #1e1e2e;
    display: block;
}
.video-card-info { padding: 15px; }
.video-card-info h3 { font-size: 1.1rem; margin-bottom: 8px; }
.video-card-info .meta { font-size: 0.85rem; color: #8080a0; }

.video-detail { max-width: 1000px; margin: 0 auto; }
.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}
.video-player video { width: 100%; height: 100%; display: block; }
.video-header { margin-bottom: 25px; }
.video-header h1 { font-size: 2rem; margin-bottom: 10px; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(90deg, #7c5cff, #ff5cb0);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-right: 10px;
    margin-top: 10px;
}
.btn:hover { opacity: 0.85; }
.btn-secondary { background: #2a2a3e; }

.form-box {
    max-width: 500px;
    margin: 60px auto;
    background: #16161f;
    padding: 35px;
    border-radius: 12px;
}
.form-box h2 { margin-bottom: 25px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #a0a0b8; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: #0f0f18;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #e0e0e8;
    font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #7c5cff;
}

.alert { padding: 12px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #1e3a2a; color: #7cff9f; }
.alert-error   { background: #3a1e1e; color: #ff7c7c; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #16161f;
    border-radius: 12px;
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #2a2a3e;
}
.admin-table th { background: #1e1e2e; }

.site-footer {
    text-align: center;
    padding: 30px 0;
    color: #606078;
    border-top: 1px solid #1e1e2e;
    margin-top: 60px;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e0e0e8;
    font-size: 1.5rem;
    cursor: pointer;
}
@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .site-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #16161f;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        border-bottom: 1px solid #2a2a3e;
    }
    .site-header nav.open { display: flex; }
    .site-header nav a { margin: 8px 0; }
}

/* Badge utilisateur */
.user-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(124, 92, 255, 0.15);
    border: 1px solid rgba(124, 92, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #a89aff;
    margin-left: 15px;
}
.logout-link { color: #ff5c5c !important; }

/* Status HLS */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-ready      { background: rgba(124,255,159,0.15); color: #7cff9f; }
.status-pending    { background: rgba(255,204,102,0.15); color: #ffcc66; }
.status-processing { background: rgba(124,92,255,0.15);  color: #a89aff; }
.status-error      { background: rgba(255,92,92,0.15);   color: #ff7c7c; }

/* Rôles */
.role-admin    { color: #ff5c5c; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }
.role-uploader { color: #7c5cff; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }
.role-viewer   { color: #7cff9f; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px 0;
}
.stat-card {
    background: #16161f;
    padding: 20px;
    border-radius: 12px;
    border-left: 3px solid #7c5cff;
}
.stat-card .num { font-size: 2rem; font-weight: bold; }
.stat-card .lbl { color: #a0a0b8; font-size: 0.9rem; }