/* ==========================
   Variables CSS globales
   ========================== */
:root {
    --bg1: #4080ff;
    /* couleur de fond haut */
    --bg2: #430c8a;
    /* couleur de fond bas */
    --accent: #815aff;
    /* couleur accent principale */
    --accent-2: #00eaff;
    /* couleur accent secondaire */
    --star: #ffd84d;
    /* couleur étoiles */
    --text: #e8eaf6;
    /* couleur texte */
    --card: rgba(255, 255, 255, 0.04);
    /* couleur des cartes */
}

/* ==========================
   Reset et styles généraux
   ========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

body {
    background: #000;
    color: var(--text);
    min-height: 100vh;
}

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

/* ==========================
   Floating title overlay
   ========================== */
.title-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    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 video container
   ========================== */
.video-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1;
}

.video-fullscreen .palier {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* ==========================
   Gauge overlay (in front of video)
   ========================== */
.gauge-overlay {
    position: fixed;
    top: 0;
    right: 30px;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px 0;
}

.gauge-overlay .speed-column {
    width: 120px;
    height: 80%;
    max-height: 600px;
    position: relative;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gauge-overlay .ticker {
    left: 130px;
}

/* ==========================
   Étoiles en fond (disabled for beamer)
   ========================== */
.star {
    display: none;
}

@keyframes twinkle {
    0% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.1;
    }
}

/* ==========================
   Layout général desktop
   ========================== */
.container {
    display: grid;
    grid-template-columns: 1fr 0.6fr;
    /* gauche + droite */
    gap: 30px;
    /* espace entre colonnes */
    padding: 40px;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================
   Header
   ========================== */
.header {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: var(--accent);
    font-size: 1.5rem;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

.signal {
    padding: 6px 8px;
    border-radius: 8px;
    font-weight: 700;
}

.signal-off {
    background: rgba(255, 100, 100, 0.08);
    color: #ffb3b3;
}

.signal-on {
    background: rgba(100, 255, 150, 0.06);
    color: #baffc0;
}

/* ==========================
   Left panel
   ========================== */
.left-panel {
    padding: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dream-title {
    font-size: 1.2rem;
    color: #d6cfff;
    margin-bottom: 10px;
}

.speed-display {
    background: var(--card);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.speed-large {
    font-size: 3rem;
    font-weight: 800;
}

.odometer-km {
    opacity: 0.85;
    margin-top: 6px;
}

.simulator {
    margin-top: 12px;
}

input[type=range] {
    width: 100%;
}

/* ==========================
   Zone vidéos gauche
   ========================== */
.videos-left {
    position: relative;
    /* conteneur pour vidéos superposées */
    width: 100%;
    height: 700px;
    border-radius: 14px;
    overflow: hidden;
    /* clips vidéos */
}

.palier {
    position: absolute;
    /* superposition des vidéos */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    /* couvre le conteneur */
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: block;
    /* toutes visibles, on joue ou pause selon palier */
    z-index: 0;
}

/* ==========================
   Right panel / colonne vitesse
   ========================== */
.right-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.speed-column {
    width: 160px;
    height: 650px;
    position: relative;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.column-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    opacity: 0.72;
    transition: height 220ms linear;
}

/* graduations verticales */
.graduations {
    position: absolute;
    left: 16px;
    top: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

/* ajustement graduations pour 30 km/h */
.grad {
    font-size: 0.9rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.9);
}

/* indicateur mobile (ticker) */
.ticker {
    position: absolute;
    left: 170px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 200ms ease-out;
}

.ticker-line {
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 3px;
}

.ticker-label {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(10, 8, 30, 0.4);
}

/* ==========================
   Footer
   ========================== */
.footer {
    grid-column: 1/-1;
    text-align: center;
    padding: 10px;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* ==========================
   Responsive
   ========================== */
@media (max-width:1200px) {
    .container {
        grid-template-columns: 1fr 0.6fr;
    }

    .palier {
        max-width: 100%;
        height: 300px;
    }

    .speed-column {
        height: 500px;
    }
}

@media (max-width:900px) {
    .container {
        grid-template-columns: 1fr;
    }

    .speed-column {
        display: none;
    }

    .ticker {
        left: auto;
        right: 6px;
    }
}