/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Conteneur des exercices */
.exercices-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Style pour chaque exercice */
.exercice {
    display: grid;
    grid-template-columns: 1fr 80px;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 1.2rem;
}

/* Style de l'opération */
.operation {
    text-align: right;
    padding-right: 1rem;
}

/* Champ de réponse */
.reponse {
    width: 80px;
    padding: 0.5rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Suppression des flèches pour les inputs de type number */
.reponse::-webkit-outer-spin-button,
.reponse::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Pour Firefox */
.reponse[type=number] {
    -moz-appearance: textfield;
}

/* Styles pour les réponses correctes/incorrectes */
.correct {
    border-color: #28a745;
    background-color: #d4edda;
}

.incorrect {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* Boutons */
.buttons-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit {
    background-color: #007bff;
    color: white;
}

.submit:hover {
    background-color: #0056b3;
}

.generate {
    background-color: #6c757d;
    color: white;
}

.generate:hover {
    background-color: #545b62;
}

/* Score */
.score-container {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 8px;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .exercice {
        font-size: 1rem;
    }

    .buttons-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}