/* =====================================================
   style.css — L'apparence d'« Objectif Bac »
   Un style jeune et coloré, sans oublier la lisibilité :
   texte en grand, contraste fort, gros boutons.
   ===================================================== */

/* ----- 1. Les couleurs (variables) ----- */
:root {
  --violet: #7c3aed;
  --violet-fonce: #5b21b6;
  --rose: #db2777;
  --degrade: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --fond: #f6f3ff;
  --carte: #ffffff;
  --texte: #1e1b4b;
  --discret: #5b5876;
  --vert: #15803d;
  --rouge: #b91c1c;
  --ombre: 0 6px 20px rgba(91, 33, 182, 0.10);
  --ombre-forte: 0 10px 28px rgba(91, 33, 182, 0.18);
  --rayon: 22px;

  /* Une couleur par matière (foncée) et sa version pastel (claire) */
  --histoire: #c2410c;   --histoire-clair: #ffedd5;
  --geographie: #0f766e; --geographie-clair: #ccfbf1;
  --francais: #be185d;   --francais-clair: #fce7f3;
  --emc: #1d4ed8;        --emc-clair: #dbeafe;

  /* Une couleur par niveau */
  --cap: #c2410c;
  --seconde: #15803d;
  --premiere: #a16207;
  --terminale: #7c3aed;

  /* Une couleur par type d'exercice */
  --trous: #b45309;      --trous-clair: #fef3c7;
  --quiz: #7c3aed;       --quiz-clair: #ede9fe;
  --questions: #047857;  --questions-clair: #d1fae5;
  --ordre: #1d4ed8;      --ordre-clair: #dbeafe;
}

/* ----- 2. Réglages généraux ----- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", Arial, sans-serif;
  font-size: 1.1875rem;       /* texte en grand (19 px) */
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  padding-bottom: 110px;      /* place pour le menu du bas */
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 24px;
  animation: apparition 0.35s ease-out;
}

h1 { font-size: 1.65rem; line-height: 1.2; margin: 14px 0; font-weight: 900; color: var(--violet-fonce); }
h2 { font-size: 1.25rem; margin: 28px 0 12px; font-weight: 800; }
h3 { font-weight: 800; }

@keyframes apparition {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes rebond {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Pas d'animation pour ceux qui les ont désactivées */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ----- 3. En-tête ----- */
.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--degrade);
  color: white;
  padding: 10px 16px;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--ombre-forte);
}
.retour {
  color: white;
  text-decoration: none;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}
.retour.invisible, .entete.invisible { display: none; }   /* pas d'en-tête sur les onglets principaux */
.entete.invisible + #ecran { padding-top: 16px; }

/* ----- 4. Menu du bas ----- */
.menu-bas {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 10px;
  right: 10px;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 6px;
  background: white;
  border-radius: 24px;
  box-shadow: var(--ombre-forte);
}
.menu-bas a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  text-decoration: none;
  color: var(--discret);
  font-size: 0.75rem;
  font-weight: 800;
}
.menu-bas .icone {
  font-size: 1.45rem;
  width: 48px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transition: background 0.2s;
}
.menu-bas a.actif { color: var(--violet-fonce); }
.menu-bas a.actif .icone { background: var(--quiz-clair); }

/* ----- 5. L'accueil ----- */
.bienvenue {
  position: relative;
  overflow: hidden;
  background: var(--degrade);
  color: white;
  border-radius: 28px;
  padding: 22px 20px;
  margin: 16px 0 6px;
  box-shadow: var(--ombre-forte);
}
.bienvenue::after {           /* une bulle décorative */
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.bienvenue h1 { color: white; margin: 0 0 6px; font-size: 1.75rem; }
.bienvenue p { margin: 0; font-weight: 600; }
/* Les 4 grandes tuiles */
.tuiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.tuile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border-radius: var(--rayon);
  text-decoration: none;
  color: var(--texte);
  background: var(--clair);
  box-shadow: var(--ombre);
  transition: transform 0.15s;
}
.tuile:active { transform: scale(0.96); }
.tuile .bulle {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  background: white;
  border-radius: 18px;
  box-shadow: var(--ombre);
}
.tuile strong { font-size: 1.15rem; font-weight: 900; color: var(--fonce); }
.tuile span.infos { font-size: 0.88rem; }
.tuile-cours     { --clair: var(--quiz-clair);      --fonce: var(--violet-fonce); }
.tuile-exercices { --clair: var(--trous-clair);     --fonce: var(--trous); }
.tuile-methodo   { --clair: var(--questions-clair); --fonce: var(--questions); }
.tuile-lexique   { --clair: var(--ordre-clair);     --fonce: var(--ordre); }
.tuile-francais  { --clair: var(--francais-clair);  --fonce: var(--francais); }
.tuile-hg        { --clair: var(--histoire-clair);  --fonce: var(--histoire); }

/* Une tuile en largeur (méthodo, carte du monde) */
.tuile-large {
  flex-direction: row;
  align-items: center;
  min-height: 0;
  margin-bottom: 18px;
}
.tuile-large > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.tuile-large .bulle { flex-shrink: 0; }

/* Les deux défis, côte à côte */
.defis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 18px; }
.defis .bouton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 14px 10px;
}
.defis .icone { font-size: 1.7rem; }
.defis .bouton.defi-francais { background: linear-gradient(135deg, #be185d 0%, #db2777 100%); }
.defis .bouton.defi-hg { background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%); }

/* La notion du jour */
.notion-du-jour {
  display: block;
  text-decoration: none;
  color: var(--texte);
  background: white;
  border: 3px dashed var(--violet);
  border-radius: var(--rayon);
  padding: 16px;
  box-shadow: var(--ombre);
}
.notion-du-jour .etiquette { font-weight: 900; color: var(--rose); font-size: 0.95rem; }
.notion-du-jour h3 { margin: 4px 0; font-size: 1.3rem; color: var(--violet-fonce); }
.notion-du-jour p { margin: 0 0 8px; }

/* ----- 6. Les cartes ----- */
.carte {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--carte);
  color: var(--texte);
  text-decoration: none;
  border-radius: var(--rayon);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--ombre);
  transition: transform 0.15s;
}
a.carte:active { transform: scale(0.98); }
.carte .contenu { flex: 1; min-width: 0; }
.carte h3 { margin: 4px 0; font-size: 1.1rem; line-height: 1.3; }
.carte p { margin: 2px 0 0; }
.carte .fleche { font-size: 1.6rem; color: var(--couleur, var(--violet)); font-weight: 900; }
.carte.bloc { display: block; }

/* La bulle colorée à gauche d'une carte */
.pastille-icone {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--couleur, var(--violet));
  background: var(--clair, var(--quiz-clair));
  border-radius: 16px;
}

.infos { color: var(--discret); font-size: 0.93rem; font-weight: 600; }

/* Les couleurs des matières, des niveaux et des exercices */
.matiere-histoire   { --couleur: var(--histoire);   --clair: var(--histoire-clair); }
.matiere-geographie { --couleur: var(--geographie); --clair: var(--geographie-clair); }
.matiere-francais   { --couleur: var(--francais);   --clair: var(--francais-clair); }
.matiere-emc        { --couleur: var(--emc);        --clair: var(--emc-clair); }
.niveau-cap         { --couleur: var(--cap); }
.niveau-seconde     { --couleur: var(--seconde); }
.niveau-premiere    { --couleur: var(--premiere); }
.niveau-terminale   { --couleur: var(--terminale); }
.type-trous         { --couleur: var(--trous);     --clair: var(--trous-clair); }
.type-quiz          { --couleur: var(--quiz);      --clair: var(--quiz-clair); }
.type-questions     { --couleur: var(--questions); --clair: var(--questions-clair); }
.type-ordre         { --couleur: var(--ordre);     --clair: var(--ordre-clair); }
.type-methodo       { --couleur: var(--questions); --clair: var(--questions-clair); }

/* Titre de niveau */
.titre-niveau {
  display: inline-block;
  background: var(--couleur);
  color: white;
  padding: 6px 18px;
  border-radius: 999px;
}

/* Petite étiquette colorée */
.badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--couleur, var(--violet));
  background: var(--clair, var(--quiz-clair));
  border-radius: 999px;
  padding: 3px 12px;
}

/* ----- 7. Les blocs de texte ----- */
.encadre {
  background: var(--carte);
  border-radius: var(--rayon);
  padding: 16px;
  margin: 14px 0;
  box-shadow: var(--ombre);
}
.encadre > p { margin: 0 0 12px; }
.encadre > p:last-child { margin-bottom: 0; }
.encadre h2 { margin-top: 0; }
.a-retenir {
  background: #fffbeb;
  border: 3px solid #fcd34d;
}
.a-retenir ul { margin: 0; padding-left: 0; list-style: none; }
.a-retenir li { margin-bottom: 12px; padding-left: 34px; position: relative; }
.a-retenir li::before { content: "⭐"; position: absolute; left: 0; }
.a-retenir li:last-child { margin-bottom: 0; }
.vide { color: var(--discret); font-style: italic; }

/* Notions en pastilles */
.pastilles { display: flex; flex-wrap: wrap; gap: 10px; }
.pastille {
  background: var(--clair, white);
  color: var(--couleur, var(--texte));
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 800;
}

.definition { font-size: 1.2rem; font-weight: 600; }

/* ----- 8. Les boutons ----- */
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  color: white;
  background: var(--couleur, var(--violet));
  border: none;
  border-radius: 18px;
  padding: 12px 20px;
  min-height: 56px;          /* gros boutons faciles à toucher */
  cursor: pointer;
  box-shadow: var(--ombre);
  transition: transform 0.15s;
}
.bouton:active { transform: scale(0.96); }
.bouton.principal { background: var(--degrade); }
.bouton.secondaire {
  background: white;
  color: var(--violet-fonce);
  border: 3px solid var(--quiz-clair);
}

/* Les boutons d'exercices d'une séquence */
.exercices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.exercices .bouton {
  flex-direction: column;
  padding: 12px 8px;
  font-size: 0.92rem;
  color: var(--couleur);
  background: var(--clair);
  box-shadow: none;
}
.exercices .icone { font-size: 1.7rem; }

/* ----- 9. Recherche du lexique ----- */
.recherche {
  width: 100%;
  font: inherit;
  font-weight: 700;
  padding: 14px 20px;
  border: 3px solid var(--quiz-clair);
  border-radius: 999px;
  margin: 8px 0 8px;
  box-shadow: var(--ombre);
  outline: none;
}
.recherche:focus { border-color: var(--violet); }
.groupe-lexique { margin-top: 22px; }
.groupe-lexique h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.1rem; }

/* ----- 10. Le quiz ----- */
.barre {
  height: 14px;
  background: var(--quiz-clair);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0;
}
.barre div { height: 100%; background: var(--degrade); border-radius: 999px; transition: width 0.3s; }
.progression { color: var(--discret); font-weight: 800; margin: 4px 0; }
.choix { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.choix .bouton {
  width: 100%;
  background: white;
  color: var(--texte);
  border: 3px solid var(--quiz-clair);
  justify-content: flex-start;
  text-align: left;
}
.choix .bouton.juste { background: var(--vert); color: white; border-color: var(--vert); animation: rebond 0.4s; }
.choix .bouton.faux  { background: var(--rouge); color: white; border-color: var(--rouge); }
.choix .bouton:disabled { cursor: default; }
.message { font-weight: 900; font-size: 1.15rem; }
.message.juste { color: var(--vert); animation: rebond 0.4s; }
.message.faux  { color: var(--rouge); }
.score {
  font-size: 3.2rem;
  font-weight: 900;
  text-align: center;
  color: white;
  background: var(--degrade);
  border-radius: 28px;
  padding: 18px;
  margin: 12px 0;
  animation: rebond 0.5s;
}

/* ----- 11. Les textes à trous ----- */
.texte-trous { line-height: 2.5; font-size: 1.1rem; }
.trou {
  font: inherit;
  font-weight: 800;
  color: var(--trous);
  background: var(--trous-clair);
  border: 2px dashed var(--trous);
  border-radius: 12px;
  padding: 2px 6px;
  max-width: 100%;
}
.trou.juste { color: white; background: var(--vert); border: 2px solid var(--vert); }
.trou.faux  { color: white; background: var(--rouge); border: 2px solid var(--rouge); }
.trou.corrige { color: var(--vert); background: #dcfce7; border: 2px solid var(--vert); }

/* ----- 12. Les questions de cours ----- */
.reponse-eleve {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 3px solid var(--questions-clair);
  border-radius: 16px;
  margin: 10px 0 0;
}
.correction {
  background: var(--questions-clair);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 12px;
  font-weight: 600;
  animation: apparition 0.3s;
}
.cache { display: none; }

/* ----- 13. Remettre dans l'ordre ----- */
.zone-ordre { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.zone-reponse {
  border: 3px dashed var(--ordre);
  border-radius: var(--rayon);
  padding: 12px;
  margin: 10px 0 18px;
  background: white;
}
.phrase {
  font: inherit;
  font-weight: 700;
  text-align: left;
  color: var(--texte);
  background: var(--ordre-clair);
  border: none;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
}
.zone-reponse .phrase { background: white; border: 2px solid var(--ordre-clair); }
.phrase .numero { display: inline-block; min-width: 30px; font-weight: 900; color: var(--ordre); }
.phrase.juste { background: #dcfce7; border-color: var(--vert); }
.phrase.faux  { background: #fee2e2; border-color: var(--rouge); }

/* ----- 14. Les fiches de méthode ----- */
.famille {
  background: white;
  border-radius: var(--rayon);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--ombre);
}
.famille h3 { margin: 0 0 10px; font-size: 1.05rem; }
.mots { display: flex; flex-wrap: wrap; gap: 8px; }
.mot {
  background: var(--questions-clair);
  color: var(--questions);
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.95rem;
}
.etape { display: flex; gap: 14px; align-items: flex-start; }
.etape .lettre {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 900;
  color: white;
  background: var(--degrade);
  border-radius: 16px;
}
.etape .exemple { font-style: italic; color: var(--discret); }
.partie { border-left: 6px solid var(--violet); padding-left: 12px; margin: 14px 0; }
.partie strong { color: var(--violet-fonce); }
.sujet { font-weight: 800; }
.coche { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; font-weight: 600; cursor: pointer; }
.coche input { width: 26px; height: 26px; flex-shrink: 0; accent-color: var(--vert); margin-top: 2px; }

/* ----- 15. Sur les très petits écrans ----- */
@media (max-width: 360px) {
  body { font-size: 17px; }
  .tuiles { gap: 10px; }
  .menu-bas a { font-size: 0.68rem; }
}
.phrase .numero:empty { display: none; }

/* ----- 16. Nouvelles couleurs d'exercices ----- */
:root {
  --flashcards: #be185d;  --flashcards-clair: #fce7f3;
  --localiser: #0f766e;   --localiser-clair: #ccfbf1;
}
.type-flashcards { --couleur: var(--flashcards); --clair: var(--flashcards-clair); }
.type-localiser  { --couleur: var(--localiser);  --clair: var(--localiser-clair); }
.type-croquis    { --couleur: var(--geographie); --clair: var(--geographie-clair); }

/* L'en-tête et le menu passent toujours au-dessus de la carte */
.entete, .menu-bas { z-index: 1000; }

/* ----- 17. La grande tuile de la carte ----- */
.tuile-carte {
  --clair: var(--localiser-clair);
  --fonce: var(--localiser);
  margin-top: 6px;
}

/* ----- 18. Les boutons de filtre (carte, flashcards) ----- */
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; }
.filtre {
  flex-shrink: 0;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--violet-fonce);
  background: white;
  border: 2px solid var(--quiz-clair);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.filtre.actif { color: white; background: var(--degrade); border-color: transparent; }

/* ----- 19. La carte interactive ----- */
.cadre-carte {
  height: 42vh;                /* assez grande pour être fluide, sans cacher le reste */
  min-height: 260px;
  max-height: 440px;
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre-forte);
  margin: 8px 0;
  isolation: isolate;          /* la carte reste sous l'en-tête */
}
.repere span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  background: white;
  border: 3px solid var(--localiser);
  border-radius: 50% 50% 50% 0;   /* une goutte */
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.repere i { font-style: normal; transform: rotate(45deg); }
.repere.jeu span    { border-color: var(--violet); }
.repere.juste span  { border-color: var(--vert); background: #dcfce7; }
.repere.faux span   { border-color: var(--rouge); background: #fee2e2; }
.leaflet-popup-content { font-family: "Nunito", Arial, sans-serif; font-size: 15px; }
.bulle-lieu strong { font-size: 1.05rem; color: var(--violet-fonce); }
.bulle-lieu p { margin: 6px 0; }
.lien-seance { font-weight: 800; color: var(--violet); }
.consigne h2 { margin: 4px 0 0; }

/* ----- 20. Les flashcards ----- */
.flashcard {
  display: block;
  width: 100%;
  height: 300px;
  padding: 0;
  margin: 10px 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  perspective: 1000px;         /* donne de la profondeur au retournement */
}
.flashcard-interieur {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.flashcard.retournee .flashcard-interieur { transform: rotateY(180deg); }
.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border-radius: 28px;
  backface-visibility: hidden;  /* on ne voit pas le dos d'une face */
  box-shadow: var(--ombre-forte);
  text-align: center;
}
.recto { background: var(--degrade); color: white; }
.recto strong { font-size: 1.8rem; line-height: 1.2; font-weight: 900; }
.recto .sorte { font-weight: 800; background: rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 3px 12px; font-size: 0.9rem; }
.recto .astuce { font-size: 0.9rem; opacity: 0.9; }
.verso { background: white; color: var(--texte); transform: rotateY(180deg); border: 4px solid var(--flashcards-clair); }
.verso p { margin: 0; font-size: 1.2rem; font-weight: 700; }
.bouton.savais { --couleur: var(--vert); }
.bouton.revoir { --couleur: #c2410c; }

/* ----- 21. Les vidéos ----- */
.cadre-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.cadre-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Quand l'écran défile jusqu'à un bouton, il s'arrête au-dessus du menu du bas */
.boutons { scroll-margin-bottom: 120px; }

/* ----- 20. Méthodo : rubriques et tableaux ----- */
.rubrique-methodo { scroll-margin-top: 80px; }
.ligne-tableau h3 { margin: 0 0 6px; color: var(--questions); }
.ligne-tableau p { margin: 4px 0; }
.ligne-tableau strong { color: var(--discret); font-weight: 800; }

/* Le choix de la matière (Cours, Exercices, Lexique) */
.choix-matiere { margin-bottom: 4px; }

/* ----- 21. Entraînement type bac ----- */
.tuile-bac { --clair: var(--trous-clair); --fonce: var(--trous); }
.type-bac  { --couleur: var(--trous); --clair: var(--trous-clair); }
.document-bac {
  background: white;
  border-left: 6px solid var(--trous);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 12px 0;
  box-shadow: var(--ombre);
}
.document-bac summary { font-weight: 900; cursor: pointer; color: var(--trous); }
.texte-document { white-space: pre-line; line-height: 1.65; }
.document-bac .source { font-size: 0.85rem; color: var(--discret); font-style: italic; }
.titre-partie { margin: 22px 0 6px; color: var(--violet-fonce); }
.question-bac { display: block; }
.question-bac h3 { margin: 8px 0; }
.question-bac .reponse-eleve { width: 100%; font: inherit; font-size: 1rem; padding: 10px; border-radius: 12px; border: 2px solid var(--quiz-clair); }
.compteur { font-size: 0.85rem; color: var(--discret); margin: 4px 0 0; }
.aide { background: var(--trous-clair); border-radius: 12px; padding: 10px 12px; }
.bouton.petit { font-size: 0.9rem; padding: 8px 12px; }
.indices { list-style: none; padding: 0; margin: 10px 0; }
.indices li { padding: 8px 10px; border-radius: 10px; margin: 6px 0; }
.indices li.reussi { background: #dcfce7; color: #14532d; }
.indices li.a-revoir { background: #fef3c7; color: #78350f; }
.indices li.remarque { font-size: 0.85rem; color: var(--discret); }
.grille, .corrige { background: var(--fond); border-radius: 14px; padding: 10px 14px; margin-top: 10px; }
.corrige { border-left: 6px solid var(--vert); background: #f0fdf4; }
.titre-grille { font-weight: 900; margin: 0 0 6px; }
.note-estimee { font-weight: 900; font-size: 1.15rem; color: var(--vert); margin: 8px 0 14px; }

/* ----- 22. Banque de références ----- */
.reference h3 { margin: 6px 0 2px; }
.reference .auteur { color: var(--discret); font-weight: 700; margin: 0 0 8px; }
.reference .citation { font-style: italic; border-left: 4px solid var(--francais); padding-left: 10px; }
.reference .pour-montrer { background: var(--francais-clair); border-radius: 10px; padding: 8px 10px; font-weight: 700; }

/* ----- 23. Objectif Bac : révision express, jeux, progression ----- */
/* Grand texte (réglage) : tout grossit, car les tailles sont en rem */
html.grand-texte { font-size: 118%; }

.nom-appli { font-weight: 900; letter-spacing: 0.04em; opacity: 0.9; margin-bottom: 4px !important; }
.badges-accueil { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pastille-accueil { background: rgba(255,255,255,0.22); color: white; border-radius: 999px; padding: 4px 10px; font-size: 0.85rem; font-weight: 800; }
.tuile-jeux { --clair: var(--quiz-clair); --fonce: var(--quiz); }

/* Le lanceur de révision express */
.lanceur {
  background: white;
  border-radius: var(--rayon);
  box-shadow: var(--ombre-forte);
  padding: 16px;
  margin: 16px 0 20px;
  border: 3px solid var(--quiz-clair);
}
.titre-lanceur { margin: 0 0 4px; color: var(--violet-fonce); }
.choix-ligne { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.puce {
  font: inherit; font-size: 0.95rem; font-weight: 800;
  border: 2px solid var(--quiz-clair); background: white; color: var(--texte);
  border-radius: 999px; padding: 10px 14px; min-height: 48px; cursor: pointer;
}
.puce.actif { background: var(--violet); border-color: var(--violet); color: white; }
.a-revoir-info { font-weight: 700; color: var(--discret); margin: 6px 0 10px; }
.bouton-geant { display: block; width: 100%; font-size: 1.15rem; padding: 16px; min-height: 58px; text-align: center; }

/* Une révision en cours */
.barre-session { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.barre { flex: 1; height: 12px; background: var(--quiz-clair); border-radius: 999px; overflow: hidden; }
.remplissage { height: 100%; background: var(--degrade); border-radius: 999px; transition: width 0.3s; }
.compteur-session { font-weight: 900; color: var(--violet-fonce); font-size: 0.9rem; }
.carte-revision {
  background: white; border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 18px; margin-bottom: 14px; transition: background 0.2s;
}
.source-carte { display: inline-block; font-size: 0.8rem; font-weight: 800; color: var(--discret); margin-bottom: 6px; }
.consigne-carte { font-weight: 800; color: var(--violet-fonce); margin: 0 0 10px; }
.question-carte { font-size: 1.25rem; font-weight: 800; line-height: 1.4; margin: 6px 0 12px; }
.reponse-carte { background: var(--questions-clair); border-radius: 14px; padding: 12px; font-weight: 600; line-height: 1.5; }
.phrase-complete { background: var(--questions-clair); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.choix-revision { display: grid; gap: 10px; }
.bouton-choix {
  font: inherit; font-weight: 700; text-align: left; line-height: 1.35;
  background: var(--fond); border: 2px solid var(--quiz-clair); border-radius: 16px;
  padding: 14px; min-height: 56px; cursor: pointer; color: var(--texte);
}
.bouton-choix.bonne { background: #dcfce7; border-color: var(--vert); }
.bouton-choix.mauvaise { background: #fee2e2; border-color: var(--rouge); }
.message-revision { font-weight: 800; border-radius: 12px; padding: 8px 12px; margin: 10px 0 0; }
.message-revision:empty { display: none; }
.message-revision.reussi { background: #dcfce7; color: #14532d; }
.message-revision.a-revoir { background: #fef3c7; color: #78350f; }

/* La zone du pouce : collée en bas, au-dessus du menu */
.zone-pouce {
  position: sticky;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 5;
  padding: 8px 0;
}
.zone-pouce:empty { display: none; }
.question-pouce { text-align: center; font-weight: 900; margin: 0 0 6px; }
.trois-boutons, .deux-boutons { display: grid; gap: 8px; }
.trois-boutons { grid-template-columns: 1fr 1fr 1fr; }
.deux-boutons { grid-template-columns: 1fr 1fr; }
.bouton-note {
  font: inherit; font-weight: 900; font-size: 1rem; border: 0; border-radius: 16px;
  padding: 14px 6px; min-height: 60px; cursor: pointer; color: white; box-shadow: var(--ombre);
}
.bouton-note.faux { background: #dc2626; }
.bouton-note.presque { background: #d97706; }
.bouton-note.juste { background: #16a34a; }

/* La frise */
.frise-placee { margin: 0 0 12px; padding-left: 26px; }
.frise-placee li { background: var(--ordre-clair); border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-weight: 700; }
.frise-placee.juste li { background: #dcfce7; }
.frise-placee.fausse li { background: #fef3c7; }

/* Le chrono */
.entete-chrono { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.minuteur { font-size: 2rem; font-weight: 900; color: var(--violet-fonce); margin: 0; }
.minuteur.urgent { color: var(--rouge); }
.score-chrono { font-size: 1.2rem; font-weight: 900; margin: 0; }
.carte-revision.eclair-juste { background: #dcfce7; }
.carte-revision.eclair-faux { background: #fee2e2; }

/* Les bilans */
.bilan-session { text-align: center; background: white; border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 18px; margin: 10px 0; }
.grand-emoji { font-size: 3.2rem; margin: 0; }
.reponse-retenir { font-weight: 800; color: var(--vert); }
.conseil { background: var(--trous-clair); border-radius: 16px; padding: 12px 14px; font-weight: 700; }

/* La progression */
.bloc-niveau { background: white; border-radius: 16px; padding: 12px 14px; margin: 10px 0; text-align: left; box-shadow: var(--ombre); }
.nom-niveau { font-weight: 900; margin: 0 0 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: white; border-radius: 16px; padding: 10px 6px; text-align: center; box-shadow: var(--ombre); display: flex; flex-direction: column; align-items: center; }
.stat-icone { font-size: 1.5rem; }
.stat strong { font-size: 1.5rem; font-weight: 900; color: var(--violet-fonce); }
.stat .infos { font-size: 0.75rem; }
.progression-sequence { display: block; background: white; border-radius: 16px; padding: 12px 14px; margin: 8px 0; text-decoration: none; color: var(--texte); box-shadow: var(--ombre); }
.titre-progression { display: block; font-weight: 800; margin-bottom: 8px; }
.progression-sequence .infos { font-size: 0.85rem; display: block; margin-top: 6px; }
.compte-rebours { font-weight: 900; text-align: center; }
