/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #6c5ce7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;  /* Colonne : header, container, footer */
    padding: 20px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.header {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 20px auto;
}

.back-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-link:hover {
    opacity: 0.8;
    transform: translateX(-5px);
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;  /* Centre horizontalement */
    /* flex: 1;  /* Prend tout l'espace disponible */
    display: flex;
    flex-direction: column;
}

/* Liste des thèmes sur la page d'accueil */
.themes-preview {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-radius: 15px;
}

.themes-preview h3 {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 15px;
    text-align: center;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag {
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tag.coming-soon {
    background: #f0f0f0;
    color: #999;
    border-color: #ddd;
    cursor: default;
}

.tag.coming-soon:hover {
    transform: none;
}

footer {
    max-width: 600px;
    width: 100%;
    margin: 20px auto 0 auto;
}

.footer {
    color: white;
    text-align: center;
    font-size: 0.9rem;
    padding: 15px;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.footer a:hover {
    border-bottom-color: white;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



#home .btn{
    display: block;
    margin: 0 auto;
}

/* Titres */
h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

h3 {
    color: #444;
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.6;
}

p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Boutons généraux */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
    transform: translateY(0);
}

/* Boutons de thème */
.theme-buttons, .difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    ;
}

.theme-btn {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.theme-title {
    font-size: 1.3rem;
    font-weight: bold;
}

.theme-desc {
    font-size: 0.9rem;
    opacity: 0.9;
}

.theme-mix {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Boutons de difficulté */
.difficulty-btn {
    width: 100%;
}

/* Quiz header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-weight: 600;
    color: #555;
}

/* Question container */
#question-container {
    margin: 30px 0;
}

/* Boutons de choix (QCM / Vrai-Faux) */
.choices {
    display: grid;
     grid-template-columns: 1fr 1fr !important;
    gap: 40px;  /* Plus d'espace entre les boutons */
}

.choice-btn {
    background: white;
    color: #333;
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;  /* ← AJOUTE ÇA ! Force le bouton à prendre toute la largeur */
}

.choice-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(5px);
}

.choice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Container pour écrire la réponse */
.write-answer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#answer-input {
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

#answer-input:focus {
    outline: none;
    border-color: #667eea;
}

#answer-input {
    pointer-events: auto;
    cursor: text;
    background: white;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

#answer-input:focus {
    outline: none;
    border-color: #667eea;
}

#answer-input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Feedback */
.feedback {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Bouton suivant */
#next-btn {
    display: block;
    margin: 20px auto 0;
}

/* Résultats */
.results-content {
    text-align: center;
}

.final-score {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin: 30px 0;
}

#result-message {
    font-size: 1.3rem;
    margin: 20px 0 40px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* CSS pour la barre de progression */
.progress-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

/*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⡀⠀⠀⠀⠀⠀⠈⢧⣀⡀⠀⣀⣀⠀⠀⢀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⢄⣹⣦⣤⣶⣶⣶⣶⣾⣿⢿⠿⣿⣿⣿⡦⣴⣾⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣵⣤⣾⣿⣿⡿⠟⠛⠛⣿⡟⠉⢡⣼⢶⣿⣿⣿⣧⡀⠀⠙⢿⣿⠵⢦⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⣤⣴⣿⣿⣿⣿⠛⠁⠀⠀⠘⣿⣥⣉⠸⣿⣤⣌⣀⣽⣿⣿⠠⢄⣾⡗⠀⠈⠙⠻⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠐⠒⠾⣿⡿⣿⣿⠿⠿⠃⠀⠀⠀⠀⠀⢿⣧⣀⠀⠙⠿⣿⡿⠿⠛⠀⠀⣸⣿⠃⠀⠀⠀⠀⠀⠢⠄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⠁⠀⠀⠀⠀⠈⠐⠉⠀⠈⠉⢛⠓⠀⠦⠄⠠⢤⣤⣤⣼⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠢⣤⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
                        111418
*/