body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
}

.logo {
    display: block; /* Permet de le centrer avec les marges */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px; /* Espace entre le logo et le titre */
    max-width: 150px; /* Taille maximale, ajustez selon vos besoins */
    height: auto; /* Garde les bonnes proportions */
}

h1, h2 {
    color: #005a9e; /* Bleu France */
}

form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

input[type="text"],
input[type="number"] {
    width: 95%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #005a9e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
}

button:hover {
    background-color: #003d6b;
}

hr {
    border: 1px solid #eee;
    margin: 20px 0;
}

.liste-input {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 10px;
}

.error-text {
    color: #D8000C; /* Rouge erreur */
    background-color: #FFD2D2;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    display: none; /* Caché par défaut */
}


.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #cce5ff;
    border-radius: .25rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.calcul-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    min-width: 600px;
}

.calcul-table th, .calcul-table td {
    padding: 12px 15px;
    text-align: center;
    border: none;
    border-bottom: 1px solid #cce5ff;
}

.calcul-table thead th {
    background-color: #e7f0fe;
    color: #004085;
    font-weight: 600;
    border-bottom-width: 2px;
    border-bottom-color: #b8daff;
}

/* NOUVELLE RÈGLE : Fond rouge très pâle pour toutes les cellules par défaut */
.calcul-table tbody td {
    background-color: #fff0f0; /* Rouge très pâle */
}

.calcul-table tbody tr:last-of-type td {
    border-bottom: none;
}

.calcul-table td strong {
    font-size: 1.2em;
    font-weight: 700;
    display: block;
    color: #333;
}

.calcul-table .formule {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 4px;
}

/* La cellule du gagnant passe en bleu, écrasant le rouge pâle */
.calcul-table .gagnant {
    background-color: #cce5ff !important;
    color: #004085;
    font-weight: bold;
}

/* Style pour le compteur de voix */
#compteur-voix {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    border: 1px solid;
}

.compteur-voix-valide {
    background-color: #d4edda; /* Vert */
    color: #155724;
    border-color: #c3e6cb;
}

.compteur-voix-alerte {
    background-color: #fff3cd; /* Jaune/Orange */
    color: #856404;
    border-color: #ffeeba;
}

.compteur-voix-invalide {
    background-color: #f8d7da; /* Rouge */
    color: #721c24;
    border-color: #f5c6cb;
}

.recap-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    padding: 15px 20px;
    margin-bottom: 25px;
    max-width: 600px
}

.recap-container h2 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #005a9e;
    padding-bottom: 10px;
}

.recap-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.recap-list li {
    font-size: 1.1em;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.recap-list li:last-child {
    border-bottom: none;
}

.recap-list li strong {
    color: #005a9e;
}

.recap-subtitle {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
    font-weight: 600;
}

/* Style pour le conteneur éducatif */

/* Style pour le bouton Afficher/Masquer */
.details-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

.details-button:hover {
    background-color: #0056b3;
}
.educational-container .intro-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #495057;
    max-width:600px;
}

.educational-container h3 {
    text-align: center;
    color: #005a9e;
    margin-top: 0;
}

/* Style pour chaque bloc d'étape */
.step-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
}

.step-box h4 {
    margin-top: 0;
    color: #343a40;
    border-bottom: 2px solid #005a9e;
    padding-bottom: 10px;
}

.calculation-list {
    list-style-type: none;
    padding: 0;
    margin: 15px 0;
}

.calculation-list li {
    padding: 8px;
    border-radius: 4px;
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* On met en évidence le gagnant de chaque étape */
.calculation-list .gagnant-li {
    background-color: #cce5ff;
    border-left: 5px solid #004085;
    color: #004085;
}

.verdict {
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ced4da;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 25px;
}