:root {
  --yellow: #ffd60a;
  --yellow-soft: #fff3b0;
  --cream: #fffbea;
  --ink: #111111;
  --muted: #5c5640;
  --white: #ffffff;
  --pink: #ff8fab;
  --blue: #8ecae6;
  --green: #95d5b2;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-small: 3px 3px 0 var(--ink);
  --radius: 20px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  white-space: nowrap;
  touch-action: manipulation;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: var(--border);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-small);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
  .step:hover { transform: translateY(-4px) rotate(-1deg); }
}
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: var(--shadow-small); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.field:focus { outline: none; box-shadow: var(--shadow-small); background: var(--cream); }

.btn[hidden] { display: none; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-big { width: 100%; padding: 16px 24px; font-size: 1.15rem; }
.btn-white { background: var(--white); color: var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); width: auto; }

.field {
  width: 100%;
  padding: 14px 16px;
  border: var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px;
}
.logo { display: flex; white-space: nowrap; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo-icon { width: 36px; height: 36px; display: block; transition: transform 0.2s; }
@media (hover: hover) {
  .logo:hover .logo-icon { transform: rotate(-8deg) scale(1.08); }
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 16px 72px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 800; }

.highlight {
  background: var(--white);
  border: var(--border);
  border-radius: 14px;
  padding: 0 12px;
  box-shadow: var(--shadow-small);
  display: inline-block;
  transform: rotate(-2deg);
  margin: 6px 0;
}

.lead { font-size: 1.05rem; margin-top: 18px; max-width: 36ch; color: #2b2817; }

/* "Online now" en mini-portraits sous l'accroche */
.hero > * { min-width: 0; }
.online-mini { margin-top: 22px; min-width: 0; }
.online-mini[hidden] { display: none; }
.online-mini-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.online-mini-title .live-dot { width: 12px; height: 12px; border-width: 2px; margin-left: 6px; }
.online-mini-track { gap: 12px; padding: 4px 8px 10px 2px; }
.online-mini .member { width: 128px; border-radius: 16px; box-shadow: var(--shadow-small); }
.online-mini .member-badge { top: 6px; left: 6px; padding: 2px 7px; font-size: 0.65rem; border-width: 2px; }
.online-mini .demo-tag { top: 30px; left: 6px; right: auto; padding: 1px 6px; font-size: 0.6rem; }
.online-section { padding-top: 8px; padding-bottom: 32px; }
.online-section .online-mini-title { font-size: 1.3rem; }
.online-section .online-mini { margin-top: 0; }
.model-card { cursor: default; }
.online-mini .member-info { left: 6px; right: 6px; bottom: 6px; padding: 4px 8px; border-radius: 10px; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.start-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 24px;
}
.card-title { font-weight: 800; font-size: 1.3rem; }

.tiny { font-size: 0.8rem; color: var(--muted); text-align: center; }

/* Émojis flottants */
.sticker {
  position: absolute;
  font-size: clamp(2rem, 4vw, 3.2rem);
  user-select: none;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.18));
}
.s1 { top: 0; left: 46%; animation-delay: 0s; }
.s2 { top: 3%; left: 30%; animation-delay: -1.5s; }
.s3 { top: 0; right: 0; animation-delay: -3s; }
.s4 { bottom: 4%; left: 44%; animation-delay: -2s; font-size: 1.8rem; }
.s5 { bottom: 2%; right: 4%; animation-delay: -4s; z-index: 2; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* ---------- Bandeau défilant ---------- */
.strip-wrap { overflow: hidden; padding: 12px 0; }
.strip {
  background: var(--ink);
  color: var(--yellow);
  border-block: var(--border);
  overflow: hidden;
  transform: rotate(-1.5deg) scaleX(1.05);
}
.strip-track {
  display: flex;
  gap: 48px;
  width: max-content;
  padding: 16px 0;
  font-weight: 800;
  font-size: 1.15rem;
  white-space: nowrap;
  animation: scroll 28s linear infinite;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 88px 16px 0; }
.section h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; margin-bottom: 32px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  position: relative;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform 0.15s;
}
.step:nth-child(1) { background: var(--yellow-soft); }
.step:nth-child(2) { background: #ffd6e0; }
.step:nth-child(3) { background: #d7f0fa; }
.step-num {
  position: absolute;
  top: -18px;
  left: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 800;
}
.step-emoji { font-size: 2.6rem; display: block; margin-bottom: 12px; }
.step h3 { font-size: 1.35rem; margin-bottom: 8px; }
.step p { color: #2b2817; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature > span {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  background: var(--yellow);
  border: var(--border);
  border-radius: 16px;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 4px; }
.feature p { color: var(--muted); }

.rules {
  background: var(--ink);
  color: var(--white);
  border-radius: 28px;
  padding: 40px;
}
.rules h2 { color: var(--yellow); }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rules li { display: flex; gap: 14px; align-items: center; font-size: 1.1rem; }
.rules li span { font-size: 1.6rem; }

.cta { text-align: center; padding: 96px 16px; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 28px; }

.footer {
  display: flex;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  border-top: var(--border);
  font-weight: 600;
}

.card-text { color: var(--muted); font-size: 1.05rem; margin-top: -8px; }

.field-label { display: flex; flex-direction: column; gap: 8px; margin: 0; font-weight: 800; }
.optional {
  margin-left: 4px;
  padding: 1px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
}
.row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }

.form-error {
  background: #ffd6e0;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}
.form-error[hidden] { display: none; }

.avatar-small {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.5rem;
}

.avatar-small { overflow: hidden; }
.avatar-small img { width: 100%; height: 100%; object-fit: cover; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Homme / Femme ---------- */
.gender { border: none; margin: 0; padding: 0; min-width: 0; }
.gender legend { padding: 0; margin-bottom: 8px; }
.gender-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gender-3 .gender-options { grid-template-columns: repeat(3, 1fr); }
.gender-3 .gender-btn { flex-direction: column; gap: 2px; padding: 10px 6px; font-size: 0.95rem; }
.gender-btn { flex-direction: column; gap: 2px; padding: 10px 6px; font-size: 0.95rem; }
.gender-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: var(--border);
  border-radius: 14px;
  background: var(--cream);
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s, box-shadow 0.12s;
}
.gender-btn span { font-size: 1.4rem; line-height: 1; }
.gender-btn input { position: absolute; opacity: 0; pointer-events: none; }
.gender-btn:has(input:checked) { background: var(--yellow); box-shadow: var(--shadow-small); }
.gender-btn:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Photo facultative ---------- */
.photo-row { display: flex; align-items: center; gap: 12px; }
.photo-picker {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 3px dashed var(--ink);
  border-radius: 16px;
  background: var(--cream);
  cursor: pointer;
}
.photo-picker:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.photo-preview {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 1.4rem;
  overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-text { display: flex; flex-direction: column; line-height: 1.3; }
.photo-text small { font-size: 0.8rem; }

.link-btn {
  background: none;
  border: none;
  padding: 4px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn[hidden] { display: none; }

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  cursor: pointer;
}
.checkbox[hidden] { display: none; }
.checkbox input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.checkbox span { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.checkbox small { font-size: 0.8rem; }

/* ---------- Carrousels ("Online now" et galerie) ---------- */
.section[hidden] { display: none; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0 !important; }
.carousel-arrows { display: flex; gap: 10px; flex-shrink: 0; }
.carousel-arrows[hidden] { display: none; }
.arrow {
  width: 48px;
  height: 48px;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-small);
  touch-action: manipulation;
}
.arrow:active { transform: translate(3px, 3px); box-shadow: none; }

.live-dot {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #2ecc71;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.25); } }

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 10px 14px 4px;
  margin: 0 -4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }

.member {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--yellow-soft);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
  touch-action: manipulation;
}
.member img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
}
.member-badge.recent { background: var(--cream); color: var(--muted); }
.demo-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.member-info {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  font-weight: 800;
}


@media (hover: hover) {
  .member:hover { transform: translateY(-4px) rotate(-1deg); }
  .arrow:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
}

/* ---------- Écran de recherche (radar) ---------- */
.searching {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: var(--cream);
  text-align: center;
}
.searching[hidden] { display: none; }
.searching-title { font-weight: 800; font-size: 1.3rem; margin-top: 16px; }

.radar {
  position: relative;
  width: 220px;
  height: 220px;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ring {
  position: absolute;
  inset: 50%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  opacity: 0;
  animation: ping 3s ease-out infinite;
}
.ring:nth-child(2) { animation-delay: 1s; }
.ring:nth-child(3) { animation-delay: 2s; }
@keyframes ping {
  0% { inset: 50%; opacity: 0.9; }
  100% { inset: -10%; opacity: 0; }
}
.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(17, 17, 17, 0.28), transparent 70deg);
  animation: spin 2.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.radar-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.6rem;
  z-index: 1;
}
.blip {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0;
  animation: blip 4.8s ease-in-out infinite;
}
.b1 { top: 16%; left: 22%; }
.b2 { top: 24%; right: 14%; animation-delay: 1.2s; }
.b3 { bottom: 14%; right: 26%; animation-delay: 2.4s; }
.b4 { bottom: 22%; left: 12%; animation-delay: 3.6s; }
@keyframes blip {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  10%, 35% { opacity: 1; transform: scale(1); }
  50% { opacity: 0; transform: scale(0.6); }
}

/* ---------- Chat ---------- */
#chat { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; align-items: center; padding: 16px; }
#chat[hidden] { display: none; }
.chat-box {
  width: 100%;
  max-width: 680px;
  height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--yellow);
  border-bottom: var(--border);
}
#status { font-weight: 800; font-size: 1.1rem; }
.partner { display: flex; align-items: center; gap: 12px; }
.actions { display: flex; gap: 8px; }

#messages { list-style: none; margin: 0; padding: 20px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: var(--cream); }
#messages[hidden] { display: none; }
#messages li.photo { padding: 6px; background: var(--white); }
#messages li.photo img { display: block; width: 200px; max-width: 100%; border-radius: 12px; }
#messages li { max-width: 80%; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 18px; word-wrap: break-word; white-space: pre-wrap; }
#messages li.mine { align-self: flex-end; background: var(--yellow); border-bottom-right-radius: 6px; }
#messages li.theirs { align-self: flex-start; background: var(--white); border-bottom-left-radius: 6px; }
#messages li.system { align-self: center; border: none; background: none; color: var(--muted); font-size: 0.9rem; text-align: center; }

#typing { padding: 0 20px 8px; background: var(--cream); }

#form { display: flex; gap: 10px; padding: 14px; border-top: var(--border); background: var(--white); }
.attach {
  flex-shrink: 0;
  width: 48px;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 14px;
  background: var(--yellow);
  font-size: 1.3rem;
  cursor: pointer;
  touch-action: manipulation;
}
.attach:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.attach.disabled { opacity: 0.4; cursor: not-allowed; }
#messages li.photo { position: relative; overflow: hidden; }
#messages li.mine.photo { background: var(--yellow); }
#messages li.photo.blurred img { filter: blur(22px); transform: scale(1.08); }
.photo-reveal {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
#form .field { flex: 1; }

/* ---------- Animations ---------- */
/* Uniquement transform et opacity (fluide sur téléphone). Tout est coupé si l'appareil demande moins d'animations. */

:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Badge "Live" : point vert qui émet des ondes */
.pill { display: inline-flex; align-items: center; gap: 8px; }
.pill strong { font-weight: 800; }
.live-badge { position: relative; width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: #16c60c; box-shadow: 0 0 0 2px var(--ink); }
.live-badge::before, .live-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #16c60c;
  animation: live-ping 2s var(--ease-out) infinite;
}
.live-badge::after { animation-delay: 1s; }
@keyframes live-ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3); opacity: 0; } }

/* Logo : les yeux clignent de temps en temps */
.logo-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }

/* Arrivée en cascade du haut de page */
.js .enter { opacity: 0; transform: translateY(18px); animation: enter 0.7s var(--ease-out) var(--d, 0ms) forwards; }
@keyframes enter { to { opacity: 1; transform: none; } }

/* "Be yourself" se pose avec un petit rebond, le 🥸 fait coucou */
.highlight { animation: tilt-in 0.9s var(--ease-spring) 0.45s both; }
@keyframes tilt-in { from { transform: rotate(4deg) scale(0.85); } to { transform: rotate(-2deg) scale(1); } }
.wiggle { display: inline-block; transform-origin: 50% 80%; animation: wiggle 4s ease-in-out 1.2s infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(4deg); } }

/* Mini-portraits : arrivée l'un après l'autre */
.js .card-in { opacity: 0; transform: translateX(40px) scale(0.94); animation: card-in 0.9s var(--ease-spring) calc(600ms + var(--i, 0) * 200ms) forwards; }
@keyframes card-in { to { opacity: 1; transform: none; } }

/* Bouton principal : reflet qui passe régulièrement + appui qui s'enfonce */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 214, 10, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out 1.5s infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn:active, .gender-btn:active, .attach:active, .arrow:active { transform: scale(0.96); transition-duration: 0.06s; }

/* Choix homme / femme : l'émoji saute quand on le sélectionne */
.gender-btn:has(input:checked) span { animation: pop 0.45s var(--ease-spring); }
@keyframes pop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.photo-preview img { animation: pop 0.45s var(--ease-spring); }

/* Sections qui apparaissent au défilement, avec les cartes en cascade */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal .step, .js .reveal .feature, .js .reveal .rules li { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.js .reveal.in .step, .js .reveal.in .feature, .js .reveal.in .rules li { opacity: 1; transform: none; }
.reveal.in :is(.step, .feature, .rules li):nth-child(2) { transition-delay: 90ms; }
.reveal.in :is(.step, .feature, .rules li):nth-child(3) { transition-delay: 180ms; }
.reveal.in :is(.step, .feature, .rules li):nth-child(4) { transition-delay: 270ms; }

/* Chat : bulles qui arrivent, avatar qui rebondit à la mise en relation, points "en train d'écrire" */
#messages li { animation: bubble-in 0.35s var(--ease-spring) both; }
#messages li.mine { transform-origin: bottom right; }
#messages li.theirs { transform-origin: bottom left; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }
.avatar-small.bounce { animation: avatar-bounce 0.7s var(--ease-spring); }
@keyframes avatar-bounce { 0% { transform: scale(0.4) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }
#messages li.photo img { transition: filter 0.4s var(--ease-out), transform 0.4s var(--ease-out); }
.typing-dots { display: inline-flex; gap: 3px; margin-right: 4px; vertical-align: middle; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Passage accueil <-> chat en fondu */
#chat:not([hidden]) .chat-box { animation: enter 0.45s var(--ease-out) both; }

/* ---------- Formulaire vivant ---------- */
.start-card { position: relative; }
.card-sticker { position: absolute; font-size: 1.8rem; pointer-events: none; animation: float 5s ease-in-out infinite; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.15)); }
.cs1 { top: -20px; right: 22px; }
.cs2 { bottom: 70px; left: -16px; font-size: 1.4rem; animation-delay: -2.5s; }
.bounce-pin { display: inline-block; transform-origin: 50% 100%; animation: pin-bounce 2.4s var(--ease-spring) 1s infinite; }
@keyframes pin-bounce { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-8px) scaleY(1.05); } 80% { transform: translateY(0) scaleY(0.92); } 88% { transform: translateY(-3px); } }

.progress { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); overflow: hidden; margin-top: -4px; }
.progress-bar {
  height: 100%;
  width: 6%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, #ffe45c 10px 20px);
  background-size: 28px 28px;
  animation: stripes 1s linear infinite;
  transition: width 0.6s var(--ease-spring), background 0.3s;
}
.progress-bar.full { background: repeating-linear-gradient(-45deg, #16c60c 0 10px, #4ade3a 10px 20px); background-size: 28px 28px; }
@keyframes stripes { to { background-position: 28px 0; } }
.progress-text { font-weight: 800; font-size: 0.95rem; margin-top: -6px; }
.progress-text.swap { animation: enter 0.4s var(--ease-out); }

.gender-btn { transition: background 0.2s, box-shadow 0.2s, transform 0.15s; }
.gender-btn span { font-size: 1.7rem; }
.gender-btn:has(input[value="man"]:checked) { background: #bfe3ff; }
.gender-btn:has(input[value="woman"]:checked) { background: #ffc8d8; }
.gender-btn:has(input[value="any"]:checked) { background: linear-gradient(135deg, #ffc8d8, #ffe68a 35%, #c5f2c7 65%, #bfe3ff); }
@media (hover: hover) { .gender-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-small); } }

.input-wrap { position: relative; display: block; }
.input-wrap .field { padding-right: 52px; }
.dice {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.dice.roll { animation: roll 0.6s var(--ease-spring); }
@keyframes roll { from { transform: rotate(-360deg) scale(0.6); } to { transform: rotate(0) scale(1); } }

.field { transition: box-shadow 0.2s, background 0.2s, transform 0.2s; }
.field:focus { transform: translateY(-1px); }

.btn-big.ready { animation: ready 1.6s var(--ease-out) infinite; }
@keyframes ready { 0%, 100% { transform: scale(1); box-shadow: var(--shadow-small); } 50% { transform: scale(1.03); box-shadow: 5px 5px 0 var(--ink); } }

.photo-picker { transition: background 0.2s, transform 0.15s; }
.photo-picker:active { transform: scale(0.98); }

/* ---------- Écran de recherche stylé ---------- */
.chat-box { position: relative; }
.searching { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 42%, #fff6c2 0%, var(--cream) 60%); }
.searching > :not(.search-bg) { position: relative; z-index: 1; }
.search-bg { position: absolute; inset: 0; pointer-events: none; }
.search-bg span {
  position: absolute;
  left: var(--x);
  bottom: -40px;
  font-size: 1.5rem;
  opacity: 0;
  animation: drift var(--s, 7s) ease-in var(--d, 0s) infinite;
}
@keyframes drift {
  0% { transform: translateY(0) rotate(-8deg); opacity: 0; }
  15% { opacity: 0.55; }
  80% { opacity: 0.35; }
  100% { transform: translateY(-110vh) rotate(12deg); opacity: 0; }
}
.radar { width: 230px; height: 230px; box-shadow: 8px 8px 0 var(--ink); }
.radar::before, .radar::after { content: ""; position: absolute; border: 2px dashed rgba(17, 17, 17, 0.25); border-radius: 50%; }
.radar::before { inset: 22%; }
.radar::after { inset: 8%; }
.radar-center { width: 76px; height: 76px; margin: -38px 0 0 -38px; font-size: 2.2rem; overflow: hidden; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.6); animation: me-pulse 2s ease-in-out infinite; }
.radar-center img { width: 100%; height: 100%; object-fit: cover; }
@keyframes me-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.15); } }
.searching-title { font-size: 1.35rem; margin-top: 22px; }
.search-timer { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.search-tip { max-width: 300px; margin-top: 14px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-small); font-size: 0.9rem; }
.search-tip.swap { animation: enter 0.45s var(--ease-out); }

.found {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--yellow);
  text-align: center;
}
.found[hidden] { display: none; }
.found.show { animation: found-out 1.5s ease forwards; }
@keyframes found-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.found-emoji {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 3.6rem;
}
.found.show .found-emoji { animation: found-pop 0.7s var(--ease-spring); }
@keyframes found-pop { 0% { transform: scale(0.2) rotate(-25deg); } 100% { transform: scale(1) rotate(0); } }
.found-title { margin-top: 16px; font-size: 1.7rem; font-weight: 800; }
.found.show .found-title { animation: enter 0.5s var(--ease-out) 0.15s both; }
.found-name { font-weight: 700; color: var(--muted); }
.confetti { position: absolute; left: 50%; top: 42%; }
.confetti span { position: absolute; font-size: 1.5rem; transform: translate(-50%, -50%); opacity: 0; }
.found.show .confetti span { animation: confetti 1.1s var(--ease-out) forwards; }
@keyframes confetti {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r)) scale(1); opacity: 0; }
}

/* ---------- Fond jaune vivant (accueil) ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image: radial-gradient(rgba(17, 17, 17, 0.07) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
}
#home > :not(.bg-fx) { position: relative; z-index: 1; }
.blob { position: absolute; border-radius: 50%; will-change: transform; animation: blob-drift 22s ease-in-out infinite alternate; }
.blob-1 { width: 80vmax; height: 80vmax; top: -30vmax; left: -25vmax; background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 62%); }
.blob-2 { width: 85vmax; height: 85vmax; bottom: -35vmax; right: -30vmax; background: radial-gradient(circle, rgba(255, 160, 0, 0.32), transparent 62%); animation-delay: -8s; animation-duration: 26s; }
.blob-3 { width: 55vmax; height: 55vmax; top: 35%; left: 35%; background: radial-gradient(circle, rgba(255, 243, 160, 0.7), transparent 62%); animation-delay: -14s; animation-duration: 19s; }
@keyframes blob-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(9vmax, 6vmax) scale(1.12); }
  100% { transform: translate(-7vmax, 11vmax) scale(0.94); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; padding-bottom: 48px; }
  .steps, .features { grid-template-columns: 1fr; }
  .step { margin-top: 12px; }
  .s1 { left: auto; right: 4%; top: -6px; }
  .s2, .s3, .s4 { display: none; }
  .s5 { bottom: -4px; right: 6%; }
  .rules { padding: 28px 22px; }
  .section { padding-top: 64px; }
  .cta { padding: 72px 16px; }
}

@media (max-width: 480px) {
  .nav { padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
  .logo { font-size: 1.3rem; gap: 8px; }
  .logo-icon { width: 32px; height: 32px; }
  .nav-btn { padding: 8px 14px; font-size: 0.85rem; }
  .hide-mobile { display: none; }
  .field-label .optional { display: none; }
  .carousel-arrows { display: none; }
  .member { width: 62vw; max-width: 240px; }
  .section-head { margin-bottom: 20px; }
  .arrow { width: 42px; height: 42px; font-size: 1rem; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.3rem); }
  .lead { font-size: 0.95rem; margin-top: 12px; }
  .pill { font-size: 0.75rem; margin-bottom: 12px; padding: 4px 12px; }
  .online-mini { margin-top: 18px; }
  .online-mini .member { width: 31vw; max-width: 130px; }
  .start-card { padding: 22px 18px; gap: 14px; box-shadow: 6px 6px 0 var(--ink); }
  .card-title { font-size: 1.2rem; }
  .card-text { font-size: 0.95rem; }
  .row { grid-template-columns: 1fr 96px; gap: 10px; }
  .strip-track { font-size: 1rem; gap: 36px; padding: 12px 0; }
  .section h2 { font-size: 2rem; margin-bottom: 24px; }
  .step { padding: 24px 20px; }
  .feature { padding: 16px; gap: 14px; }
  .feature > span { width: 48px; height: 48px; font-size: 1.5rem; }
  .rules li { font-size: 1rem; align-items: flex-start; }
  .rules li span { font-size: 1.3rem; }
  .cta .btn { width: 100%; }
  .footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); font-size: 0.9rem; }

  /* Chat plein écran, en-tête sur une seule ligne */
  #chat { padding: 0; align-items: stretch; }
  .chat-box { height: 100vh; height: 100dvh; max-width: none; border-radius: 0; border: none; box-shadow: none; }
  .chat-header { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); gap: 10px; }
  .partner { min-width: 0; gap: 10px; }
  .partner > div { min-width: 0; }
  #status, #partner-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #status { font-size: 1rem; }
  #partner-meta { font-size: 0.8rem; }
  .avatar-small { width: 40px; height: 40px; font-size: 1.25rem; }
  .actions { flex-shrink: 0; gap: 6px; }
  .actions .btn { padding: 8px 12px; font-size: 0.85rem; box-shadow: 2px 2px 0 var(--ink); }
  #messages { padding: 16px 14px; }
  #messages li { max-width: 85%; }
  #typing { padding: 0 14px 8px; }
  #form { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); gap: 8px; }
  #form .btn { padding: 12px 16px; }
  .attach { width: 44px; }
  .radar { width: 200px; height: 200px; }
  .searching-title { font-size: 1.15rem; }
}

@media (max-width: 340px) {
  .actions .btn span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .js .enter, .js .card-in, .js .reveal, .js .reveal .step, .js .reveal .feature, .js .reveal .rules li { opacity: 1; transform: none; }
  .live-badge::before, .live-badge::after, .btn-shine::after, .card-sticker, .search-bg, .confetti { display: none; }
  html { scroll-behavior: auto; }
}
