/* ==========================================================================
   Jeu « Les cachés de la mare »
   ========================================================================== */

.seek-card::after {
  display: grid;
  place-items: center;
  color: var(--game-dark-deep);
  font-size: 31px;
  font-weight: 900;
}

.seek-viewport {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d9e8dd;
  touch-action: none;
  cursor: grab;
}

.seek-viewport:active {
  cursor: grabbing;
}

.seek-stage {
  position: relative;
  width: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.seek-stage img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.seek-target {
  position: absolute;
  top: var(--target-y);
  left: var(--target-x);
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.seek-target:focus-visible {
  outline: 3px solid #ffc51a;
  outline-offset: 3px;
}

.seek-target.found {
  border: 4px solid #ffc51a;
  background: rgba(255, 197, 26, 0.2);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
  animation: seekFound 0.5s ease-out;
}

.seek-status {
  border-radius: 12px;
}

.seek-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seek-list li {
  padding: 9px 8px;
  border: 2px solid rgba(22, 89, 75, 0.2);
  border-radius: 11px;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.seek-list li.active {
  border-color: #6d7f42;
  background: #f5f7e9;
  box-shadow: inset 0 0 0 1px rgba(109, 127, 66, 0.28);
}

.seek-list li.found {
  color: #fff;
  background: #2f9470;
  text-decoration: line-through;
}

.seek-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin: 12px 0 8px;
  padding: 8px 12px;
  border: 2px solid rgba(28, 86, 70, 0.22);
  border-radius: 14px;
  color: var(--leaf-deep);
  background: #fff9e7;
}

.seek-prompt-label {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.seek-prompt strong {
  min-width: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.seek-prompt-progress {
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: #6d7f42;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

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

.seek-toolbar {
  display: grid;
  grid-template-columns: 47px minmax(86px, 1fr) 47px minmax(112px, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 12px);
  max-width: 360px;
  margin: 12px auto 0;
}

.seek-viewport.is-resetting .seek-stage {
  transition: transform 560ms cubic-bezier(0.2, 0.72, 0.24, 1);
}

.seek-toolbar button,
.seek-toolbar span {
  display: grid;
  place-items: center;
  min-height: 47px;
  padding: 9px 12px;
  border: 2px solid rgba(28, 55, 48, 0.14);
  border-radius: 999px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #2f7ecb;
  box-shadow: 0 4px 7px rgba(29, 59, 61, 0.18);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.seek-toolbar span {
  background: #6d7f42;
  font-size: 13px;
  text-align: center;
}

.seek-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;
}

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

@media (max-width: 370px) {
  .seek-toolbar #seekReset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  .seek-toolbar {
    grid-template-columns: 43px minmax(76px, 1fr) 43px minmax(96px, auto);
    gap: 6px;
  }

  .seek-toolbar button,
  .seek-toolbar span {
    min-height: 43px;
    padding: 8px 9px;
    font-size: 14px;
  }

  .seek-toolbar span {
    font-size: 12px;
  }
}

@keyframes seekFound {
  50% { transform: translate(-50%, -50%) scale(1.35); }
}
