/* Fanquizz, la version simple (10 nov. 2026) : clair, gros texte, gros boutons — pensé pour les 45 ans et plus. Client : simple.js */
:root {
  --bg: #f4efe6; --card: #fff; --ink: #1b2240; --ink2: #586079; --line: #e3dacb; --nav: #141a38;
  --blue: #2449d8; --blue2: #1a36ad; --orange: #e8711c; --orange2: #c75b0e; --green: #18a058; --greenbg: #e2f5e9;
  --red: #d33a3a; --redbg: #fde9e7; --gold: #f2b01e; --r: 18px; --sh: 0 2px 0 rgba(27,34,64,.06), 0 8px 24px rgba(27,34,64,.07);
  --f: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
html.sx-xl { font-size: 21px; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 1rem/1.45 var(--f); -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* en-tête */
header.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; background: var(--nav); color: #fff; }
header.top .logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 900 1.05rem/1 var(--f); letter-spacing: .02em; }
header.top .logo img { border-radius: 8px; }
header.top .crumb { flex: 1; }
.sx-hr { display: flex; align-items: center; gap: 8px; }
.sx-stk { white-space: nowrap; font: 800 .95rem/1 var(--f); background: rgba(255,255,255,.12); padding: 7px 11px; border-radius: 99px; }
.sx-ic { border: 0; background: rgba(255,255,255,.12); color: inherit; width: 42px; height: 42px; border-radius: 12px; font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; }
.sx-ic:active { transform: scale(.94); }

/* page */
.sx-app { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); }
.sx-card { display: block; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; margin: 0 0 14px; color: inherit; text-decoration: none; border: 1px solid var(--line); }
.sx-card small, .sx-dt small { display: block; font: 800 .72rem/1.2 var(--f); letter-spacing: .08em; color: var(--ink2); }
.sx-card p { margin: 8px 0 14px; color: var(--ink2); }
.sx-big { display: block; font: 900 2rem/1.1 var(--f); margin: 4px 0 0; color: var(--ink); }
h1.sx-big { font-size: 1.7rem; }
.sx-main { padding: 20px; background: linear-gradient(160deg, #fff 55%, #eef2ff); }
.sx-mt { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.sx-pp { font: 800 .85rem/1 var(--f); color: var(--ink2); background: #eef1fb; padding: 6px 10px; border-radius: 99px; white-space: nowrap; }
.sx-bar { height: 10px; border-radius: 99px; background: #e6e9f4; overflow: hidden; margin: 12px 0 2px; }
.sx-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--orange)); }
.sx-h2 { font: 900 1.2rem/1.2 var(--f); margin: 22px 2px 10px; }
.sx-note { font-size: .88rem; color: var(--ink2); margin: 8px 0 0; text-align: center; }
.sx-foot { text-align: center; font-size: .85rem; margin: 22px 0 0; }
.sx-foot a { color: var(--ink2); }

/* boutons */
.sx-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 12px 18px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none;
  font: 800 1.08rem/1.15 var(--f); color: #fff; background: var(--blue); box-shadow: 0 4px 0 var(--blue2); transition: transform .08s, box-shadow .08s; text-align: center; }
.sx-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue2); }
.sx-btn.big { min-height: 64px; font-size: 1.25rem; }
.sx-btn.orange { background: var(--orange); box-shadow: 0 4px 0 var(--orange2); }
.sx-btn.orange:active { box-shadow: 0 1px 0 var(--orange2); }
.sx-btn.ghost { background: #fff; color: var(--blue); border: 2px solid #cfd6f3; box-shadow: none; }
.sx-btn.ghost:active { transform: scale(.98); }
.sx-btn.sm { min-height: 46px; width: auto; flex: 1; font-size: 1rem; padding: 8px 14px; }
.sx-row { display: flex; gap: 10px; align-items: center; }
.sx-lnk { border: 0; background: none; color: var(--blue); font: 700 .95rem/1.3 var(--f); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }
.sx-lnk.red { color: var(--red); }

/* Défi du jour */
.sx-defi { border: 2px solid #f6c9a1; background: linear-gradient(160deg, #fff 50%, #fff3e8); }
.sx-defi.pulse { animation: sxPulse 1.4s ease-in-out 3; }
@keyframes sxPulse { 50% { box-shadow: 0 0 0 6px rgba(232,113,28,.25), var(--sh); } }
.sx-dt { display: flex; gap: 12px; align-items: center; }
.sx-dt > i { font-style: normal; font-size: 2.1rem; line-height: 1; }
.sx-dt b { display: block; font: 800 1.12rem/1.25 var(--f); margin-top: 3px; }
.sx-done { color: var(--ink) !important; }
.sx-done b { color: var(--green); }

/* Qui me connaît, quiz à thème */
.sx-ami { display: flex; gap: 14px; align-items: center; }
.sx-ami > i { font-style: normal; font-size: 2rem; }
.sx-ami b { display: block; font: 800 1.1rem/1.25 var(--f); }
.sx-ami span { display: block; color: var(--ink2); font-size: .92rem; margin-top: 3px; }
.sx-ami > em { font-style: normal; font-size: 2rem; color: #b9bfd4; margin-left: auto; }
.sx-ths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sx-th { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font: 700 .98rem/1.2 var(--f); box-shadow: var(--sh); }
.sx-th i { font-style: normal; font-size: 1.5rem; }
.sx-th:active { transform: scale(.97); }

/* page de quiz */
.sx-arcs { display: grid; gap: 10px; }
.sx-arc { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--sh); }
.sx-arct b { display: block; font: 800 1.05rem/1.25 var(--f); }
.sx-arct span { font-size: .85rem; color: var(--ink2); }
.sx-lvs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sx-lv { width: 52px; height: 52px; border-radius: 14px; border: 2px solid #cfd6f3; background: #fff; color: var(--blue); font: 900 1.1rem/1 var(--f); cursor: pointer; display: grid; place-content: center; }
.sx-lv small { display: block; font-size: .62rem; color: var(--gold); margin-top: 2px; }
.sx-lv.ok { background: var(--greenbg); border-color: #9ad8b3; color: var(--green); }
.sx-more { margin-top: 18px; }
.sx-seo { margin: 22px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: .92rem; color: var(--ink2); }
.sx-seo summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.sx-seo h1 { font-size: 1.1rem; } .sx-seo h2 { font-size: 1rem; } .sx-seo a { color: var(--blue); }

/* partie */
body[data-view="jeu"] header.top { display: none; }
.sx-app.play { padding-top: calc(10px + env(safe-area-inset-top)); }
.sx-play { display: flex; flex-direction: column; min-height: calc(100vh - 40px); }
.sx-pt { display: flex; align-items: center; gap: 10px; }
.sx-x { background: #fff; color: var(--ink2); border: 1px solid var(--line); font-size: 1rem; }
.sx-ptt { flex: 1; min-width: 0; }
.sx-ptt b { display: block; font: 900 1.05rem/1.2 var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-ptt span { font-size: .85rem; color: var(--ink2); }
.sx-hearts { display: flex; gap: 2px; font-size: 1.5rem; line-height: 1; }
.sx-hearts i { font-style: normal; color: #d9dbe5; transition: transform .2s; }
.sx-hearts i.on { color: var(--red); }
.sx-dots { display: flex; gap: 5px; margin: 12px 0 14px; }
.sx-dots i { flex: 1; height: 7px; border-radius: 99px; background: #e2e5ef; }
.sx-dots i.cur { background: #9fb0ee; } .sx-dots i.ok { background: var(--green); } .sx-dots i.ko { background: var(--red); }
.sx-q { background: #fff; border-radius: var(--r); box-shadow: var(--sh); border: 1px solid var(--line); padding: 20px 18px; text-align: center; animation: sxIn .25s ease-out; }
@keyframes sxIn { from { opacity: 0; transform: translateY(8px); } }
.sx-q p { margin: 0; font: 800 1.42rem/1.3 var(--f); color: var(--ink); }
.sx-q small { display: block; margin-top: 10px; font-size: .8rem; color: var(--ink2); letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
.sx-qimg { display: block; max-width: 70%; max-height: 150px; margin: 0 auto 14px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.sx-hint { text-align: center; margin: 12px 0 0; font-weight: 800; color: var(--blue); animation: sxBob 1.2s ease-in-out infinite; }
@keyframes sxBob { 50% { transform: translateY(4px); } }
.sx-ans { display: grid; gap: 10px; margin-top: 16px; }
.sx-ans button { min-height: 60px; padding: 12px 16px; border-radius: 16px; border: 2px solid #d2d8ea; background: #fff; color: var(--ink); font: 700 1.15rem/1.25 var(--f); cursor: pointer; box-shadow: 0 3px 0 #d2d8ea; text-align: center; transition: transform .08s, background .15s, opacity .15s; }
.sx-ans button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #d2d8ea; }
.sx-ans button.ok { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 0 #0f7a41; animation: sxPop .3s; }
.sx-ans button.ko { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 3px 0 #a52525; animation: sxShake .35s; }
.sx-ans button.dim { opacity: .45; }
.sx-ans button:disabled { cursor: default; }
@keyframes sxPop { 50% { transform: scale(1.04); } }
@keyframes sxShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.sx-fb { margin-top: 14px; }
.sx-good { text-align: center; font: 900 1.2rem/1 var(--f); color: var(--green); margin: 6px 0; animation: sxIn .2s; }
.sx-bad { background: var(--redbg); border: 1px solid #f5c3be; border-radius: 16px; padding: 14px; animation: sxIn .2s; }
.sx-bad b { display: block; font: 800 1.08rem/1.3 var(--f); color: #8c1d1d; }
.sx-bad p { margin: 6px 0 0; color: #5b3a3a; font-size: .98rem; }
.sx-bad .sx-btn { margin-top: 14px; }
.sx-warn { font-weight: 800; color: var(--red) !important; }

/* fins de partie */
.sx-end { text-align: center; padding: 26px 4px 6px; animation: sxIn .3s ease-out; }
.sx-end h2 { font: 900 1.9rem/1.15 var(--f); margin: 10px 0 6px; }
.sx-sc { font-size: 1.1rem; margin: 0; color: var(--ink2); }
.sx-sc b { color: var(--ink); font-size: 1.3rem; }
.sx-bigic { font-size: 3.6rem; line-height: 1; }
.sx-msg { font: 800 1.05rem/1.35 var(--f); margin: 12px 0 0; }
.sx-grid { font-size: 1.5rem; letter-spacing: 2px; margin: 10px 0 0; }
.sx-endb { display: grid; gap: 12px; margin: 22px 0 0; text-align: left; }
.sx-links { display: flex; justify-content: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.sx-stars { display: inline-flex; gap: 6px; font-size: 3.2rem; line-height: 1; }
.sx-stars i { font-style: normal; color: #dcdfe8; }
.sx-stars i.on { color: var(--gold); text-shadow: 0 3px 0 #c98a07; }
.sx-stars.pop i.on { animation: sxStar .5s cubic-bezier(.3,1.6,.5,1) both; }
.sx-stars.pop i:nth-child(2) { animation-delay: .18s; } .sx-stars.pop i:nth-child(3) { animation-delay: .36s; }
@keyframes sxStar { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.sx-push { background: #f2f5ff; border-color: #cdd6fb; margin: 0; }
.sx-push b { display: block; font: 800 1rem/1.3 var(--f); margin-bottom: 10px; }
.sx-chance h2 { color: var(--red); }

/* fenêtres */
.sx-modal { position: fixed; inset: 0; z-index: 70; background: rgba(15,20,45,.55); display: flex; align-items: flex-end; justify-content: center; padding: 12px; animation: sxFade .2s; }
@keyframes sxFade { from { opacity: 0; } }
.sx-box { width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: #fff; border-radius: 22px; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); animation: sxUp .25s ease-out; }
@keyframes sxUp { from { transform: translateY(30px); } }
.sx-box p { color: var(--ink2); }
.sx-bt { display: block; font: 900 1.35rem/1.2 var(--f); margin-bottom: 8px; color: var(--ink); }
.sx-box > .sx-btn { margin-top: 14px; }
.sx-cons .sx-row .sx-btn { flex: 1; }
.sx-cons .sx-lnk { display: block; text-align: center; margin-top: 8px; font-size: .85rem; }
.sx-news { text-align: center; }
.sx-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eee7da; }
.sx-set > span { font-weight: 800; }
.sx-set.col { display: block; }
.sx-set.col p { margin: 8px 0; }
.sx-set.col > .sx-lnk { display: block; padding-left: 0; }
.sx-q1 .sx-q { box-shadow: none; background: #f7f8fd; }
.sx-q1 .sx-q small { margin: 0 0 8px; }
.sx-q1 .sx-ans { margin-top: 12px; }
.sx-set input::placeholder { text-transform: none; }
.sx-set input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 2px solid #d2d8ea; padding: 0 12px; font: 700 1rem var(--f); text-transform: uppercase; }
.sx-seg { display: flex; background: #eef1f8; border-radius: 12px; padding: 3px; }
.sx-seg button { border: 0; background: none; padding: 9px 12px; border-radius: 10px; font-weight: 800; color: var(--ink2); cursor: pointer; }
.sx-seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.sx-ok { font-style: normal; font-weight: 800; color: var(--green); }
.sx-code { font: 900 1.25rem/1 ui-monospace, monospace; letter-spacing: .08em; color: var(--ink); }
.sx-rev { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.sx-rev li { border-radius: 14px; padding: 12px; background: #f6f7fb; border-left: 5px solid var(--green); }
.sx-rev li.ko { border-left-color: var(--red); }
.sx-rev b { display: block; font-size: 1rem; }
.sx-rev span { display: block; margin-top: 4px; font-weight: 800; color: var(--green); }
.sx-rev small { display: block; margin-top: 4px; color: var(--ink2); }
.sx-flag { border: 0; background: none; color: var(--ink2); font-size: .8rem; text-decoration: underline; padding: 6px 0 0; cursor: pointer; }
.sx-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; max-width: 90vw; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .3s; }
.sx-toast.out { opacity: 0; }
.sx-load { text-align: center; padding: 80px 10px; display: grid; gap: 14px; justify-items: center; }
.sx-load .sx-btn { max-width: 320px; }
.sx-spin { width: 44px; height: 44px; border-radius: 50%; border: 5px solid #dfe3f1; border-top-color: var(--blue); animation: sxRot .8s linear infinite; }
@keyframes sxRot { to { transform: rotate(360deg); } }
.sx-conf { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.sx-conf i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: sxConf 2.2s ease-in forwards; }
@keyframes sxConf { to { transform: translateY(105vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* installer l'appli (install.js) */
.fq-get { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 99px; padding: 8px 12px; background: #fff; color: var(--nav); font: 800 .85rem/1 var(--f); cursor: pointer; }
.fq-inst { position: fixed; z-index: 75; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 500px; margin: 0 auto; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.25); border: 1px solid var(--line); animation: sxUp .25s; }
.fq-inst-c { display: flex; gap: 12px; align-items: center; } .fq-inst-c img { border-radius: 14px; flex: none; }
.fq-inst-c b { display: block; font: 900 1.05rem/1.2 var(--f); } .fq-inst-c span { display: block; margin-top: 3px; font-size: .9rem; color: var(--ink2); }
.fq-ios { display: inline-block; padding: 0 4px; border-radius: 4px; background: #eef1f8; }
.fq-inst-b { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.fq-inst-b button { border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; font: 800 .95rem/1 var(--f); }
.fq-inst-ok { background: var(--blue); color: #fff; } .fq-inst-no { background: #eef1f8; color: var(--ink2); }
.sx-app .fq-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; width: auto; padding: 14px; border-radius: 16px; background: #fff; border: 2px solid #cdd6fb; box-shadow: none; overflow: visible; color: var(--ink); }
.sx-app .fq-card img { border-radius: 12px; } .sx-app .fq-card b { display: block; font: 900 1.02rem/1.2 var(--f); color: var(--ink); } .sx-app .fq-card span { display: block; font-size: .88rem; color: var(--ink2); margin-top: 2px; }
.sx-app .fq-card .fq-card-go, .sx-app .fq-card .fq-endapp { grid-column: 1 / -1; min-height: 50px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font: 800 1rem/1 var(--f); cursor: pointer; }
.fq-open { position: fixed; z-index: 75; left: 10px; right: 10px; top: calc(64px + env(safe-area-inset-top)); max-width: 500px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.fq-open span { flex: 1; font-weight: 800; } .fq-open-go { background: var(--blue); color: #fff; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 800; } .fq-open-x { border: 0; background: none; font-size: 1rem; cursor: pointer; }
@media (min-width: 700px) { .sx-app { padding-top: 26px; } .sx-ths { grid-template-columns: repeat(3, 1fr); } }
