/* Corps de la page */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background: #111;
    color: white;
    font-family: sans-serif;
    gap: 20px;
    margin: 0;
}

/* Header fixe */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #111;
    color: white;
    text-align: center;
    padding: 10px 0;
    z-index: 100;
    font-family: sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Décalage contenu pour header */
#game, #menu, #endScreen {
    padding-top: 140px;
    width: 100%;
    text-align: center;
}

/* Scene / multiprise */
.scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 100%;
}

.multiprise {
    display: flex;
    gap: 20px;
    padding: 10px;
    background: #ccc;
    border-radius: 15px;
}

/* Prises */
.prise {
    width: 80px;
    height: 80px;
    background: #eee;
    border: 2px solid #999;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Broches */
.prise::before,
.prise::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.prise::before { left: 25%; }
.prise::after { right: 25%; }

/* Fil et appareil */
.prise .fil {
    position: absolute;
    width: 4px;
    height: 40px;
    background: #222;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.prise .appareil {
    position: absolute;
    width: 20px;
    height: 40px;
    background: #222;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
}

/* États prises */
.prise.on {
    background: #555; /* gris foncé */
    border: 2px solid #333;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    cursor: pointer;
}
.prise.on::before,
.prise.on::after {
    display: none; /* supprime broches si branché */
}

.prise.off {
    background: #eee;
    border: 2px solid #999;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Overlay menu / endScreen */
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: rgba(0,0,0,0.95);
    color: white;
    gap: 20px;
    z-index: 10;
}

/* Masquer éléments */
.hidden {
    display: none !important;
}

/* Inputs et boutons */
input {
    padding: 5px 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: #333;
    color: white;
    transition: 0.2s;
}
button:hover {
    background: #555;
}

/* Tableau scoreboard */
table {
    border-collapse: collapse;
    margin-top: 10px;
}
td {
    padding: 5px 15px;
    border: 1px solid #fff;
}
thead td {
    font-weight: bold;
    background: #222;
}

/* Responsiveness */
@media (max-width: 500px) {
    .multiprise { flex-wrap: wrap; gap: 10px; }
    .prise { width: 60px; height: 60px; }
    .prise .appareil { width: 15px; height: 30px; bottom: -30px; }
    .prise .fil { height: 30px; }
}
