/* EliteHub — thème « velours nuit » (maquette validée 2026-10-23). */
:root {
  --bg: #15111A; --bg-deep: #0E0B12; --surface: #1F1924; --surface-2: #2A2130; --surface-3: #3A2E44;
  --line: #2C2433; --line-2: #4A3E52;
  --text: #F3EEF5; --soft: #CFC6D6; --muted: #A79CB0;
  --accent: #FF5C8A; --accent-text: #FF7AA2; --on-accent: #15111A;
  --gold: #F2C14E; --ok: #9BE3C1; --ok-bg: #1E3A30; --danger: #FF9A9A; --danger-bg: #3E1E26;
  --radius: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--accent-text); }
a:hover { color: #FFB3C9; }
h1, h2, h3, .display { font-family: Sora, Inter, sans-serif; letter-spacing: -0.3px; line-height: 1.2; }
h1 { font-size: 28px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
img, video { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.push { margin-left: auto; }
.empty { text-align: center; padding: 40px 20px; }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { font-family: Sora, sans-serif; font-weight: 800; font-size: 24px; color: var(--text); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.logo:hover { color: var(--text); }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 44px; color: var(--muted); }
.search input[type=search] { flex: 1; min-width: 0; width: auto; min-height: 0; padding: 0; border-radius: 0; background: transparent; border: 0; color: var(--text); font: inherit; outline: none; }
.search:focus-within { border-color: var(--line-2); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.me-pill { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; line-height: 1.2; }
.me-pill:hover { color: var(--text); border-color: var(--line-2); }
.me-pill strong { display: block; font-size: 14px; }
.me-pill small { color: var(--muted); font-size: 12px; }
.banner { background: var(--surface-2); color: var(--soft); text-align: center; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.banner.warn { background: #3A2F14; color: #F6DC93; }

/* Ossature */
.shell { max-width: 1240px; margin: 0 auto; padding: 24px 20px 48px; display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.sidenav { flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 92px; }
.sidenav a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--soft); text-decoration: none; }
.sidenav a:hover { background: var(--surface); color: var(--text); }
.sidenav a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.sidenav .sep { height: 1px; background: var(--line); margin: 10px 0; }
.sidenav .nav-cta { margin-top: 8px; justify-content: center; }
.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cols { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 20px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; }
@media (max-width: 900px) {
  .shell { padding-top: 12px; gap: 16px; }
  .sidenav { position: static; flex: 1 1 100%; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .sidenav a { white-space: nowrap; min-height: 40px; }
  .sidenav .sep { display: none; }
  .sidenav .nav-cta { margin-top: 0; }
  .col-side { max-width: none; }
  .me-pill > span:not(.avatar) { display: none; }
  .me-pill { padding: 4px; }
  .topbar-in { gap: 10px; }
  .search { order: 3; flex-basis: 100%; }
}

/* Cartes, boutons, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card.pad, .pad { padding: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--text); border-color: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: #FF7AA2; color: var(--on-accent); }
.btn.light { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.btn.light:hover { color: var(--bg); background: #fff; }
.btn.danger { border-color: #7A3B4A; color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.big { min-height: 50px; padding: 0 26px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--surface-2); color: var(--soft); white-space: nowrap; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.gold { color: var(--on-accent); background: var(--gold); }
.badge.danger { color: var(--danger); background: var(--danger-bg); }
.badge.accent { color: var(--on-accent); background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--soft); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.pill:hover { color: var(--text); border-color: var(--line-2); }
.pill.on { color: var(--accent-text); border-color: #6A3448; }
.pill.on svg { fill: currentColor; }
.pill.ghost { border-color: transparent; color: var(--muted); }
.flash { border-radius: 14px; padding: 12px 16px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--danger-bg); color: var(--danger); }
.avatar { border-radius: 999px; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; background: #5B4A66; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text); }

/* Publications */
.post-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.post-head .who { flex: 1; min-width: 0; line-height: 1.35; }
.post-head .who a { color: var(--text); text-decoration: none; }
.post-head .who a.muted { color: var(--muted); }
.avatars { display: flex; }
.avatars > * + * { margin-left: -14px; border: 2px solid var(--surface); }
.post-body { margin: 0; padding: 0 18px 14px; white-space: normal; overflow-wrap: anywhere; }
.media { position: relative; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.media-el { display: block; width: 100%; max-height: 720px; object-fit: contain; background: #0E0B12; }
.media.locked .media-el { max-height: 460px; min-height: 300px; object-fit: cover; }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: rgba(21, 17, 26, .45); color: #E6DDEB; }
.media-more { position: absolute; right: 12px; bottom: 12px; background: rgba(21, 17, 26, .8); color: var(--text); border-radius: 10px; padding: 4px 10px; font-size: 13px; text-decoration: none; }
.media-tag { position: absolute; left: 12px; top: 12px; background: rgba(21, 17, 26, .8); color: var(--ok); border-radius: 10px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.post-actions { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.post-actions form { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); text-decoration: none; }
.tabs a.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.tabs.under { gap: 0; border-bottom: 1px solid var(--line); }
.tabs.under a { border: 0; border-radius: 0; border-bottom: 2px solid transparent; min-height: 48px; }
.tabs.under a.on { background: none; color: var(--text); border-bottom-color: var(--accent); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .badge { position: absolute; left: 8px; bottom: 8px; }
.tile.text { display: flex; align-items: center; justify-content: center; padding: 14px; color: var(--soft); text-decoration: none; font-size: 14px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Profil */
.banner-img { height: 240px; border-radius: 24px; background: var(--surface-2) center / cover no-repeat; }
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; padding: 0 20px; margin-top: -60px; }
.profile-head .avatar { border: 6px solid var(--bg); }
.profile-head .id { flex: 1 1 240px; padding-bottom: 6px; }
.profile-head .id h1 { margin: 0; }
.profile-cta { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }

/* Listes et tableaux */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); color: var(--text); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item.unread { background: #251D2B; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-family: Sora, sans-serif; font-weight: 700; font-size: 28px; margin-top: 4px; }
.kpi.accent { border-color: var(--accent); }
.kpi.accent .value { color: var(--accent-text); }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=number], input[type=search], input[type=url], input[type=datetime-local], textarea, select {
  width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-deep); color: var(--text); padding: 10px 14px; font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input[type=file] { color: var(--soft); font: inherit; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: #2A1A24; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.inline-form { display: inline; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-weight: 600; }

/* Publicité */
.ad a { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 16px; color: var(--text); text-decoration: none; }
.ad a:hover { border-color: var(--soft); color: var(--text); }
.ad img { width: 120px; height: 80px; object-fit: cover; border-radius: 12px; flex: none; }
.ad.tall a { flex-direction: column; align-items: stretch; }
.ad.tall img { width: 100%; height: 180px; }
.ad-label { flex-basis: 100%; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ad-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.ad-text span { color: var(--soft); font-size: 14px; }
.ad-text small { color: var(--muted); }

/* Messagerie */
.chat { display: flex; flex-direction: column; height: min(78vh, 820px); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; overflow-wrap: anywhere; white-space: pre-line; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bubble-meta { font-size: 11px; color: var(--muted); }
.bubble-meta.me { align-self: flex-end; }
.offer { width: min(320px, 100%); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; background: var(--surface); }
.offer.mine { align-self: flex-end; }
.offer .media.locked .media-el { min-height: 170px; max-height: 220px; }
.offer-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.offer-top { display: flex; justify-content: space-between; align-items: baseline; }
.offer-kicker { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); }
.offer-price { font-family: Sora, sans-serif; font-weight: 700; font-size: 20px; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 44px; height: 44px; border-radius: 22px; }
.composer-locked { padding: 14px 16px; border-top: 1px solid var(--line); text-align: center; color: var(--soft); }
details.offer-form { border-top: 1px solid var(--line); }
details.offer-form summary { cursor: pointer; padding: 12px 16px; color: var(--accent-text); font-weight: 600; }
details.offer-form .form { padding: 0 16px 16px; }

/* Confirmation de paiement */
.sheet { max-width: 520px; width: 100%; margin: 0 auto; }
.summary { display: flex; flex-direction: column; gap: 10px; margin: 0; font-size: 14px; }
.summary > div { display: flex; justify-content: space-between; gap: 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; }
.summary .total dt { color: var(--text); font-weight: 600; }
.summary .total dd { font-family: Sora, sans-serif; font-weight: 700; font-size: 26px; }
.note { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; color: var(--soft); font-size: 14px; }
hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; }
