/* Mini-jeu astuce — ramassage de déchets (page blog) */
.imani-waste-game-wrap {
  margin: 0 0 2.5rem;
  padding: 1.5rem 1.25rem 1.75rem;
  max-width: 100%;
  border-radius: 16px;
  background: linear-gradient(145deg, #e8f5ee 0%, #d4e8dc 45%, #c5e0d0 100%);
  border: 1px solid rgba(15, 122, 58, 0.2);
  box-shadow: 0 8px 28px rgba(15, 122, 58, 0.12);
}

.imani-waste-game-wrap h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f4d28;
}

.imani-waste-game-wrap .imani-waste-game-lead {
  margin: 0 0 1rem;
  font-family: var(--imani-font-small, "Open Sans", sans-serif);
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1a3d2a;
}

.imani-waste-game {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.imani-waste-game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-family: var(--imani-font-ui, "Roboto", sans-serif);
  font-weight: 700;
  font-size: 0.875rem;
  color: #0f7a3a;
}

.imani-waste-game-field {
  position: relative;
  min-height: 220px;
  border-radius: 12px;
  background: linear-gradient(180deg, #7cba7a 0%, #5a9e5c 38%, #3d7a44 100%);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.15);
}

.imani-waste-game-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(45, 80, 45, 0.45));
  pointer-events: none;
}

.imani-waste-game-bin {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 3;
  width: 58px;
  height: 58px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: linear-gradient(180deg, #4a5568 0%, #2d3748 100%);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.imani-waste-game-bin:hover {
  transform: translateX(-50%) scale(1.04);
}

.imani-waste-game-bin:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.imani-waste-game-bin.is-target {
  box-shadow: 0 0 0 3px #0f7a3a, 0 8px 22px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%) scale(1.08);
}

.imani-waste-game-bin-icon {
  font-size: 1.75rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.imani-waste-game-idle .imani-waste-game-bin {
  visibility: hidden;
  pointer-events: none;
}

.imani-waste-game-piece {
  position: absolute;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, -50%);
  animation: imani-waste-pop 0.35s ease-out;
  z-index: 2;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.imani-waste-game-piece:focus {
  outline: 3px solid #0f7a3a;
  outline-offset: 2px;
}

.imani-waste-game-piece.is-gone {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.imani-waste-game-piece.is-held {
  z-index: 4;
  animation: none;
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 3px #0f7a3a, 0 8px 20px rgba(0, 0, 0, 0.3);
}

.imani-waste-game-piece.is-tossing {
  pointer-events: none;
  z-index: 6;
  animation: none;
  left: 50% !important;
  top: 86% !important;
  transform: translate(-50%, -50%) scale(0.35) !important;
  opacity: 0.25;
  transition:
    left 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.38s ease;
}

@media (prefers-reduced-motion: reduce) {
  .imani-waste-game-piece.is-tossing {
    transition-duration: 0.15s;
  }

  .imani-waste-game-bin {
    transition: none;
  }

  .imani-waste-game-bin:hover {
    transform: translateX(-50%);
  }

  .imani-waste-game-bin.is-target {
    transform: translateX(-50%);
  }
}

@keyframes imani-waste-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .imani-waste-game-piece {
    animation: none;
  }
}

.imani-waste-game-start {
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: #0f7a3a;
  color: #fff;
  font-family: var(--imani-font-ui, "Roboto", sans-serif);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 122, 58, 0.35);
}

.imani-waste-game-start:hover {
  background: #0c6230;
}

.imani-waste-game-start:focus-visible {
  outline: 3px solid #285a9a;
  outline-offset: 2px;
}

.imani-waste-game-start:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.imani-waste-game-result {
  margin: 0;
  min-height: 1.25rem;
  font-family: var(--imani-font-small, "Open Sans", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #153d24;
}

.imani-waste-game-idle .imani-waste-game-field {
  display: flex;
  align-items: center;
  justify-content: center;
}

.imani-waste-game-idle-hint {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
  text-align: center;
  font-family: var(--imani-font-small, "Open Sans", sans-serif);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
