/* ============================================================
   IRChat-Visio — Design tokens (minimal). Dark par defaut,
   light auto via prefers-color-scheme + override [data-theme].
   Vanilla pur : aucune dependance.
============================================================ */
:root {
  /* ---- Couleur : NEUTRES (dark, defaut) ---- */
  --bg:          #0B0C0E;   /* fond app, near-black froid */
  --surface:     #121317;   /* cartes, panneaux */
  --surface-2:   #181A1F;   /* champs, hover, zones creuses */
  --surface-3:   #1F222A;   /* actif / enfoncé */
  --scrim:       rgba(6,7,9,.72); /* overlays sur video */

  /* bordures = hairline en rgba (jamais de gris plein) */
  --border:      rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --border-hover:  rgba(255,255,255,.22);

  /* texte */
  --text:        #F2F3F5;   /* primaire,  ~15.9:1 sur --bg */
  --text-2:      #A8AEB8;   /* secondaire, ~6.3:1 (AA) */
  --text-3:      #70757E;   /* tertiaire / placeholder, ~3.4:1 (AA large/UI) */
  --text-on-accent: #FFFFFF;

  /* ---- Accent unique (brand / action) ---- */
  --accent:      #5E6AD2;   /* indigo Linear-like */
  --accent-hover:#6E79DE;
  --accent-press:#4E59BE;
  --accent-weak: rgba(94,106,210,.14); /* fond tenu, selections */
  --ring:        rgba(94,106,210,.55);  /* halo focus */

  /* ---- Semantique moderation / frontiere de pool ---- */
  --sfw:         #4F9CF2;   /* bleu calme = tout public */
  --sfw-weak:    rgba(79,156,242,.14);
  --nsfw:        #C98A3E;   /* ambre "mature/caution", jamais rose neon */
  --nsfw-weak:   rgba(201,138,62,.15);
  --nsfw-line:   rgba(201,138,62,.5);

  --ok:          #3FB37F;
  --warn:        #D9A441;
  --danger:      #E5554E;   /* kick/ban */
  --danger-hover:#EF6A63;
  --danger-weak: rgba(229,85,78,.14);

  /* ---- Pastilles de genre (micro-dots 8px uniquement) ---- */
  --g-woman:     #E0719C;
  --g-man:       #5B93E6;
  --g-couple:    #B57BDB;
  --g-other:     #46B29D;   /* non-binaire / autre */

  /* ---- Espacement : echelle 4px ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* ---- Rayons (moderes, jamais pill partout) ---- */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --r-full: 999px;

  /* ---- Ombres : quasi inexistantes, on mise sur les bordures ---- */
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px -8px rgba(0,0,0,.55);
  --shadow-pop: 0 12px 32px -10px rgba(0,0,0,.6);

  /* ---- Typographie ---- */
  --font: "Inter", "InterVariable", system-ui, -apple-system,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --fs-11: .6875rem; --fs-12: .75rem;  --fs-13: .8125rem;
  --fs-14: .875rem;  --fs-15: .9375rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-22: 1.375rem; --fs-28: 1.75rem; --fs-34: 2.125rem;
  --lh-tight: 1.15; --lh: 1.5;
  --tracking-h: -0.02em;  /* titres resserres */

  /* ---- Mouvement ---- */
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 240ms;
  --ease:     cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1); /* "soft" overshoot-free */

  /* ---- Layout ---- */
  --header-h: 52px;
  --side-w: 340px;
  --content-max: 1280px;
  color-scheme: dark;
}

/* ---- LIGHT ---- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #FBFBFC;
    --surface:   #FFFFFF;
    --surface-2: #F4F5F7;
    --surface-3: #ECEEF1;
    --scrim:     rgba(20,22,28,.55);
    --border:        rgba(10,12,20,.10);
    --border-strong: rgba(10,12,20,.16);
    --border-hover:  rgba(10,12,20,.26);
    --text:   #15171B;   /* ~15:1 */
    --text-2: #5B616B;   /* AA */
    --text-3: #878D96;
    --accent: #4F5BC4; --accent-hover: #434FB4; --accent-press: #3A45A2;
    --accent-weak: rgba(79,91,196,.10); --ring: rgba(79,91,196,.45);
    --sfw: #2F7FD6; --sfw-weak: rgba(47,127,214,.10);
    --nsfw:#A66A1E; --nsfw-weak: rgba(166,106,30,.12); --nsfw-line: rgba(166,106,30,.45);
    --danger:#D23B33; --danger-hover:#C2332B; --danger-weak: rgba(210,59,51,.10);
    --shadow-1: 0 1px 2px rgba(16,20,30,.08);
    --shadow-2: 0 8px 24px -8px rgba(16,20,30,.16);
    --shadow-pop:0 12px 32px -10px rgba(16,20,30,.2);
    color-scheme: light;
  }
}
[data-theme="dark"] { color-scheme: dark; } /* force dark (video = mieux sur sombre) */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* ============================================================
   Composants — minimal, hairline, mobile-first.
   (remplace style.css ; classes compatibles avec le markup actuel)
============================================================ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: var(--fs-15)/var(--lh) var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
}
::selection { background: var(--accent-weak); }

/* ---------- Header ---------- */
header {
  display: flex; align-items: center; gap: var(--s-3);
  height: var(--header-h); padding: 0 var(--s-4);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  position: sticky; top: 0; z-index: 30;
}
header .logo { font-weight: 650; letter-spacing: var(--tracking-h); font-size: var(--fs-15); }
header .logo span { color: var(--text-3); margin: 0 1px; } /* le "·" devient discret */
header .spacer { flex: 1; }

/* Badge statut : pastille + texte, lisible */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-12); color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 4px 10px 4px 8px; line-height: 1;
}
.badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-3); box-shadow: 0 0 0 0 transparent;
}
.badge[data-state="on"]::before   { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.badge[data-state="busy"]::before { background: var(--warn); }
.badge[data-state="off"]::before  { background: var(--text-3); }

/* ---------- Boutons ---------- */
button, .btn {
  --_bg: var(--accent); --_fg: var(--text-on-accent); --_bd: transparent;
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4);
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  border-radius: var(--r-md); font: 600 var(--fs-14)/1 var(--font);
  letter-spacing: -.01em; cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease),
              transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}
button:hover  { background: var(--accent-hover); }
button:active { transform: translateY(.5px) scale(.99); background: var(--accent-press); }
button.secondary {
  --_bg: var(--surface-2); --_fg: var(--text); --_bd: var(--border);
}
button.secondary:hover { background: var(--surface-3); border-color: var(--border-hover); }
button.ghost { --_bg: transparent; --_fg: var(--text-2); --_bd: transparent; }
button.ghost:hover { --_fg: var(--text); background: var(--surface-2); }
button.danger { --_bg: var(--danger-weak); --_fg: var(--danger); --_bd: color-mix(in srgb, var(--danger) 35%, transparent); }
button.danger:hover { --_bg: var(--danger); --_fg: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; } /* carre, icone seule */

/* Focus visible — anneau accent systematique */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring);
  border-radius: var(--r-md);
}

/* ---------- Champs ---------- */
input, select, textarea {
  width: 100%; min-height: 44px; /* cible tactile */
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 0 var(--s-3); font: var(--fs-15)/1.4 var(--font);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
textarea { padding: var(--s-3); min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
label { display: block; font-size: var(--fs-13); color: var(--text-2);
  margin: var(--s-4) 0 var(--s-2); font-weight: 500; }

/* ---------- Carte / Landing ---------- */
.center { flex: 1; display: grid; place-items: center; padding: var(--s-5) var(--s-4); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-6);
  width: min(440px, 100%); box-shadow: var(--shadow-2);
}
.card h1 { margin: 0 0 var(--s-1); font-size: var(--fs-28);
  letter-spacing: var(--tracking-h); line-height: var(--lh-tight); font-weight: 680; }
.card p.sub { margin: 0; color: var(--text-2); font-size: var(--fs-15); }

/* Cartes de mode (roulette / lobby) */
.modes { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.mode {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center;
  gap: var(--s-3); text-align: left; min-height: 64px; padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text); font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.mode:hover { border-color: var(--border-hover); background: var(--surface-2); }
.mode[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-weak); }
.mode .ico { font-size: 20px; opacity: .9; justify-self: center; }
.mode small { display: block; color: var(--text-2); font-weight: 400;
  font-size: var(--fs-13); margin-top: 2px; }

/* ---------- Grille de tuiles (lobby + admin) ---------- */
.grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: 1fr; /* mobile: 1 col */
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }

.tile {
  position: relative; background: #000; border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3;
  isolation: isolate;
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
/* vignette basse pour lisibilite du nom, sans alourdir */
.tile::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to top, var(--scrim), transparent); pointer-events: none; z-index: 1; }
.tile .name {
  position: absolute; left: var(--s-2); bottom: var(--s-2); z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-12); font-weight: 600; color: #fff;
  background: rgba(10,12,16,.55); border: 1px solid rgba(255,255,255,.1);
  padding: 4px 8px; border-radius: var(--r-full); backdrop-filter: blur(6px);
}
.tile.self { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.tile.self .name { color: #fff; }
/* micro-pastille genre */
.name .g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.g-dot.woman{background:var(--g-woman)} .g-dot.man{background:var(--g-man)}
.g-dot.couple{background:var(--g-couple)} .g-dot.other{background:var(--g-other)}

/* etat "recherche" roulette (skeleton shimmer discret) */
.tile .searching {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  gap: var(--s-2); color: var(--text-2); font-weight: 600; font-size: var(--fs-14);
  background:
    radial-gradient(120% 80% at 50% 40%, var(--surface-2), var(--bg));
}
.tile .searching::before { /* spinner fin 1px */
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin 720ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Panneau lateral + chat ---------- */
.room { flex: 1; display: grid; grid-template-columns: 1fr; min-height: 0; }
.stage { padding: var(--s-3); overflow: auto; }
.side {
  background: var(--surface); display: flex; flex-direction: column; min-height: 0;
  border-top: 1px solid var(--border);
}
.chat { flex: 1; overflow: auto; padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2); scrollbar-width: thin; }
.msg { font-size: var(--fs-14); line-height: 1.45; color: var(--text);
  max-width: 100%; word-wrap: break-word; }
.msg .who { font-weight: 650; color: var(--accent); margin-right: 6px; }
.msg.sys { color: var(--text-3); font-style: normal; font-size: var(--fs-13);
  padding: 2px 0; } /* messages systeme discrets, centres optionnel */
.chatbar { display: flex; gap: var(--s-2); padding: var(--s-3);
  border-top: 1px solid var(--border); }
.chatbar input { flex: 1; }
.controls { display: flex; gap: var(--s-2); padding: var(--s-3);
  border-top: 1px solid var(--border); flex-wrap: wrap; }
.controls button { flex: 1 1 auto; min-height: 44px; }

/* ---------- Roulette duo ---------- */
.duo { display: grid; gap: var(--s-3); height: 100%; grid-template-rows: 1fr; }
.duo .tile { aspect-ratio: auto; height: 100%; }

/* ---------- Chips de filtre (admin + options) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 0 12px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: var(--fs-13); font-weight: 550; cursor: pointer;
  transition: all var(--dur-1) var(--ease); user-select: none;
}
.chip:hover { border-color: var(--border-hover); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-weak); border-color: var(--accent);
  color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip.sfw[aria-pressed="true"]  { background: var(--sfw-weak);  border-color: var(--sfw);  color: var(--sfw); }
.chip.nsfw[aria-pressed="true"] { background: var(--nsfw-weak); border-color: var(--nsfw); color: var(--nsfw); }
.chip .count { font-variant-numeric: tabular-nums; color: var(--text-3);
  background: var(--surface-3); border-radius: var(--r-full); padding: 1px 7px; font-size: var(--fs-11); }

.hidden { display: none !important; }
.notice { font-size: var(--fs-12); color: var(--text-3); line-height: 1.5; margin-top: var(--s-4); }

/* ---------- Desktop : split stage/side ---------- */
@media (min-width: 900px) {
  .room { grid-template-columns: 1fr var(--side-w); }
  .side { border-top: 0; border-left: 1px solid var(--border); }
  .stage { padding: var(--s-4); }
  .duo { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
}
/* ============================================================
   IRChat-Visio — ajouts v2 (greffes du jury + composants genre/admin/roulette)
   Concatene APRES tokens.css + components.css.
============================================================ */

/* ---- Greffe : anti-zoom iOS (inputs >=16px en mobile) ---- */
@media (max-width: 560px) {
  input, select, textarea { font-size: 16px; }
}

/* ---- Greffe : fallback si pas de backdrop-filter ---- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header, .admin-toolbar { background: var(--surface); }
  .tile .name, .tile .mod-actions, .r-controls { background: rgba(10,12,16,.85); }
}

/* ---- Greffe : pulse de statut limite a 2 cycles a la connexion ---- */
@keyframes status-pulse {
  0%,100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 30%, transparent); }
}
.badge[data-state="on"].pulse::before { animation: status-pulse 900ms var(--ease) 2; }
.badge[data-state="busy"]::before { animation: status-pulse 1100ms var(--ease) infinite; }

/* ============================================================
   Fieldset / legend (sélecteurs de genre)
============================================================ */
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; font-size: var(--fs-13); color: var(--text-2); font-weight: 500;
  margin: var(--s-4) 0 var(--s-2); }

/* ---- Segmented control (« Je suis ») ---- */
.segmented { position: relative; display: grid; grid-auto-flow: column;
  grid-auto-columns: 1fr; gap: 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  position: relative; z-index: 1; display: inline-flex; align-items: center;
  justify-content: center; gap: 7px; min-height: 38px; margin: 0; padding: 0 6px;
  font-size: var(--fs-13); font-weight: 600; color: var(--text-2);
  border-radius: calc(var(--r-md) - 3px); cursor: pointer;
  transition: color var(--dur-1) var(--ease); white-space: nowrap; }
.segmented label .g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.segmented .thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px;
  width: calc((100% - 6px) / var(--n, 5));
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: calc(var(--r-md) - 3px); box-shadow: var(--shadow-1);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform var(--dur-2) var(--ease-out); }
.segmented input:checked + label { color: var(--text); }
.segmented input:focus-visible + label {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring);
  border-radius: calc(var(--r-md) - 3px); }
@media (max-width: 380px) {
  .segmented label .lbl-text { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); } /* icone/pastille seule, label accessible */
}

/* ---- « Montre-moi » : chips multi-select ---- */
.pref-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.gate { background: var(--surface-2); border: 1px solid var(--nsfw-line);
  border-radius: var(--r-md); padding: var(--s-3); margin-top: var(--s-3); }
.gate p { margin: 0 0 var(--s-2); font-size: var(--fs-12); color: var(--text-2); }
.chk { display: flex; align-items: center; gap: var(--s-2); min-height: 36px;
  font-size: var(--fs-14); color: var(--text); cursor: pointer; }
.chk input { width: auto; min-height: 0; }

/* Roulette : le LAYOUT de la vue cam est piloté par theme.css. On ne garde ici que
   le positionnement de base du hint + l'animation de match (non définis par le thème). */
.r-hint { position: absolute; left: 50%; transform: translateX(-50%); z-index: 32;
  display: flex; gap: var(--s-2); align-items: center; }
@keyframes pop-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.tile video.just-matched { animation: pop-in var(--dur-3) var(--ease-out); }

/* ============================================================
   Console admin v2 : toolbar + tuiles enrichies + menu d'actions
============================================================ */
.admin-toolbar {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  overflow-x: auto; scrollbar-width: none; }
.admin-toolbar::-webkit-scrollbar { display: none; }
.toolbar-group { display: flex; gap: var(--s-2); align-items: center; flex: none;
  padding-right: var(--s-3); border-right: 1px solid var(--border); }
.toolbar-group:last-child { border-right: 0; }
.toolbar-group .lbl { font-size: var(--fs-11); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); margin-right: 2px; }
.toolbar-group select { width: auto; min-height: 36px; }

.tile.nsfw { box-shadow: inset 0 0 0 1px var(--nsfw-line); }
.tile .pool-badge { position: absolute; top: var(--s-2); left: var(--s-2); z-index: 2;
  font-size: var(--fs-11); font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--nsfw-weak); color: var(--nsfw); border: 1px solid var(--nsfw-line); }
.tile.sfw .pool-badge { background: var(--sfw-weak); color: var(--sfw);
  border-color: color-mix(in srgb, var(--sfw) 40%, transparent); }
.tile .reports { position: absolute; top: var(--s-2); left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: var(--fs-11); font-weight: 700; padding: 2px 7px;
  border-radius: var(--r-full); background: var(--danger); color: #fff; }
.tile .mod-actions { position: absolute; top: var(--s-2); right: var(--s-2); z-index: 3;
  display: flex; gap: 4px; padding: 4px; border-radius: var(--r-full);
  background: rgba(10,12,16,.6); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out); }
.tile:hover .mod-actions, .tile:focus-within .mod-actions { opacity: 1; transform: none; }
@media (hover: none) { .tile .mod-actions { opacity: 1; transform: none; } }
.mod-actions button { min-height: 34px; width: 34px; padding: 0; border-radius: var(--r-sm);
  background: transparent; color: #fff; border: 0; font-size: 15px; }
.mod-actions button:hover { background: rgba(255,255,255,.14); }
.mod-actions button.danger { color: var(--danger-hover); }
.mod-actions button.danger:hover { background: var(--danger); color: #fff; }

.empty-state { grid-column: 1 / -1; text-align: center; color: var(--text-3);
  padding: var(--s-7) var(--s-4); font-size: var(--fs-14); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }



/* ---- Page compte (/login.html) ---- */
.tabs { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.tab { flex: 1; min-height: 40px; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-md); font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--accent-weak); border-color: var(--accent); color: var(--text); }
.auth-form label { color: var(--text-2); }
.row { display: flex; gap: var(--s-2); margin-top: var(--s-4); }
.row .btn, .row a.btn { flex: 1; text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 var(--s-4); background: var(--accent); color: #fff;
  border-radius: var(--r-md); font-weight: 600; }

/* ---- Sélecteur de langue + lien auth (header) ---- */
.lang { width: auto; min-height: 34px; padding: 0 var(--s-2); font-size: var(--fs-13); }
.navlink { color: var(--text-2); text-decoration: none; font-size: var(--fs-13);
  font-weight: 600; padding: 6px 10px; border-radius: var(--r-md); white-space: nowrap; }
.navlink:hover { color: var(--text); background: var(--surface-2); }
.who { color: var(--text-2); font-size: var(--fs-14); margin: var(--s-2) 0 0; }
@media (max-width: 480px) { .lang { max-width: 90px; } .navlink { display: none; } }

/* ---- Barre de signalements (admin) ---- */
.reports-bar { position: sticky; top: calc(var(--header-h) + 54px); z-index: 19;
  display: flex; align-items: center; gap: var(--s-2); overflow-x: auto; scrollbar-width: none;
  padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--nsfw-line);
  background: color-mix(in srgb, var(--danger-weak) 70%, var(--surface)); }
.reports-bar::-webkit-scrollbar { display: none; }
.rb-lbl { font-size: var(--fs-12); font-weight: 700; color: var(--danger); flex: none; }
.report-item { display: inline-flex; align-items: center; gap: 4px; flex: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 2px 2px 2px 4px; }
.report-item .ri-who { background: transparent; border: 0; color: var(--text); font-size: var(--fs-12);
  min-height: 28px; padding: 0 8px; cursor: pointer; }
.report-item .ri-dismiss { min-height: 26px; width: 26px; padding: 0; border-radius: var(--r-full);
  font-size: var(--fs-12); }

/* ---- Suggestions de tags ---- */
.tag-suggest { margin-top: var(--s-2); max-height: 112px; overflow-y: auto; }
.tag-suggest .chip { min-height: 32px; font-size: var(--fs-12); }

/* ---- Fix sélecteur « Je suis » : visible dans tous les thèmes (clair/sombre) ----
   theme.css redéfinit --surface (≈ blanc) == fond du segmented → le .thumb était invisible.
   On matérialise l'état coché par un remplissage ACCENT (contraste garanti), curseur retiré. */
.segmented .thumb { display: none !important; }
.segmented label { transition: background .12s ease, color .12s ease; }
.segmented input:checked + label { background: var(--accent); color: var(--text-on-accent); }
.segmented input:focus-visible + label { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring); }


/* signe de genre au-dessus du pseudo */
.gsign-badge { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: rgba(10,12,16,.58); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gsign-badge .sym { font-size: 20px; line-height: 1; font-weight: 700; }
.gsign-badge .lbl { font-size: 12px; font-weight: 600; color: #fff; }
#rv-self-tile .gsign-badge { top: 6px; padding: 2px 7px; gap: 3px; }
#rv-self-tile .gsign-badge .sym { font-size: 13px; }
#rv-self-tile .gsign-badge .lbl { display: none; }

/* === Pack conformité : footer légal + encart sécurité === */
.footer-legal{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:center}
.footer-legal a{color:var(--text-2);text-decoration:none;font-size:12px}
.footer-legal a:hover{color:var(--accent);text-decoration:underline}
.safety-note{display:flex;gap:10px;align-items:flex-start;margin:14px 0 4px;padding:12px 14px;background:var(--surface-2);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:12px}
.safety-note .icon{flex:0 0 auto;width:20px;height:20px;color:var(--accent);margin-top:1px}
.safety-note p{margin:0;font-size:12.5px;line-height:1.6;color:var(--text-2)}
.safety-note a{color:var(--accent);font-weight:600}

/* === Admin : bandeau trafic + tuiles en recherche + lightbox === */
.admin-stats{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border);font-size:13px;color:var(--text-2)}
.admin-stats .st{display:inline-flex;align-items:center;gap:5px}
.admin-stats .st b{color:var(--text);font-size:15px}
.admin-stats .st small{opacity:.7}
.admin-stats .gender{margin-left:auto;font-size:14px;letter-spacing:1px}
.tile.waiting{display:flex;align-items:center;justify-content:center;background:var(--surface-2);min-height:150px}
.tile.waiting .wait-ph{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--text-2);font-size:12px;text-align:center;padding:10px}
.tile.waiting .wait-spin{width:26px;height:26px;border-radius:50%;border:2px solid var(--border-strong,#ccc);border-top-color:var(--accent);animation:spin 800ms linear infinite}
.lightbox{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:rgba(10,10,15,.88);backdrop-filter:blur(4px)}
.lightbox.hidden{display:none}
.lightbox .lb-inner{max-width:92vw;max-height:88vh;display:flex;flex-direction:column;gap:10px;align-items:center}
.lightbox video{max-width:92vw;max-height:80vh;border-radius:14px;background:#000;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.lightbox .lb-novideo{color:#fff;font-size:15px;padding:60px;border:1px dashed rgba(255,255,255,.3);border-radius:14px}
.lightbox #lb-info{color:#fff;font-size:15px;font-weight:600}
.lightbox #lb-close{position:fixed;top:18px;right:22px;width:42px;height:42px;border-radius:50%;border:none;background:rgba(255,255,255,.15);color:#fff;font-size:20px;cursor:pointer;z-index:101}
.lightbox #lb-close:hover{background:rgba(255,255,255,.3)}
