/* Style général */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #003366, #0059b3);
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Remplacé height: 100vh pour éviter les problèmes sur mobile */
    animation: backgroundSlide 10s infinite alternate;
}

/* Animation pour changer le gradient d'arrière-plan */
@keyframes backgroundSlide {
    0% {
        background: linear-gradient(to right, #003366, #0059b3);
    }
    100% {
        background: linear-gradient(to right, #003366, #001f4d);
    }
}

/* Conteneur du quiz */
.quiz-container {
    max-width: 800px;
    width: 90%; /* Assure une bonne adaptation aux petits écrans */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin: 20px;
    animation: fadeIn 1.5s ease-in-out;
    transition: transform 0.3s ease-in-out;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quiz-container:hover {
    transform: scale(1.02);
}

/* Titre */
h1 {
    color: #003366;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Questions */
.question {
    margin-bottom: 30px;
    counter-increment: question-counter;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: background-color 0.3s ease-in-out;
}

.question:hover {
    background-color: #eef7ff;
}

.question h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.question h2::before {
    content: "Question " counter(question-counter) ": ";
    font-weight: bold;
}

/* Options */
.options {
    margin-top: 15px;
}

.option {
    display: block;
    margin: 10px 0;
    font-size: 1.1em;
    color: #444;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
}

.option:hover {
    color: #ffffff;
    background-color: #0059b3;
    border: 1px solid #003366;
}

input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

/* Bouton */
button {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background-color: #003366;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
    margin-top: 20px;
}

button:hover {
    background-color: #0059b3;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    background-color: #002244;
}

/* Résultat */
#result {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    color: #003366;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design pour petits écrans */
@media (max-width: 768px) {
    .quiz-container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    button {
        font-size: 1em;
        padding: 12px;
    }

    .question h2 {
        font-size: 1.2em;
    }

    .option {
        font-size: 1em;
        padding: 10px;
    }
}

/* Pour assurer un bon alignement des questions */
.quiz-container {
    counter-reset: question-counter;
}
