:root {
  --bg: #fbf6f2;
  --surface: #ffffff;
  --ink: #2a1a2e;
  --muted: #6f6272;
  --line: #eadfd9;
  --accent: #d6455d;
  --accent-dark: #b2334a;
  --accent-soft: #fde8ec;
  --plum: #3b1f4a;
  --ok: #1f7a4d;
  --warn: #9a5b00;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(59, 31, 74, .08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--plum); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--plum); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.main { padding: 2rem 0 4rem; min-height: 60vh; }

/* ---------- En-tête & menu ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font: 700 1.4rem var(--serif); color: var(--plum); text-decoration: none; }
.brand .heart { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1rem; flex: 1; justify-content: space-between; margin-left: 1.5rem; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.menu > li { position: relative; }
.menu a, .sub-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .8rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 500;
  background: none; border: 0; cursor: pointer;
}
.menu a:hover, .sub-toggle:hover, .menu > li.open > .sub-toggle, .menu > li.active > a { background: var(--accent-soft); color: var(--accent-dark); }
.menu a:focus-visible, .sub-toggle:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f4a3b2; outline-offset: 2px;
}
.sub {
  list-style: none; margin: 0; padding: .4rem; display: none;
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.sub-right { left: auto; right: 0; }
.sub a { display: flex; width: 100%; border-radius: 10px; }
.has-sub.open > .sub { display: block; }
@media (hover: hover) and (min-width: 861px) {
  .has-sub:hover > .sub { display: block; }
}
.user-btn img { border-radius: 50%; object-fit: cover; width: 28px; height: 28px; }
.badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 .45rem; line-height: 1.4; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .75rem; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 860px) {
  .burger { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; margin: 0; padding: 1rem; background: var(--surface); border-bottom: 1px solid var(--line); max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav.open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu a, .sub-toggle { width: 100%; justify-content: space-between; border-radius: 10px; }
  .sub { position: static; box-shadow: none; border: 0; border-left: 3px solid var(--accent-soft); border-radius: 0; margin-left: .75rem; }
  .menu-user { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .5rem; }
}

/* ---------- Boutons & formulaires ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff !important; text-decoration: none;
  padding: .75rem 1.5rem; font: 600 1rem var(--sans);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-small { padding: .45rem 1rem; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--accent-dark) !important; border: 2px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { background: #8f1d2c; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.form { display: grid; gap: 1rem; max-width: 560px; }
.form.wide { max-width: 760px; }
.field { display: grid; gap: .3rem; }
.field label, .legend { font-weight: 600; font-size: .95rem; }
.hint { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid #d6c9c4; border-radius: 10px;
}
textarea { min-height: 130px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .3rem; }
.hp { position: absolute; left: -9999px; }

.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1.25rem; border: 1px solid; }
.flash-ok { background: #e8f6ee; border-color: #b6e2c9; color: var(--ok); }
.flash-error { background: #fdecec; border-color: #f2b9b9; color: #9b1c1c; }
.flash-info { background: #eef1fb; border-color: #c5cdf0; color: #2c3a86; }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; padding: 1.5rem 0 3rem; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-art { background: linear-gradient(135deg, var(--plum), var(--accent)); border-radius: 28px; min-height: 340px; display: grid; place-items: center; color: #fff; font: 700 7rem var(--serif); box-shadow: var(--shadow); }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 2rem 0; }
.steps .card h3::before { content: attr(data-n); display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-right: .5rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font: 700 1rem var(--sans); }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } .hero-art { min-height: 180px; font-size: 4rem; } }

/* ---------- Profils ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.profile-card img.photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: #efe3df; }
.profile-card .body { padding: 1rem; display: grid; gap: .35rem; flex: 1; }
.profile-card h3 { margin: 0; }
.profile-card .actions { display: flex; gap: .5rem; padding: 0 1rem 1rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.member { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; }
.member img.photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.tag { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: .15rem .75rem; font-size: .9rem; }
@media (max-width: 760px) { .member { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; background: #fff; }
.tabs a.on { background: var(--plum); color: #fff; border-color: var(--plum); }

/* ---------- Messagerie ---------- */
.chat { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; }
.convs { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.convs a { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.convs a:hover, .convs a.on { background: var(--accent-soft); border-color: #f4c2cb; }
.convs img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
#thread { height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: 1rem; background: #faf3ef; border-radius: 12px; }
.msg { max-width: 75%; padding: .55rem .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; border-color: var(--accent); }
.msg time { display: block; font-size: .7rem; opacity: .7; }
.send { display: flex; gap: .6rem; margin-top: .8rem; }
.send input { flex: 1; }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; } }

/* ---------- Pages de texte (légal, FAQ) ---------- */
.prose { max-width: 800px; }
.prose h2 { margin-top: 2rem; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .7rem; }
summary { cursor: pointer; font-weight: 600; }

/* ---------- Portail 18+ ---------- */
.gate { max-width: 520px; margin: 4rem auto; text-align: center; }
.gate .big { font: 700 4rem var(--serif); color: var(--accent); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--plum); color: #e9dcef; padding: 2.5rem 0 1rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.05rem; font-family: var(--sans); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-footer .brand { color: #fff; }
.site-footer .muted { color: #cdbad6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.copy { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: #cdbad6; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Compléments ---------- */
.cta-center { justify-content: center; }
.mt { margin-top: 1rem; }
.thumb { width: 140px; height: 140px; border-radius: var(--radius); object-fit: cover; }
.stack { display: grid; gap: 1.25rem; max-width: 640px; }
.report { margin-top: 1.5rem; }
.table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--surface); }
.table th, .table td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.table th { background: var(--accent-soft); }
