/* --- STYLE GLOBAL --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: system-ui, sans-serif;
    background: #000;
    color: #f2f2f2;
    overflow: hidden;
}

h1 {
    font-size: 24px;
    margin: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Hidden panel for beamer projection */
.hidden-panel {
    display: none !important;
}

/* Floating title overlay */
.title-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
}

.title-overlay h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.title-overlay .subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    font-weight: 400;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    margin-top: 5px;
}

/* Fullscreen main */
main {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* --- INDICATEUR BLE --- */
.indicator {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.indicator.offline {
    background: #330000;
    color: #ff4d4d;
}

.indicator.online {
    background: #003300;
    color: #33ff99;
}

/* --- VIDÉO --- */
.videoContainer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: #000;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Effet portail */
#fx {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

/* HUD */
.hud {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.hud label {
    font-size: 12px;
    color: #aaa;
}

.hud > div {
    text-align: center;
}

.hud #speedView {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.hud #rateView {
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
    color: #aaa;
}

/* --- CONTRÔLES --- */
.controls {
    max-width: 400px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

button {
    padding: 10px 14px;
    font-size: 15px;
    background: #111;
    border: 1px solid #333;
    color: white;
    cursor: pointer;
    border-radius: 6px;
}

button:hover {
    background: #222;
}

.group label {
    font-size: 14px;
    color: #ccc;
}

.group input[type="number"],
.group input[type="range"] {
    width: 100%;
}

#msg {
    font-size: 13px;
    color: #bbb;
    min-height: 20px;
}