/**
 * CraftyForm — Dark gaming theme overlay for Flarum
 * Modular overrides with html body prefix for specificity.
 */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');

/* =============================================================================
   1. CSS CUSTOM PROPERTIES (:root)
   ============================================================================= */

html body {
  --cf-primary: #5b42f3;
  --cf-primary-hover: #7c5cff;
  --cf-primary-muted: rgba(91, 66, 243, 0.16);
  --cf-primary-soft: rgba(91, 66, 243, 0.08);
  --cf-accent: #00ddeb;
  --cf-neon-blue: #00ddeb;
  --cf-neon-purple: #7c5cff;
  --cf-gold: #f5c842;
  --cf-glass-bg: rgba(14, 14, 24, 0.72);
  --cf-glass-blur: blur(16px);
  --cf-glass-gradient: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
  --cf-glass-inner: rgb(5, 6, 45);
  --cf-glass-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
  --cf-glass-radius: 8px;
  --cf-glass-inner-radius: 6px;
  --cf-glass-border: 3px;
  --cf-danger: #ef4444;
  --cf-danger-muted: rgba(239, 68, 68, 0.12);
  --cf-warning: #f59e0b;
  --cf-success: #22c55e;
  --cf-info: #38bdf8;

  --cf-bg-950: #050506;
  --cf-bg-900: #09090b;
  --cf-bg-850: #0e0e12;
  --cf-bg-800: #121217;
  --cf-bg-750: #16161d;
  --cf-bg-700: #1a1a22;
  --cf-bg-650: #1f1f28;
  --cf-bg-600: #24242f;

  --cf-border: #27273a;
  --cf-border-strong: #35354a;
  --cf-border-soft: rgba(255, 255, 255, 0.06);

  --cf-text-100: #f4f4f8;
  --cf-text-200: #ececf3;
  --cf-text-300: #c8c8d6;
  --cf-text-400: #a99fc4;
  --cf-text-500: #7c7c94;
  --cf-text-muted: #6b6b82;

  --cf-text-primary: #f4f4f8;
  --cf-text-secondary: #b8b8cc;
  --cf-text-tertiary: #8a8aa0;

  --cf-accent-primary: #00ddeb;
  --cf-accent-secondary: #7c5cff;
  --cf-surface-1: #121217;
  --cf-surface-2: #0e0e12;

  --cf-selected-bg: rgba(91, 66, 243, 0.16);
  --cf-selected-border: rgba(91, 66, 243, 0.35);
  --cf-selected-color: #00ddeb;
  --cf-selected-radius: var(--cf-radius-sm);

  --cf-glow: rgba(151, 65, 252, 0.28);
  --cf-shadow: rgba(0, 0, 0, 0.35);
  --cf-shadow-lg: rgba(0, 0, 0, 0.55);

  --cf-radius-xs: 4px;
  --cf-radius-sm: 6px;
  --cf-radius: 10px;
  --cf-radius-lg: 14px;
  --cf-radius-xl: 18px;

  --cf-trans: 160ms ease;
  --cf-trans-slow: 260ms ease;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-9: 40px;
  --sp-10: 48px;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;

  --font-sans: "Exo 2", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Rajdhani", "Exo 2", var(--font-sans);
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  --header-height: 44px;
  --header-height-phone: 44px;
  --header-bg: rgba(9, 9, 11, 0.95);
  --header-color: var(--cf-text-100);

  --body-bg: var(--cf-bg-900);
  --text-color: var(--cf-text-200);
  --control-bg: var(--cf-bg-700);
  --control-color: var(--cf-text-200);
  --border-radius: var(--cf-radius-sm);
}

/* =============================================================================
   2. BASE BODY / APP OVERRIDES (dark forum shell)
   ============================================================================= */

html body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(91, 66, 243, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 221, 235, 0.08), transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(91, 66, 243, 0.04) 39px,
      rgba(91, 66, 243, 0.04) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(0, 221, 235, 0.03) 39px,
      rgba(0, 221, 235, 0.03) 40px
    ),
    var(--cf-bg-900) !important;
  color: var(--cf-text-200) !important;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html body .App {
  background: var(--cf-bg-900);
  color: var(--cf-text-200);
  min-height: 100vh;
}

html body .App-content {
  background: var(--cf-bg-900);
  color: var(--cf-text-200);
}

html body .container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
  box-sizing: border-box;
}

html body .App-content,
html body .IndexPage,
html body .DiscussionPage,
html body .UserPage {
  width: 100%;
}

@media (min-width: 992px) {
  html body .IndexPage .sideNavContainer,
  html body .DiscussionPage .sideNavContainer,
  html body .UserPage .sideNavContainer {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: var(--sp-6);
  }

  html body .IndexPage .sideNav,
  html body .DiscussionPage .sideNav,
  html body .UserPage .sideNav {
    flex: 0 0 200px;
    width: 200px;
    margin-right: 0 !important;
  }

  html body .IndexPage .sideNavOffset,
  html body .DiscussionPage .sideNavOffset,
  html body .UserPage .sideNavOffset {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
}

html body .DiscussionList,
html body .DiscussionList-discussions,
html body .DiscussionListItem {
  width: 100%;
  box-sizing: border-box;
}

html body a {
  color: var(--cf-primary);
}

html body a:hover {
  color: var(--cf-accent);
}

html body .Button {
  border-radius: var(--cf-glass-radius);
  font-weight: 600;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

html body .Button:not(.Button--primary):not(.Button--icon):not(.Button--flat) {
  background: var(--cf-bg-700) !important;
  border: 1px solid var(--cf-border) !important;
  color: var(--cf-text-300) !important;
}

html body .Button:not(.Button--primary):not(.Button--icon):not(.Button--flat):hover,
html body .Button:not(.Button--primary):not(.Button--icon):not(.Button--flat):focus {
  background: var(--cf-bg-650) !important;
  border-color: var(--cf-border-strong) !important;
  color: var(--cf-text-100) !important;
}

html body .Button--primary,
html body .App-header .Header-secondary .Button--primary,
html body .sideNav .Button--newDiscussion {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(var(--cf-glass-inner), var(--cf-glass-inner)) padding-box,
    var(--cf-glass-gradient) border-box !important;
  border: var(--cf-glass-border) solid transparent !important;
  border-radius: var(--cf-glass-radius) !important;
  box-shadow: var(--cf-glass-shadow);
  color: #fff !important;
  white-space: nowrap;
}

html body .Button--primary:hover,
html body .Button--primary:focus,
html body .Button--primary.active,
html body .App-header .Header-secondary .Button--primary:hover,
html body .App-header .Header-secondary .Button--primary:focus,
html body .sideNav .Button--newDiscussion:hover,
html body .sideNav .Button--newDiscussion:focus {
  background: var(--cf-glass-gradient) border-box !important;
  border: var(--cf-glass-border) solid transparent !important;
  color: #fff !important;
}

html body .Button--primary:active,
html body .App-header .Header-secondary .Button--primary:active,
html body .sideNav .Button--newDiscussion:active {
  transform: scale(0.97);
}

html body .Button--nav {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: var(--cf-bg-700) !important;
  border: 1px solid var(--cf-border) !important;
  border-radius: var(--cf-radius-sm) !important;
  box-shadow: none !important;
  color: var(--cf-text-secondary) !important;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--cf-trans), border-color var(--cf-trans), color var(--cf-trans);
}

/* Header auth buttons styled in section 3 (CRAFTY HEADER BAR) */

html body .Button--flat {
  color: var(--cf-text-300) !important;
  background: transparent !important;
  border-color: transparent !important;
}

html body .Button--flat:hover {
  background: var(--cf-bg-700) !important;
  color: var(--cf-text-100) !important;
}

html body .FormControl,
html body input.FormControl,
html body textarea.FormControl,
html body select.FormControl {
  background: var(--cf-bg-700) !important;
  border: 1px solid var(--cf-border) !important;
  color: var(--cf-text-200) !important;
  border-radius: var(--cf-radius-sm) !important;
}

html body .FormControl:focus {
  border-color: var(--cf-primary) !important;
  box-shadow: 0 0 0 2px var(--cf-primary-muted) !important;
}

html body .Dropdown-menu {
  background: var(--cf-bg-800) !important;
  border: 1px solid var(--cf-border) !important;
  border-radius: var(--cf-radius) !important;
  box-shadow: 0 12px 32px var(--cf-shadow-lg) !important;
}

html body .Dropdown-menu > li > a,
html body .Dropdown-menu > li > button {
  color: var(--cf-text-300) !important;
}

html body .Dropdown-menu > li > a:hover,
html body .Dropdown-menu > li > button:hover {
  background: var(--cf-bg-700) !important;
  color: var(--cf-text-100) !important;
}

html body .Alert {
  border-radius: var(--cf-radius);
  border: 1px solid var(--cf-border);
}

html body .Alert--success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

html body .Alert--error {
  background: var(--cf-danger-muted);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

html body .DiscussionListItem {
  background: var(--cf-surface-1);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  margin-bottom: var(--sp-2);
  box-shadow: 0 4px 14px var(--cf-shadow);
  transition: border-color var(--cf-trans), transform var(--cf-trans);
}

html body .DiscussionListItem:hover {
  border-color: var(--cf-primary);
}

html body .DiscussionListItem-title {
  color: var(--cf-text-100);
  font-weight: 600;
}

html body .DiscussionListItem-info {
  color: var(--cf-text-secondary);
}

html body .DiscussionListItem-info time,
html body .DiscussionListItem-info .DiscussionListItem-count {
  color: var(--cf-text-tertiary);
}

html body .Post {
  background: var(--cf-bg-800);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
}

html body .Post-header {
  border-bottom: 1px solid var(--cf-border-soft);
}

html body .PostUser-displayName {
  color: var(--cf-text-100);
  font-weight: 600;
}

html body .Post-body {
  color: var(--cf-text-300);
}

html body .Post-body img,
html body .Post-body .FoFUpload--Upl-Image-Preview {
  max-width: 100%;
  height: auto;
  border-radius: var(--cf-radius-sm);
  margin: var(--sp-2) 0;
}

html body .Composer .fof-upload-button,
html body .Composer .item-upload {
  display: inline-flex;
  align-items: center;
}

html body .sideNav .Dropdown-menu > li > a,
html body .sideNav .Dropdown-menu > li > button {
  color: var(--cf-text-secondary) !important;
}

html body .IndexPage-toolbar,
html body .TagsPage-toolbar {
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
}

html body .IndexPage-toolbar-view li > a,
html body .IndexPage-toolbar-view li > button,
html body .IndexPage-toolbar-action li > a,
html body .IndexPage-toolbar-action li > button {
  background: var(--cf-bg-700);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-selected-radius);
  color: var(--cf-text-secondary);
  transition: background var(--cf-trans), border-color var(--cf-trans), color var(--cf-trans);
}

html body .Hero,
html body .TagsPage .Hero {
  background: linear-gradient(135deg, var(--cf-primary-soft) 0%, transparent 100%) !important;
  border-bottom: 1px solid var(--cf-border);
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-5);
}

html body .Hero:empty,
html body .Hero .container:empty {
  display: none !important;
  padding: 0 !important;
  border: none !important;
}

html body .TagsPage .Hero {
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-5);
}

/* =============================================================================
   3. CRAFTY HEADER BAR (nav + search + auth)
   ============================================================================= */

/*
 * Structure cible (Flarum) :
 * .App-header > .container
 *   .Header-title          → logo
 *   .Header-primary        → nav (Toutes les discussions, Amis…)
 *   .Header-secondary      → recherche + Se connecter + S'inscrire
 */

html body .App-header {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 14, 18, 0.98) 0%, rgba(9, 9, 11, 0.95) 100%) !important;
  border-bottom: 1px solid var(--cf-border) !important;
  box-shadow: 0 4px 20px var(--cf-shadow);
  backdrop-filter: blur(12px);
  width: 100%;
  padding: 0 !important;
}

html body .App-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 221, 235, 0.35) 30%,
    rgba(91, 66, 243, 0.45) 70%,
    transparent 100%
  );
  pointer-events: none;
}

html body .App-header .container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  height: 48px;
  padding-top: 0;
  padding-bottom: 0;
}

html body {
  --header-height: 48px;
  --header-height-phone: 48px;
}

html body .App-header .Header-navigation,
html body .App-header .Header-title,
html body .App-header .Header-primary,
html body .App-header .Header-secondary {
  float: none !important;
  width: auto;
  margin: 0;
}

html body .App-header .Header-navigation {
  flex: 0 0 auto;
  order: 0;
}

html body .App-header .Header-title {
  flex: 0 0 auto;
  order: 1;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--cf-text-100);
  line-height: 1;
  display: flex;
  align-items: center;
  padding-right: var(--sp-2);
  border-right: 1px solid var(--cf-border-soft);
  margin-right: var(--sp-1);
}

html body .App-header .Header-title a {
  display: flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}

html body .App-header .Header-logo {
  max-height: 28px;
  width: auto;
  display: block;
  margin: 0;
}

html body .App-header .Header-primary {
  flex: 1 1 auto;
  min-width: 0;
  order: 2;
}

html body .App-header .Header-secondary {
  flex: 0 0 auto;
  order: 3;
  margin-left: auto !important;
}

html body .App-header .Header-primary .item-signUp,
html body .App-header .Header-primary .item-logIn {
  display: none !important;
}

@media (min-width: 992px) {
  html body .IndexPage-nav .item-craftyLogIn {
    display: none !important;
  }
}

/* — Nav segmentée (Toutes les discussions, Amis, Messages) — */
html body .App-header .Header-primary .Header-controls {
  display: inline-flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cf-border-soft);
  border-radius: var(--cf-radius);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

html body .App-header .Header-primary .Header-controls::-webkit-scrollbar {
  display: none;
}

html body .App-header .Header-primary .Header-controls > li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

html body .App-header .Header-primary .Button--nav,
html body .App-header .Header-primary .Header-controls > li > .Button {
  min-height: 34px;
  padding: 6px 14px !important;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--cf-radius-sm) !important;
  color: var(--cf-text-secondary) !important;
  box-shadow: none !important;
  transition: background var(--cf-trans), color var(--cf-trans), border-color var(--cf-trans);
}

html body .App-header .Header-primary .Button--nav .Button-icon,
html body .App-header .Header-primary .Header-controls > li > .Button .Button-icon {
  margin-right: 6px;
  font-size: 0.9em;
  opacity: 0.85;
}

html body .App-header .Header-primary .Button--nav:hover,
html body .App-header .Header-primary .Button--nav:focus,
html body .App-header .Header-primary .Header-controls > li > .Button--nav:hover,
html body .App-header .Header-primary .Header-controls > li > .Button--nav:focus {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: transparent !important;
  color: var(--cf-text-primary) !important;
  box-shadow: none !important;
}

html body .App-header .Header-primary .Button--nav.active,
html body .App-header .Header-primary .Header-controls > li > .Button--nav.active {
  background: var(--cf-selected-bg) !important;
  border-color: var(--cf-selected-border) !important;
  color: var(--cf-selected-color) !important;
  box-shadow: none !important;
}

html body .App-header .Header-primary .item-craftyNavFriends,
html body .App-header .Header-primary .item-craftyNavMessages {
  position: relative;
}

html body .App-header .Header-primary .item-craftyNavFriends .Button,
html body .App-header .Header-primary .item-craftyNavMessages .Button {
  padding-right: var(--sp-6) !important;
}

/* — Zone droite : recherche + auth — */
html body .App-header .Header-secondary .Header-controls {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

html body .App-header .Header-secondary .Header-controls > li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

html body .App-header .Header-secondary .item-search {
  order: 1;
}

html body .App-header .Header-secondary .item-logIn {
  order: 2;
}

html body .App-header .Header-secondary .item-signUp {
  order: 3;
}

/* Barre de recherche */
html body .App-header .Header-secondary .Search,
html body .App-header .Header-secondary .CraftyHeaderBar-search {
  margin: 0 !important;
  width: 220px;
  max-width: 28vw;
  transition: none !important;
}

html body .App-header .Header-secondary .Search.focused {
  margin-left: 0 !important;
}

html body .App-header .Header-secondary .Search .Search-input {
  display: flex;
  align-items: center;
  float: none;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 10px 0 0;
  background: var(--cf-bg-750);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-sm);
  overflow: hidden;
  transition: border-color var(--cf-trans), box-shadow var(--cf-trans);
}

html body .App-header .Header-secondary .Search .Search-input::before {
  float: none;
  flex: 0 0 36px;
  width: 36px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--cf-text-tertiary);
  line-height: 1;
  pointer-events: none;
}

html body .App-header .Header-secondary .Search .Search-input input {
  float: none;
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px 6px 0 !important;
  margin: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--cf-text-primary) !important;
  font-size: var(--fs-sm);
}

html body .App-header .Header-secondary .Search .Search-input input::placeholder {
  color: var(--cf-text-tertiary);
}

html body .App-header .Header-secondary .Search.focused .Search-input,
html body .App-header .Header-secondary .Search .Search-input:focus-within {
  border-color: rgba(0, 221, 235, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 221, 235, 0.12);
}

html body .App-header .Header-secondary .Search.focused .Search-input input,
html body .App-header .Header-secondary .Search.focused input {
  width: 100% !important;
}

html body .App-header .Header-secondary .Search .Search-input .Button,
html body .App-header .Header-secondary .Search .Search-clear {
  float: none;
  flex: 0 0 28px;
  width: 28px !important;
  min-width: 28px;
  height: 28px;
  margin: 0;
  padding: 0 !important;
  color: var(--cf-text-tertiary) !important;
}

/* Se connecter — lien discret */
html body .App-header .Header-secondary .Button--login,
html body .App-header .Header-secondary .CraftyHeaderBar-logIn {
  min-height: 36px;
  padding: 6px 12px !important;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  background: transparent !important;
  border: none !important;
  color: var(--cf-text-secondary) !important;
  box-shadow: none !important;
}

html body .App-header .Header-secondary .Button--login:hover,
html body .App-header .Header-secondary .CraftyHeaderBar-logIn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--cf-text-primary) !important;
}

/* S'inscrire — CTA principal */
html body .App-header .Header-secondary .item-signUp .Button--primary,
html body .App-header .Header-secondary .CraftyHeaderBar-signUp {
  min-height: 36px;
  padding: 6px 16px !important;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border-width: 2px !important;
  border-radius: var(--cf-radius-sm) !important;
  box-shadow: 0 2px 12px rgba(91, 66, 243, 0.25);
}

html body .App-header .Header-secondary .item-signUp .Button--primary:hover,
html body .App-header .Header-secondary .CraftyHeaderBar-signUp:hover {
  box-shadow: 0 4px 18px rgba(91, 66, 243, 0.38);
}

/* Séparateur visuel avant auth */
html body .App-header .Header-secondary .item-logIn::before {
  content: '';
  display: block;
  width: 1px;
  height: 22px;
  margin-right: var(--sp-2);
  background: var(--cf-border);
}

/* Mobile drawer layout : voir section « MOBILE DRAWER & TOP BAR » */

html body .App-header .Header-primary .item-craftyNavFriends,
html body .App-header .Header-primary .item-craftyNavMessages {
  position: relative;
}

html body .App-header .Header-primary .item-craftyNavFriends .Button,
html body .App-header .Header-primary .item-craftyNavMessages .Button {
  position: relative;
  padding-right: var(--sp-5) !important;
}

html body .CraftyNavBadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--cf-danger);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--cf-bg-900);
  pointer-events: none;
}

html body .item-craftyNavFriends .CraftyNavBadge,
html body .item-craftyNavMessages .CraftyNavBadge {
  z-index: 2;
}

html body .CraftySignUpControl.Button--primary,
html body .CraftyLogInControl {
  min-height: 36px;
}

html body .CraftyGuestSignUp .Button--primary,
html body .CraftyGuestLogIn .Button {
  width: 100%;
}

html body .App-navigation {
  background: var(--cf-bg-900) !important;
  border-bottom: 1px solid var(--cf-border);
}

html body .App-navigation .Navigation {
  gap: var(--sp-1);
}

html body .App-navigation .Navigation .Button {
  color: var(--cf-text-300);
  border-radius: var(--cf-radius-sm);
}

/* =============================================================================
   4. CRAFTY PROFILE SOCIAL (badges, errors, blocked, buttons)
   ============================================================================= */

html body .CraftyProfileSocial {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  margin: var(--sp-3) 0;
  padding: var(--sp-3);
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
}

html body .CraftyProfileSocial-hint {
  margin: 0;
  color: var(--cf-text-400);
  font-size: var(--fs-sm);
}

html body .CraftyProfileSocial-error {
  margin: 0;
  flex: 1 1 100%;
  color: #fecaca;
  background: var(--cf-danger-muted);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--cf-radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
}

html body .CraftyProfileSocial-blocked {
  margin: 0;
  color: var(--cf-text-400);
  font-size: var(--fs-sm);
  font-style: italic;
}

html body .CraftyProfileSocial-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--cf-accent);
  background: var(--cf-primary-muted);
  border: 1px solid rgba(91, 66, 243, 0.35);
  border-radius: 999px;
}

html body .CraftyProfileSocial-badge--blocked {
  color: #fca5a5;
  background: var(--cf-danger-muted);
  border-color: rgba(239, 68, 68, 0.35);
}

html body .CraftyProfileSocial .Button {
  min-height: 36px;
}

html body .CraftyProfileSocial-blockBtn {
  color: var(--cf-text-400) !important;
  border-color: var(--cf-border) !important;
  background: transparent !important;
}

html body .CraftyProfileSocial-blockBtn:hover {
  color: #fecaca !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: var(--cf-danger-muted) !important;
}

/* =============================================================================
   5. CRAFTY SOCIAL PAGE (tabs + lists)
   ============================================================================= */

html body .CraftySocialPage {
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-8);
}

html body .CraftySocialPage > h1 {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--cf-text-100);
}

html body .CraftySocialTabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: var(--sp-2);
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
}

html body .CraftySocialTabs .Button {
  min-height: 38px;
  padding: var(--sp-2) var(--sp-4) !important;
  background: var(--cf-bg-700) !important;
  border: 1px solid var(--cf-border) !important;
  color: var(--cf-text-secondary) !important;
  border-radius: var(--cf-selected-radius) !important;
  transition: background var(--cf-trans), border-color var(--cf-trans), color var(--cf-trans);
}

html body .CraftySocialList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

html body .CraftySocialList-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--cf-bg-800);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  transition: border-color var(--cf-trans);
}

html body .CraftySocialList-item:hover {
  border-color: var(--cf-primary);
}

html body .CraftySocialList-item > a {
  font-weight: 600;
  color: var(--cf-text-100);
  text-decoration: none;
}

html body .CraftySocialList-item > a:hover {
  color: var(--cf-accent);
}

html body .CraftySocialList-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

html body .CraftySocialEmpty {
  padding: var(--sp-6);
  text-align: center;
  color: var(--cf-text-400);
  background: var(--cf-bg-850);
  border: 1px dashed var(--cf-border);
  border-radius: var(--cf-radius);
}

/* =============================================================================
   6. CRAFTY MESSAGES PAGE (sidebar + thread layout)
   ============================================================================= */

html body .CraftyMessagesPage {
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-8);
}

html body .CraftyMessagesPage > h1 {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--cf-text-100);
}

html body .CraftyMessagesLayout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: var(--sp-4);
  min-height: 420px;
}

html body .CraftyMessagesSidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2);
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  max-height: 70vh;
  overflow-y: auto;
}

html body .CraftyMessagesConv {
  display: block;
  padding: var(--sp-3);
  text-decoration: none;
  color: inherit;
  background: var(--cf-bg-800);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-sm);
  transition: border-color var(--cf-trans), background var(--cf-trans);
  position: relative;
}

html body .CraftyMessagesConv-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

html body .CraftyMessagesConv-body {
  flex: 1;
  min-width: 0;
}

html body .CraftyMessagesConv strong {
  display: block;
  color: var(--cf-text-100);
  margin-bottom: var(--sp-1);
}

html body .CraftyMessagesAvatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cf-border);
  background: var(--cf-bg-700);
}

html body .CraftyMessagesAvatar--conv {
  width: 44px;
  height: 44px;
}

html body .CraftyMessagesAvatar--title {
  width: 36px;
  height: 36px;
}

html body .CraftyMessagesAvatar--msg {
  width: 36px;
  height: 36px;
}

html body .CraftyMessagesAvatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--cf-primary), #7c3aed);
}

html body .CraftyMessagesBadge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--cf-primary);
  border-radius: 999px;
}

html body .CraftyMessagesPreview {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--cf-text-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body .CraftyMessagesThread {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  overflow: hidden;
}

html body .CraftyMessagesThreadTitle {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-lg);
  border-bottom: 1px solid var(--cf-border);
  background: var(--cf-bg-800);
  color: var(--cf-text-100);
}

html body .CraftyMessagesList {
  list-style: none;
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

html body .CraftyMessage {
  padding: var(--sp-3);
  background: var(--cf-bg-800);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-sm);
}

html body .CraftyMessage-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

html body .CraftyMessage-body {
  flex: 1;
  min-width: 0;
}

html body .CraftyMessage-body p {
  margin: 0;
  word-break: break-word;
}

html body .CraftyMessage-meta {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--cf-primary);
  margin-bottom: var(--sp-1);
}

html body .CraftyMessagesTyping {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--cf-text-400);
  border-top: 1px solid var(--cf-border);
  background: var(--cf-bg-850);
}

html body .CraftyMessagesTyping-label {
  flex-shrink: 0;
}

html body .CraftyMessagesTyping-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
}

html body .CraftyMessagesTyping-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cf-primary);
  animation: craftyTypingBounce 1.2s ease-in-out infinite;
}

html body .CraftyMessagesTyping-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

html body .CraftyMessagesTyping-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes craftyTypingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

html body .CraftyMessagesComposer {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-top: 1px solid var(--cf-border);
  background: var(--cf-bg-800);
}

html body .CraftyMessagesComposer textarea {
  flex: 1;
  min-height: 72px;
  resize: vertical;
}

/* =============================================================================
   7. CRAFTY LEGAL PAGE + FOOTER
   ============================================================================= */

html body .CraftyLegalPage {
  max-width: 820px;
  margin: var(--sp-6) auto var(--sp-8);
  padding: var(--sp-6);
  background: var(--cf-bg-850);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 12px 40px var(--cf-shadow);
}

html body .CraftyLegalPage-header h1 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-2xl);
  color: var(--cf-text-100);
}

html body .CraftyLegalPage-meta {
  margin: 0 0 var(--sp-3);
  color: var(--cf-text-400);
  font-size: var(--fs-sm);
}

html body .CraftyLegalPage-back a {
  color: var(--cf-primary);
  text-decoration: none;
  font-weight: 600;
}

html body .CraftyLegalPage-body {
  color: var(--cf-text-300);
  line-height: 1.65;
}

html body .CraftyLegalPage-body h2 {
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
  color: var(--cf-text-100);
  font-size: var(--fs-lg);
}

html body .CraftyLegalPage-body p,
html body .CraftyLegalPage-body li {
  margin-bottom: var(--sp-3);
}

html body .CraftyLegalPage-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0;
  font-size: var(--fs-sm);
}

html body .CraftyLegalPage-table th,
html body .CraftyLegalPage-table td {
  border: 1px solid var(--cf-border);
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
}

html body .CraftyLegalPage-table th {
  background: var(--cf-bg-700);
  color: var(--cf-text-100);
}

html body .CraftyLegalSignup {
  margin-top: var(--sp-3);
}

html body .CraftyLegalSignup label {
  color: var(--cf-text-300);
  font-size: var(--fs-sm);
}

html body .CraftyLegalFooter {
  margin-top: var(--sp-6);
  padding: var(--sp-5) var(--sp-4);
  background: var(--cf-bg-950);
  border-top: 1px solid var(--cf-border);
  text-align: center;
}

html body .CraftyLegalFooter-copy {
  margin: 0 0 var(--sp-2);
  color: var(--cf-text-500);
  font-size: var(--fs-sm);
}

html body .CraftyLegalFooter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
}

html body .CraftyLegalFooter-link,
html body .CraftyLegalFooter-nav a {
  color: var(--cf-primary);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}

html body .CraftyLegalFooter-nav a:hover,
html body .CraftyLegalFooter-link:hover {
  text-decoration: underline;
  color: var(--cf-accent);
}

html body .CraftyLegalFooter-nav span[aria-hidden="true"] {
  color: var(--cf-text-500);
}

/* =============================================================================
   8. TAGS PAGE HERO (CraftyTagsHero + toolbar)
   ============================================================================= */

html body .CraftyTagsHero {
  margin-bottom: var(--sp-4);
  padding: var(--sp-6);
  background: linear-gradient(135deg, var(--cf-primary-muted) 0%, var(--cf-bg-850) 55%, var(--cf-bg-900) 100%);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 8px 28px var(--cf-shadow);
}

html body .CraftyTagsHero-inner {
  max-width: 900px;
}

html body .CraftyTagsHero-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--cf-text-100);
}

html body .CraftyTagsHero-sub {
  margin: 0 0 var(--sp-5);
  color: var(--cf-text-400);
  font-size: var(--fs-md);
}

html body .CraftyTagsHero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}

html body .CraftyTagsHero-stat {
  padding: var(--sp-3) var(--sp-4);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  text-align: center;
}

html body .CraftyTagsHero-stat-val {
  display: block;
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--cf-accent);
  line-height: 1.2;
}

html body .CraftyTagsHero-stat-lbl {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--cf-text-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html body .CraftyTagsToolbar {
  margin-bottom: var(--sp-4);
}

html body .CraftyTagsSearch {
  display: block;
}

html body .CraftyTagsSearch-input {
  width: 100%;
  max-width: 420px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--cf-bg-800);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius);
  color: var(--cf-text-200);
}

html body .CraftyTagsSearch-input:focus {
  outline: none;
  border-color: var(--cf-primary);
  box-shadow: 0 0 0 2px var(--cf-primary-muted);
}

html body .TagsPage .TagTiles {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3) !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .TagsPage .TagTiles > li {
  height: auto !important;
  float: none !important;
}

html body .TagsPage .TagTile {
  background: var(--cf-bg-800) !important;
  border: 1px solid var(--cf-border) !important;
  border-radius: var(--cf-radius) !important;
  transition: border-color var(--cf-trans), transform var(--cf-trans), box-shadow var(--cf-trans);
}

html body .TagsPage .TagTile:hover {
  border-color: var(--cf-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--cf-shadow);
}

html body .TagsPage .CraftyTagTile--featured .TagTile {
  border-color: rgba(91, 66, 243, 0.55) !important;
  box-shadow: 0 0 0 1px var(--cf-primary-muted);
}

html body .TagsPage-nav.sideNav--horizontal .Dropdown-menu > li > a {
  color: var(--cf-text-300) !important;
  font-weight: 600;
}

/* =============================================================================
   9. HOME STATS (legacy hooks — layout géré par le hub §11)
   ============================================================================= */

html body .CraftyHomeStats {
  margin: 0;
  width: 100%;
}

html body .CraftyHomeStats-grid,
html body .CraftyHomeStats-card {
  display: none;
}

html body .CraftyQuickActions {
  display: none !important;
}

html body .IndexPage-nav .item-tags,
html body .IndexPage-nav li[class^='item-tag'] {
  display: none !important;
}

/* =============================================================================
   9b. TAG LABELS (gaming category colors)
   ============================================================================= */

html body .TagLabel {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--cf-radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html body .TagLabel.colored {
  border-color: rgba(255, 255, 255, 0.15);
}

html body .TagLabel.untagged {
  background: rgba(138, 138, 160, 0.25) !important;
  border: 1px solid rgba(184, 184, 204, 0.35) !important;
  color: var(--cf-text-secondary) !important;
}

html body .TagLabel.untagged .TagLabel-text,
html body .TagLabel.untagged .TagLabel-name {
  color: var(--cf-text-secondary) !important;
}

/* =============================================================================
   9c. NIGHT MODE TOGGLE (CraftyForm forces dark theme)
   ============================================================================= */

html body .Header-secondary .item-nightmode,
html body .Header-secondary .item-daymode,
html body .UserPage .item-fof-nightmode {
  display: none !important;
}

/* =============================================================================
   10. MODERATION HISTORY OVERLAY
   ============================================================================= */

html body.CraftyHistoryOverlay-open {
  overflow: hidden;
}

html body .CraftyHistoryOverlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

html body .CraftyHistoryDialog {
  width: min(560px, 100%);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--cf-bg-800);
  color: var(--cf-text-200);
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 16px 48px var(--cf-shadow-lg);
}

html body .CraftyHistoryDialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--cf-border);
  background: var(--cf-bg-850);
}

html body .CraftyHistoryDialog-header h3 {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--cf-text-100);
}

html body .CraftyHistoryDialog-body {
  padding: var(--sp-4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

html body .CraftyHistoryDialog .CraftyModerationHistory-scroll {
  max-height: min(60vh, 420px);
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
  flex: 1;
  min-height: 0;
}

html body .CraftyModerationHistory-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

html body .CraftyModerationHistory-item {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--cf-border-soft);
}

html body .CraftyModerationHistory-item:last-child {
  border-bottom: 0;
}

html body .CraftyModerationHistory-type {
  font-weight: 600;
  color: var(--cf-text-100);
  margin-bottom: var(--sp-1);
}

html body .CraftyModerationHistory-reason {
  white-space: pre-wrap;
  color: var(--cf-text-300);
  font-size: var(--fs-sm);
}

html body .CraftyModerationHistory-until,
html body .CraftyModerationHistory-meta {
  font-size: var(--fs-sm);
  color: var(--cf-text-500);
  margin-top: var(--sp-1);
}

html body .CraftyModerationHistory-empty,
html body .CraftyHistoryLoading {
  opacity: 0.85;
  margin: 0;
  color: var(--cf-text-400);
}

html body .CraftyModerationHistory-actions {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--cf-border);
}

/* =============================================================================
   11. TAG TILES / DISCUSSION LAYOUT (desktop refinements)
   ============================================================================= */

html body .TagsPage .sideNav {
  margin-bottom: var(--sp-4);
}

html body .TagsPage .sideNavOffset {
  margin-top: var(--sp-3);
  padding-bottom: var(--sp-2);
}

html body .TagsPage .TagTile-name {
  color: var(--cf-text-100);
  font-weight: 600;
}

html body .TagsPage .TagTile-description {
  color: var(--cf-text-400);
}

html body .DiscussionPage-nav .PostStreamScrubber {
  width: 100%;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

html body .UserPage .UserHero.UserCard {
  background: linear-gradient(135deg, var(--cf-primary-soft) 0%, transparent 100%) !important;
  border-bottom: 1px solid var(--cf-border);
}

/* =============================================================================
   12b. VERIFIED BADGE (certification CraftyForm)
   ============================================================================= */

html body .CraftyVerifiedBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1d9bf0 0%, #0d7fd4 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  position: relative;
  top: -1px;
}

html body .CraftyVerifiedBadge svg {
  display: block;
  width: 10px;
  height: 10px;
}

html body .UserCard.Hero .CraftyVerifiedBadge {
  width: 18px;
  height: 18px;
  margin-left: 6px;
}

html body .UserCard.Hero .CraftyVerifiedBadge svg {
  width: 11px;
  height: 11px;
}

html body .DiscussionListItem .CraftyVerifiedBadge,
html body .PostUser .CraftyVerifiedBadge {
  width: 14px;
  height: 14px;
  margin-left: 4px;
}

html body .DiscussionListItem .CraftyVerifiedBadge svg,
html body .PostUser .CraftyVerifiedBadge svg {
  width: 9px;
  height: 9px;
}

/* =============================================================================
   13. UNIFIED SELECTION STATES
   ============================================================================= */

html body .sideNav .Dropdown-menu > li > a,
html body .sideNav .Dropdown-menu > li > button,
html body .sideNav > ul > li > .Button {
  padding: 8px 12px 8px 36px !important;
  border: 1px solid transparent !important;
  border-radius: var(--cf-selected-radius) !important;
  transition: background var(--cf-trans), border-color var(--cf-trans), color var(--cf-trans);
}

html body .Button--nav:hover,
html body .Button--nav:focus,
html body .sideNav .Dropdown-menu > li > a:hover,
html body .sideNav .Dropdown-menu > li > button:hover,
html body .sideNav > ul > li > .Button:hover:not(.active),
html body .IndexPage-toolbar-view li > a:hover,
html body .IndexPage-toolbar-view li > button:hover,
html body .IndexPage-toolbar-action li > a:hover,
html body .IndexPage-toolbar-action li > button:hover,
html body .IndexPage-toolbar .Dropdown-menu > li > button:hover:not(.active),
html body .CraftySocialTabs .Button:hover:not(.active),
html body .CraftyMessagesConv:hover:not(.active),
html body .UserPage-nav .Dropdown-menu > li > a:hover,
html body .TagsPage-nav.sideNav--horizontal .Dropdown-menu > li > a:hover,
html body .App-navigation .Navigation .Button:hover:not(.active) {
  background: var(--cf-bg-650) !important;
  border-color: var(--cf-border-strong) !important;
  color: var(--cf-text-primary) !important;
  box-shadow: none !important;
}

html body .Button--nav.active,
html body .sideNav .Dropdown-menu > li.active > a,
html body .sideNav .Dropdown-menu > li.active > button,
html body .sideNav > ul > li > .Button.active,
html body .IndexPage-toolbar-view li.active > a,
html body .IndexPage-toolbar-view li.active > button,
html body .IndexPage-toolbar .Dropdown-menu > li > button.active,
html body .CraftySocialTabs .Button.active,
html body .CraftyMessagesConv.active,
html body .UserPage-nav .Dropdown-menu > li.active > a,
html body .TagsPage-nav.sideNav--horizontal .Dropdown-menu > li.active > a,
html body .App-navigation .Navigation .Button.active {
  background: var(--cf-selected-bg) !important;
  border: 1px solid var(--cf-selected-border) !important;
  border-radius: var(--cf-selected-radius) !important;
  color: var(--cf-selected-color) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

/* =============================================================================
   12. RESPONSIVE (mobile / tablet)
   ============================================================================= */

@media (max-width: 980px) {
  html body .TagsPage .TagTiles {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .CraftyTagsHero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html body .CraftyMessagesLayout {
    grid-template-columns: 1fr;
  }

  html body .CraftyMessagesSidebar {
    max-height: 220px;
  }
}

@media (max-width: 767px) {
  html body {
    overflow-x: clip;
    -webkit-tap-highlight-color: rgba(91, 66, 243, 0.2);
  }

  html body .App-header .Header-primary .Header-controls {
    max-width: 100%;
  }

  html body .CraftyTagsHero {
    padding: var(--sp-4);
  }

  html body .CraftyTagsHero-stats {
    grid-template-columns: 1fr;
  }

  html body .CraftySocialTabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  html body .CraftySocialTabs::-webkit-scrollbar {
    display: none;
  }

  html body .CraftySocialList-item {
    flex-direction: column;
    align-items: flex-start;
  }

  html body .CraftyLegalPage {
    margin: var(--sp-4) var(--sp-2) var(--sp-6);
    padding: var(--sp-4);
  }

  html body .IndexPage-toolbar,
  html body .TagsPage-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding: var(--sp-2);
    margin-bottom: var(--sp-3);
  }

  html body .IndexPage-toolbar-view,
  html body .IndexPage-toolbar-action {
    width: 100%;
    justify-content: stretch;
    flex-wrap: nowrap;
    gap: var(--sp-1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  html body .IndexPage-toolbar-view::-webkit-scrollbar,
  html body .IndexPage-toolbar-action::-webkit-scrollbar {
    display: none;
  }

  html body .IndexPage-toolbar-view > li,
  html body .IndexPage-toolbar-action > li {
    flex: 1 0 auto;
    min-width: 0;
  }

  html body .IndexPage-toolbar-view li > a,
  html body .IndexPage-toolbar-action li > a,
  html body .IndexPage-toolbar-action li > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: var(--sp-2) var(--sp-3) !important;
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--cf-radius-sm);
    background: var(--cf-bg-700);
    border: 1px solid var(--cf-border);
    color: var(--cf-text-300);
  }

  html body .TagsPage .TagTiles {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: var(--sp-2) !important;
  }

  html body .TagsPage .TagTiles > li {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    float: none !important;
  }

  html body .TagsPage .TagTile {
    display: grid !important;
    grid-template-columns: 4px 1fr !important;
    margin-bottom: 0 !important;
  }

  html body .TagsPage .TagTile-lastPostedDiscussion {
    display: none !important;
  }

  html body .Button:not(.Button--icon) {
    min-height: 44px;
  }

  html body .Button--icon {
    min-width: 44px;
    min-height: 44px;
  }

  html body .App-header .Button--icon {
    min-width: 40px;
    min-height: 40px;
    padding: var(--sp-2) !important;
  }

  html body .sideNav .Button--newDiscussion {
    width: 100%;
    min-height: 44px;
  }
}

@media (min-width: 768px) and (max-width: 980px) {
  html body .TagsPage .TagTile {
    grid-template-columns: 6px 1fr !important;
  }
}

/* =============================================================================
   MOBILE DRAWER & TOP BAR (≤767px)
   ============================================================================= */

@media (max-width: 767px) {
  html body .App {
    padding-top: var(--header-height-phone) !important;
  }

  /* Barre unique en haut : menu | titre | action */
  html body .App-navigation {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--header-height-phone) !important;
    min-height: var(--header-height-phone) !important;
    z-index: calc(var(--zindex-header) + 2) !important;
    display: flex !important;
    align-items: center !important;
    background: linear-gradient(180deg, rgba(14, 14, 18, 0.98) 0%, rgba(9, 9, 11, 0.95) 100%) !important;
    border-bottom: 1px solid var(--cf-border) !important;
    box-shadow: 0 2px 12px var(--cf-shadow) !important;
  }

  html body .App-navigation .Navigation-drawer .Button {
    color: var(--cf-text-primary) !important;
  }

  html body .App-titleControl,
  html body .App-primaryControl,
  html body .App-backControl {
    height: var(--header-height-phone) !important;
  }

  html body .App-titleControl .Button,
  html body .App-primaryControl .Button,
  html body .App-backControl .Button {
    height: var(--header-height-phone) !important;
    color: var(--cf-text-primary) !important;
  }

  /* Header dans le tiroir : empilement vertical Flarum (pas la barre desktop) */
  html body .App-drawer .App-header {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    padding: 0 !important;
    background: var(--cf-bg-900) !important;
    border-bottom: 1px solid var(--cf-border) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }

  html body .App-drawer .App-header::after {
    display: none !important;
  }

  html body .App-drawer .App-header > .container {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  html body .App-drawer .App-header .Header-title {
    float: none !important;
    width: 100% !important;
    padding: 14px 12px !important;
    margin: 0 !important;
    text-align: center !important;
    border: none !important;
    border-bottom: 1px solid var(--cf-border-soft) !important;
  }

  html body .App-drawer .App-header .Header-logo {
    max-height: 26px !important;
    margin: 0 auto !important;
  }

  html body .App-drawer .App-header .Header-primary,
  html body .App-drawer .App-header .Header-secondary {
    float: none !important;
    width: 100% !important;
    flex: none !important;
    order: unset !important;
    height: auto !important;
    margin: 0 !important;
  }

  html body .App-drawer .App-header .Header-primary .Header-controls {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  html body .App-drawer .App-header .Header-primary .Header-controls > li {
    display: block !important;
    width: 100% !important;
    padding: 0 10px !important;
    margin: 0 !important;
  }

  html body .App-drawer .App-header .Header-primary .Button--nav,
  html body .App-drawer .App-header .Header-primary .Header-controls > li > .Button {
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 10px 12px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    border-radius: var(--cf-radius-sm) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
  }

  html body .App-drawer .App-header .Header-primary .Button--nav .Button-icon {
    width: 20px !important;
    margin-right: 10px !important;
    text-align: center !important;
  }

  html body .App-drawer .App-header .Header-secondary .Header-controls {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 12px !important;
    padding: 0 !important;
  }

  html body .App-drawer .App-header .Header-secondary .Header-controls > li {
    display: block !important;
    width: 100% !important;
    padding: 0 10px 6px !important;
    margin: 0 !important;
    order: unset !important;
  }

  html body .App-drawer .App-header .Header-secondary .item-logIn::before {
    display: none !important;
  }

  html body .App-drawer .App-header .Header-secondary .Search,
  html body .App-drawer .App-header .Header-secondary .CraftyHeaderBar-search {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html body .App-drawer .App-header .Header-secondary .Search .Search-input {
    min-height: 44px !important;
  }

  html body .App-drawer .App-header .Header-secondary .Button,
  html body .App-drawer .App-header .Header-secondary .Dropdown-toggle {
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 10px 12px !important;
  }

  html body .App-drawer .App-header .Header-secondary .Button--primary,
  html body .App-drawer .App-header .Header-secondary .CraftyHeaderBar-signUp {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  html body .App-drawer .App-header .NotificationsDropdown .Button,
  html body .App-drawer .App-header .SessionDropdown .Button {
    width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
  }

  html body .App-drawer .CraftyNavBadge {
    top: 8px !important;
    right: 12px !important;
  }
}

/* =============================================================================
   CORRECTIF NAVBAR — alignement vertical et trait (desktop / tablette)
   ============================================================================= */

@media (min-width: 768px) {
html body .App-header {
  height: var(--header-height) !important;
  min-height: var(--header-height) !important;
  max-height: var(--header-height) !important;
  display: flex !important;
  align-items: center !important;
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--cf-border) !important;
  box-shadow: 0 1px 0 var(--cf-border-soft) !important;
  overflow: visible !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 300 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

html body .App-header > .container {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  gap: 0 !important;
}

html body .App-header .Header-logo {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  flex-shrink: 0 !important;
  margin-right: 12px !important;
}

html body .App-header .Header-logo img {
  height: 28px !important;
  width: auto !important;
  display: block !important;
}

html body .App-header .Header-primary {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  flex: 1 1 auto !important;
  gap: 4px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .App-header .Header-primary > li {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

html body .App-header .Header-primary .Button {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

html body .App-header .Header-secondary {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  flex-shrink: 0 !important;
  gap: 6px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .App-header .Header-secondary > li {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

html body .App-header .Header-secondary .Button--primary,
html body .App-header .Header-secondary .CraftyHeaderBar-signUp {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  line-height: 1 !important;
}

html body .App-header .Header-secondary .Button--login,
html body .App-header .Header-secondary .CraftyHeaderBar-logIn {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  line-height: 1 !important;
}

html body .App-header .Search,
html body .App-header .CraftyHeaderBar-search {
  display: flex !important;
  align-items: center !important;
  height: 32px !important;
}

html body .App-header .Search-input,
html body .App-header .FormControl {
  height: 32px !important;
  line-height: 32px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

html body .App-header .NotificationsDropdown .Button,
html body .App-header .SessionDropdown .Button {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  line-height: 1 !important;
}

html body .CraftyNavBadge {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  line-height: 1 !important;
}

} /* fin @media (min-width: 768px) — correctif navbar desktop */

/* =============================================================================
   CORRECTIF HOME STATS — cartes verre unifiées (hub)
   ============================================================================= */

html body .CraftyHomeStats-bar {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: var(--sp-3) !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

html body .CraftyHomeStats-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: var(--sp-1) !important;
  padding: var(--sp-4) !important;
  background: var(--cf-glass-bg) !important;
  backdrop-filter: var(--cf-glass-blur);
  -webkit-backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.22) !important;
  border-radius: var(--cf-radius-lg) !important;
  box-shadow:
    0 8px 32px var(--cf-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative !important;
  overflow: hidden !important;
  transition: border-color var(--cf-trans), transform var(--cf-trans), box-shadow var(--cf-trans) !important;
}

html body .CraftyHomeStats-item::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: var(--cf-glass-gradient) !important;
}

html body .CraftyHomeStats-item:hover {
  border-color: rgba(0, 221, 235, 0.35) !important;
  transform: translateY(-2px);
  box-shadow:
    0 12px 36px var(--cf-shadow),
    0 0 20px rgba(0, 221, 235, 0.1);
}

html body .CraftyHomeStats-item:not(:last-child)::after {
  display: none !important;
}

html body .CraftyHomeStats-value {
  font-family: var(--font-display) !important;
  font-size: var(--fs-2xl) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--cf-accent) !important;
  order: 1 !important;
}

html body .CraftyHomeStats-label {
  font-size: var(--fs-xs) !important;
  color: var(--cf-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  line-height: 1.3 !important;
  order: 2 !important;
}

@media (max-width: 700px) {
  html body .CraftyHomeStats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  html body .CraftyHomeStats-bar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body .CraftyHomeStats-value {
    font-size: var(--fs-xl) !important;
  }
}

/* ── Compteur followers sur le profil ── */
.CraftyProfileSocial-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted-color, #888);
}
.CraftyProfileSocial-stats strong {
  color: var(--body-color, #fff);
  font-weight: 600;
}
.CraftyProfileSocial-statSep {
  opacity: 0.4;
}

/* ── Compteur followers sur le profil ── */
.CraftyProfileSocial-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted-color, #888);
}
.CraftyProfileSocial-stats strong {
  color: var(--body-color, #fff);
  font-weight: 600;
}
.CraftyProfileSocial-statSep {
  opacity: 0.4;
}

/* ── Fix notifications pas coupées ── */
.CraftyAlerts,
.crafty-alerts,
[class*="AlertList"],
[class*="alert-list"] {
  left: 16px !important;
  right: auto !important;
  max-width: calc(100vw - 32px) !important;
  min-width: 220px !important;
  width: auto !important;
  white-space: nowrap;
  overflow: visible !important;
  box-sizing: border-box;
}

/* =============================================================================
   10. CRAFTY ANIMATIONS (JS-driven + CSS keyframes)
   ============================================================================= */

@keyframes craftyFadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes craftyPageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes craftyTrophyShimmer {
  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.25));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.55));
    transform: scale(1.04);
  }
}

@keyframes craftyTrophySilver {
  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(192, 192, 192, 0.25));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(192, 192, 192, 0.5));
    transform: scale(1.03);
  }
}

@keyframes craftyTrophyBronze {
  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(205, 127, 50, 0.25));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(205, 127, 50, 0.5));
    transform: scale(1.03);
  }
}

@keyframes craftyBtnGlowPulse {
  0%,
  100% {
    box-shadow: var(--cf-glass-shadow), 0 0 0 0 rgba(91, 66, 243, 0);
  }
  50% {
    box-shadow: var(--cf-glass-shadow), 0 0 20px 2px rgba(91, 66, 243, 0.35);
  }
}

@keyframes craftyNavSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

html body .crafty-page-enter {
  animation: craftyPageFadeIn 0.45s ease both;
}

html body .crafty-discussion-enter {
  animation: craftyFadeSlideUp 0.42s ease both;
  animation-delay: var(--crafty-stagger, 0ms);
}

html body .crafty-nav-item {
  animation: craftyNavSlideIn 0.35s ease both;
  animation-delay: var(--crafty-stagger, 0ms);
}

html body .crafty-btn-glow {
  animation: craftyBtnGlowPulse 3s ease-in-out infinite;
}

html body .crafty-rank-enter {
  animation: craftyFadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--crafty-stagger, 0ms);
}

html body tr[class^="ranking-"] {
  transition: background var(--cf-trans), transform var(--cf-trans), box-shadow var(--cf-trans);
}

html body tr[class^="ranking-"]:hover {
  background: rgba(91, 66, 243, 0.06);
  box-shadow: inset 3px 0 0 var(--cf-primary);
}

html body tr[class^="ranking-"]:hover .PostUser-name a {
  color: var(--cf-accent) !important;
}

html body td.rankings-1.crafty-trophy-glow {
  animation: craftyTrophyShimmer 2.8s ease-in-out infinite;
}

html body td.rankings-2.crafty-trophy-glow {
  animation: craftyTrophySilver 3s ease-in-out infinite;
}

html body td.rankings-3.crafty-trophy-glow {
  animation: craftyTrophyBronze 3.2s ease-in-out infinite;
}

html body table.rankings {
  border-collapse: separate;
  border-spacing: 0 6px;
}

html body table.rankings th {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cf-text-muted) !important;
  padding: var(--sp-2) var(--sp-3) !important;
  border-bottom: 1px solid var(--cf-border);
}

html body table.rankings tr[class^="ranking-"] td {
  padding: var(--sp-3) var(--sp-3) !important;
  background: var(--cf-bg-850);
  border-top: 1px solid var(--cf-border-soft);
  border-bottom: 1px solid var(--cf-border-soft);
  vertical-align: middle;
}

html body table.rankings tr[class^="ranking-"] td:first-child {
  border-left: 1px solid var(--cf-border-soft);
  border-radius: var(--cf-radius-sm) 0 0 var(--cf-radius-sm);
}

html body table.rankings tr[class^="ranking-"] td:last-child {
  border-right: 1px solid var(--cf-border-soft);
  border-radius: 0 var(--cf-radius-sm) var(--cf-radius-sm) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--cf-text-100);
}

html body table.rankings tr.ranking-1 td:last-child {
  color: gold;
  font-size: var(--fs-2xl);
}

html body table.rankings tr.ranking-2 td:last-child {
  color: silver;
}

html body table.rankings tr.ranking-3 td:last-child {
  color: #cd7f32;
}

html body table.rankings .rankings-info {
  padding-left: 0 !important;
}

html body table.rankings .PostUser-name {
  margin: 0;
}

html body .crafty-loadmore-wrap .Button {
  transition: transform var(--cf-trans), box-shadow var(--cf-trans), background var(--cf-trans);
}

html body .crafty-loadmore-wrap .Button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--cf-shadow);
}

html body .crafty-loadmore-click {
  transform: scale(0.96) !important;
}

html body .DiscussionListItem.crafty-discussion-enter:hover {
  transform: translateX(4px);
}

html body.crafty-reduced-motion .crafty-page-enter,
html body.crafty-reduced-motion .crafty-discussion-enter,
html body.crafty-reduced-motion .crafty-nav-item,
html body.crafty-reduced-motion .crafty-rank-enter,
html body.crafty-reduced-motion .crafty-btn-glow,
html body.crafty-reduced-motion td.crafty-trophy-glow {
  animation: none !important;
}

html body.crafty-reduced-motion tr[class^="ranking-"]:hover,
html body.crafty-reduced-motion .DiscussionListItem:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html body .crafty-page-enter,
  html body .crafty-discussion-enter,
  html body .crafty-nav-item,
  html body .crafty-rank-enter,
  html body .crafty-btn-glow,
  html body td.crafty-trophy-glow,
  html body .crafty-hub-card-enter,
  html body .CraftyHero-glow {
    animation: none !important;
  }
}

/* =============================================================================
   11. HOME HUB (CraftyHomeHub — hero, featured, trending, podium, Discord)
   ============================================================================= */

@keyframes craftyHeroGlow {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1) translateY(0);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.02) translateY(-4px);
  }
}

@keyframes craftyHubCardEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html body .crafty-glass-card {
  background: var(--cf-glass-bg) !important;
  backdrop-filter: var(--cf-glass-blur);
  -webkit-backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.22) !important;
  border-radius: var(--cf-radius-lg) !important;
  box-shadow:
    0 8px 32px var(--cf-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html body .CraftyHomeHub {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
  width: 100%;
}

html body .CraftyHomeHub-row {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
}

html body .CraftyHomeHub-row--stats {
  grid-template-columns: 1fr;
  align-items: stretch;
}

html body .CraftyHomeHub-row--stats-has-discord {
  grid-template-columns: 1fr minmax(220px, 280px);
}

html body .CraftyHomeHub-row--split {
  grid-template-columns: minmax(260px, 340px) 1fr;
  align-items: start;
}

html body .CraftyHomeHub-heading {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cf-text-100);
}

html body .CraftyHomeHub-loading,
html body .CraftyHomeHub-empty {
  margin: 0;
  color: var(--cf-text-muted);
  font-size: var(--fs-sm);
}

/* Hero */
html body .CraftyHero {
  position: relative;
  overflow: hidden;
  padding: var(--sp-8) var(--sp-6);
  border: 1px solid transparent !important;
  background:
    linear-gradient(var(--cf-glass-bg), var(--cf-glass-bg)) padding-box,
    var(--cf-glass-gradient) border-box !important;
}

html body .CraftyHero-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 221, 235, 0.15), transparent 65%);
  pointer-events: none;
  animation: craftyHeroGlow 6s ease-in-out infinite;
}

html body .CraftyHero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

html body .CraftyHero-title {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cf-text-100);
  text-shadow: 0 0 24px rgba(0, 221, 235, 0.25);
}

html body .CraftyHero-sub {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-md);
  color: var(--cf-text-300);
  line-height: 1.5;
  max-width: 560px;
}

html body .CraftyHero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

html body .CraftyHero-btn--discord {
  background: #5865f2 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center;
  gap: var(--sp-2);
}

html body .CraftyHero-btn--discord:hover {
  background: #4752c4 !important;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.45);
}

html body .CraftyHero-btnIcon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 4.4A17.2 17.2 0 0 0 15.5 3a12 12 0 0 0-.6 1.2 15.8 15.8 0 0 0-4.8 0A11.5 11.5 0 0 0 9.5 3 17 17 0 0 0 4.7 4.4 28.5 28.5 0 0 0 1 18.1a17.4 17.4 0 0 0 5.3 2.7 12.8 12.8 0 0 0 1.1-1.8 11.2 11.2 0 0 1-1.7-.8l.4-.3a12.2 12.2 0 0 0 10.4 0l.4.3a10.5 10.5 0 0 1-1.7.8c.3.7.7 1.3 1.1 1.8a17.3 17.3 0 0 0 5.3-2.7 28.4 28.4 0 0 0-3.7-13.7ZM8.7 15.2c-1.1 0-2-.9-2-2.1s.9-2.1 2-2.1 2 1 2.1 2-1 2.1-2 2.1Zm6.6 0c-1.1 0-2-.9-2-2.1s.9-2.1 2-2.1 2 1 2.1 2-1 2.1-2 2.1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 4.4A17.2 17.2 0 0 0 15.5 3a12 12 0 0 0-.6 1.2 15.8 15.8 0 0 0-4.8 0A11.5 11.5 0 0 0 9.5 3 17 17 0 0 0 4.7 4.4 28.5 28.5 0 0 0 1 18.1a17.4 17.4 0 0 0 5.3 2.7 12.8 12.8 0 0 0 1.1-1.8 11.2 11.2 0 0 1-1.7-.8l.4-.3a12.2 12.2 0 0 0 10.4 0l.4.3a10.5 10.5 0 0 1-1.7.8c.3.7.7 1.3 1.1 1.8a17.3 17.3 0 0 0 5.3-2.7 28.4 28.4 0 0 0-3.7-13.7ZM8.7 15.2c-1.1 0-2-.9-2-2.1s.9-2.1 2-2.1 2 1 2.1 2-1 2.1-2 2.1Zm6.6 0c-1.1 0-2-.9-2-2.1s.9-2.1 2-2.1 2 1 2.1 2-1 2.1-2 2.1Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Stats row inside hub */
html body .CraftyHomeHub .CraftyHomeStats {
  margin: 0;
}

html body .CraftyHomeHub .CraftyHomeStats-bar {
  height: 100%;
}

/* Discord CTA card */
html body .CraftyDiscord {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  text-align: center;
}

html body .CraftyDiscord-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #5865f2;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 4.4A17.2 17.2 0 0 0 15.5 3a12 12 0 0 0-.6 1.2 15.8 15.8 0 0 0-4.8 0A11.5 11.5 0 0 0 9.5 3 17 17 0 0 0 4.7 4.4 28.5 28.5 0 0 0 1 18.1a17.4 17.4 0 0 0 5.3 2.7 12.8 12.8 0 0 0 1.1-1.8 11.2 11.2 0 0 1-1.7-.8l.4-.3a12.2 12.2 0 0 0 10.4 0l.4.3a10.5 10.5 0 0 1-1.7.8c.3.7.7 1.3 1.1 1.8a17.3 17.3 0 0 0 5.3-2.7 28.4 28.4 0 0 0-3.7-13.7Z'/%3E%3C/svg%3E") center/60% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 4.4A17.2 17.2 0 0 0 15.5 3a12 12 0 0 0-.6 1.2 15.8 15.8 0 0 0-4.8 0A11.5 11.5 0 0 0 9.5 3 17 17 0 0 0 4.7 4.4 28.5 28.5 0 0 0 1 18.1a17.4 17.4 0 0 0 5.3 2.7 12.8 12.8 0 0 0 1.1-1.8 11.2 11.2 0 0 1-1.7-.8l.4-.3a12.2 12.2 0 0 0 10.4 0l.4.3a10.5 10.5 0 0 1-1.7.8c.3.7.7 1.3 1.1 1.8a17.3 17.3 0 0 0 5.3-2.7 28.4 28.4 0 0 0-3.7-13.7Z'/%3E%3C/svg%3E") center/60% no-repeat;
  background-color: #5865f2;
}

html body .CraftyDiscord-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--cf-text-100);
}

html body .CraftyDiscord-text {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--cf-text-400);
  line-height: 1.4;
}

html body .CraftyDiscord-btn {
  width: 100%;
}

/* Featured discussions */
html body .CraftyFeatured {
  padding: var(--sp-4);
}

html body .CraftyFeatured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

html body .CraftyFeatured-item {
  display: block;
  padding: var(--sp-4);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform var(--cf-trans), border-color var(--cf-trans), box-shadow var(--cf-trans);
}

html body .CraftyFeatured-item:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 221, 235, 0.35) !important;
  box-shadow: 0 12px 36px var(--cf-shadow), 0 0 20px rgba(0, 221, 235, 0.12);
}

html body .CraftyFeatured-badge {
  display: inline-block;
  margin-bottom: var(--sp-2);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cf-gold);
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.35);
  border-radius: var(--cf-radius-xs);
}

html body .CraftyFeatured-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--cf-text-100);
  line-height: 1.35;
}

html body .CraftyFeatured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--cf-text-muted);
}

html body .CraftyFeatured-tag {
  color: var(--cf-neon-purple);
}

/* Trending */
html body .CraftyTrending {
  padding: var(--sp-4);
}

html body .CraftyTrending-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

html body .CraftyTrending-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--cf-radius-sm);
  text-decoration: none !important;
  color: inherit !important;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background var(--cf-trans), border-color var(--cf-trans);
}

html body .CraftyTrending-item:hover {
  background: rgba(91, 66, 243, 0.08);
  border-color: rgba(124, 92, 255, 0.25);
}

html body .CraftyTrending-rank {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--cf-neon-blue);
  text-align: center;
}

html body .CraftyTrending-content {
  flex: 1;
  min-width: 0;
}

html body .CraftyTrending-title {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--cf-text-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body .CraftyTrending-heat {
  display: block;
  height: 3px;
  margin-top: 6px;
  background: var(--cf-bg-650);
  border-radius: 2px;
  overflow: hidden;
}

html body .CraftyTrending-heat i {
  display: block;
  height: 100%;
  width: var(--crafty-heat, 50%);
  background: linear-gradient(90deg, var(--cf-neon-purple), var(--cf-neon-blue));
  border-radius: 2px;
}

html body .CraftyTrending-votes {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--cf-accent);
}

/* Podium */
html body .CraftyPodium {
  padding: var(--sp-4);
}

html body .CraftyPodium-places {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
  justify-content: center;
}

html body .CraftyPodium-place {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--cf-radius);
  text-decoration: none !important;
  color: inherit !important;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cf-border-soft);
  transition: transform var(--cf-trans), box-shadow var(--cf-trans);
}

html body .CraftyPodium-place:hover {
  transform: translateY(-4px);
}

html body .CraftyPodium-place--gold {
  order: 2;
  padding-bottom: var(--sp-5);
  border-color: rgba(245, 200, 66, 0.4);
  box-shadow: 0 0 24px rgba(245, 200, 66, 0.15);
}

html body .CraftyPodium-place--silver {
  order: 1;
}

html body .CraftyPodium-place--bronze {
  order: 3;
}

html body .CraftyPodium-medal {
  font-size: 1.5rem;
  line-height: 1;
}

html body .CraftyPodium-place--gold .CraftyPodium-medal::before { content: '🏆'; }
html body .CraftyPodium-place--silver .CraftyPodium-medal::before { content: '🥈'; }
html body .CraftyPodium-place--bronze .CraftyPodium-medal::before { content: '🥉'; }

html body .CraftyPodium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  background: var(--cf-bg-700);
  border: 2px solid var(--cf-border-strong);
}

html body .CraftyPodium-place--gold .CraftyPodium-avatar {
  border-color: var(--cf-gold);
  color: var(--cf-gold);
}

html body .CraftyPodium-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--cf-text-100);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body .CraftyPodium-points {
  font-size: var(--fs-xs);
  color: var(--cf-text-muted);
}

html body .CraftyPodium-cta {
  display: block;
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--cf-neon-blue) !important;
  text-decoration: none !important;
}

html body .CraftyPodium-cta:hover {
  color: var(--cf-accent) !important;
  text-decoration: underline !important;
}

html body .crafty-hub-card-enter {
  animation: craftyHubCardEnter 0.45s ease both;
  animation-delay: var(--crafty-stagger, 0ms);
}

/* Hub responsive */
@media (max-width: 980px) {
  html body .CraftyHomeHub-row--stats-has-discord {
    grid-template-columns: 1fr;
  }

  html body .CraftyHomeHub-row--split {
    grid-template-columns: 1fr;
  }

  html body .CraftyHomeHub .CraftyHomeStats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  html body .CraftyHero {
    padding: var(--sp-6) var(--sp-4);
  }

  html body .CraftyHero-actions {
    flex-direction: column;
  }

  html body .CraftyHero-actions .Button {
    width: 100%;
    min-height: 44px;
  }

  html body .CraftyFeatured-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--sp-3);
    padding-bottom: var(--sp-2);
    -webkit-overflow-scrolling: touch;
  }

  html body .CraftyFeatured-item {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  html body .CraftyTrending-list {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  html body .CraftyTrending-item {
    flex: 0 0 80%;
    scroll-snap-align: start;
    flex-direction: column;
    align-items: flex-start;
  }

  html body .CraftyPodium-places {
    flex-direction: column;
    align-items: stretch;
  }

  html body .CraftyPodium-place {
    order: unset !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  html body .CraftyPodium-place--gold {
    padding-bottom: var(--sp-3);
  }
}

/* =============================================================================
   11b. INDEX PAGE — bloc discussions (sous le hub)
   ============================================================================= */

html body .CraftyIndexDiscussions {
  width: 100%;
  margin: 0 0 var(--sp-4);
  padding: 0;
  border: none;
}

html body .CraftyIndexDiscussions-title {
  margin: 0 0 var(--sp-3) !important;
}

html body .IndexPage--hub .sideNavContainer,
html body .IndexPage:has(.CraftyHomeHub) .sideNavContainer {
  width: 100%;
  align-items: flex-start;
}

html body .IndexPage--hub .IndexPage-nav.sideNav,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav {
  padding: var(--sp-3);
  background: var(--cf-glass-bg);
  backdrop-filter: var(--cf-glass-blur);
  -webkit-backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 8px 32px var(--cf-shadow);
  align-self: flex-start;
  position: sticky;
  top: calc(var(--header-height) + var(--sp-3));
}

html body .IndexPage--hub .IndexPage-nav.sideNav > ul,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav > ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0 !important;
  padding: 0;
  width: 100%;
  list-style: none;
}

html body .IndexPage--hub .IndexPage-nav.sideNav > ul > li,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav > ul > li {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0;
}

html body .IndexPage--hub .IndexPage-nav .item-newDiscussion,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav .item-newDiscussion {
  margin: 0 0 var(--sp-3) !important;
  padding: 0;
}

html body .IndexPage--hub .IndexPage-nav .Button--newDiscussion,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav .Button--newDiscussion {
  width: 100% !important;
  display: flex !important;
  justify-content: center;
  box-sizing: border-box;
}

html body .IndexPage--hub .IndexPage-nav.sideNav .Dropdown-menu > li > a,
html body .IndexPage--hub .IndexPage-nav.sideNav .Dropdown-menu > li > button,
html body .IndexPage--hub .IndexPage-nav.sideNav > ul > li > .Button,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav .Dropdown-menu > li > a,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav .Dropdown-menu > li > button,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav > ul > li > .Button {
  display: flex !important;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px !important;
  text-align: left;
}

html body .IndexPage--hub .IndexPage-nav.sideNav .Button-icon,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-nav.sideNav .Button-icon {
  float: none !important;
  margin: 0 var(--sp-2) 0 0 !important;
  width: 1.1em;
  flex-shrink: 0;
  text-align: center;
}

html body .IndexPage--hub .sideNavOffset,
html body .IndexPage:has(.CraftyHomeHub) .sideNavOffset {
  min-width: 0;
}

html body .IndexPage--hub .IndexPage-toolbar,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar {
  background: var(--cf-glass-bg);
  backdrop-filter: var(--cf-glass-blur);
  -webkit-backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 4px 20px var(--cf-shadow);
}

html body .IndexPage--hub .DiscussionListItem,
html body .IndexPage:has(.CraftyHomeHub) .DiscussionListItem {
  background: var(--cf-glass-bg);
  backdrop-filter: var(--cf-glass-blur);
  -webkit-backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: var(--cf-radius-lg);
  box-shadow: 0 4px 16px var(--cf-shadow);
}

html body .IndexPage--hub .DiscussionListItem:hover,
html body .IndexPage:has(.CraftyHomeHub) .DiscussionListItem:hover {
  border-color: rgba(0, 221, 235, 0.35);
  box-shadow: 0 8px 28px var(--cf-shadow), 0 0 16px rgba(0, 221, 235, 0.08);
}

html body .IndexPage--hub .IndexPage-toolbar-view li > a,
html body .IndexPage--hub .IndexPage-toolbar-view li > button,
html body .IndexPage--hub .IndexPage-toolbar-action li > a,
html body .IndexPage--hub .IndexPage-toolbar-action li > button,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-view li > a,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-view li > button,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-action li > a,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-action li > button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: var(--cf-radius-sm);
}

html body .IndexPage--hub .IndexPage-toolbar-view li.active > a,
html body .IndexPage--hub .IndexPage-toolbar-view li > a:hover,
html body .IndexPage--hub .IndexPage-toolbar-action li > a:hover,
html body .IndexPage--hub .IndexPage-toolbar-action li > button:hover,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-view li.active > a,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-view li > a:hover,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-action li > a:hover,
html body .IndexPage:has(.CraftyHomeHub) .IndexPage-toolbar-action li > button:hover {
  background: linear-gradient(var(--cf-glass-inner), var(--cf-glass-inner)) padding-box,
    var(--cf-glass-gradient) border-box !important;
  border: var(--cf-glass-border) solid transparent !important;
  color: #fff !important;
  box-shadow: var(--cf-glass-shadow);
}

/* =============================================================================
   12. COOKIE CONSENT + COMPOSER + ACHIEVEMENT BADGE POLISH
   ============================================================================= */

html body .CraftyCookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: var(--sp-4);
  background: var(--cf-glass-bg);
  backdrop-filter: var(--cf-glass-blur);
  border-top: 1px solid rgba(124, 92, 255, 0.25);
  box-shadow: 0 -8px 32px var(--cf-shadow-lg);
}

html body .CraftyCookieBanner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  justify-content: space-between;
}

html body .CraftyCookieBanner-text {
  flex: 1;
  min-width: 200px;
  font-size: var(--fs-sm);
  color: var(--cf-text-300);
}

html body .CraftyCookieBanner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

html body .CraftyCookieModal {
  background: var(--cf-bg-850) !important;
  border: 1px solid var(--cf-border) !important;
  border-radius: var(--cf-radius-lg) !important;
  color: var(--cf-text-200);
}

html body .CraftyCookieModal-overlay {
  background: rgba(5, 5, 6, 0.75) !important;
  backdrop-filter: blur(4px);
}

html body .Composer {
  background: var(--cf-glass-bg) !important;
  backdrop-filter: var(--cf-glass-blur);
  border: 1px solid rgba(124, 92, 255, 0.2) !important;
  border-radius: var(--cf-radius-lg) !important;
  box-shadow: 0 12px 40px var(--cf-shadow-lg);
}

html body .Composer:focus-within {
  border-color: rgba(0, 221, 235, 0.4) !important;
  box-shadow: 0 0 0 2px rgba(0, 221, 235, 0.12), 0 12px 40px var(--cf-shadow-lg);
}

html body .User-Rank,
html body .item-points {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cf-gold);
  background: rgba(245, 200, 66, 0.1);
  border: 1px solid rgba(245, 200, 66, 0.3);
  border-radius: var(--cf-radius-sm);
}
