/* ══════════════════════════════════════════════
   RSA Rencontre — Design System v2 "Aurora"
   Dark glassmorphism · gradients animés · Poppins
   ══════════════════════════════════════════════ */

@font-face {
  font-family: 'Poppins';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/poppins-800.woff2') format('woff2');
}

:root {
  --coral: #FF6B5B;
  --magenta: #FF3CAC;
  --violet: #8B5CF6;
  --cyan: #22D3EE;
  --yellow: #FFC93C;
  --brand-grad: linear-gradient(135deg, #FF6B5B 0%, #FF3CAC 50%, #8B5CF6 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(255,107,91,.16), rgba(255,60,172,.14), rgba(139,92,246,.16));
  --bg: #0D0B14;
  --bg-2: #151020;
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.09);
  --ink: #F4F1FA;
  --muted: #A79FBC;
  --radius: 22px;
  --glass-blur: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── Aurora : halos lumineux animés en fond ── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}
body::before {
  width: 60vmax; height: 60vmax;
  background: radial-gradient(circle, var(--magenta), transparent 65%);
  top: -25vmax; right: -20vmax;
  animation: drift1 26s ease-in-out infinite alternate;
}
body::after {
  width: 55vmax; height: 55vmax;
  background: radial-gradient(circle, var(--violet), transparent 65%);
  bottom: -22vmax; left: -18vmax;
  animation: drift2 32s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-8vmax, 6vmax) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(7vmax, -6vmax) scale(0.95); }
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.logo .heart {
  width: 38px; height: 38px;
  background: var(--brand-grad);
  background-size: 180% 180%;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 18px rgba(255, 60, 172, 0.35);
  animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.badge-free {
  background: var(--brand-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 14px rgba(255, 60, 172, 0.3);
}

/* ── Main ── */
main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Cartes glass ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  transition: transform .18s ease, border-color .18s ease;
}
a.card:hover, a.card:active { transform: translateY(-2px); border-color: rgba(255, 107, 91, 0.45); }

/* Cartes d'action (accueil) */
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.action-card .ico-wrap {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--brand-grad-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.action-card b { font-size: 1.02rem; }
.action-card p { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.action-card .chev { color: var(--muted); font-size: 1.3rem; }

/* ── Formulaires ── */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.form .hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="date"],
.form input[type="number"],
.form select,
.form textarea,
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.form textarea { resize: vertical; min-height: 90px; }
.form input:focus, .form select:focus, .form textarea:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 60, 172, 0.18);
}
.form input[type="date"] { color-scheme: dark; }
.form input[type="number"] { width: 84px; }

.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); }
.form .check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--magenta); }
.form .check a { color: var(--coral); font-weight: 600; }

/* ── Boutons ── */
.btn {
  width: 100%;
  border: none;
  background: var(--brand-grad);
  background-size: 200% 200%;
  animation: gradShift 7s ease infinite;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  padding: 15px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow .2s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 22px rgba(255, 60, 172, 0.3);
}
.btn:active { transform: scale(0.97); }
.btn.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  box-shadow: none;
  animation: none;
}
.btn:disabled { opacity: 0.55; }
.btn.danger { background: linear-gradient(135deg, #E5484D, #B3261E); box-shadow: 0 6px 22px rgba(229, 72, 77, 0.25); animation: none; }

/* ── Alertes ── */
.alert {
  border-radius: 15px;
  padding: 13px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert a { color: inherit; font-weight: 700; }
.alert-error   { background: rgba(229, 72, 77, 0.14);  color: #FF8A8F; border-color: rgba(229, 72, 77, 0.3); }
.alert-success { background: rgba(52, 199, 123, 0.13); color: #6EE7A0; border-color: rgba(52, 199, 123, 0.3); }
.alert-info    { background: rgba(255, 201, 60, 0.12); color: #FFD876; border-color: rgba(255, 201, 60, 0.3); }

/* ── Divers ── */
.center { text-align: center; }
.page-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 0.94rem; line-height: 1.55; margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.grad-text {
  background: var(--brand-grad);
  background-size: 200% 200%;
  animation: gradShift 6s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Nav bas mobile ── */
.nav {
  position: sticky;
  bottom: 0;
  background: rgba(13, 11, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  display: flex;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}
.nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 4px 0;
  border-radius: 12px;
  transition: color .15s;
}
.nav a .ico { display: block; font-size: 1.3rem; margin-bottom: 1px; }
.nav a.active {
  color: #fff;
}
.nav a.active .ico {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Carte de swipe ── */
.swipe-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 3/4.2;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform .25s ease, opacity .25s ease;
}
.swipe-card.leaving-left  { transform: translateX(-130%) rotate(-14deg); opacity: 0; }
.swipe-card.leaving-right { transform: translateX(130%) rotate(14deg);  opacity: 0; }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swipe-card .info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(10, 8, 16, 0.92));
  color: #fff;
  padding: 34px 18px 16px;
}
.swipe-card .info b { font-size: 1.35rem; letter-spacing: -0.02em; }
.swipe-card .info p { font-size: 0.86rem; opacity: 0.92; margin-top: 4px; line-height: 1.45; }
.chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.swipe-actions {
  display: flex;
  gap: 26px;
  justify-content: center;
  padding: 18px 0 8px;
}
.swipe-actions button {
  width: 66px; height: 66px;
  border-radius: 50%;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow .2s;
}
.swipe-actions button:active { transform: scale(0.86); }
.btn-pass {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
}
.btn-like {
  background: var(--brand-grad);
  background-size: 200% 200%;
  animation: gradShift 5s ease infinite;
  color: #fff;
  box-shadow: 0 8px 26px rgba(255, 60, 172, 0.45);
}

/* ── Bulles de chat ── */
.chat-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.bubble.me {
  align-self: flex-end;
  background: var(--brand-grad);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 3px 14px rgba(255, 60, 172, 0.25);
}
.bubble.them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 5px;
}
.bubble .time { display: block; font-size: 0.64rem; opacity: 0.65; margin-top: 3px; }

/* Composer chat */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(13, 11, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}
.composer {
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 11, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
}
.composer input {
  flex: 1;
  padding: 13px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}
.composer input:focus { outline: none; border-color: var(--magenta); }
.composer button {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--brand-grad);
  background-size: 200% 200%;
  animation: gradShift 5s ease infinite;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255, 60, 172, 0.35);
}

/* Badges photos */
.photo-cell {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
}
.photo-cell.main { border-color: var(--magenta); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-pending, .badge-main, .badge-rejected {
  position: absolute;
  top: 5px; left: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}
.badge-pending { background: rgba(255, 201, 60, 0.18); color: #FFD876; backdrop-filter: blur(6px); }
.badge-main    { background: var(--brand-grad); color: #fff; }
.photo-rejected {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 20, 0.78);
  color: #FF8A8F;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6px;
  backdrop-filter: blur(3px);
}
.photo-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; }
.photo-actions button {
  width: 100%;
  border: none;
  background: rgba(13, 11, 20, 0.66);
  backdrop-filter: blur(8px);
  color: var(--ink);
  padding: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}
.photo-add {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(255, 107, 91, 0.4);
  border-radius: 14px;
  cursor: pointer;
  color: var(--coral);
  font-size: 1.7rem;
  background: var(--brand-grad-soft);
}

/* ── Toast ── */
#toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(21, 16, 32, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
  z-index: 50;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
#toast.love {
  background: var(--brand-grad);
  background-size: 200% 200%;
  animation: gradShift 3s ease infinite;
  box-shadow: 0 8px 28px rgba(255, 60, 172, 0.5);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}
footer a { color: var(--coral); text-decoration: none; font-weight: 600; }

/* ── Listes (matchs, membres) ── */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  text-decoration: none;
  color: var(--ink);
  border-radius: 16px;
  transition: background .15s;
}
.list-row:hover, .list-row:active { background: rgba(255, 255, 255, 0.05); }
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background: var(--brand-grad);
}
.list-sep { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 0 10px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Badge profil vérifié ── */
.vbadge {
  display: inline-block;
  margin-left: 6px;
  background: linear-gradient(135deg, #FFD76A, #FF9E3D);
  color: #3B2400;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 2px;
  letter-spacing: 0.02em;
}
