:root {
  --noir: #1a1a1a;
  --blanc: #ffffff;
  --orange: #E1571F;
  --gris-clair: #f4f4f4;
  --gris-bord: #e0e0e0;
  --vert: #2e7d32;
  --rouge: #c62828;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Calibri Light', Calibri, 'Segoe UI', sans-serif;
  background: var(--blanc);
  color: var(--noir);
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
}

.ecran {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.entete {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 32px;
}

.logo {
  width: 90px;
  height: 90px;
  border: 3px solid var(--noir);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--noir);
  margin-bottom: 12px;
}

.logo span {
  color: var(--orange);
  font-weight: bold;
  font-size: 34px;
}

.marque {
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.marque .accent { color: var(--orange); }

h1 { font-size: 24px; margin: 0 0 8px; text-align: center; }
h2 { font-size: 19px; margin: 0 0 16px; text-align: center; color: #333; font-weight: normal; }

.contenu { flex: 1; display: flex; flex-direction: column; gap: 14px; }

.bouton {
  display: block;
  width: 100%;
  padding: 18px;
  font-size: 18px;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: var(--noir);
  color: var(--blanc);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.bouton:active { opacity: 0.75; }

.bouton.orange { background: var(--orange); }
.bouton.contour {
  background: var(--blanc);
  color: var(--noir);
  border: 2px solid var(--noir);
}
.bouton.discret {
  background: transparent;
  color: #666;
  font-size: 15px;
  padding: 10px;
}
.bouton:disabled { opacity: 0.4; cursor: not-allowed; }

.champ {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-family: inherit;
  border: 2px solid var(--gris-bord);
  border-radius: 10px;
  background: var(--gris-clair);
}
.champ:focus { outline: none; border-color: var(--orange); }

.carte {
  border: 2px solid var(--gris-bord);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--gris-bord);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 17px;
}
.option input { width: 22px; height: 22px; flex-shrink: 0; }
.option.selectionnee { border-color: var(--orange); background: #fff4ef; }
.option.correcte { border-color: var(--vert); background: #eef7ee; }
.option.incorrecte { border-color: var(--rouge); background: #fbebeb; }

.progression {
  height: 8px;
  background: var(--gris-clair);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
}
.progression-barre {
  height: 100%;
  background: var(--orange);
  transition: width 0.3s;
}

.compteur { text-align: center; color: #777; font-size: 15px; margin-bottom: 16px; }

.enonce { font-size: 20px; font-weight: bold; margin-bottom: 24px; line-height: 1.4; }

.explication {
  margin-top: 20px;
  padding: 16px;
  background: var(--gris-clair);
  border-radius: 10px;
  font-size: 16px;
  color: #333;
}

.erreur { color: var(--rouge); font-size: 15px; text-align: center; margin-top: -6px; }

.resultat-score {
  font-size: 52px;
  font-weight: bold;
  text-align: center;
  color: var(--orange);
  margin: 20px 0 4px;
}
.resultat-libelle { text-align: center; color: #666; margin-bottom: 24px; }

table.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.stats th, table.stats td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--gris-bord);
  text-align: left;
}
table.stats th { color: #666; font-weight: normal; font-size: 13px; text-transform: uppercase; }

.barre-mini {
  height: 10px;
  background: var(--gris-clair);
  border-radius: 5px;
  overflow: hidden;
  width: 80px;
}
.barre-mini-remplie { height: 100%; background: var(--orange); }

.pied { text-align: center; margin-top: 24px; }

@media (min-width: 481px) {
  .ecran { border: 1px solid var(--gris-bord); border-radius: 16px; margin: 24px auto; box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
}
