/* Styles des fonctionnalités ajoutées : cloche, courses, missions, tombola, succès, historique, amis, duels, réserves, jackpot... */
.x-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.x-row.between { justify-content: space-between; }
.x-grow { flex: 1; min-width: 0; }
.x-tabs { display: inline-flex; max-width: 100%; overflow-x: auto; }
.x-tabs.seg { border-radius: 8px; }
.x-tabs.seg button { padding: 0 16px; white-space: nowrap; }
.x-sub { color: var(--txt); font-size: 13px; }
.x-big { color: #fff; font-size: 28px; font-weight: 700; line-height: 1.1; }
.x-gold { color: var(--gold); }
.x-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(44, 48, 52, .5); font-size: 13px; }
.x-kv:first-of-type { border-top: 0; }
.x-kv b { color: #fff; }
.x-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.x-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .x-two, .x-three { grid-template-columns: 1fr; } }
.x-note { font-size: 12px; color: var(--txt); line-height: 1.5; }
.x-pill { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--el); color: var(--txt2); font-size: 11px; font-weight: 700; }
.x-pill.green { background: rgba(61, 190, 126, .15); color: var(--green); }
.x-pill.gold { background: rgba(245, 197, 66, .15); color: var(--gold); }
.x-pill.red { background: rgba(239, 68, 68, .15); color: var(--red); }

/* cloche de notifications */
.x-bell { position: relative; }
.x-bell .hbtn { padding: 0 11px; }
.x-badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.x-badge[hidden] { display: none; }
.x-notifs { width: 320px; max-width: calc(100vw - 24px); padding: 0; }
.x-notifs .nh { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #fff; font-weight: 700; font-size: 13px; }
.x-notifs .nl { max-height: 360px; overflow-y: auto; }
.x-notifs a, .x-notifs .ni { display: block; padding: 10px 12px; border-bottom: 1px solid rgba(44, 48, 52, .5); font-size: 12px; }
.x-notifs a:hover { background: var(--el); }
.x-notifs .ni.un { background: rgba(61, 190, 126, .06); }
.x-notifs b { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
.x-notifs small { color: var(--dim); }
.x-notifs .ne { padding: 22px; text-align: center; color: var(--txt); font-size: 12px; }
.dd.open > .dd-menu.x-notifs { opacity: 1; visibility: visible; transform: none; }

/* jackpot */
.x-jackpot { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 8px; background: linear-gradient(110deg, rgba(245, 197, 66, .16), rgba(61, 190, 126, .08)); border: 1px solid rgba(245, 197, 66, .35); flex-wrap: wrap; }
.x-jackpot .jp-ico { font-size: 34px; }
.x-jackpot .jp-amt { color: var(--gold); font-size: 30px; font-weight: 700; display: flex; align-items: center; gap: 8px; line-height: 1; }
.x-jackpot .jp-amt .coin { width: 26px; height: 26px; }
.x-jackpot small { color: var(--txt2); }
.x-jackpot .jp-last { margin-left: auto; font-size: 12px; text-align: right; color: var(--txt2); }

/* courses / tombola */
.x-race-h { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.x-prize { color: var(--gold); font-weight: 700; }
.x-timer { font-variant-numeric: tabular-nums; color: #fff; font-weight: 700; }
.x-rank { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--el); color: #fff; font-weight: 700; font-size: 12px; }
.x-rank.r1 { background: var(--gold); color: #1a1a1a; } .x-rank.r2 { background: #c4c9cb; color: #1a1a1a; } .x-rank.r3 { background: #cd8a4f; color: #1a1a1a; }

/* missions */
.x-mission { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.x-mission.done { box-shadow: inset 0 0 0 1px rgba(61, 190, 126, .45); }
.x-mission h4 { color: #fff; font-size: 14px; }
.x-mission .reward { color: var(--gold); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.x-mission .req { font-size: 11px; color: var(--txt); }

/* succès */
.x-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.x-ach { padding: 14px; text-align: center; border-radius: 8px; background: var(--deep); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.x-ach .ai { font-size: 32px; filter: grayscale(1) opacity(.35); }
.x-ach.on .ai { filter: none; }
.x-ach.on { box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .4); }
.x-ach b { color: #fff; font-size: 13px; }
.x-ach small { color: var(--txt); font-size: 11px; line-height: 1.35; }
.x-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.x-badges span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: var(--deep); border-radius: 8px; }

/* amis, profils */
.x-friend { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(44, 48, 52, .5); flex-wrap: wrap; }
.x-friend:first-child { border-top: 0; }
.x-friend .on-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim2); }
.x-friend .on-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.x-friend .acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.x-prof-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.x-prof-head img.prof-av { width: 72px; height: 72px; border-radius: 10px; image-rendering: pixelated; }

/* stop rules, options de chat */
.x-stop-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.x-stop-dot.hit { background: var(--red); }
.x-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.x-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.x-chips span { background: var(--el); color: var(--txt2); border-radius: 99px; padding: 3px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.x-chips span button { color: var(--red); font-weight: 700; }

/* chat : salons, mentions */
.chat-rooms { display: inline-flex; gap: 2px; margin-left: 8px; }
.chat-rooms button { height: 22px; padding: 0 8px; border-radius: 4px; font-size: 10px; font-weight: 700; background: var(--el); color: var(--txt); }
.chat-rooms button.on { background: var(--green); color: #0a0a0d; }
.chat-gear { width: 22px; height: 22px; border-radius: 4px; background: var(--el); color: var(--txt); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.msg.mention { background: rgba(245, 197, 66, .12); box-shadow: inset 2px 0 0 var(--gold); border-radius: 4px; }
.msg .ign { display: none; margin-left: auto; color: var(--dim); font-size: 10px; padding: 0 4px; }
.msg:hover .ign { display: inline; }
.msg .ign:hover { color: var(--red); }
.mention-pop { position: absolute; bottom: 52px; left: 8px; right: 8px; background: var(--hdr); border: 1px solid var(--line); border-radius: 6px; padding: 4px; z-index: 5; max-height: 160px; overflow-y: auto; }
.mention-pop button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 4px; font-size: 12px; color: var(--txt2); }
.mention-pop button:hover { background: var(--el); color: #fff; }
.chat-foot { position: relative; }

/* installation / réglages */
.x-install { display: inline-flex; }
.x-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(44, 48, 52, .5); }
.x-switch:first-of-type { border-top: 0; }

/* réserves */
.x-cover { font-size: 38px; font-weight: 700; }
.x-cover.ok { color: var(--green); } .x-cover.mid { color: var(--gold); } .x-cover.low { color: var(--red); }

/* l'attribut hidden doit toujours gagner sur les display: flex des composants */
[hidden] { display: none !important; }

/* tableaux larges : défilement horizontal dans leur carte (téléphone) */
.x-scroll { overflow-x: auto; }
.x-scroll .tbl { min-width: 460px; }

/* Programme créateurs : offre + formulaire côte à côte, visibles sans défiler */
.mp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.mp-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mp-big { font-size: 56px; font-weight: 900; line-height: 1; color: #39ff88; text-shadow: 0 0 24px rgba(57,255,136,.35); }
.mp-per { margin-top: 4px; font-size: 16px; }
.mp-calc { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mp-calc .inp { width: 120px; }
.mp-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }
.mp-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mp-approved, .mp-paid { color: #39ff88; } .mp-rejected { color: #ff5a6e; }
.mp-disc { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 900px) { .mp-top, .mp-info { grid-template-columns: 1fr; } .mp-form { order: -1; } .mp-big { font-size: 44px; } }

/* Photos de profil = têtes de skin Minecraft (pixels nets) */
img[src^="/api/skin/"] { image-rendering: pixelated; }
/* Fiche de stats d'un joueur du chat */
#chatMsgs .nm[data-k] { cursor: pointer; }
#chatMsgs .nm[data-k]:hover { text-decoration: underline; }
.st-pop { position: fixed; z-index: 9000; background: #14181c; border: 1px solid rgba(57,255,136,.35); border-radius: 14px; padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 22px rgba(57,255,136,.12); color: var(--txt, #e8eef2); font-size: 13px; animation: stPop .14s ease-out; }
@keyframes stPop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.st-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--txt2, #9aa); font-size: 20px; line-height: 1; cursor: pointer; }
.st-x:hover { color: #fff; }
.st-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding-right: 18px; }
.st-head .av { width: 52px; height: 52px; border-radius: 8px; }
.st-nm { font-size: 16px; }
.st-vip { font-weight: 700; font-size: 12px; }
.st-head small { color: var(--txt2, #9aa); }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-cell { background: rgba(255,255,255,.04); border-radius: 9px; padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-cell span { color: var(--txt2, #9aa); font-size: 11px; }
.st-cell b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-priv, .st-load { color: var(--txt2, #9aa); padding: 6px 2px; line-height: 1.5; }

/* têtes de skin dans les listes en direct */
.rp-row .u { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rp-row .u img { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.jp-last .jp-av { width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; }

/* listes de joueurs cliquables (fiche de stats) */
[data-pk], [data-pn] { cursor: pointer; }
[data-pk]:hover, [data-pn]:hover { text-decoration: underline; text-decoration-color: rgba(57,255,136,.6); text-underline-offset: 3px; }
.pod[data-pn]:hover { text-decoration: none; filter: brightness(1.12); }
