:root { --pink: #ff2d95; --yellow: #ffe600; --cyan: #00e5ff; --green: #7dff4d; --red: #ff3b3b; --ink: #12061f; --violet: #b388ff;
  --title: "Bangers", Impact, sans-serif; --fat: "Bowlby One", Impact, sans-serif; --text: "Rubik", system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: #fff; font-family: var(--text); overscroll-behavior: none; }
body { background: radial-gradient(circle at 50% -10%, #4a1066, var(--ink) 60%) fixed; }
#app { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: env(safe-area-inset-top) 14px calc(14px + env(safe-area-inset-bottom)); }
#me { display: flex; align-items: center; gap: 10px; padding: 10px 4px; min-height: 64px; }
#me:empty { display: none; }
#me .av { font-size: 40px; }
#me .nm { font-weight: 900; font-size: 20px; color: var(--c); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#me .sc { font-family: var(--fat); font-size: 20px; text-align: right; line-height: 1.1; }
#me .sc small { display: block; font-family: var(--text); font-size: 13px; opacity: .7; }
#me .vach { font-size: 22px; }
#ctrl { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-bottom: 10px; transition: transform .4s, filter .3s; }
h1 { font-family: var(--title); font-weight: 400; font-size: 42px; letter-spacing: 1px; margin: 0; text-align: center; color: var(--yellow); line-height: 1; }
.logo { width: 100%; max-width: 420px; align-self: center; }
label { font-weight: 700; font-size: 16px; opacity: .85; }
input[type=text] { width: 100%; font: 700 24px var(--text); border-radius: 14px; border: 3px solid var(--pink); padding: 12px 14px; background: #fff; color: #111; }
input.code { text-transform: uppercase; letter-spacing: 10px; text-align: center; font-family: var(--fat); font-size: 34px; }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatars button { font-size: 28px; padding: 6px 0; border-radius: 12px; border: 3px solid transparent; background: rgba(255,255,255,.08); }
.avatars button.on { border-color: var(--yellow); background: rgba(255,230,0,.2); }
.btn { font-family: var(--title); font-size: 30px; letter-spacing: 1px; border: none; border-radius: 18px; padding: 14px 18px; color: var(--ink); background: var(--yellow);
  box-shadow: 0 6px 0 #9a8a00; width: 100%; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #9a8a00; }
.btn.pink { background: var(--pink); color: #fff; box-shadow: 0 6px 0 #9b1158; }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; font-size: 22px; }
.btn[disabled] { opacity: .35; }
.err { color: var(--red); font-weight: 700; min-height: 22px; text-align: center; }
.wait { text-align: center; font-size: 24px; font-weight: 700; padding: 30px 10px; }
.wait .big { font-size: 64px; display: block; margin-bottom: 14px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(4deg); } }
.quote { font-size: 16px; opacity: .65; font-style: italic; text-align: center; margin-top: 14px; }
.buzz { align-self: center; width: min(78vw, 360px); aspect-ratio: 1; border-radius: 50%; border: none; font-family: var(--title); font-size: 72px; letter-spacing: 2px; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, var(--red) 45%, #8a0000); box-shadow: 0 14px 0 #5a0000, 0 0 50px rgba(255,59,59,.6); text-shadow: 0 4px 0 rgba(0,0,0,.4); }
.buzz:active, .buzz.hit { transform: translateY(10px) scale(.97); box-shadow: 0 4px 0 #5a0000, 0 0 70px rgba(255,59,59,.9); }
.centre { text-align: center; font-family: var(--fat); font-size: 30px; background: #fff; color: var(--ink); border-radius: 18px; padding: 10px; }
.consigne { text-align: center; font-family: var(--title); font-size: 24px; color: var(--yellow); }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 12px; text-align: left; border: none; border-radius: 18px; padding: 14px; font: 900 21px/1.15 var(--text); min-height: 72px;
  color: var(--ink); background: var(--cc); box-shadow: 0 6px 0 rgba(0,0,0,.45); }
.choice .n { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(0,0,0,.8); color: var(--cc); font-family: var(--fat); font-size: 26px; }
.choice:nth-child(1) { --cc: var(--pink); color: #fff; } .choice:nth-child(2) { --cc: var(--yellow); } .choice:nth-child(3) { --cc: var(--cyan); } .choice:nth-child(4) { --cc: var(--green); }
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.45); }
.choice[disabled] { filter: grayscale(1) brightness(.4); }
.value { text-align: center; font-family: var(--fat); font-size: 18px; color: var(--green); }
.word { text-align: center; font-family: var(--fat); font-size: 34px; background: #fff; color: var(--ink); border-radius: 18px; padding: 18px 10px; }
.bin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bin .choice { justify-content: center; text-align: center; font-family: var(--title); font-weight: 400; font-size: 30px; min-height: 120px; }
.bin .both { grid-column: 1 / 3; min-height: 70px; --cc: var(--violet) !important; }
.vbtn { align-self: center; font-size: 20px; padding: 10px 18px; width: auto; background: #fff; box-shadow: 0 5px 0 #999; }
.targets { display: grid; gap: 10px; }
.targets button { font: 900 22px var(--text); border: 3px solid var(--c); border-radius: 16px; background: rgba(0,0,0,.4); color: #fff; padding: 12px; text-align: left; }
.phrase { font-weight: 900; font-size: 20px; line-height: 1.3; background: rgba(255,255,255,.08); border-radius: 16px; padding: 12px 14px; }
.opts { display: grid; gap: 10px; }
.opts button { font: 900 22px var(--text); border: none; border-radius: 16px; background: #fff; color: var(--ink); padding: 14px; box-shadow: 0 5px 0 var(--pink); text-align: left; }
.fin { text-align: center; }
.fin .rank { font-family: var(--title); font-size: 90px; color: var(--yellow); line-height: 1; }
.fin .score { font-family: var(--fat); font-size: 28px; }
#flash { position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%); z-index: 20; font-family: var(--fat); font-size: 48px; pointer-events: none; text-shadow: 0 4px 0 #000; opacity: 0; }
#flash.on { animation: flash 1.8s ease-out both; }
#flash.p { color: var(--green); } #flash.m { color: var(--red); } #flash.z { color: #fff; font-size: 34px; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%,-50%) scale(1.2); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-90%); } }
#toast { position: fixed; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; text-align: center; font-weight: 700; font-size: 18px; padding: 12px; border-radius: 14px;
  background: #fff; color: var(--ink); transform: translateY(calc(100% + 60px)); transition: transform .25s; }   /* vide, il dépassait de 6 px */
#toast.on { transform: none; } #toast.ok { background: var(--green); } #toast.ko { background: var(--red); color: #fff; }
/* sabotages (vacherie) */
#sab { position: fixed; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }
#sab .cowr { position: absolute; top: 30%; font-size: 260px; animation: cowrun 2.6s linear infinite; }
@keyframes cowrun { from { left: -300px; } to { left: 110%; } }
body.sab-envers #ctrl { transform: rotate(180deg); }
body.sab-flou #ctrl { filter: blur(5px); }
body.sab-melange .choices { direction: rtl; } body.sab-melange .choice:nth-child(odd) { order: 2; }
.sabmsg { position: fixed; top: 74px; left: 0; right: 0; text-align: center; font-family: var(--title); font-size: 26px; color: var(--yellow); z-index: 16; }
.small { font-size: 14px; opacity: .7; text-align: center; }
/* tour V2 : menu de Dolorès, quitte ou double, questions image / son */
.menu { display: grid; gap: 12px; }
.mcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 3px solid #000; border-radius: 18px;
  padding: 14px 14px 14px 62px; background: #fff8e1; color: var(--ink); box-shadow: 0 6px 0 rgba(0,0,0,.45); font: 900 22px/1.15 var(--text); min-height: 86px; }
.mcard .n { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: #000; color: var(--yellow); font-family: var(--fat); font-size: 22px; }
.mcard .v { font: 700 15px var(--text); color: #2d7a10; }
.mcard.surprise { background: linear-gradient(170deg, #ff6b6b, #c2185b); color: #fff; }
.mcard.surprise .v { color: var(--yellow); }
.mcard:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.45); }
.mcard[disabled] { filter: grayscale(1) brightness(.5); }
.bareme { display: grid; gap: 6px; font-weight: 700; font-size: 18px; text-align: center; background: rgba(255,255,255,.08); border-radius: 14px; padding: 12px; }
.bareme b { font-family: var(--fat); font-weight: 400; }
.qbtn { border: none; border-radius: 22px; font-family: var(--title); font-size: 36px; letter-spacing: 1px; padding: 22px 14px; box-shadow: 0 8px 0 rgba(0,0,0,.45); }
.qbtn.yes { background: var(--green); color: var(--ink); min-height: 130px; }
.qbtn.no { background: #fff; color: var(--ink); font-size: 28px; }
.qbtn:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.qbtn[disabled] { opacity: .4; }
.mhint { text-align: center; font-weight: 700; font-size: 18px; color: var(--cyan); }
#replay { align-self: center; width: auto; padding: 10px 18px; }
