/* =========================================================
   Rempla.re — Design system
   Palette bleu / vert médical, contours doux, mobile-first.
   ========================================================= */

:root {
  --bg: #F4F8FC;
  --surface: #FFFFFF;
  --surface-soft: #EDF2F8;
  --border: #E2E8F1;
  --border-strong: #CBD3E0;
  --text: #1A1F2E;
  --text-muted: #5C6577;
  --text-soft: #8C95A5;

  --primary: #3D6FA9;
  --primary-hover: #2C588C;
  --primary-soft: #E5EEF8;
  --primary-deep: #1F3F6E;

  --accent: #C8553D;
  --accent-soft: #FAEAE3;
  --warm: #A77B3A;
  --warm-soft: #F7EDD9;

  --match: #2D8F66;
  --match-hover: #1F7050;
  --match-soft: #DDF1E7;

  --score-good: #2D8F66;
  --score-mid: #C99036;
  --score-low: #B0533F;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(40, 70, 120, 0.05);
  --shadow: 0 8px 24px rgba(40, 70, 120, 0.08);
  --shadow-lg: 0 18px 48px rgba(40, 70, 120, 0.14);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-8: 3rem;
  --s-10: 4rem;
  --s-12: 6rem;

  --transition: 160ms ease;
  --container: 1100px;
  --container-narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea, button { font: inherit; }

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
.container.narrow { max-width: var(--container-narrow); }
@media (min-width: 768px) {
  .container { padding: 0 var(--s-6); }
}

/* =========================================================
   Header
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 248, 252, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--s-2);
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: var(--s-2); }
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
@media (max-width: 640px) {
  .nav-link[data-mobile-hidden] { display: none; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  user-select: none;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.9rem; border-radius: var(--radius-sm); min-height: 38px; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.02rem; min-height: 52px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 14px rgba(61, 111, 169, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 18px rgba(61, 111, 169, 0.32); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-soft); border-color: var(--text-muted); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover { background: var(--surface-soft); color: var(--text); }
.btn-block { width: 100%; }
.btn-match {
  background: var(--match);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 143, 102, 0.30);
}
.btn-match:hover { background: var(--match-hover); }

.link {
  color: var(--primary);
  font-weight: 500;
}
.link:hover { text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: var(--s-8) 0 var(--s-5); }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--s-3);
}
.hero h1 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
  font-weight: 700;
}
.hero .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 var(--s-5);
  max-width: 560px;
}
.home-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--match-soft);
  border: 1px solid rgba(45, 143, 102, 0.3);
  color: var(--match);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-4);
  font-size: 0.92rem;
  font-weight: 500;
}
.home-status .link { color: var(--match); }

/* Choice cards (onboarding) */
.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin: var(--s-6) 0;
}
@media (min-width: 720px) {
  .role-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
}
.role-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.role-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.role-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.role-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.role-card .role-cta {
  margin-top: var(--s-3);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--primary);
  font-weight: 600;
}
.role-card .role-cta::after {
  content: "→";
  transition: transform var(--transition);
}
.role-card:hover .role-cta::after { transform: translateX(4px); }

/* How it works */
.how { padding: var(--s-6) 0 var(--s-10); }
.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 768px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
}
.how-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.how-col-step {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--s-2);
}
.how-col h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 var(--s-2);
}
.how-col p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-5) 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: var(--s-8);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
}

/* =========================================================
   Page heading
   ========================================================= */
.page-head { padding: var(--s-6) 0 var(--s-4); }
.page-head h1 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-2);
}
.page-head .lead {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.02rem;
}

/* =========================================================
   Form fields
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field > span,
.field > label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.field input,
.field select,
.field textarea {
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  min-height: 46px;
}
.field textarea { resize: vertical; min-height: 110px; font-family: inherit; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--text-muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field small { font-size: 0.8rem; color: var(--text-soft); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%235C6577' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
}

/* Form sections */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .form-card { padding: var(--s-6); }
}
.form-card fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.form-card legend {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--s-1);
  padding: 0;
}
.form-card .legend-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -2px 0 var(--s-2);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
}

/* Checkbox/radio chips group (multi-select) */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.chip-check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.92rem;
  background: var(--surface);
  transition: all var(--transition);
  min-height: 40px;
  user-select: none;
}
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check:hover { border-color: var(--text-muted); }
.chip-check:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(61, 111, 169, 0.2);
}

/* Radio cards (type) */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 640px) {
  .radio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .radio-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.radio-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding: var(--s-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: var(--surface);
  min-height: 80px;
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:hover { border-color: var(--text-muted); }
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.radio-title { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.radio-desc { font-size: 0.85rem; color: var(--text-muted); }

.radio-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.92rem;
  background: var(--surface);
  transition: all var(--transition);
  min-height: 40px;
  user-select: none;
}
.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.radio-pill:hover { border-color: var(--text-muted); }
.radio-pill:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.form-submit { display: flex; flex-direction: column; gap: var(--s-3); }
.form-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  text-align: center;
  margin: 0;
}
.form-actions {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
}
.hp-field { display: none !important; }

/* =========================================================
   Match — pile de cartes
   ========================================================= */
.match-page {
  padding: var(--s-3) 0 var(--s-12);
  min-height: calc(100vh - 64px);
}
.match-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  padding: var(--s-3) 0;
}
.match-head h1 {
  font-size: 1.2rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.match-head .card-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-stack {
  position: relative;
  height: 540px;
  max-width: 420px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .card-stack { height: 580px; }
}
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  transition: transform 220ms ease, opacity 220ms ease;
  overflow: hidden;
}
.swipe-card:active { cursor: grabbing; }

.swipe-card-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.swipe-card-id { flex: 1; min-width: 0; }
.swipe-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}
.swipe-card-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.score {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.2rem;
  border: 3px solid;
  position: relative;
}
.score-num { line-height: 1; }
.score-pct { font-size: 0.7rem; opacity: 0.7; margin-left: 1px; }
.score.score-good { color: var(--score-good); border-color: var(--score-good); background: var(--match-soft); }
.score.score-mid { color: var(--score-mid); border-color: var(--score-mid); background: #FAF1E1; }
.score.score-low { color: var(--score-low); border-color: var(--score-low); background: var(--accent-soft); }

.swipe-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--text-muted);
  white-space: nowrap;
}
.pill-urgent { background: var(--accent-soft); color: var(--accent); }
.pill-known { background: var(--match-soft); color: var(--match); }
.pill-highlight { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pill-sector { background: var(--primary-soft); color: var(--primary); }
.pill-type { background: var(--primary-soft); color: var(--primary); }
.pill-type.pill-ponctuel { background: #E5EEF8; color: var(--primary); }
.pill-type.pill-regulier { background: var(--match-soft); color: var(--match); }
.pill-type.pill-succession { background: var(--warm-soft); color: var(--warm); }

.swipe-meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: 0.93rem;
}
.swipe-row {
  display: flex;
  gap: var(--s-3);
  border-top: 1px solid var(--border);
  padding-top: var(--s-2);
}
.swipe-row:first-child { border-top: 0; padding-top: 0; }
.row-label {
  flex-shrink: 0;
  width: 92px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.85rem;
}

.swipe-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.swipe-reasons {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.reasons-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 var(--s-2);
}
.reasons-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.6rem;
  font-size: 0.85rem;
}
.reasons-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--text);
}
.reason-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}
.reason-ok .reason-icon { background: var(--match-soft); color: var(--match); }
.reason-warn .reason-icon { background: #FAF1E1; color: var(--score-mid); }
.reason-no .reason-icon { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 480px) {
  .reasons-list { grid-template-columns: 1fr; }
}

/* Verdict overlay sur swipe */
.swipe-verdict {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.verdict {
  position: absolute;
  top: 18px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 2px solid;
  opacity: 0;
  transition: opacity 100ms;
}
.verdict-yes {
  right: 18px;
  color: var(--match);
  border-color: var(--match);
  transform: rotate(8deg);
}
.verdict-no {
  left: 18px;
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(-8deg);
}
.swipe-verdict.show-yes .verdict-yes { opacity: 1; }
.swipe-verdict.show-no .verdict-no { opacity: 1; }

/* Action buttons */
.match-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.action-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.action-btn:active { transform: translateY(0); }
.action-btn-pass { color: var(--accent); border-color: rgba(200, 85, 61, 0.3); }
.action-btn-pass:hover { background: var(--accent-soft); }
.action-btn-favorite { color: var(--score-mid); border-color: rgba(201, 144, 54, 0.3); }
.action-btn-favorite:hover { background: #FAF1E1; }
.action-btn-interested {
  color: #fff; background: var(--match); border-color: var(--match);
  width: 76px; height: 76px;
  box-shadow: 0 6px 20px rgba(45, 143, 102, 0.30);
}
.action-btn-interested:hover { background: var(--match-hover); border-color: var(--match-hover); }

.match-footer {
  display: flex;
  justify-content: center;
  margin-top: var(--s-4);
}

/* No profile / empty states */
.empty-block {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--s-8) var(--s-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  max-width: 480px;
  margin: var(--s-5) auto;
}
.empty-block h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.empty-block p { margin: 0; color: var(--text-muted); }
.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   Match overlay (it's a match)
   ========================================================= */
.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 60, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--s-4);
  opacity: 0;
  transition: opacity 250ms ease;
}
.match-overlay.is-visible { opacity: 1; }
.match-overlay-inner {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--s-6) var(--s-5);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 250ms ease;
}
.match-overlay.is-visible .match-overlay-inner { transform: scale(1); }
.match-overlay-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--match-soft);
  color: var(--match);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-4);
  font-size: 2rem;
}
.overlay-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 var(--s-2);
  letter-spacing: -0.01em;
}
.overlay-subtitle {
  color: var(--text-muted);
  margin: 0 0 var(--s-5);
  font-size: 0.98rem;
}
.overlay-card {
  background: var(--match-soft);
  border-radius: var(--radius);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.overlay-card-title { font-weight: 700; margin: 0; }
.overlay-card-sub { color: var(--match); margin: 4px 0 0; font-size: 0.92rem; }
.overlay-actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) {
  .overlay-actions { flex-direction: column; }
  .overlay-actions .btn { width: 100%; }
}

/* =========================================================
   Mes matchs
   ========================================================= */
.tabs {
  display: flex;
  gap: var(--s-1);
  background: var(--surface-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: var(--s-4);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.92rem;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tab .badge-count {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

.matches-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .matches-list { grid-template-columns: repeat(2, 1fr); }
}

.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  box-shadow: var(--shadow-sm);
}
.match-card.is-matched {
  border-color: rgba(45, 143, 102, 0.35);
  background: linear-gradient(180deg, var(--match-soft) 0%, var(--surface) 30%);
}
.match-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
}
.match-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.match-card-sub { font-size: 0.92rem; color: var(--text-muted); margin: 0; }
.match-card-detail { font-size: 0.92rem; color: var(--text); margin: 0; }
.match-card-note { font-size: 0.85rem; color: var(--text-soft); margin: var(--s-1) 0 0; font-style: italic; }
.status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.status-match { background: var(--match-soft); color: var(--match); }
.status-pending { background: var(--primary-soft); color: var(--primary); }
.status-fav { background: #FAF1E1; color: var(--score-mid); }
.status-passed { background: var(--surface-soft); color: var(--text-soft); }
.match-actions-row {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-2);
  flex-wrap: wrap;
}
.match-contact-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: var(--s-1) 0 0;
}
[data-disabled] { pointer-events: none; opacity: 0.55; }

/* =========================================================
   Annonces (vue browse simple)
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.annonce {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  box-shadow: var(--shadow-sm);
}
.annonce-top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.annonce-title { font-size: 1.05rem; font-weight: 600; margin: 0; }
.annonce-meta { display: flex; flex-direction: column; gap: 2px; font-size: 0.92rem; color: var(--text-muted); }

/* =========================================================
   Merci
   ========================================================= */
.merci { padding: var(--s-10) 0; text-align: center; }
.merci h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.25rem);
  margin: 0 0 var(--s-3);
}
.merci p { color: var(--text-muted); margin: 0 0 var(--s-5); }
.merci-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--match-soft);
  color: var(--match);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-5);
}
.merci-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
}

/* Sticky form submit on mobile */
@media (max-width: 768px) {
  .form-card.has-sticky {
    padding-bottom: calc(86px + var(--s-3));
  }
  .form-submit-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
    background: rgba(244, 248, 252, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .form-submit-sticky .btn { width: 100%; }
  .form-submit-inline { display: none; }
}
@media (min-width: 769px) {
  .form-submit-sticky { display: none; }
}

/* =========================================================
   Score pill (Compatible / Très compatible / Peu compatible)
   ========================================================= */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid;
  align-self: flex-start;
}
.score-pill.score-good { background: var(--match-soft); color: var(--match); border-color: rgba(45,143,102,0.3); }
.score-pill.score-mid  { background: var(--primary-soft); color: var(--primary); border-color: rgba(61,111,169,0.3); }
.score-pill.score-low  { background: var(--accent-soft); color: var(--accent); border-color: rgba(200,85,61,0.3); }

/* =========================================================
   Certification + RGPD
   ========================================================= */
.cert-fieldset {
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
}
.cert-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  cursor: pointer;
  padding: var(--s-2) 0;
}
.cert-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--primary);
  margin-top: 2px;
}
.cert-row span {
  display: block;
  line-height: 1.55;
  color: var(--text);
  font-size: 0.95rem;
}
.cert-row span a { color: var(--primary); }
.cert-row strong {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 2px;
}
.cert-row small {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* =========================================================
   Pages légales (confidentialité, conditions, RGPD)
   ========================================================= */
.legal { padding-bottom: var(--s-10); }
.legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: var(--s-6) 0 var(--s-2);
  color: var(--text);
  letter-spacing: -0.01em;
}
.legal h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: var(--s-3) 0 var(--s-2);
}
.legal p,
.legal li {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text);
}
.legal ul {
  padding-left: 1.25rem;
  margin: var(--s-2) 0 var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

/* Danger zone (suppression de compte) */
.danger-zone {
  margin-top: var(--s-6);
  border: 1px solid rgba(200, 85, 61, 0.30);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
}
.danger-zone h3 { color: var(--accent); margin: 0; }
.danger-zone p { margin: 0; color: var(--text); }
.btn-danger {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  min-height: 44px;
}
.btn-danger:hover { background: #A4422F; }

/* Empty / warn states */
.warn-block {
  border-color: rgba(201, 144, 54, 0.4);
  background: linear-gradient(180deg, #FAF1E1 0%, var(--surface) 30%);
}
.empty-icon-warn { background: #FAF1E1; color: var(--score-mid); }
.empty-block .incomplete-reasons {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  text-align: left;
}

.footer-links { font-size: 0.9rem; }
.empty-inline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  padding: var(--s-2) 0;
}

/* =========================================================
   Mode tabs (Match intelligent / Explorer) — match.html
   ========================================================= */
.mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin: var(--s-3) 0 var(--s-4);
}
.mode-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: all var(--transition);
  min-height: 40px;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   Explorer — profile cards
   ========================================================= */
.explorer-tabs { margin-bottom: var(--s-4); }
.explorer-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .explorer-list { grid-template-columns: repeat(2, 1fr); }
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.profile-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-2);
}
.profile-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.profile-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.profile-card-meta p { margin: 0; line-height: 1.45; }
.profile-card-actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
}
.profile-desc {
  display: none;
  font-size: 0.92rem;
  color: var(--text);
  margin: 0;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.profile-card.is-expanded .profile-desc { display: block; }

.btn.is-active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

.privacy-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--s-5);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-soft);
  border-radius: var(--radius);
}

/* =========================================================
   Toast notification
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   HERO enrichi (accueil)
   ========================================================= */
.hero-big {
  position: relative;
  overflow: hidden;
  padding: var(--s-10) 0 var(--s-8);
  background:
    radial-gradient(ellipse at top right, rgba(61, 111, 169, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(45, 143, 102, 0.06), transparent 50%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
.hero-blob-a {
  top: -120px;
  right: -120px;
  width: 460px;
  height: 460px;
  background: var(--primary-soft);
  animation: floatA 14s ease-in-out infinite;
}
.hero-blob-b {
  bottom: -160px;
  left: -100px;
  width: 380px;
  height: 380px;
  background: var(--match-soft);
  animation: floatB 18s ease-in-out infinite;
}
@keyframes floatA {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-40px, 30px) scale(1.05); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px, -20px) scale(1.08); }
}
.hero-big > .container { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-4);
  font-weight: 800;
}
.hero-accent {
  background: linear-gradient(120deg, var(--primary) 0%, var(--match) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead-big {
  font-size: 1.15rem;
  max-width: 640px;
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-8);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   POURQUOI REMPLAMED
   ========================================================= */
.why { padding: var(--s-10) 0; }
.section-head-center {
  text-align: center;
  margin-bottom: var(--s-8);
}
.section-head-center h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 var(--s-2);
}
.section-head-center .lead {
  margin: 0 auto;
  max-width: 540px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .why-grid { grid-template-columns: repeat(4, 1fr); }
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.why-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.why-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: var(--s-2);
}
.why-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.why-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* =========================================================
   APERÇU D'OFFRES
   ========================================================= */
.live-preview { padding: var(--s-6) 0 var(--s-10); }

/* =========================================================
   COMMENT ÇA MARCHE — version riche
   ========================================================= */
.how-col-rich {
  position: relative;
  padding-top: var(--s-8);
}
.how-step {
  position: absolute;
  top: -22px;
  left: var(--s-5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(61, 111, 169, 0.30);
}
.how-col-rich h3 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 var(--s-2);
}
.how-col-rich p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

/* =========================================================
   CTA FINAL
   ========================================================= */
.cta-final {
  margin: var(--s-10) auto;
  padding: var(--s-10) var(--s-5);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: calc(var(--container-narrow) + var(--s-8));
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  filter: blur(40px);
}
.cta-final h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
  position: relative;
}
.cta-final p {
  margin: 0 0 var(--s-5);
  opacity: 0.92;
  font-size: 1.02rem;
  position: relative;
}
.cta-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.cta-final .btn-secondary {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.30);
}
.cta-final .btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}
@media (max-width: 480px) {
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .cta-final { border-radius: var(--radius-lg); padding: var(--s-8) var(--s-5); }
}

/* =========================================================
   Compat help — légende des niveaux de compatibilité
   ========================================================= */
.compat-help {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin: 0 0 var(--s-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.compat-help[open] { border-color: var(--primary-soft); }
.compat-help summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
  user-select: none;
}
.compat-help summary::-webkit-details-marker { display: none; }
.compat-help-chev {
  font-size: 1.4rem;
  color: var(--text-soft);
  transition: transform var(--transition);
}
.compat-help[open] .compat-help-chev { transform: rotate(90deg); color: var(--primary); }
.compat-help-body {
  padding: 0 var(--s-4) var(--s-4);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.compat-help-body p {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin: var(--s-3) 0 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}
.compat-help-body .score-pill { flex-shrink: 0; min-width: 120px; justify-content: center; }
.compat-help-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: var(--s-2) var(--s-3);
  margin-top: var(--s-2);
}
.compat-help-note em { font-weight: 600; font-style: normal; color: var(--text); }

/* =========================================================
   Mini-carte de La Réunion (sur cartes cabinet)
   ========================================================= */
.mini-map {
  position: relative;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.mini-map svg {
  width: 88px;
  height: 70px;
  flex-shrink: 0;
}
.mini-map-island {
  fill: #E5EEF8;
  stroke: var(--primary);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.mini-map-relief {
  fill: rgba(167, 123, 58, 0.18);
  stroke: rgba(167, 123, 58, 0.30);
  stroke-width: 0.5;
  stroke-dasharray: 1.5 1;
}
.mini-map-dot {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 1.2;
}
.mini-map-dot-inner {
  fill: #fff;
}
.mini-map-dot-pulse {
  fill: var(--accent);
  opacity: 0.45;
  transform-origin: center;
  transform-box: fill-box;
  animation: pulseDot 2.4s ease-out infinite;
}
@keyframes pulseDot {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(3);   opacity: 0;    }
  100% { transform: scale(3);   opacity: 0;    }
}
.mini-map-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   Status pills (annonces)
   ========================================================= */
.status-pill { /* base déjà existante mais on étend */ }
.status-active { background: var(--match-soft); color: var(--match); }
.status-discussing { background: var(--primary-soft); color: var(--primary); }
.status-filled { background: var(--surface-soft); color: var(--text-muted); }

/* =========================================================
   Listings list (Mes annonces)
   ========================================================= */
.listings-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .listings-list { grid-template-columns: repeat(2, 1fr); }
}
.listing-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  box-shadow: var(--shadow-sm);
}
.listing-row-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.listing-type {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.listing-row-meta { font-size: 0.92rem; color: var(--text-muted); }
.listing-row-meta p { margin: 2px 0; }
/* Filtres sur la page Match (remplaçant) */
.match-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-3);
  margin-bottom: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.match-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.match-filter-field {
  flex: 1 1 140px;
  min-width: 0;
}
.match-filter-field span {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.match-filters-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-right: var(--s-2);
}

.listing-row-likes {
  margin-top: var(--s-3);
  padding: var(--s-3);
  background: var(--accent-soft, #eff6ff);
  border: 1px solid rgba(56, 116, 203, 0.18);
  border-radius: var(--radius);
}
.listing-row-likes-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary, #2563eb);
  margin: 0 0 var(--s-2);
}
.listing-row-likes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.listing-row-likes-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  background: var(--surface);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm, 8px);
}
.like-row-info { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.like-row-info .muted { color: var(--muted); font-size: 0.85rem; }

.match-confirmed-row { background: #ecfdf5 !important; border: 1px solid #a7f3d0; }
.match-confirmed-row .match-check { color: #047857; font-weight: 700; margin-right: 4px; }
.match-coords { font-size: 0.92rem; margin-top: 4px; flex-basis: 100%; }
.match-coords .link { color: var(--primary); }

.match-coords-block {
  margin-top: var(--s-3);
  padding: var(--s-3);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
}
.match-coords-title {
  margin: 0 0 4px;
  font-weight: 600;
  color: #047857;
  font-size: 0.92rem;
}
.match-coords-line { margin: 0; font-size: 0.95rem; }

.listing-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.listing-row-actions .status-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>") no-repeat right 10px center;
  border-radius: var(--radius-sm, 8px);
  padding: 6px 28px 6px 10px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  min-height: 34px;
}
.listing-row-actions .status-select:hover { border-color: var(--text-muted); }
.listing-row-actions .btn-link-danger {
  background: none;
  border: 0;
  padding: 6px 4px;
  margin-left: auto;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
}
.listing-row-actions .btn-link-danger:hover { color: var(--accent); text-decoration: underline; }
.btn-ghost.danger { color: var(--accent); }
.btn-ghost.danger:hover { background: var(--accent-soft); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* =========================================================
   Swipe hint
   ========================================================= */
.swipe-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  margin: 0 0 var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  transition: opacity 1s ease;
}
.swipe-hint.is-fading { opacity: 0; }
.swipe-hint-side { font-weight: 600; }
.swipe-hint-left { color: var(--accent); }
.swipe-hint-right { color: var(--match); }
.swipe-hint-mid { color: var(--text-muted); flex: 1; text-align: center; }
@media (max-width: 480px) {
  .swipe-hint { font-size: 0.82rem; padding: var(--s-2) var(--s-3); }
  .swipe-hint-mid { font-size: 0.78rem; }
}

/* =========================================================
   Hero image (placeholder stylisé en attendant photo locale)
   ========================================================= */
.hero-visual {
  position: relative;
  margin-top: var(--s-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(61, 111, 169, 0.20), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(45, 143, 102, 0.20), transparent 60%),
    linear-gradient(135deg, #DDE7F4 0%, #E5F0EA 100%);
  border: 1px solid var(--border);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.6), transparent 30%),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.4), transparent 25%);
}
.hero-visual-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--s-5);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual-fallback::after {
  content: "Posez votre photo locale dans assets/hero.jpg";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 640px) {
  .hero-visual { aspect-ratio: 4 / 3; margin-top: var(--s-5); }
}

/* =========================================================
   Chat / messagerie interne
   ========================================================= */
.chat-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
.chat-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4) var(--s-3);
  padding-top: calc(var(--s-3) + env(safe-area-inset-top));
  background: rgba(244, 248, 252, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.chat-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition);
}
.chat-back:hover { background: var(--surface-soft); color: var(--text); }
.chat-header-id { flex: 1; min-width: 0; }
.chat-header-id h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-coords {
  background: var(--match-soft);
  border-bottom: 1px solid rgba(45, 143, 102, 0.25);
  padding: var(--s-3) 0;
  font-size: 0.92rem;
}
.chat-coords p { margin: 4px 0; color: var(--text); }
.chat-main {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-4) 0 calc(var(--s-8) + 80px);
}
.chat-stream {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.chat-empty {
  text-align: center;
  padding: var(--s-8) var(--s-4);
  color: var(--text-muted);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 80%;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-lg);
  font-size: 0.94rem;
  line-height: 1.45;
  word-wrap: break-word;
  position: relative;
}
.chat-bubble-me {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble-them {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-text { white-space: pre-wrap; }
.chat-ts {
  font-size: 0.7rem;
  opacity: 0.7;
  align-self: flex-end;
}
.chat-bubble-them .chat-ts { color: var(--text-soft); }

.chat-composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(244, 248, 252, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.chat-composer-inner {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
}
#chat-input {
  flex: 1;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  min-height: 44px;
}
#chat-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  transition: background var(--transition);
  flex-shrink: 0;
}
.chat-send:hover { background: var(--primary-hover); }
.chat-send:active { transform: scale(0.96); }

/* =========================================================
   Calendar range picker (Litepicker overrides)
   ========================================================= */
.litepicker {
  font-family: 'Inter', -apple-system, sans-serif !important;
}
.litepicker .container__main { border-radius: var(--radius-lg) !important; }
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date,
.litepicker .container__days .day-item.is-start-date.is-end-date {
  background-color: var(--primary) !important;
  color: #fff !important;
  border-radius: 50% !important;
}
.litepicker .container__days .day-item.is-in-range {
  background-color: var(--primary-soft) !important;
  color: var(--primary) !important;
}
.litepicker .container__days .day-item:hover {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.range-picker-wrapper { position: relative; }
.range-picker-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235C6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'></rect><line x1='16' y1='2' x2='16' y2='6'></line><line x1='8' y1='2' x2='8' y2='6'></line><line x1='3' y1='10' x2='21' y2='10'></line></svg>");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
}
.range-summary {
  margin-top: var(--s-2);
  font-size: 0.88rem;
  color: var(--match);
  font-weight: 500;
  display: none;
}
.range-summary.is-shown { display: block; }

/* =========================================================
   User pill dans le header (état connecté)
   ========================================================= */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-left: var(--s-2);
}
.user-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-pill-email {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill-logout {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.user-pill-logout:hover { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 480px) {
  .user-pill-email { display: none; }
}

/* Mode tabs auth (Mot de passe / Lien magique) */
.auth-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin: 0 0 var(--s-4);
}
.auth-mode-tab {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.auth-mode-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.auth-pw-actions { display: flex; flex-direction: column; gap: var(--s-2); }
.role-pick { all: revert; }

/* =========================================================
   Page Connexion / Accueil — décor d'ambiance Réunion
   ========================================================= */
.auth-body {
  position: relative;
  overflow-x: hidden;
}
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.auth-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.auth-bg-blob-a {
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #C4DEEC 0%, transparent 70%);
  animation: floatSlowA 18s ease-in-out infinite;
}
.auth-bg-blob-b {
  bottom: -160px;
  left: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #BFE3D2 0%, transparent 70%);
  animation: floatSlowB 22s ease-in-out infinite;
}
.auth-bg-blob-c {
  top: 35%;
  left: 50%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #F4E3D7 0%, transparent 70%);
  opacity: 0.35;
  animation: floatSlowC 26s ease-in-out infinite;
}
@keyframes floatSlowA {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(-30px, 40px); }
}
@keyframes floatSlowB {
  0%, 100% { transform: translate(0,0); }
  50%      { transform: translate(40px, -30px); }
}
@keyframes floatSlowC {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-45%, -55%) scale(1.08); }
}

.auth-bg-island {
  position: absolute;
  bottom: var(--s-6);
  right: var(--s-6);
  width: 120px;
  height: 96px;
  opacity: 0.06;
}
.auth-bg-island path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.4;
  stroke-linejoin: round;
}
@media (max-width: 640px) {
  .auth-bg-island {
    bottom: var(--s-4);
    right: var(--s-4);
    width: 80px;
    height: 64px;
  }
}

.auth-eyebrow {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 var(--s-5);
  position: relative;
  z-index: 1;
}
/* Eyebrow avec pictogramme île aligné à gauche du texte */
.auth-eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: rgba(56, 116, 203, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.82rem;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  max-width: max-content;
}
.auth-eyebrow-island {
  width: 22px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary);
}

/* Bandeau de réassurance (3 puces) */
.auth-reassure {
  list-style: none;
  margin: var(--s-4) 0 var(--s-5);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  justify-content: center;
}
.auth-reassure li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted, #5C6577);
  font-weight: 500;
}
.auth-reassure svg { color: var(--primary); flex-shrink: 0; }

/* Ligne sécurité sous le formulaire */
.auth-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: var(--s-4) 0 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  line-height: 1.45;
  text-align: left;
}
.auth-secure svg { color: var(--primary); flex-shrink: 0; }

.auth-section {
  padding: var(--s-10) 0 var(--s-12);
  position: relative;
  z-index: 1;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s-8) var(--s-6);
  box-shadow: var(--shadow-sm);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.auth-card h1 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
}
.auth-card .lead {
  margin: 0 auto var(--s-5);
  max-width: 380px;
  color: var(--text-muted);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  text-align: left;
  margin-top: var(--s-4);
}
.auth-form .field input {
  font-size: 1.05rem;
  padding: 0.95rem 1.05rem;
}
.auth-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s-4);
}
@media (max-width: 480px) {
  .auth-actions { flex-direction: column; }
  .auth-actions .btn { width: 100%; }
}
.auth-help {
  text-align: center;
  margin-top: var(--s-5);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-help a { color: var(--primary); }

/* Témoin de build — affiche la version pour vérifier le déploiement */
.build-stamp {
  position: fixed;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.6);
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 9999;
  font-family: ui-monospace, SFMono-Regular, monospace;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Suppression de compte — version sobre */
.account-delete {
  margin-top: var(--s-7);
  padding: var(--s-4) 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: flex-start;
}
.account-delete p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.account-delete .btn-ghost {
  color: var(--muted);
  font-size: 0.9rem;
}
.account-delete .btn-ghost:hover {
  color: var(--text);
  text-decoration: underline;
}
