/* ==========================================================================
   Ça pique ! — des piments, des brochettes, un barbecue
   ========================================================================== */

/* Barre commune (css/games.css) aux couleurs du jeu ; scores des joueurs dedans */
#sqp-root {
  --mg-jeu-largeur: 1024px;
  --mgb-fond: radial-gradient(120% 160% at 0% 0%, rgba(255, 220, 120, 0.25), transparent 55%),
    linear-gradient(115deg, #8e1b10, #d63a14 60%, #f07a1a);
  --mgb-texte: #fff;
  --mgb-doux: #ffe0c2;
  --mgb-accent: #ffd166;
  --mgb-titre: linear-gradient(100deg, #ffffff, #ffd166);
  --mg-fs-fond: radial-gradient(circle at 50% 120%, #f07a1a, #8e1b10 60%, #3d0a05);
  --mg-bulle-fond: #5a1a10;
  --sqp-creme: #fffaf2;
  --sqp-terre: #f6dfc6;
  --sqp-terre-fonce: #e9c49f;
  --sqp-brique: #8e1b10;
  --sqp-degrade: linear-gradient(115deg, #8e1b10, #d63a14 60%, #f07a1a);
}

/* ---------- Scores dans la barre ---------- */
.scores {
  gap: 8px;
  flex-wrap: wrap;
}

.player-score {
  position: relative;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 10px 6px 12px;
  border-radius: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.player-score .pts {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
}
/* Thermomètre du joueur : gouttes avalées sur 99 */
.player-score .chauffe {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.player-score .chauffe i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffd166, #ff3d00);
  transition: width 0.7s;
}
.player-score.current .chauffe {
  background: rgba(142, 27, 16, 0.15);
}
.player-score .lait {
  font-size: 15px;
  line-height: 1;
  transition: opacity 0.3s, filter 0.3s;
}
.player-score .lait.vide {
  opacity: 0.35;
  filter: grayscale(1);
}
.player-score.current {
  background: #fff;
  color: var(--sqp-brique);
}
.player-score.eliminated {
  background: rgba(255, 205, 210, 0.85);
  color: #c62828;
  text-decoration: line-through;
}

/* ---------- Conteneur du jeu ---------- */
div.game-container {
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 122, 26, 0.1), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(214, 58, 20, 0.08), transparent 40%),
    var(--sqp-creme);
  border-radius: 20px;
  padding: 16px;
  /* Largeur fixe (disposition), mise à l'échelle par fitToScreen() */
  width: 1000px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(90, 20, 5, 0.3);
  position: relative;
  overflow: hidden;
  transform-origin: top left;
}

/* Grosse brûlure du joueur : le bord du jeu rougeoie */
div.game-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 4px rgba(255, 87, 34, 0.9), inset 0 0 80px 20px rgba(255, 60, 0, 0.45);
  z-index: 15;
}
div.game-container.brule::after {
  animation: brule 1.1s ease-out;
}
@keyframes brule {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.animation-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.game-area {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.board {
  max-width: 585px;
  flex: 0 0 auto;
}

/* ---------- Les piments ---------- */
.card {
  width: 62px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s, filter 0.25s;
}
.card .pj {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 2px rgba(80, 20, 0, 0.3));
}
.pj-num {
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900;
  fill: #fff;
  stroke: #2b0d05;
  stroke-width: 3.4px;
  stroke-linejoin: round;
  paint-order: stroke;
  text-anchor: middle;
}
/* Le 13 couve : lueur qui palpite */
.card.bulls-6 .pj {
  animation: braise 1.6s ease-in-out infinite;
}
@keyframes braise {
  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(255, 109, 0, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 9px rgba(255, 109, 0, 0.95));
  }
}

/* Dans la cagette : le piment survolé frétille */
.hand .card:not(.card-slot):hover {
  animation: fretille 0.5s ease-in-out;
  transform: translateY(-5px);
}
@keyframes fretille {
  0%,
  100% {
    rotate: 0deg;
  }
  25% {
    rotate: -7deg;
  }
  75% {
    rotate: 6deg;
  }
}

/* Piment choisi : il saute hors de la cagette, entouré d'une lueur */
.card.selected,
.card.selected:hover {
  transform: translateY(-16px) rotate(-6deg);
}
.card.selected .pj {
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(255, 140, 0, 0.9));
}
.card.selected {
  animation: card-lift 0.25s cubic-bezier(0.34, 1.6, 0.64, 1);
}
@keyframes card-lift {
  from {
    transform: translateY(-5px) rotate(0deg);
  }
  to {
    transform: translateY(-16px) rotate(-6deg);
  }
}

/* Place vide (piment parti sur une brochette) */
.card.card-vide {
  cursor: default;
}

/* ---------- Piments spéciaux ---------- */
.card.special {
  justify-content: flex-start;
  padding-top: 2px;
  border-radius: 50%;
}
.card.special .special-visage {
  line-height: 0;
}
.card.special .perso {
  width: 52px;
  height: 62px;
  filter: drop-shadow(0 3px 2px rgba(80, 20, 0, 0.3));
}
.card.special .special-nom {
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 2px 5px;
  margin-top: 1px;
  line-height: 1.1;
}
.card.carolina {
  background: radial-gradient(circle at 50% 42%, rgba(255, 120, 0, 0.55), transparent 62%);
}
.card.carolina .special-nom {
  background: var(--sqp-degrade);
  color: #fff;
}
.card.mexicain {
  background: radial-gradient(circle at 50% 42%, rgba(255, 214, 80, 0.7), transparent 62%);
}
.card.mexicain .special-nom {
  background: #2e7d32;
  color: #fff;
}
.special-badge {
  position: absolute;
  top: 0;
  right: -2px;
  z-index: 1;
  font-size: 11px;
  background: #2e7d32;
  color: #fff;
  border-radius: 8px;
  padding: 1px 4px;
  line-height: 1.2;
}

/* ---------- Brochettes (rangées du plateau) ---------- */
.row-container {
  margin-bottom: 10px;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 5px;
  background: linear-gradient(180deg, var(--sqp-terre), var(--sqp-terre-fonce));
  box-shadow: inset 0 2px 6px rgba(120, 50, 10, 0.18);
  border-radius: 12px;
  padding: 8px 0;
  min-height: 116px;
  position: relative;
  min-width: 580px;
}
#board .row {
  display: flex;
  align-items: center;
}
/* La pique en bois, pointe au-dessus du barbecue */
#board .row.brochette::before {
  content: "";
  position: absolute;
  left: 2px;
  width: 528px;
  top: calc(50% - 4px);
  height: 8px;
  background: linear-gradient(180deg, #e6b47c, #b97a3d 70%, #8d5524);
  clip-path: polygon(0 15%, 96% 15%, 100% 50%, 96% 85%, 0 85%);
  border-radius: 3px;
}

/* Piments placés en absolu (left calculé par slotLeft() : ils se serrent
   quand la brochette s'allonge) */
#board .row .card {
  position: absolute;
  z-index: 1;
  cursor: default !important;
  pointer-events: none;
  transition: none !important;
}

/* Le barbecue au bout de la pique : de plus en plus vif avec la chaleur */
.bbq-bout {
  position: absolute;
  left: 486px;
  bottom: 14px;
  width: 70px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border-radius: 0 0 14px 14px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 120, 30, 0.4), transparent 65%);
}
.bbq-bout .flamme {
  font-size: 15px;
  line-height: 1;
  margin: 0 -2px;
  transform-origin: 50% 100%;
  animation: flamme 0.9s ease-in-out infinite alternate;
  opacity: 0.6;
}
.bbq-bout .flamme:nth-child(2) {
  font-size: 19px;
  animation-delay: 0.3s;
}
.bbq-bout .flamme:nth-child(3) {
  animation-delay: 0.55s;
}
@keyframes flamme {
  from {
    transform: scale(0.85, 0.8) rotate(-4deg);
  }
  to {
    transform: scale(1.05, 1.15) rotate(4deg);
  }
}
#board .row.chaude .bbq-bout {
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 100, 20, 0.6), transparent 68%);
}
#board .row.chaude .bbq-bout .flamme {
  opacity: 0.85;
  font-size: 19px;
}
#board .row.chaude .bbq-bout .flamme:nth-child(2) {
  font-size: 25px;
}
/* Proche du seuil : le feu s'emballe */
#board .row.brulante .bbq-bout {
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 80, 0, 0.9), transparent 72%);
}
#board .row.brulante .bbq-bout .flamme {
  opacity: 1;
  font-size: 22px;
  animation-duration: 0.45s;
}
#board .row.brulante .bbq-bout .flamme:nth-child(2) {
  font-size: 32px;
}

/* Jauge de chaleur sous les piments : sa longueur montre la limite de la
   brochette (5 à 12 gouttes), elle se remplit du vert au rouge */
.jauge {
  position: absolute;
  left: 10px;
  width: var(--w, 468px);
  bottom: 5px;
  height: 7px;
  border-radius: 4px;
  background: rgba(120, 50, 10, 0.15);
  overflow: hidden;
}
.jauge i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #66bd3c, #f6c814 45%, #ff8a00 70%, #e3261b);
  background-size: var(--w, 468px) 100%;
  transition: width 0.4s;
}

/* Chaleur de la brochette (x/9), au-dessus du barbecue */
.row-total {
  position: absolute;
  left: 488px;
  top: 6px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 1px;
  padding: 3px 6px 3px 8px;
  border-radius: 10px;
  /* --p : remplissage 0 → 1, teinte du vert (120) au rouge (0) */
  background: hsl(calc(120 - 120 * var(--p, 0)), 78%, calc(40% + 6% * var(--p, 0)));
  box-shadow: 0 1px 3px rgba(120, 50, 10, 0.25);
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  transition: background 0.4s;
  pointer-events: auto;
}
.row-total small {
  font-size: 11px;
  opacity: 0.7;
}
.row-total span {
  font-size: 13px;
}

/* Brochette avalée : elle grille avant de disparaître */
#board .row.burning {
  animation: rangee-brule 0.55s ease-in forwards;
}
#board .row.burning .card {
  transition: transform 0.5s ease-in, opacity 0.5s ease-in, filter 0.5s !important;
  transform: translateY(-14px) scale(0.85) !important;
  opacity: 0.15;
  filter: sepia(1) saturate(4) hue-rotate(-20deg) brightness(0.6);
}
@keyframes rangee-brule {
  0% {
    box-shadow: inset 0 0 0 rgba(255, 87, 34, 0);
  }
  60% {
    box-shadow: inset 0 0 40px rgba(255, 87, 34, 0.9);
    background: #ffc59a;
  }
  100% {
    box-shadow: inset 0 0 20px rgba(255, 87, 34, 0.4);
  }
}

/* Brochette à choisir : vague orange. Le clignotement est porté par ::after,
   qui tourne sans interruption : le survol ne fait que le masquer */
#board .row.selectable {
  cursor: pointer !important;
  pointer-events: all !important;
  transition: background 0.2s, transform 0.2s;
}
#board .row.selectable::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  animation: row-choose 1.2s ease-in-out infinite;
}
#board .row-container:nth-child(2) .row.selectable::after {
  animation-delay: 0.15s;
}
#board .row-container:nth-child(3) .row.selectable::after {
  animation-delay: 0.3s;
}
#board .row-container:nth-child(4) .row.selectable::after {
  animation-delay: 0.45s;
}
#board:has(.row.selectable:hover) .row.selectable::after {
  visibility: hidden;
}
#board .row.selectable:hover {
  background: #ffe0bf;
  transform: scale(1.02);
  box-shadow: 0 0 0 3px #f07a1a;
}
@keyframes row-choose {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 122, 26, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(240, 122, 26, 0.9);
  }
}

/* ---------- Le barbecue (« Sur le feu ») ---------- */
.played-cards-area {
  flex: 1;
  background: linear-gradient(180deg, #fff1df, #ffe6cc);
  border-radius: 14px;
  padding: 16px;
  min-width: 300px;
  box-shadow: inset 0 2px 6px rgba(120, 50, 10, 0.1);
}
.played-cards-area h3 {
  margin: 0 0 16px 0;
  font-size: 1.1em;
  color: var(--sqp-brique);
  text-align: center;
}
.played-cards-area h3::before {
  content: "🔥 ";
}
.played-attente {
  text-align: center;
  color: #a0704f;
  margin: 20px 0;
}
.played-card-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(120, 50, 10, 0.12);
  transition: all 0.3s ease;
}
.played-card-item .card {
  width: 50px;
  height: 72px;
  margin-right: 12px;
  flex-shrink: 0;
  cursor: default;
}
.played-card-item .card.special .perso {
  width: 42px;
  height: 50px;
}
.played-card-item .card.special .special-nom {
  font-size: 7.5px;
}
.played-card-item .card.special .special-badge {
  font-size: 9px;
}
.played-card-info {
  flex: 1;
  font-weight: bold;
  color: #4a2a1a;
}
.played-card-info .cible {
  color: #d63a14;
}

.card-animation {
  position: absolute;
  z-index: 1001;
  pointer-events: none;
  transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-animation.moving {
  transform: scale(0.85) rotate(-10deg);
}

/* ---------- Annonce des piments spéciaux ---------- */
.sqp-annonce {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 30;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  padding: 14px 28px;
  border-radius: 16px;
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  color: #fff;
  background: #5a1a10;
  box-shadow: 0 12px 40px rgba(60, 10, 0, 0.45);
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34, 1.5, 0.64, 1);
  white-space: nowrap;
}
.sqp-annonce b {
  font-size: 26px;
  color: inherit;
}
.sqp-annonce.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.sqp-annonce.carolina {
  background: radial-gradient(circle at 50% 0%, #ff8a3d, #c62410 55%, #5a0b05);
  border: 3px solid #ffb300;
}
.sqp-annonce.mexicain {
  background: linear-gradient(160deg, #fff6c2, #ffd36b);
  color: #1f5a23;
  border: 3px solid #2e7d32;
}

/* ---------- La cagette (main du joueur) ---------- */
.hand {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%),
    repeating-linear-gradient(180deg, #e2b07a 0 26px, #c98f55 26px 29px);
  border: 5px solid #a8692f;
  border-radius: 14px;
  padding: 0 16px;
  box-shadow: inset 0 3px 8px rgba(90, 40, 5, 0.35), 0 4px 10px rgba(90, 40, 5, 0.2);
}
.hand-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.hand .row {
  justify-content: center;
  align-items: center;
  background: none;
  box-shadow: none;
  padding: 0;
}
/* Emplacement d'un piment déjà joué : une empreinte dans la cagette */
.hand .card.card-slot,
.hand .card.card-slot:hover {
  cursor: default;
  transform: none;
}
.hand .card.card-slot::before {
  content: "";
  width: 30px;
  height: 64px;
  border-radius: 50% 50% 45% 45% / 30% 30% 70% 70%;
  background: rgba(90, 40, 5, 0.18);
}

/* ---------- Bouton « Jouer » ---------- */
.sqp-play {
  flex: 0 0 auto;
  width: 124px;
  height: 90px;
  border: none;
  border-radius: 12px;
  background: #f1e2d2;
  color: #8a6a55;
  font-family: inherit;
  font-weight: bold;
  line-height: 1.15;
  cursor: not-allowed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.sqp-play-label {
  font-size: 14px;
}
.sqp-play-num {
  font-size: 32px;
  line-height: 1;
}
.sqp-play-num.petit {
  font-size: 19px;
}
.sqp-play.ready {
  background: var(--sqp-degrade);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 6px 16px rgba(214, 58, 20, 0.45);
  animation: play-pulse 1.6s ease-in-out infinite;
}
/* Le survol global des boutons du site (fond bleu) ne s'applique pas ici */
.sqp-play:disabled:hover {
  background: #f1e2d2;
  color: #8a6a55;
}
.sqp-play.ready:hover {
  filter: brightness(1.1);
}
.sqp-play.ready:active {
  transform: translateY(3px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 3px 8px rgba(214, 58, 20, 0.45);
  animation: none;
}
/* Brochette à avaler */
.sqp-play.choose-row,
.sqp-play.choose-row:hover {
  background: #f07a1a;
  color: #fff;
  animation: play-pulse 1.2s ease-in-out infinite;
}
@keyframes play-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ---------- Boutons des fenêtres (lait, Carolina) : couleurs de la barre ----------
   Les fenêtres mgDialog() sont ajoutées au <body> : règles globales */
.mg-dialog button.sqp-btn,
.mg-dialog button.sqp-btn:hover,
.mg-dialog button.sqp-btn:focus {
  background: linear-gradient(115deg, #8e1b10, #d63a14 60%, #f07a1a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(214, 58, 20, 0.35);
  transition: filter 0.15s, transform 0.1s;
}
.mg-dialog button.sqp-btn:hover {
  filter: brightness(1.12);
}
.mg-dialog button.sqp-btn:active {
  transform: translateY(2px);
}
.mg-dialog button.sqp-btn:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}
.mg-dialog button.sqp-btn-doux,
.mg-dialog button.sqp-btn-doux:hover,
.mg-dialog button.sqp-btn-doux:focus {
  background: #fff1e0;
  color: #8e1b10;
  box-shadow: inset 0 0 0 2px #e9c49f;
}
/* Choix de la cible de la Carolina : les joueurs les uns sous les autres */
.mg-dialog-boutons:has(.sqp-cible) {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 280px;
  margin: 0 auto;
}

/* ---------- Confirmation de nouvelle partie ---------- */
#confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#confirm-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 32px 24px 24px 24px;
  min-width: 300px;
  text-align: center;
}
#confirm-box p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

/* ---------- Mise à l'échelle : le jeu tient dans la fenêtre ---------- */
.sqp-stage {
  margin: 0 auto;
}
/* Plein écran : le jeu, mis à l'échelle, est centré sous la barre */
#sqp-root.mg-fs .sqp-stage {
  margin: auto;
}

/* Disposition verticale (écrans étroits / portrait) : le barbecue sous les brochettes */
.game-container.tall .game-area {
  flex-direction: column;
  gap: 12px;
}
.game-container.tall .played-cards-area {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  min-height: 124px;
}
.game-container.tall .played-cards-area h3 {
  display: none;
}
.game-container.tall #played-cards {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.game-container.tall .played-card-item {
  flex-direction: column;
  margin: 0;
  padding: 6px 12px;
}
.game-container.tall .played-card-item .card {
  margin: 0 0 4px 0;
}
.game-container.tall .hand-flex {
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
/* Hauteur fixe (2 lignes de piments) : la disposition ne change pas en cours de manche */
.game-container.tall .hand .row {
  min-height: 190px;
  align-content: center;
}

/* ---------- Points perdus : animation du compteur ---------- */
.player-score.hit {
  animation: score-hit 0.7s ease;
}
@keyframes score-hit {
  0% {
    transform: none;
  }
  15% {
    transform: scale(1.15) rotate(-4deg);
    background: #ff5722;
    color: #fff;
  }
  30% {
    transform: scale(1.15) rotate(4deg);
    background: #ff5722;
    color: #fff;
  }
  45% {
    transform: scale(1.1) rotate(-3deg);
  }
  60% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    transform: none;
  }
}
/* « −N 🔥 » et l'exclamation du joueur, sous son compteur */
.score-delta {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #e53b12;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  animation: score-delta 2s ease-out forwards;
}
.score-delta small {
  margin-top: 2px;
  font-size: 13px;
  color: #fff;
  background: #5a1a10;
  border-radius: 10px;
  padding: 2px 8px;
  text-shadow: none;
}
.score-delta.seul {
  font-size: 13px;
  color: #fff;
  background: #2e7d32;
  border-radius: 10px;
  padding: 2px 8px;
  text-shadow: none;
}
@keyframes score-delta {
  0% {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.8);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 2px) scale(1.2);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, 8px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(1);
  }
}

/* ---------- Fin de partie ---------- */
.sqp-end {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 242, 0.6);
  border-radius: 20px;
}
.sqp-end[hidden] {
  display: none;
}
.sqp-end-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 40px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(90, 20, 5, 0.3);
  border-top: 8px solid #d63a14;
  animation: end-pop 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
}
.sqp-end.win .sqp-end-box {
  border-top-color: #7cb342;
}
.sqp-end-box p {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: bold;
  line-height: 1.3;
  color: #2b1a12;
}
.sqp-end-box small {
  font-size: 18px;
  font-weight: normal;
  color: #6b4a38;
}
.sqp-end-box .sqp-play {
  width: auto;
  height: auto;
  padding: 12px 36px;
  font-size: 20px;
  margin: 0 auto;
  animation: none;
}
@keyframes end-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Rien sur le feu entre deux tours : le barbecue ---------- */
.poele-decor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.poele {
  width: 260px;
  height: auto;
  overflow: visible;
}
.poele .bulle {
  fill: #fff3b0;
  stroke: #c98a1a;
  stroke-width: 0.8;
  transform-box: fill-box;
  transform-origin: center;
  animation: bulle 2.6s ease-in-out infinite;
}
@keyframes bulle {
  0%,
  100% {
    transform: scale(0.2);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
}
.poele .vapeur {
  fill: none;
  stroke: #c9a58c;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0;
  animation: vapeur 2.7s ease-out infinite;
}
@keyframes vapeur {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  30% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}
.poele-decor .played-attente {
  margin: 0 0 10px;
  font-weight: bold;
  color: #a0532f;
  text-align: center;
}

/* Échelle de chaleur : les 5 variétés */
.echelle {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 10px 4px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 4px rgba(120, 50, 10, 0.12);
}
.ech-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  line-height: 1.25;
  color: #6b3a22;
}
.ech-item b {
  color: var(--sqp-brique);
}
.ech-piment {
  width: 42px;
  height: 60px;
  margin-bottom: 2px;
}
.ech-piment .pj {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.mon-lait b {
  color: var(--sqp-brique);
}
.mon-lait {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b3a22;
  text-align: center;
}

/* Disposition verticale : place comptée, seul le message reste */
.game-container.tall .poele,
.game-container.tall .echelle,
.game-container.tall .mon-lait {
  display: none;
}
.game-container.tall .poele-decor .played-attente {
  margin: 40px 0 0;
}

/* Braises qui rougeoient et flammes qui dansent */
.poele .braise {
  fill: #ff7a1a;
  animation: braise-bbq 1.6s ease-in-out infinite alternate;
}
@keyframes braise-bbq {
  from {
    fill: #b3260f;
  }
  to {
    fill: #ffb030;
  }
}
.poele .flamme-bbq {
  fill: #ffa726;
  stroke: #ff6d00;
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flamme 0.8s ease-in-out infinite alternate;
}

/* ---------- Clignement des yeux : un battement bref, de temps en temps ---------- */
.yeux {
  transform-box: fill-box;
  transform-origin: center;
  animation: cligne 12s linear infinite;
}
@keyframes cligne {
  0%,
  98.4%,
  100% {
    transform: scaleY(1);
  }
  99.2% {
    transform: scaleY(0.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .yeux {
    animation: none;
  }
}
