/* 1. VARIABLES (fuchsia du réseau trans, boutons verts) */
:root {
  --acc: #C026D3;
  --acc-d: #86198F;
  --acc-soft: #FAE8FF;
  --bg: #FBF7FC;
  --card: #fff;
  --line: #EFE4F2;
  --txt: #221827;
  --mute: #6E6275;
  --v: #27a05a;
  --vl: #3ed48c;
  --red: #E5484D;
  --bar: 66px;
  --r: 18px;
  --shadow: 0 1px 2px rgba(60, 20, 70, .04), 0 6px 20px rgba(60, 20, 70, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --acc-soft: #3B1442;
    --bg: #130E16;
    --card: #1E1722;
    --line: #2E2433;
    --txt: #F4EEF6;
    --mute: #A898AE;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt);
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom) + 8px);
}
body.no-nav { padding-bottom: 24px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* 2. EN-TÊTE */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top img { border-radius: 9px; }
.brand { font-weight: 750; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; }
#back { margin-left: -8px; }
.icon-btn.right { margin-left: auto; }
.icon-btn:active { background: var(--acc-soft); }
.icon-btn.boxed { width: 50px; height: 50px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.icon-btn.boxed.on { border-color: var(--acc); color: var(--acc); }
.top-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* 3. TYPO ET BLOCS COMMUNS */
main { max-width: 560px; margin: 0 auto; padding: 16px; }
.screen { animation: in .25s ease; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 6px 0 14px; }
.muted { color: var(--mute); }
.small { font-size: 13px; color: var(--mute); margin-top: 10px; }
.center { text-align: center; }
.right { text-align: right; }
.intro { margin: -6px 0 14px; }
.card {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.chev { width: 18px; height: 18px; margin-left: auto; color: var(--mute); }
.label { font-size: 15px; margin: 22px 0 8px; }
.label.first { margin-top: 0; }
.err { color: var(--red); font-size: 14px; margin-top: 10px; }

/* 4. BOUTONS (toujours verts) */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 18px; padding: 15px;
  border-radius: 14px; text-align: center;
  background: linear-gradient(135deg, var(--v), var(--vl));
  box-shadow: 0 6px 18px rgba(39, 160, 90, .32);
  color: #fff; font-size: 17px; font-weight: 700;
  transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; }
.btn svg { width: 20px; height: 20px; }
.btn-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; margin-top: 6px; color: var(--mute); font-size: 15px; }
.btn-link.left { justify-content: flex-start; width: auto; padding: 8px 0; }
.btn-link svg { width: 18px; height: 18px; }
.round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .1s; }
.round:active { transform: scale(.92); }
.round svg { width: 30px; height: 30px; }
.round.pass { background: var(--card); color: var(--mute); border: 1px solid var(--line); }
.round.like { background: linear-gradient(135deg, var(--v), var(--vl)); color: #fff; box-shadow: 0 8px 22px rgba(39, 160, 90, .35); }
.round.like.on { background: var(--card); color: var(--v); border: 2px solid var(--v); }

/* 5. FORMULAIRES */
.form label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.form label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--txt);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--acc); }
textarea { resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--mute); margin-top: 16px; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--v); }
.check a { color: var(--acc); text-decoration: underline; }
.segment { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--line); }
.segment.two { grid-template-columns: 1fr 1fr; margin: 16px 0 10px; }
.segment button { padding: 10px 0; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--mute); }
.segment button.on { background: var(--card); color: var(--txt); box-shadow: var(--shadow); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 15px; font-weight: 600; }
.pills button.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.options { display: grid; gap: 10px; }
.options button { padding: 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); font-size: 17px; font-weight: 600; text-align: left; }
.options button.on { border-color: var(--acc); background: var(--acc-soft); }

/* 6. ÉCRANS PLEINS (porte 18+, bientôt) */
.full {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(circle at 85% 5%, rgba(91, 206, 250, .5), transparent 40%),
    radial-gradient(circle at 5% 95%, rgba(245, 169, 184, .55), transparent 45%),
    linear-gradient(150deg, #C026D3, #6B21A8);
}
.full-box { width: 100%; max-width: 380px; padding: 30px 22px 18px; border-radius: 26px; text-align: center; background: var(--card); box-shadow: 0 20px 50px rgba(40, 0, 60, .35); }
.full-box img { border-radius: 22px; box-shadow: 0 8px 20px rgba(134, 25, 143, .3); }
.full-box h1 { font-size: 26px; margin: 16px 0 6px; letter-spacing: -.02em; }
.full-box p { color: var(--mute); }

/* 7. CONNEXION */
.hero {
  position: relative; overflow: hidden;
  padding: 24px 22px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(91, 206, 250, .55), transparent 45%),
    radial-gradient(circle at 10% 100%, rgba(245, 169, 184, .6), transparent 50%),
    linear-gradient(140deg, #C026D3, #7E22CE);
}
.hero h1 { font-size: 28px; line-height: 1.12; letter-spacing: -.02em; margin: 12px 0 8px; }
.hero p { opacity: .92; }
.tag { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .2); }

/* 8. CRÉATION DU PROFIL */
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 33%; border-radius: 99px; background: linear-gradient(90deg, var(--acc), #7E22CE); transition: width .3s; }
.step-count { font-size: 13px; color: var(--mute); margin: 8px 0 4px; }
.avatar-up { position: relative; display: block; width: 150px; height: 190px; margin: 6px auto 0; border-radius: 22px; overflow: hidden; cursor: pointer; background: var(--acc-soft); border: 2px dashed color-mix(in srgb, var(--acc) 45%, transparent); }
.avatar-up img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--acc); font-weight: 600; font-size: 14px; }
.avatar-ph svg { width: 34px; height: 34px; }
.avatar-up.small-av { width: 110px; height: 110px; border-radius: 50%; border-style: solid; }
.av-edit { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; }
.av-edit svg { width: 16px; height: 16px; }

/* 9. DÉCOUVRIR */
.filters { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; color: var(--mute); }
.search:focus-within { border-color: var(--acc); }
.search input { border: 0; padding: 13px 0; background: none; }
.filter-panel { margin-top: 10px; }
.count { font-size: 14px; margin: 14px 2px 10px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--acc-soft); box-shadow: var(--shadow); text-align: left; }
.pcard img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph, .p-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; font-weight: 800; color: #fff; background: linear-gradient(140deg, #C026D3, #7E22CE); }
.pcard .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(20, 5, 25, .78)); }
.pcard strong { display: block; font-size: 16px; }
.pcard small { display: flex; align-items: center; gap: 3px; font-size: 12.5px; opacity: .9; }
.pcard small svg { width: 13px; height: 13px; }
.pcard .liked { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--v); }
.pcard .liked svg { width: 17px; height: 17px; }
.empty-state { text-align: center; padding: 30px 10px; }
.empty-state h2 { font-size: 20px; margin-bottom: 6px; }
.pulse { width: 76px; height: 76px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--acc), #7E22CE); animation: pulse 2s infinite; }
.pulse svg { width: 34px; height: 34px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192, 38, 211, .45); } 70% { box-shadow: 0 0 0 18px rgba(192, 38, 211, 0); } 100% { box-shadow: 0 0 0 0 rgba(192, 38, 211, 0); } }

/* 10. PROFIL D'UN MEMBRE */
#profile { margin: -16px -16px 0; padding-bottom: 110px; }
.p-photo { position: relative; aspect-ratio: 4 / 5; max-height: 52vh; width: 100%; background: var(--acc-soft); overflow: hidden; }
.p-photo img { width: 100%; height: 100%; object-fit: cover; }
.p-ph { font-size: 90px; }
.p-body { padding: 18px 16px 0; }
.p-body .h1 { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--acc-soft); color: var(--acc); }
.bio { white-space: pre-line; color: var(--txt); }
.p-safety { display: flex; gap: 18px; margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.p-actions { position: fixed; left: 0; right: 0; bottom: calc(var(--bar) + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 22px; padding: 12px; pointer-events: none; }
.p-actions > * { pointer-events: auto; }
.btn-inline { width: auto; margin: 0; padding: 0 28px; height: 64px; border-radius: 32px; }

/* 11. MATCHS ET TCHAT */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: var(--acc-soft); }
.av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--acc-soft); display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(140deg, #C026D3, #7E22CE); }
.mrow div { min-width: 0; flex: 1; }
.mrow strong { display: block; }
.mrow small { display: block; color: var(--mute); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow time { font-size: 12px; color: var(--mute); align-self: flex-start; margin-top: 4px; }
#chat { display: flex; flex-direction: column; min-height: calc(100vh - 140px); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-bottom: 80px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #C026D3, #7E22CE); border-bottom-right-radius: 6px; }
.msg time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.day { align-self: center; font-size: 12px; color: var(--mute); margin: 10px 0 4px; }
.chat-hint { text-align: center; color: var(--mute); font-size: 14px; padding: 30px 20px; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); max-width: 560px; margin: 0 auto; }
.composer input { flex: 1; border-radius: 24px; }
.round.send { width: 48px; height: 48px; background: linear-gradient(135deg, var(--v), var(--vl)); color: #fff; }
.round.send svg { width: 22px; height: 22px; }

/* 12. CONSEILS */
.acc summary { display: flex; align-items: center; gap: 12px; font-weight: 700; list-style: none; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc[open] summary .chev { transform: rotate(90deg); }
.acc .chev { transition: transform .2s; }
.acc p { margin-top: 12px; color: var(--mute); }

/* 13. MON PROFIL */
.me-head { text-align: center; margin-bottom: 14px; }
.me-head .h1 { margin: 12px 0 2px; }
.list-actions { padding: 6px 16px; }
.list-actions > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.list-actions > *:last-child { border-bottom: 0; }
.list-actions svg { color: var(--mute); width: 20px; height: 20px; }
.danger, .danger svg { color: var(--red) !important; }

/* 14. BARRE DU BAS */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; height: calc(var(--bar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--mute); }
.bar button.on { color: var(--acc); }
.dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }

/* 15. MESSAGES FLASH ET FENÊTRES */
.toast { position: fixed; left: 50%; top: calc(68px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30; max-width: 90%; padding: 12px 18px; border-radius: 14px; background: #221827; color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: in .2s ease; }
.modal { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(20, 5, 25, .6); backdrop-filter: blur(4px); }
.modal-box { width: 100%; max-width: 360px; padding: 26px 22px 14px; border-radius: 24px; background: var(--card); text-align: center; animation: in .25s ease; }
.modal-box h2 { font-size: 26px; margin: 16px 0 6px; background: linear-gradient(135deg, #C026D3, #7E22CE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.match-pics { display: flex; justify-content: center; }
.match-pics img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--card); background: var(--acc-soft); box-shadow: var(--shadow); }
.match-pics img + img { margin-left: -18px; }
.modal-box.ask h2 { background: none; color: var(--txt); -webkit-text-fill-color: currentColor; font-size: 21px; margin: 0 0 6px; }
.modal-box.ask .ask-in { margin-top: 14px; }
.btn-danger { background: var(--red); box-shadow: none; }
.brand.with-av { display: flex; align-items: center; gap: 10px; }

/* 16. PAGES LÉGALES */
.legal h2 { font-size: 17px; margin: 20px 0 6px; }
.legal p { color: var(--mute); margin-bottom: 8px; }
.legal p strong { color: var(--txt); }
