/* Application joueur (smartphone) */
html, body { background: var(--pink-l); }
.p-app { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
.p-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 6px; position: relative; z-index: 2; }
.p-header .logo { height: 38px; }
.me-pill { display: flex; flex-direction: column; align-items: flex-end; background: #fff; border-radius: 16px; padding: 6px 14px; box-shadow: var(--shadow); line-height: 1.15; max-width: 55%; }
.me-name { font-weight: 800; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.me-score { font-family: var(--f-display); color: var(--pink); font-size: 0.95rem; letter-spacing: 0.02em; }
.p-main { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 10px 18px calc(150px + env(safe-area-inset-bottom)); }
.wave-bottom { z-index: 1; opacity: 0.95; }
.net-banner { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 8px 12px; }

.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; animation: rise 0.35s ease both; }
.panel.center { align-items: center; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.big-title { font-size: clamp(2rem, 9vw, 2.6rem); }
.lead { font-size: 1.02rem; color: var(--grey); }
.stack { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.center { text-align: center; }
.strong { font-weight: 700; }
.input.big { min-height: 60px; font-size: 1.15rem; font-weight: 600; }
.input.center { text-align: center; font-size: 1.6rem; }
.num-wrap { position: relative; }
.num-wrap .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--mute); }

/* Points d'attente */
.dots { display: inline-flex; gap: 8px; margin-top: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: bounce 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

/* Compte à rebours */
.countdown { display: flex; align-items: center; gap: 12px; }
.timebar { flex: 1; height: 12px; background: var(--pink-l); border-radius: 99px; overflow: hidden; }
.timebar > i { display: block; height: 100%; background: var(--pink); border-radius: 99px; transition: width 0.12s linear; }
.countdown .secs { font-family: var(--f-display); font-size: 1.7rem; color: var(--pink); min-width: 2ch; text-align: right; }
.countdown.low .timebar > i { background: var(--red); }
.countdown.low .secs { color: var(--red); animation: pulse 0.6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.15); } }

.q-text { font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.q-image { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius-s); }

/* Propositions */
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 12px 14px; text-align: left;
  border: 3px solid var(--line); border-radius: var(--radius-s); background: #fff; font-weight: 700; font-size: 1.02rem; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.1s; -webkit-tap-highlight-color: transparent;
}
.opt:active:not([disabled]) { transform: scale(0.98); }
.opt .letter { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--c); color: #fff; font-family: var(--f-display); font-size: 1.35rem; }
.opt .opt-text { flex: 1; overflow-wrap: anywhere; }
.opt.selected { border-color: var(--pink); background: var(--pink-l); }
.opt[disabled]:not(.selected) { opacity: 0.55; }
.opt .opt-check { color: var(--pink); }
.checkbox { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 3px solid var(--line); display: grid; place-items: center; color: #fff; }
.checkbox.on { background: var(--pink); border-color: var(--pink); }
.opt.order { cursor: default; }
.order-btns { display: flex; gap: 6px; }
.btn-circle.sm { width: 40px; height: 40px; box-shadow: inset 0 0 0 2px var(--line); }
.btn-circle[disabled] { opacity: 0.3; }
.sticky-action { position: sticky; bottom: 12px; padding-top: 6px; z-index: 5; }
.sticky-action .btn { box-shadow: var(--shadow-pink), var(--shadow); }

.sent-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--green-l); color: var(--green-d); border-radius: var(--radius-s); animation: rise 0.3s ease both; }
.sent-banner div { display: flex; flex-direction: column; }
.sent-banner span { font-size: 0.85rem; }
.words-sent { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Résultat */
.result { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 22px 12px; border-radius: var(--radius-s); }
.result .result-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); }
.result.good { background: var(--green-l); color: var(--green-d); }
.result.bad { background: var(--red-l); color: var(--red); }
.result.miss { background: var(--mist); color: var(--grey); }
.result.part { background: #fff6dd; color: #a86b00; }
.result.neutral { background: var(--pink-l); color: var(--pink-d); }
.gain { font-family: var(--f-display); font-size: 2.2rem; color: var(--pink); }
.answer-box { width: 100%; background: var(--mist); border-radius: var(--radius-s); padding: 14px; text-align: left; }
.answer-box p { font-weight: 700; margin-top: 4px; }
.explain { font-size: 0.92rem; color: var(--grey); text-align: left; }
.rank-line { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--pink-l); border-radius: var(--radius-s); padding: 14px 16px; font-size: 0.95rem; }
.rank-line .pts { font-family: var(--f-display); color: var(--pink); font-size: 1.2rem; }
.final-rank { display: flex; flex-direction: column; align-items: center; }
.rank-num { font-size: 5.5rem; color: var(--pink); line-height: 1; }
.rank-num sup { font-size: 1.6rem; margin-left: 2px; text-transform: none; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
