/* =====================================================================
   CASINO-POKER.CSS — styles du Poker (copie de ton poker.css, adaptée)

   Ce fichier garde les règles de ton ancien poker.css (cartes, animations,
   mises, résultat, historique...) avec ces changements :
     - la mise en page en colonnes de l'ancien site est retirée
       (elle est refaite pour le casino dans css/casino-games.css)
     - les couleurs et polices passent à celles du jeu redessiné
       (or #ffe18a / #d8a83e, police Cinzel)
     - le logo imgur du tapis est retiré (remplacé par le jeton du casino)
     - les règles responsive du site sont retirées (cadre fixe 1600x900)
   Les dimensions, positions et ajustements propres au casino sont dans
   css/casino-games.css (chargé APRÈS ce fichier : il a le dernier mot).
   ===================================================================== */

/* ==========================================================================
    POKER (Ultimate Texas Hold'em) — thème casino
    Fond #080b10, jaune #ffe18a, violet #a855f7, or #d8a83e
    Classes prefixées pk-
    ========================================================================== */

/* ==========================================================================
    TAPIS (feutrine violette)
    ========================================================================== */
.pk-table {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 30px 28px 34px;
  background:
    radial-gradient(ellipse 85% 60% at 50% 36%, rgba(168, 85, 247, 0.28), transparent 62%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.015) 0 3px, transparent 3px 6px),
    radial-gradient(ellipse 130% 105% at 50% 0%, #3d2080 0%, #251248 46%, #12082b 100%);
  border: 3px solid #d8a83e;
  box-shadow:
    0 0 0 10px #4a2c17,
    0 0 0 12px #d8a83e,
    inset 0 0 110px rgba(0, 0, 0, 0.55),
    inset 0 0 26px rgba(0, 0, 0, 0.5),
    0 22px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  height: 560px;
}

/* Glow quand le joueur est en train de jouer */
.pk-table.playing {
  box-shadow:
    0 0 0 10px #4a2c17,
    0 0 0 12px #d8a83e,
    inset 0 0 110px rgba(0, 0, 0, 0.55),
    inset 0 0 26px rgba(0, 0, 0, 0.5),
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(168, 85, 247, 0.2),
    0 0 60px rgba(255, 225, 138, 0.1);
}

/* Glow quand le joueur gagne */
.pk-table.win-glow {
  animation: pk-table-win-glow 1.5s ease-in-out;
}

@keyframes pk-table-win-glow {
  0% { box-shadow: 0 0 0 10px #4a2c17, 0 0 0 12px #d8a83e, 0 22px 50px rgba(0,0,0,0.55); }
  50% { box-shadow: 0 0 0 10px #4a2c17, 0 0 0 12px #d8a83e, 0 0 40px rgba(47, 214, 124, 0.4), 0 0 80px rgba(255, 225, 138, 0.2), 0 22px 50px rgba(0,0,0,0.55); }
  100% { box-shadow: 0 0 0 10px #4a2c17, 0 0 0 12px #d8a83e, 0 22px 50px rgba(0,0,0,0.55); }
}

.pk-table-logo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 250px;
  height: 250px;
  transform: translate(-50%, -50%);
  background: none;
  opacity: 0.13;
  filter: drop-shadow(0 0 18px rgba(255, 225, 138, 0.35));
  pointer-events: none;
}

.pk-table-logo::after {
  content: '';
  position: absolute;
  inset: -16px;
  border: 2px solid rgba(255, 225, 138, 0.28);
  border-radius: 50%;
}

/* ==========================================================================
    ZONES DE JEU
    ========================================================================== */
.pk-zone {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.pk-zone-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1c1917;
  background: linear-gradient(180deg, #fff06a, #e6b900);
  border-radius: 999px;
  padding: 4px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 10px rgba(0, 0, 0, 0.5);
}

.pk-hand-tag {
  font-weight: 700;
  font-size: 1rem;
  min-height: 1.3em;
  color: #fff8dc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.pk-hand-tag:empty { display: none; }

.pk-cards {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  min-height: 118px;
  flex-wrap: wrap;
}

.pk-card-slot {
  width: 76px;
  height: 106px;
  border-radius: 10px;
  border: 1.5px dashed rgba(255, 225, 138, 0.35);
  background: rgba(0, 0, 0, 0.25);
  flex: none;
}

.pk-community-labels {
  display: grid;
  grid-template-columns: repeat(5, 76px);
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.pk-community-label {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pk-label-flop { grid-column: 1 / span 3; }
.pk-label-turn { grid-column: 4; }
.pk-label-river { grid-column: 5; }

/* ---- CARTES ---- */
.pk-card {
  width: 76px;
  height: 106px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  user-select: none;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(160deg, #ffffff 0%, #f3ecd8 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  animation: pk-deal-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  animation-delay: var(--deal-delay, 0ms);
}

.pk-card.red { color: #c0392b; border: 2px solid #c0392b; }
.pk-card.black { color: #1a1a2e; border: 2px solid #2c2c34; }

.pk-card .pk-rank { font-size: 1.2rem; line-height: 1; }
.pk-card .pk-suit { font-size: 1.6rem; line-height: 1; }

.pk-card.pk-card-win {
  animation: pk-card-win-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 2px #ffe18a, 0 0 18px 4px rgba(255, 225, 138, 0.65);
  transform: translateY(-4px);
}

@keyframes pk-card-win-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #ffe18a, 0 0 14px 2px rgba(255, 225, 138, 0.5); }
  50% { box-shadow: 0 0 0 2px #ffe18a, 0 0 26px 8px rgba(255, 225, 138, 0.85); }
}

.pk-card.pk-card-live {
  box-shadow: 0 0 0 2px #a855f7, 0 0 14px rgba(168, 85, 247, 0.55);
  transform: translateY(-3px);
}
.pk-card.pk-card-win.pk-card-live {
  animation: pk-card-win-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 2px #ffe18a, 0 0 14px 4px rgba(255, 225, 138, 0.65), 0 0 20px 2px rgba(168, 85, 247, 0.4);
  transform: translateY(-4px);
}

.pk-card-back {
  width: 76px;
  height: 106px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 225, 138, 0.25), transparent 65%),
    repeating-linear-gradient(45deg, rgba(168, 85, 247, 0.35) 0 6px, rgba(20, 16, 36, 0.9) 6px 12px),
    linear-gradient(135deg, #241d4d, #120f22);
  border: 2px solid #ffe18a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 225, 138, 0.3);
  animation: pk-deal-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  animation-delay: var(--deal-delay, 0ms);
}

.pk-card-back::after {
  content: '🍌';
  font-size: 2.3rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* ==========================================================================
    ANIMATIONS
    ========================================================================== */
@keyframes pk-deal-in {
  0% { transform: translateY(-140px) translateX(40px) rotate(25deg) scale(0.5); opacity: 0; }
  70% { opacity: 1; }
  100% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); opacity: 1; }
}

@keyframes pk-card-flip {
  from { transform: rotateY(90deg); opacity: 0.2; }
  to { transform: rotateY(0deg); opacity: 1; }
}

.pk-card.pk-flip-in {
  animation: pk-card-flip 0.25s ease-out both;
  animation-delay: var(--deal-delay, 0ms);
}

@keyframes pk-banner-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes pk-gain-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.pk-gain-float {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  min-height: 2.4rem;
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  color: #ffe18a;
  text-shadow: 0 0 18px rgba(255, 225, 138, 0.8), 0 2px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.pk-gain-float.win { color: #2fd67c; text-shadow: 0 0 18px rgba(47, 214, 124, 0.8), 0 2px 6px rgba(0, 0, 0, 0.8); }
.pk-gain-float.lose { color: #ff6b6b; text-shadow: 0 0 18px rgba(255, 107, 107, 0.8), 0 2px 6px rgba(0, 0, 0, 0.8); }
.pk-gain-float.push { color: #cbb97a; }
.pk-gain-float:not([hidden]) { animation: pk-gain-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ==========================================================================
    JETONS DE MISE
    ========================================================================== */
.pk-bets-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 0.35rem;
  max-width: 100%;
}

.pk-chip-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px dashed rgba(255, 225, 138, 0.45);
}

.pk-chip-slot-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pk-chip-slot-chip {
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffe18a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pk-chip-slot[data-active] {
  border-style: solid;
  background: radial-gradient(circle at 35% 30%, rgba(255, 225, 138, 0.35), rgba(0, 0, 0, 0.35) 60%);
  box-shadow: 0 0 0 3px rgba(255, 225, 138, 0.15), 0 0 14px rgba(255, 225, 138, 0.25);
}

/* ==========================================================================
    PANNEAUX — style épuré comme le blackjack
    ========================================================================== */
.pk-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(23, 21, 32, 0.98), rgba(11, 14, 19, 0.98));
  border: 1px solid #302c40;
  border-radius: 12px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.pk-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffe18a, #a855f7, transparent);
  box-shadow: 0 0 10px rgba(255, 225, 138, 0.35);
  opacity: 0.9;
}

.pk-panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.2rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.pk-panel-toggle:focus-visible {
  outline: 2px solid #ffe18a;
  outline-offset: 2px;
  border-radius: 12px;
}

.pk-panel-title {
  display: block;
  font-family: "Cinzel", serif;
  color: #ffe18a;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid #3b354a;
  padding-bottom: 7px;
  flex: 1;
}

.pk-panel-title::after {
  content: '';
  display: block;
  width: 55%;
  height: 2px;
  margin-top: 5px;
  background: linear-gradient(90deg, #ffe18a, transparent);
  box-shadow: 0 0 7px rgba(255, 225, 138, 0.28);
}

.pk-panel-chevron {
  font-size: 0.8rem;
  color: #8f8aa5;
  flex-shrink: 0;
  margin-left: 8px;
  margin-bottom: 0.8rem;
  transition: transform 0.2s ease;
}

.pk-panel--open .pk-panel-chevron { transform: rotate(0deg); }
.pk-panel--closed .pk-panel-chevron { transform: rotate(-90deg); }

.pk-panel-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 600px;
  opacity: 1;
  padding: 0 1.2rem 1.2rem;
}

.pk-panel--closed .pk-panel-body {
  max-height: 0;
  opacity: 0;
  padding: 0 1.2rem;
}

.pk-panel-points {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f5f2ff;
  margin-bottom: 0.6rem;
}

.pk-panel-points span {
  color: #ffe18a;
  font-family: "Cinzel", serif;
}

.pk-panel-recap {
  text-align: center;
  font-size: 0.78rem;
  color: #8f8aa5;
}

.pk-panel-recap b { color: #f5f2ff; }

/* ==========================================================================
    CONTROLES & ACTIONS
    ========================================================================== */
.pk-stage-hint {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff8dc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  text-align: center;
  margin: 0;
}

.pk-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.pk-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.pk-kb-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 0;
}

.pk-kb-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  color: #ffe18a;
}

/* ---- Visibilité des écrans ---- */
.pk-controls[hidden],
.pk-table-bets-wrap[hidden],
.pk-result[hidden],
.pk-gain-float[hidden] {
  display: none;
}

.pk-controls:not([hidden]),
.pk-table-bets-wrap:not([hidden]),
.pk-result:not([hidden]) {
  animation: pk-screen-in 0.28s ease-out;
}

@keyframes pk-screen-in {
  from { opacity: 0; transform: translateY(10px); }
}

.pk-screen-out {
  animation: pk-screen-out 0.22s ease-in forwards;
  pointer-events: none;
}

@keyframes pk-screen-out {
  to { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  .pk-card, .pk-card-back,
  .pk-controls:not([hidden]),
  .pk-table-bets-wrap:not([hidden]),
  .pk-result:not([hidden]),
  .pk-gain-float:not([hidden]),
  .pk-screen-out { animation: none; }
  .pk-card.pk-card-win { animation: none; box-shadow: 0 0 0 2px #ffe18a, 0 0 18px 4px rgba(255, 225, 138, 0.65); }
}

/* ---- ENCART CONTROLS SOUS LA TABLE ---- */
.pk-controls-panel {
  margin-top: 1rem;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(160deg, rgba(22, 20, 33, 0.95) 0%, rgba(12, 15, 21, 0.98) 100%);
  border: 1.5px solid rgba(255, 225, 138, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  min-height: 190px;
}

.pk-controls-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 225, 138, 0.3), transparent);
}

/* ---- MISE DE DEPART ---- */
.pk-table-bets-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.pk-table-bets-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe18a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.pk-payouts {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ---- RÉSULTAT : overlay compact ---- */
.pk-result {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 280px;
  transform: translate(-50%, -50%);
  width: min(92%, 420px);
  max-height: 88%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(145deg, rgba(23, 21, 32, 0.97), rgba(11, 14, 19, 0.97));
  border: 2px solid #d8a83e;
  border-radius: 16px;
  padding: 1.3rem 1.5rem;
  box-shadow:
    0 0 0 6px rgba(0, 0, 0, 0.45),
    0 0 34px rgba(255, 225, 138, 0.22),
    0 22px 50px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
}

.pk-result.minimized {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 0;
  padding: 0.3rem 0.8rem;
  gap: 0.4rem;
  cursor: pointer;
  max-height: none;
  overflow: visible;
  font-size: 0.75rem;
  opacity: 0.9;
  z-index: 50;
  border-radius: 20px;
}
.pk-result.minimized > *:not(.pk-result-minimize):not(.pk-result-title) { display: none; }
.pk-result.minimized .pk-result-title { font-size: 0.75rem; margin: 0; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.pk-result.minimized .pk-result-minimize { transform: rotate(180deg); }

.pk-result-minimize {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 225, 138, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #ffe18a;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 6;
  line-height: 1;
}
@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-result-minimize:hover { background: rgba(255, 225, 138, 0.15); border-color: #ffe18a; }
}

.pk-result-title {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  color: #fff8dc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.pk-result[data-result='win'] .pk-result-title { color: #2fd67c; }
.pk-result[data-result='lose'] .pk-result-title,
.pk-result[data-result='fold'] .pk-result-title { color: #ff6b6b; }
.pk-result[data-result='push'] .pk-result-title { color: #cbb97a; }

.pk-result.celebrate .pk-result-title {
  animation: pk-banner-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 0 16px rgba(255, 225, 138, 0.7);
}

.pk-result-sub {
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  color: #fff8dc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.pk-result-details {
  width: 100%;
  font-size: 0.82rem;
  color: #8f8aa5;
}

.pk-result-details summary {
  cursor: pointer;
  text-align: center;
  color: #ffe18a;
  font-weight: 700;
  list-style: none;
  margin-bottom: 0.5rem;
}

.pk-result-details summary::-webkit-details-marker { display: none; }

.pk-btn-next {
  width: 100%;
  margin-top: 0.2rem;
}

.pk-link {
  background: none;
  border: none;
  padding: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8f8aa5;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-link:hover { color: #ffe18a; }
}

/* ---- BOUTONS ---- */
.pk-btn {
  min-width: 150px;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 3px dashed rgba(255, 255, 255, 0.75);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.pk-btn-primary {
  background: radial-gradient(circle at 50% 30%, #2fd67c, #1a9e54 70%);
  color: #062d1a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(6, 45, 26, 0.9), 0 6px 16px rgba(0, 0, 0, 0.55);
}

@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-btn-primary:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-2px);
  }
}

.pk-btn-primary:focus-visible {
  outline: 2px solid #ffe18a;
  outline-offset: 3px;
}

.pk-btn-secondary {
  background: radial-gradient(circle at 50% 30%, #ff6b6b, #c0392b 70%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(60, 10, 8, 0.9), 0 6px 16px rgba(0, 0, 0, 0.55);
}

@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-btn-secondary:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-2px);
  }
}

.pk-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.5);
}

/* ---- MISE DE DEPART : boutons ---- */
.pk-ante-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.pk-ante-btn {
  padding: 0.6rem 0.7rem;
  border: 2px solid #ffe18a;
  border-radius: 8px;
  background: linear-gradient(180deg, #181622 0%, #0d1016 100%);
  color: #ffe18a;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}

@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-ante-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #fff06a 0%, #ffe18a 100%);
    color: #17120a;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 225, 138, 0.4);
  }
}

.pk-ante-btn.selected {
  background: linear-gradient(180deg, #fff06a 0%, #ffe18a 100%);
  color: #17120a;
  box-shadow: 0 0 12px rgba(255, 225, 138, 0.5);
}

.pk-ante-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.pk-trips-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #f5f2ff;
  cursor: pointer;
}

.pk-trips-toggle input {
  accent-color: #ffe18a;
  width: 15px;
  height: 15px;
}

/* ---- DETAIL RESULTAT ---- */
.pk-result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.pk-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pk-result-row .pk-row-label { color: #ddd; }
.pk-result-row .pk-row-label .pk-row-sub {
  display: block;
  font-size: 0.72rem;
  color: #8f8aa5;
}

.pk-result-row .pk-row-value { font-weight: 700; white-space: nowrap; color: #ffe18a; }
.pk-result-row .pk-row-value.win { color: #2fd67c; text-shadow: 0 0 8px rgba(47, 214, 124, 0.35); }
.pk-result-row .pk-row-value.lose { color: #ff6b6b; text-shadow: 0 0 8px rgba(255, 107, 107, 0.35); }
.pk-result-row .pk-row-value.push { color: #cbb97a; }

.pk-result-total {
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid #3b354a;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 800;
  font-size: 1.15rem;
  color: #f5f2ff;
}

.pk-result-total .win { color: #2fd67c; }
.pk-result-total .lose { color: #ff6b6b; }
.pk-result-total .push { color: #cbb97a; }

.pk-message {
  min-height: 1.3rem;
  color: #ff6b6b;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.3rem;
}

/* ==========================================================================
    REGLES / GAINS / CLASSEMENT
    ========================================================================== */
.pk-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #f5f2ff;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pk-rules strong { color: #ffe18a; }

.pk-payout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.pk-payout-table th {
  text-align: left;
  font-weight: 600;
  color: #8f8aa5;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #3b354a;
}

.pk-payout-table th:not(:first-child),
.pk-payout-table td:not(:first-child) { text-align: right; }

.pk-payout-table td {
  padding: 0.45rem 0;
  color: #ddd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pk-payout-table td:not(:first-child) { font-weight: 700; color: #ffe18a; }
.pk-payout-table tr:last-child td { border-bottom: none; }

.pk-lb-section { margin-top: 0.7rem; }

.pk-lb-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8f8aa5;
  margin: 0 0 0.4rem;
}

.pk-lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #ddd;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pk-lb-row:last-child { border-bottom: none; }
.pk-lb-empty { font-size: 0.75rem; color: #8f8aa5; text-align: center; padding: 0.3rem 0; }
.pk-lb-val { font-weight: 700; color: #ffe18a; flex-shrink: 0; }
.pk-lb-val.pos { color: #2fd67c; text-shadow: 0 0 8px rgba(47, 214, 124, 0.35); }
.pk-lb-val.neg { color: #ff6b6b; text-shadow: 0 0 8px rgba(255, 107, 107, 0.35); }

.pk-banasino-text { font-size: 0.85rem; line-height: 1.6; color: #8f8aa5; margin: 0 0 14px; }

.pk-banasino-links { display: flex; flex-direction: column; gap: 10px; }

.pk-banasino-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffe18a;
  background: linear-gradient(180deg, #181622 0%, #0d1016 100%);
  border: 2px solid #ffe18a;
  border-radius: 5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

@media (hover: hover) {
  /* Souris uniquement : au doigt il n'y a pas de survol, l'effet resterait "collé" après un appui */
  .pk-banasino-link:hover {
    background: linear-gradient(180deg, #fff06a 0%, #ffe18a 100%);
    color: #17120a;
    border-color: #fff3a0;
    box-shadow: 0 0 10px rgba(255, 225, 138, 0.35), inset 0 0 8px rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    filter: brightness(1.1);
  }
}

.pk-banasino-link:focus-visible {
  outline: 2px solid #ffe18a;
  outline-offset: 2px;
}

/* ==========================================================================
    HISTORIQUE
    ========================================================================== */
.pk-history-log {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  min-height: 200px;
  scrollbar-gutter: stable;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #ffe18a #10131a;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pk-history-log::-webkit-scrollbar { width: 5px; }
.pk-history-log::-webkit-scrollbar-track { background: #10131a; }
.pk-history-log::-webkit-scrollbar-thumb { background: #ffe18a; border-radius: 3px; }

.pk-history-empty { font-size: 0.75rem; color: #8f8aa5; text-align: center; padding: 0.3rem 0; }

.pk-history-round {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 225, 138, 0.15);
  font-size: 0.78rem;
}

.pk-history-round:last-child { border-bottom: none; }

.pk-history-round-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffe18a;
  margin-bottom: 0.15rem;
  opacity: 0.85;
}

.pk-history-entry { font-size: 0.68rem; color: #ccc; padding: 0.08rem 0 0.08rem 0.4rem; }
.pk-history-result { font-weight: 700; margin-top: 0.35rem; }
.pk-history-result.win { color: #2fd67c; }
.pk-history-result.lose, .pk-history-result.fold { color: #ff6b6b; }
.pk-history-result.push { color: #cbb97a; }

/* ==========================================================================
    COMBINAISONS (mini-cards)
    ========================================================================== */
.pk-combos {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pk-combo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pk-combo-row:last-child { border-bottom: none; }

.pk-combo-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ddd;
  flex-shrink: 0;
}

.pk-combo-cards {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.pk-card-mini {
  width: 23px;
  height: 32px;
  border-radius: 3px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(160deg, #ffffff 0%, #f3ecd8 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  flex: none;
}

.pk-card-mini.red { color: #c0392b; border: 1px solid #c0392b; }
.pk-card-mini.black { color: #1a1a2e; border: 1px solid #2c2c34; }

.pk-mini-rank { font-size: 0.55rem; line-height: 1; }
.pk-mini-suit { font-size: 0.65rem; line-height: 1; }

/* ==========================================================================
    RESPONSIVE
    ========================================================================== */


/* ==========================================================================
    MODE RÉDUIT MOTION
    ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .pk-card, .pk-card-back,
  .pk-controls:not([hidden]),
  .pk-table-bets-wrap:not([hidden]),
  .pk-result:not([hidden]),
  .pk-gain-float:not([hidden]),
  .pk-screen-out { animation: none; }
  .pk-card.pk-card-win { animation: none; box-shadow: 0 0 0 2px #ffe18a, 0 0 18px 4px rgba(255, 225, 138, 0.65); }
  .pk-table.win-glow { animation: none; }
}

/* ==========================================================================
    INTERRUPTEUR D'EFFETS GLOBAUX
    ========================================================================== */
html.fx-off .pk-table.win-glow { animation: none; }
html.fx-off .pk-table.playing { box-shadow: 0 0 0 10px #4a2c17, 0 0 0 12px #d8a83e, inset 0 0 110px rgba(0, 0, 0, 0.55), 0 22px 50px rgba(0, 0, 0, 0.55); }