/* ===================== Général ===================== */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0f1115;
    color: #f2f2f2;
}

/* ===================== Page de connexion ===================== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    background: #171a21;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.login-logo {
    max-width: 140px;
    max-height: 140px;
    margin-bottom: 12px;
}

.login-slogan {
    font-size: 15px;
    font-weight: 600;
    color: #4da3ff;
    margin: 0 0 22px;
    animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.login-box h1 {
    font-size: 18px;
    margin: 0 0 20px;
    font-weight: 500;
    color: #cfd3da;
}

.login-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-form label { font-size: 13px; color: #9aa1ac; margin-top: 8px; }
.login-form input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a2f3a;
    background: #0f1115;
    color: #fff;
    font-size: 15px;
}
.login-form button {
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4da3ff;
    color: #0f1115;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.login-form button:hover { background: #6bb3ff; }

.login-error {
    background: #3a1f22;
    color: #ff8a8a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

/* ===================== Admin ===================== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #171a21;
    border-bottom: 1px solid #262b35;
}

.admin-header h1 { font-size: 18px; margin: 0; }
.admin-header a {
    color: #ff8a8a;
    text-decoration: none;
    font-size: 14px;
}

.admin-container { padding: 24px; max-width: 1100px; margin: 0 auto; }

.upload-zone {
    border: 2px dashed #2a2f3a;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 28px;
    background: #171a21;
}

.upload-zone input[type=file] { color: #f2f2f2; }

#upload-status { margin-top: 10px; font-size: 13px; color: #9aa1ac; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.video-card {
    background: #171a21;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color .15s ease;
    cursor: grab;
}

.video-card.selected { border-color: #4da3ff; }

.video-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #000;
}

.video-card .card-body {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.video-card .card-body span {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card .delete-btn {
    background: none;
    border: none;
    color: #ff8a8a;
    cursor: pointer;
    font-size: 13px;
}

.video-card input[type=checkbox] { width: 18px; height: 18px; }

.empty-state { color: #6a707c; text-align: center; padding: 40px 0; }

/* ===================== Player TV ===================== */
.player-body {
    margin: 0;
    background: #000;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.player-body video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    opacity: 0;
    transition: opacity .4s ease;
}

.player-body video.active { opacity: 1; z-index: 2; }

.player-empty {
    color: #666;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 22px;
}
