
/* =========================================
   SMART CAR - DASHBOARD CSS
   ========================================= */

/* RÉINITIALISATION */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* PAGE */
html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: black;
    color: white;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

/* =========================================
   CONTENEUR COMMUN
   ========================================= */

.stage {
    position: relative;
    width: 100%;
    overflow: visible;
}

.scene {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1100px;
    height: 650px;
    transform: translateX(-50%) scale(var(--scene-scale, 1));
    transform-origin: top center;
}

/* =========================================
   NAVIGATION SMART CAR
   ========================================= */

#top-navigation {
    position: relative;
    width: 1100px;
    height: 70px;
    margin: 0 auto;
    z-index: 100;
}

#logo-smart {
    position: absolute;
    left: -50px;
    top: -45px;
    width: 1150px;
    height: 180px;
    object-fit: contain;
    pointer-events: none;
}

.navigation-buttons {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navigation-buttons a {
    display: block;
    height: 65px;
}

.navigation-buttons img {
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.navigation-buttons img:hover {
    transform: scale(1.05);
}

/* =========================================
   DASHBOARD PRINCIPAL
   ========================================= */

#dashboard {
    position: relative;
    width: 1100px;
    height: 580px;
    margin: 0 auto;
}

/* =========================================
   COMPTEUR VITESSE / RPM
   ========================================= */

#bloc-compteur {
    position: absolute;
    left: 0;
    top: 35px;
    width: 460px;
    height: 260px;
}

#image-compteur {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#valeur-vitesse,
#valeur-rpm {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

#valeur-vitesse {
    top: 38%;
    color: red;
    font-size: 30px;
}

#valeur-rpm {
    top: 67%;
    color: yellow;
    font-size: 15px;
}

/* =========================================
   TEMPÉRATURE
   ========================================= */

#bloc-temperature {
    position: absolute;
    top: 300px;
    left: 30px;
    width: 300px;
}

#bloc-temperature img {
    width: 90%;
    height: auto;
    display: block;
    margin: auto;
}

#valeur-temp {
    position: absolute;
    top: 60%;
    left: 55%;
    transform: translate(-50%, -50%);
    color: cyan;
    font-size: 20px;
    font-weight: bold;
}

/* =========================================
   PANNEAU DES PORTES
   ========================================= */

#bloc-portes {
    position: absolute;
    top: 140px;
    left: 420px;
    width: 280px;
    height: 200px;
}

#fond-portes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/porteoff.jpg") no-repeat center center;
    background-size: 100% 100%;
    z-index: 0;
}

.porte-on {
    position: absolute;
    background: url("../images/porteon.jpg") no-repeat;
    background-size: 280px 200px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.porte-on.active {
    opacity: 1;
}

#porte-avantgauche {
    top: 0;
    left: 0;
    width: 96px;
    height: 100px;
    background-position: 0 0;
}

#porte-avantdroite {
    top: 0;
    left: 165px;
    width: 96px;
    height: 100px;
    background-position: -165px 0;
}

#porte-arrieregauche {
    top: 100px;
    left: 0;
    width: 96px;
    height: 100px;
    background-position: 0 -100px;
}

#porte-arrieredroite {
    top: 100px;
    left: 146px;
    width: 84px;
    height: 100px;
    background-position: -146px -100px;
}

#porte-malle {
    top: 100px;
    left: 230px;
    width: 50px;
    height: 100px;
    background-position: -230px -100px;
}

/* =========================================
   COLONNE DROITE - TRAJET
   ========================================= */

#col-droite {
    position: absolute;
    top: 20px;
    left: 750px;
    width: 280px;
}

#col-droite img {
    width: 100%;
    height: auto;
    display: block;
}

.trip-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: rgb(228, 239, 252);
    font-weight: bold;
    white-space: nowrap;
}

#temps-trajet {
    top: 23%;
}

#distance {
    top: 43%;
}

#vmax {
    top: 63%;
}

#vmoy {
    top: 83%;
}

/* =========================================
   CLIGNOTANTS
   ========================================= */

.fleche-container {
    position: absolute;
    width: 80px;
    height: 80px;
    overflow: hidden;
}

.fleche-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fleche-container img:first-child {
    transform: rotate(180deg);
}

.fleche-on {
    opacity: 0;
}

.fleche-container .fleche-on {
    transform: rotate(180deg) scale(0.8);
}

@keyframes clignote {
    0%, 49% {
        opacity: 1;
    }

    50%, 100% {
        opacity: 0;
    }
}

.fleche-container.active .fleche-on {
    animation: clignote 0.6s infinite;
}

/* =========================================
   ICÔNES DU TABLEAU DE BORD
   ========================================= */

#bloc-icones {
    position: absolute;
    top: 390px;
    left: 360px;
    display: flex;
    gap: 15px;
}

.icone-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.icone-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icone-on {
    opacity: 0;
}

.icone-container.active .icone-on {
    opacity: 1;
}

/* =========================================
   BOUTONS NÉON
   ========================================= */

#bloc-boutons {
    position: absolute;
    top: 510px;
    left: 0;
    width: 100%;
    display: flex;
}

.btn-neo {
    flex: 1;
    height: 60px;
    font-size: 16px;
    border: 2px solid;
    border-radius: 0;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.2s ease;
}

.btn-neo:first-child {
    border-right: none;
}

#btn-defaut {
    background: #1a0000;
    color: #ff4444;
    border-color: #ff2222;
    box-shadow:
        0 0 8px #ff2222,
        inset 0 0 6px #ff000055;
}

#btn-pedales {
    background: #001a00;
    color: #44ff44;
    border-color: #22ff22;
    box-shadow:
        0 0 8px #22ff22,
        inset 0 0 6px #00ff0055;
}

.btn-neo:hover {
    filter: brightness(1.3);
}

/* =========================================
   POPUP
   ========================================= */

#popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 999;
}

#popup.show {
    opacity: 1;
    pointer-events: auto;
}

#popup-content {
    width: 460px;
    max-width: calc(100% - 30px);
    max-height: 85vh;
    overflow-y: auto;
    background: #0d0d0d;
    border-radius: 12px;
    color: white;
    animation: pop 0.2s ease;
}

@keyframes pop {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
}

#popup-body {
    padding: 16px;
    font-size: 13px;
    line-height: 1.8;
}

#popup.mode-defaut #popup-content {
    border: 2px solid #ff2222;
    box-shadow: 0 0 20px #ff2222;
}

#popup.mode-defaut #popup-header {
    background: #1a0000;
    color: #ff4444;
    border-bottom: 1px solid #ff2222;
}

#popup.mode-pedales #popup-content {
    border: 2px solid #22ff22;
    box-shadow: 0 0 20px #22ff22;
}

#popup.mode-pedales #popup-header {
    background: #001a00;
    color: #44ff44;
    border-bottom: 1px solid #22ff22;
}

#close-popup {
    cursor: pointer;
    color: #aaa;
    font-size: 16px;
    background: transparent;
    border: none;
    padding: 3px 6px;
}

#close-popup:hover {
    color: white;
}

/* =========================================
   LIGNES DES DONNÉES DU POPUP
   ========================================= */

.data-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #222;
}

.data-label {
    color: #888;
}

.data-value {
    font-weight: bold;
    text-align: right;
}

.val-ok {
    color: #44ff44;
}

.val-warn {
    color: #ffaa00;
}

.val-err {
    color: #ff4444;
}
