/* ==========================================================================
   Jeu Traversée
   ========================================================================== */

.crossing-card {
  position: relative;
  margin: 18px auto;
  padding: 18px 16px 16px;
  overflow: hidden;
  color: #687b42;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

.crossing-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -42px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(109, 127, 66, 0.08);
  pointer-events: none;
}

.crossing-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  width: 72px;
  height: 60px;
  background: url("../assets/images/grenouille-vecto.png") center / contain no-repeat;
  pointer-events: none;
}

.crossing-card > * {
  position: relative;
  z-index: 2;
}

.crossing-card .eyebrow {
  width: 100%;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  color: #b8948a;
  -webkit-text-fill-color: #b8948a;
  background: transparent;
  box-shadow: none;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.crossing-card h2 {
  max-width: calc(100% - 78px);
  margin: 0 0 8px;
  color: #687b42;
  -webkit-text-fill-color: #687b42;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 900;
  line-height: 1.05;
}

.crossing-card > p:not(.eyebrow):not(.crossing-status) {
  max-width: calc(100% - 74px);
  margin: 0 0 12px;
  color: #687b42;
  -webkit-text-fill-color: #687b42;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.32;
}

.crossing-hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 10px;
}

.crossing-hud span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 999px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #6d7f42;
  box-shadow: 0 3px 6px rgba(29, 59, 61, 0.15);
  font-size: 12px;
  font-weight: 900;
}

.crossing-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border: 4px solid #fff;
  border-radius: 18px;
  background: #72bfdc;
  box-shadow: inset 0 0 0 3px rgba(32, 56, 27, 0.12), 0 7px 14px rgba(29, 59, 61, 0.18);
  touch-action: manipulation;
}

.crossing-stage {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

.crossing-status {
  min-height: 0;
  margin: 10px 6px 10px;
  padding: 0;
  border: 0;
  color: #687b42;
  -webkit-text-fill-color: #687b42;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.crossing-controls {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  margin: 6px auto 0;
}

.crossing-start,
.crossing-move,
.crossing-jump {
  min-height: 38px;
  border: 2px solid rgba(28, 55, 48, 0.14);
  border-radius: 999px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  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;
}

.crossing-jump {
  width: 100%;
  min-height: 48px;
  max-width: 190px;
  margin: 0 auto;
  background: #2f7ecb;
  touch-action: none;
  -webkit-user-select: none;
}

.crossing-move {
  width: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 25px;
  background: #6d7f42;
  touch-action: manipulation;
}

.crossing-move:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: default;
}

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

#crossingLives {
  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);
}

.crossing-start {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 126px;
  height: 155px;
  min-height: 155px;
  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%) !important; /* !important nécessaire : doit l'emporter sur « button:active » */
}

.crossing-start:active {
  box-shadow: none;
  transform: translate(-50%, -50%) scale(0.96) !important; /* !important nécessaire : doit l'emporter sur « .crossing-start (lui-même en !important) » */
}

.crossing-start.is-hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92) !important; /* !important nécessaire : doit l'emporter sur « .crossing-start (lui-même en !important) » */
  pointer-events: none;
}

.crossing-start.is-replay {
  top: auto;
  right: 56px;
  bottom: 20px;
  left: auto;
  width: 78px;
  height: 90px;
  min-height: 90px;
  background-image: url("../assets/images/rejouer.png");
  transform: none !important; /* !important nécessaire : doit l'emporter sur « .crossing-start (lui-même en !important) » */
}

.crossing-start.is-replay:active {
  transform: scale(0.94) !important; /* !important nécessaire : doit l'emporter sur « .crossing-start (lui-même en !important) » */
}

.crossing-start.is-replay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.crossing-bravo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  width: min(94%, 330px);
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 7px 10px rgba(20, 45, 40, 0.24));
  transform: translate(-50%, -230%) scaleX(0.82) scaleY(1.14);
  transform-origin: 50% 78%;
  pointer-events: none;
}

.crossing-bravo.show {
  animation: metamorphBravoDrop 2.35s cubic-bezier(0.2, 0.9, 0.18, 1) forwards;
}

@media (max-width: 380px) {
  .crossing-card {
    padding: 16px 12px 14px;
  }

  .crossing-card::after {
    width: 62px;
    height: 52px;
  }

  .crossing-card h2,
  .crossing-card > p:not(.eyebrow):not(.crossing-status) {
    max-width: calc(100% - 62px);
  }
}
