/* Quiz en Famille : lisible d'abord (grands caractères, gros boutons, fort contraste) */
:root {
  --bg: #fff8ee;
  --card: #ffffff;
  --ink: #2b2118;
  --soft: #6b5b4a;
  --line: #eadcc6;
  --brand: #c2410c;
  --brand-dark: #9a3412;
  --ok: #15803d;
  --ok-bg: #e7f6ec;
  --ko: #b91c1c;
  --ko-bg: #fdecec;
  --wa: #128c3f;
  --fb: #1877f2;
  --gold: #fdf0c8;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 20px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.top { padding: 14px 16px 4px; max-width: 560px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 24px/1 Georgia, "Times New Roman", serif; }
main { max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.foot { text-align: center; padding: 8px 16px 32px; font-size: 16px; }
.foot a, .link { color: var(--soft); }
.loading { text-align: center; color: var(--soft); padding: 40px 0; }
h1 { font: 700 34px/1.15 Georgia, "Times New Roman", serif; margin: 18px 0 6px; }
h2 { font: 700 24px/1.2 Georgia, "Times New Roman", serif; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--soft); }
.center { text-align: center; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.banner { background: var(--gold); border: 2px solid #ecd48a; border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; font-size: 22px; }
.banner b { font-weight: 800; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 64px; padding: 14px 20px; margin: 12px 0 0; border: 0; border-radius: 16px;
  font-weight: 700; font-size: 22px; line-height: 1.2; font-family: inherit; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-dark);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--brand-dark); }
.btn.wa { background: var(--wa); box-shadow: 0 4px 0 #0b6b2f; }
.btn.fb { background: var(--fb); box-shadow: 0 4px 0 #0f5bc4; }
.btn.light { background: #f3e7d3; color: var(--ink); box-shadow: 0 4px 0 #dcc8a8; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn svg { width: 28px; height: 28px; flex: none; }
.small-btn { background: none; border: 0; padding: 8px 0; color: var(--soft); font: inherit; font-size: 18px; text-decoration: underline; cursor: pointer; }

/* quiz */
.progress { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 8px; font-size: 18px; color: var(--soft); }
.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width .3s; }
.cat { display: inline-block; font-size: 16px; font-weight: 700; color: var(--brand-dark); background: #fde7d9; border-radius: 999px; padding: 4px 12px; margin-bottom: 10px; }
.question { font: 700 27px/1.3 Georgia, "Times New Roman", serif; margin: 0 0 18px; }
.answers { display: grid; gap: 12px; }
.answer {
  width: 100%; min-height: 64px; padding: 14px 18px; text-align: left; border-radius: 16px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 3px solid var(--line); font-weight: 600; font-size: 22px; line-height: 1.3; font-family: inherit;
}
.answer:disabled { cursor: default; }
.answer.good { background: var(--ok-bg); border-color: var(--ok); color: #0d4f26; }
.answer.bad { background: var(--ko-bg); border-color: var(--ko); color: #7f1414; }
.answer.dim { opacity: .5; }
.feedback { margin-top: 16px; border-radius: var(--radius); padding: 16px 18px; }
.feedback.good { background: var(--ok-bg); }
.feedback.bad { background: var(--ko-bg); }
.feedback .verdict { font-weight: 800; font-size: 24px; margin-bottom: 6px; }
.feedback .why { font-size: 19px; }

/* aide au partage Facebook (le texte ne peut pas être pré-rempli) */
.fbhelp { background: #e8f0fe; border-radius: 14px; padding: 14px 16px; margin-top: 12px; font-size: 19px; }
.fbhelp p { margin: 0 0 8px; }
.fbhelp textarea { width: 100%; min-height: 0; font-family: inherit; font-size: 16px; line-height: 1.35; padding: 10px 12px; border: 2px solid #c6d6f5; border-radius: 12px; resize: none; }

/* résultats */
.score { text-align: center; margin: 14px 0 0; font: 800 76px/1 Georgia, "Times New Roman", serif; color: var(--brand); }
.score span { font-size: 40px; color: var(--soft); }
.grid { text-align: center; font-size: 28px; letter-spacing: 2px; margin: 8px 0; }
.cheer { text-align: center; font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.vs { text-align: center; font-size: 21px; margin: 4px 0 0; }

label.field { display: block; font-weight: 700; margin-bottom: 8px; }
input.text {
  width: 100%; min-height: 60px; padding: 12px 16px; border: 3px solid var(--line); border-radius: 14px;
  font-weight: 600; font-size: 24px; line-height: 1.2; font-family: inherit; color: var(--ink); background: #fff;
}
input.text:focus { outline: none; border-color: var(--brand); }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 2px solid var(--line); font-size: 21px; }
.rank li:first-child { border-top: 0; }
.rank .pos { width: 34px; text-align: center; font-size: 24px; flex: none; }
.rank .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .me .who { font-weight: 800; }
.rank .pts { font-weight: 800; white-space: nowrap; }
.rank .wait { color: var(--soft); font-size: 18px; white-space: nowrap; }
.rank .fire { font-size: 16px; color: var(--brand-dark); white-space: nowrap; }
.tabs { display: flex; background: #f3e7d3; border-radius: 14px; padding: 4px; margin: 0 0 10px; }
.tabs button { flex: 1; min-height: 48px; border: 0; border-radius: 11px; background: none; font-weight: 700; font-size: 19px; font-family: inherit; color: var(--soft); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.champ { background: var(--gold); border-radius: 14px; padding: 12px 14px; margin: 12px 0 0; font-size: 20px; }
.gtitle { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gtitle h2 { margin: 0 0 10px; }
select.text { width: 100%; min-height: 56px; font-weight: 600; font-size: 20px; font-family: inherit; border: 3px solid var(--line); border-radius: 14px; padding: 8px 12px; background: #fff; color: var(--ink); }

details.review { margin: 16px 0; }
details.review summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--soft); }
.rv { padding: 12px 0; border-top: 2px solid var(--line); font-size: 18px; }
.rv b { display: block; margin-bottom: 4px; font-size: 19px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 14px; font-size: 19px; z-index: 9; }

/* page texte (confidentialité) */
.doc h1 { font-size: 30px; }
.doc p, .doc li { font-size: 19px; }
