/* Tableau de bord de modération CLEEQ — tokens de l'app (cleeq-app/src/theme/tokens.ts). */
:root {
  --primary: #1c0716;
  --primary-pressed: #3a1530;
  --accent: #d3124a;
  --premium: #b07a2a;
  --bg: #fbf4ec;
  --bg-subtle: #f5eae0;
  --white: #ffffff;
  --text: #1c0716;
  --text2: #3a2632;
  --text-secondary: #5b4651;
  --text-muted: #7a6670;
  --text-faint: #a8949c;
  --border: #e7d8cf;
  --border-soft: #efe2d9;
  --border-strong: #cdb9af;
  --blush: #f6e3dc;
  --success: #1e7f55;
  --success-tint: #e3f2ea;
  --warning: #a86200;
  --amber-tint: #fbefd9;
  --error: #c0262d;
  --error-tint: #fbe4e4;
  --verified: #3553c9;
  --disabled-bg: #e3d6cf;
  --disabled-fg: #9c8c93;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Mise en page : barre latérale + contenu ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; background: var(--white); border-right: 1px solid var(--border-soft); }
.side .brand { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 18px; }
.side .brand img { width: 96px; height: auto; }
.side .brand span { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--text2); font-weight: 500; text-align: left; text-decoration: none; }
.nav:hover { background: var(--bg-subtle); }
.nav[aria-current='page'] { background: var(--primary); color: var(--white); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--white); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side .me { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--border-soft); }
.side .me b { display: block; font-weight: 600; }
.logout { margin-top: 8px; padding: 6px 0; border: 0; background: none; color: var(--error); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }

.main { min-width: 0; padding: 32px 36px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font: 400 34px/1.1 var(--serif); letter-spacing: -0.01em; }
.head p { margin-top: 4px; color: var(--text-secondary); }

/* Téléphone : la barre latérale devient une barre du haut */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border-soft); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand { padding: 0 6px 0 2px; }
  .side .brand span { display: none; }
  .nav { flex: none; height: 38px; padding: 0 12px; font-size: 14px; }
  .nav .label-long { display: none; }
  .side .me { margin: 0 0 0 auto; padding: 0 4px; border: 0; flex: none; }
  .side .me b, .side .me .muted { display: none; }
  .logout { margin: 0; }
  .logout .txt { display: none; }
  .main { padding: 20px 16px 48px; }
  .head h1 { font-size: 28px; }
}

/* ---------- Éléments ---------- */
.card { background: var(--white); border: 1px solid var(--border-soft); border-radius: 22px; padding: 20px; }
.grid { display: grid; gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { display: block; padding: 18px 20px; border-radius: 22px; background: var(--white); border: 1px solid var(--border-soft); text-align: left; text-decoration: none; color: inherit; }
.stat:hover { border-color: var(--border-strong); }
.stat .n { font: 400 44px/1 var(--serif); }
.stat .l { margin-top: 8px; color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat.alert .n { color: var(--accent); }
.section-title { margin: 6px 0 12px; font-size: 16px; font-weight: 600; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-subtle); }
.seg button { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--text-secondary); font-weight: 600; font-size: 14px; }
.seg button[aria-pressed='true'] { background: var(--white); color: var(--text); box-shadow: 0 1px 2px rgba(28, 7, 22, 0.1); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--bg-subtle); color: var(--text2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.red { background: var(--error-tint); color: var(--error); }
.chip.amber { background: var(--amber-tint); color: var(--warning); }
.chip.green { background: var(--success-tint); color: var(--success); }
.chip.blue { background: #e6eafb; color: var(--verified); }
.chip.gold { background: #f6ecd9; color: var(--premium); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--white); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--border-strong); }
.btn.dark { background: var(--primary); border-color: var(--primary); color: var(--white); }
.btn.green { background: var(--success); border-color: var(--success); color: var(--white); }
.btn.red { background: var(--error); border-color: var(--error); color: var(--white); }
.btn.red-outline { color: var(--error); border-color: #efc4c6; }
.btn.big { height: 52px; padding: 0 22px; font-size: 16px; }
.btn:disabled { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-fg); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Fiche membre compacte */
.member { display: flex; gap: 16px; min-width: 0; }
.member .who { min-width: 0; }
.member .name { font: 400 24px/1.15 var(--serif); }
.member .name a { color: inherit; text-decoration: none; }
.member .name a:hover { text-decoration: underline; }
.member .meta { margin-top: 4px; color: var(--text-secondary); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.member .chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--blush) center/cover; display: grid; place-items: center; color: var(--text-faint); font: 400 26px/1 var(--serif); }

.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ph { position: relative; width: 96px; height: 128px; border-radius: 14px; overflow: hidden; background: var(--blush); border: 0; padding: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.pick { outline: 3px solid transparent; }
.ph.pick:hover, .ph.pick[aria-pressed='true'] { outline-color: var(--error); }
.ph .del { position: absolute; inset: auto 6px 6px auto; width: 28px; height: 28px; border-radius: 50%; background: var(--error); color: var(--white); display: none; place-items: center; }
.ph.pick[aria-pressed='true'] .del { display: grid; }
.bio { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-subtle); color: var(--text2); white-space: pre-wrap; }

.report { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1100px) { .report { grid-template-columns: 1fr; } }
.why { padding: 16px; border-radius: 16px; background: #fff7f5; border: 1px solid #f5d9d2; }
.why .reason { font-weight: 600; font-size: 16px; }
.why .details { margin-top: 8px; color: var(--text2); white-space: pre-wrap; }
.why .by { margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.card .foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); }

.verif { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
@media (max-width: 700px) { .verif { grid-template-columns: 1fr; } }
.selfie { width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: var(--blush); }
.selfie img { width: 100%; height: 100%; object-fit: cover; display: block; }
.label-sm { color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }

.row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border-soft); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row a.grow { color: inherit; text-decoration: none; }
.list { background: var(--white); border: 1px solid var(--border-soft); border-radius: 22px; padding: 4px 16px; }

.msg .topic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg .body { margin-top: 10px; white-space: pre-wrap; color: var(--text2); }

.search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--white); max-width: 520px; flex: 1; }
.search:focus-within { border-color: var(--primary); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; }
.field { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--white); font-size: 15px; outline: none; }
.field:focus { border-color: var(--primary); }
textarea.field { height: 92px; padding: 12px 14px; resize: vertical; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.empty { padding: 48px 20px; text-align: center; color: var(--text-secondary); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--blush); display: grid; place-items: center; color: var(--accent); }
.spinner { width: 24px; height: 24px; margin: 40px auto; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fenêtre de confirmation */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(28, 7, 22, 0.45); }
.dialog { width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; padding: 24px; border-radius: 24px; background: #fffbf7; display: grid; gap: 14px; }
.dialog h2 { font: 400 26px/1.15 var(--serif); }
.dialog .hint { color: var(--text-secondary); font-size: 14px; }
.dialog .actions { justify-content: flex-end; margin-top: 4px; }
.err { color: var(--error); font-size: 14px; font-weight: 500; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 30; padding: 12px 18px; border-radius: 14px; background: var(--primary); color: var(--white); font-weight: 500; opacity: 0; pointer-events: none; transition: 0.2s; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login form { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.login img { width: 110px; }
.login label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.login .field { height: 56px; border-radius: 16px; font-size: 17px; }
.login .btn { width: 100%; height: 56px; font-size: 17px; }
