/* Design commun, charg? apr?s les styles locaux. Les mises en page m?tier restent locales. */
:root { --site-ui: system-ui, -apple-system, "Segoe UI", sans-serif; --site-brand: "Cormorant Garamond", Georgia, serif; }
html body:is([class], :not([class])) {
  --h: var(--site-ui); --b: var(--site-ui); --heading-font: var(--site-ui); --primary-font: var(--site-ui);
  --info-btn-font: var(--site-ui);
  --shadow-sm: 0 3px 12px rgba(28,22,18,.06); --shadow-md: 0 8px 24px rgba(28,22,18,.08); --shadow-lg: 0 16px 40px rgba(28,22,18,.14);
  font-family: var(--site-ui); line-height: 1.6;
}
html[data-theme="ice"] body { --muted: #58534d; }
html body::before { opacity: .12; }
html body :is(h1,h2,h3,h4,h5,h6,button,input,select,textarea,label,summary) { font-family: var(--site-ui); }
html body :is(h1,h2,h3,h4,h5,h6) { letter-spacing: -.025em; text-shadow: none; }
html body .btn { border-radius: 8px; box-shadow: none; text-shadow: none; font-family: var(--site-ui); }
html body .btn.primary { background: var(--accent, #3b6fb6); color: #fff; border-color: var(--accent, #3b6fb6); }
html[data-theme="fire"] body :is(.btn-ghost,.btn-secondary),
html[data-theme="fire"] body header .btn:not(.primary),
html[data-theme="fire"] body .site-footer .btn:not(.primary) {
  background: var(--surface-1); color: var(--ink); border-color: var(--border); box-shadow: none;
}
html body .sect { box-shadow: none; }
html body .sect::before { display: none; }
html body :is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--accent, #3b6fb6); outline-offset: 3px; }

html:is([data-theme], :not([data-theme])) body > header:has(.hdr-wrap) { background: var(--panel); box-shadow: 0 2px 12px rgba(28,22,18,.04); }
html:is([data-theme], :not([data-theme])) body > header:has(.hdr-wrap)::before, html:is([data-theme], :not([data-theme])) body > header:has(.hdr-wrap)::after { display: none; }
html:is([data-theme], :not([data-theme])) body .hdr-wrap.big { padding: 18px 24px; gap: 20px; }
html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand { gap: 14px; }
html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand .logo { width: 68px; height: 68px; border-radius: 14px; box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand h1 { font-size: 30px; line-height: 1.2; letter-spacing: 0; }
html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand h1 small { display: inline-block; margin-top: 5px; font: 400 12px/1.5 var(--site-ui); letter-spacing: 0; color: var(--muted); }
html:is([data-theme], :not([data-theme])) body header .btn { font-family: var(--site-ui); font-size: 13px; box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .menu-wrap { background: var(--surface-1); }
html:is([data-theme], :not([data-theme])) body .menu { padding: 8px 24px; gap: 8px; }
html:is([data-theme], :not([data-theme])) body .menu .pill { font: 600 13px/1.5 var(--site-ui); padding: 10px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .menu .pill:hover, html:is([data-theme], :not([data-theme])) body .menu .pill.is-active { background: var(--surface-2); border-color: var(--border); color: var(--ink); transform: none; box-shadow: none; }

html:is([data-theme], :not([data-theme])) body .site-footer { margin: 0; background: var(--panel); box-shadow: none; font: 13px/1.8 var(--site-ui); }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-wrap { padding: 40px 24px; gap: 32px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-col { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-title { font: 700 14px/1.5 var(--site-ui); letter-spacing: 0; margin-bottom: 16px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-title.small { margin-bottom: 8px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-list a, html:is([data-theme], :not([data-theme])) body .site-footer .link-like { padding: 3px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font: 400 13px/1.8 var(--site-ui); box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-list a:hover, html:is([data-theme], :not([data-theme])) body .site-footer .link-like:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; transform: none; box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-contact a { overflow-wrap: anywhere; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-social { flex-wrap: wrap; gap: 6px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-social .ico { font: 600 11px var(--site-ui); padding: 0 8px; }
html:is([data-theme], :not([data-theme])) body .site-footer .btn, html:is([data-theme], :not([data-theme])) body .site-footer .back-top, html:is([data-theme], :not([data-theme])) body .site-footer input { font-family: var(--site-ui); box-shadow: none; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-note { font-size: 11px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-bottom { background: transparent; font-size: 12px; }
html:is([data-theme], :not([data-theme])) body .site-footer :is(a,button,input):focus-visible, html:is([data-theme], :not([data-theme])) body header :is(a,button):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }


html body .hdr-wrap.big .brand h1 { font-family: var(--site-brand); }
html body .hdr-wrap.big .brand h1 small { font-family: var(--site-ui); }
/* Pages d'information : leurs propres menus et tokens restent compatibles. */
html body:is(.about,.faqpage,.contact,.security,.how,.seller,.privacy,.cookies,.legal,.terms,.fees,.bp) {
  --info-shadow-sm: 0 3px 12px rgba(28,22,18,.06); --info-shadow-md: 0 8px 24px rgba(28,22,18,.08);
  --info-btn-shadow: none; --info-btn-shadow-hover: none; --info-btn-primary-shadow: none;
}
html body .topbar { box-shadow: none; }
html body .topbar .brand .title { font-family: var(--site-brand); letter-spacing: 0; }
html body .topbar .nav a { font-family: var(--site-ui); border-radius: 8px; box-shadow: none; }
/* Navigation mobile : m?mes surfaces, sans changer les tiroirs ni les badges. */
html body .mobileTopHeader { background: var(--panel, #fffaf2); box-shadow: var(--shadow-sm); border-radius: 16px; gap: 10px; }
html body .mobileTopHeader::before, html body .mobileTopHeader::after { display: none; }
html body .mobileTopLogo { width: 48px; height: 48px; border-radius: 12px; box-shadow: none; }
html body :is(.mobileTopBrandName,.mobileSideBrandName) { font-family: var(--site-brand); font-size: 20px; text-transform: none; letter-spacing: 0; }
html body :is(.mobileTopTitle,.mobileSideTitle,.mobileSideLink,.mobileBottomItem) { font-family: var(--site-ui); letter-spacing: 0; }
html body :is(.mobileMenuTrigger,.mobileSideThemeBtn) { background: var(--surface-1, #fffdf8); box-shadow: none; border-radius: 10px; }
/* Salle d'?change priv?e : surfaces sombres pour garder les statuts lisibles. */
html body.trade-app:not(.page-propose-trade) { background: #141d29; color: #e7edf6; }
html body.trade-app:not(.page-propose-trade)::before, html body.trade-app:not(.page-propose-trade)::after { display: none; }
html body.trade-app :is(.trade-window,.player-panel,.trade-footer,.modal-content) { border-image: none; box-shadow: none; }
html body.trade-app:not(.page-propose-trade) :is(.trade-window,.player-panel,.trade-header,.trade-footer) { background: #1c2838; border-color: #415269; }
html body.trade-app :is(.seller-panel,.buyer-panel,.trade-header)::before { display: none; }
html body.trade-app :is(.seller-panel,.buyer-panel) { animation: none; }
html body.trade-app :is(.trade-title,.player-name,.chat-title,.inventory-title,.trade-summary-name) { font-family: var(--site-ui); text-shadow: none; }
@media (max-width: 760px) {
  html:is([data-theme], :not([data-theme])) body .hdr-wrap.big { align-items: stretch; gap: 14px; }
  html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand { justify-content: center; }
  html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand h1 { font-size: 25px; text-align: left; }
  html:is([data-theme], :not([data-theme])) body .hdr-wrap.big .brand .logo { width: 56px; height: 56px; }
  html:is([data-theme], :not([data-theme])) body .menu { padding: 8px 18px; }
  html:is([data-theme], :not([data-theme])) body .site-footer .ft-wrap { gap: 28px; padding: 30px 18px; }
}
@media (prefers-reduced-motion: reduce) { html body :is(.btn,.menu .pill,.mobileMenuTrigger) { transition: none; } }

/* Les pages d'aide avaient des polices et contrastes cod?s en dur. */
html:is([data-theme], :not([data-theme])) body:is(.about,.faqpage,.contact,.security,.how,.seller,.privacy,.cookies,.legal,.terms,.fees,.bp) {
  font-family: var(--site-ui); --info-btn-font: var(--site-ui);
}
html:is([data-theme], :not([data-theme])) body:is(.about,.faqpage,.contact,.security,.how,.seller,.privacy,.cookies,.legal,.terms,.fees,.bp) :is(h1,h2,h3,h4,.num,.nav a,.theme-toggle,.faq-q) {
  font-family: var(--site-ui); letter-spacing: -.02em; text-transform: none;
}
html:is([data-theme], :not([data-theme])) body:is(.about,.faqpage,.contact,.security,.how,.seller,.privacy,.cookies,.legal,.terms,.fees,.bp) .faq-q { color: var(--info-ink); }
html:is([data-theme], :not([data-theme])) body:is(.about,.faqpage,.contact,.security,.how,.seller,.privacy,.cookies,.legal,.terms,.fees,.bp) .nav :is(a,.theme-toggle) { box-shadow: none; background: var(--info-surface-2); border-radius: 8px; }

/* Footer : une navigation lisible, dans la palette du site. */
html:is([data-theme], :not([data-theme])) body .site-footer .ft-wrap { grid-template-columns: 1.2fr 1fr 1fr 1.15fr; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-text { margin: 0 0 18px; line-height: 1.75; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-contact { margin-bottom: 18px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-contact a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-contact-button { display: inline-flex; align-items: center; padding: 9px 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font-size: 13px; text-decoration: none; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-contact-button:hover { background: var(--surface-3); }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-bottom { padding: 20px max(24px, calc((100% - 1152px) / 2)); align-items: flex-start; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-copy { flex: 1 1 560px; min-width: 0; }
html:is([data-theme], :not([data-theme])) body .site-footer .ft-legal-note { max-width: 95ch; margin-top: 12px; }
html:is([data-theme], :not([data-theme])) body .site-footer .back-top { flex-shrink: 0; background: var(--surface-1); font-size: 12px; }
@media (max-width: 1024px) {
  html:is([data-theme], :not([data-theme])) body .site-footer .ft-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  html:is([data-theme], :not([data-theme])) body .site-footer .ft-wrap { grid-template-columns: 1fr; gap: 26px; }
  html:is([data-theme], :not([data-theme])) body .site-footer .ft-bottom { padding: 20px 18px; }
  html:is([data-theme], :not([data-theme])) body .site-footer .back-top { margin-left: 0; }
}
