/* ══════════════════════════════════════════════════════════════════════
   MATCHING DES OFFRES — « à la Tinder »
   ══════════════════════════════════════════════════════════════════════ */

.wr-match-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.wr-match-head__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--wr-ink, #1E1B2E); }
.wr-match-head__sub { margin: 4px 0 0; font-size: 14px; color: var(--wr-muted, #6B7280); }

/* ── La scène ── */
.wr-match { width: 100%; margin: 0 auto; }
.wr-match__stage {
  position: relative;
  height: 560px;
  margin-bottom: 20px;
}
.wr-match__deck { position: absolute; inset: 0; }

/* ── Une carte ── */
.wr-mcard {
  position: absolute; inset: 0;
  background: #fff;
  border: 1px solid var(--wr-line, #EEF1F7);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(30, 27, 46, .10);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: center bottom;
  transition: transform .3s ease, opacity .3s ease;
  user-select: none;
}
.wr-mcard.is-top { cursor: grab; }
.wr-mcard.is-dragging { cursor: grabbing; transition: none; }

.wr-mcard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wr-mcard__logo {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  background: #FEF3C7; color: #B45309;
}
.wr-mcard__score {
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 100px;
}
.wr-mcard__score strong { font-weight: 800; }
.wr-mcard__score--high { background: #ECFDF3; color: #047857; }
.wr-mcard__score--mid { background: #FEF9C3; color: #A16207; }
.wr-mcard__score--low { background: #F1F5F9; color: #64748B; }

.wr-mcard__title {
  margin: 0 0 4px;
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  color: var(--wr-ink, #1E1B2E); line-height: 1.2;
}
.wr-mcard__company { font-size: 14.5px; font-weight: 500; color: var(--wr-muted, #6B7280); margin-bottom: 16px; }

.wr-mcard__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.wr-mcard__badge {
  font-size: 12.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 100px;
  background: #F1F5F9; color: #475569;
}
.wr-mcard__badge--violet { background: #F2EDFA; color: #8A63C1; }
.wr-mcard__badge--blue { background: #DBEAFE; color: #1E40AF; }

.wr-mcard__excerpt {
  margin: 0 0 16px;
  font-size: 14px; line-height: 1.6; color: #374151;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
}
.wr-mcard__skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.wr-mcard__chip {
  font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 100px;
  background: #F8F4FD; color: #8A63C1;
}

/* Bandeaux LIKE / NOPE au drag. */
.wr-mcard__stamp {
  position: absolute; top: 26px;
  font-size: 26px; font-weight: 900; letter-spacing: .06em;
  padding: 6px 16px; border-radius: 10px;
  border: 3px solid; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transform: rotate(-12deg); z-index: 5;
}
.wr-mcard__stamp--like { left: 22px; color: #10B981; border-color: #10B981; }
.wr-mcard__stamp--nope { right: 22px; color: #EF4444; border-color: #EF4444; transform: rotate(12deg); }

/* ── Boutons d'action ── */
.wr-match__actions { display: flex; align-items: center; justify-content: center; gap: 18px; }
.wr-match__btn {
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--wr-line, #EEF1F7);
  background: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(30, 27, 46, .08);
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.wr-match__btn:hover:not(:disabled) { transform: translateY(-3px); }
.wr-match__btn:disabled { opacity: .4; cursor: default; }
.wr-match__btn--prev { width: 50px; height: 50px; color: #F59E0B; }
.wr-match__btn--pass { width: 62px; height: 62px; color: #EF4444; }
.wr-match__btn--pass:hover:not(:disabled) { background: #FEE2E2; border-color: #FECACA; }
.wr-match__btn--like { width: 68px; height: 68px; color: #10B981; }
.wr-match__btn--like:hover:not(:disabled) { background: #ECFDF3; border-color: #BBF7D0; }

.wr-match__counter { text-align: center; margin-top: 14px; font-size: 13px; color: var(--wr-muted-2, #9CA3AF); }
.wr-match__counter span { font-weight: 800; color: var(--wr-ink, #1E1B2E); }

/* ── Écran de fin + chargement ── */
.wr-match__end, .wr-match__loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px;
  background: #fff; border: 1px solid var(--wr-line, #EEF1F7); border-radius: 22px;
  z-index: 200;
}
.wr-match__end[hidden], .wr-match__loading[hidden] { display: none; }
.wr-match__loading { gap: 14px; color: var(--wr-muted, #6B7280); font-size: 14px; font-weight: 600; }
.wr-match__spin {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--wr-violet-soft, #EDE6F8); border-top-color: var(--wr-violet, #8A63C1);
  animation: wrMatchSpin .8s linear infinite;
}
@keyframes wrMatchSpin { to { transform: rotate(360deg); } }

.wr-match-empty__icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 18px;
  background: var(--wr-violet-softer, #F3EEFB); color: var(--wr-violet, #8A63C1);
}
.wr-match-empty__icon--done { background: #ECFDF3; color: #10B981; }
.wr-match-empty__title { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--wr-ink, #1E1B2E); }
.wr-match-empty__text { margin: 0; font-size: 14px; color: var(--wr-muted, #6B7280); max-width: 320px; }

/* ── Drawer de filtres ── */
.wr-match-filters { position: fixed; inset: 0; z-index: 300; }
.wr-match-filters__backdrop { position: absolute; inset: 0; background: rgba(30, 27, 46, .45); }
.wr-match-filters__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 90vw;
  background: #fff; box-shadow: -12px 0 40px rgba(30, 27, 46, .18);
  display: flex; flex-direction: column;
  animation: wrDrawerIn .2s ease;
}
@keyframes wrDrawerIn { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.wr-match-filters__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--wr-line, #EEF1F7);
}
.wr-match-filters__head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--wr-ink, #1E1B2E); }
.wr-match-filters__x {
  width: 34px; height: 34px; border-radius: 9px; border: none; background: #F1F3F7;
  display: grid; place-items: center; cursor: pointer; color: var(--wr-muted, #6B7280);
}
.wr-match-filters__x:hover { background: #E9EDF3; }
.wr-match-filters__body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.wr-match-filters__body .wr-field { display: flex; flex-direction: column; gap: 6px; }
.wr-match-filters__foot {
  display: flex; gap: 10px; padding: 18px 22px; border-top: 1px solid var(--wr-line, #EEF1F7);
}
.wr-match-filters__foot .wr-btn { flex: 1; }

@media (max-width: 520px) {
  .wr-match__stage { height: 520px; }
  .wr-mcard__title { font-size: 21px; }
}
