/* Olite Roleplay — DA : sombre, couleurs pleines, accent violet */
:root {
  --bg: #0D0E13; --panel: #101117; --card: #14151C; --border: rgba(255,255,255,.08);
  --violet: #8B5CF6; --violet-hover: #7C4DEB; --violet-light: #C4B5FD; --violet-dark: #5B21B6;
  --selected: #1F1A33; --btn2: #22232D; --btn2-hover: #2A2B37; --btn2-text: #E5E5EE;
  --text: #FFFFFF; --text-2: rgba(255,255,255,.58); --text-3: rgba(255,255,255,.5);
  --success: #4ADE80; --danger: #F87171; --danger-bg: #3A1619; --warning: #FBBF24;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-weight: 500; line-height: 1.5; }
a { color: var(--violet-light); text-decoration: none; }
a:hover { color: var(--text); }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
code { font-family: ui-monospace, Menlo, monospace; font-weight: 600; }

/* Fond : lueurs + trame de points */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 999px; }
.glow-1 { top: -260px; left: -220px; width: 820px; height: 820px; background: radial-gradient(circle, rgba(139,92,246,.25), rgba(139,92,246,0) 65%); }
.glow-2 { bottom: -320px; right: -280px; width: 900px; height: 900px; background: radial-gradient(circle, rgba(91,33,182,.2), rgba(91,33,182,0) 65%); }
.dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.04) 1.2px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 45%, #000 85%); mask-image: radial-gradient(ellipse at center, transparent 45%, #000 85%); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* En-tête */
.header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--violet); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #fff; box-shadow: 0 6px 24px rgba(139,92,246,.35); }
.logo-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 36px; }
.logo-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; box-shadow: none; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .08em; }
.brand-name span { color: var(--violet-light); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.nav a { padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); }
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.active { background: var(--selected); color: var(--text); }
.actions { display: flex; align-items: center; gap: 10px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 8px 24px rgba(139,92,246,.3); }
.btn-primary:hover { background: var(--violet-hover); color: #fff; }
.btn-secondary { background: var(--btn2); color: var(--btn2-text); }
.btn-secondary:hover { background: var(--btn2-hover); color: #fff; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn svg { flex: none; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--btn2); color: var(--btn2-text); font-weight: 700; font-size: 14px; }
.user-chip img { width: 32px; height: 32px; border-radius: 8px; }
.hidden { display: none !important; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .04em; background: rgba(139,92,246,.18); color: var(--violet-light); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--violet); }
.badge-success { background: rgba(74,222,128,.15); color: var(--success); }
.badge-danger { background: rgba(248,113,113,.15); color: var(--danger); }
.badge-warning { background: rgba(251,191,36,.15); color: var(--warning); }
.badge-muted { background: rgba(255,255,255,.08); color: var(--text-2); }
.badge-solid { background: var(--violet); color: #fff; }

/* Accueil */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 96px 0 120px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero h1 { font-size: clamp(44px, 7vw, 88px); line-height: .98; letter-spacing: -.02em; }
.hero h1 span { color: var(--violet); }
.lead { max-width: 540px; font-size: 19px; line-height: 1.6; color: var(--text-2); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.server-card { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.server-head { display: flex; align-items: center; gap: 16px; }
.server-head .title { font-weight: 800; font-size: 20px; letter-spacing: .06em; }
.server-head .sub { font-weight: 600; font-size: 14px; color: var(--violet-light); }
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--panel); border-radius: 12px; font-size: 14px; }
.info span:first-child { color: var(--text-2); }
.info span:last-child { font-weight: 700; text-align: right; }
.connect { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: var(--selected); border: 1px solid var(--violet); border-radius: 12px; }
.connect code { flex: 1; font-size: 15px; }
.connect .btn { min-height: 40px; padding: 10px 16px; font-size: 13px; }

.section { display: flex; flex-direction: column; gap: 40px; padding: 40px 0 100px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--violet-light); }
.section h2 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.card:hover { border-color: rgba(139,92,246,.45); }
.card h3 { font-size: 19px; }
.card p { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(139,92,246,.18); display: flex; align-items: center; justify-content: center; }
.step { background: var(--panel); }
.step.selected { background: var(--selected); border-color: var(--violet); }
.step .badge { align-self: flex-start; }

.cta { margin: 20px 0 100px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: 48px; }
.cta > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.cta h2 { font-size: 34px; }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 32px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-3); }
.footer span:first-child { display: flex; align-items: center; gap: 10px; }

/* Profil */
.profile { padding: 64px 0 100px; display: flex; flex-direction: column; gap: 24px; }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.profile-head img { width: 80px; height: 80px; border-radius: 18px; background: var(--panel); }
.profile-head .who { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.profile-head h1 { font-size: 32px; }
.profile-head .sid { font-size: 13px; color: var(--text-3); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat .n { font-size: 30px; font-weight: 800; }
.stat .l { font-size: 13px; font-weight: 700; color: var(--text-2); }
.stat.ok .n { color: var(--success); }
.stat.bad .n { color: var(--danger); }

.sanctions { display: flex; flex-direction: column; }
.sanction { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 4px; border-top: 1px solid var(--border); }
.sanction:first-child { border-top: 0; }
.sanction .type { justify-self: start; }
.sanction .reason { font-weight: 600; font-size: 15px; }
.sanction .meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.empty { padding: 40px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .icon { background: rgba(74,222,128,.15); }
.login-box { max-width: 520px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.note { font-size: 13px; color: var(--text-3); }
.alert { padding: 14px 18px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-weight: 600; font-size: 14px; }

@media (max-width: 720px) {
  .hero { padding: 48px 0 72px; }
  .cta { padding: 28px; }
  .sanction { grid-template-columns: 1fr; gap: 8px; }
}

/* Pied de page */
.site-footer { position: relative; overflow: hidden; margin-top: 40px; padding-top: 64px; border-top: 1px solid var(--border); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px; }
.footer-about { flex: 1 1 380px; max-width: 460px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-about p { font-size: 15px; line-height: 1.6; }
.connect-sm { padding: 6px 6px 6px 14px; }
.connect-sm code { font-size: 14px; }
.connect-sm .btn { min-height: 36px; padding: 8px 14px; }
.dot-online { width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px rgba(74,222,128,.15); }
.socials { display: flex; gap: 10px; }
.social { width: 44px; height: 44px; border-radius: 12px; background: var(--btn2); color: var(--violet-light); display: flex; align-items: center; justify-content: center; }
.social:hover { background: var(--violet); color: #fff; }
.footer-cols { flex: 1 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col .eyebrow { margin-bottom: 4px; }
.footer-col a { color: var(--btn2-text); font-weight: 600; font-size: 15px; }
.footer-col a:hover { color: var(--violet-light); }
.footer-bottom { margin-top: 56px; padding: 24px 0 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-3); }
.footer-bottom a { color: var(--text-2); }
.footer-watermark { font-weight: 800; font-size: clamp(96px, 22vw, 300px); line-height: .75; letter-spacing: .02em; text-align: center; color: #14151C; -webkit-text-stroke: 1px rgba(139,92,246,.18); margin: 24px 0 -40px; user-select: none; }

/* Pages de texte */
.prose { padding: 64px 0 40px; max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.prose h1 { font-size: 40px; }
.prose h2 { font-size: 20px; margin-top: 16px; }
.prose p { color: var(--text-2); line-height: 1.7; }
.todo { color: var(--warning); font-weight: 700; }

/* Pages règlement et staff */
.page-head { padding: 64px 0 32px; max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -.01em; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { min-height: 44px; padding: 12px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text-2); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.tab:hover { color: var(--text); border-color: rgba(139,92,246,.45); }
.tab.active { background: var(--selected); border-color: var(--violet); color: var(--text); }
.tab:focus-visible, .member:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; }
.rules { display: flex; flex-direction: column; gap: 28px; }
.rules-title { font-size: 28px; }
.rules-desc { margin-top: -16px; max-width: 720px; }
.rules-section { display: flex; flex-direction: column; gap: 12px; }
.rules-section h3 { font-size: 18px; color: var(--violet-light); }
.rules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 16px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.rule-n { flex: none; min-width: 40px; padding: 0 8px; height: 32px; border-radius: 10px; background: rgba(139,92,246,.18); color: var(--violet-light); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.rule-title { font-weight: 700; margin-bottom: 4px; }
.rule p { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.rules-foot { margin: 16px 0 80px; }

.staff { display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.grade { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--grade); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.grade-head { display: flex; align-items: center; gap: 12px; }
.grade-head h2 { font-size: 20px; color: var(--grade); }
.grade-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--grade); box-shadow: 0 0 12px var(--grade); }
.grade-desc { margin-top: -8px; font-size: 14px; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.member { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; color: var(--text); }
a.member:hover { border-color: var(--grade); color: var(--text); }
.member img, .member-ph { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.member-ph { background: var(--btn2); color: var(--grade); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.member-name { font-weight: 700; }
.member-role { font-size: 13px; color: var(--text-2); }

/* Panel staff */
.nav a.nav-staff { color: var(--violet-light); }
.staff-app { padding: 48px 0 80px; display: flex; flex-direction: column; gap: 20px; }
.staff-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.staff-top h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 8px; }
.rank-badge { --rank: var(--violet); background: color-mix(in srgb, var(--rank) 18%, transparent); color: var(--rank); }
.tabs-scroll { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 0; padding-bottom: 4px; scrollbar-width: thin; }
.tabs-scroll .tab { flex: none; display: inline-flex; align-items: center; }
.staff-view { display: flex; flex-direction: column; gap: 16px; }
.view-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.view-head h2, .view-title { font-size: 26px; }
.panel-title { font-size: 18px; margin-bottom: 12px; }
.staff-view .panel { padding: 20px; box-shadow: none; }
.stack { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.stack > .btn { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 700; font-size: 14px; }
.input { width: 100%; min-height: 44px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-size: 16px; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
.form-msg { font-size: 14px; font-weight: 600; color: var(--text-2); }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--success); }
.form-msg.info { color: var(--warning); }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn-link { background: none; min-height: 32px; padding: 4px 8px; color: var(--text-3); font-size: 13px; margin-left: auto; }
.btn-link:hover { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: wait; }
.back { font-weight: 700; font-size: 14px; align-self: flex-start; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--border); color: var(--text); }
.list-row:first-child { border-top: 0; }
a.list-row:hover { color: var(--text); background: rgba(139,92,246,.06); }
.list-main { min-width: 0; flex: 1; }
.list-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; overflow-wrap: anywhere; }
.list-meta { font-size: 13px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.posts { display: flex; flex-direction: column; gap: 12px; }
.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--btn2-text); line-height: 1.6; }
.search { display: flex; gap: 10px; }
.search .input { flex: 1; }
.player-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.player-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.player-who h2 { font-size: 24px; overflow-wrap: anywhere; }
.action-form { border-color: var(--violet); }
.action-form h3 { font-size: 18px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.perm-card { border-left: 4px solid var(--grade); gap: 10px; }
.perm-card h3 { font-size: 17px; color: var(--grade); }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.check input:disabled + span { color: var(--text-3); }

@media (max-width: 720px) {
  .staff-app { padding-top: 24px; }
  .search { flex-direction: column; }
  .staff-view .panel { padding: 16px; }
  .list-row { align-items: flex-start; }
}

/* Menu téléphone */
.menu { display: contents; }
.menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.menu-toggle:focus-visible, .nav a:focus-visible, .btn:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; }
@media (max-width: 900px) {
  .header { padding: 16px 0; }
  .menu-toggle { display: inline-flex; }
  .menu { display: none; width: 100%; flex-direction: column; gap: 12px; }
  .header.menu-open .menu { display: flex; }
  .menu .nav { flex-direction: column; gap: 2px; }
  .menu .nav a { padding: 14px 16px; font-size: 16px; }
  .menu .actions { flex-wrap: wrap; }
  .menu .actions > * { flex: 1 1 auto; }
  .menu .actions form .btn { width: 100%; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .page-head { padding: 32px 0 20px; }
  .rule { padding: 14px; gap: 12px; }
  .tabs:not(.tabs-scroll) .tab { flex: 1 1 auto; }
  .connect code { font-size: 13px; overflow-wrap: anywhere; }
  .hero h1 { font-size: 44px; }
}
/* Onglets du panel qui défilent : petit dégradé pour montrer qu'il y en a d'autres */
.tabs-scroll { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
@media (min-width: 721px) { .tabs-scroll { -webkit-mask-image: none; mask-image: none; } }

/* Éditeur du règlement */
.rules-editor { display: flex; flex-direction: column; gap: 12px; }
.rules-editor > .btn { align-self: flex-start; }
.edit-cat { display: flex; flex-direction: column; gap: 14px; }
.edit-cat[open] { border-color: rgba(139,92,246,.45); }
.edit-cat > *:not(summary) { margin-top: 14px; }
.edit-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-weight: 800; font-size: 18px; }
.edit-cat-head::-webkit-details-marker { display: none; }
.edit-cat-head::before { content: "▸"; color: var(--violet-light); margin-right: 4px; }
.edit-cat[open] .edit-cat-head::before { content: "▾"; }
.edit-cat-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.edit-section { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.edit-section > .btn { align-self: flex-start; }
.edit-row { display: flex; align-items: center; gap: 8px; }
.edit-row .input { flex: 1; min-width: 0; }
.edit-section-title { font-weight: 700; color: var(--violet-light); }
.edit-rule { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border-radius: 12px; }
.input-sm { min-height: 80px !important; }
.btn-icon { min-width: 40px; min-height: 40px; padding: 8px; font-size: 16px; }
.btn-icon-danger:hover { background: var(--danger-bg); color: var(--danger); }
.save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; background: rgba(20,21,28,.95); border: 1px solid var(--violet); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.save-bar .form-msg { flex: 1 1 200px; }
@media (max-width: 720px) {
  .edit-row { flex-wrap: wrap; }
  .edit-row .input { flex: 1 1 100%; order: -1; }
  .edit-row .rule-n { display: none; }
  .save-bar .btn { width: 100%; }
}

/* Plaintes */
.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.type-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.type-card:hover { border-color: rgba(139,92,246,.45); }
.type-card.active { background: var(--selected); border-color: var(--violet); }
.type-card:focus-visible, .chip:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; }
.type-title { font-weight: 800; font-size: 16px; }
.type-help { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.proofs { display: flex; flex-direction: column; gap: 6px; }
.proofs a { overflow-wrap: anywhere; font-size: 14px; }
.post-staff { border-color: rgba(139,92,246,.45); background: var(--selected); }
.post-internal { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { min-height: 36px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.chip.active { background: var(--selected); border-color: var(--violet); color: var(--text); }
.chips-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.info a { font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* Règlement : sommaire collant + recherche */
.rules-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.rules-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; scrollbar-width: thin; }
.rules-search { display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: 48px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; color: var(--violet-light); }
.rules-search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
.rules-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.rules-search kbd { padding: 2px 8px; border-radius: 6px; background: var(--btn2); color: var(--text-2); font: 700 12px ui-monospace, monospace; }
.rules-count { font-size: 12px; font-weight: 700; color: var(--text-3); padding-left: 4px; }
.rules-nav { display: flex; flex-direction: column; gap: 2px; }
.rules-nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--text-2); font-weight: 700; font-size: 14px; }
.rules-nav-item:hover { background: var(--card); color: var(--text); }
.rules-nav-item.active { background: var(--selected); color: var(--text); }
.rules-nav-item.active .section-n { background: var(--violet); color: #fff; }
.rules-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--btn2); color: var(--violet-light); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.rules-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rules-section { scroll-margin-top: 16px; }
.rules-section-head { display: flex; align-items: center; gap: 12px; }
.rules-section-head h3 { flex: 1; font-size: 20px; color: var(--text); }
.rules-section-head .section-n { width: 36px; height: 36px; border-radius: 10px; background: var(--violet); color: #fff; font-size: 16px; }
.rule { scroll-margin-top: 16px; }
.rules mark { background: rgba(251,191,36,.3); color: var(--text); border-radius: 3px; padding: 0 2px; }
.tab-badge { margin-left: 8px; padding: 2px 8px; font-size: 10px; }
@media (max-width: 900px) {
  .rules-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rules-layout > * { min-width: 0; }
  .rules-side { top: 0; z-index: 4; max-height: none; overflow: visible; padding: 10px 0; background: linear-gradient(var(--bg) 85%, transparent); }
  .rules-nav { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .rules-nav::-webkit-scrollbar { display: none; }
  .rules-nav-item { flex: none; background: var(--panel); border: 1px solid var(--border); padding: 6px 12px 6px 6px; }
  .rules-nav-label { max-width: 160px; }
  .rules-count { display: none; }
  .rules-search kbd { display: none; }
  .rules-section, .rule { scroll-margin-top: 130px; }
}

/* Boutique */
.alert-info { background: var(--selected); color: var(--violet-light); border: 1px solid rgba(139,92,246,.4); margin-bottom: 16px; }
.shop { display: flex; flex-direction: column; gap: 24px; padding-bottom: 60px; }
.coin { flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.price { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--warning); }
.price-lg { font-size: 28px; }
.shop-hero { display: flex; flex-direction: column; gap: 24px; padding: 32px; background: radial-gradient(circle at 85% 10%, rgba(139,92,246,.28), transparent 55%), var(--card); }
.shop-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 560px; }
.shop-hero-text h2 { font-size: clamp(34px, 5vw, 52px); color: var(--violet-light); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; text-align: center; }
.pack-best { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning), 0 12px 40px rgba(251,191,36,.15); }
.pack-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 12px; border-radius: 999px; background: var(--warning); color: #1a1406; font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.pack-pct { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--success); color: #062b14; font-weight: 800; font-size: 12px; }
.coin-pile { position: relative; width: 100%; height: 92px; }
.coin-pile .coin { position: absolute; }
.pack-old { font-size: 13px; color: var(--text-3); text-decoration: line-through; }
.shop-buy { width: 100%; margin-top: auto; }
.shop-buy:disabled { opacity: .75; cursor: not-allowed; background: var(--btn2); color: var(--btn2-text); box-shadow: none; }
.pack-best .shop-buy:not(:disabled) { background: var(--warning); color: #1a1406; }
.shop-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.shop-steps { display: flex; flex-wrap: wrap; gap: 10px; }
.shop-step { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); font-weight: 700; font-size: 14px; }
.step-n { width: 26px; height: 26px; border-radius: 999px; background: var(--warning); color: #1a1406; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.shop-bar { position: sticky; top: 0; z-index: 4; padding: 8px; background: rgba(16,17,23,.95); border: 1px solid var(--border); border-radius: 16px; }
.shop-tabs { margin: 0; padding: 0; }
.shop-view { min-height: 200px; }
.grades-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grade-offer { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; box-shadow: none; }
.grade-offer-best { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 20px 60px rgba(139,92,246,.2); }
.grade-title { font-size: 34px; }
.grade-title-vip { color: #F5C451; }
.grade-title-premium { background: linear-gradient(90deg, #C4B5FD, #67E8F9, #F0ABFC); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grade-price { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; }
.perks li > div { display: flex; flex-direction: column; }
.perk-check { flex: none; width: 24px; height: 24px; border-radius: 8px; background: rgba(74,222,128,.15); color: var(--success); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
/* Emblèmes VIP / Premium */
.grade-emblem { position: relative; height: 190px; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.grade-emblem svg { position: relative; z-index: 1; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.emblem-ring { position: absolute; width: 150px; height: 150px; border-radius: 999px; top: 50%; left: 50%; transform: translate(-50%, -58%); }
.emblem-name { position: relative; z-index: 1; font-weight: 800; letter-spacing: .3em; font-size: 13px; }
.emblem-vip { background: radial-gradient(circle at 50% 40%, rgba(245,196,81,.35), transparent 60%), linear-gradient(180deg, #1c1607, #0f0d08); color: #F5C451; }
.emblem-vip .emblem-ring { background: radial-gradient(circle, rgba(245,196,81,.25), transparent 70%); box-shadow: inset 0 0 0 2px rgba(245,196,81,.35); }
.emblem-premium { background: radial-gradient(circle at 30% 30%, rgba(103,232,249,.25), transparent 50%), radial-gradient(circle at 75% 70%, rgba(240,171,252,.25), transparent 50%), linear-gradient(180deg, #120f1f, #0b0b12); color: #C4B5FD; }
.emblem-premium svg { color: #E9D5FF; }
.emblem-premium .emblem-ring { background: conic-gradient(from 0deg, rgba(103,232,249,.35), rgba(196,181,253,.35), rgba(240,171,252,.35), rgba(103,232,249,.35)); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); }
.emblem-violet { background: radial-gradient(circle at 50% 40%, rgba(139,92,246,.4), transparent 60%), var(--panel); color: var(--violet-light); }
.emblem-violet .emblem-ring { box-shadow: inset 0 0 0 2px rgba(139,92,246,.4); }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.item-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: 18px; }
.item-card:hover { border-color: rgba(139,92,246,.45); }
.item-pic { position: relative; height: 140px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 60%, rgba(139,92,246,.3), transparent 65%), var(--panel); }
.item-pic img { max-width: 85%; max-height: 120px; object-fit: contain; }
.item-letter { font-weight: 800; font-size: 54px; color: var(--violet-light); opacity: .8; }
.item-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.item-body h3 { font-size: 16px; }
.item-body p { font-size: 13px; }
.item-body .price { margin-top: auto; padding-top: 6px; }
@media (max-width: 720px) {
  .shop-hero { padding: 20px; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pack { padding: 30px 10px 12px; }
  .price-lg { font-size: 22px; }
  .grade-title { font-size: 28px; }
}

.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.edit-cat select.input { appearance: auto; }

/* Promotions */
.price-block { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.price-old { color: var(--text-3); text-decoration: line-through; font-weight: 700; font-size: 14px; }
.countdown { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: rgba(248,113,113,.15); color: var(--danger); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.promo-pct { background: var(--danger); color: #fff; }
.grade-offer > .promo-pct { top: 16px; left: 16px; z-index: 2; }
.promo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(90deg, rgba(248,113,113,.18), rgba(139,92,246,.18)); border: 1px solid rgba(248,113,113,.45); }
.promo-banner > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.promo-big { font-weight: 800; font-size: 34px; color: var(--danger); }
.promo-banner .countdown { font-size: 14px; padding: 6px 14px; }
.pack .countdown { font-size: 11px; }
.promo-edit { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(248,113,113,.06); border: 1px dashed rgba(248,113,113,.35); }
.chip-danger { color: var(--danger); }

/* Boutique v2 */
.shop-bar { display: flex; align-items: center; gap: 10px; }
.shop-bar .shop-tabs { flex: 1; min-width: 0; }
.shop-balance { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-weight: 800; }
.balance-n { color: var(--warning); font-variant-numeric: tabular-nums; }
.balance-plus { width: 30px; height: 30px; border-radius: 999px; background: var(--warning); color: #1a1406; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.balance-plus:hover { color: #1a1406; filter: brightness(1.1); }
.balance-login { display: inline-flex; align-items: center; gap: 8px; padding-right: 8px; font-size: 13px; color: var(--btn2-text); }
.item-tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--btn2); color: var(--text); font-weight: 800; font-size: 11px; }
.tag-promo { background: var(--danger); color: #fff; }
.tag-new { background: var(--success); color: #062b14; }
.want { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.want:hover { color: var(--text); border-color: rgba(244,114,182,.5); }
.want.active { color: #F472B6; border-color: rgba(244,114,182,.6); background: rgba(244,114,182,.1); }
.want-heart { font-size: 15px; }
.want-n { padding: 1px 7px; border-radius: 999px; background: var(--btn2); color: var(--text); font-size: 12px; }
.pack-content { margin: 0; padding-left: 18px; color: var(--btn2-text); font-size: 13px; }
.week { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 24px; border-color: rgba(251,191,36,.45); background: radial-gradient(circle at 10% 50%, rgba(251,191,36,.12), transparent 50%), var(--card); }
.week-pic { height: 200px; border-radius: 16px; background: radial-gradient(circle, rgba(139,92,246,.35), transparent 65%), var(--panel); display: flex; align-items: center; justify-content: center; }
.week-pic img { max-width: 90%; max-height: 180px; object-fit: contain; }
.week h2 { font-size: 30px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile { --tile: var(--violet); position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 130px; padding: 20px; overflow: hidden; text-align: left; border: 1px solid var(--border); border-top: 4px solid var(--tile); border-radius: 18px; background: radial-gradient(circle at 90% 50%, color-mix(in srgb, var(--tile) 22%, transparent), transparent 60%), var(--card); color: var(--text); font: inherit; cursor: pointer; }
.tile:hover { border-color: var(--tile); transform: translateY(-2px); transition: transform .15s; }
.tile:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; }
.tile-text h3 { font-size: 22px; }
.tile-text p { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.tile img { width: 110px; height: 90px; object-fit: contain; flex: none; }
.tile-letter { flex: none; font-size: 64px; font-weight: 800; color: var(--tile); opacity: .5; }
.tile-tag { position: absolute; top: 10px; right: 10px; }
.preview-banner { border-color: var(--warning); background: rgba(251,191,36,.1); color: var(--warning); }
/* Thèmes d'événement */
body[data-theme="noel"] .shop-hero { border-top: 4px solid #F87171; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1.5px), radial-gradient(circle at 85% 10%, rgba(248,113,113,.25), transparent 55%); background-size: 26px 26px, auto; }
body[data-theme="noel"] .shop-hero-text h2::after { content: " ❄"; }
body[data-theme="halloween"] .shop-hero { border-top: 4px solid #FB923C; background-image: radial-gradient(circle at 85% 10%, rgba(251,146,60,.3), transparent 55%); }
body[data-theme="halloween"] .shop-hero-text h2::after { content: " 🎃"; }
body[data-theme="ete"] .shop-hero { border-top: 4px solid #FBBF24; background-image: radial-gradient(circle at 85% 10%, rgba(251,191,36,.3), transparent 55%); }
body[data-theme="ete"] .shop-hero-text h2::after { content: " ☀"; }
@media (max-width: 720px) {
  .shop-bar { flex-direction: column; align-items: stretch; }
  .shop-balance { align-self: flex-end; }
  .week { grid-template-columns: 1fr; }
  .week-pic { height: 150px; }
  .tiles { grid-template-columns: 1fr; }
}
/* Panel boutique v2 */
.sub-tabs { padding: 4px 0; }
.img-field { display: flex; gap: 14px; align-items: center; }
.img-thumb { flex: none; width: 96px; height: 72px; border-radius: 12px; background: var(--card); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.img-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.img-field .stack { gap: 6px; }
.edit-section.is-hidden { opacity: .7; border-style: dashed; }
.pack-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 14px; max-height: 260px; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--panel); }
.pack-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 16px; }
.coin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--border); }
.coin-row:first-of-type { border-top: 0; }
.coin-form { grid-column: 1 / -1; display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.coin-form .form-msg { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .coin-form { grid-template-columns: 1fr; }
  .img-field { align-items: flex-start; }
}
.sanction-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.contest-link { margin: 0; padding: 2px 0; color: var(--violet-light); font-weight: 700; }
.contest-link:hover { color: var(--text); }
/* Archives des tickets */
.ticket-row { border-top: 1px solid var(--border); }
.ticket-row:first-child { border-top: 0; }
.ticket-row > summary { list-style: none; cursor: pointer; border-top: 0; }
.ticket-row > summary::-webkit-details-marker { display: none; }
.ticket-row[open] > summary { color: var(--violet-light); }
.ticket-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 18px; }
.ticket-body > .btn { align-self: flex-start; }
.ticket-qa { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--panel); }
.search select.input { flex: 0 0 auto; width: auto; max-width: 240px; }
@media (max-width: 720px) { .search select.input { max-width: none; width: 100%; } }
.post-bot { background: var(--panel); }
.post-deleted { opacity: .65; border-style: dashed; }
.dc-embed { margin-top: 8px; padding: 10px 14px; border-left: 4px solid var(--violet); border-radius: 8px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.dc-att { display: inline-block; margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
/* Grade en jeu */
.grade-badge { --grade: #A1A1AA; background: color-mix(in srgb, var(--grade) 18%, transparent); color: var(--grade); border: 1px solid color-mix(in srgb, var(--grade) 40%, transparent); }
.chip-grade { padding: 2px 8px; font-size: 11px; margin-left: 2px; }
.profile-grade { align-self: flex-start; margin: 4px 0; }
.grade-premium.grade-badge { background: linear-gradient(90deg, rgba(196,181,253,.2), rgba(103,232,249,.2), rgba(240,171,252,.2)); }
