:root {
  --ink: #16171d; --muted: #5d606b; --line: #e7e7ec; --soft: #f7f7f9; --bg: #fff;
  --coral: #e4572e; --coral-dark: #bd3f1a; --coral-soft: #fdeee9; --band: #fdebe3; --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; outline: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--coral-dark); }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 32px 0; }
.narrow { width: min(640px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.top { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, calc((100% - 1080px) / 2)); }
@media (min-width: 821px) { .nav { margin-right: clamp(0px, 3vw, 44px); } }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); text-decoration: none; font-size: 1.4rem; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav button { color: var(--ink); text-decoration: none; padding: 9px 13px; border-radius: 12px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover, .nav a[aria-current="page"] { background: var(--soft); }
.nav a.cta { background: var(--coral-dark); color: #fff; }
.menu { display: none; font: inherit; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; color: var(--ink); }
@media (max-width: 820px) {
  .menu { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
}
.foot { background: var(--ink); color: #c9cad3; padding: 44px 16px 24px; font-size: .95rem; }
.foot a { color: #fff; }
.foot-grid { width: min(1080px, 100%); margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; } }
.foot strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.foot p { margin: 0 0 .5em; }
.foot nav { display: grid; gap: 6px; align-content: start; }
.foot-copy { width: min(1080px, 100%); margin: 28px auto 0; padding-top: 16px; border-top: 1px solid #33343d; font-size: .85rem; color: #9a9ca8; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 13px; border: 1px solid var(--coral-dark); background: var(--coral-dark); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.hero { display: grid; gap: 40px; grid-template-columns: 1.2fr .8fr; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.3rem, 8vw, 3.7rem); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.matchmaker { background: var(--soft); border-left: 4px solid var(--coral); border-radius: var(--radius); padding: 28px 24px;
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.portrait { width: 100%; height: auto; border-radius: var(--radius); }
@media (max-width: 640px) { .matchmaker { grid-template-columns: 1fr; } .portrait { max-width: 220px; justify-self: center; } }
.matchmaker h2 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); max-width: 24em; }
.matchmaker p { max-width: 42em; }
.matchmaker .kicker { color: var(--coral-dark); font-weight: 700; margin-bottom: 8px; }
.matchmaker .signature { font-weight: 600; }
.private { background: var(--soft); border-radius: 14px; padding: 12px 14px 0; }
.private legend { float: left; width: 100%; }
.private legend + * { clear: both; }
.showcase h3 { overflow-wrap: anywhere; }
.visual { background: var(--coral-soft); border-radius: 28px; padding: 40px 32px; display: grid; gap: 24px; }
.visual > div { background: #fff; border-radius: var(--radius); padding: 20px 18px; box-shadow: 0 8px 24px rgb(22 23 29 / .07); }
.visual > div:nth-child(2) { margin-left: 28px; }
.visual .tags { margin-top: 10px; }
.visual > .badge { justify-self: start; background: var(--coral-dark); color: #fff; box-shadow: none; padding: 8px 16px; border-radius: 99px; font-weight: 600; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
a.card { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
a.card:hover { border-color: var(--coral); }
.showcase { display: flex; flex-direction: column; gap: 10px; }
.cover { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 12px; }
.card h3, .card p { margin: 0; }
.step b { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-dark); margin-bottom: 14px; }
.person { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 16px; flex: none; object-fit: cover; background: var(--coral-soft); color: var(--coral-dark); display: grid; place-items: center; font-weight: 700; }
.avatar.big { width: 104px; height: 104px; font-size: 1.8rem; border-radius: 26px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--soft); border-radius: 99px; padding: 3px 11px; font-size: .82rem; }
.tag.accent { background: var(--coral-soft); color: var(--coral-dark); }
.tag.ok { background: #e5f5ea; color: #17663a; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { background: var(--soft); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
.notice { background: var(--coral-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.error { color: #a3190b; background: #fdecea; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs a { padding: 9px 18px; border-radius: 13px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tabs a[aria-current="true"] { background: var(--coral-dark); border-color: var(--coral-dark); color: #fff; }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
.filters input { grid-column: 1 / -1; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cfd0d8; border-radius: 12px; padding: 11px 13px; }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 7px; font-weight: 400; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; margin: 0; cursor: pointer; }
.checks input, label.inline input { width: auto; margin: 0; accent-color: var(--coral-dark); }
label.inline { display: flex; gap: 9px; align-items: center; font-weight: 400; }

.stats { margin-bottom: 24px; }
.stats strong { display: block; font-size: 2.2rem; }
.list { display: grid; gap: 14px; }
.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; }
.facts div { background: var(--soft); border-radius: 12px; padding: 10px 13px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.chat { display: grid; gap: 10px; background: var(--soft); border-radius: var(--radius); padding: 14px; min-height: 220px; max-height: 55vh; overflow-y: auto; align-content: start; margin-bottom: 12px; }
.bubble { max-width: 82%; background: #fff; border-radius: 16px; padding: 9px 13px; justify-self: start; }
.bubble.me { justify-self: end; background: var(--coral-dark); color: #fff; }
.bubble time { display: block; font-size: .72rem; opacity: .75; margin-top: 3px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; width: max-content; max-width: calc(100% - 32px); display: none; z-index: 10; }
.toast.show { display: block; }

/* Alternance de fonds, deux côtés, FAQ */
.band { background: var(--band); }
.band .matchmaker { background: #fff; }
.section-head { text-align: center; max-width: 40em; margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.section-head h2 em { font-style: normal; color: var(--coral); }
.duo { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.duo-card { padding: 28px; border-radius: 24px; display: flex; flex-direction: column; gap: 12px; }
.duo-card h3 { font-size: 1.5rem; }
.duo-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--coral-soft); font-size: 1.6rem; box-shadow: 0 4px 14px rgb(22 23 29 / .08); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--coral-dark); font-weight: 700; margin-right: 10px; }
.arrow { align-self: flex-start; margin-top: 6px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--coral); }
.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 2px 18px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq details[open] summary { color: var(--coral-dark); }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* Profils membres */
.card.member { padding: 0; overflow: hidden; gap: 6px; }
.card.member > * { margin-left: 16px; margin-right: 16px; }
.card.member > .member-photo { margin: 0; width: calc(100% + 0px); aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.member-photo.placeholder { display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-dark); font-size: 2.4rem; font-weight: 700; }
.card.member > :last-child { margin-bottom: 16px; }
.profile { border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: #fff; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 24px; background: linear-gradient(135deg, var(--band), #fff 85%); }
.profile-head h1 { margin: 0 0 .15em; }
.profile-head p { margin: 0; }
.profile-photo { width: clamp(110px, 28vw, 180px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 8px 24px rgb(22 23 29 / .14); flex: none; }
.profile-photo.placeholder { display: grid; place-items: center; background: #fff; color: var(--coral-dark); font-size: 2.6rem; font-weight: 700; }
.profile-body { padding: 24px; display: grid; gap: 16px; }
.kicker { color: var(--coral-dark); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.profile-quote { font-size: 1.15rem; font-style: italic; margin: 0; border-left: 3px solid var(--coral); padding-left: 14px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.profile-stats div { display: grid; gap: 2px; }
.profile-stats strong { font-size: 1.1rem; }
.cover.big { aspect-ratio: 16 / 8; }

/* Notifications et formulaire de contact */
.nav a.bell { display: inline-flex; align-items: center; gap: 6px; }
.bell-label { display: none; }
.count { background: var(--coral-dark); color: #fff; border-radius: 99px; font-size: .72rem; font-weight: 700; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cloche déroulante */
.bell-wrap { position: relative; }
.nav button.bell { display: inline-flex; align-items: center; gap: 6px; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, 90vw); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgb(22 23 29 / .14); padding: 14px; z-index: 30; display: grid; gap: 10px; }
.bell-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bell-panel li a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--ink); text-decoration: none; }
.bell-panel li a:hover { background: var(--coral-soft); }
.notif-title { font-weight: 700; color: var(--coral-dark); }

/* Jauge de profil */
.complete-box { background: linear-gradient(135deg, var(--coral-soft), #fff); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 22px; display: grid; gap: 12px; }
.complete-box h2 { margin: 0 0 4px; font-size: 1.25rem; }
.complete-box p { margin: 0; }
.complete-top { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.complete-pct { white-space: nowrap; font-size: 2rem; color: var(--coral-dark); line-height: 1; }
.meter { height: 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--coral-dark); border-radius: 99px; transition: width .4s; }
.complete-box .btn { justify-self: start; }
.notice.gate { display: block; }
.gate-card { display: grid; gap: 12px; }

/* Favoris */
.card-wrap { position: relative; display: grid; }
.card-wrap > a.card { height: 100%; }
.heart { position: absolute; top: 12px; right: 12px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 700; color: var(--coral-dark); cursor: pointer; box-shadow: 0 4px 12px rgb(22 23 29 / .12); }
.heart[aria-pressed="true"] { background: var(--coral-dark); color: #fff; border-color: var(--coral-dark); }
.heart:disabled { opacity: .6; }
.row.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card.list .heart { position: static; flex: none; }

.brand-logo { display: block; height: 13px; width: auto; }
.article h1 { margin: 12px 0 6px; }
.article-body { margin-top: 18px; display: grid; gap: 14px; }
.article-body h2 { font-size: 1.2rem; margin: 10px 0 0; }
.article-body p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.fundraising { margin: -6px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--coral-soft); }

.cta-card { display: grid; gap: 14px; justify-items: start; padding: 24px; }
.cta-card h2 { margin: 0; }
.cta-card p { margin: 0; }

/* Connecté : menu latéral sur tous les écrans */
.logged .menu { display: grid; }
.logged .nav { display: flex; position: fixed; top: 65px; right: 0; bottom: 0; left: auto; width: min(320px, 86vw); z-index: 6; margin: 0;
  background: #fff; border: 0; border-left: 1px solid var(--line); box-shadow: -16px 0 40px rgb(22 23 29 / .14);
  padding: 16px 16px 24px; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px; overflow-y: auto;
  transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
.logged .nav.open { transform: none; visibility: visible; }
.logged .nav a, .logged .nav button { text-align: left; }
@media (prefers-reduced-motion: reduce) { .logged .nav { transition: none; } }

/* Barre en haut à droite : profil, cloche, menu */
.menu { place-items: center; padding: 8px 10px; }
.bar { display: flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 8px; }
.bar:empty { display: none; }
.me { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); overflow: hidden; display: block; flex: none; }
.me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me:hover { border-color: var(--coral); }
.bar button.bell { position: relative; background: none; border: 0; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0; }
.bar button.bell:hover { background: var(--soft); }
.bar .count { position: absolute; top: 2px; right: 0; }
@media (max-width: 820px) { .bell-panel { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; } }
