/* ============================================================
   GAMBL'ISEN — machine à sous (néon, dorures, logos des assos)
   ============================================================ */
.gb {
  --gold1: #fff1a8; --gold2: #f5b700; --gold3: #a86b00; --ink: #14101f; --cell: min(88px, 23vw, 11.5vh);
  position: relative; min-height: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 14px 12px 22px; color: #fff; font-family: var(--f-ui);
  background: radial-gradient(circle at 50% 0%, #6a1b6f, #2a0a3d 45%, #12051f 85%);
}
.gb, .gb * { box-sizing: border-box; }
.gb::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: repeating-conic-gradient(from 0deg at 50% -10%, #ff1f8f 0 6deg, transparent 6deg 18deg); }
.gb > * { position: relative; }
.gb-top { width: min(420px, 100%); display: flex; justify-content: space-between; align-items: center; }
.gb-coins { padding: 7px 14px; border-radius: 99px; background: rgba(0, 0, 0, .45); border: 2px solid var(--gold2); font: 18px var(--f-title); color: var(--gold1); box-shadow: 0 0 14px rgba(245, 183, 0, .35); }
.gb-paybtn { padding: 8px 14px; border-radius: 99px; border: 2px solid #fff; background: rgba(255, 255, 255, .1); color: #fff; font: 700 14px var(--f-ui); }
.gb-paybtn:active { transform: scale(.95); }

/* la machine */
.gb-machine {
  width: min(420px, 100%); padding: 14px 14px 18px; border-radius: 26px;
  background: linear-gradient(180deg, #c2185b, #7b1fa2 55%, #4a148c);
  border: 4px solid var(--gold2);
  box-shadow: 0 0 0 4px var(--gold3), 0 0 40px rgba(255, 31, 143, .55), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -10px 30px rgba(0, 0, 0, .35);
}
.gb-marquee { display: flex; justify-content: space-between; padding: 0 6px 8px; }
.gb-marquee i { position: relative; width: 11px; height: 11px; border-radius: 50%; background: #6b4b00; }
.gb-marquee i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #ffe066; box-shadow: 0 0 8px #ffd23f; animation: gb-bulb 1.2s steps(1) infinite; will-change: opacity; }
.gb-marquee i:nth-child(odd)::after { animation-delay: .6s; }
@keyframes gb-bulb { 50% { opacity: 0; } }
.gb-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.gb-title img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold1); box-shadow: 0 0 10px rgba(255, 241, 168, .6); }
.gb-title span { font: clamp(24px, 7vw, 32px)/1 var(--f-title); letter-spacing: .02em; color: #fff;
  text-shadow: 0 0 6px #ff1f8f, 0 0 16px #ff1f8f, 0 3px 0 #4a148c; }

/* fenêtre des rouleaux */
.gb-window { position: relative; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, var(--gold1), var(--gold2) 45%, var(--gold3)); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.gb-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: calc(var(--cell) * 3); overflow: hidden; border-radius: 10px; background: #1b0b2a; }
.gb-reel { position: relative; overflow: hidden; height: calc(var(--cell) * 3); border-radius: 8px;
  background: linear-gradient(180deg, #fff6e0, #fffdf7 35%, #fffdf7 65%, #f1e3c4); }
.gb-reel::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 22%, transparent 78%, rgba(0, 0, 0, .35)); }
.gb-strip { will-change: transform; }
.gb-strip.spinning { opacity: .85; }   /* effet sur toute la bande (pas symbole par symbole) : rien à redessiner */
.gb-cell { height: var(--cell); display: grid; place-items: center; }
.gb-cell img { width: 74%; height: 74%; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); user-select: none; -webkit-user-drag: none; }
.gb-cell[data-s="patate"] img { border-radius: 0; width: 80%; height: 80%; }
.gb-cell { position: relative; }
/* gain : le logo clignote sur place (il ne grossit plus, rien ne dépasse du cadre) */
.gb-cell.gbw img { animation: gb-win .42s steps(1) infinite; }
.gb-cell.gbw::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 210, 63, .55), rgba(255, 210, 63, 0) 70%); animation: gb-halo .42s steps(1) infinite; }
@keyframes gb-win { 50% { opacity: .5; } }
@keyframes gb-halo { 50% { opacity: 0; } }
.gb-lines { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; }
.gb-lines polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gb-lines g { opacity: 0; }
.gb-lines g.on { opacity: 1; }
.gb-lines .o { stroke: url(#gb-lg); stroke-width: 9; opacity: .85; filter: drop-shadow(0 0 5px rgba(255, 210, 63, .9)); }
.gb-lines .i { stroke: #fff; stroke-width: 2.5; stroke-dasharray: 10 14; }
.gb-lines g.on .o { stroke-dasharray: 600; animation: gb-line .55s ease-out both; }
.gb-lines g.on .i { animation: gb-flow .6s linear infinite; }
@keyframes gb-line { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes gb-flow { to { stroke-dashoffset: -24; } }

.gb-msg { min-height: 46px; margin: 10px 0 8px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); text-align: center; font-weight: 700; font-size: 15px; display: grid; place-items: center; }
.gb-msg b { display: block; font: 24px var(--f-title); color: var(--gold1); text-shadow: 0 0 10px rgba(255, 210, 63, .6); }
.gb-msg.good { background: rgba(62, 230, 176, .18); }
.gb-msg.big { animation: gb-pulse .5s ease 3; }
.gb-msg.bad { color: #ffb3c1; }
@keyframes gb-pulse { 50% { transform: scale(1.05); } }

/* commandes */
.gb-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gb-bet { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 99px; background: rgba(0, 0, 0, .4); border: 2px solid rgba(255, 255, 255, .25); }
.gb-bet button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font: 24px/1 var(--f-title); box-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.gb-bet button:active { transform: translateY(2px); box-shadow: none; }
.gb-bet div { min-width: 52px; text-align: center; }
.gb-bet button:disabled { opacity: .4; }
.gb-bet small { display: block; font-size: 10px; letter-spacing: .15em; opacity: .7; }
.gb-bet b { font: 22px var(--f-title); color: var(--gold1); }
.gb-spin { width: 100px; height: 100px; display: grid; place-content: center; line-height: 1; flex: none; border-radius: 50%; border: 4px solid var(--gold1);
  background: radial-gradient(circle at 35% 30%, #ff8fab, #e63946 45%, #9d0208); color: #fff;
  box-shadow: 0 7px 0 #5c0010, 0 0 24px rgba(230, 57, 70, .6), inset 0 4px 8px rgba(255, 255, 255, .45);
  font: 24px var(--f-title); text-shadow: 0 2px 0 #5c0010; transition: transform .08s; }
.gb-spin:active, .gb-spin.pull { transform: translateY(5px); box-shadow: 0 2px 0 #5c0010, 0 0 30px rgba(255, 210, 63, .7), inset 0 4px 8px rgba(255, 255, 255, .45); }
.gb-spin:disabled { filter: saturate(.5) brightness(.85); }
.gb-spin small { font: 700 12px var(--f-ui); opacity: .9; margin-top: 3px; }
.gb-spin.stop { background: radial-gradient(circle at 35% 30%, #8fd3ff, #1f6feb 45%, #0a2d6b); box-shadow: 0 7px 0 #061a40, 0 0 24px rgba(31, 111, 235, .6), inset 0 4px 8px rgba(255, 255, 255, .45); text-shadow: 0 2px 0 #061a40; }
.gb-modes { display: flex; flex-direction: column; gap: 8px; }
.gb-mode { width: 54px; height: 46px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .4); color: #fff; display: grid; place-content: center; gap: 1px; transition: background .2s, border-color .2s, box-shadow .2s; }
.gb-mode b { font-size: 17px; line-height: 1; }
.gb-mode small { font: 700 9px var(--f-ui); letter-spacing: .08em; opacity: .85; }
.gb-mode.on { border-color: var(--gold1); background: linear-gradient(180deg, #ffd23f, #f59e0b); color: var(--ink); box-shadow: 0 0 14px rgba(255, 210, 63, .7); }
.gb-mode:active { transform: scale(.94); }
.gb-autopick { display: none; justify-content: center; gap: 8px; margin-top: 12px; }
.gb-autopick.on { display: flex; animation: gb-pop .25s cubic-bezier(.3, 1.6, .5, 1) both; }
.gb-autopick button { min-width: 54px; padding: 8px 12px; border-radius: 99px; border: 2px solid var(--gold1); background: rgba(0, 0, 0, .45); color: var(--gold1); font: 16px var(--f-title); }
@keyframes gb-pop { from { transform: scale(.7); opacity: 0; } }

/* barre des free spins (cachée hors bonus) */
.gb-fsbar { display: none; justify-content: space-between; margin: -4px 2px 8px; padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .45); font: 14px var(--f-title); color: var(--gold1); }
.gb.fs .gb-fsbar { display: flex; }

/* ===== PATATE BONUS : autre direction artistique (or, hologramme, contours spéciaux) ===== */
.gb.fs { background: radial-gradient(circle at 50% 0%, #6b4a00, #2b1a00 45%, #0f0800 85%); }
.gb.fs::before { opacity: .28; background: repeating-conic-gradient(from 0deg at 50% -10%, #ffd23f 0 6deg, transparent 6deg 18deg); animation: gb-rays 14s linear infinite; }
@keyframes gb-rays { to { transform: rotate(8deg) scale(1.1); } }
.gb.fs .gb-machine { background: linear-gradient(180deg, #1a1033, #2d1457 55%, #12062a); border-color: #fff1a8;
  box-shadow: 0 0 0 4px #b8860b, 0 0 50px rgba(255, 210, 63, .75), inset 0 2px 0 rgba(255, 255, 255, .35); position: relative; }
.gb.fs .gb-machine::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 80px rgba(255, 210, 63, .9); opacity: 0; animation: gb-fsglow 1.6s ease-in-out infinite alternate; will-change: opacity; }
@keyframes gb-fsglow { to { opacity: 1; } }
.gb.fs .gb-title span { color: #fff1a8; text-shadow: 0 0 6px #ffb300, 0 0 18px #ffb300, 0 3px 0 #6b4a00; }
.gb.fs .gb-reel { background: radial-gradient(circle at 50% 40%, #3b2070, #160a33 75%); }
.gb.fs .gb-reel::after { background: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 22%, transparent 78%, rgba(0, 0, 0, .5)); }
.gb.fs .gb-cell { position: relative; }
/* bonus : seul le contour du logo devient doré (pas de cercle ajouté) */
.gb.fs .gb-cell img { filter: drop-shadow(1.5px 0 0 #ffd23f) drop-shadow(-1.5px 0 0 #ffd23f) drop-shadow(0 1.5px 0 #ffd23f) drop-shadow(0 -1.5px 0 #ffd23f) drop-shadow(0 0 6px rgba(255, 210, 63, .7)); }
.gb.fs .gb-cell[data-s="patate"] img { background: none;
  filter: sepia(.6) saturate(2.2) hue-rotate(-8deg) brightness(1.15) drop-shadow(0 0 8px #ffd23f); width: 86%; height: 86%; }
.gb.fs .gb-cell[data-s="patate"]::after { content: 'JOKER'; position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 99px;
  background: #ffd23f; color: #2b1a00; font: 9px var(--f-title); letter-spacing: .05em; box-shadow: 0 2px 0 #6b4a00; }
.gb.fs .gb-lines .o { stroke: #ffd23f; }
.gb-cell.pot img { animation: gb-potwin .5s ease-in-out infinite alternate; }
@keyframes gb-potwin { to { transform: rotate(8deg) scale(1.06); } }

/* bannière « +3 FREE SPINS » */
.gb-banner { position: absolute !important; left: 50%; top: 40%; z-index: 11; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 16px 28px; border-radius: 20px;
  background: rgba(20, 10, 0, .85); border: 3px solid #ffd23f; box-shadow: 0 0 40px rgba(255, 210, 63, .8); pointer-events: none; animation: gb-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.gb-banner b { font: 46px/1 var(--f-title); color: #ffd23f; }
.gb-banner span { font: 16px var(--f-title); color: #fff; letter-spacing: .1em; }

/* le trésorier du BDS qui passe une tête */
.gb-buddy { position: absolute !important; right: -16px; bottom: 150px; z-index: 6; width: 80px; transform: translateX(34px) rotate(-10deg); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); cursor: pointer; }
.gb-buddy.peek { transform: translateX(0) rotate(-3deg); }
.gb-buddy canvas { width: 80px; height: 104px; image-rendering: pixelated; display: block; filter: drop-shadow(-3px 3px 0 rgba(0, 0, 0, .35)); }
.gb-say { position: absolute; right: 70px; top: -6px; width: max-content; max-width: 180px; padding: 8px 11px; border-radius: 14px 14px 4px 14px; background: #fff; color: var(--ink); font: 700 13px/1.25 var(--f-ui); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); opacity: 0; transform: scale(.6); transform-origin: 100% 100%; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.gb-buddy.talking .gb-say { opacity: 1; transform: none; }

/* calques : patate bonus + table des gains */
.gb-layer { position: absolute !important; inset: 0; z-index: 10; display: none; place-items: center; padding: 16px; background: rgba(10, 3, 20, .82); }
.gb-layer.on { display: grid; }
.gb-bonus, .gb-pay { position: relative; width: min(420px, 100%); max-height: 100%; overflow: auto; padding: 20px 18px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #3a0f52, #1c0730); border: 3px solid var(--gold2); box-shadow: 0 0 40px rgba(255, 210, 63, .35); }
.gb-bonus h2, .gb-pay h2 { margin: 0 0 6px; font: 26px var(--f-title); color: var(--gold1); text-shadow: 0 0 10px rgba(255, 210, 63, .6); }
.gb-bonus p { margin: 0 0 16px; opacity: .9; }
.gb-bonus { background: radial-gradient(circle at 50% 20%, #5a3d00, #1c0f00 70%); border-color: #ffd23f; animation: gb-pop .4s cubic-bezier(.3, 1.5, .5, 1) both; }
.gb-bonus-pot { width: 120px; height: 120px; margin: -6px auto 6px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 63, .7), transparent 68%); animation: gb-wobble 1.6s ease-in-out infinite; }
.gb-bonus-pot img { width: 100%; height: 100%; object-fit: contain; filter: sepia(.5) saturate(2) brightness(1.1) drop-shadow(0 0 12px #ffd23f); }
.gb-bonus h2 { font-size: 30px; }
.gb-bonus-n { display: inline-block; margin: 2px 0 12px; padding: 6px 16px; border-radius: 99px; background: #ffd23f; color: #2b1a00; font: 22px var(--f-title); box-shadow: 0 4px 0 #6b4a00; }
.gb-bonus-total { font: 44px/1.1 var(--f-title); color: #ffd23f; text-shadow: 0 0 18px rgba(255, 210, 63, .8); margin: 8px 0; }
.gb-row--gold { margin-top: 6px; background: rgba(255, 210, 63, .1); border: 2px dashed rgba(255, 210, 63, .6); }
.gb-row--gold span img:first-child { background: radial-gradient(circle, #ffd23f, transparent 70%); filter: sepia(.6) saturate(2); }
.gb-pots { display: flex; justify-content: center; gap: 10px; }
.gb-pot { position: relative; width: 31%; aspect-ratio: 1; padding: 0; border: 0; background: none; animation: gb-wobble 1.6s ease-in-out infinite; }
.gb-pot:nth-child(2) { animation-delay: .25s; } .gb-pot:nth-child(3) { animation-delay: .5s; }
.gb-pot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.gb-pot span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); padding: 4px 10px; border-radius: 99px; background: var(--gold2); color: var(--ink); font: 22px var(--f-title); border: 3px solid var(--ink); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.gb-pot.open { animation: none; } .gb-pot.open span { transform: translate(-50%, -50%) scale(1); }
.gb-pot.dim { opacity: .45; filter: grayscale(.6); }
.gb-pot.chosen { transform: scale(1.12); } .gb-pot.chosen span { background: #3ee6b0; }
@keyframes gb-wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-6px); } }
.gb-ok { margin-top: 18px; padding: 12px 28px; border-radius: 99px; border: 3px solid var(--ink); background: #3ee6b0; color: var(--ink); font: 18px var(--f-title); box-shadow: 0 4px 0 var(--ink); }
.gb-ok.hidden { display: none; }
.gb-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: none; color: #fff; font-size: 16px; }
.gb-note { margin: 4px 0 12px; opacity: .8; font-size: 14px; }
.gb-rows { display: grid; gap: 6px; }
.gb-row { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); text-align: left; }
.gb-row span { display: flex; gap: 3px; }
.gb-row span img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: #fffdf7; }
.gb-row b { font: 18px var(--f-title); color: var(--gold1); min-width: 58px; }
.gb-row small { opacity: .85; }
.gb-row--pot { margin-top: 6px; background: rgba(255, 210, 63, .15); border: 2px solid rgba(255, 210, 63, .5); }
.gb-row--pot span img { background: none; border-radius: 0; }
.gb-pay .gb-row:last-of-type { margin-top: 6px; }
.gb-pairdemo i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font-style: normal; font-weight: 800; }
.gb-pay h3 { margin: 16px 0 8px; font: 16px var(--f-title); color: var(--gold1); }
.gb-linedemo { display: flex; justify-content: center; gap: 8px; }
.gb-linedemo div { display: grid; grid-template-columns: repeat(3, 12px); gap: 2px; padding: 4px; border-radius: 6px; background: rgba(255, 255, 255, .1); }
.gb-linedemo i { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, .15); }
.gb-linedemo i.on { background: #ff1f8f; box-shadow: 0 0 6px #ff1f8f; }
.gb-conf { position: absolute !important; top: -14px; left: var(--x); z-index: 12; width: 8px; height: 13px; border-radius: 2px; pointer-events: none; animation: gb-fall var(--d) cubic-bezier(.3, .6, .6, 1) forwards; }
@keyframes gb-fall { to { transform: translateY(110vh) rotate(var(--r)); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .gb-marquee i::after, .gb-pot, .gb.fs::before, .gb.fs .gb-machine::after { animation: none; } }

/* petit écran : tout tient sans défiler (cases recalculées en JS, marges resserrées) */
.gb.is-tight { gap: 8px; padding: 8px 10px 10px; }
.gb.is-tight .gb-machine { padding: 10px 10px 12px; border-radius: 20px; }
.gb.is-tight .gb-marquee { padding-bottom: 5px; }
.gb.is-tight .gb-title { margin-bottom: 6px; }
.gb.is-tight .gb-title img { width: 26px; height: 26px; }
.gb.is-tight .gb-title span { font-size: 22px; }
.gb.is-tight .gb-buddy { bottom: 110px; }
