/* --- REZÈT AK FONT --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f0f4ff;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    color: white;
    text-align: center;
    padding: 48px 20px 40px;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.18);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -40px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

header .logo {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 16px;
}

header h1 {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

header p {
    font-size: clamp(14px, 3vw, 16px);
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- CONTENEUR PRINCIPAL --- */
.conteneur {
    flex: 1;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 16px 40px;
}

/* --- FILTRES --- */
.filtres {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-filtre {
    background-color: white;
    border: 2px solid #e5e7eb;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-filtre:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #eff6ff;
}

.btn-filtre.actif {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* --- CARTE QUESTION --- */
.carte-question {
    background: white;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 2px 24px rgba(30, 58, 138, 0.07);
    border: 1px solid #e8edf8;
}

/* BARRE PROGRESSION */
.progression-barre {
    background-color: #e5e7eb;
    border-radius: 10px;
    height: 7px;
    width: 100%;
    margin-bottom: 22px;
    overflow: hidden;
}

.progression {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* INFOS QUESTION */
.infos-question {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}

/* TEXTE QUESTION */
.texte-question {
    font-size: clamp(17px, 3.5vw, 20px);
    font-weight: 700;
    color: #111827;
    line-height: 1.55;
    margin-bottom: 28px;
}

/* --- OPTIONS --- */
.liste-options {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.btn-option {
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 15px 18px;
    font-size: clamp(14px, 3vw, 16px);
    text-align: left;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.btn-option:hover:not(:disabled) {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: translateX(4px);
}

.btn-option.correct {
    background-color: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    font-weight: 700;
}

.btn-option.incorrect {
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
    font-weight: 700;
}

/* --- EXPLICATION --- */
.boite-explication {
    background: #f0f7ff;
    border-left: 5px solid #3b82f6;
    border-radius: 0 12px 12px 0;
    padding: 18px 20px;
    margin-top: 24px;
    animation: aficheDousman 0.35s ease forwards;
}

.boite-explication strong {
    color: #1e3a8a;
    font-size: 14px;
    display: block;
    margin-bottom: 7px;
}

.boite-explication p {
    color: #374151;
    font-size: 15px;
    line-height: 1.65;
}

/* --- BOUTON SUIVANT --- */
.btn-suivant {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-top: 22px;
    box-shadow: 0 4px 16px rgba(29, 78, 216, 0.25);
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.btn-suivant:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.35);
}

.btn-suivant:active {
    transform: translateY(0);
}

/* --- SCORE FINAL --- */
.score-container {
    background: white;
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 2px 24px rgba(30, 58, 138, 0.07);
    border: 1px solid #e8edf8;
}

.score-container h2 {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.score-container p {
    font-size: clamp(16px, 3.5vw, 19px);
    color: #4b5563;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 22px 20px;
    font-size: 13px;
    color: #9ca3af;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

/* --- ANIMATION --- */
@keyframes aficheDousman {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 480px) {
    header {
        padding: 36px 16px 30px;
    }

    .conteneur {
        padding: 20px 12px 32px;
    }

    .carte-question {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .score-container {
        padding: 36px 20px;
    }

    .filtres {
        gap: 8px;
    }

    .btn-filtre {
        padding: 9px 16px;
        font-size: 13px;
    }

    .btn-option {
        padding: 13px 15px;
    }

    .btn-suivant {
        padding: 15px;
        font-size: 15px;
    }
}