/* MODE COMPARAISON : L'UNE AU-DESSUS DE L'AUTRE */
.compare-view {
  height: calc(100dvh - 14px - var(--safe-top) - var(--safe-bottom));
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.compare-view .filter-drawer {
  margin-bottom: 0;
  flex-shrink: 0;
}

.enemy-pane {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #05070a;
  border: 2px solid var(--primary);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.enemy-pane img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

.pane-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  z-index: 4;
}
.pane-badge.enemy { background: var(--primary); color: #111; }
.pane-badge.candidate { background: rgba(23, 28, 38, 0.9); color: #fff; border: 1px solid var(--border); }

.candidate-stage {
  position: relative;
  flex: 1.12;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.swipe-card-media {
  position: relative;
  flex: 1;
  background: #05070a;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.swipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  pointer-events: none;
}

.stamp {
  position: absolute;
  top: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  border: 3px solid;
  background: rgba(0, 0, 0, 0.55);
  z-index: 5;
}
.stamp.match { left: 12px; color: var(--match); border-color: var(--match); transform: rotate(-10deg); }
.stamp.pass { right: 12px; color: var(--pass); border-color: var(--pass); transform: rotate(10deg); }

.zoom-card-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  cursor: pointer;
  z-index: 4;
}

.reset-pinch-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(245, 158, 11, 0.92);
  color: #111;
  border: none;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 4;
}

.swipe-card-info {
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.swipe-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
}

.swipe-action-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.swipe-action-btn.pass { border-color: rgba(239, 68, 68, 0.55); color: #fca5a5; }
.swipe-action-btn.match { border-color: rgba(34, 197, 94, 0.55); color: #86efac; }

.ctrl-btn.small {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .compare-view {
    height: calc(100dvh - 20px);
  }
}