/* ═══ BG Plane — jeu crash/avion. Theme noir/gold du site. ═══ */

.plane-section { padding: 2.2rem 0 4rem; }

.plane-title {
  text-align: center;
  margin: .2rem 0 .4rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.plane-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 1.6rem;
  font-size: .92rem;
  line-height: 1.5;
}

.plane-game {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

/* ── Scene (ciel + canvas) ── */
.plane-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(232,184,75,0.30);
  box-shadow: 0 22px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
  background: linear-gradient(180deg, #6fb2dd 0%, #a9d6f0 100%);
  touch-action: manipulation;
}
#plane-canvas { display: block; width: 100%; height: 100%; }

/* ── Barre du haut : historique + son ── */
.plane-top {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.plane-history {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: calc(100% - 50px);
}
.plane-chip {
  font-size: .72rem; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(0,0,0,0.42); color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(3px);
}
.plane-chip.win  { color: #8affb9; border-color: rgba(124,255,176,0.45); }
.plane-chip.lose { color: #ff9d9d; border-color: rgba(255,157,157,0.45); }

.plane-mute {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.38);
  color: #fff; font-size: 1rem; line-height: 1;
  cursor: pointer; backdrop-filter: blur(3px);
}
.plane-mute:hover { background: rgba(0,0,0,0.55); }

/* ── Jetons bonus (free / lucky) ── */
.plane-tokens {
  position: absolute;
  top: 56px; left: 10px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.plane-token {
  font-size: .72rem; font-weight: 800;
  padding: 4px 10px; border-radius: 10px;
  background: rgba(0,0,0,0.45); color: #ffe08a;
  border: 1px solid rgba(232,184,75,0.5);
  backdrop-filter: blur(3px);
}
.plane-token.lucky { color: #b9f5ff; border-color: rgba(120,220,255,0.5); }

/* ── Popups (win / lose / bonus) ── */
.plane-popup {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.plane-popup.show { opacity: 1; }
.plane-popup-card {
  text-align: center;
  padding: 1.1rem 1.8rem;
  border-radius: 18px;
  background: rgba(8,10,14,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  transform: scale(.7);
  animation: planePop .45s cubic-bezier(.18,1.3,.5,1) forwards;
}
@keyframes planePop { to { transform: scale(1); } }
.plane-popup-label {
  font-size: .8rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; opacity: .85;
}
.plane-popup-big {
  font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 900; line-height: 1.05;
  margin: .15rem 0;
}
.plane-popup-sub { font-size: .95rem; font-weight: 700; opacity: .9; }
.plane-popup.win  .plane-popup-card { border-color: rgba(124,255,176,0.5); }
.plane-popup.win  .plane-popup-big  { color: #8affb9; text-shadow: 0 0 24px rgba(124,255,176,0.5); }
.plane-popup.lose .plane-popup-card { border-color: rgba(255,120,120,0.5); }
.plane-popup.lose .plane-popup-big  { color: #ff9a9a; }
.plane-popup.bonus .plane-popup-card{ border-color: rgba(232,184,75,0.6); }
.plane-popup.bonus .plane-popup-big { color: #ffe08a; text-shadow: 0 0 24px rgba(232,184,75,0.5); }

/* ── Barre de contrôle casino ── */
.plane-bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(22,24,30,0.96), rgba(14,15,20,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: .9rem 1.1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.plane-bar-cell { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.plane-cap {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 800;
}
.plane-bar-balance strong { font-size: 1.15rem; font-weight: 900; color: #fff; }
.plane-bar-balance small { color: var(--accent, #E8B84B); font-size: .8rem; }

.plane-stepper {
  display: flex; align-items: stretch;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 11px; overflow: hidden;
}
.plane-stepper input {
  flex: 1; min-width: 54px; width: 100%;
  background: transparent; border: none; outline: none;
  color: #fff; text-align: center; font-size: 1.02rem; font-weight: 800;
  -moz-appearance: textfield;
}
.plane-stepper.sm input { font-size: .92rem; min-width: 44px; }
.plane-stepper input::-webkit-outer-spin-button,
.plane-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.plane-stepper button {
  width: 40px; border: none; cursor: pointer;
  background: rgba(232,184,75,0.14); color: var(--accent, #E8B84B);
  font-size: 1.25rem; font-weight: 800; transition: background .15s;
}
.plane-stepper.sm button { width: 34px; font-size: 1.1rem; }
.plane-stepper button:hover { background: rgba(232,184,75,0.28); }
.plane-stepper .plane-xlabel {
  display: flex; align-items: center; padding: 0 10px;
  color: var(--muted); font-weight: 800;
}

.plane-quick { display: flex; gap: 5px; }
.plane-quick button {
  flex: 1; padding: 4px 0; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.05); color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: .76rem; font-weight: 800; transition: all .15s;
}
.plane-quick button:hover { color: #fff; border-color: rgba(232,184,75,0.4); }

.plane-switch {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; user-select: none;
  font-size: .78rem; font-weight: 800; color: var(--muted);
}
.plane-switch input { accent-color: var(--accent, #E8B84B); width: 16px; height: 16px; }
.plane-switch input:checked + span { color: var(--accent, #E8B84B); }

.plane-bar-actions { flex-direction: column; gap: .5rem; }
.plane-bonus {
  border: 1px solid rgba(232,184,75,0.4);
  border-radius: 11px; padding: .5rem .9rem; cursor: pointer;
  background: linear-gradient(180deg, rgba(124,77,255,0.28), rgba(124,77,255,0.16));
  color: #fff; font-size: .82rem; font-weight: 800;
  white-space: nowrap; transition: filter .15s, opacity .15s;
}
.plane-bonus:hover { filter: brightness(1.15); }
.plane-bonus:disabled { opacity: .5; cursor: not-allowed; }

.plane-action {
  border: none; border-radius: 12px;
  padding: .8rem 1.6rem; min-width: 150px;
  font-size: 1.08rem; font-weight: 900; letter-spacing: .01em;
  cursor: pointer; color: #1a1407;
  background: linear-gradient(180deg, #f3cd6a, #E8B84B);
  box-shadow: 0 10px 24px rgba(232,184,75,0.28);
  transition: transform .08s, filter .15s, opacity .15s, background .2s;
}
.plane-action:hover { filter: brightness(1.06); }
.plane-action:active { transform: translateY(1px); }
.plane-action:disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.25); }
.plane-action.is-cashout {
  color: #04210f;
  background: linear-gradient(180deg, #5ef0a0, #1fbf6e);
  box-shadow: 0 10px 26px rgba(31,191,110,0.4);
  animation: planeCashPulse 1s ease-in-out infinite;
}
@keyframes planeCashPulse { 0%,100% { box-shadow: 0 10px 26px rgba(31,191,110,0.4);} 50% { box-shadow: 0 10px 34px rgba(31,191,110,0.7);} }

.plane-potential {
  text-align: center; font-size: .82rem; color: var(--muted);
}
.plane-potential b { color: #fff; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .plane-bar { grid-template-columns: 1fr 1fr; gap: .8rem .9rem; }
  .plane-bar-actions { grid-column: 1 / -1; flex-direction: row; }
  .plane-bonus { flex: 0 0 auto; }
  .plane-action { flex: 1; min-width: 0; }
}
@media (max-width: 460px) {
  .plane-bar { grid-template-columns: 1fr; }
  .plane-bar-balance { flex-direction: row; align-items: baseline; justify-content: space-between; }
}

/* ═══ Slots — onglets de jeux ═══ */
.slots-tabs {
  display: flex; gap: .5rem; justify-content: center;
  margin: 0 auto 1.5rem; flex-wrap: wrap;
}
.slots-tab {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--muted); font-weight: 800; font-size: .92rem;
  padding: .55rem 1.2rem; border-radius: 12px; cursor: pointer;
  transition: all .15s;
}
.slots-tab:hover { color: #fff; border-color: rgba(232,184,75,0.4); }
.slots-tab.active {
  color: #1a1407; border-color: transparent;
  background: linear-gradient(180deg, #f3cd6a, #E8B84B);
  box-shadow: 0 8px 20px rgba(232,184,75,0.25);
}

/* ═══ Mines ═══ */
.mines-wrap {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.2rem;
  max-width: 980px; margin: 0 auto;
  align-items: start;
}
.mines-panel {
  display: flex; flex-direction: column; gap: .6rem;
  background: linear-gradient(180deg, rgba(22,24,30,0.96), rgba(14,15,20,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1.1rem;
}
.mines-mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: rgba(0,0,0,0.3); border-radius: 11px; padding: 4px; margin-bottom: .3rem;
}
.mines-mode-btn {
  border: none; background: transparent; color: var(--muted);
  font-weight: 800; font-size: .85rem; padding: .5rem; border-radius: 8px; cursor: pointer;
}
.mines-mode-btn.active { background: rgba(232,184,75,0.16); color: var(--accent, #E8B84B); }
.mines-lab {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 800; margin-top: .2rem;
}
.mines-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .4rem 0;
}
.mines-stats > div {
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: .5rem .3rem; text-align: center;
}
.mines-stats span { display: block; font-size: .6rem; text-transform: uppercase; color: var(--muted); font-weight: 800; letter-spacing: .05em; }
.mines-stats strong { font-size: 1rem; color: #fff; }
.mines-stats strong#mines-mult { color: #2fe38a; }
.mines-action {
  border: none; border-radius: 12px; padding: .9rem; cursor: pointer;
  font-size: 1.05rem; font-weight: 900; color: #1a1407;
  background: linear-gradient(180deg, #f3cd6a, #E8B84B);
  box-shadow: 0 10px 24px rgba(232,184,75,0.25);
  transition: transform .08s, filter .15s, background .2s, opacity .15s;
}
.mines-action:hover { filter: brightness(1.06); }
.mines-action:active { transform: translateY(1px); }
.mines-action:disabled { opacity: .55; cursor: not-allowed; }
.mines-action.is-cashout {
  color: #04210f; background: linear-gradient(180deg, #5ef0a0, #1fbf6e);
  box-shadow: 0 10px 26px rgba(31,191,110,0.4);
}
.mines-action.is-stop {
  color: #fff; background: linear-gradient(180deg, #ff7a7a, #e23b3b);
  box-shadow: 0 10px 26px rgba(226,59,59,0.4);
}
.mines-balance { text-align: center; font-size: .85rem; color: var(--muted); }
.mines-balance strong { color: var(--accent, #E8B84B); }

.mines-board-wrap { position: relative; }
.mines-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  aspect-ratio: 1 / 1;
}
.mines-tile {
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, #232734, #181b24);
  border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.2rem, 4vw, 2rem); line-height: 1;
  transition: transform .08s, box-shadow .2s, background .2s, border-color .2s;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.35);
  -webkit-user-select: none; user-select: none;
}
.mines-tile:not(.revealed):not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(232,184,75,0.45);
  box-shadow: 0 0 0 1px rgba(232,184,75,0.35), 0 8px 18px rgba(0,0,0,0.4);
}
.mines-tile:disabled { cursor: default; }
.mines-tile.revealed { animation: minesReveal .25s ease; }
.mines-tile.gem {
  background: radial-gradient(circle at 50% 40%, rgba(47,227,138,0.28), rgba(20,40,30,0.9));
  border-color: rgba(47,227,138,0.6);
  box-shadow: 0 0 0 1px rgba(47,227,138,0.5), 0 0 22px rgba(47,227,138,0.35);
}
.mines-tile.gem .mines-ico { animation: minesShine 1.6s ease-in-out infinite; }
.mines-tile.bomb {
  background: radial-gradient(circle at 50% 40%, rgba(255,80,80,0.32), rgba(45,18,18,0.9));
  border-color: rgba(255,90,90,0.7);
  box-shadow: 0 0 0 1px rgba(255,90,90,0.55), 0 0 22px rgba(255,80,80,0.4);
}
.mines-tile.bomb.hit { animation: minesExplode .45s ease; }
.mines-tile.faded { opacity: .42; }
.mines-ico { display: block; }
@keyframes minesReveal { from { transform: scale(.6); } to { transform: scale(1); } }
@keyframes minesShine { 0%,100% { filter: drop-shadow(0 0 2px rgba(47,227,138,0.4)); } 50% { filter: drop-shadow(0 0 10px rgba(47,227,138,0.9)); } }
@keyframes minesExplode {
  0% { transform: scale(.6); } 35% { transform: scale(1.18); }
  45% { transform: translateX(-4px) scale(1.1); } 60% { transform: translateX(4px) scale(1.06); }
  75% { transform: translateX(-2px); } 100% { transform: translateX(0) scale(1); }
}

.mines-popup {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.mines-popup.show { opacity: 1; }
.mines-popup-card {
  text-align: center; padding: 1rem 1.7rem; border-radius: 16px;
  background: rgba(8,10,14,0.82); border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  transform: scale(.7); animation: planePop .4s cubic-bezier(.18,1.3,.5,1) forwards;
}
.mines-popup-big { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 900; line-height: 1.05; }
.mines-popup-sub { font-size: .9rem; font-weight: 700; opacity: .9; margin-top: .15rem; }
.mines-popup.win .mines-popup-big { color: #8affb9; text-shadow: 0 0 22px rgba(124,255,176,0.5); }
.mines-popup.win .mines-popup-card { border-color: rgba(124,255,176,0.5); }
.mines-popup.lose .mines-popup-big { color: #ff9a9a; }
.mines-popup.lose .mines-popup-card { border-color: rgba(255,120,120,0.5); }

@media (max-width: 720px) {
  .mines-wrap { grid-template-columns: 1fr; }
  .mines-board { max-width: 460px; margin: 0 auto; width: 100%; }
}
