/* Voltor-Bingo (14/11/2026) : le jeu de grattage d'Okéoké au Café Spinda (client/js/bingo.js). Préfixe bg-. */
.bingo-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(3, 6, 18, .62); animation: bg-fondu .2s ease-out; }
@keyframes bg-fondu { from { opacity: 0; } }
.bg-box { width: min(1040px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow: auto; display: flex; flex-direction: column; gap: 8px; animation: pop .24s cubic-bezier(.2,1.25,.4,1); }
.bg-box.tremble { animation: bg-tremble .5s linear; }
@keyframes bg-tremble { 10% { translate: -7px 3px; } 20% { translate: 6px -4px; } 30% { translate: -5px -2px; } 40% { translate: 5px 3px; } 55% { translate: -3px 1px; } 70% { translate: 2px -1px; } 85% { translate: -1px 1px; } }
/* En-tête : Okéoké, le titre, les grands prix */
.bg-tete { display: flex; align-items: center; gap: 12px; }
.bg-okeoke { width: 72px; height: 72px; flex: none; }
.bg-titre-z { flex: 1; min-width: 0; }
.bg-titre { margin: 0; font-size: 38px; color: var(--gold); text-shadow: 0 3px 0 #6b3b00, 0 0 18px rgba(255, 200, 80, .5); line-height: 1; }
.bg-phrase { margin: 4px 0 0; font-size: 18px; color: #ffe8c4; }
.bg-gp { display: flex; gap: 6px; align-items: stretch; }
.bg-gp-t { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; color: var(--gold); text-align: center; }
.bg-gp-l { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 86px; padding: 4px 2px; gap: 2px; font-size: 12px; line-height: 1; text-align: center;
  background: rgba(60, 30, 0, .55); border: 2px solid var(--gold-line); border-radius: 4px; animation: bg-scintille 2.4s ease-in-out infinite; }
.bg-gp-l:nth-child(3) { animation-delay: .6s; } .bg-gp-l:nth-child(4) { animation-delay: 1.2s; } .bg-gp-l:nth-child(5) { animation-delay: 1.8s; }
.bg-gp-l b { font-weight: normal; }
@keyframes bg-scintille { 0%, 80%, 100% { box-shadow: none; } 90% { box-shadow: 0 0 12px rgba(255, 211, 92, .8); border-color: var(--gold); } }
.bg-fermer { align-self: flex-start; }
/* Corps : le jeu à gauche, la colonne à droite */
.bg-corps { display: grid; grid-template-columns: 1fr 300px; gap: 12px; min-height: 420px; }
.bg-jeu { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; background: rgba(5, 10, 30, .45); border: 2px solid rgba(255, 255, 255, .08); border-radius: 6px; overflow: hidden; }
.bg-cote { display: flex; flex-direction: column; gap: 8px; font-size: 18px; }
.bg-info { font-size: 18px; text-align: center; color: #c7d4f5; }
.bg-ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; image-rendering: pixelated; }
img.bg-ic { object-fit: contain; }
.bg-ic.mini { width: 26px; height: 26px; }
.bg-ic.mini .pxi { --k: 1px !important; }
.bg-obj.r-rare { filter: drop-shadow(0 0 5px #d79bff); } .bg-obj.r-tres { filter: drop-shadow(0 0 5px #ffd35c); } .bg-obj.r-leg { filter: drop-shadow(0 0 6px #ff8a5c); }
.bg-obj-ombre { font-size: 28px; color: #f1dcff; background: radial-gradient(circle, rgba(215, 155, 255, .45), transparent 70%); }
/* Tickets et sources du jour */
.bg-tickets { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.bg-tk { display: inline-flex; filter: grayscale(1) brightness(.35); }
.bg-tk.plein { filter: none; animation: bg-tk 1.8s ease-in-out infinite; }
@keyframes bg-tk { 50% { transform: translateY(-2px) rotate(-4deg); } }
.bg-src { display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.bg-src-t { color: #8fd0ff; }
.bg-src-l { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.bg-src-l.ok { color: var(--ok); }
.bg-regles { font-size: 16px; color: #c7d4f5; }
.bg-regles b { color: #8fd0ff; font-weight: normal; }
.bg-regles p { margin: 3px 0; }
/* Accueil : les trois grilles */
.bg-paliers { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bg-pal { width: 180px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; font-size: 16px; background: rgba(10, 16, 40, .8); border: 2px solid #31508f; border-radius: 5px;
  animation: bg-pal .4s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i) * .12s); }
.bg-pal.final { border-color: var(--gold-line); box-shadow: 0 0 12px rgba(255, 211, 92, .25) inset; }
@keyframes bg-pal { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.bg-pal b { font-weight: normal; font-size: 22px; color: var(--gold); }
.bg-pal-n { color: #c7d4f5; display: inline-flex; align-items: center; gap: 4px; }
.bg-mini { display: grid; grid-template-columns: repeat(var(--c), 14px); gap: 3px; margin: 4px 0; }
.bg-mini i { width: 14px; height: 14px; background: #7a4a1e; border: 2px solid #c58a4a; box-shadow: 0 2px 0 #2a1406; }
.bg-pal-lots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.bg-boutons { justify-content: center; }
.bg-jouer { font-size: 26px; }
.bg-jouer.dechire { animation: bg-dechire .35s ease-in forwards; }
@keyframes bg-dechire { to { transform: rotate(-6deg) scale(1.08); filter: brightness(1.6); } }
/* Étapes */
.bg-etapes { display: flex; gap: 6px; align-items: center; font-size: 16px; }
.bg-et { padding: 1px 8px; border: 2px solid #31508f; border-radius: 3px; background: rgba(0, 0, 0, .35); color: var(--dim); display: inline-flex; gap: 5px; align-items: baseline; }
.bg-et small { font-size: 12px; opacity: .8; }
.bg-et.on { border-color: var(--gold); color: var(--gold); }
.bg-et.fait { border-color: var(--ok); color: var(--ok); }
.bg-et-f { font-style: normal; color: var(--dim); }
/* (26/11, Kiko) Compteur de Voltorbe au-dessus de la grille : une icône par Voltorbe caché */
.bg-haut { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bg-voltc { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 2px solid #8f3131; border-radius: 3px; background: rgba(40, 6, 10, .55); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); }
.bg-voltc-t { font-size: 15px; color: #ffb0a6; margin-right: 2px; }
.bg-voltc-i { display: inline-flex; width: 30px; height: 30px; border: 2px solid #000; border-radius: 50%; overflow: hidden; background: #c8402e; box-shadow: 0 0 0 1px #ff8a6e, 0 2px 0 rgba(0, 0, 0, .5); }
.bg-voltc-i img { width: 100%; height: 100%; image-rendering: pixelated; }
.bg-voltc-i.saute { filter: grayscale(.4) brightness(.8); box-shadow: 0 0 0 1px #ff4a3a, 0 0 8px rgba(255, 74, 58, .9); }
.bg-voltc-n { font-size: 17px; color: #ff6b5a; text-shadow: 0 2px 0 #000; margin-left: 2px; }
.bg-voltc.entre { animation: bg-fondu .25s ease-out; }
.bg-voltc.entre .bg-voltc-i { animation: bg-voltc-pop .42s cubic-bezier(.3, 1.6, .5, 1) calc(.26s + var(--k) * .13s) backwards; }
.bg-voltc.entre .bg-voltc-n { animation: bg-voltc-pop .42s cubic-bezier(.3, 1.6, .5, 1) calc(.3s + var(--n, 3) * .13s) backwards; }
@keyframes bg-voltc-pop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 55% { transform: scale(1.3); filter: brightness(1.8); opacity: 1; } 100% { transform: scale(1); filter: none; } }
/* La grille et ses cases */
.bg-grille-z { position: relative; }
.bg-grille { display: grid; grid-template-columns: repeat(var(--c), 112px); gap: 12px; }
.bg-grille.tombe { animation: bg-tombe .5s cubic-bezier(.3, 1.4, .5, 1); }
.bg-grille.glisse { animation: bg-glisse .45s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes bg-tombe { from { transform: translateY(-120px); opacity: 0; } }
@keyframes bg-glisse { from { transform: translateX(140px); opacity: 0; } }
.bingo-modal .btn.bg-case { width: 112px; height: 112px; padding: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 16px solid transparent; border-image: url('assets/ui/cadres/cadre1_bois.png') 8 fill / 16px stretch; image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 #1a0d04); transition: transform .08s, filter .12s; }
.bingo-modal .btn.bg-case::before { left: -26px; }
.bingo-modal .btn.bg-case:not(.ouverte):hover, .bingo-modal .btn.bg-case.focus:not(.ouverte) { transform: translateY(-3px); filter: drop-shadow(0 7px 0 #1a0d04) brightness(1.15); }
.bingo-modal .btn.bg-case.focus { outline: 3px solid #fff; outline-offset: 2px; }
.bg-q { font-size: 56px; line-height: 1; color: #ffe08a; text-shadow: 0 4px 0 #6b3b00, 0 0 10px rgba(255, 200, 80, .4); animation: bg-q 2.2s ease-in-out infinite; animation-delay: calc(var(--k) * -.3s); }
@keyframes bg-q { 50% { transform: translateY(-3px); } }
/* Fissures dès le clic (en attendant le serveur), puis la case s'effrite */
.bingo-modal .btn.bg-case.craque { animation: bg-craque .35s linear infinite; }
.bingo-modal .btn.bg-case.craque::after { content: ''; position: absolute; inset: -12px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' shape-rendering='crispEdges'%3E%3Cpath d='M20 0v6h-2v5h3v4h-4v5h-3v4h2v5h-2v5M21 15h4v-3h4v-2h5M17 25h-5v3H6v2M22 30h3v4h3v6' stroke='%23180a02' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.bingo-modal .btn.bg-case.craque .bg-q { opacity: .75; transform: rotate(-5deg); animation: none; }
@keyframes bg-craque { 25% { translate: -2px 0; } 75% { translate: 2px 0; } }
.bg-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bg-eclat { position: absolute; width: var(--s); height: var(--s); background: #a9713c; box-shadow: 2px 2px 0 #4a2a10, inset -1px -1px 0 #6b3f18; animation: bg-eclat .8s cubic-bezier(.2, .6, .5, 1) forwards; }
@keyframes bg-eclat { to { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--r)); opacity: 0; } }
/* Case ouverte : un lot (cadre vert) ou un Voltorbe (cadre rose) */
.bingo-modal .btn.bg-case.ouverte { cursor: default; }
.bingo-modal .btn.bg-case.lot { border-image-source: url('assets/ui/cadres/cadre1_green.png'); }
.bingo-modal .btn.bg-case.lot .bg-ic { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .45)); }
.bingo-modal .btn.bg-case.sort .bg-ic { animation: bg-sort .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bg-sort { 0% { transform: translateY(16px) scale(.3); } 60% { transform: translateY(-14px) scale(1.25); } }
.bg-lot-n { font-size: 12px; line-height: 1; text-align: center; color: #eaffea; max-width: 92px; }
.bingo-modal .btn.bg-case.volt { border-image-source: url('assets/ui/cadres/cadre1_pink.png'); }
.bg-volt { width: 64px; height: 64px; border: 2px solid #000; image-rendering: pixelated; }
.bingo-modal .btn.bg-case.gonfle { z-index: 3; animation: bg-gonfle .78s ease-in forwards; }
@keyframes bg-gonfle { 0% { transform: scale(1); } 20% { filter: brightness(2) hue-rotate(-20deg); } 40% { filter: none; transform: scale(1.12); } 60% { filter: brightness(2.2); } 80% { filter: none; transform: scale(1.28); } 100% { filter: brightness(3); transform: scale(1.4); } }
.bingo-modal .btn.bg-case.perdu { filter: grayscale(.75) brightness(.55); }
.bingo-modal .btn.bg-case.revele { animation: bg-retourne .35s ease-out both; }
@keyframes bg-retourne { from { transform: rotateY(90deg); } }
.bg-boum { position: absolute; width: 300px; height: 300px; margin: -150px 0 0 -150px; z-index: 4; pointer-events: none;
  background: radial-gradient(circle, #fff 0 9%, #ffe27a 10% 20%, #ff9a3c 21% 32%, rgba(255, 80, 40, .75) 33% 44%, transparent 46%);
  clip-path: polygon(50% 0, 60% 30%, 92% 12%, 72% 42%, 100% 52%, 70% 62%, 86% 92%, 56% 72%, 46% 100%, 38% 70%, 8% 88%, 28% 58%, 0 44%, 30% 38%, 14% 8%, 42% 28%);
  animation: bg-boum .7s ease-out forwards; }
@keyframes bg-boum { from { transform: scale(.2) rotate(-20deg); } 30% { transform: scale(1.1); opacity: 1; } to { transform: scale(1.4) rotate(10deg); opacity: 0; } }
.bg-flash { position: fixed; inset: 0; z-index: 70; background: #fff; pointer-events: none; animation: bg-flash .45s ease-out forwards; }
@keyframes bg-flash { from { opacity: .9; } to { opacity: 0; } }
/* Bandeaux : Bravo (vert) et Voltorbe (rouge) */
.bg-bandeau { align-self: stretch; margin: 4px -8px 0; text-align: center; padding: 6px 0; font-size: 18px; }
.bg-bandeau .g { font-size: 52px; line-height: 1; }
.bg-bandeau.entre { animation: bg-bandeau .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes bg-bandeau { from { transform: translateX(-110%); } }
.bg-bandeau.rouge { background: linear-gradient(90deg, transparent, rgba(120, 10, 20, .92) 15%, rgba(120, 10, 20, .92) 85%, transparent); border-top: 3px solid #ff6b6b; border-bottom: 3px solid #ff6b6b; }
.bg-bandeau.rouge .g { color: #ff8b8b; text-shadow: 0 4px 0 #3a0006, 0 0 18px rgba(255, 60, 60, .7); }
.bg-bandeau.vert { background: linear-gradient(90deg, transparent, rgba(14, 70, 30, .92) 15%, rgba(14, 70, 30, .92) 85%, transparent); border-top: 3px solid var(--ok); border-bottom: 3px solid var(--ok); }
.bg-bandeau.vert .g { color: #b8ffb0; text-shadow: 0 4px 0 #062a0c, 0 0 18px rgba(110, 226, 122, .7); }
/* Gains (colonne de droite) */
.bg-gains-t { color: #8fd0ff; }
.bg-gains { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.bg-gain { display: flex; align-items: center; gap: 8px; padding: 2px 6px; font-size: 16px; background: rgba(10, 16, 40, .75); border: 2px solid rgba(255, 255, 255, .14); border-radius: 4px; }
.bg-gain .bg-ic { width: 32px; height: 32px; }
.bg-gain .bg-ic .pxi { --k: 1px !important; }
.bg-gain.neuf { animation: bg-neuf .5s ease-out; }
@keyframes bg-neuf { from { background: rgba(110, 226, 122, .5); transform: translateX(-10px); } }
.bg-gains.perdus .bg-gain { text-decoration: line-through; color: #8a7080; filter: grayscale(.8); }
.bg-vide { font-size: 16px; }
.bg-actions { display: flex; flex-direction: column; gap: 6px; }
/* Écran des gains encaissés */
.bg-fin-t { font-size: 34px; text-shadow: 0 3px 0 #6b3b00; }
.bg-fin-l { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 620px; }
.bg-fin-g { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 120px; padding: 8px 4px; font-size: 15px; text-align: center; line-height: 1.1;
  background: rgba(10, 16, 40, .85); border: 2px solid var(--gold-line); border-radius: 5px; opacity: 0; transform: scale(.4); }
.bg-fin-g.vu { opacity: 1; transform: none; transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), opacity .2s; }
.bg-confettis { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bg-grille-z .bg-conf, .bg-confettis .bg-conf { position: absolute; top: -12px; width: 7px; height: 11px; animation: bg-conf var(--d) ease-in var(--t) forwards; }
.bg-grille-z .bg-conf { top: -40px; }
@keyframes bg-conf { to { transform: translate(var(--dx), 460px) rotate(var(--r)); opacity: .2; } }
.bg-invite { text-align: center; padding: 20px; grid-column: 1 / 3; }
/* Téléphone */
.bg-tete, .bg-corps { flex: none; }
@media (max-width: 820px) and (min-height: 561px) { /* debout : tout l'un sous l'autre */
  .bg-tete { flex-wrap: wrap; gap: 6px; }
  .bg-okeoke { width: 48px; height: 48px; }
  .bg-titre { font-size: 28px; }
  .bg-phrase { font-size: 14px; }
  .bg-gp { order: 3; width: 100%; justify-content: center; }
  .bg-gp-l { width: 70px; font-size: 10px; }
  .bg-gp-l .bg-ic { width: 32px; height: 32px; }
  .bg-corps { grid-template-columns: 1fr; min-height: 0; }
  .bg-grille { grid-template-columns: repeat(var(--c), 72px); gap: 8px; }
  .bingo-modal .btn.bg-case { width: 72px; height: 72px; border-width: 12px; }
  .bg-q { font-size: 34px; }
  .bg-ic { width: 34px; height: 34px; }
  .bg-volt { width: 42px; height: 42px; }
  .bg-lot-n { display: none; }
  .bg-pal { width: 104px; font-size: 12px; padding: 4px; }
  .bg-pal b { font-size: 16px; }
  .bg-bandeau .g { font-size: 34px; }
  .bg-cote { font-size: 15px; }
  .bg-gains { max-height: 120px; }
}
@media (max-height: 560px) { /* couché : la grille à gauche, la colonne à droite, en-tête sur une ligne */
  .bg-box { gap: 4px; }
  .bg-okeoke { width: 36px; height: 36px; }
  .bg-titre { font-size: 22px; }
  .bg-phrase { font-size: 12px; margin-top: 2px; }
  .bg-gp { display: none; }
  .bg-corps { grid-template-columns: 1fr 210px; gap: 8px; min-height: 0; }
  .bg-jeu { gap: 4px; padding: 4px; }
  .bg-etapes { font-size: 12px; }
  .bg-haut { flex-direction: row; gap: 8px; }
  .bg-voltc { padding: 1px 6px; gap: 4px; }
  .bg-voltc-i { width: 20px; height: 20px; }
  .bg-voltc-t, .bg-voltc-n { font-size: 12px; }
  .bg-grille { grid-template-columns: repeat(var(--c), 60px); gap: 6px; }
  .bingo-modal .btn.bg-case { width: 60px; height: 60px; border-width: 10px; }
  .bingo-modal .btn.bg-case::before { left: -18px; width: 12px; height: 12px; margin-top: -6px; }
  .bg-q { font-size: 28px; }
  .bg-ic { width: 30px; height: 30px; }
  .bg-volt { width: 34px; height: 34px; }
  .bg-lot-n { display: none; }
  .bg-info { font-size: 13px; }
  .bg-pal { width: 112px; font-size: 11px; padding: 4px; gap: 2px; }
  .bg-pal b { font-size: 15px; }
  .bg-mini { grid-template-columns: repeat(var(--c), 9px); gap: 2px; margin: 2px 0; }
  .bg-mini i { width: 9px; height: 9px; border-width: 1px; }
  .bg-jouer { font-size: 18px; }
  .bg-bandeau { margin-top: 2px; padding: 2px 0; font-size: 13px; }
  .bg-bandeau .g { font-size: 26px; }
  .bg-cote { font-size: 13px; gap: 4px; }
  .bg-tickets { font-size: 14px; }
  .bg-tk .pxi { --k: 1px !important; }
  .bg-regles { display: none; }
  .bg-src { font-size: 12px; }
  .bg-gains { max-height: 110px; }
  .bg-gain { font-size: 12px; padding: 1px 4px; }
  .bg-gain .bg-ic { width: 22px; height: 22px; }
  .bg-actions .btn { font-size: 16px; }
  .bg-fin-t { font-size: 22px; }
  .bg-fin-g { width: 84px; font-size: 11px; padding: 4px 2px; }
  .bg-fin-g .bg-ic { width: 28px; height: 28px; }
}
.bg-volt-mini { width: 20px; height: 20px; vertical-align: -5px; border: 1px solid #000; image-rendering: pixelated; }

/* (23/11) Réserve de tickets : bien visible, en bas à droite de la colonne */
.bg-cote { display: flex; flex-direction: column; }
.bg-reserve { margin-top: auto; align-self: flex-end; gap: 10px; padding: 8px 14px; border: 3px solid #5c6a9a; border-radius: 6px; background: rgba(8,12,34,.85); font-size: 22px; }
.bg-reserve.plein { border-color: #f7d51d; box-shadow: 0 0 10px rgba(247,213,29,.35); }
.bg-reserve .bg-res-t { opacity: .9; }
.bg-reserve .bg-res-n { font-size: 30px; }
.bg-src-t b { margin-left: 6px; }
