/* Lolla — compagnon de partie (views/live/_root.php) : bouton « En file », pop-up « En game », toasts potes, rattrapage. */

/* ---------- Bouton flottant « En file » (au-dessus de la bulle du coach) ---------- */
.lvq {
    position: fixed; z-index: 44; right: 22px; bottom: 86px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.lvq-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px;
    background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 40px;
    font: 750 13px/1 var(--f-sans); cursor: pointer;
    transition: transform .15s var(--ease), background .15s, border-color .15s;
}
.lvq-btn:hover { background: var(--panel-2); border-color: #3d424d; transform: translateY(-1px); }
.lvq-btn:active { transform: scale(.96); }
.lvq-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel-3); color: var(--text-2); }
.lvq-clock { font: 700 12px/1 var(--f-mono); color: var(--mint); }
.lvq.is-queue .lvq-btn, .lvq.is-game .lvq-btn { border-color: var(--mint); }
.lvq.is-queue .lvq-ico, .lvq.is-game .lvq-ico { background: var(--mint); color: var(--mint-ink); }
.lvq.is-queue .lvq-ico { animation: lvq-pulse 1.6s ease-in-out infinite; }
@keyframes lvq-pulse { 50% { transform: scale(.86); } }

.lvq-panel {
    width: 220px; padding: 16px; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    background: var(--panel); border: 2px solid #000; border-radius: 12px; box-shadow: 5px 5px 0 #000;
    animation: lvq-in .2s var(--ease) both; text-align: center;
}
.lvq-panel[hidden] { display: none; }
@keyframes lvq-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.lvq-k { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 600 10.5px/1 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--muted); }
.lvq-dot, .lvg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: lvq-blink 1.2s ease-in-out infinite; }
@keyframes lvq-blink { 50% { opacity: .25; } }
.lvq-big { font: 800 44px/1 var(--f-mono); letter-spacing: -.04em; color: var(--text); }
.lvq-play { justify-content: center; box-shadow: 3px 3px 0 #000; }
.lvq-stop { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 0; background: none; color: var(--muted); font: 600 12px var(--f-sans); cursor: pointer; border-radius: 8px; }
.lvq-stop:hover { color: var(--text); background: var(--panel-2); }

/* ---------- Progression du rattrapage d'historique ---------- */
.lvb {
    position: fixed; z-index: 43; right: 22px; bottom: 138px;
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 30px;
    font: 600 11.5px/1 var(--f-sans); color: var(--text-2);
}
.lvb[hidden] { display: none; }
.lvb b { font-family: var(--f-mono); color: var(--text); }
.lvb-ring {
    width: 18px; height: 18px; border-radius: 50%;
    background: conic-gradient(var(--mint) calc(var(--p, 0) * 1%), var(--panel-3) 0);
    -webkit-mask: radial-gradient(circle 5px, transparent 98%, #000); mask: radial-gradient(circle 5px, transparent 98%, #000);
    transition: background .4s;
}
.lvb-inline { font: 600 11px/1 var(--f-mono); color: var(--mint); margin-left: 8px; white-space: nowrap; }
.lvb-inline[hidden] { display: none; }

/* ---------- Toasts « un pote lance une game » ---------- */
.lvt-wrap {
    position: fixed; z-index: 91; left: 50%; top: 66px; transform: translateX(-50%);
    display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); pointer-events: none;
}
.lvt {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px;
    background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px -12px #000;
    opacity: 0; transform: translateY(-12px); transition: opacity .2s, transform .25s var(--ease);
}
.lvt.is-on { opacity: 1; transform: none; }
.lvt-art { position: relative; flex: none; width: 44px; height: 44px; }
.lvt-art img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.lvt-av { position: absolute; right: -6px; bottom: -6px; }
.lvt-av .avatar { width: 22px; height: 22px; box-shadow: 0 0 0 2px var(--panel-2); font-size: 10px; }
.lvt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lvt-txt b { font-size: 13.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvt-txt small { font: 500 11px/1.2 var(--f-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvt-go { flex: none; }
.lvt-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.lvt-x:hover { color: var(--text); background: var(--panel-3); }

/* ---------- Pop-up « En game » ---------- */
.lvg {
    position: fixed; inset: 0; z-index: 138; display: grid; place-items: center; padding: 16px; overflow-y: auto;
    opacity: 0; transition: opacity .2s;
}
.lvg[hidden] { display: none; }
.lvg.is-on { opacity: 1; }
.lvg-scrim { position: fixed; inset: 0; background: rgba(5, 6, 9, .92); }
html.lvg-lock { overflow: hidden; }
.lvg-card {
    position: relative; width: min(460px, 100%); overflow: hidden;
    background: var(--panel); border: 2px solid #000; border-radius: 14px; box-shadow: 6px 6px 0 #000;
    transform: translateY(18px) scale(.97); transition: transform .3s var(--ease);
}
.lvg.is-on .lvg-card { transform: none; }
.lvg-art { position: relative; aspect-ratio: 16 / 9; background: var(--panel-3); overflow: hidden; }
.lvg-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.lvg.is-on .lvg-art img { animation: lvg-zoom 8s ease-out both; }
@keyframes lvg-zoom { from { transform: scale(1.12); } }
.lvg-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--panel)); }
.lvg-x {
    position: absolute; z-index: 1; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px;
    border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; transition: transform .15s;
}
.lvg-x:hover { transform: rotate(90deg); }
.lvg-live {
    position: absolute; z-index: 1; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px;
    height: 28px; padding: 0 12px 0 10px; border-radius: 28px; background: rgba(0, 0, 0, .65);
    font: 600 11px/1 var(--f-body); text-transform: none; letter-spacing: 0; color: #fff;
}
.lvg-live b { color: var(--mint); font-weight: 700; }
.lvg-body { position: relative; z-index: 1; margin-top: -46px; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.lvg-title { margin: 0; font-size: clamp(38px, 11vw, 54px); line-height: .9; letter-spacing: -.02em; color: #fff; }
.lvg-champ { margin: -6px 0 0; font: 600 12px/1 var(--f-body); text-transform: none; letter-spacing: 0; color: var(--text-2); }
.lvg-mates { display: flex; flex-wrap: wrap; gap: 6px; }
.lvg-mates[hidden] { display: none; }
.lvg-mate { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 3px; border-radius: 28px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.lvg-mate .avatar { width: 22px; height: 22px; font-size: 10px; }
.lvg-stakes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lvg-stakes > li:not([hidden]) ~ li:not([hidden]) { border-top: 1px solid var(--line); }
.lvg-stakes:not(:has(> li:not([hidden]))) { display: none; }
.lvg-stakes > li[hidden] { display: none; }
.lvg-stakes > li, .lvg-stakes > li > a {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px;
    font-size: 14px; font-weight: 650; color: var(--text);
}
.lvg-stakes > li > a { flex: 1; margin: 0 -14px; transition: background .15s; }
.lvg-stakes > li > a:hover { background: var(--panel-2); }
.lvg-stakes b { margin-left: auto; font: 750 15px/1 var(--f-mono); }
.lvg-lp { color: var(--mint); }
.lvg-chev { color: var(--muted); margin-left: -4px; }
.lvg-ico { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-3); color: var(--text-2); }
.lvg-quests { flex-wrap: wrap; padding-top: 12px !important; padding-bottom: 12px !important; }
.lvg-quests ol { flex-basis: 100%; margin: 0; padding: 0 0 0 38px; display: flex; flex-direction: column; gap: 4px; list-style: none; }
.lvg-quests li { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.lvg-go { height: 48px; justify-content: center; font-size: 15px; font-weight: 800; box-shadow: 4px 4px 0 #000; transition: transform .15s var(--ease), box-shadow .15s; }
.lvg-go:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.lvg-go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

@media (max-width: 1023px) {
    .lvq { right: 14px; bottom: calc(140px + env(safe-area-inset-bottom)); }
    .lvq-btn { height: 44px; }
    .lvb { right: 14px; bottom: calc(194px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .lvq.is-queue .lvq-ico, .lvq-dot, .lvg-dot, .lvg.is-on .lvg-art img { animation: none; }
}

/* v2 — carte « En game » qui glisse sur le côté, sans bloquer le site (DA Blitz × Meeko) */
.lvg { position: fixed; inset: auto 20px 20px auto; z-index: 120; display: block; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.lvg-scrim { display: none; }
.lvg-card { pointer-events: auto; width: 100%; max-height: none; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,91,58,.15);
    transform: translateY(24px) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
.lvg.is-on .lvg-card { transform: none; opacity: 1; }
.lvg-art { position: relative; height: 150px; overflow: hidden; }
.lvg-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.lvg-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--panel) 2%, transparent 60%); }
.lvg-live { position: absolute; z-index: 1; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(14,13,15,.8); font: 600 12px var(--f-body); }
.lvg-live b { font-family: var(--f-mono); color: var(--accent); }
.lvg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: lvg-pulse 1.4s infinite; }
@keyframes lvg-pulse { 50% { opacity: .3; } }
.lvg-x { position: absolute; z-index: 1; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(14,13,15,.8); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.lvg-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.lvg-title { font: 800 22px var(--f-display) !important; letter-spacing: -.03em; text-transform: none !important; }
.lvg-champ { margin-top: -8px; font-size: 13px; color: var(--muted); }
.lvg-stakes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lvg-stakes > li, .lvg-stakes > li > a { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: 13.5px; }
.lvg-stakes > li > a { padding: 0; background: none; }
.lvg-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,91,58,.14); color: var(--accent); }
.lvg-lp { font-family: var(--f-mono); color: var(--mint); font-size: 12.5px; }
.lvg-quests { align-items: start !important; }
.lvg-quests ol { grid-column: 2 / -1; margin: 4px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-2); }
.lvg-go { height: 44px; }
@media (max-width: 640px) { .lvg { inset: auto 12px calc(76px + env(safe-area-inset-bottom)) 12px; width: auto; } .lvg-art { height: 120px; } }
.lvg-art img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
.lvg-live { max-width: calc(100% - 60px); white-space: nowrap; }
.lvg-card { display: block !important; grid-template-columns: none !important; } .lvg-art { width: 100% !important; }
