/* ===== profile-x / style2.css v2 ===== */
:root { --brand-rgb: 249, 115, 22; --brand-grad: linear-gradient(135deg, #fb923c, #f97316 55%, #ea580c); --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.4, .64, 1); --px-fs: 14.5px; --ok: #22c55e; }
html[data-accent="blue"] { --brand: #2563eb; --brand-dark: #1d4ed8; --brand-light: #eff6ff; --brand-rgb: 37, 99, 235; --brand-grad: linear-gradient(135deg, #60a5fa, #3b82f6 55%, #2563eb); }
html[data-accent="green"] { --brand: #16a34a; --brand-dark: #15803d; --brand-light: #f0fdf4; --brand-rgb: 22, 163, 74; --brand-grad: linear-gradient(135deg, #4ade80, #22c55e 55%, #16a34a); }
html[data-theme="dark"][data-accent="blue"] { --brand-light: #0c1a33; --brand-dark: #60a5fa; }
html[data-theme="dark"][data-accent="green"] { --brand-light: #0a2415; --brand-dark: #4ade80; }
body.x-lock { overflow: hidden; }
body.x-reduce *, body.x-reduce *::before, body.x-reduce *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.post-corps, .px-bio { font-size: var(--px-fs); }

/* ----- structure ----- */
.px-topbar { backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 1px 0 var(--border); }
.px-cover-wrap { background: var(--brand-grad); }
.px-cover-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, .18)); pointer-events: none; }
.px-cover[data-empty="1"] { background: var(--brand-grad); }
.px-avatar { overflow: visible; background: var(--brand-grad); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .35), 0 10px 26px rgba(0, 0, 0, .18); }
.px-avatar img { border-radius: 50%; }
.px-avatar-upload { right: auto; left: 2px; }
.px-name { letter-spacing: -.4px; }
.px-btn.primary { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(var(--brand-rgb), .35); }
html[data-theme="dark"] .px-btn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; }
.px-tabs { background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: 0 1px 0 var(--border); border-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.px-tabs::-webkit-scrollbar { display: none; }
.px-tab { white-space: nowrap; min-width: 0; padding: 15px 4px; }
.px-tab.active::after { background: var(--brand-grad); width: 44px; height: 4px; }
.post-avatar { background: var(--brand-grad); }
.user-list-avatar, .comment-avatar, .cert-user-avatar { background: var(--brand-grad); position: relative; }
.user-list-avatar { overflow: visible; }
.user-list-avatar img { border-radius: 50%; }
.user-list-follow-btn { background: var(--brand-grad); color: #fff; }
.user-list-follow-btn.following { background: var(--bg-soft); color: var(--text-2); }
.toast { border-radius: 14px; }
.px-private-badge { vertical-align: middle; }
.px-follows-you { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; background: var(--bg-soft); color: var(--text-2); margin-left: 6px; vertical-align: middle; }
.x-copy { cursor: pointer; }
.x-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.x-more { border: 0; background: transparent; color: var(--brand); font-weight: 800; font-size: 13.5px; padding: 0 0 10px; cursor: pointer; font-family: inherit; }
.px-follow-counts { flex-wrap: wrap; row-gap: 6px; }
.px-follow-counts .x-likes b { color: var(--text); font-weight: 700; }

/* ----- présence ----- */
.px-online-dot { position: absolute; right: 6%; bottom: 6%; width: 22%; height: 22%; min-width: 14px; min-height: 14px; max-width: 28px; max-height: 28px; border-radius: 50%; background: #94a3b8; border: 3px solid var(--bg); display: none; z-index: 3; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.px-online-dot.on { display: block; background: var(--ok); animation: xPulse 2s infinite; }
.user-list-avatar .px-online-dot { width: 13px; height: 13px; min-width: 0; min-height: 0; border-width: 2px; right: -1px; bottom: -1px; }
@keyframes xPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.px-presence { font-size: 13px; color: var(--text-2); margin: -6px 0 10px; display: flex; align-items: center; gap: 6px; }
.px-presence:empty { display: none; }
.px-pres-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.px-pres-dot.on { background: var(--ok); }

/* ----- boutons et puces ----- */
.x-row-main { display: flex; gap: 8px; margin-top: 14px; }
.x-btn { flex: 1; min-width: 0; border: 0; border-radius: 100px; padding: 11px 14px; background: var(--bg-soft); color: var(--text); font-weight: 800; font-size: 14px; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: transform .15s var(--spring), opacity .15s; box-shadow: inset 0 0 0 1px var(--border); text-decoration: none; }
.x-btn:active { transform: scale(.95); }
.x-btn:disabled { opacity: .55; }
.x-btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 18px rgba(var(--brand-rgb), .38); }
.x-btn-icon { flex: 0 0 46px; padding: 11px 0; }
.x-btn.is-friend { color: var(--ok); }
.x-btn.is-pending { color: var(--text-2); }
.x-btn.is-incoming { background: var(--brand-light); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.x-wide { width: 100%; flex: none; margin-top: 12px; }
.x-danger-btn { width: 100%; flex: none; margin-top: 12px; color: #dc2626; }
.x-two { display: flex; gap: 8px; margin-top: 12px; }
.x-quick { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.x-quick::-webkit-scrollbar { display: none; }
.x-quick a { flex: 1; text-align: center; text-decoration: none; padding: 10px 12px; border-radius: 14px; background: var(--bg-soft); color: var(--text); font-weight: 700; font-size: 13px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--border); }
.x-quick a i { color: var(--brand); margin-right: 6px; }
.x-note { display: flex; gap: 10px; margin-top: 10px; padding: 11px 14px; border-radius: 14px; background: #fef9c3; color: #713f12; font-size: 13.5px; line-height: 1.4; cursor: pointer; }
html[data-theme="dark"] .x-note { background: #2b2410; color: #fde68a; }
.x-chip { border: 0; border-radius: 100px; padding: 8px 14px; background: var(--bg-soft); color: var(--text); font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--border); transition: transform .15s var(--spring); }
.x-chip:active { transform: scale(.94); }
.x-chip.active { background: var(--brand-grad); color: #fff; box-shadow: none; }
.x-chip i { margin-right: 5px; }
.x-chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----- blocs du profil ----- */
.x-complete, .x-stats, .x-suggest { margin: 6px 12px 12px; padding: 14px; border-radius: 20px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); }
.x-complete-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.x-complete-top span { font-size: 12px; color: var(--text-3); }
.x-bar { height: 8px; border-radius: 100px; background: var(--border); overflow: hidden; margin-bottom: 10px; }
.x-bar i { display: block; height: 100%; background: var(--brand-grad); border-radius: 100px; transition: width .6s var(--ease); }
.x-stats-head { width: 100%; border: 0; background: transparent; color: var(--text); font-weight: 800; font-size: 15px; font-family: inherit; display: flex; justify-content: space-between; align-items: center; padding: 0; cursor: pointer; }
.x-stats-head > span i { color: var(--brand); margin-right: 8px; }
.x-stats-head > i { color: var(--text-3); transition: transform .2s; }
.x-stats.closed .x-stats-head > i { transform: rotate(-90deg); }
.x-stats.closed .x-stats-body { display: none; }
.x-stats-body { margin-top: 12px; }
.x-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.x-stat { background: var(--bg); border-radius: 16px; padding: 12px; box-shadow: inset 0 0 0 1px var(--border); }
.x-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.x-stat span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.x-spark-title { margin: 14px 2px 2px; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; }
.x-spark-title span { color: var(--brand); }
.x-badgestrip { display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 0 12px 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); text-align: left; cursor: pointer; font-family: inherit; color: var(--text); }
.x-bs-ico { font-size: 26px; }
.x-block-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.x-block-title i { color: var(--brand); }
.x-suggest-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.x-suggest-row::-webkit-scrollbar { display: none; }
.x-sg { flex: 0 0 150px; background: var(--bg); border-radius: 18px; padding: 14px 10px 12px; text-align: center; box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.x-sg-av { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--brand-grad); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.x-sg-av img { width: 100%; height: 100%; object-fit: cover; }
.x-sg b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-sg small { color: var(--text-3); font-size: 12px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-sg-r { font-style: normal; font-size: 11px; color: var(--text-3); min-height: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-sg .x-btn { flex: none; width: 100%; margin-top: 8px; padding: 8px; font-size: 13px; }

/* ----- barre d'outils des posts et médias ----- */
.x-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.x-toolbar::-webkit-scrollbar { display: none; }
.x-tsearch { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border-radius: 100px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--border); }
.x-tsearch i { color: var(--text-3); font-size: 13px; }
.x-tsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 0; font-size: 14px; color: var(--text); font-family: inherit; }
.x-tsearch button { border: 0; background: transparent; color: var(--text-3); padding: 4px; cursor: pointer; }
.x-count { font-size: 12px; color: var(--text-3); font-weight: 700; white-space: nowrap; }
.x-feed-empty { text-align: center; color: var(--text-3); padding: 40px 20px; font-size: 14px; }
.px-feed .post.x-hide { display: none !important; }
.px-feed.x-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.px-feed.x-grid .post { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--bg-soft); animation: none; }
.px-feed.x-grid .post-avatar-col, .px-feed.x-grid .post-pinned-tag, .px-feed.x-grid .post-content-col > *:not(.post-image-wrap) { display: none !important; }
.px-feed.x-grid .post-row, .px-feed.x-grid .post-content-col { display: block; height: 100%; }
.px-feed.x-grid .post-image-wrap { margin: 0; border: 0; border-radius: 0; height: 100%; }
.px-feed.x-grid .post-image-wrap img { height: 100%; max-height: none; }
body.x-compact .post-image-wrap img { max-height: 190px; }
body.x-compact .post { padding-top: 8px; padding-bottom: 8px; }
.x-popbar { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 8px; }
.x-popbar .x-tsearch { padding: 0 14px; }
.x-bio-count { text-align: right; font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ----- feuilles ----- */
.x-overlay { display: none; position: fixed; inset: 0; z-index: 450; background: rgba(15, 20, 25, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); align-items: flex-end; justify-content: center; animation: xFade .2s ease; }
.x-overlay.open { display: flex; }
@keyframes xFade { from { opacity: 0; } to { opacity: 1; } }
.x-sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88vh; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: xUp .28s var(--ease); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.x-sheet.tall { height: 92vh; max-height: 92vh; }
@keyframes xUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .x-overlay { align-items: center; } .x-sheet { border-radius: 26px; } }
.x-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 10px auto 4px; flex-shrink: 0; }
.x-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px 12px; flex-shrink: 0; }
.x-head h2 { font-size: 18px; font-weight: 800; flex: 1; letter-spacing: -.3px; }
.x-back { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-soft); color: var(--text); cursor: pointer; flex-shrink: 0; }
.x-body { overflow-y: auto; padding: 0 14px 22px; -webkit-overflow-scrolling: touch; }
.x-search { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border-radius: 100px; padding: 0 16px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px var(--border); }
.x-search i { color: var(--text-3); }
.x-search input { flex: 1; border: 0; outline: 0; background: transparent; padding: 12px 0; font-size: 15px; color: var(--text); font-family: inherit; }
.x-profcard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), .04)); box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .25); margin-bottom: 8px; cursor: pointer; }
.x-pav { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.x-pav img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.x-pdot { position: absolute; right: 0; bottom: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); border: 3px solid var(--bg); }
.x-group { margin-top: 14px; }
.x-group-title { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); padding: 0 6px 7px; }
.x-card { background: var(--bg-soft); border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.x-pad { padding: 12px 14px; }
.x-row, .x-urow, .x-toprow { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.x-row:last-child, .x-urow:last-child, .x-toprow:last-child { border-bottom: 0; }
.x-row.wrap { flex-wrap: wrap; }
.x-row.wrap > .x-seg, .x-row.wrap > .x-range, .x-row.wrap > .x-swatches { flex-basis: 100%; }
.tap { cursor: pointer; transition: background .12s; }
.tap:active { background: var(--hover); }
.x-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; flex-shrink: 0; }
.x-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.x-txt b { font-size: 15px; font-weight: 700; }
.x-txt small { font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
.x-chev { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.x-row.danger .x-txt b { color: #dc2626; }
.x-seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--bg); }
.x-seg-btn { flex: 1; border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13px; padding: 9px 4px; border-radius: 10px; cursor: pointer; font-family: inherit; transition: all .15s; }
.x-seg-btn.active { background: var(--brand-grad); color: #fff; box-shadow: 0 3px 10px rgba(var(--brand-rgb), .35); }
.x-range { width: 100%; accent-color: var(--brand); }
input.xsw { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 50px; height: 30px; border-radius: 100px; background: #cfd9de; position: relative; outline: 0; transition: background .2s; cursor: pointer; }
input.xsw::before { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .22s var(--spring); }
input.xsw:checked { background: var(--brand); }
input.xsw:checked::before { transform: translateX(20px); }
.x-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.x-sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--border), 0 3px 8px rgba(0, 0, 0, .18); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; padding: 0; position: relative; transition: transform .15s var(--spring); }
.x-sw:active { transform: scale(.9); }
.x-sw.active { box-shadow: 0 0 0 2px var(--text), 0 3px 8px rgba(0, 0, 0, .25); }
.x-sw-custom { background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); overflow: hidden; }
.x-sw-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.x-opts { margin-top: 4px; }
.x-opt { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 15px 16px; font-size: 15px; font-weight: 700; color: var(--text); font-family: inherit; text-align: left; cursor: pointer; }
.x-opt:last-child { border-bottom: 0; }
.x-opt:active { background: var(--hover); }
.x-opt i { width: 22px; text-align: center; color: var(--text-2); }
.x-opt.danger, .x-opt.danger i { color: #dc2626; }
.x-uav { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.x-uav img { width: 100%; height: 100%; object-fit: cover; }
.x-mini { border: 0; border-radius: 100px; padding: 8px 14px; background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 12.5px; font-family: inherit; cursor: pointer; flex-shrink: 0; }
.x-empty { text-align: center; color: var(--text-3); padding: 40px 18px; font-size: 14px; line-height: 1.5; }
.x-hint { font-size: 13px; color: var(--text-3); margin: 0 4px 10px; line-height: 1.4; }
.x-input { width: 100%; border: 0; border-radius: 16px; padding: 13px 14px; background: var(--bg-soft); color: var(--text); font-size: 15px; font-family: inherit; resize: none; outline: 0; box-shadow: inset 0 0 0 1px var(--border); margin-top: 10px; }
.x-input:focus { box-shadow: 0 0 0 2px var(--brand); }
.x-radio { accent-color: var(--brand); width: 20px; height: 20px; }
.x-gate { text-align: center; padding: 12px 10px 4px; }
.x-gate-ico { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--brand); background: var(--brand-light); }
.x-gate p { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.x-cardprev { border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: 340px; margin: 4px auto 0; }
.x-cardprev img { width: 100%; display: block; }

/* ----- QR code ----- */
.x-qrprev { display: flex; justify-content: center; padding: 6px 0 10px; }
.x-qrprev canvas { width: 100%; max-width: 300px; height: auto; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.x-qrwarn { display: none; margin: 0 4px 8px; padding: 10px 12px; border-radius: 12px; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 600; }
.x-qrwarn.show { display: block; }
.x-scan { position: relative; background: #000; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 60vh; margin: 8px auto; }
.x-scan video { width: 100%; height: 100%; object-fit: cover; }
.x-scan-frame { position: absolute; inset: 18% 14%; border: 3px solid #fff; border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); }
.x-scan-msg { text-align: center; color: var(--text-2); font-size: 14px; margin: 10px 8px; }
.x-scan-file { cursor: pointer; }

/* ----- graphiques ----- */
.x-note2 { font-size: 12.5px; color: var(--text-3); line-height: 1.4; margin: 0 4px 10px; }
.x-ctrl { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; overflow-x: auto; }
.x-ctrl .x-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.x-ctrl .x-chips::-webkit-scrollbar { display: none; }
.x-block { margin-top: 12px; padding: 14px; border-radius: 20px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); }
.x-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.x-sum b { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.x-sum span { color: var(--text-3); font-weight: 600; font-size: 13.5px; }
.x-delta { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 100px; }
.x-delta.up { background: rgba(34, 197, 94, .15); color: #16a34a; }
.x-delta.down { background: rgba(239, 68, 68, .15); color: #dc2626; }
.x-sub { font-size: 12.5px; color: var(--text-3); margin: 2px 0 8px; }
.x-chart { position: relative; }
.x-svg { width: 100%; height: auto; display: block; touch-action: pan-y; overflow: visible; }
.x-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.x-ylab, .x-xlab { fill: var(--text-3); font-size: 10px; font-weight: 600; font-family: inherit; }
.x-hl { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.x-hd { fill: var(--bg); stroke-width: 3; }
.x-tip { position: absolute; top: -4px; transform: translate(-50%, -100%); background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 10px; font-size: 12px; white-space: nowrap; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 1px; z-index: 5; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.x-tip b { font-size: 14px; }
.x-tip span { opacity: .75; font-size: 11px; }
.x-chart-empty { text-align: center; color: var(--text-3); padding: 26px 12px; font-size: 13.5px; line-height: 1.45; }
.x-block-title + .x-chart-empty { padding-top: 10px; }
.x-mini-title { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); margin: 12px 2px 6px; }
.x-hint2, .x-heat-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; text-align: center; }
.x-donut { display: flex; align-items: center; gap: 16px; }
.x-donut svg { width: 140px; height: 140px; flex-shrink: 0; }
.x-donut-bg { stroke: var(--border); }
.x-donut-n { fill: var(--text); font-size: 17px; font-weight: 800; font-family: inherit; }
.x-donut-s { fill: var(--text-3); font-size: 7px; font-weight: 600; font-family: inherit; }
.x-donut ul { list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; margin: 0; padding: 0; }
.x-donut li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.x-donut li i { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.x-donut li span { flex: 1; }
.x-bars { display: flex; align-items: flex-end; gap: 6px; }
.x-bars.dense { gap: 2px; }
.x-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.x-bar-track { width: 100%; height: 74px; display: flex; align-items: flex-end; }
.x-bar-fill { width: 100%; border-radius: 6px 6px 3px 3px; background: rgba(var(--brand-rgb), .35); transition: height .5s var(--ease); }
.x-bar-col.top .x-bar-fill { background: var(--brand-grad); }
.x-bar-col span { font-size: 10px; color: var(--text-3); font-weight: 700; height: 12px; white-space: nowrap; }
.x-facts { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text-2); }
.x-facts i { color: var(--brand); width: 18px; text-align: center; }
.x-facts b { color: var(--text); }
.x-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: 1fr; gap: 3px; overflow: hidden; }
.x-h { aspect-ratio: 1; border-radius: 3px; background: var(--border); display: block; }
.x-h-null { background: transparent; }
.x-h1 { background: rgba(var(--brand-rgb), .3); } .x-h2 { background: rgba(var(--brand-rgb), .5); } .x-h3 { background: rgba(var(--brand-rgb), .75); } .x-h4 { background: var(--brand); }
.x-toprow { padding: 10px 0; }
.x-rank { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.x-hbars { display: flex; flex-direction: column; gap: 9px; }
.x-hbar { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.x-hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.x-hbar div { height: 10px; border-radius: 100px; background: var(--border); overflow: hidden; }
.x-hbar i { display: block; height: 100%; border-radius: 100px; background: var(--brand-grad); }
.x-hbar b { text-align: right; }

/* ----- succès ----- */
.x-badge-head { text-align: center; padding: 6px 0 12px; }
.x-badge-head b { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.x-badge-head span { display: block; color: var(--text-3); font-size: 13px; margin: 2px 0 10px; }
.x-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.x-badge { background: var(--bg-soft); border-radius: 18px; padding: 14px 10px; text-align: center; box-shadow: inset 0 0 0 1px var(--border); opacity: .5; filter: grayscale(1); }
.x-badge.ok { opacity: 1; filter: none; background: linear-gradient(135deg, rgba(var(--brand-rgb), .14), var(--bg-soft)); }
.x-badge-i { font-size: 30px; display: block; margin-bottom: 4px; }
.x-badge b { display: block; font-size: 14px; }
.x-badge small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.3; }

/* ----- fenêtre (tableau de bord, scanner) ----- */
.x-win { align-items: stretch; background: var(--bg); backdrop-filter: none; z-index: 460; }
.x-winbox { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg); animation: xUp .25s var(--ease); }
.x-winbar { display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; box-shadow: 0 1px 0 var(--border); flex-shrink: 0; }
.x-winbar h2 { flex: 1; font-size: 17px; font-weight: 800; }
.x-winbody { flex: 1; min-height: 0; position: relative; overflow: auto; padding: 0; }
.x-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.x-winload { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); font-size: 14px; text-align: center; padding: 20px; z-index: 1; background: var(--bg); }
.x-winload a { color: var(--brand); font-weight: 700; }
.x-spin { width: 36px; height: 36px; border: 4px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: xSpin .8s linear infinite; }
#x-scan .x-winbody { padding: 12px 14px; }

/* ----- divers ----- */
.x-ptr { position: fixed; top: 8px; left: 50%; transform: translate(-50%, 0); width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--brand); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); opacity: 0; z-index: 300; pointer-events: none; }
.x-ptr.spin i { animation: xSpin .8s linear infinite; }
@keyframes xSpin { to { transform: rotate(360deg); } }
.x-top { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand-grad); color: #fff; font-size: 16px; box-shadow: 0 8px 22px rgba(var(--brand-rgb), .45); opacity: 0; transform: translateY(14px) scale(.8); pointer-events: none; transition: opacity .2s, transform .25s var(--spring); z-index: 120; cursor: pointer; }
.x-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .px-online-dot.on { animation: none; } }
