/* ============================================================
   ROOM TV — Refonte sidebar + vinyle texte courbe + QR overlay
   ============================================================ */

/* === Vinyle qui tourne avec texte courbe "JUKEBOX • LIVE" === */
.jb-vinyl-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 30px 20px;
}
.jb-vinyl-spin {
    position: relative;
    width: 300px;
    height: 300px;
    animation: jbVinylSpin 8s linear infinite;
}
.jb-vinyl-spin .jb-vinyl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}
.jb-vinyl-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
@keyframes jbVinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.jb-wait-info {
    text-align: center;
    max-width: 420px;
}
.jb-wait-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jb-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.jb-wait-timer {
    font-family: var(--jb-font-display, "Space Grotesk", sans-serif);
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(255, 59, 107, 0.3);
}
.jb-wait-tease {
    color: var(--jb-text-muted);
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

/* === QR overlay coin haut-droit du player === */
.jb-qr-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(11, 18, 39, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s, transform 0.12s;
}
.jb-qr-toggle:hover {
    background: rgba(255, 59, 107, 0.4);
    transform: scale(1.06);
}
.jb-qr-toggle svg { width: 20px; height: 20px; }
.jb-qr-overlay {
    position: absolute;
    top: 70px;
    right: 14px;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    z-index: 10;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: jbQrFade 0.2s ease-out;
}
.jb-qr-overlay[hidden] { display: none; }
.jb-qr-overlay__inner { text-align: center; }
.jb-qr-overlay__inner img { display: block; margin-bottom: 6px; }
.jb-qr-overlay__hint { color: #0b1227; font-size: 11px; margin: 0; }
@keyframes jbQrFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Sidebar cards (nouveau style commun) === */
.jb-sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}

/* === Compteur Tirage au sort (cercle SVG anime) === */
.jb-draw-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 18px;
}
/* Variante duo : 2 cercles cote a cote (Tirage + Propositions) */
.jb-draw-card--duo {
    flex-direction: column;
    padding: 18px 14px;
    gap: 14px;
}
.jb-draw-card--duo > .jb-draw-ring + .jb-draw-ring {
    margin-top: -110px; /* Positionnement cote a cote via inline-flex parent */
}
.jb-draw-card--duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
    justify-items: center;
}
.jb-draw-card--duo > .jb-draw-ring + .jb-draw-ring { margin-top: 0; }
.jb-draw-card--duo > .jb-proposers-list--inline {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 6px;
}
.jb-draw-ring {
    position: relative;
    width: 160px;
    height: 160px;
}
.jb-draw-ring--sm {
    width: 130px;
    height: 130px;
}
.jb-draw-ring__svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.jb-draw-ring__bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}
.jb-draw-ring__progress {
    fill: none;
    stroke: var(--jb-accent, #ff3b6b);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 0.95s linear, stroke 0.25s;
    filter: drop-shadow(0 0 8px rgba(255, 59, 107, 0.5));
}
.jb-draw-ring.is-warning .jb-draw-ring__progress {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}
.jb-draw-ring.is-urgent .jb-draw-ring__progress {
    stroke: #ff3b6b;
    animation: jbDrawBlink 0.7s ease-in-out infinite;
}
@keyframes jbDrawBlink {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 59, 107, 0.8)); }
    50% { opacity: 0.45; filter: drop-shadow(0 0 14px rgba(255, 59, 107, 1)); }
}
.jb-draw-ring__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.jb-draw-ring__time {
    font-family: var(--jb-font-display, "Space Grotesk", sans-serif);
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.jb-draw-ring.is-urgent .jb-draw-ring__time {
    color: var(--jb-accent, #ff3b6b);
    animation: jbDrawTimeBlink 0.7s ease-in-out infinite;
}
@keyframes jbDrawTimeBlink {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.jb-draw-ring__label {
    margin-top: 4px;
    font-size: 10px;
    color: var(--jb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === Gagnant === */
.jb-winner-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 59, 107, 0.15), rgba(91, 140, 255, 0.10));
    border-color: rgba(255, 59, 107, 0.4);
    animation: jbWinnerIn 0.4s ease-out;
}
.jb-winner-card__icon { font-size: 36px; flex-shrink: 0; }
.jb-winner-card__body { flex: 1; min-width: 0; }
.jb-winner-card__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jb-text-muted);
}
.jb-winner-card__name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-top: 2px;
}
@keyframes jbWinnerIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Propositions === */
.jb-proposals-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.jb-proposals-card__icon { font-size: 28px; flex-shrink: 0; }
.jb-proposals-card__count { display: flex; align-items: baseline; gap: 6px; flex: 1; }
.jb-proposals-card__count-num {
    font-family: var(--jb-font-display, inherit);
    font-size: 30px;
    font-weight: 700;
    color: var(--jb-accent, #ff3b6b);
    line-height: 1;
}
.jb-proposals-card__count-label {
    font-size: 12px;
    color: var(--jb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.jb-proposers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
}
.jb-proposers-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 13px;
    color: #c9d2ee;
    animation: jbProposerIn 0.3s ease-out;
}
.jb-proposers-list li .jb-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
}
.jb-proposers-empty {
    background: transparent !important;
    color: var(--jb-text-muted) !important;
    font-style: italic;
    font-size: 12px !important;
    justify-content: center;
}
@keyframes jbProposerIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Connectes (grille avatars) === */
.jb-connected-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.jb-connected-card__icon { font-size: 24px; flex-shrink: 0; }
.jb-connected-card__count { display: flex; align-items: baseline; gap: 6px; flex: 1; }
.jb-connected-card__count-num {
    font-family: var(--jb-font-display, inherit);
    font-size: 26px;
    font-weight: 700;
    color: #5b8cff;
    line-height: 1;
}
.jb-connected-card__count-label {
    font-size: 11px;
    color: var(--jb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.jb-connected-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 10px;
}
.jb-connected-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    font-size: 11px;
    color: #c9d2ee;
    text-align: center;
    overflow: hidden;
    animation: jbConnectIn 0.3s ease-out;
}
.jb-connected-grid li.is-owner {
    background: linear-gradient(135deg, rgba(255, 59, 107, 0.18), rgba(91, 140, 255, 0.12));
    border: 1px solid rgba(255, 59, 107, 0.3);
}
.jb-connected-grid li .jb-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}
.jb-connected-grid li .jb-conn-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jb-connected-empty {
    grid-column: 1 / -1;
    background: transparent !important;
    color: var(--jb-text-muted) !important;
    font-style: italic;
    font-size: 12px !important;
    justify-content: center;
}
@keyframes jbConnectIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* === Chat card (header propre) === */
.jb-sidebar-card--chat { display: flex; flex-direction: column; }
.jb-chat-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.jb-chat-card__icon { font-size: 20px; }
.jb-chat-card__label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Cache l'ancien chat overlay TikTok et l'ancien .jb-room-view__qr (remplaces) */
.jb-room-view__qr { display: none !important; }
