/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* GLOBAL */
body {
    background: #fff;
    color: #111;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

main {
    width: 100%;
    height: 100%;
}

/* ===== ACCUEIL ET CONNEXIONS ===== (La vie de oim Arthur que si tu touches à ça je te frappe)*/
.accueil {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    text-align: center;
    gap: 15px;
}

.header-transparent {
    height: 15%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1%;
}

.hero-img {
    width: 500px;
}

.accueil-title {
    font-size: 2.5rem;
    color: #111;
}

.accueil-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #111;
}

.primary-btn {
    padding: 18px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 12px;
    background: #2980b9;
    color: white;
}

.secondary-btn {
    height: 100%;
    width: 5%;
    padding: 9px 15px;
    font-size: clamp(1.2rem, 2vh, 18px);
    border: none;
    border-radius: 12px;
    background: #2980b9;
    color: white;
    box-sizing: border-box;
}

.header-transparent .secondary-btn {
    flex: 0 0 auto;       
    height: 70%;          
    font-size: clamp(12px, 2vh, 18px); 
    padding: 0.3em 0.6em;    
    min-width: 40px;         
    box-sizing: border-box;
}

button:disabled {
    pointer-events: none;  
    transition: none;         
    animation: none;          
    opacity: 0.5;             
    cursor: not-allowed;
}
/* ===== HEADER BAR PILOTAGE ===== */
.header-bar {
    height: 15%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f0f0f0;
    color: #111;
}

.header-bar button {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
}

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

.btnArret {
    background: red;
    color: white;
    font-weight: bold;
}

.driving-modes {
    display: flex;
    gap: 8px;
}

.mode-btn {
    background: #ddd;
    color: #111;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
}

.mode-btn.active {
    background: #2980b9;
    color: white;
}

/* ===== CONTROLES (MANETTE) ===== */
.controls-container {
    height: 85%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
}

/* GAUCHE / DROITE */
.controls-left,
.controls-right {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

/* BOUTONS DIRECTION (GRANDS PC) */
.dir {
    width: 300px;
    height: 300px;
    font-size: 4.5rem;
    border-radius: 50%;
    border: none;
    background: #2980b9;
    color: white;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    transition: transform 0.1s;
    cursor: pointer;
}

.dir.active {
    transform: scale(0.95);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    background-color: #1f6fa0;
}


#btnDeconnecter {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: #2980b9;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}


/* POSITION STYLE MANETTE POUR PC */
.controls-left {
    width: 40%;
    justify-content: center;
}

.controls-right {
    width: 40%;
    flex-direction: column;
    justify-content: center;
}

/* Tous les boutons ont un effet de pression */
button:active,
.dir:active,
#btnDeconnecter:active,
.mode-btn:active {
    transform: scale(0.9); /* le bouton “rétrécit” un peu */
    box-shadow: 0 3px 6px rgba(0,0,0,0.2); /* ombre réduite */
}

/* ===== RESPONSIVE POUR TÉLÉPHONE PAYSAGE ===== */
@media screen and (max-width: 1000px) {
    .controls-container {
        flex-direction: row;
        padding: 15px;
    }

    .controls-left,
    .controls-right {
        width: 45%;
        gap: 10px; /* espacement réduit */
    }

    .dir {
        width: 130px;
        height: 130px;
        font-size: 2rem;
    }

    .primary-btn, .mode-btn, .header-bar button {
        font-size: 1rem;
        padding: 10px 18px;
    }

    .hero-img {
        width: 150px;
    }

    .accueil-title {
        font-size: 1.8rem;
    }

    .accueil-subtitle {
        font-size: 0.95rem;
    }
}

/* ===== MESSAGE EN PORTRAIT MOBILE ===== */
@media screen and (orientation: portrait) and (max-width: 1000px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    body::before {
        content: "Veuillez tenir vôtre téléphone en mode paysage";
        font-size: 1.5rem;
        text-align: center;
        color: #111;
    }

    main {
        display: none;
    }
}

/* ===== BOUTONS HEADER POUR PC ===== */
@media screen and (min-width: 1001px) {
    .header-bar button,
    #btnDeconnecter {
        padding: 16px 25px;
        font-size: 1.5rem;
    }
    .status-info span {
        font-size: 1.5rem;
    }
}
/*version juste*/


