/* ==========================================================================
   Jeu Grenoulaga
   ========================================================================== */

.arcade-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: space-between;
  color: var(--leaf-deep);
  font-weight: 700;
}

.arcade-stage {
  position: relative;
  display: grid;
  max-width: 360px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 16px;
  background-color: #6d7f42;
  box-shadow: none;
}

.arcade-canvas {
  grid-area: 1 / 1;
  width: 100%;
  max-width: none;
  aspect-ratio: 8 / 9;
  margin: 0;
  border: 0;
  border-radius: 13px;
  outline: 0;
  background: #7d8562;
  box-shadow: none;
  touch-action: none;
  image-rendering: pixelated;
}

.arcade-card::after {
  color: #13221c;
}

.arcade-hud span {
  display: grid;
  place-items: center;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.arcade-hud #arcadeTimer {
  color: var(--leaf-deep);
  -webkit-text-fill-color: currentColor;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.arcade-hud #arcadeTimer.is-warm {
  color: #b35b00;
}

.arcade-hud #arcadeTimer.is-dark {
  color: #8f3b00;
}

.arcade-victory {
  grid-area: 1 / 1;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 12px 10px;
  text-align: center;
  background: rgba(20, 53, 46, 0.22);
  pointer-events: none;
}

.arcade-victory[hidden] {
  display: none;
}

.arcade-victory-badge {
  display: grid;
  justify-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 8px 24px;
  border: 2px solid #e2ebd7;
  border-radius: 999px;
  color: #29483c;
  background: #fff;
  box-shadow: 0 5px 14px rgba(20, 53, 46, 0.2);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.arcade-victory-badge strong {
  font-size: clamp(28px, 8vw, 36px);
  font-variant-numeric: tabular-nums;
}

.arcade-victory .arcade-victory-message {
  max-width: 240px;
  margin: 0;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(20, 53, 46, 0.8);
}

.arcade-bravo {
  display: block;
  width: min(82%, 240px);
  height: auto;
  flex-shrink: 0;
  opacity: 0;
  filter: drop-shadow(0 7px 10px rgba(20, 45, 40, 0.24));
  pointer-events: none;
}

.arcade-bravo.show {
  animation: arcadeBravoEnter 450ms ease-out forwards;
}

@keyframes arcadeBravoEnter {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .arcade-bravo.show {
    animation: none;
    opacity: 1;
  }
}

.arcade-status.is-fun-fact {
  max-width: 320px;
  margin: 16px auto 18px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.arcade-danger {
  color: #d7262e;
  -webkit-text-fill-color: #d7262e;
  font-weight: 800;
}

.arcade-status:not(.is-fun-fact) {
  font-weight: 700;
}

.arcade-rules-label {
  color: #38523a;
  -webkit-text-fill-color: #38523a;
  font-weight: 900;
}

.arcade-card .arcade-rules {
  max-width: none;
  margin: 10px 6px 6px;
  color: #687b42;
  -webkit-text-fill-color: #687b42;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.arcade-controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 8px auto 12px;
}

.arcade-control,
.arcade-tongue {
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid rgba(28, 55, 48, 0.14);
  border-radius: 999px;
  color: #fff;
  background: #2f7ecb;
  box-shadow: 0 4px 7px rgba(29, 59, 61, 0.24);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  touch-action: none;
  -webkit-user-select: none;
}

.arcade-tongue {
  background: #43843f;
}

.arcade-control:hover,
.arcade-control:focus-visible,
.arcade-tongue:hover,
.arcade-tongue:focus-visible {
  background: #176fae;
  transform: translateY(-1px);
}

.arcade-tongue:hover,
.arcade-tongue:focus-visible {
  background: #376f34;
}

#arcadeLives {
  min-width: 74px;
  padding: 3px 8px;
  border: 2px solid rgba(231, 53, 47, 0.4);
  color: #e7352f;
  -webkit-text-fill-color: #e7352f;
  background: rgba(27, 55, 48, 0.92);
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(231, 53, 47, 0.36);
}

.arcade-button {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.arcade-stage .arcade-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 126px;
  min-width: 126px;
  height: 155px;
  min-height: 155px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: url("../assets/images/jouer.png") center / contain no-repeat;
  box-shadow: none;
  font-size: 0;
  transform: translate(-50%, -50%);
}

.arcade-stage .arcade-button:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.arcade-stage .arcade-button.is-hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: none;
}

.arcade-stage .arcade-button.is-replay {
  position: relative;
  grid-area: 2 / 1;
  justify-self: center;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 78px;
  min-width: 78px;
  height: 90px;
  min-height: 90px;
  margin: 10px auto 12px;
  background-image: url("../assets/images/rejouer.png");
  transform: none;
}

.arcade-stage .arcade-button.is-replay:active {
  transform: scale(0.94);
}
