* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f4f5f7; color: #1c1e21; }
header { background: #b3261e; color: #fff; padding: .6rem 1rem; display: flex;
         align-items: center; gap: 1.2rem; flex-wrap: wrap; }
header .logo { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
header nav { display: flex; gap: .9rem; flex-wrap: wrap; }
header nav a { color: #ffd9d6; text-decoration: none; }
header nav a:hover { color: #fff; }
header nav a.user { margin-left: .5rem; color: #fff; font-weight: 600; }
main { max-width: 900px; margin: 1.2rem auto; padding: 0 1rem; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
.aide { color: #5f6368; font-size: .9rem; }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.carte { background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 1rem;
         text-decoration: none; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.carte:hover { border-color: #b3261e; }
.carte.attention { border-color: #e8a100; background: #fff8e6; }
.bloc { background: #fff; border: 1px solid #ddd; border-radius: 10px;
        padding: 1rem; margin: 1rem 0; }
.option { display: block; padding: .55rem .7rem; margin: .35rem 0; border: 1px solid #ddd;
          border-radius: 8px; cursor: pointer; background: #fafafa; }
.option:hover { border-color: #b3261e; }
.option input { margin-right: .6rem; }
button { font: inherit; padding: .5rem 1rem; border-radius: 8px; border: 1px solid #bbb;
         background: #fff; cursor: pointer; }
button.principal { background: #b3261e; color: #fff; border-color: #b3261e; margin-top: .8rem; }
button.danger { border-color: #b3261e; color: #b3261e; }
.ligne-boutons { display: flex; gap: .8rem; margin-top: .8rem; }
.entete-quizz { display: flex; justify-content: space-between; font-weight: 600;
                flex-wrap: wrap; gap: .5rem; }
#chrono { color: #b3261e; }
.progression { height: 6px; background: #e3e3e3; border-radius: 3px; margin: .5rem 0 0; }
.progression div { height: 100%; background: #b3261e; border-radius: 3px; }
.question { margin-top: 0; }
.resultat { padding: 1rem; border-radius: 10px; display: flex; align-items: baseline;
            gap: 1rem; flex-wrap: wrap; }
.resultat.reussi { background: #e6f4ea; border: 1px solid #34a853; }
.resultat.rate { background: #fde8e6; border: 1px solid #b3261e; }
.resultat .note { font-size: 1.8rem; font-weight: 700; }
.correction.juste { border-left: 4px solid #34a853; }
.correction.faux { border-left: 4px solid #b3261e; }
.correction ul { list-style: none; padding-left: .3rem; }
.pastille { font-size: .75rem; background: #eee; border-radius: 10px; padding: .1rem .5rem;
            font-weight: 400; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #ddd;
        border-radius: 10px; }
td, th { padding: .5rem .7rem; border-bottom: 1px solid #eee; text-align: left; }
td.ok { color: #1e7d32; font-weight: 600; }
td.alerte { color: #b3261e; font-weight: 600; }
details summary { cursor: pointer; font-weight: 600; margin: .6rem 0; }
.reponse { background: #f0f7f0; border-radius: 8px; padding: .8rem; white-space: pre-line; }
textarea, input[type=text], select { font: inherit; width: 100%; padding: .45rem;
       border: 1px solid #bbb; border-radius: 8px; margin: .3rem 0 .8rem; }
select { width: auto; }
input[type=text] { width: auto; }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.scan img { width: 100%; border: 1px solid #ddd; border-radius: 6px; }
@media (max-width: 800px) { .colonnes { grid-template-columns: 1fr; } }
