/* MatesAI – feuille de style (mobile d'abord, 360 px → 1440 px) */
:root {
  --bg: #0E0F14; --s1: #1A1B22; --s2: #24252E; --s3: #2E2F39;
  --tx: #FFFFFF; --mu: #A9A3B0; --vi: #FF0F50; --cy: #FF5C85;
  --ok: #6FE3A6; --warn: #FFC56B; --err: #FF8FA3;
  --grad: linear-gradient(90deg, #FF0F50 0%, #FF0F50 100%);
  --grad135: linear-gradient(135deg, #FF0F50 0%, #FF0F50 100%);
  --r: 22px; --r-sm: 14px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cy); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
.ic { flex-shrink: 0; }
.muted { color: var(--mu); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------ Mise en page */
.app { min-height: 100vh; padding-bottom: 96px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 20px 24px; }
.wrap.wide { max-width: 1100px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 8px; }
.topbar .title { font-size: 18px; font-weight: 700; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.3px; font-size: 19px; color: var(--tx); }
.brand img { width: 30px; height: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 10px; }

/* ------------------------------------------------ Navigation */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 78px; padding: 6px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--s1); border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: flex-end; justify-content: space-around; }
.tabbar a { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--mu); font-size: 12px; font-weight: 500; text-decoration: none; }
.tabbar a.on { color: var(--cy); font-weight: 700; }
.tabbar a.scan { color: var(--tx); font-weight: 700; margin-top: -26px; }
.tabbar a.scan span.btn-arch { width: 56px; height: 56px; border-radius: 50%; color: #fff; background: var(--grad135); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(255,15,80,.35); }
.sidenav { display: none; }
@media (min-width: 960px) {
  .app { padding-bottom: 24px; padding-left: 240px; }
  .tabbar { display: none; }
  .sidenav { display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: 240px; padding: 24px 16px; background: var(--s1); border-right: 1px solid rgba(255,255,255,.06); z-index: 30; }
  .sidenav .brand { margin: 0 8px 24px; }
  .sidenav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--mu); font-weight: 600; text-decoration: none; }
  .sidenav a:hover { background: var(--s2); color: var(--tx); }
  .sidenav a.on { background: var(--s2); color: var(--cy); }
  .sidenav .cta { margin-top: 16px; background: var(--grad); color: #fff; justify-content: center; }
  .sidenav .spacer { flex: 1; }
  .wrap { padding-top: 28px; }
}

/* ------------------------------------------------ Composants */
.card { background: var(--s1); border-radius: var(--r); padding: 18px; border: 1px solid rgba(255,255,255,.04); }
.card.flat { background: var(--bg); border: 1px solid var(--s2); }
.card.grad { background: var(--grad135); color: #fff; border: 0; position: relative; overflow: hidden; }
.card.grad .watermark { position: absolute; right: -30px; bottom: -36px; opacity: .22; color: #fff; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--tx); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { text-decoration: none; background: rgba(255,255,255,.02); }
.list-item .meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.list-item .meta strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .amount { font-weight: 700; white-space: nowrap; }
.icon-chip { width: 44px; height: 44px; border-radius: 14px; background: var(--s2); display: flex; align-items: center; justify-content: center; color: var(--cy); flex-shrink: 0; }
.icon-chip.vi { color: var(--vi); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 30%; background: var(--s2); color: var(--cy); font-weight: 800; flex-shrink: 0; }
.avatar-ring { padding: 3px; border-radius: 34%; background: var(--grad135); display: inline-flex; }
.avatar-ring .avatar { background: var(--s1); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: rgba(255,15,80,.16); color: #FF8FAD; }
.badge.cy { background: rgba(255,92,133,.16); color: var(--cy); }
.badge.ok { background: rgba(111,227,166,.14); color: var(--ok); }
.badge.warn { background: rgba(255,197,107,.14); color: var(--warn); }
.badge.err { background: rgba(255,143,163,.14); color: var(--err); }
.badge.mu { background: var(--s2); color: var(--mu); }
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill { white-space: nowrap; padding: 8px 14px; border-radius: 12px; background: var(--s1); color: var(--mu); font-size: 14px; font-weight: 600; border: 1px solid var(--s2); text-decoration: none; }
.pill.on, .pill:hover { color: var(--tx); border-color: var(--cy); text-decoration: none; }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; background: var(--s1); }
.stat strong { font-size: 19px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--mu); text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { height: 84px; border-radius: 16px; border: 1px solid rgba(255,255,255,.06); background: var(--s1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--tx); font-size: 13px; font-weight: 600; text-decoration: none; }
.tile:hover { text-decoration: none; border-color: var(--s3); }
.tile .tile-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--s2); display: flex; align-items: center; justify-content: center; color: var(--cy); }
.balance { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.chip-dark { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 10px; background: var(--bg); color: var(--tx); }
.chip-light { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,.18); color: #fff; }
.empty { text-align: center; color: var(--mu); padding: 28px 12px; }
.divider { height: 1px; background: rgba(255,255,255,.06); margin: 4px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.kv span:first-child { color: var(--mu); }
.kv strong { text-align: right; }
.gauge { position: relative; width: 128px; height: 72px; flex-shrink: 0; }
.gauge strong { position: absolute; left: 0; right: 0; top: 38px; text-align: center; font-size: 18px; font-weight: 800; }

/* ------------------------------------------------ Formulaires */
label.lbl { display: block; font-size: 13px; color: var(--mu); margin: 0 0 6px; font-weight: 500; }
.field { margin-bottom: 14px; }
input:not([type]), input[type=text], input[type=url], input[type=file], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--s3); color: var(--tx); border-radius: var(--r-sm); padding: 13px 14px; font: inherit; font-size: 16px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--cy); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--mu); margin-top: 6px; }
.hint.ok { color: var(--ok); }
.hint.err { color: var(--err); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mu); }
.check input { margin-top: 3px; accent-color: var(--vi); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 999px; border: 0; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; color: #fff; background: var(--grad); }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--s2); color: var(--tx); font-weight: 700; border: 1px solid rgba(255,255,255,.06); }
.btn.outline { background: transparent; color: var(--tx); border: 1px solid var(--s3); font-weight: 700; }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 999px; }
.btn.danger { background: #3a1620; color: var(--err); }
.btn.google { background: #fff; color: #1f1f1f; font-weight: 700; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: var(--s1); color: var(--tx); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; text-decoration: none; }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--vi); }
.tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-opt input { display: none; }
.tag-opt span { display: inline-block; padding: 9px 13px; border-radius: 12px; border: 1px solid var(--s3); color: var(--mu); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.tag-opt input:checked + span { border-color: var(--vi); color: var(--tx); background: rgba(255,15,80,.14); }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; }
.alert.success { background: rgba(111,227,166,.12); color: var(--ok); }
.alert.error { background: rgba(255,143,163,.12); color: var(--err); }
.alert.info { background: rgba(255,92,133,.10); color: var(--cy); }
.alert.warn { background: rgba(255,197,107,.12); color: var(--warn); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--s2); }
.steps i.on { background: var(--grad); }
.code-box { font-size: 26px; font-weight: 800; letter-spacing: 4px; text-align: center; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--s3); }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.share-grid a, .share-grid button { height: 64px; border-radius: 14px; background: var(--s2); color: var(--tx); border: 0; font: inherit; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; }

/* ------------------------------------------------ Splash et accueil invité */
.splash { min-height: 100vh; background: var(--grad); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 20px; text-align: center; }
.splash .word { font-size: 38px; font-weight: 700; letter-spacing: -1px; }
.splash .tagline { font-size: 17px; max-width: 360px; opacity: .95; }
.splash .actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; }
.splash .btn.white { background: #fff; color: #23262F; }
.splash .btn.clear { background: rgba(14,15,20,.25); color: #fff; }
.guest { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px 40px; }
.guest .panel { width: 100%; max-width: 440px; }
.guest .brand { justify-content: center; margin-bottom: 24px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mu); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--s3); }
.lang-switch { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.lang-switch a { font-size: 13px; color: var(--mu); padding: 4px 8px; border-radius: 8px; }
.lang-switch a.on { color: var(--tx); background: var(--s2); }

/* ------------------------------------------------ Paiement QR */
.scanner { position: relative; width: 100%; aspect-ratio: 1; max-width: 320px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 14%; border-radius: 22px; box-shadow: 0 0 0 999px rgba(14,15,20,.45); }
.scanner .frame::before { content: ''; position: absolute; inset: 0; border-radius: 22px; padding: 4px; background: var(--grad135); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.route { display: flex; align-items: center; gap: 10px; }
.route .cur { font-size: 14px; font-weight: 700; padding: 8px 12px; border-radius: 12px; background: var(--s2); }
.route svg { flex: 1; }
.qr-box { background: #fff; padding: 16px; border-radius: 20px; width: 240px; height: 240px; margin: 0 auto; }
.qr-box canvas, .qr-box img { width: 100%; height: 100%; }

/* ------------------------------------------------ Stories */
.featured-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.featured-row::-webkit-scrollbar { display: none; }
.featured-card { position: relative; flex: 0 0 72%; max-width: 280px; aspect-ratio: 9/14; border-radius: 18px; overflow: hidden; background: var(--s2); scroll-snap-align: start; color: #fff; text-decoration: none; }
.thumb video, .featured-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.featured-card .overlay, .thumb .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; background: linear-gradient(180deg, rgba(14,15,20,0) 0%, rgba(14,15,20,.88) 100%); display: flex; flex-direction: column; gap: 4px; }
.sponsored { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: var(--grad); color: #fff; text-transform: uppercase; letter-spacing: .5px; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 700px) { .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } }
@media (min-width: 1200px) { .story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.thumb { position: relative; display: block; aspect-ratio: 9/16; border-radius: 14px; overflow: hidden; background: var(--s2); color: #fff; text-decoration: none; }
.gallery .thumb { border-radius: 6px; }
.thumb:hover { text-decoration: none; }
.thumb .t-title { font-size: 13px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb .t-meta { display: flex; align-items: center; gap: 4px; font-size: 11px; opacity: .9; }
.thumb .pin-flag { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: rgba(14,15,20,.7); }
.thumb .hidden-flag { position: absolute; top: 34px; right: 8px; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: rgba(255,143,163,.85); color: #0E0F14; }
.player { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; justify-content: center; }
.player .stage { position: relative; width: 100%; max-width: 480px; height: 100%; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,15,20,.6) 0%, rgba(14,15,20,0) 24%, rgba(14,15,20,0) 52%, rgba(14,15,20,.94) 100%); pointer-events: none; }
.player .top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; align-items: center; gap: 10px; }
.player .progress { position: absolute; left: 14px; right: 14px; top: 6px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.player .progress i { display: block; height: 100%; width: 0; background: var(--grad); }
.player .side { position: absolute; right: 12px; bottom: 210px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.player .side button, .player .side a { width: 50px; height: 50px; border-radius: 16px; border: 0; background: rgba(14,15,20,.55); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 11px; text-decoration: none; }
.player .side .on { color: var(--vi); }
.player .side .tipbtn { background: var(--grad135); }
.player .bottom { position: absolute; left: 18px; right: 74px; bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.player .bottom h2 { font-size: 26px; font-weight: 800; }
.player .navs { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.player .navs a { width: 40px; height: 40px; border-radius: 12px; background: rgba(14,15,20,.45); color: #fff; display: flex; align-items: center; justify-content: center; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--s1); border-radius: 24px 24px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; transform: translateY(110%); transition: transform .25s ease; }
.sheet.open { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--s3); margin: 0 auto 16px; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; display: none; }
.backdrop.open { display: block; }
.amount-opts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.amount-opts label input { display: none; }
.amount-opts label span { display: flex; height: 48px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--s3); font-weight: 700; cursor: pointer; }
.amount-opts label input:checked + span { border-color: var(--vi); background: rgba(255,15,80,.14); }

/* ------------------------------------------------ Profil */
.profile-head { display: flex; align-items: center; gap: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--s2); margin: 4px 0 12px; }
.tabs a { flex: 1; text-align: center; white-space: nowrap; font-size: 14px; padding: 12px 4px; color: var(--mu); font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none; }
.tabs a.on { color: var(--tx); border-color: var(--vi); }
.podium { display: flex; gap: 10px; align-items: flex-end; }
.podium .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; color: var(--tx); text-decoration: none; }
.podium .col strong { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .step { width: 100%; border-radius: 14px 14px 0 0; background: var(--s1); display: flex; justify-content: center; padding-top: 8px; font-size: 22px; font-weight: 800; }
#map { height: 60vh; min-height: 320px; border-radius: 18px; overflow: hidden; background: var(--s1); }
.city-group { margin-bottom: 18px; }

/* ------------------------------------------------ Tableaux (historique, admin) */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--s2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--s2); white-space: nowrap; }
table.tbl th { color: var(--mu); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; background: var(--s1); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td.wrap { white-space: normal; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* ------------------------------------------------ Back-office */
.admin-body { background: var(--bg); }
.admin { display: flex; flex-direction: column; min-height: 100vh; }
.admin-side { background: var(--s1); border-bottom: 1px solid rgba(255,255,255,.06); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.admin-side .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1px; color: var(--tx); text-decoration: none; }
.admin-side .brand img { width: 30px; height: 30px; }
.admin-side nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin-side nav a, .admin-me a, .admin-me button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--mu); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.admin-side nav a:hover, .admin-me a:hover, .admin-me button:hover { background: var(--s2); color: var(--tx); }
.admin-side nav a.on, .admin-me a.on { background: var(--s2); color: var(--cy); }
.admin-side .cnt { margin-left: auto; background: var(--vi); color: #fff; border-radius: 8px; font-size: 11px; padding: 1px 7px; }
.admin-me { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.admin-me a, .admin-me button { width: auto; }
.admin-me form { display: inline; }
.lang-mini { display: flex; gap: 4px; padding: 6px 12px; flex-wrap: wrap; }
.lang-mini a { font-size: 11px; font-weight: 700; color: var(--mu); padding: 3px 6px; border-radius: 6px; width: auto !important; }
.lang-mini a.on { background: var(--s2); color: var(--tx); }
.admin-main { flex: 1; padding: 18px 16px 40px; min-width: 0; }
.admin-main h1 { font-size: 24px; margin-bottom: 4px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--s1); border-radius: 16px; padding: 14px; border: 1px solid rgba(255,255,255,.04); }
.kpi span { font-size: 12px; color: var(--mu); display: block; }
.kpi strong { font-size: 22px; font-weight: 800; display: block; margin-top: 4px; }
.kpi em { font-style: normal; font-size: 12px; color: var(--cy); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 140px; padding: 9px 12px; font-size: 14px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input, .inline-form select { width: auto; padding: 7px 10px; font-size: 13px; }
.btn.tiny { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.grid2 { display: grid; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bars i { flex: 1; background: var(--grad); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars i b { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--mu); font-weight: 500; }
.tree { list-style: none; padding-left: 16px; border-left: 1px dashed var(--s3); }
.tree li { padding: 4px 0; }
code.k { font-size: 12px; background: var(--s2); padding: 2px 6px; border-radius: 6px; color: var(--cy); }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, minmax(0,1fr)); } .grid2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .admin { flex-direction: row; }
  .admin-side { position: sticky; top: 0; height: 100vh; width: 240px; flex-shrink: 0; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.06); padding: 20px 12px; }
  .admin-side nav { flex-direction: column; overflow: visible; flex: 1; overflow-y: auto; }
  .admin-me { flex-direction: column; align-items: stretch; }
  .admin-me a, .admin-me button { width: 100%; }
  .admin-main { padding: 28px 32px 48px; }
}

/* ------------------------------------------------ Envoi vidéo */
.up-preview { width: 100%; max-height: 360px; border-radius: 14px; background: #000; object-fit: contain; }
.up-progress { height: 8px; border-radius: 4px; background: var(--s2); overflow: hidden; }
.up-progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.hint.err { color: var(--err); }
.thumb .dur { position: absolute; right: 8px; top: 8px; z-index: 2; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(14,15,20,.7); color: #fff; }

/* ------------------------------------------------ En-tête de profil : couverture + photo */
.profile-hero { margin-bottom: 4px; }
.profile-cover { position: relative; height: 150px; border-radius: 22px; background-color: var(--s2); background-size: cover; background-position: center; overflow: hidden; }
.profile-cover.default { background-image: linear-gradient(135deg, #FF0F50 0%, #9B7BF0 50%, #FF5C85 100%); }
.profile-cover .cover-arch { position: absolute; right: -30px; bottom: -40px; width: 260px; }
@media (min-width: 700px) { .profile-cover { height: 220px; } }
.profile-id { display: flex; align-items: flex-start; gap: 14px; margin: -46px 0 0 16px; position: relative; }
.profile-id h2 { font-size: 22px; }
.profile-id .stack { padding-top: 54px; }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-ring.big { padding: 4px; border-radius: 36%; box-shadow: 0 0 0 4px var(--bg); }
.avatar-ring.big .avatar { border-radius: 32%; }
.profile-bio { margin: 10px 0 0; color: var(--tx); opacity: .85; }
.cam { width: 38px; height: 38px; border-radius: 12px; background: rgba(14,15,20,.65); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); }
.cam:hover { background: rgba(14,15,20,.85); }
.cover-edit { position: absolute; right: 12px; top: 12px; }
.avatar-edit { position: absolute; right: -4px; bottom: -4px; }
.avatar-edit .cam { width: 32px; height: 32px; border-radius: 10px; background: var(--grad135); box-shadow: 0 0 0 3px var(--bg); }
.cam.loading, label.loading .cam, label.loading { opacity: .5; pointer-events: none; }
img.avatar { display: inline-block; background: var(--s2); }
.uploading { position: relative; }
.uploading::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(14,15,20,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='14' fill='none' stroke='%235DE1E6' stroke-width='4' stroke-dasharray='60 30' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 18 18' to='360 18 18' dur='0.9s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat; z-index: 3; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: all .25s; z-index: 100; max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 14px; background: var(--s2); color: var(--tx); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.err { background: #3a1620; color: var(--err); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------ Lecteur vertical (glisser pour passer à la story suivante) */
.vplayer { position: fixed; inset: 0; background: #000; z-index: 50; }
.vfeed { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; }
.vfeed::-webkit-scrollbar { display: none; }
.vfeed .slide { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; }
.vfeed .stage { position: relative; width: 100%; max-width: 480px; height: 100%; }
.vfeed video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vfeed .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,15,20,.6) 0%, rgba(14,15,20,0) 24%, rgba(14,15,20,0) 52%, rgba(14,15,20,.94) 100%); pointer-events: none; }
.vfeed .top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; align-items: center; gap: 10px; }
.vfeed .progress { position: absolute; left: 14px; right: 14px; top: 6px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.vfeed .progress i { display: block; height: 100%; width: 0; background: var(--grad); }
.vfeed .side { position: absolute; right: 12px; bottom: 210px; display: flex; flex-direction: column; gap: 14px; align-items: center; z-index: 2; }
.vfeed .side button, .vfeed .side a { width: 50px; height: 50px; border-radius: 16px; border: 0; background: rgba(14,15,20,.55); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 11px; text-decoration: none; }
.vfeed .side .on { color: var(--vi); }
.vfeed .side .tipbtn { background: var(--grad135); }
.vfeed .bottom { position: absolute; left: 18px; right: 74px; bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; z-index: 1; }
.vfeed .bottom h2 { font-size: 24px; font-weight: 800; }
.vfeed .bottom .desc { max-height: 4.8em; overflow: hidden; }
.vfeed .paused-ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8); width: 92px; height: 92px; border-radius: 50%; background: rgba(14,15,20,.45); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .2s; pointer-events: none; }
.vfeed .slide.paused .paused-ic { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.vtop { position: absolute; left: 14px; top: 14px; z-index: 5; }
@media (min-width: 520px) { .vtop { left: calc(50% - 226px); } }
.vflash { position: absolute; left: 50%; transform: translateX(-50%); top: 64px; z-index: 6; width: min(92vw, 440px); }
.vnav { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 5; display: none; flex-direction: column; gap: 10px; }
.vnav button { width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vnav button:hover { background: rgba(255,255,255,.22); }
@media (hover: hover) and (min-width: 700px) { .vnav { display: flex; } }
.vend { height: 100vh; height: 100dvh; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--mu); }
.vhint { position: absolute; left: 50%; bottom: 42%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity .4s; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.vhint svg { transform: rotate(90deg); animation: vhint 1.2s ease-in-out infinite; }
.vhint.show { opacity: 1; }
@keyframes vhint { 0%, 100% { transform: rotate(90deg) translateX(0); } 50% { transform: rotate(90deg) translateX(-10px); } }
/* Code PIN : champ texte masqué (évite que le navigateur prenne le formulaire pour une connexion et y colle l'email) */
.pin-input { -webkit-text-security: disc; text-security: disc; letter-spacing: .35em; font-size: 20px !important; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--cy); }

/* ------------------------------------------------ MatesAI : onglets du fil (All / Me / Pros / Friends) */
.feed-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.18); align-self: flex-start; max-width: 100%; overflow-x: auto; }
.feed-tabs a { height: 36px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center; color: var(--tx); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.feed-tabs a:hover { background: var(--s2); text-decoration: none; }
.feed-tabs a[aria-current="page"] { background: var(--vi); font-weight: 600; }
/* Badge certifié Pro */
.pro-badge { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.pro-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(61,139,255,.16); color: #8DB8FF; font-size: 12px; font-weight: 600; }
.pill:has(input:checked) { background: var(--vi); color: #fff; border-color: var(--vi); }
.pill input[type=radio] { accent-color: #fff; }
/* MatesAI : pages Club */
.next-match { display: flex; flex-direction: column; gap: 4px; color: var(--tx); text-decoration: none; }
.next-match:hover { text-decoration: none; background: var(--s2); }
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.squad-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-sm); background: var(--s1); color: var(--tx); text-decoration: none; min-width: 0; }
a.squad-card:hover { background: var(--s2); text-decoration: none; }
.squad-card .grow { display: flex; flex-direction: column; }
.squad-num { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--vi); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.match-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.match-row:last-child { border-bottom: 0; }
.match-date { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; background: var(--s2); }
.match-date strong { font-size: 18px; line-height: 1; }
.match-date span { font-size: 11px; color: var(--mu); text-transform: uppercase; }
.match-teams { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; font-weight: 600; }
.match-teams span:last-child { text-align: right; }
.match-teams b { padding: 2px 10px; border-radius: 8px; background: var(--s2); font-size: 14px; white-space: nowrap; }

/* ------------------------------------------------ MatesAI lot 3 : boutique, panier, billets */
.ellipsis2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-btn { position: relative; }
.cart-btn .cnt { position: absolute; right: 2px; top: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--vi); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.prod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .prod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.prod-card { display: flex; flex-direction: column; gap: 8px; padding: 6px; border-radius: var(--r); background: var(--s1); color: var(--tx); text-decoration: none; min-width: 0; }
.prod-card:hover { background: var(--s2); text-decoration: none; }
.prod-img { position: relative; aspect-ratio: 1; border-radius: calc(var(--r) - 6px); background: var(--s2) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--mu); }
.prod-flag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: var(--vi); color: #fff; font-size: 11px; font-weight: 700; }
.prod-flag.out { left: auto; right: 8px; background: #000; }
.prod-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 6px 6px; min-width: 0; }
.prod-price { font-weight: 700; margin-top: 2px; }
.shop-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.shop-chip { flex: none; width: 116px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: var(--r); background: var(--s1); color: var(--tx); text-decoration: none; text-align: center; }
.shop-chip:hover { background: var(--s2); text-decoration: none; }
.shop-chip .avatar { border-radius: 50%; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border-radius: 50%; border: 3px solid var(--bg); margin-left: -10px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.pill.out { opacity: .45; text-decoration: line-through; }

/* Fiche produit (maquette 06) */
.pp { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 110px; background: var(--bg); }
.pp-hero { position: relative; height: 340px; border-radius: 0 0 32px 32px; background: #FFE3EB center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.pp-ph { color: #C8003A; opacity: .5; }
.pp-round { position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--s1); color: var(--tx); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.pp-body { padding: 18px 20px; gap: 12px; }
.pp-title { font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.pp-price { font-size: 24px; font-weight: 700; }
.pp-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; display: flex; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, var(--bg) 70%, rgba(14,15,20,0)); }
.pp-bar .btn { height: 56px; }

/* Panier */
.cart-line { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.cart-img { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--s2) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--mu); }
.cart-line .grow { display: flex; flex-direction: column; }
.cart-qty select { width: 76px; padding: 6px 8px; }
.cart-amt { width: 92px; text-align: right; white-space: nowrap; }
.kpi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi-row .card { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.kpi-row strong { font-size: 20px; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }

/* Billet (maquette 07) */
.ticket { border-radius: 30px; background: var(--s1); padding: 8px; display: flex; flex-direction: column; box-shadow: 0 18px 44px rgba(0,0,0,.35); }
.ticket.dim { opacity: .6; }
.ticket-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 6px; border-radius: 24px; background: linear-gradient(135deg, #2A0B18, #1A1B22); }
.ticket-head h2 { font-size: 21px; line-height: 1.15; }
.ticket-head .badge { align-self: flex-start; }
.ticket-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 8px; padding: 10px; border-radius: 18px; background: var(--s2); text-align: center; }
.ticket-grid span { display: block; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--mu); text-transform: uppercase; }
.ticket-grid strong { font-size: 15px; }
.ticket-cut { height: 0; border-top: 2px dashed var(--s3); margin: 6px 18px; }
.ticket-qr { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-white { background: #fff; padding: 10px; border-radius: 16px; }
.qr-white img, .qr-white canvas { display: block; }

/* Contrôle à l'entrée */
.checkin-result { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; border-radius: var(--r); text-align: center; }
.checkin-result.ok { background: #12301F; color: #BDF5D3; }
.checkin-result.ko { background: #3A1622; color: #FFC2D1; }
.checkin-result .big { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); }
.checkin-result strong { font-size: 22px; color: #fff; }
.pp { overflow-x: hidden; }
.pp .pill-row { flex-wrap: wrap; overflow: visible; }
.pp-bar .btn { white-space: nowrap; }
/* Lignes du tableau de bord boutique : actions sous le titre sur mobile */
.mg-row { flex-wrap: wrap; row-gap: 8px; }
.mg-row .meta { flex: 1 1 0; min-width: 0; }
.mg-row .meta strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 640px) { .mg-actions { flex-basis: 100%; justify-content: flex-end; } }
.shop-chip strong { display: block; width: 100%; font-size: 13px; line-height: 1.25; white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shop-chip { width: 132px; }
.cart-qty select { width: 66px; padding-left: 12px; padding-right: 22px; }
.cart-line .grow strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.field .pill-row, fieldset .pill-row, form .pill-row { flex-wrap: wrap; overflow: visible; }
.tbl .badge { white-space: nowrap; }
