:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --primary: #ff4d6d;
  --primary-dark: #e63956;
  --accent: #7c3aed;
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --card: #1e1e33;
  --text: #f5f5fa;
  --muted: #9a9ab0;
  --border: #2e2e4a;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4, .logo { font-family: var(--font-display); }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15,15,26,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo .heart { color: var(--primary); font-size: 24px; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a, .nav button {
  padding: 8px 14px; border-radius: 10px; color: var(--text);
  background: transparent; font-weight: 500; font-size: 14px;
}
.nav a:hover, .nav button:hover { background: rgba(255,255,255,0.06); }
.nav .primary { background: var(--primary); color: #fff; }
.nav .primary:hover { background: var(--primary-dark); }
.nav .nav-account { display:inline-flex;align-items:center;gap:7px;max-width:150px;padding:5px 9px;border:1px solid rgba(255,255,255,.1);border-radius:999px;background:rgba(255,255,255,.04); }
.nav-account img { width:27px;height:27px;flex:none;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,var(--primary),var(--accent)); }
.nav-account b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px; }
@media(max-width:900px){.nav .nav-account b{display:none}.nav .nav-account{padding:5px}}

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 6px 20px rgba(255,77,109,0.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; outline: none; transition: border .15s;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card p.sub { color: var(--muted); margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-footer a { font-weight: 600; }

/* Discover / swipe */
.discover { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 24px 0; }
@media (max-width: 900px) { .discover { grid-template-columns: 1fr; } }
.swipe-area { display: flex; flex-direction: column; align-items: center; }
.card-stack { position: relative; width: 100%; max-width: 420px; height: 600px; }
.profile-card {
  position: absolute; inset: 0; border-radius: 24px; overflow: hidden;
  background: var(--card); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: transform .4s ease, opacity .4s ease;
  user-select: none;
}
.profile-card .photo {
  width: 100%; height: 70%; object-fit: cover; background: linear-gradient(135deg, #2e2e4a, #1a1a2e);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 60px;
}
.profile-card .info { padding: 18px; }
.profile-card .name { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.profile-card .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.profile-card .bio { margin-top: 10px; font-size: 14px; line-height: 1.5; }
.profile-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); font-size: 12px; }
.zodiac { color: #fbbf24; }
.score-badge { position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }

.swipe-actions { display: flex; gap: 18px; margin-top: 24px; }
.action-btn {
  width: 64px; height: 64px; border-radius: 50%; font-size: 28px;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform .15s;
}
.action-btn:hover { transform: scale(1.1); }
.action-btn.dislike { background: #fff; color: var(--danger); }
.action-btn.like { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.action-btn.super { background: #3b82f6; color: #fff; }
.action-btn.msg { background: #22c55e; color: #fff; }

/* Sidebar */
.sidebar .card { margin-bottom: 16px; }
.match-list { display: flex; flex-direction: column; gap: 10px; }
.match-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.match-item:hover { background: rgba(255,255,255,0.05); }
.match-item .avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.match-item .avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-item .name { font-weight: 600; }
.match-item .last { color: var(--muted); font-size: 12px; }

/* Chat page */
.msg-row { width: 100%; }
.msg-row.mine { justify-content: flex-end; }
.msg-row.theirs { justify-content: flex-start; }
.msg-bubble { min-width: 0; overflow-wrap: anywhere; }
.chat-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 64px); }
@media (max-width: 768px) { .chat-layout { grid-template-columns: 1fr; } }
.chat-sidebar { border-right: 1px solid var(--border); overflow-y: auto; padding: 16px; }
.chat-main { display: flex; flex-direction: column; }
.chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.msg img { max-width: 100%; border-radius: 10px; }
.msg .meta { font-size: 10px; opacity: 0.7; margin-top: 4px; }
.chat-input { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; }
.call-btns { display: flex; gap: 8px; }
.call-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text); font-size: 18px; }

/* Profile page */
.profile-page { max-width: 900px; margin: 0 auto; padding: 24px; }
.profile-hero { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
@media (max-width: 768px) { .profile-hero { grid-template-columns: 1fr; } }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid .slot { aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,0.05); overflow: hidden; display: grid; place-items: center; color: var(--muted); cursor: pointer; position: relative; }
.photo-grid .slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .slot .del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; }
.interests { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-chip { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.06); cursor: pointer; font-size: 13px; transition: all .15s; }
.interest-chip.selected { background: var(--primary); color: #fff; }
.spotify-box { padding: 16px; border-radius: 12px; background: linear-gradient(135deg, #1db954, #191414); }

/* Footer */
.footer { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer strong { color: var(--text); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--card); border-radius: var(--radius); padding: 24px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-bottom: 16px; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--border); padding: 12px 20px; border-radius: 12px; z-index: 200; box-shadow: 0 10px 40px rgba(0,0,0,0.5); display: none; }
.toast.show { display: block; }

/* Misc */
.empty { text-align: center; padding: 40px; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.1); }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); display: inline-block; }

/* RGPD banner */
.rgpd-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg2); border-top: 1px solid var(--border); padding: 16px; z-index: 90; display: none; }
.rgpd-banner.show { display: block; }

/* Mobile nav */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.menu-toggle:hover { background: rgba(255,255,255,0.16); }
@media (max-width: 900px) {
  header.topbar {
    padding: 12px 16px !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    gap: 10px;
    flex-wrap: nowrap;
  }
  header.topbar > div:first-child { min-width: 0; }
  header.topbar img { width: auto; max-height: 32px; }
  header.topbar .nav { display: none; }
  header.topbar .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    gap: 4px;
    padding: 10px;
    background: rgba(15,15,26,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    z-index: 60;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  header.topbar .nav.open a,
  header.topbar .nav.open button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
    text-align: left;
  }
  .menu-toggle { display: grid; }
}

/* Screen sharing : rectangle dédié au partage d'écran */
#screen-viewer-box {
  height: min(58vh, 620px);
  background:
    radial-gradient(circle at 50% 40%, rgba(124, 58, 237, 0.16), transparent 60%),
    #07070d;
}
#screen-video {
  background: #000;
}
@media (max-width: 640px) {
  #screen-viewer-box { height: min(48vh, 420px); }
}

/* Barre de défilement toujours visible dans le chat */
#messages {
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #ff4d6d rgba(255, 255, 255, 0.05);
}
#messages::-webkit-scrollbar {
  width: 10px;
}
#messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
#messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff4d6d, #7c3aed);
  border-radius: 9999px;
  border: 2px solid rgba(15, 15, 26, 0.9);
}

/* Emojis custom Font Awesome dans le chat */
.emoji-inline {
  font-size: 1.3em;
  line-height: 1;
  vertical-align: -0.12em;
  margin: 0 1px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ff4d6d, #7c3aed); border-radius: 9999px; border: 2px solid rgba(15,15,26,0.9); }
* { scrollbar-width: thin; scrollbar-color: #ff4d6d rgba(255,255,255,0.04); }

/* ============================================================
   Responsive global : téléphone, tablette, ordinateur
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video { max-width: 100%; }
button, a, .match-item, .interest-chip { -webkit-tap-highlight-color: transparent; }

/* Barre de notification push */
.push-prompt {
  position: fixed;
  top: max(76px, calc(env(safe-area-inset-top) + 64px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
  width: min(94vw, 560px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(30,30,51,0.98);
  border: 1px solid rgba(255,77,109,0.38);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
}
.push-prompt-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,77,109,0.15);
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--primary);
}
.push-prompt-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.push-prompt-text strong { font-size: 13px; color: var(--text); }
.push-prompt-text span { font-size: 11px; line-height: 1.35; color: var(--muted); }
.push-prompt-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.push-prompt-actions button { border-radius: 9px; padding: 8px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.push-prompt-enable { background: var(--primary); color: #fff; }
.push-prompt-later { background: rgba(255,255,255,0.08); color: var(--text); }

/* Chat : une colonne sur téléphone, retour vers les conversations */
.chat-back { display: none; }
@supports (height: 100dvh) {
  .chat-page { height: 100dvh !important; }
  .chat-layout { height: calc(100dvh - 64px) !important; }
}
@media (max-width: 767px) {
  .chat-layout {
    grid-template-columns: 1fr !important;
    height: calc(100dvh - 64px) !important;
  }
  .chat-layout .chat-sidebar {
    display: block;
    border-right: 0;
    padding: 14px 12px !important;
  }
  .chat-layout .chat-main { display: none; }
  .chat-layout.chat-open .chat-sidebar { display: none; }
  .chat-layout.chat-open .chat-main { display: flex; }
  .chat-back { display: grid !important; place-items: center; }
  .chat-header { padding: 10px 12px !important; gap: 8px !important; }
  .chat-header .chat-avatar { width: 38px !important; height: 38px !important; }
  .chat-header .call-btn,
  .chat-header > div:last-child button { width: 38px !important; height: 38px !important; font-size: 15px !important; }
  .chat-main #messages { padding: 14px 12px !important; }
  .chat-main .msg-bubble { max-width: 84% !important; }
  .chat-main #chat-form { padding: 10px !important; gap: 6px !important; }
  .chat-main #chat-form > button { padding-left: 11px !important; padding-right: 11px !important; }
  .chat-main #chat-form input { min-width: 0; }
  .chat-sidebar .match-item { min-height: 56px; }
}

/* Téléphone : découverte, profil, auth, modales */
@media (max-width: 640px) {
  main:not(.chat-main):not(.call-main) {
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-top: 18px !important;
    padding-bottom: 24px !important;
  }
  h1 { font-size: 1.65rem !important; }
  .card-stack {
    height: min(520px, calc(100dvh - 250px)) !important;
    min-height: 340px;
  }
  .swipe-actions { gap: 14px !important; margin-top: 18px !important; }
  .action-btn { width: 58px !important; height: 58px !important; font-size: 24px !important; }
  .profile-card .name { font-size: 22px; }
  .profile-card .info { padding: 14px; }

  main.profile-main { padding: 14px 12px 24px !important; }
  main.profile-main .p-6 { padding: 16px !important; }
  main.profile-main .rounded-2xl { border-radius: 16px !important; }
  main.profile-main .grid.grid-cols-3 { gap: 6px !important; }
  main.profile-main button { max-width: 100%; }

  body.auth-page { padding: 12px !important; align-items: center !important; }
  body.auth-page > .w-full { max-width: 100% !important; }
  body.auth-page .rounded-2xl.p-8 { padding: 20px 16px !important; }
  body.auth-page h1 { font-size: 23px !important; }

  input, textarea, select { font-size: 16px !important; }
  .push-prompt {
    top: max(68px, calc(env(safe-area-inset-top) + 58px));
    left: 10px;
    right: 10px;
    width: auto;
    transform: none;
    padding: 9px 10px;
  }
  .push-prompt-text span { display: none; }
  .push-prompt-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .push-prompt-actions button { padding: 8px 9px; font-size: 11px; }

  .modal-backdrop { padding: 10px !important; }
  .modal, #notif-modal > div, #msg-modal > div, #profile-view-modal > div,
  #emoji-modal > div, #device-modal > div {
    max-height: 88dvh !important;
    border-radius: 18px !important;
  }
  .toast { width: max-content; max-width: 92vw; text-align: center; bottom: 18px; }
}

/* Appel : plein écran téléphone, contrôles défilants */
@media (max-width: 767px) {
  .call-page .call-topbar { padding: 10px 12px !important; }
  .call-page .call-topbar #call-status { max-width: 28vw; }
  .call-page .call-main {
    height: calc(100dvh - 64px) !important;
    min-height: 0;
    justify-content: flex-start !important;
    overflow-y: auto;
    padding: 16px 12px 108px !important;
  }
  .call-page #call-circles { gap: 18px !important; margin-top: 4px; }
  .call-page #local-circle,
  .call-page #remote-circle { width: 116px !important; height: 116px !important; }
  .call-page #local-name,
  .call-page #remote-name { font-size: 14px; }
  .call-page #screen-viewer { margin-top: 12px !important; }
  .call-page #screen-viewer-box { height: min(42dvh, 360px); }
  .call-page .call-controls {
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: min(96vw, 540px);
    padding: 8px 10px !important;
    gap: 6px !important;
    border-radius: 20px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .call-page .call-controls::-webkit-scrollbar { display: none; }
  .call-page .call-controls button { flex: 0 0 auto; }
  .call-page .call-controls #mic-select-btn,
  .call-page .call-controls #cam-select-btn,
  .call-page .call-controls #audio-out-select-btn {
    max-width: 52px;
    padding-left: 10px !important;
    padding-right: 8px !important;
  }
  .call-page .toast { bottom: 96px; }
}
@media (max-width: 380px) {
  .call-page #local-circle,
  .call-page #remote-circle { width: 100px !important; height: 100px !important; }
  .call-page #call-circles { gap: 12px !important; }
  .call-page .call-main { padding-left: 8px !important; padding-right: 8px !important; }
}

/* Tablette : la découverte reste confortable, la nav passe en menu */
@media (min-width: 641px) and (max-width: 900px) {
  .card-stack { height: clamp(420px, 60vh, 560px) !important; }
  main.profile-main { padding-left: 20px !important; padding-right: 20px !important; }
}

/* Découverte immersive : galerie façon Tinder, contenu consultable dans la carte */
.discover-profile-card{display:flex;flex-direction:column;overflow:hidden!important;border:1px solid rgba(196,181,253,.24);background:linear-gradient(160deg,#211f38,#151526 75%);isolation:isolate}
.discover-photo-stage{position:relative;flex:0 0 64%;min-height:0;overflow:hidden;background:#10101b;touch-action:pan-y;cursor:grab}
.discover-main-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%;transition:opacity .18s ease,transform .35s ease;user-select:none;-webkit-user-drag:none}
.discover-photo-stage:active .discover-main-photo{transform:scale(1.015)}
.discover-photo-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(5,5,15,.36),transparent 23%,transparent 48%,rgba(8,7,18,.9) 100%)}
.discover-photo-progress{position:absolute;z-index:4;top:12px;left:12px;right:12px;display:flex;gap:4px;pointer-events:none}
.discover-photo-progress span{height:3px;flex:1;border-radius:99px;background:rgba(255,255,255,.42);box-shadow:0 1px 4px #0006}
.discover-photo-progress span.active{background:#fff}
.discover-photo-hit{position:absolute;z-index:5;top:30px;bottom:105px;width:42%;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.discover-photo-hit.prev{left:0}.discover-photo-hit.next{right:0}
.discover-photo-count{position:absolute;z-index:6;right:13px;top:25px;padding:5px 9px;border-radius:99px;background:#090912a8;backdrop-filter:blur(10px);font-size:11px;color:white;pointer-events:none}
.discover-hero-info{position:absolute;z-index:3;left:18px;right:18px;bottom:16px;color:#fff;pointer-events:none}
.discover-name-row{display:flex;align-items:center;gap:8px}.discover-name{font-size:clamp(22px,5vw,29px);font-weight:800;line-height:1.15;letter-spacing:-.04em;text-shadow:0 2px 15px #0008;min-width:0;overflow-wrap:anywhere}
.discover-detail-btn{pointer-events:auto;display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#ffffff20;border:1px solid #ffffff55;color:#fff}
.discover-meta{font-size:12px;color:#e0dff0;margin-top:7px;text-shadow:0 1px 8px #000}.discover-photo-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.discover-photo-tags span{padding:5px 9px;border:1px solid #ffffff35;background:#171326a8;backdrop-filter:blur(8px);border-radius:99px;font-size:10px;font-weight:700}
.discover-photo-hint{position:absolute;z-index:6;top:42px;left:14px;font-size:10px;color:#ffffffbd;pointer-events:none}
.discover-photo-arrows{position:absolute;left:15px;right:15px;top:48%;display:flex;justify-content:space-between;color:#fff;opacity:.58;pointer-events:none}
.discover-no-photo{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:58px;color:#a5a1bd}.discover-no-photo span{font-size:12px}
.discover-scroll-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 15px 20px;scrollbar-width:thin;scrollbar-color:#ff4d6d55 transparent}
.discover-section{padding:12px 0;border-bottom:1px solid #ffffff10}.discover-section:last-child{border-bottom:0}
.discover-section h3{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;margin-bottom:9px;color:#f5f3ff;font-family:var(--font-sans)}
.discover-section h3 i{color:#ff6a91;width:16px;text-align:center}
.discover-section>p{font-size:12px;line-height:1.65;color:#d3d0e3;white-space:pre-wrap;overflow-wrap:anywhere}
.discover-chip-list{display:flex;flex-wrap:wrap;gap:6px}.discover-chip{font-size:11px;padding:6px 9px;border-radius:99px;background:#ffffff0b;border:1px solid #ffffff12;color:#e9e5f7}
.music-chip{border-color:#22c55e35}.music-chip i{color:#1ed760}
.discover-muted{font-size:11px;color:#8f8ba8}
.discover-facts{display:grid;grid-template-columns:1fr;gap:7px}.discover-facts>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:11px;background:#ffffff08;border:1px solid #ffffff0d}
.discover-facts span{font-size:11px;color:#aaa6c2}.discover-facts strong{font-size:11px;text-align:right;color:#f7f4ff}
.discover-track-list{display:flex;flex-direction:column;gap:7px}.discover-track{display:flex;align-items:center;gap:10px;min-width:0;padding:7px;border:1px solid #ffffff12;background:#ffffff08;border-radius:12px;color:#fff;text-decoration:none!important;transition:background .18s,border-color .18s}
.discover-track:hover{background:#22c55e12;border-color:#22c55e50}.discover-track-cover{width:40px;height:40px;flex:0 0 40px;border-radius:8px;background:#ffffff10;display:grid;place-items:center;overflow:hidden;color:#1ed760}.discover-track-cover img{width:100%;height:100%;object-fit:cover}.discover-track-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.discover-track-text strong,.discover-track-text small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.discover-track-text strong{font-size:11px}.discover-track-text small{font-size:10px;color:#a9a5bd}.discover-track-play{color:#1ed760;font-size:18px;margin:0 5px}
@media(max-width:640px){.discover-profile-card{border-radius:22px}.discover-photo-stage{flex-basis:62%}.discover-hero-info{left:14px;right:14px;bottom:13px}.discover-scroll-content{padding:10px 13px 18px}.discover-photo-hint{font-size:9px}.discover-photo-hit{width:38%}}

/* Correctifs de mise en page de la carte Découvrir */
#card-stack .discover-profile-card{position:relative!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;padding:0!important;gap:0!important;box-sizing:border-box!important}
#card-stack .discover-photo-stage{width:100%;flex:0 0 62%;min-height:260px}
#card-stack .discover-scroll-content{width:100%;flex:1 1 38%;min-height:0;max-height:38%;}
#card-stack .discover-profile-card .score-badge{position:absolute;z-index:7;top:28px;right:14px}
#card-stack .discover-profile-card .discover-photo-hit{padding:0!important}
@media(max-width:640px){#card-stack{height:min(72dvh,720px)!important;min-height:500px}#card-stack .discover-photo-stage{flex-basis:58%;min-height:250px}#card-stack .discover-scroll-content{max-height:42%}}

/* VYROX SWIPE EXPERIENCE — interactions et identité propres */
#card-stack{perspective:1200px;touch-action:pan-y}
#card-stack .discover-profile-card{cursor:grab;transform-origin:50% 85%;will-change:transform;transition:transform .22s ease,opacity .22s ease,filter .22s ease;box-shadow:0 28px 70px #0008,0 0 0 1px #ffffff0b}
#card-stack .discover-profile-card.is-dragging{cursor:grabbing;transition:none!important;user-select:none}
#card-stack .discover-profile-card.swipe-exit-right{transform:translate3d(125%,8px,0) rotate(24deg)!important;opacity:0;transition:transform .22s ease,opacity .22s ease!important}
#card-stack .discover-profile-card.swipe-exit-left{transform:translate3d(-125%,8px,0) rotate(-24deg)!important;opacity:0;transition:transform .22s ease,opacity .22s ease!important}
.discover-swipe-stamp{position:absolute;z-index:10;top:64px;padding:8px 12px;border:4px solid currentColor;border-radius:12px;font-size:25px;font-weight:1000;letter-spacing:.12em;opacity:0;pointer-events:none;text-shadow:0 2px 12px #0008;transition:opacity .08s;transform:rotate(-12deg)}
.discover-stamp-like{left:22px;color:#6dffb2}.discover-stamp-nope{right:22px;color:#ff718d;transform:rotate(12deg)}
.discover-stamp-super{left:50%;top:22px;color:#60a5fa;transform:translateX(-50%) rotate(0deg);white-space:nowrap}
.discover-stamp-like.is-like{color:#6dffb2}.discover-stamp-nope.is-nope{color:#ff718d}
#card-stack .discover-photo-stage{touch-action:pan-y;user-select:none}
#card-stack .discover-photo-hit{z-index:5}
#card-stack .discover-scroll-content{overscroll-behavior:contain}
#card-stack .discover-section h3 i{filter:drop-shadow(0 0 8px #ff4d6d55)}
#card-stack .discover-chip{transition:transform .16s,border-color .16s,background .16s}
#card-stack .discover-chip:hover{transform:translateY(-2px);border-color:#ff4d6d66;background:#ff4d6d14}
#card-stack .discover-detail-btn{box-shadow:0 4px 18px #0004}
.action-btn{position:relative;transition:transform .18s ease,box-shadow .18s ease!important}
.action-btn:hover{transform:translateY(-4px) scale(1.06)!important;box-shadow:0 12px 28px #0005!important}
.action-btn:active{transform:scale(.94)!important}
.action-btn.dislike{box-shadow:0 8px 24px #ef44442b}.action-btn.super{box-shadow:0 8px 24px #3b82f64a}.action-btn.like{box-shadow:0 8px 28px #ff4d6d45}.action-btn.msg{box-shadow:0 8px 24px #22c55e38}
.action-btn.boost{background:linear-gradient(145deg,#f59e0b,#ec4899);box-shadow:0 8px 25px #f59e0b55}
.action-btn.boost.boost-active{background:linear-gradient(145deg,#fbbf24,#fb7185);box-shadow:0 0 0 4px #fbbf2430,0 0 24px #f59e0b88;animation:boostPulse 1.4s ease-in-out infinite alternate}
.action-btn.boost:disabled{cursor:default;filter:saturate(.85)}
@keyframes boostPulse{from{transform:scale(1)}to{transform:scale(1.06)}}
.desktop-keyboard-card{display:none;width:min(100%,420px);margin-top:16px;padding:14px 16px;border-radius:16px;border:1px solid rgba(196,181,253,.2);background:linear-gradient(145deg,rgba(30,27,52,.94),rgba(16,15,30,.94));box-shadow:0 12px 30px #0004}
.keyboard-card-title{display:flex;align-items:center;gap:8px;color:#f8f6ff;font-size:12px;font-weight:800;margin-bottom:11px}
.keyboard-card-title>i{color:#ff6b9a;font-size:15px}
.keyboard-card-title small{margin-left:auto;color:#a9a4bd;font-size:9px;letter-spacing:.12em}
.keyboard-shortcuts{display:flex;flex-wrap:wrap;gap:8px}
.keyboard-shortcuts>span{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:9px;background:#ffffff08;border:1px solid #ffffff12;color:#c9c5d8;font-size:10px;white-space:nowrap}
.keyboard-shortcuts kbd{min-width:22px;padding:3px 5px;text-align:center;border-radius:5px;background:linear-gradient(#38364a,#242235);border:1px solid #ffffff28;border-bottom-width:2px;color:#fff;font:700 10px/1.2 Inter,sans-serif;box-shadow:0 2px 3px #0004}
@media(min-width:1024px){.desktop-keyboard-card{display:block}}
.profile-view-overlay{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.78);backdrop-filter:blur(8px)}
.profile-view-overlay.hidden{display:none!important}
.profile-view-dialog{position:relative;display:flex;flex-direction:column;width:min(620px,100%);height:min(92dvh,920px);min-height:0;overflow:hidden;border:1px solid #ffffff20;border-radius:22px;background:#100f12;color:#fff;box-shadow:0 25px 90px #000a}
.profile-view-header{position:relative;z-index:5;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:66px;padding:12px 18px;background:rgba(17,16,19,.96);border-bottom:1px solid #ffffff12;box-shadow:0 5px 16px #0005}
.profile-view-header h2{min-width:0;margin:0;font-size:clamp(22px,5vw,30px);font-weight:850;letter-spacing:-.04em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-view-header h2 span{font-size:.8em;color:#fbbf24}
.profile-view-header button{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#fff;color:#19171b;font-size:18px}
.profile-view-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.profile-view-menu{position:absolute;z-index:12;top:58px;right:62px;width:min(245px,calc(100% - 32px));padding:7px;border:1px solid #ffffff20;border-radius:14px;background:#211f25;box-shadow:0 14px 38px #000a}
.profile-view-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:11px 10px;border-radius:9px;color:#f5f2f6;text-align:left;font-size:13px}
.profile-view-menu button:hover{background:#ffffff0d}
.profile-view-menu button i{width:17px;color:#ff8398;text-align:center}
.profile-view-menu button:first-child i{color:#ffb35c}
.profile-view-scroll{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ff4d6d88 #ffffff0a;padding-bottom:112px}
.profile-view-hero{position:relative;height:min(58dvh,570px);min-height:350px;overflow:hidden;background:#08080a;touch-action:pan-y;user-select:none}
.profile-view-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%;transition:opacity .18s ease;-webkit-user-drag:none}
.profile-view-photo-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#05050720,transparent 27%,transparent 53%,#000b 100%)}
.profile-view-progress{position:absolute;z-index:3;top:12px;left:12px;right:12px;display:flex;gap:4px}
.profile-view-progress span{height:3px;flex:1;border-radius:99px;background:#ffffff75;box-shadow:0 1px 5px #0008}
.profile-view-progress span.active,.profile-view-progress span.seen{background:#fff}
.profile-view-photo-arrow{position:absolute;z-index:4;top:48%;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#111c;color:#fff;font-size:15px;box-shadow:0 2px 10px #0007}
.profile-view-photo-arrow.prev{left:12px}.profile-view-photo-arrow.next{right:12px}
.profile-view-photo-count{position:absolute;z-index:4;top:25px;right:14px;padding:4px 9px;border-radius:99px;background:#08080bb8;color:#fff;font-size:11px}
.profile-view-hero-caption{position:absolute;z-index:3;left:20px;right:20px;bottom:20px;text-shadow:0 2px 12px #000c}
.profile-view-hero-caption h3{margin:0 0 5px;font-size:clamp(26px,6vw,34px);line-height:1.1;font-weight:850;letter-spacing:-.04em}
.profile-view-hero-caption p{margin:4px 0;font-size:14px;font-weight:700}
.profile-view-hero-caption p i{width:18px}
.profile-view-hero-caption .profile-view-intent{font-size:16px}
.profile-view-no-photo{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#a9a4b5;font-size:54px}
.profile-view-no-photo span{font-size:13px}
.profile-view-details{padding:14px 14px 0}
.profile-view-details>section{margin:0 0 11px!important;padding:16px;border:1px solid #ffffff12;border-radius:16px;background:#171518}
.profile-view-details>section h3{color:#f4f0f5}
.profile-view-details>section h3 i{color:#a7a0b5!important}
.profile-view-details .text-slate-400{color:#aaa5ae!important}
.profile-view-actions{position:absolute;z-index:8;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;gap:16px;padding:22px 14px max(16px,env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,rgba(8,8,10,.92) 35%,#08080a);pointer-events:none}
.profile-view-actions button{pointer-events:auto;display:grid;place-items:center;width:60px;height:60px;border:1px solid #ffffff0d;border-radius:50%;background:#222126;color:#fff;font-size:25px;box-shadow:0 8px 25px #0008}
.profile-view-actions .profile-action-pass{width:58px;height:58px;color:#fff;font-size:25px}
.profile-view-actions .profile-action-super{width:52px;height:52px;color:#8abaff;font-size:23px}
.profile-view-actions .profile-action-like{width:58px;height:58px;color:#ff3653;font-size:26px}
.profile-view-actions button:active{transform:scale(.93)}
.profile-report-overlay{position:absolute;z-index:20;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#050507d9;backdrop-filter:blur(8px)}
.profile-report-overlay.hidden{display:none!important}
.profile-report-dialog{width:min(460px,100%);max-height:100%;overflow:auto;padding:20px;border:1px solid #ffffff20;border-radius:20px;background:#1a181d;box-shadow:0 20px 70px #000a}
.profile-report-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.profile-report-heading h3{margin:0;color:#fff;font-size:19px;font-weight:800}
.profile-report-heading p{margin:4px 0 0;color:#aaa5af;font-size:12px}
.profile-report-heading>button{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:#ffffff10;color:#fff}
.profile-report-reasons{display:grid;gap:7px;margin-bottom:15px}
.profile-report-reasons button{display:flex;align-items:center;gap:10px;padding:10px 11px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff06;color:#e9e5eb;text-align:left;font-size:12px}
.profile-report-reasons button i{width:16px;color:#a8a2b4;text-align:center}
.profile-report-reasons button.selected{border-color:#ff668866;background:#ff4d6d16;color:#fff}
.profile-report-reasons button.selected i{color:#ff849d}
.profile-report-dialog>label{display:block;margin-bottom:6px;color:#c9c4ce;font-size:12px;font-weight:700}
.profile-report-dialog textarea{width:100%;min-height:84px;resize:vertical;padding:10px 12px;border:1px solid #ffffff1e;border-radius:11px;background:#0e0d10;color:#fff;font:inherit;font-size:13px}
.profile-report-buttons{display:flex;justify-content:flex-end;gap:9px;margin-top:14px}
.profile-report-buttons button{padding:10px 13px;border-radius:10px;font-size:12px;font-weight:750}
.profile-report-cancel{background:#ffffff10;color:#e5e0e8}
.profile-report-send{background:linear-gradient(135deg,#ff4d6d,#9b6bff);color:#fff}
@media(max-width:767px){
  .profile-view-overlay{padding:0;align-items:stretch}
  #profile-view-modal>.profile-view-dialog{width:100%;height:100dvh!important;max-height:100dvh!important;border:0;border-radius:0!important}
  .profile-view-header{min-height:64px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px}
  .profile-view-hero{height:min(56dvh,570px);min-height:330px}
  .profile-view-details{padding:11px 10px 0}
  .profile-view-details>section{padding:14px;border-radius:14px}
  .profile-view-actions{gap:14px;padding-bottom:max(18px,env(safe-area-inset-bottom))}
}
.profile-form-subsection{margin-top:18px;padding:16px;border:1px solid rgba(196,181,253,.16);border-radius:16px;background:rgba(10,9,20,.28)}
.profile-form-subsection h3{display:flex;align-items:center;gap:9px;margin:0 0 14px;color:#f4efff;font-size:14px;font-weight:800}
.profile-form-subsection h3 i{color:#ff7899}
@media(max-width:640px){#card-stack{height:min(76dvh,760px)!important;min-height:520px;width:100%!important}#card-stack .discover-profile-card{border-radius:24px}#card-stack .discover-photo-stage{flex-basis:57%;min-height:250px}#card-stack .discover-scroll-content{max-height:43%}.discover-swipe-stamp{font-size:20px;border-width:3px}}

/* Découverte façon stories : la photo prend toute la carte et les infos suivent chaque photo. */
#card-stack .discover-profile-card{display:block!important;background:#050507!important}
#card-stack .discover-photo-stage{position:absolute!important;inset:0;width:100%;height:100%;min-height:0!important;flex:none!important}
#card-stack .discover-main-photo{object-position:center 38%}
#card-stack .discover-photo-shade{background:linear-gradient(180deg,rgba(0,0,0,.25),transparent 20%,transparent 48%,rgba(0,0,0,.18) 62%,rgba(0,0,0,.88) 100%)}
#card-stack .discover-photo-progress{top:12px;left:12px;right:12px;gap:4px}
#card-stack .discover-photo-progress span{height:3px;background:rgba(255,255,255,.58)}
#card-stack .discover-photo-progress span.active,#card-stack .discover-photo-progress span.seen{background:#fff}
#card-stack .discover-scroll-content{display:none!important}
#card-stack .discover-story-caption{position:absolute;z-index:6;left:18px;right:18px;bottom:22px;color:#fff;text-shadow:0 2px 12px #000b;pointer-events:none}
#card-stack .discover-name-row{align-items:center;gap:10px}
#card-stack .discover-name{font-size:clamp(25px,6vw,34px);letter-spacing:-.045em}
#card-stack .discover-detail-btn{pointer-events:auto;flex:0 0 36px;width:36px;height:36px;background:#10101488;border:1px solid #ffffff9c}
#card-stack .discover-story-detail{margin-top:5px;font-size:14px;font-weight:700;line-height:1.45}
#card-stack .discover-story-detail p{margin:3px 0;display:flex;align-items:center;gap:8px}
#card-stack .discover-story-detail p i{width:16px;text-align:center}
#card-stack .discover-story-bio{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}
#card-stack .discover-story-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
#card-stack .discover-story-chips span{padding:5px 11px;border-radius:99px;background:#08080bc9;border:1px solid #ffffff25;font-size:12px}
#card-stack .discover-photo-hit{top:48px;bottom:100px;width:28%}
#card-stack .discover-photo-hit.prev{width:24%}
#card-stack .discover-profile-card.swipe-exit-up{transform:translate3d(0,-125%,0) scale(.92)!important;opacity:0;transition:transform .22s ease,opacity .22s ease!important}
#card-stack,#card-stack .discover-photo-stage{touch-action:none}
#card-stack .discover-photo-arrows{left:auto;right:12px;top:48%;width:38px;height:38px;align-items:center;justify-content:center;opacity:1}
#card-stack .discover-photo-arrows i:first-child{display:none}
#card-stack .discover-photo-arrows i:last-child{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#555;font-size:15px;box-shadow:0 2px 10px #0006}
@media(max-width:640px){
  #card-stack{height:min(70dvh,700px)!important;min-height:480px;width:100%!important}
  #card-stack .discover-profile-card{border-radius:20px}
  #card-stack .discover-story-caption{left:17px;right:17px;bottom:20px}
  #card-stack .discover-story-detail{font-size:13px}
  #card-stack .discover-photo-hit{bottom:95px}
  .action-btn{width:56px!important;height:56px!important;font-size:22px!important}
  .discover-actions{gap:9px!important}
}

/* VYROX RENCONTRE — refonte visuelle globale */
:root{color-scheme:dark;--vx-pink:#ff4d83;--vx-violet:#9b6bff;--vx-line:rgba(196,181,253,.2);--vx-glass:rgba(20,18,39,.82)}
body{background-color:#0b0915!important;background-image:radial-gradient(ellipse at 12% 0%,#ff4d6d1c,transparent 34%),radial-gradient(ellipse at 90% 18%,#8b5cf626,transparent 36%),linear-gradient(145deg,#0b0915,#17132b 56%,#101b2b)!important;background-attachment:fixed!important}
header{background:rgba(12,10,24,.86)!important;border-color:var(--vx-line)!important;backdrop-filter:blur(20px) saturate(140%)}
main>section,main>div,main .rounded-2xl.border,main .rounded-xl.border{border-color:var(--vx-line)!important;box-shadow:0 16px 44px #0003;transition:border-color .2s,transform .2s,box-shadow .2s}
main>div,main>section{border-radius:22px}
input:not([type=checkbox]):not([type=radio]),textarea,select{border-radius:13px!important;border-color:#a78bfa38!important;background-color:#0c0a19b8!important;color:#faf7ff!important}
input:focus,textarea:focus,select:focus{outline:none!important;border-color:#ff4d83b8!important;box-shadow:0 0 0 3px #ff4d831f!important}
button{transition:transform .18s,filter .18s,box-shadow .18s}button:hover{filter:brightness(1.08)}button:active{transform:scale(.97)}
a{transition:color .18s}img{max-width:100%}::selection{background:#ff4d8360;color:white}:focus-visible{outline:2px solid #ff7ca5;outline-offset:3px}
@media(max-width:640px){main{padding-left:14px!important;padding-right:14px!important}main>div,main>section{border-radius:18px!important}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
