:root {
  --ink: #17263b;
  --paper: #e9edf1;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --accent: #1f7a5a;      /* vert proximité */
  --accent-ink: #145f45;
  --amber: #b9781f;       /* news / événements */
  --muted: #5f6b7a;
  --line: #d7dde4;
  --danger: #b3341f;
  --online: #2bb673;
  --radius: 12px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --bottomnav-h: 58px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font-body); color: var(--ink); background: var(--paper); }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; color: var(--ink); }
.wordmark .dot { color: var(--accent); }
.wordmark.small { font-size: 22px; }

/* ---- Logo CityChat ---- */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { display: block; width: auto; height: 100%; }
.brand-lg { height: 58px; margin-bottom: 4px; }
.brand-sm { height: 34px; }
.brand .brand-dark { display: none; }
/* mode nuit : logotype en blanc */
body[data-theme="dark"] .brand .brand-light { display: none; }
body[data-theme="dark"] .brand .brand-dark { display: block; }
/* le rail est toujours sur fond sombre */
.rail .brand .brand-light { display: none; }
.rail .brand .brand-dark { display: block; }
.admin-brand { display: flex; align-items: center; gap: 14px; }
.tagline { color: var(--muted); margin: 8px 0 18px; line-height: 1.5; }
.link { background: none; border: none; color: var(--accent-ink); text-decoration: underline; padding: 0; font-size: 14px; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 20px; margin-top: 10px; font-size: 14px; }

/* ---- Avatars ---- */
.avatar-sm, .avatar-fb { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fb { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.avatar-lg.avatar-fb { font-size: 28px; }

/* ---- Gate ---- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 500px at 50% -10%, #dfe8ea, var(--paper)); }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px; width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(23,38,59,.08); }
.city-banner { display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; margin-bottom: 16px; font-size: 14px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tab { flex: 1; border: none; background: none; padding: 9px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.authform { display: flex; flex-direction: column; gap: 12px; }
.authform label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.authform input, .authform select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 11px 16px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; }

/* ---- Structure de l'app ---- */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { display: none; }
.app-body { flex: 1; display: grid; grid-template-columns: 264px 1fr; min-height: 0; }
.bottomnav { display: none; }

.rail { background: var(--ink); color: #cfd8e3; display: flex; flex-direction: column; padding: 16px; gap: 14px; min-height: 0; }
.rail-head { display: flex; flex-direction: column; gap: 10px; }
.rail .wordmark { color: #fff; }
.city-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); color: #eaf0f6; border-radius: 999px; padding: 7px 12px; font-size: 13px; align-self: flex-start; max-width: 100%; overflow: hidden; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn { position: relative; text-align: left; background: none; border: none; color: #aeb9c7; padding: 9px 12px; border-radius: 8px; font-weight: 600; }
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.active { background: var(--accent); color: #fff; }
.badge { background: var(--amber); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 999px; font-weight: 700; }
.nav-btn .badge { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.rail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7f8ea0; font-weight: 700; margin-top: 2px; }
.room-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.room-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: #c3ccd8; font-size: 14px; border: none; background: none; text-align: left; width: 100%; }
.room-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.room-item.active { background: rgba(255,255,255,.16); color: #fff; }
.room-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-news { background: var(--amber); } .dot-event { background: #7c5cd6; }
.dot-general { background: #4a8fd4; } .dot-theme { background: var(--accent); }
.rail-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.me-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 8px 10px; text-align: left; color: inherit; }
.me-card:hover { background: rgba(255,255,255,.12); }
.me-col { display: flex; flex-direction: column; min-width: 0; }
.me-name { font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-edit { font-size: 11px; color: #9fb4c9; }
.rail-foot .link { color: #9fb4c9; text-align: left; }

.main { background: var(--paper); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.view { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.view-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.view-head h1, .view-head h2 { font-family: var(--font-display); font-size: 20px; margin: 0; font-weight: 700; }
.cat-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.cat-news { background: #f6ecd9; color: var(--amber); } .cat-event { background: #ece7fa; color: #6544c0; }
.cat-general { background: #e3eefb; color: #2f6cb0; } .cat-theme { background: #dcefe7; color: var(--accent-ink); }

/* ---- Messages de salon ---- */
.messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.room-hint { margin: auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.room-hint .btn-primary { display: none; }
.msg { max-width: 640px; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-author { font-weight: 700; font-size: 14px; }
.msg-author.sex-femme { color: #b5468a; } .msg-author.sex-homme { color: #2f6cb0; } .msg-author.sex-autre { color: var(--accent-ink); }
.msg-time { font-size: 11px; color: var(--muted); }
.msg-report { font-size: 11px; color: var(--muted); background: none; border: none; text-decoration: underline; }
.msg-body { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 9px 13px; line-height: 1.45; word-wrap: break-word; }
.msg-body.deleted { color: var(--muted); font-style: italic; background: var(--surface-2); }
.msg-media img, .msg-media video { max-width: 320px; max-height: 320px; border-radius: 10px; margin-top: 6px; display: block; }
.pending-tag { font-size: 11px; color: var(--amber); }
.typing { height: 20px; padding: 0 24px; font-size: 12px; color: var(--muted); font-style: italic; }

.composer { display: flex; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); align-items: center; }
.composer input[type=text], .composer input:not([type]) { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px; min-width: 0; }
.attach { font-size: 20px; cursor: pointer; user-select: none; }
.btn-send { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 999px; font-weight: 600; flex-shrink: 0; }
.attach-preview { padding: 8px 24px; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 13px; }
.attach-preview img, .attach-preview video { height: 44px; border-radius: 6px; }

/* ---- Messages privés ---- */
.pm-layout { flex: 1; display: grid; grid-template-columns: 280px 1fr; overflow: hidden; min-height: 0; }
.pm-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.pm-conv { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pm-conv:hover, .pm-conv.active { background: var(--surface-2); }
.pm-conv .pc-col { flex: 1; min-width: 0; }
.pm-conv .who { font-weight: 700; font-size: 14px; }
.pm-conv .snippet { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-conv .unread-chip { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 7px; flex-shrink: 0; }
.pm-thread { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.pm-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pm-bubble { max-width: 70%; padding: 8px 12px; border-radius: 12px; line-height: 1.4; }
.pm-bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.pm-bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.pm-receipt { align-self: flex-end; font-size: 11px; color: var(--muted); margin-top: -4px; }
.empty { color: var(--muted); padding: 30px; text-align: center; }
.pm-back { display: none; background: none; border: none; font-size: 15px; color: var(--accent-ink); font-weight: 600; padding: 10px 14px; text-align: left; }

/* ---- En ligne / recherche ---- */
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--online); display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(43,182,115,.25); }
.online-dot.big { width: 12px; height: 12px; }
.search-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.search-form input, .search-form select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }
.search-form input[type=number] { width: 108px; }
.search-form .ac { min-width: 190px; flex: 1; }
.search-form .ac input { width: 100%; }
.results-label { padding: 14px 24px 0; color: var(--muted); font-size: 13px; }
.results { flex: 1; overflow-y: auto; padding: 16px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; align-content: start; }
.ucard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ucard .u-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ucard .u-pseudo { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ucard .u-meta { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.ucard .u-bio { font-size: 13px; margin-bottom: 10px; min-height: 18px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ucard button { width: 100%; }

/* ---- Modales ---- */
.modal { position: fixed; inset: 0; background: rgba(23,38,59,.5); display: grid; place-items: center; padding: 20px; z-index: 60; }
.modal-card { background: var(--surface); border-radius: 16px; padding: 26px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow-y: auto; }
.modal-card h2 { font-family: var(--font-display); margin: 0; }
.modal-card select, .modal-card input, .modal-card textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 14px; align-items: center; margin-top: 6px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pf-avatar-row { display: flex; align-items: center; gap: 14px; }
.small-note { font-size: 12px; margin: 0; }

/* ---- Barre du haut + nav du bas + tiroir (mobile) ---- */
.menu-btn { background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; padding: 4px 11px; color: var(--ink); }
.backdrop { position: fixed; inset: 0; background: rgba(23,38,59,.45); z-index: 44; }

@media (max-width: 780px) {
  .app-body { grid-template-columns: 1fr; }

  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar .city-pill { margin-left: auto; background: var(--surface-2); border-color: var(--line); color: var(--ink); }

  .rail { position: fixed; z-index: 45; width: min(300px, 85vw); top: 0; bottom: 0; left: 0;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: 8px 0 30px rgba(0,0,0,.25);
    padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .rail.open { transform: none; }
  .rail .nav { display: none; }            /* la navigation passe en bas sur mobile */

  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); }
  .bn-btn { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: none; border: none; font-size: 11px; font-weight: 600; color: var(--muted); }
  .bn-btn .bn-ico { font-size: 19px; line-height: 1; }
  .bn-btn.active { color: var(--accent-ink); }
  .bn-btn .badge { position: absolute; top: 5px; right: calc(50% - 26px); }

  .main { padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); }
  .view-head { padding: 12px 16px; }
  .messages { padding: 14px 16px; }
  .composer { padding: 10px 12px; }
  .typing { padding: 0 16px; }
  .search-form { padding: 10px 16px; }
  .results { padding: 12px 16px 16px; grid-template-columns: 1fr 1fr; }
  .room-hint .btn-primary { display: inline-block; }
  .msg-media img, .msg-media video { max-width: 100%; }

  /* MP : une seule colonne, liste <-> fil */
  .pm-layout { grid-template-columns: 1fr; }
  .pm-layout.thread-open .pm-list { display: none; }
  .pm-layout:not(.thread-open) .pm-thread { display: none; }
  .pm-back { display: block; }
  .pm-bubble { max-width: 84%; }
}


/* ================= v3 ================= */

/* ---- Skins (couleur de l'interface) ---- */
body[data-skin="bleu"]    { --accent: #2563eb; --accent-ink: #1d4ed8; }
body[data-skin="violet"]  { --accent: #7c3aed; --accent-ink: #5b21b6; }
body[data-skin="rose"]    { --accent: #db2777; --accent-ink: #9d174d; }
body[data-skin="rouge"]   { --accent: #dc2626; --accent-ink: #991b1b; }
body[data-skin="orange"]  { --accent: #ea580c; --accent-ink: #9a3412; }
body[data-skin="ambre"]   { --accent: #b45309; --accent-ink: #78350f; }
body[data-skin="teal"]    { --accent: #0d9488; --accent-ink: #115e59; }
body[data-skin="cyan"]    { --accent: #0284c7; --accent-ink: #075985; }
body[data-skin="ardoise"] { --accent: #475569; --accent-ink: #1e293b; }

/* ---- Couleur des bulles de conversation (mes messages) ---- */
body { --bubble: var(--accent); }
body[data-bubble="vert"]    { --bubble: #1f7a5a; }
body[data-bubble="bleu"]    { --bubble: #2563eb; }
body[data-bubble="violet"]  { --bubble: #7c3aed; }
body[data-bubble="rose"]    { --bubble: #db2777; }
body[data-bubble="rouge"]   { --bubble: #dc2626; }
body[data-bubble="orange"]  { --bubble: #ea580c; }
body[data-bubble="ambre"]   { --bubble: #b45309; }
body[data-bubble="teal"]    { --bubble: #0d9488; }
body[data-bubble="cyan"]    { --bubble: #0284c7; }
body[data-bubble="ardoise"] { --bubble: #475569; }
.pm-bubble.me { background: var(--bubble); }
.msg.mine .msg-body { background: var(--bubble); color: #fff; border-color: transparent; border-radius: 12px 4px 12px 12px; }
.msg.mine { align-self: flex-end; }
.msg.mine .msg-head { justify-content: flex-end; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; padding: 0; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px var(--ink); }

/* ---- Avatars : rose (femme), bleu (homme), violet (autre) ---- */
.av { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; --sexc: #8b5cf6; background: var(--sexc); box-shadow: 0 0 0 2px var(--sexc); }
.av.sex-femme { --sexc: #e85d9e; } .av.sex-homme { --sexc: #3b82f6; } .av.sex-autre { --sexc: #8b5cf6; }
.av-sm { width: 34px; height: 34px; font-size: 15px; }
.av-md { width: 48px; height: 48px; font-size: 20px; }
.av-lg { width: 72px; height: 72px; font-size: 28px; }
.av-xl { width: 104px; height: 104px; font-size: 40px; }

/* ---- Autocomplétion de ville ---- */
.ac { position: relative; }
.ac input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.ac-list { position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(23,38,59,.16); max-height: 260px; overflow-y: auto; }
.ac-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: none; padding: 9px 12px; font-size: 14px; color: var(--ink); font-weight: 500; }
.ac-item small { color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item:hover, .ac-item.hl { background: var(--surface-2); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---- Liste "En ligne" ---- */
.ulist { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.urow { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.urow:hover { background: rgba(255,255,255,.55); }
.urow .u-col { flex: 1; min-width: 0; }
.urow .u-pseudo { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.urow .u-meta { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .btn-mini { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.msg-author { cursor: pointer; }

/* ---- Médias protégés, éphémères, plein écran ---- */
.media-wrap { position: relative; display: inline-block; margin-top: 6px; border-radius: 10px; overflow: hidden; cursor: zoom-in; max-width: 320px; background: #0f1a2a; line-height: 0; }
.media-wrap img, .media-wrap video { display: block; max-width: 100%; max-height: 320px; pointer-events: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.media-wrap .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.media-wrap.eph { cursor: pointer; min-width: 200px; min-height: 140px; }
.media-wrap.eph img { filter: blur(26px) brightness(.8); transform: scale(1.25); }
.media-wrap.eph .eph-bg { width: 220px; height: 150px; background: linear-gradient(135deg, #33415c, #5c677d 50%, #7d8597); filter: blur(6px); }
.eph-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.7); padding: 8px; }
.eph-cover .big { font-size: 26px; }
.media-expired { display: inline-block; margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; font-style: italic; }
.pm-bubble .media-wrap { max-width: 240px; }
.pm-bubble.me .media-expired { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,12,20,.94); display: flex; align-items: center; justify-content: center; }
.lb-stage { max-width: 96vw; max-height: 92vh; display: flex; }
.lb-stage img { max-width: 96vw; max-height: 92vh; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.lb-stage video { max-width: 96vw; max-height: 92vh; }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; }
.lb-timer { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 16px; z-index: 2; background: var(--amber); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 999px; font-size: 14px; }

.attach-preview .eph-opt { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.attach-preview select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }

/* ---- Profil : galerie, membres bloqués, fiche ---- */
.modal-card.wide { max-width: 520px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.gallery:empty::after { content: "Aucune photo pour l'instant."; color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.g-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #0f1a2a; cursor: zoom-in; }
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.g-item .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 24px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.g-item .g-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; }
.blocked-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.blocked-list:empty::after { content: "Aucun membre bloqué."; color: var(--muted); font-size: 13px; }
.blocked-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.up-head { display: flex; align-items: center; gap: 16px; }
.up-head h2 { display: flex; align-items: center; gap: 8px; }
.up-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-danger-soft { background: #f7e2dd; color: var(--danger); border: 1px solid #e6b7ae; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; }

@media (max-width: 780px) {
  .ulist { padding: 4px 14px 16px; }
  .search-form .ac { min-width: 100%; }
  .search-form select { flex: 1; min-width: 46%; }
  .search-form input[type=number] { flex: 1; width: auto; min-width: 30%; }
  .media-wrap { max-width: 100%; }
}


/* ================= v4 ================= */

/* ---- Skins : toute l'interface prend la couleur (barre latérale, barre du haut, navigation) ---- */
body { --rail: var(--ink); }
body[data-skin="vert"]    { --rail: #0b3b2c; }
body[data-skin="bleu"]    { --rail: #172554; }
body[data-skin="violet"]  { --rail: #2e1065; }
body[data-skin="rose"]    { --rail: #500724; }
body[data-skin="rouge"]   { --rail: #450a0a; }
body[data-skin="orange"]  { --rail: #431407; }
body[data-skin="ambre"]   { --rail: #3b1d05; }
body[data-skin="teal"]    { --rail: #042f2e; }
body[data-skin="cyan"]    { --rail: #082f49; }
body[data-skin="ardoise"] { --rail: #0f172a; }
.rail { background: var(--rail); }
.view-head { border-top: 3px solid var(--accent); }
.wordmark .dot { color: var(--accent); }
.rail .wordmark .dot, .topbar .wordmark .dot { color: #fff; opacity: .7; }

/* ---- En-têtes : actions ---- */
.head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-head { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.btn-head.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-head.leave { color: var(--danger); }
.view-head h1, .view-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Page "liste des salons" ---- */
.room-page, .room-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.room-page-list { flex: 1; overflow-y: auto; padding: 14px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; align-content: start; }
.room-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); }
.room-card:hover { border-color: var(--accent); }
.room-card .room-dot { width: 12px; height: 12px; }
.room-card .cat-badge { margin-left: auto; }

/* ---- Messages vocaux ---- */
.attach.mic { background: none; border: none; padding: 0; }
.voice { margin-top: 6px; }
.voice audio { height: 40px; max-width: 260px; display: block; }
.rec-bar { display: flex; align-items: center; gap: 12px; width: 100%; font-weight: 600; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .25; } }
.rec-bar .sp { flex: 1; }

/* ---- Webcams de salon ---- */
.cam-bar { display: flex; gap: 8px; align-items: center; padding: 8px 24px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; font-size: 13px; color: var(--muted); }
.cam-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; }
.cam-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cam-stage { display: flex; gap: 10px; padding: 10px 24px; background: #0f1a2a; align-items: flex-start; overflow-x: auto; }
.cam-tile { position: relative; background: #000; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.cam-tile video { display: block; height: 220px; max-width: 100%; background: #000; }
.cam-tile.self video { height: 110px; transform: scaleX(-1); }
.cam-tile .cam-label { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.cam-tile .cam-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; }
.cam-tile .cam-sound { position: absolute; top: 6px; right: 38px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 26px; padding: 0; cursor: pointer; }
.cam-wait { color: #cbd5e1; font-size: 13px; padding: 20px; }

/* ---- Appel vidéo privé ---- */
.call-overlay { position: fixed; inset: 0; z-index: 90; background: #0b1220; display: flex; align-items: center; justify-content: center; }
.call-remote { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.call-local { position: absolute; right: 16px; top: calc(16px + env(safe-area-inset-top)); width: 120px; border-radius: 10px; border: 2px solid rgba(255,255,255,.5); transform: scaleX(-1); background: #000; }
.call-status { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 16px; color: #fff; font-weight: 600; background: rgba(0,0,0,.45); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.call-hangup { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; border: none; border-radius: 999px; padding: 14px 28px; font-weight: 700; font-size: 15px; }
.call-incoming { position: fixed; z-index: 95; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.3); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; max-width: 94vw; flex-wrap: wrap; }

/* ---- Recherche : résumé + filtres repliables ---- */
.search-summary { padding: 8px 24px; font-size: 13px; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); }

@media (max-width: 780px) {
  .topbar { background: var(--rail); border-bottom: none; }
  .topbar .wordmark { color: #fff; }
  .topbar .brand .brand-light { display: none; }
  .topbar .brand .brand-dark { display: block; }
  .brand-sm { height: 30px; }
  .topbar .menu-btn { color: #fff; border-color: rgba(255,255,255,.3); }
  .topbar .city-pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
  .bottomnav { border-top: 3px solid var(--accent); }
  .rail .rail-label, .rail .room-list { display: none; }   /* sur mobile, les salons ont leur propre page */
  .rail { justify-content: space-between; }
  .room-page-list { padding: 12px 14px 16px; grid-template-columns: 1fr; }
  .cam-bar { padding: 8px 14px; } .cam-stage { padding: 8px 14px; }
  .cam-tile video { height: 170px; } .cam-tile.self video { height: 84px; }
  .search-summary { padding: 8px 16px; }
  .pm-back { display: none !important; }
  .btn-head { padding: 6px 10px; font-size: 12px; }
  .view-head h1, .view-head h2 { font-size: 17px; }
}


/* ================= v5 ================= */

/* ---- Skins harmonisés : teinte d'accent assez foncée pour du texte blanc, fond de page et
        surfaces légèrement teintés, barre latérale sombre de la même famille ---- */
body[data-skin="vert"]    { --accent: #1f7a5a; --accent-ink: #145f45; --rail: #0b3b2c; --paper: #e8f0ec; --surface-2: #f1f6f3; --line: #d3dfd9; }
body[data-skin="bleu"]    { --accent: #1d4ed8; --accent-ink: #1e3a8a; --rail: #172554; --paper: #e8eef9; --surface-2: #f1f5fc; --line: #d3dcee; }
body[data-skin="violet"]  { --accent: #6d28d9; --accent-ink: #4c1d95; --rail: #2e1065; --paper: #eeeaf8; --surface-2: #f5f2fb; --line: #dcd5ee; }
body[data-skin="rose"]    { --accent: #be185d; --accent-ink: #831843; --rail: #500724; --paper: #f8eaf1; --surface-2: #fcf2f7; --line: #eed5e1; }
body[data-skin="rouge"]   { --accent: #b91c1c; --accent-ink: #7f1d1d; --rail: #450a0a; --paper: #f8ebeb; --surface-2: #fcf3f3; --line: #eed6d6; }
body[data-skin="orange"]  { --accent: #c2410c; --accent-ink: #7c2d12; --rail: #431407; --paper: #f8eee7; --surface-2: #fcf5f0; --line: #eedccf; }
body[data-skin="ambre"]   { --accent: #92400e; --accent-ink: #693009; --rail: #3b1d05; --paper: #f5eee3; --surface-2: #faf5ee; --line: #e8dcc8; }
body[data-skin="teal"]    { --accent: #0f766e; --accent-ink: #134e4a; --rail: #042f2e; --paper: #e6f1f0; --surface-2: #f0f7f6; --line: #cfe1df; }
body[data-skin="cyan"]    { --accent: #0369a1; --accent-ink: #0c4a6e; --rail: #082f49; --paper: #e6f0f6; --surface-2: #f0f6fa; --line: #cfdfe9; }
body[data-skin="ardoise"] { --accent: #475569; --accent-ink: #1e293b; --rail: #0f172a; --paper: #eceff3; --surface-2: #f4f6f8; --line: #d7dde4; }
body[data-bubble="bleu"]   { --bubble: #1d4ed8; } body[data-bubble="violet"] { --bubble: #6d28d9; }
body[data-bubble="rose"]   { --bubble: #be185d; } body[data-bubble="rouge"]  { --bubble: #b91c1c; }
body[data-bubble="orange"] { --bubble: #c2410c; } body[data-bubble="ambre"]  { --bubble: #92400e; }
body[data-bubble="teal"]   { --bubble: #0f766e; } body[data-bubble="cyan"]   { --bubble: #0369a1; }
/* éléments qui étaient codés en vert fixe -> suivent l'accent */
.cat-theme { background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent-ink); }
.tab.active { color: var(--accent-ink); }
.gate { background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 12%, var(--paper)), var(--paper)); }
.urow:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.msg.mine .msg-body a, .pm-bubble.me a { color: #fff; }
.pm-bubble.me .pm-receipt { color: var(--muted); }

/* ---- Salon : répondre, actions, citation ---- */
.msg-act { font-size: 11px; color: var(--muted); background: none; border: none; text-decoration: underline; padding: 0; }
.msg-quote { border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 6px; padding: 5px 9px; margin-bottom: 3px; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; cursor: pointer; }
.msg-quote b { color: var(--ink); }
.msg.flash .msg-body { outline: 2px solid var(--accent); }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.reply-bar .rb-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar b { color: var(--ink); }

/* ---- Réactions emoji ---- */
.rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.msg.mine .rx { justify-content: flex-end; }
.rx-chip, .rx-add, .rx-pick button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 13px; line-height: 1.6; color: var(--ink); }
.rx-chip.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, #fff); font-weight: 700; }
.rx-add { opacity: .55; padding: 1px 6px; }
.rx-add:hover { opacity: 1; }
.rx-pick { display: inline-flex; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.rx-pick button { border: none; font-size: 17px; padding: 1px 4px; background: none; }
.pm-bubble .rx { margin-top: 5px; }
.pm-bubble.me .rx { justify-content: flex-end; }

/* ---- Sélecteur d'émoticônes pour écrire ---- */
.composer { position: relative; }
.emo-panel { position: absolute; bottom: calc(100% + 6px); left: 12px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(23,38,59,.18); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: min(330px, 92vw); }
.emo-panel button { background: none; border: none; font-size: 21px; padding: 4px; border-radius: 6px; }
.emo-panel button:hover { background: var(--surface-2); }

.pf-ages { display: flex; gap: 8px; }
.modal-card select { background: var(--surface); }

@media (max-width: 780px) {
  .reply-bar { padding: 8px 12px; }
  .composer { gap: 6px; }
  .composer .btn-send { padding: 10px 13px; }
}

/* ---- Bandeau de reconnexion ---- */
.conn-banner { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + 16px);
  background: var(--danger); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---- Genre "couple" : orange ---- */
.av.sex-couple { --sexc: #f97316; }
.msg-author.sex-couple { color: #c2410c; }

/* ---- Invités / vérification d'âge ---- */
.tabs .tab { font-size: 13px; padding: 9px 4px; }
.age-box { background: color-mix(in srgb, var(--amber) 12%, #fff); border: 1px solid color-mix(in srgb, var(--amber) 35%, #fff); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }


/* ================= v6 ================= */
.tagline strong { color: var(--ink); }
.gate-foot { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.lang-select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; width: auto; }
.theme-toggle.link { text-decoration: none; font-size: 18px; }
.btn-head.off { opacity: .5; }
.age-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.av-steps { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.av-steps strong { font-weight: 600; color: inherit; }
.age-actions .btn-primary { padding: 8px 14px; font-size: 14px; }
.pwd-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-items: flex-start; }
.modal-card details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.modal-card .pf-ages .lang-select { flex: 1; padding: 10px 12px; }

/* ---- Salons : liste par catégories ---- */
.room-page-list { display: block; max-width: 760px; }
.room-group { margin-bottom: 22px; }
.room-group-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin: 0 0 8px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; }
.room-row { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-top-width: 0; padding: 14px 16px; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink); }
.room-group .room-row:first-of-type { border-top-width: 1px; border-radius: 12px 12px 0 0; }
.room-group .room-row:last-of-type { border-radius: 0 0 12px 12px; }
.room-group .room-row:first-of-type:last-of-type { border-radius: 12px; }
.room-row:hover { background: var(--surface-2); }
.room-row .room-dot { width: 11px; height: 11px; }
.room-row .rn { flex: 1; min-width: 0; }
.room-row .room-go { color: var(--muted); font-size: 20px; line-height: 1; }
.room-list .rail-label { margin: 10px 0 2px 4px; }
.room-list .rail-label:first-child { margin-top: 0; }

/* ---- Mode nuit ---- */
body[data-theme="dark"] { --ink: #e7ecf3; --paper: #0f141b; --surface: #1a212b; --surface-2: #232c38; --line: #323d4b; --muted: #9aa7b6; --accent-ink: #e7ecf3; color-scheme: dark; }
body[data-theme="dark"] .gate { background: var(--paper); }
body[data-theme="dark"] .btn-primary:hover { background: var(--accent); filter: brightness(1.15); }
body[data-theme="dark"] .btn-primary, body[data-theme="dark"] .btn-send, body[data-theme="dark"] .nav-btn.active, body[data-theme="dark"] .urow .btn-mini { color: #fff; }
body[data-theme="dark"] .link { color: #9cc7ff; }
body[data-theme="dark"] .rail-foot .link { color: #9fb4c9; }
body[data-theme="dark"] .cat-news { background: #3d3015; color: #f1c573; }
body[data-theme="dark"] .cat-event { background: #2d2550; color: #c3b2f5; }
body[data-theme="dark"] .cat-general { background: #1b3050; color: #9cc7ff; }
body[data-theme="dark"] .cat-theme, body[data-theme="dark"] .rx-chip.mine { background: color-mix(in srgb, var(--accent) 35%, #1a212b); color: #fff; }
body[data-theme="dark"] .msg-author.sex-femme { color: #f08cc0; } body[data-theme="dark"] .msg-author.sex-homme { color: #8ab8f5; }
body[data-theme="dark"] .msg-author.sex-autre { color: #c3b2f5; } body[data-theme="dark"] .msg-author.sex-couple { color: #f7a565; }
body[data-theme="dark"] .age-box { background: #3d3015; border-color: #6b531f; }
body[data-theme="dark"] .btn-danger-soft { background: #4a1f18; border-color: #7a3327; color: #ffb4a6; }
body[data-theme="dark"] .error, body[data-theme="dark"] .btn-head.leave { color: #ff9c8a; }
body[data-theme="dark"] .urow:hover { background: rgba(255,255,255,.05); }
body[data-theme="dark"] .swatch.on { border-color: #1a212b; box-shadow: 0 0 0 3px #fff; }
body[data-theme="dark"] .tab.active { color: #fff; }
body[data-theme="dark"] .room-group-title { color: var(--muted); }
body[data-theme="dark"] input, body[data-theme="dark"] select, body[data-theme="dark"] textarea { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
body[data-theme="dark"] .emo-panel button, body[data-theme="dark"] .ac-item { color: var(--ink); }
body[data-theme="dark"] .menu-btn { color: #fff; }

@media (max-width: 780px) { .room-page-list { padding: 12px 14px 16px; } }

/* ---- Textes vides traduits (générés par la feuille de style) ---- */
html[lang="en"] .gallery:empty::after { content: "No photos yet."; }
html[lang="es"] .gallery:empty::after { content: "Aún no hay fotos."; }
html[lang="it"] .gallery:empty::after { content: "Ancora nessuna foto."; }
html[lang="en"] .blocked-list:empty::after { content: "No blocked members."; }
html[lang="es"] .blocked-list:empty::after { content: "Ningún miembro bloqueado."; }
html[lang="it"] .blocked-list:empty::after { content: "Nessun membro bloccato."; }

/* ---- Compteur de présents, salons adultes ---- */
.room-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.room-count.on { color: var(--online); }
.room-row .room-count { margin-right: 10px; }
.room-row .room-count + .room-go { margin-left: 0; }
.room-item .room-count { color: #8fa0b3; } .room-item .room-count.on { color: #6ee7a8; }
.adult-tag { font-size: 10px; font-weight: 800; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 6px; margin-left: 6px; letter-spacing: .03em; }
.legal-links { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.legal-links a, .rail-legal a { color: inherit; }
.rail-legal { font-size: 12px; color: #8fa0b3; }
.modal-card details summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }

/* ---- Protection (non garantie) contre les captures ---- */
body.shield .media-wrap img, body.shield .media-wrap video, body.shield .lb-stage, body.shield .cam-tile video,
body.shield .call-overlay video, body.shield .g-item img, body.shield .g-item video, body.shield .av { filter: blur(28px) brightness(.6) !important; }
.lb-stage, .cam-tile:not(.self), .call-overlay { position: relative; }
.lb-stage::after, .cam-tile:not(.self)::after { content: var(--viewer, ""); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.22); font-weight: 800; font-size: clamp(18px, 5vw, 44px); transform: rotate(-24deg); pointer-events: none; text-shadow: 0 0 2px rgba(0,0,0,.35); letter-spacing: .04em; }
.call-overlay::after { content: var(--viewer, ""); position: absolute; left: 16px; bottom: 16px; color: rgba(255,255,255,.3); font-weight: 700; pointer-events: none; }
@media print { body * { display: none !important; } body::before { content: "CityChat"; } }
html[lang="pt"] .gallery:empty::after { content: "Ainda não há fotos."; }
html[lang="pt"] .blocked-list:empty::after { content: "Nenhum membro bloqueado."; }

/* ---- Bandeau cookies ---- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 900; max-width: 760px; margin: 0 auto;
  background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 34px rgba(10, 20, 40, .22); padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cookie-banner.hidden { display: none; }
.cookie-text { flex: 1 1 320px; min-width: 0; }
.cookie-text strong { display: block; font-family: var(--font-display); font-size: 16px; margin-bottom: 2px; }
.cookie-text p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-actions button { padding: 9px 18px; border-radius: 10px; font-size: 14px; }
.cookie-links { flex-basis: 100%; margin: 0; font-size: 12px; }
.cookie-links a { color: var(--muted); }
@media (max-width: 560px) {
  .cookie-banner { padding: 14px; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}

/* ---- Admin : onglet Audience ---- */
#tab-audience.loading .kpis, #tab-audience.loading .viz-grid { opacity: .55; transition: opacity .2s; }
.viz-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.viz-filters button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.viz-filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.kpi-l { font-size: 12px; color: var(--muted); }
.kpi-v { font-size: 24px; font-weight: 600; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .viz-grid { grid-template-columns: 1fr; } }
.viz-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 8px; background: #fff; min-width: 0; }
.viz-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.viz { position: relative; }
.viz svg { display: block; overflow: visible; }
.viz svg rect[tabindex]:focus { outline: none; }
.viz .viz-col path { transition: opacity .12s; }
.viz .viz-col.on path { opacity: .82; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend .key-line { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }
.viz-legend .key-rect { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.viz-tip { position: absolute; top: 0; z-index: 5; pointer-events: none; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 25, 40, .12); padding: 7px 10px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.viz-tip-h { color: var(--muted); margin-bottom: 3px; }
.viz-tip-row { display: flex; align-items: center; gap: 6px; }
.viz-tip-row i { display: inline-block; width: 10px; height: 2px; border-radius: 2px; }
.viz-tip-row strong { font-variant-numeric: tabular-nums; }
.viz-tip-row span { color: var(--muted); }
.meter { height: 10px; border-radius: 999px; background: #dbe8f8; overflow: hidden; }
.meter-fill { height: 100%; background: #2a78d6; border-radius: 999px; }
.meter-fill.warn { background: #eda100; }
.meter-fill.crit { background: #d03b3b; }
.warnbox { margin: 8px 0 0; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #fff6e0; color: #6b4a00; }
.viz-table { margin-top: 14px; }
.viz-table summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.viz-table .tbl { font-size: 12px; margin-top: 8px; }
.viz-table td, .viz-table th { white-space: nowrap; text-align: right; }
.viz-table td:first-child, .viz-table th:first-child { text-align: left; }
.viz-table .tbl { width: 100%; border-collapse: collapse; }
.viz-table .tbl th, .viz-table .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.viz-table .tbl th { color: var(--muted); font-weight: 600; font-size: 11px; }

/* ---- Accueil : titre, pré-ouverture, vérification d'âge ---- */
.gate-h1 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; margin: 14px 0 4px; color: var(--ink); font-weight: 700; }
.gate-h1 + .tagline { margin-top: 4px; }
.launch-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0 0 16px; background: var(--surface-2); text-align: center; }
.launch-when { font-weight: 600; color: var(--ink); }
.launch-when::first-letter { text-transform: uppercase; }
.countdown { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.countdown span { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.countdown b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.launch-goal { margin-top: 12px; }
.launch-goal-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.launch-goal-bar > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.launch-goal-txt { margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ok-note { padding: 12px; border-radius: 10px; background: #e6f4ee; color: #145f45; margin: 0; }
body[data-theme="dark"] .ok-note { background: #173a2c; color: #bfe8d4; }
.wait-title { font-size: 16px; margin: 0; }
#prelaunchWait { gap: 10px; }
.age-pitch { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.age-pitch-icon { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.age-pitch strong { display: block; color: var(--ink); font-size: 14px; }
.age-pitch p { margin: 4px 0 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.age-pitch a { font-size: 13px; color: var(--accent-ink); }
body[data-theme="dark"] .age-pitch a { color: #9cc7ff; }
.home-text { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 12px 0 0; text-align: left; }
.staff-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 950; background: #3d3015; color: #f1c573; padding: 7px 14px; border-radius: 999px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none; }
@media (max-width: 780px) { .staff-banner { bottom: 70px; } }
.room-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: normal; line-height: 1.35; }
.room-desc { margin: 0; padding: 8px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); line-height: 1.45; }

/* ---- Pages publiques (salons, sécurité, FAQ) ---- */
body.pub { background: var(--paper, #f6f8fb); color: var(--ink); }
.pub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pub-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.pub-nav a { color: var(--ink); text-decoration: none; }
.pub-nav a:hover { text-decoration: underline; }
.pub-nav .pub-cta, .pub-btn { background: var(--accent); color: #fff !important; padding: 9px 16px; border-radius: 10px; font-weight: 600; text-decoration: none !important; display: inline-block; }
.pub-main { max-width: 860px; margin: 0 auto; padding: 28px 20px 40px; line-height: 1.6; }
.pub-main h1 { font-family: var(--font-display); font-size: 32px; line-height: 1.15; margin: 4px 0 10px; }
.pub-main h2 { font-family: var(--font-display); font-size: 21px; margin: 0 0 8px; }
.pub-main h3 { font-size: 17px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pub-lead { font-size: 17px; color: var(--muted); margin: 0 0 18px; }
.pub-section { margin: 26px 0; }
.pub-section ul, .pub-steps { padding-left: 20px; }
.pub-section li { margin: 6px 0; }
.pub-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pub-room { display: block; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pub-room:hover { border-color: var(--accent); }
.pub-room p { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.pub-live { font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.pub-live.big { font-size: 15px; margin: 0 0 12px; }
.pub-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #3d3015; color: #f1c573; }
.pub-desc { font-size: 16px; }
.pub-note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.pub-crumbs { font-size: 13px; color: var(--muted); margin: 0; }
.pub-crumbs a { color: var(--muted); }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-chips a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.pub-faq { margin: 18px 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pub-faq h2 { font-size: 18px; }
.pub-faq p { margin: 0; }
.pub-foot { text-align: center; font-size: 13px; color: var(--muted); padding: 20px; border-top: 1px solid var(--line); background: var(--surface); }
.pub-foot a { color: var(--muted); }
@media (max-width: 640px) { .pub-main h1 { font-size: 26px; } .pub-nav { gap: 10px; font-size: 13px; } }

/* ---- Admin : onglet Référencement ---- */
.seo-wrap { display: flex; flex-direction: column; gap: 22px; }
.seo-sec h3 { margin: 0 0 4px; font-size: 17px; }
.seo-sec > p.muted { margin: 0 0 10px; font-size: 13px; }
.seo-sec label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); margin: 8px 0; }
.seo-sec input:not([type=checkbox]), .seo-sec textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.seo-sec textarea { resize: vertical; }
.seo-sec .small { font-size: 12px; margin: 2px 0 6px; }
.seo-sec .cnt { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; }
.seo-sec .cnt.over { color: #b4561f; font-weight: 600; }
.seo-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface); }
.seo-row-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.seo-row-h a { font-size: 12px; }
.chk-inline { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.serp { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #f8f9fa; border: 1px dashed var(--line); font-family: Arial, sans-serif; }
.serp-url { font-size: 12px; color: #4d5156; }
.serp-title { font-size: 18px; color: #1a0dab; line-height: 1.3; margin: 2px 0; }
.serp-desc { font-size: 13px; color: #4d5156; line-height: 1.45; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.seo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.seo-actions button { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; }
.seo-actions button.danger { border-color: #d03b3b; color: #b42323; }
.seo-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; background: linear-gradient(transparent, var(--surface) 30%); margin-top: 10px; }
.desc-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 18px; width: min(640px, 92vw); }
.desc-dialog::backdrop { background: rgba(15, 25, 40, .35); }
.desc-dialog textarea { width: 100%; min-height: 180px; box-sizing: border-box; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.dlg-foot .cnt { margin-right: auto; }
.dlg-foot button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.dlg-foot .btn-primary { border: none; }
/* cases à cocher longues dans les formulaires d'accueil : texte sur plusieurs lignes, case à gauche */
.authform label.chk { flex-direction: row; align-items: flex-start; white-space: normal; font-weight: 400; line-height: 1.45; gap: 8px; }
.authform label.chk input { margin-top: 2px; flex: 0 0 auto; }
