:root {
  color-scheme: dark;
  --bg: #09101c;
  --bg-elevated: #101a2b;
  --panel: rgba(17, 28, 47, 0.92);
  --panel-strong: #132139;
  --border: rgba(148, 163, 184, 0.18);
  --text: #edf3ff;
  --muted: #9eb0c9;
  --accent: #7c9cff;
  --accent-strong: #9db4ff;
  --success: #55d98d;
  --danger: #ff7f8a;
  --warning: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, 0.22), transparent 31rem),
    radial-gradient(circle at 80% 20%, rgba(85, 217, 141, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}



.public-landing-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 26px clamp(18px, 4vw, 56px) 70px;
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 156, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.16), transparent 28rem),
    radial-gradient(circle at 50% 95%, rgba(85, 217, 141, 0.10), transparent 28rem),
    linear-gradient(180deg, #08101d 0%, #09101c 48%, #070c16 100%);
}

.public-landing-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
}

.landing-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.32;
  pointer-events: none;
  animation: landingFloat 12s ease-in-out infinite alternate;
}

.landing-orb-one { left: -120px; top: 80px; background: #617dff; }
.landing-orb-two { right: -160px; top: 360px; background: #33d6ad; animation-delay: -5s; }

.landing-nav,
.landing-main {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(8, 16, 29, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.landing-logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.34), rgba(85, 217, 141, 0.10));
  border: 1px solid rgba(157, 180, 255, 0.34);
  color: var(--accent-strong);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.landing-logo strong,
.landing-logo small { display: block; }
.landing-logo small { color: var(--muted); margin-top: 2px; font-size: 0.76rem; }

.landing-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}

.landing-links a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.landing-links a:hover { color: var(--text); transform: translateY(-1px); }
.landing-nav-cta { white-space: nowrap; }

.landing-main { padding-top: clamp(28px, 5vw, 58px); }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(34px, 6vw, 74px);
  align-items: center;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(124, 156, 255, 0.28);
  border-radius: 999px;
  color: #c9d6ff;
  background: rgba(124, 156, 255, 0.10);
  font-weight: 900;
  font-size: 0.84rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 16px rgba(85, 217, 141, 0.8);
}

.landing-hero h1 {
  margin: 24px 0 0;
  max-width: 820px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.91;
  letter-spacing: -0.075em;
}

.landing-lead {
  margin: 24px 0 0;
  max-width: 720px;
  color: #bfd0ec;
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
  line-height: 1.72;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}

.public-login-button {
  position: relative;
  isolation: isolate;
  font-size: 1rem;
  padding: 15px 22px;
  box-shadow: 0 16px 42px rgba(124, 156, 255, 0.25);
}

.public-login-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124,156,255,.55), rgba(85,217,141,.35), rgba(124,156,255,.55));
  opacity: .0;
  filter: blur(14px);
  transition: opacity .2s ease;
}
.public-login-button:hover::after { opacity: .75; }

.landing-secondary { padding: 14px 20px; text-decoration: none; }
.landing-access-note { margin-top: 14px; color: var(--muted); font-size: 0.93rem; }

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.landing-trust-row span {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dce7fb;
  font-weight: 800;
  font-size: 0.86rem;
}

.landing-dashboard-preview {
  position: relative;
  min-height: 520px;
  perspective: 1200px;
}

.preview-window {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(157, 180, 255, 0.28);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(21, 35, 58, 0.96), rgba(8, 15, 27, 0.96));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42), 0 0 80px rgba(124, 156, 255, 0.16);
  transform: rotateX(4deg) rotateY(-7deg) rotateZ(1deg);
  animation: previewFloat 7s ease-in-out infinite;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 16px;
  color: var(--muted);
  font-size: 0.82rem;
}
.preview-topbar span { width: 10px; height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.36); }
.preview-topbar span:nth-child(1) { background: #ff7f8a; }
.preview-topbar span:nth-child(2) { background: #ffd166; }
.preview-topbar span:nth-child(3) { background: #55d98d; }
.preview-topbar strong { margin-left: auto; color: #dce7fb; }

.preview-hero-card,
.preview-list article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}
.preview-hero-card { padding: 20px; }
.preview-hero-card p { margin: 0; color: var(--muted); font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.preview-hero-card h2 { margin: 7px 0 18px; font-size: 1.45rem; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview-stats span { padding: 12px; border-radius: 16px; background: rgba(8, 16, 29, 0.74); color: var(--muted); font-size: 0.78rem; }
.preview-stats strong { display: block; color: var(--text); font-size: 1.4rem; }
.preview-tabs { display: flex; gap: 10px; margin: 14px 0; }
.preview-tabs span { padding: 9px 13px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.04); font-weight: 900; font-size: .78rem; }
.preview-tabs .active { color: var(--text); background: rgba(124,156,255,.22); border: 1px solid rgba(124,156,255,.32); }
.preview-list { display: grid; gap: 12px; }
.preview-list article { padding: 16px; }
.preview-list b, .preview-list small { display: block; }
.preview-list small { color: var(--muted); margin-top: 6px; line-height: 1.45; }

.floating-chip {
  position: absolute;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid rgba(157, 180, 255, 0.30);
  border-radius: 999px;
  background: rgba(8, 16, 29, 0.78);
  color: #e8eeff;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
  animation: chipFloat 5s ease-in-out infinite alternate;
}
.chip-one { top: 54px; right: 0; }
.chip-two { bottom: 98px; left: 4px; animation-delay: -1.8s; }
.chip-three { bottom: 22px; right: 32px; animation-delay: -3.2s; }

.landing-section {
  margin-top: clamp(62px, 9vw, 110px);
  animation: sectionReveal .7s ease both;
}

.section-heading { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.section-heading.compact { max-width: 760px; }
.section-heading h2,
.landing-split h2,
.landing-final-cta h2,
.harka-card h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.section-heading p,
.landing-split p,
.landing-final-cta p,
.harka-card p { color: #bfd0ec; line-height: 1.7; }

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-feature-card,
.workflow-grid article,
.harka-card,
.landing-final-cta,
.landing-split,
.faq-list details {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(145deg, rgba(17, 28, 47, 0.90), rgba(9, 17, 30, 0.82));
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.landing-feature-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.landing-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(124,156,255,.18), transparent 55%);
  opacity: 0;
  transition: opacity .22s ease;
}
.landing-feature-card:hover { transform: translateY(-6px); border-color: rgba(157, 180, 255, 0.34); }
.landing-feature-card:hover::before { opacity: 1; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: rgba(124,156,255,.16); font-size: 1.35rem; }
.landing-feature-card h3 { position: relative; margin: 18px 0 0; font-size: 1.22rem; }
.landing-feature-card p { position: relative; color: var(--muted); line-height: 1.65; }

.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.workflow-grid article { padding: 26px; }
.workflow-grid article span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(85,217,141,.15); color: var(--success); font-weight: 900; }
.workflow-grid h3 { margin: 18px 0 0; }
.workflow-grid p { color: var(--muted); line-height: 1.65; }

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
}
.usecase-list { display: flex; flex-wrap: wrap; gap: 12px; }
.usecase-list span { padding: 12px 14px; border-radius: 16px; color: #e7efff; background: rgba(124,156,255,.13); border: 1px solid rgba(124,156,255,.22); font-weight: 900; }

.harka-card { display: flex; gap: 20px; align-items: flex-start; padding: 30px; background: linear-gradient(145deg, rgba(124,156,255,.16), rgba(85,217,141,.08)); }
.harka-card .feature-icon { flex: 0 0 auto; }

.faq-list { display: grid; gap: 12px; max-width: 920px; margin: 0 auto; }
.faq-list details { padding: 18px 20px; }
.faq-list summary { cursor: pointer; font-weight: 900; }
.faq-list p { color: var(--muted); line-height: 1.65; margin-bottom: 0; }

.landing-final-cta {
  margin-top: clamp(62px, 9vw, 110px);
  padding: clamp(32px, 6vw, 58px);
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,156,255,.22), transparent 38%),
    linear-gradient(145deg, rgba(21, 35, 58, 0.94), rgba(8, 15, 27, 0.94));
}
.landing-final-cta h2 { margin-top: 0; }
.landing-final-cta .button { margin-top: 18px; }

body.public-landing .app-shell { display: none; }
body:not(.public-landing) .public-landing-screen { display: none; }
.brand-mark-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

@keyframes landingFloat { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(30px, -24px, 0) scale(1.06); } }
@keyframes previewFloat { 0%, 100% { transform: rotateX(4deg) rotateY(-7deg) rotateZ(1deg) translateY(0); } 50% { transform: rotateX(2deg) rotateY(-5deg) rotateZ(1deg) translateY(-14px); } }
@keyframes chipFloat { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes sectionReveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes harkaHeartFloat { 0%, 100% { transform: translateY(0) rotate(10deg); } 50% { transform: translateY(-7px) rotate(-4deg); } }

@media (prefers-reduced-motion: reduce) {
  .landing-orb,
  .preview-window,
  .floating-chip,
  .landing-section { animation: none; }
  .landing-feature-card { transition: none; }
  .harka-heart { animation: none; }
}

@media (max-width: 1080px) {
  .landing-links { display: none; }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-dashboard-preview { min-height: auto; }
  .preview-window { transform: none; animation: none; }
  .floating-chip { display: none; }
  .landing-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-split { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .public-landing-screen { padding: 16px 14px 42px; }
  .landing-nav { align-items: stretch; flex-direction: column; }
  .landing-nav-cta { width: 100%; }
  .landing-hero h1 { font-size: clamp(2.55rem, 16vw, 4rem); }
  .landing-actions { align-items: stretch; flex-direction: column; }
  .landing-actions .button { width: 100%; justify-content: center; }
  .landing-feature-grid,
  .workflow-grid,
  .preview-stats { grid-template-columns: 1fr; }
}

.app-shell { display: none; }
body:not(.public-landing) .public-landing-screen { display: none; }
.brand-mark-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 1120px) {
  .public-feature-grid { grid-template-columns: 1fr; }
  .public-landing-card { padding: 28px; }
}

.app-shell {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-right: 1px solid var(--border);
  background: rgba(7, 13, 24, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 14px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(157, 180, 255, 0.3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.24), rgba(124, 156, 255, 0.08));
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark-button {
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.brand-mark-button:hover,
.brand-mark-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(157, 180, 255, 0.6);
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.36), rgba(124, 156, 255, 0.14));
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
  outline: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.55rem;
}

h2 {
  font-size: 1rem;
}

h3 {
  font-size: 1.35rem;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel,
.card,
.welcome-card,
.hero {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-heading,
.card-heading,
.inline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button,
.icon-button,
.guild-button {
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover,
.icon-button:hover,
.guild-button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button {
  padding: 12px 15px;
  font-weight: 800;
}

.button-primary {
  background: var(--accent);
  color: #08101d;
}

.button-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 127, 138, 0.34);
  background: rgba(255, 127, 138, 0.12);
  color: var(--danger);
}

.button-compact {
  padding: 8px 11px;
  border-radius: 13px;
  font-size: 0.9rem;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.15rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.pill-accent {
  color: var(--accent-strong);
  background: rgba(124, 156, 255, 0.12);
}

.pill-success {
  color: var(--success);
  background: rgba(85, 217, 141, 0.12);
}

.pill-danger {
  color: var(--danger);
  background: rgba(255, 127, 138, 0.12);
}

.guild-list {
  display: grid;
  gap: 10px;
}

.guild-button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.guild-button.active {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
}

.guild-button strong {
  font-size: 0.98rem;
}

.guild-button span {
  color: var(--muted);
  font-size: 0.84rem;
}

.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.flash-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  width: min(460px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
}

.flash {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  line-height: 1.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  animation: flash-enter 180ms ease-out;
}

.flash-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.flash-title {
  display: block;
  color: #f8fafc;
  font-weight: 900;
}

.flash-text {
  display: block;
  color: rgba(226, 232, 240, .92);
}

.flash-action-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 180, 255, 0.36);
  color: #eef4ff;
  background: rgba(124, 156, 255, 0.18);
  font-weight: 850;
  text-decoration: none;
}

.flash-action-link:hover {
  border-color: rgba(157, 180, 255, 0.58);
  background: rgba(124, 156, 255, 0.26);
}

.flash.flash-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes flash-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 18px;
  cursor: pointer;
  opacity: 0.82;
}

.flash-close:hover {
  opacity: 1;
}

.flash.success {
  border-color: rgba(85, 217, 141, 0.36);
  background: rgba(85, 217, 141, 0.12);
}

.flash.error {
  border-color: rgba(255, 127, 138, 0.36);
  background: rgba(255, 127, 138, 0.12);
}

.flash.warning {
  border-color: rgba(255, 209, 102, 0.38);
  background: rgba(255, 209, 102, 0.12);
}

.flash-list-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.flash-list {
  margin: 0;
  padding-left: 20px;
}

.flash-list li + li {
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

.welcome-card {
  padding: 30px;
}

.welcome-card p {
  max-width: 850px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.welcome-grid article,
.kpi,
.config-section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.welcome-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.welcome-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
}

.card {
  padding: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.kpi strong {
  font-size: 1.5rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.9rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.module-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.module-copy {
  display: grid;
  gap: 6px;
}

.module-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 34px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--text);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.switch input:checked + .switch-track {
  border-color: rgba(85, 217, 141, 0.42);
  background: rgba(85, 217, 141, 0.28);
}

.switch input:checked + .switch-track::after {
  transform: translateX(24px);
  background: var(--success);
}

.config-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.config-section {
  padding: 18px;
}

.config-section h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.config-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.config-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.config-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.config-row dt {
  color: var(--muted);
}

.config-row dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero,
  .inline-heading {
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .sidebar,
  .main-content {
    padding: 18px;
  }

  .welcome-grid,
  .kpi-grid,
  .modules-grid,
  .config-sections {
    grid-template-columns: 1fr;
  }
}

textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

textarea:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.dashboard-field {
  margin-top: 0;
}

.compact-field {
  max-width: 720px;
}

.save-state {
  margin-top: 14px;
  font-size: 0.92rem;
}

.save-state.pending {
  color: var(--warning);
}

.save-state.saved {
  color: var(--success);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 700;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}

@media (max-width: 820px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

.ticket-hubs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ticket-hub-tile {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ticket-hub-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-hub-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 110px;
  gap: 14px;
  align-items: end;
}

.ticket-hub-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ticket-hub-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ticket-hub-meta dt {
  color: var(--muted);
}

.ticket-hub-meta dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.hub-emoji-field input,
.hub-order-field input {
  text-align: center;
}

@media (max-width: 1180px) {
  .ticket-hubs-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .ticket-hub-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-meta div {
    flex-direction: column;
  }

  .ticket-hub-meta dd {
    text-align: left;
  }
}


select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

select:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.ticket-types-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.ticket-type-group {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.ticket-type-group-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ticket-type-tile {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ticket-type-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-type-heading h5 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.ticket-type-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 1180px) {
  .ticket-type-grid,
  .ticket-type-main-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.028);
}

.dashboard-tab {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.dashboard-tab:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  color: var(--text);
}

.dashboard-tab.active {
  border-color: rgba(124, 156, 255, 0.42);
  background: rgba(124, 156, 255, 0.16);
  color: var(--text);
}

.future-module-card {
  border-style: dashed;
}

.future-module-card p {
  max-width: 920px;
}

@media (max-width: 760px) {
  .dashboard-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-tab {
    width: 100%;
    justify-content: center;
  }
}


.ticket-hub-toolbar {
  margin-top: 0;
  justify-content: flex-end;
}

.ticket-hub-create-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(124, 156, 255, 0.26);
  border-radius: 24px;
  background: rgba(124, 156, 255, 0.075);
}

.ticket-hub-create-heading,
.ticket-hub-tile-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-hub-create-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-hub-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ticket-hub-create-actions {
  margin-top: 0;
}

.ticket-hub-tile-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .ticket-hub-create-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-toolbar,
  .ticket-hub-create-heading,
  .ticket-hub-tile-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.emoji-field-block {
  display: grid;
  gap: 10px;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.emoji-choice {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.emoji-choice:hover,
.emoji-choice:focus-visible {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.emoji-choice.emoji-clear {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hub-emoji-field input {
  text-align: left;
}

.emoji-field-block {
  display: grid;
  gap: 10px;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.emoji-choice {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.emoji-choice:hover,
.emoji-choice:focus-visible {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.emoji-choice.emoji-clear {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hub-emoji-field input {
  text-align: left;
}

.ticket-hub-types-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 22px;
  background: rgba(12, 20, 35, 0.52);
}

.ticket-hub-types-heading,
.ticket-type-editor-heading,
.ticket-type-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-hub-types-heading h5,
.ticket-type-editor-heading h6 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.ticket-type-editor-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 20px;
  background: rgba(124, 156, 255, 0.07);
}

.ticket-type-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ticket-type-editor-actions {
  margin-top: 0;
}

.ticket-type-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-type-summary-meta {
  margin-top: 0;
}

@media (max-width: 960px) {
  .ticket-type-editor-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-types-heading,
  .ticket-type-editor-heading,
  .ticket-type-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.technical-key {
  cursor: help;
  font-style: italic;
  opacity: 0.92;
}

.technical-key-input:disabled {
  cursor: help;
  font-style: italic;
  opacity: 0.88;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.style-legend {
  margin-top: 2px;
}

.ticket-types-count {
  cursor: help;
}

.ticket-type-add-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.resource-field {
  min-width: 0;
}

.resource-hidden-value {
  display: none !important;
}

.resource-picker {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resource-picker-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resource-picker-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 16px;
}

.resource-picker-empty {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(124, 156, 255, 0.24);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.12);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.resource-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-chip-remove {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.resource-picker-search {
  width: 100%;
}

.resource-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(100%, 720px);
  max-height: 300px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(124, 156, 255, 0.26);
  border-radius: 18px;
  background: #0b1526;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.resource-picker-menu.hidden {
  display: none;
}

.resource-option {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
}

.resource-option:hover,
.resource-option:focus-visible {
  border-color: rgba(124, 156, 255, 0.42);
  background: rgba(124, 156, 255, 0.16);
  outline: none;
}

.resource-option-meta {
  flex: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.resource-option-selected {
  opacity: 0.58;
}

.resource-picker-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.ticket-buttons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ticket-buttons-header .eyebrow {
  margin: 0;
}

@media (max-width: 720px) {
  .flash {
    top: 16px;
    right: 16px;
    width: calc(100vw - 32px);
  }

  .ticket-buttons-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V2.21.1 — Panels / boutons */
.button-warning {
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

.pill-warning {
  color: var(--warning);
  background: rgba(255, 209, 102, 0.12);
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-input-row input[type="color"] {
  width: 76px;
  min-width: 76px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  cursor: pointer;
}

.color-preview-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--panel-preview-color, #5865F2) 55%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-preview-color, #5865F2) 18%, transparent);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.panel-color-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
  background: var(--panel-color-swatch, #5865F2);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

/* V2.21.3 — Panels / boutons : création atomique panel + boutons */
.sidebar-action-button {
  width: 100%;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
}

#ticket-panels-list {
  grid-template-columns: 1fr;
}

.ticket-hub-create-panel {
  grid-column: 1 / -1;
}

.ticket-hub-tile.publication-attention {
  border-color: rgba(255, 209, 102, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.14);
}

.panel-publication-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.panel-publication-note-warning {
  color: var(--warning);
  border: 1px solid rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.11);
}

.button-publication-cta {
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.18), 0 12px 32px rgba(0, 0, 0, 0.18);
  font-weight: 900;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dashboard-modal.hidden {
  display: none;
}

.dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 18, 0.72);
  backdrop-filter: blur(4px);
}

.dashboard-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid rgba(124, 156, 255, 0.3);
  border-radius: 28px;
  background: #101d32;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.dashboard-modal-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.dashboard-modal-card .eyebrow {
  margin: 0;
}

.dashboard-modal-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
}

.dashboard-modal-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .dashboard-modal {
    padding: 16px;
  }

  .dashboard-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}


/* V2.21.4 — Validation lisible et formulaire panel plus explicite */
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(124, 156, 255, 0.32);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.12);
  color: var(--text);
  cursor: help;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 18px;
}

.field-help::after {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 10050;
  width: min(420px, 72vw);
  padding: 10px 12px;
  border: 1px solid rgba(124, 156, 255, 0.32);
  border-radius: 12px;
  background: rgba(8, 15, 27, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: pre-line;
}

.field-help::before {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 10051;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(124, 156, 255, 0.32);
  border-left: 1px solid rgba(124, 156, 255, 0.32);
  background: rgba(8, 15, 27, 0.98);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg) translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.field-help.tooltip-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.field-help.tooltip-visible::before {
  opacity: 1;
  transform: translateX(-50%) rotate(45deg) translateY(0);
}

.field-help:focus-visible {
  outline: 2px solid rgba(124, 156, 255, 0.85);
  outline-offset: 3px;
}

.field-invalid,
.resource-invalid,
.field-validation-error {
  animation: invalid-field-pulse 720ms ease-in-out 0s 2;
}

.field-invalid input,
.field-invalid textarea,
.field-invalid select,
.field-invalid .resource-picker-shell,
.resource-invalid .resource-picker-shell,
.resource-create-panel.field-invalid,
.checkbox-field.field-invalid {
  border-color: rgba(255, 116, 136, 0.82) !important;
  box-shadow: 0 0 0 4px rgba(255, 116, 136, 0.14);
}

@keyframes invalid-field-pulse {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-4px); }
  44% { transform: translateX(4px); }
  66% { transform: translateX(-2px); }
  88% { transform: translateX(2px); }
}

.resource-picker-shell {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.resource-picker-shell:focus-within {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.resource-picker-selection {
  align-items: center;
  min-height: 0;
}

.resource-picker-search {
  flex: 1 1 180px;
  min-width: 160px;
  min-height: 36px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resource-picker-search:focus {
  border-color: transparent;
  box-shadow: none;
}

.resource-single-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.resource-picker[data-resource-mode="single"] .resource-picker-search {
  padding-right: 34px;
}

#ticket-panel-buttons-list.empty-state {
  min-height: 0;
  margin-top: 0;
  padding: 10px 0 0;
}


/* V2.21.8 — édition avancée des boutons de panel */
.button-editor-grid { align-items: start; }
.button-editor-section-title { margin: 4px 0 -2px; color: var(--accent-strong, #b6c8ff); }
.button-editor-divider { height: 1px; margin: 8px 0 2px; background: linear-gradient(90deg, rgba(124, 156, 255, 0.42), rgba(124, 156, 255, 0.04)); }
.ticket-button-modal-config { display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(124, 156, 255, 0.22); border-radius: 18px; background: rgba(10, 18, 31, 0.38); }
.modal-config-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.modal-title-field { margin: 0; }
.modal-fields-list { display: grid; gap: 12px; }
.modal-field-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(124, 156, 255, 0.18); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.modal-field-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.modal-field-heading .eyebrow { margin-bottom: 6px; }
.modal-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.modal-field-required { align-self: end; min-height: 52px; }
.macro-help { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; line-height: 1.7; }
.macro-help-title { margin-right: 2px; color: var(--muted); font-weight: 700; }
.macro-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.macro-chip code {
  padding: 2px 7px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.08);
  color: var(--text);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.macro-chip:hover code,
.macro-chip:focus-visible code {
  border-color: rgba(124, 156, 255, 0.58);
  background: rgba(124, 156, 255, 0.18);
  transform: translateY(-1px);
}
.macro-chip:focus-visible {
  border-radius: 999px;
  outline: 2px solid rgba(124, 156, 255, 0.85);
  outline-offset: 3px;
}

@media (max-width: 920px) { .modal-config-heading, .modal-field-grid { grid-template-columns: 1fr; } .modal-field-heading { align-items: stretch; flex-direction: column; } }


.pill-toggle-button {
  cursor: pointer;
  font: inherit;
}

.pill-toggle-button:hover,
.pill-toggle-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
}


/* V2.22.2 — alignements visuels du formulaire bouton */
.compact-checkbox {
  min-height: 52px;
  padding: 0 16px;
  align-items: center;
}

.button-ticket-category-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-category-auto-create {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-category-auto-create .inline-category-checkbox {
  width: fit-content;
  min-width: min(100%, 460px);
  margin: 0;
}

@media (max-width: 820px) {
  .ticket-category-auto-create .inline-category-checkbox {
    width: 100%;
    min-width: 0;
  }
}


/* V2.22.3 — Alignement des cases de grilles + états vides compacts */
.field-label-spacer {
  display: block;
  min-height: 18px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  visibility: hidden;
}

.grid-checkbox-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.grid-checkbox-field .checkbox-field {
  min-height: 52px;
}

.resource-create-panel.grid-checkbox-field {
  align-self: start;
}

.empty-panel-state {
  padding: 18px 20px;
  border: 1px dashed rgba(124, 156, 255, 0.28);
  border-radius: 20px;
  background: rgba(124, 156, 255, 0.045);
}

.empty-panel-state strong,
.empty-button-state strong {
  color: var(--text);
  font-weight: 850;
}

.ticket-panel-buttons-panel-empty {
  gap: 10px;
  padding: 14px 16px;
}

.ticket-panel-buttons-panel-empty .ticket-buttons-header {
  margin-bottom: 0;
}

#ticket-panel-buttons-list.empty-button-state {
  padding-top: 2px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .field-label-spacer {
    display: none;
  }
}


.resource-role-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--resource-role-color, rgba(255, 255, 255, 0.35));
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.resource-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.resource-chip-colored-role {
  gap: 0.45rem;
}


/* V2.22.6 — Réglages Tickets à activation explicite */
.ticket-settings-options {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.ticket-settings-option-row {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.ticket-settings-toggle {
  min-height: 56px;
}

.ticket-settings-thresholds {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 0 2px min(0px, 0px);
}

.number-suffix-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.number-suffix-field input {
  flex: 1;
  min-width: 0;
}

.number-suffix-field em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .ticket-settings-option-row,
  .ticket-settings-thresholds {
    grid-template-columns: 1fr;
  }
}


/* V2.25 — onboarding Discord */
.guild-install-button {
  width: 100%;
  justify-content: center;
  margin-top: 0.9rem;
}

.guild-install-copy {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

/* V2.26 — administration des serveurs */
.admin-dashboard {
  display: grid;
  gap: 18px;
}

.global-admin-intro-card,
.global-admin-servers-card {
  padding: 24px;
}

.admin-guild-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-guilds-list {
  display: grid;
  gap: 14px;
}

.admin-guild-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-guild-copy {
  display: grid;
  gap: 5px;
}

.admin-guild-copy strong {
  font-size: 1rem;
}

.admin-guild-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-guild-actions {
  margin-top: 0;
}

.guild-membership-card .card-heading {
  align-items: center;
}

@media (max-width: 920px) {
  .guild-membership-card .card-heading {
    align-items: flex-start;
  }
}

/* Twitch V3.0 — planning multi-chaînes */
.twitch-planning-card {
  display: grid;
  gap: 18px;
}
.module-disabled-card {
  display: grid;
  gap: 18px;
}
.module-disabled-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 20px;
  background: rgba(255, 193, 7, 0.08);
}
.module-disabled-panel h4 {
  margin: 4px 0 8px;
}
.module-disabled-panel-highlight {
  padding: 24px 26px;
  border-width: 2px;
  border-color: rgba(255, 193, 7, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.16), rgba(255, 193, 7, 0.08)),
    rgba(255, 193, 7, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 130, 0.08), 0 18px 40px rgba(0, 0, 0, 0.18);
}
.module-disabled-panel-highlight h4 {
  font-size: 1.08rem;
}
.twitch-channels-list {
  display: grid;
  gap: 16px;
}
.twitch-channel-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 22px;
  background: rgba(22, 34, 56, 0.92);
}
.twitch-channel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.twitch-channel-identity {
  display: flex;
  gap: 14px;
  align-items: center;
}
.twitch-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.twitch-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #d9c3ff;
  background: rgba(145, 70, 255, 0.18);
}
.twitch-channel-identity h4 {
  margin: 0 0 4px;
}
.twitch-channel-badges,
.twitch-channel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.twitch-channel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.twitch-channel-summary > div,
.twitch-notification-panel {
  padding: 12px 14px;
  border: 1px solid rgba(139, 161, 205, 0.16);
  border-radius: 16px;
  background: rgba(8, 15, 28, 0.38);
}
.twitch-channel-summary dt {
  color: var(--muted, #a7bddf);
  font-size: .82rem;
  margin-bottom: 6px;
}
.twitch-channel-summary dd {
  margin: 0;
  font-weight: 700;
}
.twitch-channel-settings {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}
.twitch-inline-select {
  display: grid;
  gap: 8px;
}
.twitch-inline-select select,
.twitch-notification-panel select {
  width: 100%;
}
.twitch-notification-panel {
  display: grid;
  gap: 12px;
}
.twitch-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.twitch-notification-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.twitch-empty-state {
  padding: 22px;
  border: 1px dashed rgba(139, 161, 205, 0.28);
  border-radius: 18px;
  background: rgba(8, 15, 28, 0.22);
}
@media (max-width: 1100px) {
  .twitch-channel-summary,
  .twitch-channel-settings {
    grid-template-columns: 1fr;
  }
  .twitch-channel-heading,
  .module-disabled-panel {
    flex-direction: column;
    align-items: stretch;
  }
}

.twitch-weekly-reminder-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 22px;
  background: rgba(22, 34, 56, 0.78);
}
.twitch-weekly-reminder-form {
  display: grid;
  gap: 14px;
}
.twitch-reminder-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
  gap: 14px;
  align-items: end;
}
.twitch-reminder-enabled {
  min-height: 52px;
}
.twitch-reminder-channels {
  display: grid;
  gap: 8px;
}
.twitch-reminder-channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.twitch-reminder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted, #a7bddf);
  font-size: .9rem;
}
@media (max-width: 1200px) {
  .twitch-reminder-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .twitch-reminder-grid {
    grid-template-columns: 1fr;
  }
}
.twitch-reminder-block-title {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2, #8aa8ff);
}
.twitch-reminder-actions {
  align-items: center;
}
.twitch-reminder-grid-fill {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
}
.twitch-reminder-grid-fill .dashboard-field-wide {
  grid-column: span 3;
}
@media (max-width: 1200px) {
  .twitch-reminder-grid-fill {
    grid-template-columns: 1fr 1fr;
  }
  .twitch-reminder-grid-fill .dashboard-field-wide {
    grid-column: span 2;
  }
}
@media (max-width: 760px) {
  .twitch-reminder-grid-fill,
  .twitch-reminder-grid {
    grid-template-columns: 1fr;
  }
  .twitch-reminder-grid-fill .dashboard-field-wide {
    grid-column: auto;
  }
}

.twitch-automatic-messages-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 24px;
  background: rgba(12, 22, 38, 0.48);
}
.twitch-automatic-messages-panel.hidden {
  display: none !important;
}
.twitch-reminder-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.twitch-reminder-grid-auto {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(160px, 200px);
}
.twitch-weekly-reminder-panel .dashboard-field textarea {
  min-height: 160px;
  resize: vertical;
}
@media (max-width: 900px) {
  .twitch-reminder-config,
  .twitch-reminder-grid-auto {
    grid-template-columns: 1fr;
  }
}

.twitch-reminder-macros {
  margin: -4px 0 4px;
}

.twitch-message-preview {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 16px;
  background: rgba(10, 18, 31, 0.38);
}

.twitch-message-preview pre {
  min-height: 64px;
  max-height: 240px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(124, 156, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
}

.subtabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(125, 157, 255, 0.18);
  background: rgba(15, 29, 51, 0.76);
  border-radius: 1.25rem;
}

.subtab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #a9c3ec);
  font-weight: 800;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.subtab:hover {
  border-color: rgba(125, 157, 255, 0.28);
  color: #fff;
}

.subtab.active {
  background: rgba(112, 145, 255, 0.18);
  border-color: rgba(155, 180, 255, 0.56);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(125, 157, 255, 0.18) inset;
}

.dashboard-access-sections {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}

.dashboard-access-category {
  min-width: 0;
  margin: 0;
}

.dashboard-access-category > .dashboard-access-category-heading {
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 16px;
  text-align: left;
}

.dashboard-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.dashboard-access-permission-card {
  min-width: 0;
  margin: 0;
  padding: 16px;
}

.dashboard-access-permission-label {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 900px) {
  .dashboard-access-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.twitch-banners-panel {
  display: grid;
  gap: 18px;
}

.twitch-banner-section {
  border: 1px solid rgba(142, 169, 219, 0.22);
  border-radius: 20px;
  padding: 18px;
  background: rgba(10, 18, 34, 0.22);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.banner-editor-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}

.banner-editor-grid-form {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 2fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

.banner-editor-fields {
  display: grid;
  gap: 12px;
}

.banner-preview {
  display: block;
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(142, 169, 219, 0.22);
  background: rgba(5, 10, 20, 0.65);
}

.banner-preview-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: #9fb5d8;
  font-weight: 700;
  border-style: dashed;
}

.twitch-banner-list {
  display: grid;
  gap: 10px;
}

.twitch-banner-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(142, 169, 219, 0.18);
  border-radius: 18px;
  background: rgba(11, 20, 37, 0.45);
}

.twitch-banner-row .banner-preview {
  height: 72px;
}

.twitch-banner-row-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.twitch-banner-row-copy span {
  color: #9fb5d8;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-test-result {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(142, 169, 219, 0.2);
  background: rgba(8, 15, 28, 0.42);
}

.error-state {
  border-color: rgba(255, 112, 137, 0.42);
}

@media (max-width: 980px) {
  .banner-editor-grid,
  .banner-editor-grid-form,
  .twitch-banner-row,
  .banner-test-result {
    grid-template-columns: 1fr;
  }
}

/* Twitch banner editor / approval workflow */
.subtabs-inline {
  margin-bottom: 1rem;
}
.banner-pending-section {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 1rem;
}
.banner-editor-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.banner-compare-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.35);
}
.banner-compare-card h5 {
  margin: 0 0 .75rem;
  font-size: .95rem;
}
.banner-future-preview canvas,
.banner-future-preview img,
.banner-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  max-height: 260px;
  object-fit: cover;
  border-radius: .9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}
.banner-preview-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 700;
}
.banner-crop-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.banner-category-results {
  display: grid;
  gap: .5rem;
  margin: .75rem 0 1rem;
}
.banner-category-result {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: .9rem;
  padding: .65rem .75rem;
  background: rgba(15, 23, 42, 0.35);
  color: inherit;
  cursor: pointer;
}
.banner-category-result:hover:not(:disabled) {
  border-color: rgba(139, 92, 246, 0.75);
  background: rgba(139, 92, 246, 0.12);
}
.banner-category-result:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.banner-category-result img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: .4rem;
}
.banner-category-result span {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.tag-warning {
  display: inline-flex;
  width: fit-content;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.admin-banner-requests-card {
  grid-column: 1 / -1;
}
.admin-banner-requests-list {
  width: 100%;
  display: grid;
  gap: .75rem;
}
@media (max-width: 860px) {
  .banner-editor-compare-grid,
  .banner-crop-controls {
    grid-template-columns: 1fr;
  }
}

.banner-future-preview canvas {
  cursor: grab;
  touch-action: none;
}
.banner-future-preview canvas:active {
  cursor: grabbing;
}
.banner-crop-controls {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}
.banner-crop-controls .muted {
  grid-column: 1 / -1;
  margin: 0;
}
.banner-approval-settings {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: .75rem 0 1rem;
}
@media (max-width: 760px) {
  .banner-crop-controls,
  .banner-approval-settings {
    grid-template-columns: 1fr;
  }
}

/* V3.3.7 - enforce the real 2.5:1 banner ratio in the editor previews.
   Previous max-height rules compressed wide previews and made the dashboard display
   look different from the exported image / Discord rendering. */
.banner-compare-card .banner-preview,
.banner-future-preview canvas {
  aspect-ratio: 5 / 2;
  max-height: none;
}

.banner-compare-card .banner-preview {
  height: auto;
  object-fit: cover;
}

.banner-compare-card .banner-preview-empty {
  min-height: 0;
  aspect-ratio: 5 / 2;
}

.banner-history-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: .75rem 0 1rem;
}
.admin-banner-request-row .tag {
  white-space: nowrap;
}
.tag-success {
  display: inline-flex;
  width: fit-content;
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, .35);
  background: rgba(34, 197, 94, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.tag-danger {
  display: inline-flex;
  width: fit-content;
  color: #fda4af;
  border: 1px solid rgba(253, 164, 175, .35);
  background: rgba(244, 63, 94, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.banner-logs-panel {
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 1rem;
  padding: .8rem 1rem;
  background: rgba(15, 23, 42, .28);
}
.banner-logs-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #dbeafe;
}
.banner-logs-list {
  display: grid;
  gap: .55rem;
  margin-top: .85rem;
}
.banner-log-entry {
  display: grid;
  gap: .18rem;
  border-top: 1px solid rgba(148, 163, 184, .14);
  padding-top: .55rem;
}
.banner-log-entry:first-child {
  border-top: 0;
  padding-top: 0;
}
.banner-log-entry span,
.banner-log-entry small {
  color: #9fb5d8;
}
@media (max-width: 760px) {
  .banner-history-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Nextcloud V3.8 — configuration multiguilde */
.nextcloud-card {
  display: grid;
  gap: 18px;
}
.nextcloud-config-form {
  display: grid;
  gap: 16px;
}
.nextcloud-status-panel {
  padding: 16px;
  border: 1px solid rgba(139, 161, 205, 0.16);
  border-radius: 20px;
  background: rgba(8, 15, 28, 0.38);
}
.nextcloud-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.nextcloud-status-grid > div {
  padding: 12px 14px;
  border: 1px solid rgba(139, 161, 205, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.nextcloud-status-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .82rem;
}
.nextcloud-status-grid strong {
  display: block;
  word-break: break-word;
}
.error-copy {
  margin-top: 12px;
  color: var(--danger);
}
@media (max-width: 980px) {
  .nextcloud-status-grid {
    grid-template-columns: 1fr;
  }
}

.nextcloud-editor-section {
  gap: 14px;
}

.section-heading-row-compact {
  align-items: flex-start;
  margin-bottom: 4px;
}

.nextcloud-decks-editor,
.nextcloud-users-editor {
  display: grid;
  gap: 12px;
}

.nextcloud-deck-card,
.nextcloud-user-card {
  border: 1px solid rgba(124, 156, 255, 0.16);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.42);
  padding: 14px;
}

.nextcloud-deck-card-enabled {
  border-color: rgba(88, 211, 141, 0.34);
  box-shadow: 0 0 0 1px rgba(88, 211, 141, 0.08) inset;
}

.nextcloud-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.nextcloud-toggle-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  width: 100%;
}

.nextcloud-toggle-line input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.nextcloud-toggle-line span {
  display: grid;
  gap: 3px;
}

.nextcloud-toggle-line small,
.nextcloud-user-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.nextcloud-deck-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 156, 255, 0.14);
}

.nextcloud-deck-options.hidden {
  display: none;
}

.nextcloud-user-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 14px;
  align-items: center;
}

.nextcloud-user-copy {
  display: grid;
  gap: 4px;
}

@media (max-width: 860px) {
  .nextcloud-deck-options,
  .nextcloud-user-card {
    grid-template-columns: 1fr;
  }
}


/* V3.8.6 — Nextcloud polish */
.nextcloud-empty-action {
  display: grid;
  gap: 12px;
  align-items: start;
}

.nextcloud-empty-action .button {
  justify-self: start;
}


/* V3.8.9 — Nextcloud link safety */
.nextcloud-subtabs { margin: 18px 0 16px; }
.nextcloud-subtab-section.hidden { display: none !important; }
.settings-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .settings-grid-compact { grid-template-columns: 1fr; } }
.field-help:not(.tooltip-visible)::before,
.field-help:not(.tooltip-visible)::after { opacity: 0 !important; }

.nextcloud-archives-list {
  display: grid;
  gap: 0.75rem;
}

.nextcloud-archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.nextcloud-archive-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
}


.button-row-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.compact-select {
  width: auto;
  min-width: 180px;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.bot-identity-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form-grid.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 820px) {
  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

.bot-avatar-editor {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bot-avatar-preview {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
  display: grid;
  place-items: center;
  color: #8ba4c8;
  font-size: 0.72rem;
  text-align: center;
  overflow: hidden;
}

.bot-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #8ba4c8;
  font-size: 0.78rem;
  line-height: 1.35;
}


/* V3.13.12 — landing premium Harka-Chan clean
   Bloc unique pour la landing : éviter l'empilement des anciennes phases.
   Réglages rapides : modifier uniquement les variables dans .public-landing-screen. */

.public-landing-screen {
  --harka-hero-size: 110%;
  --harka-hero-x: -10%;
  --harka-hero-y: 0%;

  --harka-note-x: 40px;
  --harka-note-y: 0px;
  --harka-note-width: 340px;

  --harka-touch-size: 100%;
  --harka-touch-x: 0%;
  --harka-touch-y: 4%;

  background:
    radial-gradient(circle at 14% 12%, rgba(86, 114, 255, 0.30), transparent 32rem),
    radial-gradient(circle at 82% 10%, rgba(139, 92, 246, 0.24), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(37, 211, 169, 0.12), transparent 34rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}

.landing-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.76) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(124,156,255,.70) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,209,102,.62) 0 1px, transparent 1.4px);
  background-position: 7% 16%, 79% 8%, 92% 31%;
  background-size: 210px 170px, 260px 220px, 330px 250px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.landing-logo-mark { font-size: 1.12rem; letter-spacing: 0; }
.landing-secondary { gap: 0; }

.landing-hero-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, .94fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}

.landing-hero-copy { max-width: 760px; }

.landing-hero h1 {
  max-width: 760px;
  font-size: clamp(4.1rem, 7vw, 6.2rem);
  line-height: .94;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.section-heading h2,
.landing-split h2,
.landing-final-cta h2 {
  text-wrap: balance;
}

.section-heading { max-width: 980px; }
.section-heading.compact { max-width: 900px; }

/* Espacements finaux landing */
.landing-hero h1 {
  margin-top: 0;
  max-width: 900px;
  font-size: clamp(3.6rem, 5.8vw, 5.45rem);
  line-height: .98;
}

.landing-lead {
  margin-top: 30px;
}

.section-heading h2,
.landing-split h2,
.landing-final-cta h2,
.harka-card h2 {
  margin-top: 0;
}

.section-heading p,
.landing-split p,
.landing-final-cta p,
.harka-card p {
  margin-top: 16px;
}

/* Le badge d'origine n'est plus affiché dans le hero. */
.landing-kicker { display: none; }

/* Hero Harka */
.landing-mascot-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, .96fr) minmax(250px, .86fr);
  grid-template-areas: "mascot note";
  align-items: center;
  column-gap: clamp(18px, 3vw, 34px);
  min-height: 0;
  overflow: visible;
}

.mascot-orbit {
  grid-area: mascot;
  position: relative;
  justify-self: center;
  align-self: center;
  width: min(410px, 43vw);
  height: min(410px, 43vw);
  min-width: 300px;
  min-height: 300px;
  margin: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 48% 48%, rgba(124,156,255,.22), transparent 43%),
    radial-gradient(circle, rgba(124,156,255,.16), transparent 60%);
  border: 1px solid rgba(157, 180, 255, .22);
  box-shadow: 0 0 120px rgba(124,156,255,.16);
  animation: previewFloat 7s ease-in-out infinite;
}

.mascot-orbit::before,
.mascot-orbit::after,
.mascot-orbit span {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(124,156,255,.22);
}

.mascot-orbit::before { inset: 26px; }
.mascot-orbit::after { inset: 54px; border-color: rgba(85,217,141,.12); }
.mascot-orbit span:nth-child(1) { inset: 88px; border-color: rgba(255,255,255,.08); }

.mascot-orbit span:nth-child(2),
.mascot-orbit span:nth-child(3) {
  inset: auto;
  border: 0;
  box-shadow: 0 0 18px currentColor;
}

.mascot-orbit span:nth-child(2) {
  width: 9px;
  height: 9px;
  right: 54px;
  top: 86px;
  color: rgba(255,209,102,.75);
  background: #ffd166;
}

.mascot-orbit span:nth-child(3) {
  width: 11px;
  height: 11px;
  left: 44px;
  bottom: 110px;
  color: rgba(124,156,255,.75);
  background: #7c9cff;
}

.mascot-portrait {
  grid-area: mascot;
  position: relative;
  z-index: 2;
  justify-self: center;
  align-self: center;
  width: min(320px, 32vw);
  height: min(320px, 32vw);
  min-width: 238px;
  min-height: 238px;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(157,180,255,.42);
  background:
    radial-gradient(circle at 50% 42%, rgba(124,156,255,.28), transparent 58%),
    linear-gradient(145deg, rgba(12,22,39,.92), rgba(8,16,29,.76));
  box-shadow: 0 26px 90px rgba(0,0,0,.36), 0 0 82px rgba(124,156,255,.25);
}

.mascot-portrait::before { display: none; }

.mascot-portrait img {
  display: block;
  width: var(--harka-hero-size);
  height: var(--harka-hero-size);
  margin: var(--harka-hero-y) 0 0 var(--harka-hero-x);
  object-fit: contain;
  object-position: center top;
  transform: none;
  filter: drop-shadow(0 22px 24px rgba(0,0,0,.36));
}

.mascot-note {
  grid-area: note;
  position: relative;
  z-index: 3;
  justify-self: start;
  align-self: center;
  max-width: var(--harka-note-width);
  margin: 0;
  padding-left: 18px;
  color: #edf4ff;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 750;
  font-style: italic;
  text-wrap: balance;
  text-shadow: 0 14px 34px rgba(0,0,0,.38);
  transform: translate(var(--harka-note-x), var(--harka-note-y));
}

.mascot-note::before {
  content: "";
  position: absolute;
  left: -50px;
  top: 50%;
  width: 40px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(220,231,251,.24), rgba(220,231,251,.9));
  box-shadow: 0 0 14px rgba(124,156,255,.28);
  transform: translateY(-50%);
}

.mascot-note::after {
  content: "";
  position: absolute;
  left: -53px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid rgba(220,231,251,.9);
  border-bottom: 2px solid rgba(220,231,251,.9);
  transform: translateY(-50%) rotate(45deg);
}

/* Fonctionnalités : alignement propre icône + texte */
.landing-feature-grid-premium .landing-feature-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 22px;
  min-height: 200px;
  padding: 26px;
}

.landing-feature-grid-premium .feature-icon {
  position: static;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 18px 42px rgba(0,0,0,.22);
}

.landing-feature-grid-premium .landing-feature-card h3 {
  grid-column: 2;
  align-self: end;
  margin: 0 0 6px;
}

.landing-feature-grid-premium .landing-feature-card p {
  grid-column: 2;
  align-self: start;
  margin: 0;
}

.landing-feature-grid-premium .feature-ticketing .feature-icon { background: linear-gradient(145deg, rgba(255,209,102,.30), rgba(255,209,102,.10)); color: #ffd166; }
.landing-feature-grid-premium .feature-twitch .feature-icon { background: linear-gradient(145deg, rgba(139,92,246,.34), rgba(139,92,246,.12)); color: #b99cff; }
.landing-feature-grid-premium .feature-nextcloud .feature-icon { background: linear-gradient(145deg, rgba(59,130,246,.34), rgba(59,130,246,.12)); color: #93c5fd; }
.landing-feature-grid-premium .feature-access .feature-icon { background: linear-gradient(145deg, rgba(124,156,255,.34), rgba(124,156,255,.12)); color: #9db4ff; }
.landing-feature-grid-premium .feature-team .feature-icon { background: linear-gradient(145deg, rgba(244,114,182,.30), rgba(244,114,182,.10)); color: #f9a8d4; }
.landing-feature-grid-premium .feature-more .feature-icon { background: linear-gradient(145deg, rgba(45,212,191,.30), rgba(45,212,191,.10)); color: #5eead4; }
.landing-feature-grid-premium .landing-feature-card::after { display: none; }

/* Mise en route */
.workflow-grid article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 188px;
  padding: 30px 28px;
  overflow: hidden;
  text-align: center;
}

.workflow-grid article::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(85,217,141,.10), transparent 70%);
  pointer-events: none;
}

.workflow-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(85,217,141,.14);
  color: #7af0ad;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workflow-grid h3 { margin: 20px 0 0; font-size: 1.24rem; }
.workflow-grid p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }

/* Cas d'usage */
.landing-split {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  padding: clamp(28px, 4vw, 44px);
}

.landing-split::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -12%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124,156,255,.16), transparent 68%);
  pointer-events: none;
}

.usecase-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.usecase-card-list article {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(157, 180, 255, .20);
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(124,156,255,.14), transparent 56%), rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.usecase-card-list article::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c9cff, #55d98d);
  box-shadow: 0 0 18px rgba(124,156,255,.55);
}

.usecase-card-list strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: block;
  color: #eef4ff;
  font-size: 1.02rem;
  line-height: 1.3;
}

.usecase-card-list span {
  grid-column: 1 / -1;
  display: block;
  padding: 0;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #b9c8df;
  font-weight: 650;
  line-height: 1.55;
}

/* La touche Harka */
.harka-card { align-items: center; overflow: hidden; }

.harka-card-avatar {
  position: relative;
  flex: 0 0 124px;
  width: 124px;
  height: 124px;
  padding: 7px;
  box-sizing: border-box;
  overflow: visible;
  border-radius: 999px;
  border: 1px solid rgba(157,180,255,.34);
  background: radial-gradient(circle at 50% 42%, rgba(85,217,141,.16), transparent 60%), rgba(8,16,29,.70);
  box-shadow: 0 16px 36px rgba(0,0,0,.26), 0 0 42px rgba(124,156,255,.12);
}

.harka-card-avatar img {
  position: relative;
  z-index: 2;
  display: block;
  width: var(--harka-touch-size);
  height: var(--harka-touch-size);
  margin: var(--harka-touch-y) 0 0 var(--harka-touch-x);
  object-fit: contain;
  object-position: center center;
  transform: none;
  filter: none;
}

.harka-heart {
  position: absolute;
  z-index: 3;
  color: #f9a8d4;
  font-size: 1.12rem;
  line-height: 1;
  text-shadow: 0 8px 18px rgba(0,0,0,.28), 0 0 16px rgba(244,114,182,.35);
  animation: harkaHeartFloat 4.8s ease-in-out infinite;
}

.heart-one { right: -6px; top: 12px; transform: rotate(12deg); }
.heart-two { right: 12px; top: -9px; font-size: .86rem; animation-delay: -1.4s; opacity: .86; }
.heart-three { right: -15px; top: 42px; font-size: .74rem; animation-delay: -2.6s; opacity: .76; }

.landing-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(148,163,184,.12);
  color: rgba(191,208,236,.74);
  font-size: .86rem;
  text-align: center;
}

.landing-footer strong { color: #e8efff; }

@media (max-width: 1080px) {
  .landing-hero-premium { grid-template-columns: 1fr; }
  .landing-mascot-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "mascot" "note";
    row-gap: 20px;
  }
  .mascot-orbit { width: min(410px, 80vw); height: min(410px, 80vw); }
  .mascot-portrait { width: min(320px, 62vw); height: min(320px, 62vw); }
  .mascot-note {
    justify-self: center;
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    transform: none;
  }
  .mascot-note::before,
  .mascot-note::after { display: none; }
  .landing-split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .landing-hero h1 { font-size: clamp(3.2rem, 14vw, 4.4rem); }
  .landing-feature-grid-premium .landing-feature-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }
  .landing-feature-grid-premium .feature-icon,
  .landing-feature-grid-premium .landing-feature-card h3,
  .landing-feature-grid-premium .landing-feature-card p {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  .landing-feature-grid-premium .feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }
  .harka-card-avatar { flex-basis: 112px; width: 112px; height: 112px; }
}

@media (max-width: 680px) {
  .landing-mascot-panel { row-gap: 20px; }
  .mascot-orbit { min-width: 268px; min-height: 268px; }
  .mascot-portrait { min-width: 214px; min-height: 214px; }
  .mascot-portrait img { width: 114%; height: 114%; margin: -3% 0 0 -8%; }
  .workflow-grid article { min-height: 0; }
  .usecase-card-list { grid-template-columns: 1fr; }
}


/* V3.13.13 — derniers micro-ajustements wording */
.landing-lead {
  max-width: 760px;
}

.mascot-note {
  max-width: 380px;
}

.staff-note {
  display: block;
  grid-column: 3;
  justify-self: center;
  max-width: 360px;
  margin-top: -12px;
  color: rgba(191, 208, 236, .52);
  font-size: .72rem;
  line-height: 1.4;
  font-weight: 650;
  text-align: center;
}

.landing-final-cta {
  margin-top: clamp(28px, 4vw, 48px);
}

.harka-card p {
  max-width: 860px;
}

.harka-title-star {
  display: inline-block;
  margin-left: 6px;
  color: #f9a8d4;
  font-size: .36em;
  line-height: 1;
  vertical-align: super;
  transform: translateY(-.18em);
}

.harka-gratouille-note {
  display: inline-block;
  margin-left: 8px;
  color: rgba(191, 208, 236, .58);
  font-size: .68em;
  font-weight: 650;
  white-space: nowrap;
}

.feature-more p {
  text-wrap: pretty;
}

@media (max-width: 1080px) {
  .staff-note {
    grid-column: 1;
    margin-top: -4px;
  }
}

@media (max-width: 760px) {
  .harka-gratouille-note {
    display: block;
    margin: 8px 0 0;
    white-space: pre-line;
  }
}

/* V3.14 — dashboard connecté aligné avec la landing */
body:not(.public-landing) {
  --bg: #050b16;
  --bg-elevated: rgba(12, 22, 39, .86);
  --panel: linear-gradient(145deg, rgba(17, 28, 47, .88), rgba(8, 16, 29, .78));
  --panel-flat: rgba(13, 24, 42, .78);
  --border: rgba(157, 180, 255, .18);
  --border-strong: rgba(157, 180, 255, .34);
  --text: #edf4ff;
  --muted: #aebed8;
  --accent: #7c9cff;
  --accent-strong: #aabaff;
  --success: #55d98d;
  --danger: #ff7f8a;
  --warning: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, .30);
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(86, 114, 255, .26), transparent 31rem),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, .20), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(37, 211, 169, .10), transparent 34rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}

body:not(.public-landing)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.62) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(124,156,255,.62) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,209,102,.48) 0 1px, transparent 1.4px);
  background-position: 8% 16%, 78% 9%, 92% 31%;
  background-size: 220px 180px, 270px 230px, 350px 260px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}

body:not(.public-landing) .app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 26px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
}

body:not(.public-landing) .sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow: auto;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  scrollbar-width: thin;
}

body:not(.public-landing) .main-content {
  gap: 24px;
  padding: 0;
  min-width: 0;
}

body:not(.public-landing) .brand,
body:not(.public-landing) .panel,
body:not(.public-landing) .card,
body:not(.public-landing) .welcome-card,
body:not(.public-landing) .hero,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .subtab-section,
body:not(.public-landing) .empty-state-card,
body:not(.public-landing) .ticket-panel-card,
body:not(.public-landing) .module-card,
body:not(.public-landing) .nextcloud-card,
body:not(.public-landing) .twitch-channel-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(18px);
}

body:not(.public-landing) .brand {
  align-items: center;
  padding: 20px;
}

body:not(.public-landing) .brand h1 {
  font-size: 1.72rem;
  letter-spacing: -.035em;
}

body:not(.public-landing) .brand .eyebrow,
body:not(.public-landing) .eyebrow {
  color: #c7d4ff;
  font-weight: 900;
  letter-spacing: .16em;
}

body:not(.public-landing) .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 35% 25%, rgba(85, 217, 141, .18), transparent 45%),
    linear-gradient(145deg, rgba(124,156,255,.30), rgba(124,156,255,.08));
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
}

body:not(.public-landing) .panel {
  padding: 20px;
}

body:not(.public-landing) .panel-heading,
body:not(.public-landing) .card-heading,
body:not(.public-landing) .inline-heading {
  align-items: center;
  margin-bottom: 16px;
}

body:not(.public-landing) .panel-heading h2,
body:not(.public-landing) .card-heading h2,
body:not(.public-landing) .inline-heading h2 {
  font-size: 1.02rem;
  letter-spacing: -.015em;
}

body:not(.public-landing) .auth-panel .button-row {
  align-items: stretch;
}

body:not(.public-landing) .auth-panel #discord-login-button.hidden + #disconnect-button,
body:not(.public-landing) .auth-panel #disconnect-button:not(.hidden) {
  margin-top: 2px;
}

body:not(.public-landing) .button,
body:not(.public-landing) .icon-button,
body:not(.public-landing) .guild-button {
  border-radius: 18px;
  font-weight: 900;
}

body:not(.public-landing) .button-primary {
  color: #07101d;
  background: linear-gradient(135deg, #88a2ff 0%, #7190ff 100%);
  box-shadow: 0 16px 42px rgba(124,156,255,.22);
}

body:not(.public-landing) .button-ghost {
  border-color: var(--border);
  background: rgba(255,255,255,.035);
  color: #edf4ff;
}

body:not(.public-landing) .button:hover,
body:not(.public-landing) .icon-button:hover,
body:not(.public-landing) .guild-button:hover {
  transform: translateY(-1px);
  border-color: rgba(157,180,255,.40);
}

body:not(.public-landing) .pill {
  border-color: var(--border);
  background: rgba(255,255,255,.045);
  font-weight: 900;
}

body:not(.public-landing) .pill-success {
  color: #6ff0a4;
  border-color: rgba(85,217,141,.28);
  background: rgba(85,217,141,.13);
}

body:not(.public-landing) .pill-accent {
  color: #cad6ff;
  border-color: rgba(124,156,255,.30);
  background: rgba(124,156,255,.13);
}

body:not(.public-landing) .guild-list {
  gap: 12px;
}

body:not(.public-landing) .guild-button {
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(124,156,255,.10), transparent 50%),
    rgba(255,255,255,.035);
}

body:not(.public-landing) .guild-button.active {
  border-color: rgba(124,156,255,.65);
  background:
    radial-gradient(circle at top right, rgba(124,156,255,.24), transparent 58%),
    rgba(124,156,255,.12);
  box-shadow: 0 16px 42px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
}

body:not(.public-landing) .hero {
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  background:
    radial-gradient(circle at 18% 18%, rgba(124,156,255,.20), transparent 44%),
    linear-gradient(145deg, rgba(20, 33, 55, .88), rgba(8, 16, 29, .76));
}

body:not(.public-landing) .hero h2 {
  margin: 2px 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .96;
  letter-spacing: -.065em;
}

body:not(.public-landing) .hero-copy {
  max-width: 820px;
  color: #c6d4ec;
}

body:not(.public-landing) .hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtab-nav,
body:not(.public-landing) .nextcloud-subtab-nav {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(8,16,29,.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab-button,
body:not(.public-landing) .nextcloud-subtab-button {
  border-radius: 18px;
  font-weight: 900;
}

body:not(.public-landing) .dashboard-tab.active,
body:not(.public-landing) .subtab-button.active,
body:not(.public-landing) .nextcloud-subtab-button.active {
  color: #07101d;
  background: linear-gradient(135deg, #8ea7ff, #7c9cff);
  box-shadow: 0 14px 34px rgba(124,156,255,.20);
}

body:not(.public-landing) .card,
body:not(.public-landing) .welcome-card,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .subtab-section {
  padding: clamp(20px, 2.4vw, 30px);
}

body:not(.public-landing) input,
body:not(.public-landing) select,
body:not(.public-landing) textarea,
body:not(.public-landing) .resource-picker-control {
  border-color: rgba(157,180,255,.18);
  border-radius: 18px;
  background: rgba(6, 13, 24, .74);
  color: #edf4ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) input:focus,
body:not(.public-landing) select:focus,
body:not(.public-landing) textarea:focus,
body:not(.public-landing) .resource-picker-control:focus-within {
  border-color: rgba(124,156,255,.72);
  box-shadow: 0 0 0 4px rgba(124,156,255,.14), inset 0 1px 0 rgba(255,255,255,.05);
}

body:not(.public-landing) .muted {
  color: #aebed8;
}

body:not(.public-landing) .flash-stack {
  top: 24px;
  right: 24px;
}

body:not(.public-landing) .welcome-grid article,
body:not(.public-landing) .kpi-card,
body:not(.public-landing) .module-row,
body:not(.public-landing) .ticket-hub-card,
body:not(.public-landing) .banner-request-card,
body:not(.public-landing) .usecase-card-list article {
  border-color: rgba(157,180,255,.17);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) .hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  body:not(.public-landing) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.public-landing) .sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .app-shell {
    padding: 14px;
  }

  body:not(.public-landing) .hero,
  body:not(.public-landing) .panel-heading,
  body:not(.public-landing) .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.public-landing) .hero-badges {
    justify-content: flex-start;
  }
}

/* V3.15 — auth transparente au refresh */
body.auth-checking {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(86, 114, 255, .26), transparent 31rem),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, .20), transparent 30rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}
body.auth-checking .public-landing-screen { display: none; }
body.auth-checking .app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 26px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
}
body.auth-checking .guild-panel,
body.auth-checking .discord-lists-panel,
body.auth-checking .status-panel,
body.auth-checking #guild-view,
body.auth-checking #global-admin-view,
body.auth-checking .dashboard-tabs,
body.auth-checking .subtabs {
  display: none !important;
}
body.auth-checking .auth-panel,
body.auth-checking .hero,
body.auth-checking .welcome-card {
  border: 1px solid rgba(157,180,255,.20);
  background: linear-gradient(145deg, rgba(17,28,47,.88), rgba(8,16,29,.78));
  box-shadow: 0 24px 70px rgba(0,0,0,.30);
}
body.auth-checking .welcome-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 3px solid rgba(157,180,255,.20);
  border-top-color: #7c9cff;
  animation: dashboardAuthSpin .9s linear infinite;
}
@keyframes dashboardAuthSpin { to { transform: rotate(360deg); } }


/* V3.15.2 — overlay auth + boutons Nextcloud */
.auth-checking-overlay {
  display: none;
}
body.auth-checking .auth-checking-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 18, .42);
  backdrop-filter: blur(14px) saturate(1.1);
  pointer-events: all;
}
.auth-checking-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(157, 180, 255, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 14%, rgba(124,156,255,.22), transparent 44%),
    linear-gradient(145deg, rgba(17, 28, 47, .94), rgba(8, 16, 29, .88));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.055);
  text-align: center;
}
.auth-checking-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 999px;
  border: 3px solid rgba(157,180,255,.22);
  border-top-color: #7c9cff;
  animation: dashboardAuthSpin .9s linear infinite;
}
.auth-checking-card h2 {
  margin: 8px 0 10px;
  color: #edf4ff;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -.055em;
}
.auth-checking-card p:last-child {
  margin: 0;
  color: #c6d4ec;
}
body.auth-checking .app-shell {
  filter: blur(3px);
  transform: scale(.995);
  pointer-events: none;
  user-select: none;
}
body.auth-checking .welcome-card::before {
  display: none;
}
.welcome-open-button {
  margin-top: 18px;
}
body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px 24px;
}
body:not(.public-landing) #nextcloud-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
  min-width: 0;
}
body:not(.public-landing) #nextcloud-actions-row .button {
  white-space: nowrap;
}
@media (max-width: 900px) {
  body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
    grid-template-columns: 1fr;
  }
}


/* V3.15.2 — Nextcloud actions ciblées */
body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  align-items: center;
}
body:not(.public-landing) #nextcloud-actions-row {
  justify-content: flex-end;
}
body:not(.public-landing) .nextcloud-editor-heading {
  align-items: center;
  gap: 12px;
}
body:not(.public-landing) .nextcloud-editor-heading > div {
  min-width: 0;
}
body:not(.public-landing) .nextcloud-editor-heading .button {
  flex: 0 0 auto;
  white-space: nowrap;
}
body:not(.public-landing) .button-compact {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
}
@media (max-width: 900px) {
  body:not(.public-landing) #nextcloud-actions-row {
    justify-content: flex-start;
  }
  body:not(.public-landing) .nextcloud-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V3.17 — badge version déporté + page de modifications */
body:not(.public-landing) .brand {
  gap: 14px;
}

body:not(.public-landing) .brand-copy {
  min-width: 0;
}

body:not(.public-landing) .brand-kicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body:not(.public-landing) .brand-kicker-row .eyebrow {
  margin: 0;
}

body:not(.public-landing) .brand-mark {
  overflow: hidden;
}

body:not(.public-landing) .brand-mark img {
  display: block;
  width: 118%;
  height: 118%;
  margin: -8% 0 0 -8%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.28));
}

body:not(.public-landing) .phase-link {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid rgba(124,156,255,.34);
  color: #d8e2ff;
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body:not(.public-landing) .phase-link:hover,
body:not(.public-landing) .phase-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(157,180,255,.64);
  background: rgba(124,156,255,.20);
  box-shadow: 0 0 0 4px rgba(124,156,255,.12);
  outline: none;
}

body:not(.public-landing) .hero-badges {
  display: none;
}

body:not(.public-landing) .changelog-view {
  display: grid;
  gap: 18px;
}

body:not(.public-landing) .changelog-view.hidden {
  display: none !important;
}

body:not(.public-landing) .changelog-view h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.055em;
}

body:not(.public-landing) .changelog-list {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

body:not(.public-landing) .changelog-entry {
  display: grid;
  grid-template-columns: minmax(130px, 200px) minmax(170px, .55fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
}

body:not(.public-landing) .changelog-entry strong {
  color: var(--text);
  line-height: 1.35;
}

body:not(.public-landing) .changelog-entry small {
  color: var(--text-muted, var(--muted));
  line-height: 1.45;
}


/* V3.17.1 — header dashboard, changelog et refresh listes Discord */
body:not(.public-landing) .brand-mark img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  filter: none;
}

body:not(.public-landing) .brand-mark-button[disabled],
body:not(.public-landing) .brand-mark-button[aria-disabled="true"] {
  cursor: default;
}

body:not(.public-landing) .brand-mark-button[disabled]:hover,
body:not(.public-landing) .brand-mark-button[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

body:not(.public-landing) .hero-copy:empty {
  display: none;
}

body:not(.public-landing) .discord-lists-panel {
  display: none !important;
}

body:not(.public-landing) .compact-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body:not(.public-landing) .icon-button-inline {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 16px;
  font-size: 1rem;
}

body:not(.public-landing) .ticket-panel-toolbar,
body:not(.public-landing) #nextcloud-actions-row {
  align-items: center;
}

@media (max-width: 760px) {
  body:not(.public-landing) .compact-action-row,
  body:not(.public-landing) .ticket-panel-toolbar,
  body:not(.public-landing) #nextcloud-actions-row {
    justify-content: flex-start;
  }
}

/* V3.17.2 - historique bannières super-admin */

.banner-history-toolbar {
  grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) auto auto;
}
.admin-banner-request-actions {
  align-items: center;
}
.icon-button-danger {
  color: #fda4af;
  border-color: rgba(253, 164, 175, .38);
  background: rgba(244, 63, 94, .08);
}
.icon-button-danger:hover {
  color: #fecdd3;
  border-color: rgba(253, 164, 175, .62);
  background: rgba(244, 63, 94, .16);
}
@media (max-width: 900px) {
  .banner-history-toolbar {
    grid-template-columns: 1fr;
  }
}

/* V3.17.3 - nettoyage fin du journal des bannières */
.banner-logs-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: .85rem;
}
.banner-log-entry {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  column-gap: .8rem;
}
.banner-log-entry-copy {
  display: grid;
  gap: .18rem;
  min-width: 0;
}
.banner-log-entry .icon-button-danger {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  line-height: 1;
}
@media (max-width: 680px) {
  .banner-logs-toolbar {
    justify-content: stretch;
  }
  .banner-logs-toolbar .button {
    width: 100%;
  }
}

/* V3.19 — identité du bot par serveur */
.bot-custom-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.bot-identity-enabled-line {
  width: auto;
  min-width: 132px;
  justify-content: flex-end;
}

.bot-identity-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
  padding: 20px;
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 24px;
  background: rgba(2, 6, 23, .22);
}

.bot-media-column,
.bot-form-column,
.bot-preview-column {
  display: grid;
  gap: 14px;
}

.vertical-media-editor {
  align-items: flex-start;
  flex-direction: column;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bot-avatar-preview-large,
.bot-member-avatar,
.bot-profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid rgba(157, 180, 255, .34);
  background: radial-gradient(circle at 35% 25%, rgba(124,156,255,.22), transparent 50%), rgba(9, 16, 30, .86);
  display: grid;
  place-items: center;
  color: #cbd7ef;
  font-weight: 900;
  overflow: hidden;
}

.bot-member-avatar,
.bot-profile-avatar {
  width: 44px;
  height: 44px;
  font-size: .78rem;
  flex: 0 0 auto;
}

.bot-profile-avatar {
  width: 76px;
  height: 76px;
  margin-top: -38px;
  border: 3px solid rgba(13, 18, 32, .95);
}

.bot-avatar-preview img,
.bot-member-avatar img,
.bot-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-banner-preview,
.bot-profile-banner {
  min-height: 96px;
  border-radius: 18px;
  border: 1px dashed rgba(157, 180, 255, .22);
  background: linear-gradient(135deg, rgba(124,156,255,.22), rgba(85,217,141,.10));
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #8ba4c8;
  font-size: .82rem;
  font-weight: 800;
  overflow: hidden;
}

.bot-profile-banner {
  min-height: 86px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background-color: rgba(124, 156, 255, .34);
}

.preview-label {
  color: #8ea3c7;
  font-size: .78rem;
  font-weight: 850;
}

.bot-member-preview,
.bot-profile-preview {
  border: 1px solid rgba(157,180,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  overflow: hidden;
}

.bot-member-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.bot-member-preview p,
.bot-profile-preview p {
  margin: 4px 0 0;
  color: #aebddd;
  font-size: .82rem;
}

.bot-app-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #6875ff;
  color: white;
  font-size: .66rem;
  font-weight: 900;
}

.bot-profile-body {
  padding: 0 16px 16px;
}

.bot-activity-preview {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #f1f5ff;
  font-weight: 800;
}

.bot-bio-preview {
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .bot-identity-layout {
    grid-template-columns: 1fr;
  }

  .bot-preview-column {
    max-width: 420px;
  }
}

/* V3.19.2 — bot personnalisé drag crop + activité personnalisée */
.form-grid.three-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.global-bot-presence-card {
  display: grid;
  gap: 14px;
}

.media-adjust-controls {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(157,180,255,.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, .28);
}

.media-adjust-controls label {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #aebddd;
  font-size: .76rem;
  font-weight: 850;
}

.media-adjust-controls input[type="range"] {
  width: 100%;
  accent-color: #7c9cff;
}

.bot-custom-heading {
  align-items: flex-start;
}

.bot-profile-preview .bot-activity-preview {
  display: none;
}

@media (max-width: 980px) {
  .form-grid.three-columns {
    grid-template-columns: 1fr;
  }
}


/* V3.19.2 — recadrage par glisser-déposer + layout plus compact */
.bot-identity-layout {
  grid-template-columns: minmax(240px, 0.78fr) minmax(320px, 1fr) minmax(300px, 0.9fr);
  align-items: stretch;
}

.bot-media-column {
  align-content: start;
}

.bot-form-column {
  align-content: start;
}

.bot-preview-column {
  align-content: start;
}

.media-adjust-controls.hidden {
  display: none !important;
}

.media-drag-hint {
  margin: 8px 0 0;
  color: #8ea3c7;
  font-size: .76rem;
  font-weight: 800;
}

.bot-avatar-preview-large,
.bot-banner-preview {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.bot-avatar-preview-large:active,
.bot-banner-preview:active {
  cursor: grabbing;
}

.bot-banner-preview {
  min-height: 118px;
}

@media (max-width: 1180px) {
  .bot-identity-layout {
    grid-template-columns: 1fr;
  }
}


/* V3.20.1 — licences discrètes + expiration automatique */
.admin-license-editor {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(150px, 180px) minmax(130px, 150px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(157,180,255,.14);
}

.admin-license-editor .field {
  margin: 0;
}

@media (max-width: 900px) {
  .admin-license-editor {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}


/* V3.20.1 — licence visible sans bloquer l'aperçu */
body:not(.public-landing) .hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

body:not(.public-landing) .hero-license-pill {
  align-self: flex-start;
  white-space: nowrap;
}

body:not(.public-landing) .guild-button {
  position: relative;
  overflow: hidden;
}

body:not(.public-landing) .guild-premium-crown {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, .36);
  background: rgba(255, 209, 102, .12);
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  font-size: 1rem;
}

@media (max-width: 720px) {
  body:not(.public-landing) .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V3.20.2 — hero serveur fusionné + aperçu allégé (conservé) */
body:not(.public-landing) .hero {
  align-items: flex-start;
  padding: clamp(24px, 3vw, 34px);
}

body:not(.public-landing) .hero-main {
  min-width: 0;
  width: 100%;
}

body:not(.public-landing) .hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body:not(.public-landing) .hero-title-row h2 {
  min-width: 0;
  margin: 0;
}

body:not(.public-landing) .hero-guild-id {
  margin: 8px 0 0;
  font-size: .95rem;
}

body:not(.public-landing) .hero-kpis {
  margin-top: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.public-landing) .hero-license-pill {
  flex: 0 0 auto;
  margin-top: 4px;
}

body:not(.public-landing) #guild-summary-card {
  display: none !important;
}

body:not(.public-landing) .overview-card {
  margin-top: 0;
}

body:not(.public-landing) .overview-card .config-sections {
  margin-top: 0;
}

@media (max-width: 960px) {
  body:not(.public-landing) .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:not(.public-landing) .hero-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.public-landing) .hero-kpis {
    grid-template-columns: 1fr;
  }
}

/* V3.20.5 — passe UI globale : moins de répétitions, licence visible, onglets nettoyés */
body:not(.public-landing) .auth-panel #auth-title {
  content: none;
}

body:not(.public-landing) .hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.2vw, 40px);
}

body:not(.public-landing) .hero-title-row {
  align-items: flex-start;
  padding-right: 150px;
}

body:not(.public-landing) .hero-title-row h2 {
  line-height: .98;
}

body:not(.public-landing) .hero-license-pill {
  position: absolute;
  top: 30px;
  right: 32px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 92px;
  justify-content: center;
  margin: 0;
  padding: 8px 13px;
  font-size: .78rem;
}

body:not(.public-landing) .hero-license-pill.pill-success::before {
  content: "👑";
  font-size: .85rem;
}

body:not(.public-landing) .hero-license-pill.pill-muted::before {
  content: "";
}

body:not(.public-landing) .hero-license-pill.pill-danger::before {
  content: "⌛";
  font-size: .85rem;
}

body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtabs {
  gap: 10px;
  padding: 9px;
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab {
  min-width: 0;
  white-space: nowrap;
}

body:not(.public-landing) .tickets-panels-card .card-heading .eyebrow,
body:not(.public-landing) .twitch-planning-card .card-heading .eyebrow,
body:not(.public-landing) .twitch-banners-card .card-heading .eyebrow {
  color: #91a7df;
}

body:not(.public-landing) .overview-card {
  padding-top: 26px;
}

body:not(.public-landing) .overview-card .config-sections {
  display: block;
}

body:not(.public-landing) .overview-section-heading {
  margin: 0 0 18px;
}

body:not(.public-landing) .overview-section-heading h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

body:not(.public-landing) .overview-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body:not(.public-landing) .overview-sections-grid .config-section {
  min-height: 0;
}

@media (max-width: 920px) {
  body:not(.public-landing) .hero-title-row {
    padding-right: 0;
  }

  body:not(.public-landing) .hero-license-pill {
    position: static;
    margin-top: 12px;
  }

  body:not(.public-landing) .overview-sections-grid {
    grid-template-columns: 1fr;
  }
}


/* V3.20.5 — harmonisation finale des onglets et actions secondaires */
body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtabs,
body:not(.public-landing) .subtabs-inline,
body:not(.public-landing) .nextcloud-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(124, 156, 255, .22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(13, 25, 45, .82), rgba(8, 16, 31, .74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab,
body:not(.public-landing) .subtabs-inline .subtab,
body:not(.public-landing) .nextcloud-subtabs .subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #afbdd4;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body:not(.public-landing) .dashboard-tab:hover,
body:not(.public-landing) .subtab:hover,
body:not(.public-landing) .subtabs-inline .subtab:hover,
body:not(.public-landing) .nextcloud-subtabs .subtab:hover {
  color: #eef4ff;
  border-color: rgba(157, 180, 255, .34);
  background: rgba(124, 156, 255, .08);
}

body:not(.public-landing) .dashboard-tab.active,
body:not(.public-landing) .subtab.active,
body:not(.public-landing) .subtabs-inline .subtab.active,
body:not(.public-landing) .nextcloud-subtabs .subtab.active {
  color: #071225;
  border-color: rgba(255,255,255,.82);
  background: linear-gradient(135deg, #92a9ff, #7893ff);
  box-shadow: 0 14px 34px rgba(100, 126, 255, .22), inset 0 1px 0 rgba(255,255,255,.35);
}

body:not(.public-landing) .card-heading.inline-heading {
  align-items: flex-start;
  gap: 18px;
}

body:not(.public-landing) .twitch-banners-card .card-heading,
body:not(.public-landing) .twitch-automatic-messages-panel .card-heading,
body:not(.public-landing) .twitch-planning-card .card-heading,
body:not(.public-landing) .tickets-panels-card .card-heading,
body:not(.public-landing) .tickets-settings-card .card-heading,
body:not(.public-landing) .nextcloud-config-card .card-heading {
  margin-bottom: 18px;
}

body:not(.public-landing) .nextcloud-archives-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

body:not(.public-landing) .nextcloud-archives-actions .button,
body:not(.public-landing) .nextcloud-archives-actions .compact-select {
  min-height: 46px;
}

body:not(.public-landing) .nextcloud-archives-actions .compact-select {
  max-width: 190px;
}

body:not(.public-landing) .overview-section-heading {
  margin-bottom: 18px;
}

body:not(.public-landing) .overview-section-heading h3 {
  margin: 0;
}

body:not(.public-landing) .subtabs + .card,
body:not(.public-landing) .dashboard-tabs + .card,
body:not(.public-landing) .nextcloud-subtabs + .nextcloud-subtab-section {
  margin-top: 16px;
}

body:not(.public-landing) .twitch-banners-card > .muted:first-of-type {
  display: none;
}

@media (max-width: 920px) {
  body:not(.public-landing) .dashboard-tabs,
  body:not(.public-landing) .subtabs,
  body:not(.public-landing) .subtabs-inline,
  body:not(.public-landing) .nextcloud-subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
}

/* V3.21.2 — premium Twitch gratuit limité */
body:not(.public-landing) .premium-crown-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, .42);
  background: rgba(255, 209, 102, .12);
  box-shadow: 0 10px 24px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.08);
  color: #ffd166;
  font-size: .82rem;
  line-height: 1;
  vertical-align: middle;
}

body:not(.public-landing) .dashboard-tab .premium-crown-badge,
body:not(.public-landing) .subtab .premium-crown-badge {
  width: 20px;
  height: 20px;
  margin-left: 5px;
  font-size: .76rem;
}

body:not(.public-landing) [data-premium-feature].premium-locked {
  position: relative;
}

body:not(.public-landing) .dashboard-tab.premium-locked,
body:not(.public-landing) .subtab.premium-locked {
  opacity: .58;
  filter: saturate(.72);
}

body:not(.public-landing) .dashboard-tab.premium-locked:hover,
body:not(.public-landing) .subtab.premium-locked:hover {
  opacity: .76;
}

body:not(.public-landing) .card.premium-locked,
body:not(.public-landing) .module-tile.premium-locked,
body:not(.public-landing) .bot-identity-panel.premium-locked,
body:not(.public-landing) .field.premium-locked,
body:not(.public-landing) .nextcloud-editor-section.premium-locked {
  opacity: .62;
  filter: grayscale(.18) saturate(.75);
}

body:not(.public-landing) .card.premium-locked::after,
body:not(.public-landing) .bot-identity-panel.premium-locked::after {
  display: none;
}

body:not(.public-landing) .card.premium-locked::before,
body:not(.public-landing) .bot-identity-panel.premium-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(8,16,29,.16), rgba(8,16,29,.34));
  pointer-events: none;
}

body:not(.public-landing) .premium-locked input,
body:not(.public-landing) .premium-locked select,
body:not(.public-landing) .premium-locked textarea,
body:not(.public-landing) .premium-locked button:not(.dashboard-tab):not(.subtab) {
  cursor: not-allowed;
}

body:not(.public-landing) .module-tile.premium-locked {
  border-color: rgba(255, 209, 102, .22);
  background: linear-gradient(135deg, rgba(255,209,102,.05), rgba(255,255,255,.025));
}

body:not(.public-landing) .module-tile.premium-locked .switch {
  opacity: .54;
}


/* V3.21.2 — Twitch gratuit limité */
.premium-soft-note {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 16px;
  background: rgba(255, 209, 102, .08);
  color: #dbe7ff;
  font-size: .92rem;
  line-height: 1.45;
}

/* V3.21.4 — limites Basique / Premium */
.premium-panel-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 999px;
  color: #f8d889;
  background: rgba(255, 209, 102, .08);
  font-weight: 850;
  font-size: .82rem;
}
.ticket-hub-tile.premium-locked-soft {
  opacity: .72;
}
.premium-grace-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .30);
  border-radius: 18px;
  color: #f6d88a;
  background: rgba(255, 209, 102, .08);
  font-weight: 750;
}

/* V3.22 - Bibliothèque d'avatars Harka */
.global-bot-avatars-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.global-avatar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .46);
}
.global-avatar-row img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(129, 160, 255, .45);
}
.global-avatar-row strong,
.global-avatar-row span {
  display: block;
}
.global-avatar-row span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 2px;
}
.global-avatar-row.is-default {
  border-color: rgba(250, 204, 21, .45);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, .08);
}
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.avatar-preset-card {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .55);
  color: var(--text);
  border-radius: 18px;
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  transition: border-color .16s ease, opacity .16s ease, transform .16s ease;
  font: inherit;
  font-weight: 800;
  font-size: .82rem;
}
.avatar-preset-card img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
}
.avatar-preset-card.selected {
  border-color: rgba(129, 160, 255, .9);
  box-shadow: 0 0 0 2px rgba(129, 160, 255, .16);
}
.avatar-preset-card:disabled {
  cursor: not-allowed;
  opacity: .58;
}
.avatar-preset-card:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(129, 160, 255, .65);
}
.file-field-inline input[type="file"] {
  padding: 13px;
}
.soft-empty-state {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .4);
}

/* V3.22.1 - Recadrage bibliothèque avatars Harka */
.global-avatar-crop-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 8px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 20px;
  background: rgba(15, 23, 42, .42);
}
.global-avatar-crop-preview {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(129, 160, 255, .42);
  background: radial-gradient(circle at 30% 30%, rgba(129,160,255,.18), rgba(15,23,42,.72));
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  user-select: none;
  touch-action: none;
}
.global-avatar-crop-preview.has-image {
  border-style: solid;
  cursor: grab;
}
.global-avatar-crop-preview.has-image:active {
  cursor: grabbing;
}
.global-avatar-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.global-avatar-crop-help {
  display: grid;
  gap: 4px;
  color: var(--muted);
  line-height: 1.45;
}
.global-avatar-crop-help strong {
  color: var(--text);
}
@media (max-width: 720px) {
  .global-avatar-crop-editor { align-items: flex-start; flex-direction: column; }
}


/* V3.22.4.3 — affichage expiration licence */
.superadmin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(129, 160, 255, .20);
  border-radius: 24px;
  background: rgba(8, 14, 26, .55);
}
#global-admin-view[data-superadmin-tab-active="servers"] [data-superadmin-panel]:not([data-superadmin-panel~="servers"]),
#global-admin-view[data-superadmin-tab-active="avatars"] [data-superadmin-panel]:not([data-superadmin-panel~="avatars"]),
#global-admin-view[data-superadmin-tab-active="banners"] [data-superadmin-panel]:not([data-superadmin-panel~="banners"]),
#global-admin-view[data-superadmin-tab-active="logs"] [data-superadmin-panel]:not([data-superadmin-panel~="logs"]),
#global-admin-view[data-superadmin-tab-active="antiraid"] [data-superadmin-panel]:not([data-superadmin-panel~="antiraid"]),
#global-admin-view[data-superadmin-tab-active="bot-dms"] [data-superadmin-panel]:not([data-superadmin-panel~="bot-dms"]),
#global-admin-view[data-superadmin-tab-active="release"] [data-superadmin-panel]:not([data-superadmin-panel~="release"]),
#global-admin-view[data-superadmin-tab-active="supervision"] [data-superadmin-panel]:not([data-superadmin-panel~="supervision"]),
#global-admin-view[data-superadmin-tab-active="status"] [data-superadmin-panel]:not([data-superadmin-panel~="status"]) {
  display: none;
}
#global-admin-view[data-superadmin-tab-active="servers"] .admin-banner-requests-card,
#global-admin-view[data-superadmin-tab-active="banners"] .admin-guild-card:not(.admin-banner-requests-card) {
  display: none;
}
#global-admin-view[data-superadmin-tab-active="banners"] .admin-banner-requests-card {
  display: grid;
}
#global-admin-view[data-superadmin-tab-active="servers"] .admin-license-editor {
  display: grid;
}

/* V3.23.4 — Twitch Planning : polish preview planning */
.twitch-planning-card {
  display: grid;
  gap: 22px;
}

.twitch-planning-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(132, 160, 255, .18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, .10), transparent 34rem),
    rgba(8, 16, 29, .34);
}

.twitch-section-heading {
  align-items: center;
}

.twitch-section-heading .muted {
  max-width: 760px;
  margin-top: 6px;
}

.twitch-render-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.planning-format-help {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: 22px;
  align-items: start;
  margin: 0;
  padding: 20px;
  border-color: rgba(139, 92, 246, .26);
  background:
    radial-gradient(circle at 12% 12%, rgba(139, 92, 246, .14), transparent 28rem),
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, .08), transparent 24rem),
    rgba(10, 18, 32, .62);
}

.planning-format-help h3 {
  margin: 4px 0 8px;
  font-size: 1.18rem;
}

.planning-format-help code {
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  color: #edf4ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}

.planning-hover-note {
  margin: -4px 0 14px;
  font-size: .88rem;
}

.planning-preview-editor {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.planning-preview-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.planning-preview-editor .dashboard-field,
.planning-preview-editor input,
.planning-preview-editor select {
  min-width: 0;
  box-sizing: border-box;
}

.planning-preview-title-field {
  margin: 0;
}

.planning-preview-channel-field,
.planning-preview-category-field {
  grid-column: 1 / -1;
}

.planning-preview-date-field,
.planning-preview-time-field {
  grid-column: span 1;
}

.planning-preview-recurrent-field {
  grid-column: 1 / -1;
  margin: 0;
}

.planning-recurrent-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid rgba(157, 180, 255, .18);
  border-radius: 14px;
  background: rgba(8, 15, 27, .48);
  color: var(--text-main);
  font-weight: 800;
}

.planning-recurrent-switch input {
  width: 18px;
  height: 18px;
  accent-color: #7c9cff;
}

.planning-preview-publish-row {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.planning-preview-publish-row .button {
  width: 100%;
  justify-content: center;
}

.planning-preview-publish-state {
  margin: 0;
  font-size: .86rem;
}

.planning-category-search-shell {
  position: relative;
  min-width: 0;
}

.planning-category-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
  display: grid;
  gap: 6px;
  max-height: 270px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(157, 180, 255, .20);
  border-radius: 14px;
  background: rgba(8, 15, 27, .98);
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
}

.planning-category-results:empty {
  display: none;
}

.planning-category-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.planning-category-result:hover,
.planning-category-result:focus-visible {
  border-color: rgba(124,156,255,.45);
  background: rgba(124,156,255,.12);
}

.planning-category-result img,
.planning-category-result-placeholder {
  width: 42px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(124,156,255,.14);
}

.planning-category-result span {
  min-width: 0;
}

.planning-category-result strong,
.planning-category-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-category-result small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .78rem;
}

.planning-preview-category-state {
  margin: -2px 0 0;
  font-size: .86rem;
}

.warning-text {
  color: #f8d68a !important;
}

.planning-title-pattern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  color: var(--text-main);
  font-weight: 820;
}

.pattern-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 10px;
  color: #07111f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
  cursor: help;
  outline: none;
}

.pattern-token::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: max-content;
  max-width: 280px;
  padding: 9px 11px;
  border: 1px solid rgba(157,180,255,.20);
  border-radius: 12px;
  background: rgba(8, 15, 27, .98);
  color: #edf4ff;
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .14s ease, transform .14s ease;
}

.pattern-token:hover::after,
.pattern-token:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pattern-title {
  background: #eaff5f;
}

.pattern-separator {
  background: #42f5ef;
}

.pattern-main {
  background: #10f1b5;
}

.pattern-guest-streamers {
  background: #ff3ce9;
}

.pattern-feats {
  background: #2637ff;
  color: #fff;
}


.planning-example-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(124,156,255,.18);
  border-radius: 18px;
  background: rgba(5, 12, 25, .36);
}

.planning-example-breakdown > span {
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.planning-example-breakdown > code {
  display: block;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  white-space: normal;
  line-height: 1.5;
  color: #f7f9ff !important;
  background: rgba(0,0,0,.28) !important;
}

.planning-example-breakdown ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.planning-example-breakdown strong {
  color: #edf4ff;
}

.planning-premium-note {
  margin-top: 14px;
}

.planning-format-preview {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(20, 27, 45, .88), rgba(9, 14, 26, .88)),
    rgba(5, 12, 25, .66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.preview-label {
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.discord-event-preview {
  border: 1px solid rgba(0,0,0,.35);
  border-radius: 10px;
  background: #1f2027;
  color: #f2f3f5;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
  font-family: Inter, "gg sans", "Segoe UI", system-ui, sans-serif;
}

.discord-event-banner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 138px;
  background:
    radial-gradient(circle at 23% 46%, rgba(241, 155, 130, .95) 0 14%, transparent 15%),
    radial-gradient(circle at 82% 42%, rgba(190, 125, 100, .92) 0 15%, transparent 16%),
    linear-gradient(135deg, #7acbd7 0%, #8fd8dd 45%, #61aebd 100%);
  isolation: isolate;
}

.discord-event-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.discord-event-banner-has-image .discord-event-banner-title {
  opacity: 0;
}

.discord-event-banner-source {
  margin: -2px 2px 0;
  color: #9aa3b2;
  font-size: .72rem;
}

.discord-event-banner::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(7, 28, 39, .24));
  z-index: -1;
}

.discord-event-banner::after {
  content: "×";
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(21, 23, 31, .78);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.discord-event-banner-title {
  padding: 4px 18px;
  color: rgba(255,255,255,.94);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 950;
  letter-spacing: .04em;
  text-shadow: 0 8px 22px rgba(0,0,0,.30);
}

.discord-event-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #24252d;
  color: #b5bac1;
  font-size: .70rem;
}

.discord-event-tabs strong {
  color: #f2f3f5;
  font-size: .72rem;
}

.discord-event-body {
  display: grid;
  gap: 9px;
  padding: 13px 14px 16px;
  background: #1f2027;
  font-size: .78rem;
}

.discord-event-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbdee1;
  font-weight: 700;
}

.discord-event-calendar {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.discord-event-body h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #f2f3f5;
  font-size: .98rem;
  line-height: 1.3;
}

.discord-event-dot {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #8b5cf6;
}

.discord-event-server,
.discord-event-meta {
  margin: 0;
  color: #b5bac1;
}

.discord-event-meta strong {
  color: #7aa2ff;
}

.discord-event-description {
  display: grid;
  gap: 6px;
  margin-top: 3px;
  color: #dbdee1;
  line-height: 1.4;
}

.discord-event-description p {
  margin: 0;
}

.discord-event-description ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
}

.discord-event-description li::marker {
  color: #dbdee1;
}

.discord-event-description span {
  color: #7aa2ff;
}

@media (max-width: 980px) {
  .planning-format-help {
    grid-template-columns: 1fr;
  }

  .planning-preview-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-preview-channel-field,
  .planning-preview-category-field,
  .planning-preview-date-field,
  .planning-preview-time-field {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .planning-preview-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* V3.25.3 — journal des publications Twitch */
.planning-publication-history {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(124, 156, 255, .24);
  border-radius: 18px;
  background: rgba(5, 12, 24, .34);
}

.planning-publication-history h4 {
  margin: 2px 0 0;
}

.planning-publication-log-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.planning-publication-log-list.empty-state {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, .22);
  background: rgba(0, 0, 0, .18);
}

.planning-publication-log-list.empty-state p {
  margin: 5px 0 0;
}

.planning-publication-log-item {
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(9, 17, 32, .62);
}

.planning-publication-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.planning-publication-log-item strong {
  display: block;
  color: #f3f7ff;
}

.planning-publication-log-item p {
  margin: 5px 0 0;
  color: #c6d4ee;
  line-height: 1.45;
}

.planning-publication-error {
  color: #ffb4c1 !important;
}


/* V3.25.5 — Publications Twitch réservées au superadmin */
.global-admin-twitch-publications-card {
  display: grid;
  gap: 16px;
}
.admin-twitch-publications-toolbar {
  align-items: end;
}

.global-admin-logs-card {
  display: grid;
  gap: 18px;
}

.admin-audit-logs-toolbar {
  align-items: end;
}

.admin-audit-log-list {
  display: grid;
  gap: 12px;
}

.admin-audit-log-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.admin-audit-log-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-audit-log-item strong {
  color: #eef4ff;
}

.admin-twitch-publication-log-list .planning-publication-log-item strong {
  word-break: break-word;
}


/* V3.25.6 — Supervision superadmin */
.global-supervision-card {
  display: grid;
  gap: 16px;
}
.global-supervision-card .form-grid {
  align-items: end;
}

/* V4.0.4 — Archives tickets unifiées */
.ticket-archives-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 1rem;
  margin: 1rem 0;
}

.ticket-archives-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.35fr);
  gap: 1rem;
  align-items: start;
}

.ticket-archives-list {
  display: grid;
  gap: 0.75rem;
}

.ticket-archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.ticket-archive-main {
  min-width: 0;
}

.ticket-archive-main strong,
.ticket-archive-main small {
  display: block;
}

.ticket-archive-main strong {
  overflow-wrap: anywhere;
}

.ticket-archive-main small {
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
}

.ticket-archive-number {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  color: var(--accent, #8b5cf6);
}

.ticket-archive-preview-panel {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
}

.ticket-archive-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.2));
}

.ticket-archive-preview-heading h4 {
  margin: 0.15rem 0 0;
}

.ticket-archive-preview-frame {
  width: 100%;
  min-height: 620px;
  border: 0;
  background: #ffffff;
}

@media (max-width: 1100px) {
  .ticket-archives-layout,
  .ticket-archives-filters {
    grid-template-columns: 1fr;
  }
}

/* V4.0.5 — Compteurs tickets */
.ticket-counters-toolbar {
  align-items: center;
}

.ticket-counters-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ticket-counter-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.ticket-counter-main strong,
.ticket-counter-main small {
  display: block;
}

.ticket-counter-main small {
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  overflow-wrap: anywhere;
}

.ticket-counter-usage {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: #c6d4ee;
}

.ticket-counter-usage li + li {
  margin-top: 0.25rem;
}

.ticket-counter-empty-usage {
  margin: 0.75rem 0 0;
}

.ticket-counter-value-field {
  margin: 0;
}

.ticket-counter-value-field input {
  text-align: right;
  font-weight: 800;
}

.ticket-counter-value-field small {
  margin-top: 0.4rem;
  color: var(--muted, #9fb4d8);
}

@media (max-width: 900px) {
  .ticket-counter-card {
    grid-template-columns: 1fr;
  }
}

/* Phase V4.1.0 — Module Embed */
.embeds-card .card-heading { align-items: flex-start; }
.embeds-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.6fr);
  gap: 18px;
  align-items: start;
}
.embeds-list-panel,
.embed-editor-panel {
  border: 1px solid rgba(139, 159, 255, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: rgba(5, 12, 28, 0.35);
}
.embeds-list {
  display: grid;
  gap: 10px;
}
.embed-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(139, 159, 255, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(8, 14, 30, 0.72);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}
.embed-list-item:hover,
.embed-list-item.active {
  border-color: rgba(130, 153, 255, 0.65);
  background: rgba(91, 113, 196, 0.20);
}
.embed-list-item span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.embed-list-item small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
}
.embed-editor-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.embed-editor-form {
  display: grid;
  gap: 12px;
}
.embed-fields-editor {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(139, 159, 255, 0.16);
  padding-top: 14px;
  margin-top: 4px;
}
.embed-fields-list {
  display: grid;
  gap: 10px;
}
.embed-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.2fr) auto auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(139, 159, 255, 0.14);
  border-radius: 14px;
  padding: 10px;
  background: rgba(6, 12, 28, 0.45);
}
.embed-field-inline {
  align-self: center;
  margin-bottom: 6px;
}
.embed-preview-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
}
.embed-preview {
  border-radius: 16px;
  background: #313338;
  color: #f2f3f5;
  min-height: 180px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.embed-preview-content {
  margin: 0 0 10px;
  color: #f2f3f5;
  line-height: 1.45;
}
.discord-embed-preview {
  border-left: 4px solid var(--embed-color, #7c8cff);
  border-radius: 8px;
  background: #2b2d31;
  padding: 12px;
  max-width: 560px;
}
.embed-preview-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}
.embed-preview-title {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
}
.embed-preview-description {
  margin: 0 0 10px;
  white-space: normal;
  line-height: 1.45;
  color: #dbdee1;
}
.embed-preview-thumb {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
}
.embed-preview-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 10px;
}
.embed-preview-footer {
  display: block;
  margin-top: 10px;
  color: #b5bac1;
}
.embed-preview-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
.embed-preview-field.inline {
  display: inline-grid;
  width: 32%;
  min-width: 120px;
  margin-right: 1%;
  vertical-align: top;
}
.embed-preview-field strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.embed-preview-field span {
  color: #dbdee1;
  font-size: 0.9rem;
}
.embed-fields-empty { padding: 12px; }
@media (max-width: 1100px) {
  .embeds-layout,
  .embed-editor-grid { grid-template-columns: 1fr; }
  .embed-preview-panel { position: static; }
}
@media (max-width: 760px) {
  .embed-field-row { grid-template-columns: 1fr; }
  .embed-preview-field.inline { width: 100%; margin-right: 0; }
}

/* Phase V4.1.1 — ergonomie module Embed */
.embed-editor-panel > .section-heading-row {
  align-items: flex-start;
  gap: 16px;
}
.embed-editor-panel > .section-heading-row .button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 390px;
}
.embed-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
}
.embed-editor-form,
.embed-editor-panel,
.embeds-list-panel { min-width: 0; }
.embed-editor-form .field,
.embed-editor-form input,
.embed-editor-form textarea { min-width: 0; }
.emoji-input-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}
.emoji-input-wrap > input,
.emoji-input-wrap > textarea {
  width: 100%;
}
.emoji-insert-button {
  width: 44px;
  min-width: 44px;
  border: 1px solid rgba(139, 159, 255, 0.18);
  border-radius: 14px;
  background: rgba(139, 159, 255, 0.09);
  color: var(--text-main);
  cursor: pointer;
  font-size: 1rem;
}
.emoji-insert-button:hover,
.emoji-insert-button:focus-visible {
  border-color: rgba(130, 153, 255, 0.65);
  background: rgba(130, 153, 255, 0.20);
}
.embed-color-footer-grid {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  align-items: end;
}
.embed-color-control {
  display: grid;
  grid-template-columns: 38px 54px minmax(110px, 1fr);
  gap: 8px;
  align-items: center;
}
.embed-color-swatch {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.20);
  background: #7c8cff;
}
.embed-color-control input[type="color"] {
  width: 54px;
  height: 42px;
  padding: 4px;
}
.embed-color-control input[type="text"] {
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.embed-fields-editor .section-heading-row {
  align-items: center;
}
.embed-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
}
.embed-field-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.embed-field-row-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.4fr) minmax(150px, auto);
  gap: 12px;
  align-items: end;
}
.embed-field-inline {
  min-height: 44px;
  align-self: end;
  margin: 0;
  justify-content: center;
}
.embed-preview-panel {
  align-self: start;
  max-width: 360px;
  width: 100%;
}
.embed-preview {
  overflow: hidden;
}
.discord-embed-preview {
  max-width: 100%;
}
.embed-preview-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}
.embed-preview-field {
  display: block;
  width: 100%;
  min-width: 0;
}
.embed-preview-field.inline {
  display: block;
  flex: 1 1 calc(33.333% - 12px);
  width: auto;
  min-width: 96px;
  margin: 0;
}
.embed-preview-field strong,
.embed-preview-field span {
  overflow-wrap: anywhere;
}
.dashboard-emoji-popover {
  position: fixed;
  z-index: 10000;
  width: min(330px, calc(100vw - 24px));
  max-height: 410px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid rgba(139, 159, 255, 0.26);
  border-radius: 18px;
  background: rgba(17, 24, 42, 0.98);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  padding: 12px;
}
.emoji-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.emoji-search-field input {
  width: 100%;
}
.emoji-popover-content {
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
  margin-top: 10px;
}
.emoji-popover-section {
  display: grid;
  gap: 8px;
}
.emoji-popover-section > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.emoji-popover-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.emoji-popover-choice {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(139, 159, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 13, 30, 0.72);
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}
.emoji-popover-choice:hover,
.emoji-popover-choice:focus-visible {
  border-color: rgba(130, 153, 255, 0.65);
  background: rgba(130, 153, 255, 0.20);
}
.emoji-popover-choice img {
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
}
.emoji-empty { padding: 12px; }
@media (max-width: 1180px) {
  .embed-editor-grid { grid-template-columns: 1fr; }
  .embed-preview-panel { position: static; max-width: none; }
}
@media (max-width: 820px) {
  .embed-color-footer-grid,
  .embed-field-row-grid { grid-template-columns: 1fr; }
  .embed-field-inline { justify-content: flex-start; }
}

.embed-field-readable-preview {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(157, 180, 255, 0.16);
  border-radius: 12px;
  background: rgba(5, 10, 19, 0.30);
  color: #c9d4ef;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 34px;
  word-break: break-word;
}

.embed-field-readable-preview .muted {
  color: #7e8baa;
  font-weight: 700;
}

.inline-custom-emoji {
  width: 1.25em;
  height: 1.25em;
  object-fit: contain;
  vertical-align: -0.25em;
  margin: 0 0.05em;
}

/* Phase V4.1.2 — refonte stable du module Embed */
.embeds-card > .card-heading.inline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}
.embeds-card > .card-heading.inline-heading .button-row-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: max-content;
}
.embeds-card > .card-heading.inline-heading .button-row-inline .button {
  white-space: nowrap;
}
.embeds-layout {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
}
.embed-editor-panel > .section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.embed-editor-panel > .section-heading-row .button-row,
.embed-editor-panel > .section-heading-row .button-row-inline {
  max-width: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.embed-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.embed-preview-panel {
  order: -1;
  position: static;
  max-width: 680px;
  width: 100%;
  display: grid;
  gap: 8px;
}
.embed-preview {
  width: 100%;
  max-width: 680px;
  min-height: 96px;
  padding: 14px;
  overflow: visible;
  box-sizing: border-box;
}
.discord-embed-preview {
  max-width: 580px;
  box-sizing: border-box;
}
.embed-editor-form {
  max-width: 760px;
  width: 100%;
}
.embed-editor-form .dashboard-field,
.embed-editor-form .field {
  width: 100%;
  box-sizing: border-box;
}
.embed-editor-form input,
.embed-editor-form textarea,
.embed-editor-form select {
  width: 100%;
  box-sizing: border-box;
}
.emoji-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.emoji-input-wrap > input,
.emoji-input-wrap > textarea {
  width: 100%;
  padding-right: 48px !important;
  box-sizing: border-box;
}
.emoji-input-wrap > textarea {
  resize: vertical;
}
.emoji-insert-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(180, 195, 255, 0.22);
  background: rgba(25, 32, 54, 0.92);
  color: #dbe4ff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity .14s ease, transform .14s ease, background .14s ease, border-color .14s ease;
  z-index: 3;
}
.emoji-input-wrap:hover > .emoji-insert-button,
.emoji-input-wrap:focus-within > .emoji-insert-button,
.emoji-insert-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.emoji-insert-button:hover,
.emoji-insert-button:focus-visible {
  border-color: rgba(130, 153, 255, 0.7);
  background: rgba(88, 101, 242, 0.34);
}
.embed-color-footer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.embed-color-control {
  display: grid;
  grid-template-columns: 38px 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
}
.embed-color-control input[type="color"] {
  width: 52px;
  min-width: 52px;
}
.embed-color-control input[type="text"] {
  min-width: 0;
}
.embed-field-row-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) 150px;
  align-items: start;
}
.embed-field-inline {
  align-self: start;
  margin-top: 24px;
  min-height: 42px;
  justify-content: center;
}
.embed-preview-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
}
.embed-preview-field {
  width: 100%;
  flex: 0 0 100%;
}
.embed-preview-field.inline {
  flex: 1 1 calc(33.333% - 18px);
  min-width: 120px;
  max-width: calc(50% - 9px);
}
.embed-preview-field strong,
.embed-preview-field span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.dashboard-emoji-popover.dashboard-emoji-popover-compact {
  width: min(320px, calc(100vw - 24px));
  max-height: min(340px, calc(100vh - 24px));
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 14px;
  padding: 10px;
}
.dashboard-emoji-popover-compact .emoji-popover-header {
  margin-bottom: 6px;
}
.dashboard-emoji-popover-compact .emoji-search-field {
  margin-bottom: 8px;
}
.dashboard-emoji-popover-compact .emoji-popover-content {
  margin-top: 0;
  gap: 10px;
}
.dashboard-emoji-popover-compact .emoji-popover-grid {
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.dashboard-emoji-popover-compact .emoji-popover-choice {
  height: 30px;
  border-radius: 8px;
}
.dashboard-emoji-popover-compact .emoji-popover-choice img {
  max-width: 22px;
  max-height: 22px;
}
@media (max-width: 1220px) {
  .embeds-layout {
    grid-template-columns: 1fr;
  }
  .embeds-list-panel {
    max-width: none;
  }
}
@media (max-width: 820px) {
  .embeds-card > .card-heading.inline-heading,
  .embed-editor-panel > .section-heading-row {
    grid-template-columns: 1fr;
  }
  .embeds-card > .card-heading.inline-heading .button-row-inline,
  .embed-editor-panel > .section-heading-row .button-row-inline {
    justify-content: flex-start;
    flex-wrap: wrap;
    min-width: 0;
  }
  .embed-color-footer-grid,
  .embed-field-row-grid {
    grid-template-columns: 1fr;
  }
  .embed-field-inline {
    margin-top: 0;
    justify-content: flex-start;
  }
  .embed-preview-field.inline {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Phase V4.1.3 — éditeur Embed : picker emoji complet et layout clarifié */
.embed-color-control {
  grid-template-columns: 54px minmax(0, 1fr) !important;
  max-width: 290px;
}
.embed-color-control .embed-color-swatch { display: none !important; }
.embed-color-control input[type="color"] {
  width: 54px !important;
  min-width: 54px !important;
  height: 44px;
}
.embed-color-control input[type="text"] {
  min-width: 0;
}
.embed-list-item small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .88;
}
.embed-editor-panel > .section-heading-row {
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  gap: 14px !important;
}
.embed-editor-panel > .section-heading-row .button-row,
.embed-editor-panel > .section-heading-row .button-row-inline {
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  width: 100%;
}
.embed-editor-panel > .section-heading-row .button {
  white-space: nowrap;
}
.embed-editor-panel .section-heading-row p.muted {
  max-width: 680px;
}
.embeds-card > .card-heading.inline-heading {
  align-items: center !important;
}
.embeds-card > .card-heading.inline-heading .button-row-inline {
  align-items: center !important;
}
.dashboard-emoji-popover.dashboard-emoji-popover-full {
  width: min(440px, calc(100vw - 24px));
  max-height: min(470px, calc(100vh - 24px));
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 10px;
  border-radius: 16px;
}
.dashboard-emoji-popover-full .emoji-popover-body {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}
.dashboard-emoji-popover-full .emoji-category-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 4px 2px 0;
  overflow-y: auto;
  border-right: 1px solid rgba(139,159,255,.16);
}
.dashboard-emoji-popover-full .emoji-category-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(139,159,255,.14);
  border-radius: 10px;
  background: rgba(7, 13, 30, .62);
  color: var(--text-main);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.dashboard-emoji-popover-full .emoji-category-button:hover,
.dashboard-emoji-popover-full .emoji-category-button:focus-visible {
  border-color: rgba(130,153,255,.72);
  background: rgba(130,153,255,.22);
}
.dashboard-emoji-popover-full .emoji-popover-content {
  margin-top: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 4px 0 0;
  gap: 14px;
}
.dashboard-emoji-popover-full .emoji-popover-section > span {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 0 6px;
  background: rgba(17, 24, 42, .98);
}
.dashboard-emoji-popover-full .emoji-popover-grid {
  grid-template-columns: repeat(9, minmax(28px, 1fr));
  gap: 5px;
}
.dashboard-emoji-popover-full .emoji-popover-choice {
  height: 30px;
  border-radius: 9px;
  font-size: 1.06rem;
}
.dashboard-emoji-popover-full .emoji-popover-choice img {
  max-width: 23px;
  max-height: 23px;
}
.emoji-input-wrap > .emoji-insert-button {
  font-family: system-ui, sans-serif;
}
@media (max-width: 720px) {
  .embeds-card > .card-heading.inline-heading {
    grid-template-columns: 1fr;
  }
  .embeds-card > .card-heading.inline-heading .button-row-inline {
    justify-content: flex-start;
    flex-wrap: wrap;
    min-width: 0;
  }
  .dashboard-emoji-popover-full .emoji-popover-grid {
    grid-template-columns: repeat(7, minmax(28px, 1fr));
  }
}


/* Phase V4.1.4 — sélecteur emoji : icône serveur et recherche par nom */
.dashboard-emoji-popover-full .emoji-category-button {
  overflow: hidden;
}
.dashboard-emoji-popover-full .emoji-category-button .emoji-category-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}
.dashboard-emoji-popover-full .emoji-popover-choice {
  position: relative;
}
.dashboard-emoji-popover-full .emoji-popover-choice[title] {
  cursor: pointer;
}

/* Phase V4.1.5 - emoji picker partagé tickets + lisibilité liste embeds */
.ticket-type-editor-grid .emoji-input-wrap,
.ticket-hub-create-grid .emoji-input-wrap,
.modal-field-grid .emoji-input-wrap {
  width: 100%;
  min-width: 0;
}

.ticket-type-editor-grid .emoji-input-wrap > input,
.ticket-type-editor-grid .emoji-input-wrap > textarea,
.ticket-hub-create-grid .emoji-input-wrap > input,
.ticket-hub-create-grid .emoji-input-wrap > textarea,
.modal-field-grid .emoji-input-wrap > input,
.modal-field-grid .emoji-input-wrap > textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 48px !important;
}

.compact-emoji-value {
  max-width: 220px;
}

.compact-emoji-value > input {
  font-size: 1.08rem;
}

.embed-list-item span:first-child {
  overflow: hidden;
}

.embed-list-item .embed-list-channel {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-family: var(--font-body, inherit);
}

.embed-list-item .pill {
  flex-shrink: 0;
}

/* Phase V4.1.6 - picker de mentions utilisateurs/rôles */
.dashboard-mention-popover {
  position: fixed;
  z-index: 12000;
  background: #111827;
  border: 1px solid rgba(124, 140, 255, 0.45);
  border-radius: 18px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: #e7ecff;
}

.mention-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mention-popover-header strong {
  font-size: 0.9rem;
}

.mention-popover-header small {
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #aeb9d8;
  font-weight: 700;
}

.mention-popover-content {
  max-height: 300px;
  overflow: auto;
  padding: 8px;
}

.mention-picker-section + .mention-picker-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mention-picker-section > span {
  display: block;
  padding: 5px 6px 7px;
  color: #9ca9cf;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mention-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mention-choice:hover,
.mention-choice:focus-visible {
  background: rgba(124, 140, 255, 0.15);
  outline: none;
}

.mention-choice-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(124, 140, 255, 0.18);
  color: #c8d2ff;
  font-weight: 950;
}

.mention-choice-icon.role {
  background: color-mix(in srgb, var(--mention-role-color, #7c8cff) 22%, rgba(124, 140, 255, 0.16));
  color: var(--mention-role-color, #9fb0ff);
}

.mention-choice strong,
.mention-choice small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-choice strong {
  font-size: 0.9rem;
}

.mention-choice small {
  margin-top: 2px;
  color: #9ca9cf;
  font-size: 0.76rem;
}

.discord-mention-preview {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.28);
  color: #dce1ff;
  font-weight: 700;
  white-space: pre-line;
}

.discord-mention-preview.role {
  background: rgba(88, 101, 242, 0.22);
}

.discord-mention-preview.channel {
  background: rgba(35, 165, 90, 0.22);
  color: #d8ffe9;
}


/* Phase V4.1.7 — correction alignement des options Inline dans l’éditeur Embed */
.embed-field-row-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(132px, 0.7fr) !important;
  align-items: start;
}

.embed-field-inline {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  margin-top: 24px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: visible;
}

.embed-field-inline input {
  flex: 0 0 auto;
}

.embed-field-inline > span:not(.field-help) {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.embed-field-inline .field-help {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 980px) {
  .embed-field-row-grid {
    grid-template-columns: 1fr !important;
  }
  .embed-field-inline {
    margin-top: 0;
    max-width: 220px;
  }
}


/* Phase V4.1.10 — import images Embed avec recadrage */
.embed-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 14px;
  align-items: stretch;
}
.embed-image-uploader {
  border: 1px solid rgba(120, 140, 205, 0.24);
  background: rgba(5, 10, 20, 0.36);
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
}
.embed-image-uploader-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #dbe5ff;
  font-weight: 800;
}
.embed-image-preview-box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 128px;
  border: 1px dashed rgba(160, 178, 255, 0.32);
  background: rgba(2, 6, 14, 0.55);
  color: rgba(210, 222, 255, 0.72);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  padding: 12px;
}
.embed-image-preview-box.thumbnail {
  min-height: 128px;
  aspect-ratio: 1 / 1;
  max-height: 180px;
}
.embed-image-preview-box.has-image {
  padding: 0;
  border-style: solid;
}
.embed-image-preview-box img {
  width: 100%;
  height: 100%;
  min-height: 128px;
  object-fit: cover;
  display: block;
}
.embed-image-preview-box.thumbnail img {
  aspect-ratio: 1 / 1;
}
.embed-image-preview-box span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(4, 8, 17, 0.78);
  color: #eff4ff;
  font-size: 0.75rem;
  font-weight: 800;
}
.embed-image-actions {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.embed-image-crop-backdrop {
  z-index: 1200;
}
.embed-image-crop-card {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.embed-image-crop-canvas {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 16px;
  border: 1px solid rgba(150, 170, 255, 0.28);
  background: #050a14;
  cursor: grab;
  touch-action: none;
}
.embed-image-crop-canvas:active {
  cursor: grabbing;
}
.embed-crop-zoom-field {
  max-width: 560px;
  margin: 0 auto 14px;
}
.dashboard-image-crop-zoom-header,
.dashboard-image-crop-zoom-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-image-crop-zoom-header {
  margin-bottom: 8px;
}
.dashboard-image-crop-zoom-value {
  color: #e8f0ff;
  font-size: .92rem;
  font-weight: 800;
}
.dashboard-image-crop-zoom-meta {
  margin-top: 8px;
  font-size: .78rem;
}
.dashboard-range-input {
  --dashboard-range-progress: 0%;
  width: 100%;
  min-height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  outline: none;
  accent-color: unset;
  -webkit-appearance: none;
  appearance: none;
}
.dashboard-range-input:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}
.dashboard-range-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: linear-gradient(90deg, #9cc8ff 0%, #9cc8ff var(--dashboard-range-progress), rgba(255, 255, 255, .18) var(--dashboard-range-progress), rgba(255, 255, 255, .18) 100%);
}
.dashboard-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 0;
  border-radius: 999px;
  background: #9cc8ff;
  box-shadow: 0 0 0 3px rgba(156, 200, 255, .18);
}
.dashboard-range-input::-moz-range-track {
  width: 100%;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}
.dashboard-range-input::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #9cc8ff;
}
.dashboard-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #9cc8ff;
  box-shadow: 0 0 0 3px rgba(156, 200, 255, .18);
}
@media (max-width: 820px) {
  .embed-media-grid {
    grid-template-columns: 1fr;
  }
  .embed-image-preview-box.thumbnail {
    aspect-ratio: auto;
    max-height: none;
  }
}

/* Phase V4.1.11 — import image Embed corrigé et sections séparées */
.embed-media-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}
.embed-image-uploader {
  padding: 16px;
}
.embed-image-uploader[data-embed-image-kind="image"] .embed-image-preview-box {
  min-height: 180px;
  aspect-ratio: 16 / 9;
}
.embed-image-uploader[data-embed-image-kind="thumbnail"] {
  max-width: 360px;
}
.embed-image-uploader[data-embed-image-kind="thumbnail"] .embed-image-preview-box.thumbnail {
  width: min(220px, 100%);
  min-height: 220px;
  max-height: none;
  aspect-ratio: 1 / 1;
}
.embed-image-uploader-heading {
  justify-content: flex-start;
}
.embed-image-actions .button[disabled] {
  opacity: 0.65;
  cursor: wait;
}
.embed-image-crop-backdrop {
  z-index: 1400;
}
.embed-image-crop-backdrop .dashboard-modal-backdrop {
  z-index: 0;
}
.embed-image-crop-card {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}
.embed-image-crop-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.embed-image-crop-heading .eyebrow,
.embed-image-crop-heading h3,
.embed-image-crop-heading p {
  margin-top: 0;
}
.embed-image-crop-actions {
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .embed-image-crop-heading,
  .embed-image-crop-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .embed-image-uploader[data-embed-image-kind="thumbnail"] {
    max-width: none;
  }
}


/* Phase V4.1.12 — Embed : duplication et suppression */
.embed-list-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch !important;
  padding: 0 !important;
  cursor: default !important;
  overflow: hidden;
}
.embed-list-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.embed-list-main:hover {
  background: rgba(91, 113, 196, 0.12);
}
.embed-list-main > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.embed-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 12px 12px;
  border-top: 1px solid rgba(139, 159, 255, 0.10);
}
.button.button-compact {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: .82rem;
}
.embed-editor-panel #delete-embed-button {
  margin-left: auto;
}
@media (max-width: 760px) {
  .embed-editor-panel #delete-embed-button {
    margin-left: 0;
  }
  .embed-list-actions {
    justify-content: flex-start;
  }
}


/* Phase V4.1.13.2 — changelog simplifié et affichage corrigé */
.release-info-grid .release-title-field,
.release-info-grid .release-notes-field {
  grid-column: 1 / -1;
}
.changelog-entry-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.embed-name-category-grid {
  grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr);
}
.embeds-list-grouped {
  gap: 14px;
}
.embed-category-group {
  display: grid;
  gap: 8px;
}
.embed-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  color: var(--text-main);
  font-size: .86rem;
  letter-spacing: .03em;
  text-transform: none;
}
.embed-category-items {
  display: grid;
  gap: 10px;
}
.embed-order-button {
  min-width: 36px;
  font-weight: 900;
}
.embed-order-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .embed-name-category-grid {
    grid-template-columns: 1fr;
  }
}


.release-manager-layout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.release-entry-list-panel,
.release-entry-editor-panel {
  border: 1px solid rgba(139, 159, 255, .16);
  border-radius: 22px;
  background: rgba(5, 12, 24, .28);
  padding: 16px;
}
.release-entries-list {
  display: grid;
  gap: 10px;
}
.release-entry-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(139, 159, 255, .16);
  border-radius: 16px;
  background: rgba(8, 16, 31, .58);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}
.release-entry-button:hover,
.release-entry-button.active {
  border-color: rgba(124, 156, 255, .55);
  background: rgba(91, 113, 196, .16);
}
.release-entry-button > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.release-entry-button small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.release-entry-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.release-editor-actions {
  justify-content: flex-end;
  margin-top: 12px;
}
@media (max-width: 980px) {
  .release-manager-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  body:not(.public-landing) .changelog-entry {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}


/* Beta V0.3 — hotfix images Embed sans recadrage */
.embed-image-uploader[data-embed-image-kind="image"] .embed-image-preview-box,
.embed-image-uploader[data-embed-image-kind="thumbnail"] .embed-image-preview-box.thumbnail {
  aspect-ratio: auto !important;
  min-height: 120px;
  max-height: none;
  padding: 10px;
  background: rgba(2, 6, 14, 0.70);
}

.embed-image-uploader[data-embed-image-kind="image"] .embed-image-preview-box.has-image,
.embed-image-uploader[data-embed-image-kind="thumbnail"] .embed-image-preview-box.has-image {
  padding: 10px;
}

.embed-image-preview-box img,
.embed-image-preview-box.thumbnail img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  min-height: 0;
  object-fit: contain;
  border-radius: 10px;
}

.embed-image-uploader[data-embed-image-kind="thumbnail"] .embed-image-preview-box.thumbnail {
  width: min(260px, 100%);
}

.embed-preview-thumb {
  object-fit: contain;
  background: rgba(0, 0, 0, .18);
}

.embed-preview-image {
  max-height: none;
  object-fit: contain;
}

/* Phase V0.7.5.1 — Réponses auto sur socle dashboard commun
   Règle : la liste, le shell éditeur, la topbar et l'état vide utilisent dashboard-module-*.
   Les classes auto-response-* restantes portent uniquement le contenu métier et les champs propres aux réponses auto.
*/
body:not(.public-landing) .auto-responses-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.public-landing) .auto-responses-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 0;
}

body:not(.public-landing) .dashboard-module-config-column > .auto-response-editor-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body:not(.public-landing) .auto-response-editor-panel.hidden {
  display: none !important;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .field,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .checkbox-field,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-messages-section,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-send-row {
  min-width: 0;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  border-radius: 0;
  background: transparent;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .field:nth-child(odd):not(.auto-response-wide-field) {
  border-right: 1px solid rgba(148, 163, 184, .10);
}

body:not(.public-landing) .auto-response-wide-field {
  grid-column: 1 / -1;
}

body:not(.public-landing) .auto-response-header-toggle,
body:not(.public-landing) .auto-response-delete-toggle {
  justify-content: flex-start;
}

body:not(.public-landing) .auto-response-send-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
}

body:not(.public-landing) .auto-response-trigger-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .auto-response-trigger-list code,
body:not(.public-landing) .auto-response-extra-triggers {
  display: inline-flex;
  align-items: center;
  max-width: 16ch;
  min-height: 24px;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid rgba(124, 156, 255, .22);
  border-radius: 999px;
  background: rgba(124, 156, 255, .14);
  color: #dbe6ff;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .auto-responses-list .dashboard-module-list-item-top h4 {
  display: grid;
  gap: 4px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body:not(.public-landing) .auto-responses-list .dashboard-module-list-item-top h4 small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .auto-responses-list .dashboard-module-list-item-meta {
  display: grid;
  min-width: 0;
}

body:not(.public-landing) .auto-response-list-item.no-triggers {
  border-color: rgba(148, 163, 184, .22);
}

@media (max-width: 1180px) {
  body:not(.public-landing) .auto-responses-layout,
  body:not(.public-landing) .auto-response-form-grid.dashboard-form-card,
  body:not(.public-landing) .auto-response-send-row {
    grid-template-columns: 1fr !important;
  }

  body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .field:nth-child(odd):not(.auto-response-wide-field) {
    border-right: 0;
  }
}

/* Phase V4.4 — validation des limites Discord pour les embeds */
.save-state.error {
  color: var(--danger);
  font-weight: 800;
}

.embed-fields-editor {
  margin-top: 18px;
}


/* Phase V4.4.1 — Embed : correction petites résolutions */
body:not(.public-landing) .main-content,
body:not(.public-landing) .tab-section,
.embeds-card,
.embeds-layout,
.embeds-list-panel,
.embed-editor-panel,
.embed-editor-form,
.embed-preview-panel,
.embed-preview,
.discord-embed-preview {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.embed-editor-panel {
  overflow: hidden;
}

.embed-editor-form,
.embed-preview-panel {
  justify-self: stretch;
}

.embed-preview,
.discord-embed-preview {
  overflow-x: hidden;
}

/* Le module Embed a besoin de plus de largeur que les autres modules.
   À 1366px avec la sidebar, le layout 2 colonnes casse l'éditeur. */
@media (max-width: 1500px) {
  .embeds-layout {
    grid-template-columns: 1fr !important;
  }

  .embeds-list-panel,
  .embed-editor-panel {
    width: 100%;
    max-width: none;
  }

  .embed-editor-form,
  .embed-preview-panel {
    width: 100%;
    max-width: 860px;
  }
}

@media (max-width: 980px) {
  .embed-name-category-grid,
  .embed-color-footer-grid,
  .embed-field-row-grid,
  .embed-media-grid {
    grid-template-columns: 1fr !important;
  }

  .embed-field-inline.checkbox-field {
    margin-top: 0 !important;
    justify-content: flex-start !important;
  }

  .embed-editor-panel > .section-heading-row .button-row,
  .embed-editor-panel > .section-heading-row .button-row-inline {
    justify-content: flex-start !important;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.public-landing) .sidebar {
    position: static;
    max-height: none;
  }

  body:not(.public-landing) .main-content {
    width: 100%;
  }

  .embed-preview,
  .discord-embed-preview {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Phase V4.5 — Réponses automatiques multi-messages */
.auto-response-messages-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(2, 6, 23, .22);
}

.auto-response-messages-editor {
  display: grid;
  gap: 14px;
}

.auto-response-message-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(124, 156, 255, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .45);
}

.auto-response-message-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auto-response-block-grid {
  gap: 12px;
}

.auto-response-embed-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.auto-response-embed-field-row {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) minmax(220px, 1.2fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(0, 0, 0, .14);
}

@media (max-width: 900px) {
  .auto-response-embed-field-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* Phase V4.5.1 — Réponses automatiques : éditeur embed harmonisé */
.auto-response-embed-editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.auto-response-embed-editor-grid > .auto-response-wide-field,
.auto-response-embed-editor-grid > .auto-response-embed-fields,
.auto-response-embed-editor-grid > .auto-response-media-grid,
.auto-response-embed-editor-grid > .auto-response-color-footer-grid {
  grid-column: 1 / -1;
  min-width: 0;
}

.auto-response-embed-editor-grid .emoji-input-wrap,
.auto-response-embed-editor-grid .field,
.auto-response-embed-editor-grid input,
.auto-response-embed-editor-grid textarea {
  min-width: 0;
  max-width: 100%;
}

.auto-response-embed-fields-list {
  display: grid;
  gap: 12px;
}

.auto-response-embed-field-row {
  min-width: 0;
}

.auto-response-embed-field-row .embed-field-row-grid {
  grid-template-columns: minmax(130px, .8fr) minmax(220px, 1.25fr) minmax(110px, auto);
  align-items: start;
}

.auto-response-embed-field-row .embed-field-inline {
  margin-top: 24px !important;
}

.auto-response-embed-field-row .embed-field-value-textarea {
  min-height: 44px;
  max-height: 220px;
  resize: vertical;
}

.auto-response-media-grid {
  grid-template-columns: minmax(0, 1fr);
}

.auto-response-embed-image-uploader {
  max-width: 100%;
}

.auto-response-embed-image-uploader[data-embed-image-kind="thumbnail"] {
  max-width: 360px;
}

.auto-response-color-footer-grid {
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr);
}

.auto-response-embed-color-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.auto-response-embed-color-control input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 14px;
}

.auto-response-embed-color-control input[type="text"] {
  min-width: 0;
}

@media (max-width: 980px) {
  .auto-response-embed-editor-grid,
  .auto-response-color-footer-grid,
  .auto-response-embed-field-row .embed-field-row-grid {
    grid-template-columns: 1fr;
  }

  .auto-response-embed-field-row .embed-field-inline {
    margin-top: 0 !important;
  }

  .auto-response-embed-image-uploader[data-embed-image-kind="thumbnail"] {
    max-width: none;
  }
}


/* Phase V4.5.2 — Réponses automatiques : champs embed responsive */
.auto-response-message-block,
.auto-response-messages-editor,
.auto-response-embed-fields,
.auto-response-embed-fields-list,
.auto-response-embed-field-row,
.auto-response-embed-field-row .embed-field-row-grid {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.auto-response-embed-fields .section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.auto-response-embed-fields .section-heading-row .button {
  max-width: 100%;
  white-space: normal;
}

.auto-response-embed-field-row {
  overflow: hidden;
}

.auto-response-embed-field-row .embed-field-row-grid {
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
}

.auto-response-embed-field-row .embed-field-row-grid > .field,
.auto-response-embed-field-row .embed-field-row-grid > .checkbox-field {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.auto-response-embed-field-row .emoji-input-wrap,
.auto-response-embed-field-row input:not([type="checkbox"]),
.auto-response-embed-field-row textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.auto-response-embed-field-row .embed-field-inline.checkbox-field {
  width: min(220px, 100%) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  justify-content: flex-start !important;
}

/* Phase V4.5.4 — aperçu flottant + listes au-dessus des éditeurs */
.embeds-layout {
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
}

.embed-editor-grid {
  grid-template-columns: 1fr !important;
  gap: 14px;
}

.embed-editor-form,
.embed-editor-state-inline {
  width: 100%;
  max-width: none;
}

#embed-preview.hidden {
  display: none !important;
}

.dashboard-preview-card {
  width: min(940px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  overflow: hidden;
  padding: 0;
}

.dashboard-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.dashboard-preview-heading h3 {
  margin: 4px 0 0;
}

.dashboard-preview-content {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
  max-height: calc(min(86vh, 900px) - 92px);
  overflow: auto;
}

.dashboard-preview-content .embed-preview-content,
.dashboard-preview-content .discord-embed-preview,
.dashboard-preview-content .auto-response-preview-text {
  max-width: 680px;
}

.auto-response-preview-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .36);
}

.auto-response-preview-block h4 {
  margin: 0;
  color: #edf4ff;
  font-size: .95rem;
}

.auto-response-preview-text {
  padding: 12px 14px;
  border-radius: 14px;
  background: #313338;
  color: #f2f3f5;
  line-height: 1.5;
  white-space: pre-wrap;
}

.auto-response-preview-note {
  margin: 0;
}

/* Phase V4.5.5 — listes alignées */
.embed-list-main {
  align-items: center;
}

.embed-list-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  flex: 0 0 auto;
}

.embed-list-status-actions .pill {
  margin-right: 2px;
}

.embed-list-status-actions .embed-order-button {
  width: 38px;
  min-width: 38px;
  padding-left: 0;
  padding-right: 0;
}

.embed-list-actions {
  justify-content: flex-end;
}

.embed-list-actions .embed-order-button {
  display: none !important;
}

@media (max-width: 720px) {
  .embed-list-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .embed-list-status-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .embed-list-actions {
    justify-content: flex-start;
  }
}

/* Phase V0.6 — Boîte MP superadmin */
.global-bot-dms-card {
  display: grid;
  gap: 18px;
}

.bot-dm-inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.bot-dm-conversation-panel,
.bot-dm-thread-panel {
  min-width: 0;
}

.bot-dm-conversation-list,
.bot-dm-message-list {
  display: grid;
  gap: 10px;
}

.bot-dm-conversation-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.bot-dm-conversation-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  color: #edf4ff;
  text-align: left;
  cursor: pointer;
}

.bot-dm-conversation-card:hover,
.bot-dm-conversation-card.active {
  border-color: rgba(124, 156, 255, 0.62);
  background: rgba(30, 41, 69, 0.72);
}

.bot-dm-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  background: rgba(124, 156, 255, 0.18);
  color: #eef4ff;
  font-weight: 900;
  flex: 0 0 auto;
}

.bot-dm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bot-dm-conversation-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.bot-dm-conversation-copy strong,
.bot-dm-conversation-copy small,
.bot-dm-conversation-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dm-conversation-copy small,
.bot-dm-conversation-copy span {
  color: var(--muted);
}

.bot-dm-thread-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.bot-dm-thread-header {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.50);
}

.bot-dm-thread-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bot-dm-thread-user div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bot-dm-thread-user small {
  color: var(--muted);
}

.bot-dm-message-list {
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
}

.bot-dm-message {
  max-width: min(78%, 720px);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.bot-dm-message.outgoing {
  justify-self: end;
  border-color: rgba(124, 156, 255, 0.38);
  background: rgba(42, 58, 102, 0.62);
}

.bot-dm-message.failed {
  border-color: rgba(251, 113, 133, 0.55);
}

.bot-dm-message p {
  margin: 0;
  color: #edf4ff;
  line-height: 1.5;
  word-break: break-word;
}

.bot-dm-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.bot-dm-message-meta strong {
  color: #eef4ff;
}

.bot-dm-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bot-dm-attachments a,
.bot-dm-attachments span {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.16);
  color: #cfe0ff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dm-error {
  color: #ffb4c1 !important;
}

.bot-dm-reply-box {
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .bot-dm-inbox-layout {
    grid-template-columns: 1fr;
  }
  .bot-dm-message {
    max-width: 100%;
  }
}

/* Phase V0.6.1 — pastilles MP superadmin */
body:not(.public-landing) .brand-mark-button {
  position: relative;
}

.brand-notification-badge,
.tab-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4d6d;
  color: #fff;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(255, 77, 109, .38);
}

.brand-notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  border: 2px solid #07101f;
}

.dashboard-tab .tab-notification-badge {
  margin-left: 8px;
}

.brand-notification-badge.hidden,
.tab-notification-badge.hidden {
  display: none;
}


/* Phase V0.6.1.1 — pastille MP superadmin au-dessus du cadre */
body:not(.public-landing) .brand-mark-button {
  overflow: visible !important;
  isolation: isolate;
}

body:not(.public-landing) .brand-mark-button img {
  border-radius: 18px;
}

.brand-notification-badge {
  z-index: 50;
  top: -8px;
  right: -8px;
  pointer-events: none;
}

/* Phase V0.6.2 — Arrivées / Départs */
.member-lifecycle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(150px, .55fr));
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.member-lifecycle-events-panel {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.member-lifecycle-events-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.member-lifecycle-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 156, 255, .22);
  border-radius: 18px;
  background: rgba(5, 12, 24, .52);
}

.member-lifecycle-event-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.member-lifecycle-event-main span,
.member-lifecycle-event-main small,
.member-lifecycle-event-side small {
  color: var(--muted);
}

.member-lifecycle-event-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .member-lifecycle-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .member-lifecycle-grid,
  .member-lifecycle-event {
    grid-template-columns: 1fr;
  }
  .member-lifecycle-event {
    display: grid;
  }
  .member-lifecycle-event-side {
    justify-items: start;
  }
}

/* Phase V0.6.2.1 — Arrivées / Départs : snapshot + UI lisible */
.member-lifecycle-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .72fr) minmax(220px, .6fr);
  gap: 16px;
  margin-top: 22px;
  align-items: stretch;
}

.member-lifecycle-setting-card,
.member-lifecycle-snapshot-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(126, 156, 255, .20);
  border-radius: 20px;
  background: rgba(5, 12, 24, .42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.member-lifecycle-setting-card-main {
  display: grid;
  gap: 10px;
}

.member-lifecycle-setting-card h4,
.member-lifecycle-snapshot-card h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: .98rem;
}

.member-lifecycle-setting-card .field {
  margin: 0;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(9, 18, 32, .62);
  color: var(--text);
  font-weight: 800;
}

.toggle-line input {
  width: 16px;
  height: 16px;
  accent-color: #8aa2ff;
}

.form-hint {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: .92rem;
}

.member-lifecycle-snapshot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.member-lifecycle-snapshot-info {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 156, 255, .26);
  background: rgba(126, 156, 255, .12);
  color: #d9e4ff;
  font-weight: 800;
  white-space: nowrap;
}

.member-lifecycle-card .save-state {
  margin-top: 14px;
}

.member-lifecycle-event {
  background: linear-gradient(145deg, rgba(9, 18, 32, .72), rgba(5, 12, 24, .50));
}

@media (max-width: 1180px) {
  .member-lifecycle-settings-grid {
    grid-template-columns: 1fr;
  }
  .member-lifecycle-snapshot-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .member-lifecycle-snapshot-info {
    white-space: normal;
  }
}


/* Phase V0.6.2.2 — Arrivées / Départs : DA alignée */
.member-lifecycle-card .eyebrow.field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.member-lifecycle-card .member-lifecycle-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .65fr) minmax(180px, .65fr) minmax(170px, .55fr);
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

.member-lifecycle-channel-field {
  margin: 0;
}

.member-lifecycle-toggle {
  min-height: 62px;
  margin: 0;
  align-items: center;
}

.member-lifecycle-card .compact-field {
  margin: 0;
}

.member-lifecycle-snapshot-card,
.member-lifecycle-setting-card {
  display: none !important;
}

.member-lifecycle-events-panel {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.member-lifecycle-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 156, 255, .22);
  border-radius: 18px;
  background: rgba(5, 12, 24, .52);
}

.member-lifecycle-event-main small {
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .member-lifecycle-card .member-lifecycle-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .member-lifecycle-card .member-lifecycle-grid,
  .member-lifecycle-event {
    grid-template-columns: 1fr;
  }
  .member-lifecycle-event {
    display: grid;
  }
  .member-lifecycle-event-side {
    justify-items: start;
  }
}

/* Phase V0.6.3 — Arrivées / Départs : onglets et DA commune */
.member-lifecycle-card .member-lifecycle-subtabs {
  margin: 18px 0 18px;
}

.member-lifecycle-subtab-section.hidden {
  display: none !important;
}

.member-lifecycle-settings-panel {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1.2fr) minmax(180px, .36fr);
  gap: 14px;
  align-items: end;
  margin-top: 4px;
}

.member-lifecycle-settings-panel .field,
.member-lifecycle-settings-panel .checkbox-field {
  margin: 0;
}

.member-lifecycle-primary-toggle {
  min-height: 60px;
  justify-content: flex-start;
}

.member-lifecycle-card .save-state {
  margin-top: 18px;
}

.member-lifecycle-events-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

@media (max-width: 1180px) {
  .member-lifecycle-settings-panel {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.6.4 — Arrivées / Départs : bienvenue, départ et journal clarifiés */
.member-lifecycle-tab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 18px;
  align-items: start;
}

.member-lifecycle-settings-panel.member-lifecycle-settings-panel-stacked {
  grid-template-columns: 1fr;
  padding: 18px;
  border: 1px solid rgba(126, 156, 255, .18);
  border-radius: 22px;
  background: rgba(5, 12, 24, .40);
}

.member-lifecycle-preview-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(126, 156, 255, .18);
  border-radius: 22px;
  background: rgba(5, 12, 24, .40);
}

.compact-heading-row {
  margin-bottom: 12px;
}

.compact-heading-row h4 {
  margin: 0 0 4px;
}

.member-lifecycle-journal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-lifecycle-message-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 156, 255, .14);
  border-radius: 16px;
  background: rgba(8, 15, 30, .42);
}

.member-lifecycle-public-preview-stack {
  display: grid;
  gap: 14px;
}

.member-lifecycle-preview-block {
  display: grid;
  gap: 8px;
}

.member-lifecycle-preview-label {
  margin: 0;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #c7d2fe;
  text-transform: uppercase;
}

.member-lifecycle-preview-text {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(15, 23, 42, .74);
  color: var(--text);
  line-height: 1.55;
}

.checkbox-field.compact-checkbox {
  margin-top: 4px;
}

.member-public-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 128, 35, .36);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 128, 35, .32), transparent 34%),
    linear-gradient(135deg, rgba(17, 24, 39, .96), rgba(72, 21, 8, .86));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.member-public-card-departure {
  border-color: rgba(255, 107, 138, .32);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 107, 138, .26), transparent 34%),
    linear-gradient(135deg, rgba(17, 24, 39, .96), rgba(58, 15, 34, .86));
}

.member-public-card-glow {
  position: absolute;
  inset: auto -20px -58px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(255, 128, 35, .22);
  filter: blur(20px);
}

.member-public-avatar {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 999px;
  border: 4px solid #ff8a2b;
  background: rgba(15, 23, 42, .85);
  color: #dbeafe;
  font-size: 2.2rem;
}

.member-public-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-public-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  color: #ffd1a3;
}

.member-public-text strong {
  color: #ff9b36;
  font-size: 1.08rem;
  letter-spacing: .01em;
}

.member-public-text span {
  color: #f7b66d;
  font-weight: 800;
}

.member-journal-preview {
  display: grid;
  gap: 12px;
}

.member-journal-preview-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .72);
  border-left: 4px solid #55d98d;
}

.member-journal-preview-card.leave-preview {
  border-left-color: #ff6b8a;
}

.member-journal-preview-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
}

.member-journal-preview-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.member-journal-preview-card dt {
  color: #dbeafe;
  font-weight: 900;
}

.member-journal-preview-card dd {
  margin: 2px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .member-lifecycle-tab-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .member-lifecycle-journal-options,
  .member-journal-preview-card dl {
    grid-template-columns: 1fr;
  }
}

/* V0.6.5.1 — macros cliquables Bienvenue / Départ */
.member-lifecycle-macro-help {
  margin-top: 6px;
  gap: 6px;
}
.member-lifecycle-message-builder .member-lifecycle-macro-help {
  padding-top: 2px;
}
.member-lifecycle-macro-help .macro-chip code {
  font-size: .78rem;
}


/* V0.6.6 — Bienvenue / Départ : macros latérales + carte preview stylisée */
.member-lifecycle-preview-panel {
  position: sticky;
  top: 18px;
}

.member-lifecycle-side-macro-help {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(126, 156, 255, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(124, 156, 255, .12), transparent 48%),
    rgba(8, 15, 30, .62);
  display: grid;
  gap: 10px;
}

.member-lifecycle-side-macro-title {
  display: grid;
  gap: 3px;
}

.member-lifecycle-side-macro-title span {
  color: #edf4ff;
  font-size: .88rem;
  font-weight: 900;
}

.member-lifecycle-side-macro-title small {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}

.member-lifecycle-side-macro-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.member-lifecycle-side-macro-help .macro-chip code {
  font-size: .76rem;
}

.member-public-card-v066 {
  min-height: 232px;
  align-items: stretch;
  justify-items: stretch;
  text-align: left;
  border-radius: 24px;
  border: 1px solid rgba(157, 180, 255, .24);
  background:
    radial-gradient(circle at 14% 10%, rgba(85, 217, 141, .26), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(124, 156, 255, .30), transparent 40%),
    linear-gradient(145deg, rgba(17, 24, 39, .97), rgba(8, 15, 30, .94));
  box-shadow:
    0 24px 60px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.07);
}

.member-public-card-v066.member-public-card-departure {
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 107, 138, .26), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(124, 156, 255, .24), transparent 40%),
    linear-gradient(145deg, rgba(35, 15, 27, .98), rgba(8, 15, 30, .94));
}

.member-public-card-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 70% 20%, #000 0%, transparent 70%);
  opacity: .42;
}

.member-public-card-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas:
    "avatar copy"
    "meta meta";
  gap: 14px;
  width: 100%;
  padding: 18px;
  align-items: center;
}

.member-public-card-v066 .member-public-avatar {
  grid-area: avatar;
  width: 86px;
  height: 86px;
  margin: 0;
  border: 4px solid rgba(85, 217, 141, .92);
  box-shadow:
    0 16px 34px rgba(0,0,0,.36),
    0 0 0 7px rgba(85, 217, 141, .10);
}

.member-public-card-v066.member-public-card-departure .member-public-avatar {
  border-color: rgba(255, 107, 138, .92);
  box-shadow:
    0 16px 34px rgba(0,0,0,.36),
    0 0 0 7px rgba(255, 107, 138, .10);
}

.member-public-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.member-public-copy strong {
  color: #f8fbff;
  font-size: 1.05rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.member-public-copy span {
  color: #d9e5f8;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.member-public-copy span strong,
.member-lifecycle-preview-text strong,
.embed-preview-description strong,
.embed-preview-title strong {
  color: #ffffff;
  font-weight: 950;
}

.member-public-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
}

.member-public-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  background: rgba(2, 6, 23, .35);
}

.member-public-meta dt {
  color: #c7d2fe;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.member-public-meta dd {
  margin: 3px 0 0;
  color: #f8fafc;
  font-size: .78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .member-lifecycle-preview-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .member-public-card-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "copy"
      "meta";
  }

  .member-public-meta {
    grid-template-columns: 1fr;
  }
}


/* V0.6.7 — cartes Bienvenue / Départ style MEE6-like */
.member-lifecycle-message-builder {
  align-items: start;
}

.member-lifecycle-message-builder .compact-field input[type="color"] {
  width: 100%;
  min-width: 64px;
}

.member-public-card-v067 {
  --member-card-title-color: #FF9D2A;
  --member-card-subtitle-color: #F6C15E;
  --member-card-ring-color: #FF8A2B;
  min-height: 244px;
  border-radius: 18px;
  border: 1px solid rgba(255, 143, 46, .32);
  background: linear-gradient(135deg, rgba(20, 22, 29, .98), rgba(32, 8, 2, .96));
  box-shadow: 0 18px 52px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05);
  isolation: isolate;
}

.member-public-card-v067.member-public-card-departure {
  border-color: rgba(255, 107, 138, .32);
  background: linear-gradient(135deg, rgba(24, 18, 28, .98), rgba(45, 9, 18, .96));
}

.member-public-card-v067 .member-public-card-media,
.member-public-card-v067 .member-public-card-overlay,
.member-public-card-v067 .member-public-card-noise,
.member-public-card-v067 .member-public-card-shell {
  position: absolute;
  inset: 0;
}

.member-public-card-v067 .member-public-card-media {
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 126, 32, .22), transparent 25%),
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.06), transparent 28%),
    linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.08));
  background-size: cover;
  background-position: center;
  opacity: .92;
}

.member-public-card-v067.member-public-card-departure .member-public-card-media {
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 107, 138, .20), transparent 25%),
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.05), transparent 28%),
    linear-gradient(90deg, rgba(0,0,0,.30), rgba(0,0,0,.12));
}

.member-public-card-v067.member-public-card-has-background .member-public-card-media {
  background-image: var(--member-card-bg-image);
  background-size: cover;
  background-position: center;
}

.member-public-card-v067 .member-public-card-overlay {
  background: linear-gradient(90deg, rgba(9, 10, 14, .92) 0%, rgba(14, 7, 3, .64) 48%, rgba(18, 5, 1, .74) 100%);
}

.member-public-card-v067.member-public-card-departure .member-public-card-overlay {
  background: linear-gradient(90deg, rgba(12, 8, 16, .92) 0%, rgba(22, 8, 15, .68) 48%, rgba(36, 6, 13, .78) 100%);
}

.member-public-card-v067 .member-public-card-noise {
  opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.46) .8px, transparent .8px);
  background-size: 14px 14px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 90%);
}

.member-public-card-v067 .member-public-card-shell {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 28px 20px 18px;
  gap: 14px;
}

.member-public-card-v067.member-public-card-one-line .member-public-card-shell {
  padding-top: 46px;
}

.member-public-card-v067.member-public-card-avatar-only .member-public-card-shell {
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.member-public-card-v067 .member-public-avatar-large {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0;
  border: 4px solid var(--member-card-ring-color);
  background: rgba(255,255,255,.94);
  box-shadow: 0 16px 34px rgba(0,0,0,.36), 0 0 0 7px rgba(255, 138, 43, .15);
}

.member-public-card-v067.member-public-card-departure .member-public-avatar-large {
  box-shadow: 0 16px 34px rgba(0,0,0,.36), 0 0 0 7px rgba(255, 107, 138, .16);
}

.member-public-card-v067 .member-public-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 92%;
}

.member-public-card-v067 .member-public-copy:empty {
  display: none;
}

.member-public-card-v067 .member-public-copy strong {
  display: block;
  color: var(--member-card-title-color);
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  overflow-wrap: anywhere;
}

.member-public-card-v067 .member-public-copy span {
  display: block;
  color: var(--member-card-subtitle-color);
  font-size: .96rem;
  line-height: 1.28;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,.30);
  overflow-wrap: anywhere;
}

.member-public-card-v067 .member-public-copy span strong,
.member-public-card-v067 .member-public-copy strong strong {
  color: inherit;
  font-weight: inherit;
}


/* V0.6.8 — import/crop et couleurs cartes Bienvenue / Départ */
.member-lifecycle-message-builder .compact-field input[type="text"][id$="-color-hex-input"] {
  margin-top: 8px;
  width: 100%;
  min-height: 38px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .04em;
}

.member-lifecycle-card-background-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.member-lifecycle-card-background-preview {
  margin-top: 10px;
  min-height: 74px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, .24);
  background: rgba(2, 6, 23, .38);
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 800;
}

.member-lifecycle-card-background-preview.has-image {
  border-style: solid;
  align-items: end;
  justify-items: start;
  min-height: 96px;
  background-size: cover;
  background-position: center;
}

.member-lifecycle-card-background-preview.has-image span {
  width: 100%;
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(2, 6, 23, .78), rgba(2, 6, 23, .22));
  color: #f8fafc;
}

.member-public-card-v067 {
  min-height: 260px;
  aspect-ratio: 1000 / 360;
}

.member-public-card-v067 .member-public-card-shell {
  padding-top: 34px;
}

.member-public-card-v067.member-public-card-one-line .member-public-card-shell {
  padding-top: 56px;
}

.member-public-card-v067 .member-public-avatar-large {
  width: 118px;
  height: 118px;
}

.member-public-card-v067 .member-public-copy strong {
  font-size: 1.18rem;
}

.member-public-card-v067 .member-public-copy span {
  font-size: 1rem;
}


/* Phase V0.6.8.2 — correctif layout, macros contextuelles et import seul */
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-tab-layout,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-tab-layout {
  grid-template-columns: 1fr;
  gap: 18px;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-preview-panel,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-preview-panel {
  order: -1;
  position: static;
  width: 100%;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-settings-panel,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-settings-panel {
  width: 100%;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-public-preview,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-public-preview {
  width: 100%;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-preview-block,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-preview-block {
  width: 100%;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-public-card-v067,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-public-card-v067 {
  width: 100%;
  max-width: 1000px;
  min-height: 320px;
  margin-inline: auto;
}

.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-side-macro-help,
.member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-side-macro-help {
  max-width: 1000px;
  margin-inline: auto;
}

.member-lifecycle-color-control.embed-color-control {
  grid-template-columns: 54px minmax(112px, 180px) !important;
  max-width: 260px;
  width: 100%;
}

.member-lifecycle-color-control.embed-color-control input[type="color"] {
  width: 54px !important;
  min-width: 54px !important;
  height: 44px;
  padding: 4px;
}

.member-lifecycle-color-control.embed-color-control input[type="text"] {
  min-width: 0;
  height: 44px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .member-lifecycle-settings-panel.member-lifecycle-settings-panel-stacked .member-lifecycle-message-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Phase V0.6.8.4 — macros contextuelles compactes sous le champ actif */
.member-lifecycle-side-macro-help {
  display: none !important;
}

.member-lifecycle-field-macro-help {
  display: block;
  margin-top: 8px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}

.member-lifecycle-field-macro-help.is-inactive {
  display: none !important;
}

.member-lifecycle-field-macro-help.active {
  display: block;
}

.member-lifecycle-field-macro-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-lifecycle-field-macro-help .macro-chip code {
  font-size: .75rem;
}

.member-lifecycle-card-background-actions {
  margin-top: 0;
}


/* Phase V0.6.10 — rendu carte homogénéisé preview / Discord */
.member-lifecycle-message-builder textarea[id$="-card-title-input"],
.member-lifecycle-message-builder textarea[id$="-card-subtitle-input"] {
  min-height: 82px;
  resize: vertical;
  line-height: 1.45;
}

.member-public-card-v067 .member-public-card-overlay {
  background: rgba(0, 0, 0, .55);
}

.member-public-card-v067.member-public-card-departure .member-public-card-overlay {
  background: rgba(0, 0, 0, .56);
}

.member-public-card-v067 .member-public-card-shell {
  position: absolute;
  padding-top: 28px;
}

.member-public-content-panel {
  position: absolute;
  z-index: -1;
  left: 14%;
  right: 14%;
  top: 28px;
  bottom: 28px;
  border-radius: 34px;
  background: rgba(2, 6, 23, .46);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 18px 42px rgba(0,0,0,.30);
}

.member-public-card-avatar-only .member-public-content-panel {
  top: 70px;
  bottom: 70px;
}

.member-public-card-panel-disabled .member-public-content-panel {
  display: none;
}

.member-public-card-v067 .member-public-avatar-large {
  border: 5px solid var(--member-card-ring-color);
  background: transparent;
  box-shadow: 0 18px 34px rgba(0,0,0,.36);
}

.member-public-card-v067 .member-public-copy {
  max-width: 82%;
  gap: 10px;
}

.member-public-card-v067 .member-public-card-line {
  display: block;
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.42), 0 0 2px rgba(0,0,0,.85);
  overflow-wrap: anywhere;
  white-space: normal;
}

.member-public-card-v067 .member-public-card-line strong {
  font-weight: 950;
}

.member-public-card-v067 .member-public-card-line em {
  font-style: italic;
}

.member-public-card-v067 .member-public-card-line u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-public-card-v067 .member-public-card-title {
  color: var(--member-card-title-color);
  font-size: 1.2rem;
  line-height: 1.22;
  font-weight: 850;
}

.member-public-card-v067 .member-public-card-subtitle {
  color: var(--member-card-subtitle-color);
  font-size: 1.02rem;
  line-height: 1.24;
  font-weight: 780;
}

.member-public-card-v067 .member-public-copy span,
.member-public-card-v067 .member-public-copy strong {
  color: inherit;
}

.member-public-card-v067.member-public-card-two-lines .member-public-card-shell {
  padding-top: 28px;
}

.member-public-card-v067.member-public-card-one-line .member-public-card-shell {
  padding-top: 52px;
}

.member-public-card-v067.member-public-card-avatar-only .member-public-card-shell {
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.member-public-card-v067.member-public-card-one-line .member-public-copy {
  margin-top: 4px;
}

@media (min-width: 900px) {
  .member-lifecycle-settings-panel.member-lifecycle-settings-panel-stacked .member-lifecycle-message-builder .span-2 {
    grid-column: 1 / -1;
  }
}

.member-public-card-v067 .member-public-card-line strong,
.member-public-card-v067 .member-public-card-line em,
.member-public-card-v067 .member-public-card-line u,
.member-public-card-v067 .member-public-card-line span {
  display: inline;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}


/* Phase V0.6.10.1 — alignement preview carte */
.member-public-card-v067 .member-public-card-shell {
  padding-top: 50px;
  gap: 16px;
}

.member-public-card-v067.member-public-card-two-lines .member-public-card-shell {
  padding-top: 50px;
}

.member-public-card-v067.member-public-card-one-line .member-public-card-shell {
  padding-top: 70px;
}

.member-public-card-v067 .member-public-avatar-large {
  width: 134px;
  height: 134px;
  border-width: 5px;
}

.member-public-card-v067 .member-public-copy {
  max-width: 82%;
  gap: 10px;
}

.member-public-card-v067 .member-public-card-title {
  font-size: 2rem;
  line-height: 1.18;
}

.member-public-card-v067 .member-public-card-subtitle {
  font-size: 1.72rem;
  line-height: 1.18;
}

.member-public-card-v067 .member-public-card-line {
  max-width: 100%;
}

.member-public-card-v067 .member-public-card-line br {
  display: block;
  content: "";
}


.member-lifecycle-range-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-lifecycle-range-control input[type="range"] {
  flex: 1 1 auto;
}

.member-lifecycle-range-output {
  min-width: 56px;
  text-align: right;
  font-weight: 700;
  color: var(--text-secondary, #cdd6f4);
}

.member-lifecycle-card-preview-image-block {
  display: grid;
  gap: 10px;
}

.member-lifecycle-card-preview-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(5, 10, 24, 0.72);
  border: 1px solid rgba(120, 140, 255, 0.18);
  min-height: 180px;
}

.member-lifecycle-card-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.member-lifecycle-card-preview-status {
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
}


/* Phase V0.6.10.4 — correction aperçu réel / fond personnalisé */
.member-lifecycle-card-background-preview {
  width: 100%;
  aspect-ratio: 1000 / 360;
  min-height: 180px;
}

.member-lifecycle-card-background-preview.has-image {
  min-height: 180px;
}

.member-lifecycle-card-preview-status:empty {
  display: none;
}

.member-lifecycle-card-preview-frame {
  aspect-ratio: 1000 / 360;
  min-height: 180px;
}

.member-lifecycle-card-preview-frame img {
  width: 100%;
  aspect-ratio: 1000 / 360;
  object-fit: contain;
}

/* Phase V0.6.10.5 — layout carte avancé */
.member-lifecycle-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 180px) minmax(96px, 120px);
  gap: 12px;
  align-items: start;
}

.member-lifecycle-card-row .member-lifecycle-card-text-field textarea {
  min-height: 72px;
}

.member-lifecycle-card-row .compact-field input[type="number"] {
  width: 100%;
  min-height: 40px;
}

@media (max-width: 900px) {
  .member-lifecycle-card-row {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.6.10.12 — sélecteur de polices recherché stabilisé */
.member-font-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}

.member-font-picker {
  position: relative;
  width: 100%;
}

.member-font-picker-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  background: rgba(15, 23, 42, .78);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.member-font-picker-input:focus {
  border-color: rgba(255, 138, 43, .74);
  box-shadow: 0 0 0 3px rgba(255, 138, 43, .12);
  background: rgba(15, 23, 42, .95);
}

.member-font-picker-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .98);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .42);
}

.member-font-picker.is-open .member-font-picker-list {
  display: grid;
  gap: 3px;
}

.member-font-picker-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.25;
}

.member-font-picker-option:hover,
.member-font-picker-option:focus-visible,
.member-font-picker-option.is-selected {
  background: rgba(255, 138, 43, .14);
  color: #fff7ed;
}

.member-font-picker-empty {
  padding: 10px;
  color: var(--muted);
  font-size: .86rem;
}


/* Phase V0.6.10.14 — ligne compacte réglages carte */
.member-lifecycle-card-appearance-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, .8fr) minmax(190px, .8fr);
  gap: 12px;
  align-items: start;
}

.member-lifecycle-card-appearance-row .member-font-picker {
  min-width: 0;
}

.member-lifecycle-card-appearance-row .member-lifecycle-color-control.embed-color-control {
  max-width: none;
}

@media (max-width: 980px) {
  .member-lifecycle-card-appearance-row {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.6.10.15 — ajustements finaux des cartes Bienvenue / Départ */
.member-lifecycle-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr);
  gap: 12px;
  align-items: end;
}

.member-lifecycle-card-content-panel-row {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: end;
}

.member-lifecycle-card-content-panel-row .checkbox-field,
.member-lifecycle-card-content-panel-row .field {
  margin: 0;
}

.member-lifecycle-card-background-preview {
  position: relative;
  --member-card-bg-opacity: .25;
}

.member-lifecycle-card-background-preview.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--member-card-bg-opacity, .25);
  pointer-events: none;
}

.member-lifecycle-card-background-preview.has-image span {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  .member-lifecycle-top-row,
  .member-lifecycle-card-content-panel-row {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.6.10.16 — finitions fond personnalisé et embeds Arrivées / Départs */
.member-lifecycle-card-background-preview {
  width: 100%;
  aspect-ratio: 1000 / 360;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 138, 43, .72);
  background: #05070d;
  overflow: hidden;
}

.member-lifecycle-card-background-preview.has-image {
  min-height: 0;
  background-image: none !important;
  background-size: cover;
  background-position: center;
}

.member-lifecycle-card-background-preview.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--member-card-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--member-card-bg-opacity, 1);
  pointer-events: none;
}

.member-lifecycle-card-background-preview.has-image span {
  align-self: end;
  justify-self: stretch;
  position: relative;
  z-index: 1;
  width: auto;
}

.member-lifecycle-card-background-actions {
  margin-top: 10px;
}

.member-lifecycle-embed-fields-editor,
.member-lifecycle-embed-media-grid {
  margin-top: 4px;
}


/* Phase V0.6.10.18 — valeurs par défaut et alignement emoji */
.member-lifecycle-card-background-preview.has-image {
  position: relative;
  display: block;
  background: #05070d;
}

.member-lifecycle-card-background-preview.has-image::before {
  z-index: 0;
  border-radius: inherit;
}

.member-lifecycle-card-background-preview.has-image span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  width: auto;
  padding: 8px 10px;
  background: linear-gradient(90deg, rgba(2, 6, 23, .78), rgba(2, 6, 23, .18));
  color: #f8fafc;
  pointer-events: none;
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"] {
  --member-lifecycle-range-progress: 0%;
  flex: 1 1 auto;
  width: 100%;
  min-height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
  outline: none;
  accent-color: unset;
  -webkit-appearance: none;
  appearance: none;
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: linear-gradient(90deg, #9cc8ff 0%, #9cc8ff var(--member-lifecycle-range-progress), rgba(255, 255, 255, .18) var(--member-lifecycle-range-progress), rgba(255, 255, 255, .18) 100%);
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 0;
  border-radius: 999px;
  background: #9cc8ff;
  box-shadow: 0 0 0 3px rgba(156, 200, 255, .18);
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #9cc8ff;
}

body:not(.public-landing) .member-lifecycle-range-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #9cc8ff;
  box-shadow: 0 0 0 3px rgba(156, 200, 255, .18);
}


/* Phase V0.6.10.19 — aperçu fond personnalisé sans contour parasite */
.member-lifecycle-card-background-preview {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.member-lifecycle-card-background-preview.has-image {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Phase V0.6.10.21 — position fine des textes de carte */
.member-lifecycle-card-position-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.member-lifecycle-card-position-row .field {
  margin: 0;
}

.member-lifecycle-position-field .member-lifecycle-range-control {
  gap: 8px;
}

.member-lifecycle-position-field .member-lifecycle-range-output {
  min-width: 46px;
}

@media (max-width: 980px) {
  .member-lifecycle-card-position-row {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.7.1 — shell dashboard progressif */
body:not(.public-landing) .app-shell {
  grid-template-columns: minmax(280px, 328px) minmax(0, 1fr);
  gap: 28px;
  width: min(1560px, 100%);
}

body:not(.public-landing) .sidebar {
  gap: 14px;
  padding: 0;
}

body:not(.public-landing) .auth-panel {
  display: none;
}

body:not(.public-landing) .guild-panel {
  padding: 16px;
}

body:not(.public-landing) .guild-panel .panel-heading,
body:not(.public-landing) .guild-install-copy {
  display: none;
}

body:not(.public-landing) .guild-list {
  display: grid;
  gap: 10px;
}

body:not(.public-landing) .guild-button {
  position: relative;
  min-height: 64px;
  padding: 14px 44px 14px 18px;
  border-radius: 22px;
  text-align: left;
}

body:not(.public-landing) .guild-button::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: #b5c4de;
  font-size: 1.05rem;
}

body:not(.public-landing) .guild-install-button {
  margin-top: 10px;
  width: 100%;
}

body:not(.public-landing) .dashboard-tabs {
  display: none !important;
}

.dashboard-sidebar-nav,
.sidebar-footer-stack {
  display: grid;
  gap: 14px;
}

.dashboard-nav-group {
  display: grid;
  gap: 6px;
}

.dashboard-nav-group h2 {
  margin: 14px 12px 6px;
  color: #96a7c7;
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.dashboard-nav-link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #b7c4dc;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-nav-link > span:first-child {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #9fb2d8;
  font-size: 1rem;
}

.dashboard-nav-link:hover:not(:disabled),
.dashboard-nav-link:focus-visible:not(:disabled) {
  color: #eef4ff;
  border-color: rgba(126, 154, 255, .30);
  background: rgba(124, 156, 255, .08);
  outline: none;
}

.dashboard-nav-link.active {
  color: #dbe7ff;
  border-color: rgba(124, 156, 255, .48);
  background: linear-gradient(135deg, rgba(124, 156, 255, .26), rgba(124, 156, 255, .10));
  box-shadow: inset 3px 0 0 #7c9cff, 0 14px 32px rgba(38, 67, 160, .14);
}

.dashboard-nav-link-disabled {
  cursor: not-allowed;
  opacity: .55;
}

.sidebar-footer-stack {
  margin-top: 12px;
}

.sidebar-help-card,
.sidebar-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(157, 180, 255, .17);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  color: inherit;
  text-decoration: none;
}

.sidebar-help-card strong,
.sidebar-user-card strong {
  display: block;
  color: #eef4ff;
  font-size: .92rem;
}

.sidebar-help-card small,
.sidebar-user-card small {
  display: block;
  margin-top: 3px;
  color: #aebed8;
  font-size: .78rem;
  line-height: 1.35;
}

.sidebar-help-icon,
.sidebar-user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(157, 180, 255, .25);
  background: rgba(124, 156, 255, .13);
  color: #dbe6ff;
  font-weight: 900;
}

.sidebar-user-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.modules-hub-card {
  display: grid;
  gap: 22px;
}

.modules-hub-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.modules-hub-hero h3 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.04em;
}

.modules-hub-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modules-hub-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.modules-hub-kpis .kpi {
  min-height: 86px;
  padding: 18px;
  border: 1px solid rgba(157, 180, 255, .17);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
}

.modules-hub-kpis .kpi strong {
  display: block;
  margin-bottom: 4px;
  color: #eef4ff;
  font-size: 1.35rem;
}

.modules-hub-grid {
  display: grid;
  gap: 26px;
}

.module-hub-section {
  display: grid;
  gap: 14px;
}

.module-hub-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
}

.module-hub-section-heading h4 {
  margin: 0 0 4px;
  color: #f2f6ff;
  font-size: 1.25rem;
}

.module-hub-section-heading p {
  color: #aebed8;
  font-size: .92rem;
}

.module-hub-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-hub-section:nth-child(2) .module-hub-card-grid,
.module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-hub-tile {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 16px;
  min-height: 188px;
  padding: 18px;
  border: 1px solid rgba(157, 180, 255, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 156, 255, .14), transparent 44%),
    rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.module-hub-tile.is-disabled {
  opacity: .72;
}

.module-hub-tile-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.module-hub-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 18px;
  background: rgba(124, 156, 255, .15);
  color: #dce6ff;
  font-size: 1.2rem;
}

.module-hub-tile h5 {
  margin: 5px 0 6px;
  color: #f2f6ff;
  font-size: 1.02rem;
}

.module-hub-tile p {
  color: #aebed8;
  font-size: .86rem;
  line-height: 1.35;
}

.module-hub-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-hub-configure {
  width: 100%;
  min-height: 42px;
}

@media (max-width: 1260px) {
  .module-hub-card-grid,
  .module-hub-section:nth-child(2) .module-hub-card-grid,
  .module-hub-section:nth-child(3) .module-hub-card-grid,
  .modules-hub-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .modules-hub-hero {
    flex-direction: column;
  }
  .modules-hub-actions,
  .modules-hub-actions .button {
    width: 100%;
  }
  .modules-hub-kpis,
  .module-hub-card-grid,
  .module-hub-section:nth-child(2) .module-hub-card-grid,
  .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase V0.7.1 — sidebar compacte, sélecteur serveur et hub modules affiné */
body:not(.public-landing) .app-shell {
  grid-template-columns: minmax(260px, 296px) minmax(0, 1fr);
  gap: 28px;
  width: min(1500px, 100%);
}

body:not(.public-landing) .sidebar {
  max-height: none;
  overflow: visible;
  scrollbar-width: none;
}

body:not(.public-landing) .sidebar::-webkit-scrollbar {
  display: none;
}

body:not(.public-landing) .brand {
  padding: 16px;
  border-radius: 24px;
  gap: 12px;
}

body:not(.public-landing) .brand h1 {
  font-size: 1.34rem;
  letter-spacing: -.03em;
}

body:not(.public-landing) .brand-kicker-row {
  gap: 7px;
}

body:not(.public-landing) .brand-kicker-row .eyebrow {
  font-size: .66rem;
  letter-spacing: .17em;
}

body:not(.public-landing) .brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 18px;
}

body:not(.public-landing) .phase-link {
  min-height: 22px;
  padding: 4px 7px;
  font-size: .58rem;
  border-radius: 999px;
  white-space: nowrap;
}

body:not(.public-landing) .guild-panel {
  position: relative;
  padding: 12px;
  border-radius: 24px;
}

body:not(.public-landing) .guild-list {
  position: relative;
  display: block;
}

body:not(.public-landing) .guild-list-empty {
  display: none;
}

body:not(.public-landing) .guild-button {
  width: 100%;
  min-height: 58px;
  padding: 12px 42px 12px 14px;
  border-radius: 18px;
}

body:not(.public-landing) .guild-button strong {
  font-size: .88rem;
  line-height: 1.15;
}

body:not(.public-landing) .guild-button span:not(.guild-premium-crown) {
  font-size: .70rem;
  line-height: 1.25;
}

body:not(.public-landing) .guild-selector-current::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #b5c4de;
  font-size: .92rem;
}

body:not(.public-landing) .guild-selector.open .guild-selector-current::after {
  content: "⌃";
}

body:not(.public-landing) .guild-selector-option::after,
body:not(.public-landing) .guild-selector-menu .guild-button::after {
  display: none;
}

body:not(.public-landing) .guild-selector-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 35;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(157, 180, 255, .24);
  border-radius: 22px;
  background: rgba(8, 16, 29, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .045);
  backdrop-filter: blur(18px);
}

body:not(.public-landing) .guild-selector-empty {
  margin: 4px 6px;
  font-size: .76rem;
}

body:not(.public-landing) .guild-selector-install {
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  font-size: .82rem;
}

body:not(.public-landing) .guild-install-button.hidden {
  display: none !important;
}

body:not(.public-landing) .guild-premium-crown {
  width: 22px;
  height: 22px;
  top: 10px;
  right: 11px;
  font-size: .72rem;
}

.dashboard-sidebar-nav {
  gap: 16px;
  padding: 4px 2px;
}

.dashboard-nav-group {
  gap: 4px;
}

.dashboard-nav-group h2 {
  margin: 12px 10px 5px;
  font-size: .66rem;
  letter-spacing: .16em;
}

.dashboard-nav-link {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: .88rem;
}

.dashboard-nav-link.active {
  background: linear-gradient(135deg, rgba(124, 156, 255, .18), rgba(124, 156, 255, .075));
  box-shadow: inset 2px 0 0 #7c9cff;
}

.dashboard-nav-link .premium-crown-badge,
.module-hub-tile h5 .premium-crown-badge {
  width: 18px;
  height: 18px;
  margin-left: 5px;
  font-size: .64rem;
  transform: translateY(-1px);
}

.sidebar-footer-stack {
  gap: 10px;
  margin-top: 8px;
}

.sidebar-help-card,
.sidebar-user-card {
  padding: 12px;
  border-radius: 20px;
}

.sidebar-help-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.sidebar-user-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.sidebar-user-avatar {
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  background: radial-gradient(circle at 25% 25%, rgba(124,156,255,.24), rgba(124,156,255,.08));
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-logout-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(157, 180, 255, .22);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #cbd8f3;
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
}

.sidebar-logout-button:hover,
.sidebar-logout-button:focus-visible {
  border-color: rgba(255, 127, 138, .42);
  color: #ffd6db;
  background: rgba(255, 127, 138, .10);
  outline: none;
}

.modules-hub-card {
  padding: clamp(22px, 2.3vw, 32px);
  border-radius: 30px;
}

.modules-hub-hero h3 {
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  line-height: .95;
}

.modules-hub-actions .pill {
  min-height: 36px;
  padding-inline: 16px;
}

.modules-hub-kpis {
  gap: 14px;
}

.modules-hub-kpis .kpi {
  min-height: 72px;
  padding: 15px 17px;
  border-radius: 18px;
}

.modules-hub-kpis .kpi strong {
  font-size: 1.28rem;
}

.modules-hub-kpis .kpi.kpi-locked strong {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 209, 102, .30);
  border-radius: 999px;
  background: rgba(255, 209, 102, .10);
  color: #ffe4a0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.module-hub-card-grid,
.module-hub-section:nth-child(2) .module-hub-card-grid,
.module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
}

.module-hub-tile {
  min-height: 174px;
  padding: 17px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 14% 0%, rgba(124, 156, 255, .13), transparent 42%),
    linear-gradient(145deg, rgba(18, 31, 52, .76), rgba(8, 16, 29, .66));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 42px rgba(0,0,0,.18);
}

.module-hub-icon {
  width: 46px;
  height: 46px;
  border-radius: 17px;
}

.module-hub-configure {
  min-height: 40px;
  border-radius: 15px;
}


/* Phase V0.7.1.1 — correctif sélection serveur + défilement sidebar */
body:not(.public-landing) .sidebar {
  position: static;
  max-height: none;
  overflow: visible;
  min-height: calc(100vh - 48px);
}

body:not(.public-landing) .guild-panel {
  z-index: 80;
}

body:not(.public-landing) .guild-selector-current {
  cursor: pointer;
}

body:not(.public-landing) .guild-selector-current:focus-visible {
  outline: none;
  border-color: rgba(157, 180, 255, .62);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, .18), inset 0 1px 0 rgba(255,255,255,.06);
}

body:not(.public-landing) .guild-selector-menu {
  position: static;
  margin-top: 10px;
  z-index: auto;
  max-height: none;
  overflow: visible;
}

body:not(.public-landing) .sidebar-footer-stack {
  margin-top: 12px;
}

body:not(.public-landing) .sidebar-user-card {
  align-items: center;
}

body:not(.public-landing) .sidebar-logout-button.hidden {
  display: none !important;
}

@media (min-width: 761px) {
  body:not(.public-landing) .app-shell {
    align-items: start;
  }
}

/* Phase V0.7.1.3 — cohérence Premium et sidebar repliable */
body:not(.public-landing) .sidebar .dashboard-nav-link[data-premium-feature] {
  cursor: pointer;
}

body:not(.public-landing) .sidebar .dashboard-nav-link[data-premium-feature].premium-locked {
  opacity: 1;
}

.sidebar-collapse-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(157, 180, 255, .24);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  color: #dce7ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus-visible {
  border-color: rgba(124, 156, 255, .55);
  background: rgba(124, 156, 255, .14);
  outline: none;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 24px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  align-items: stretch;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand {
  justify-content: center;
  padding: 12px 8px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-copy,
body.dashboard-sidebar-collapsed:not(.public-landing) .auth-panel,
body.dashboard-sidebar-collapsed:not(.public-landing) .guild-panel,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group h2,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link span:not(:first-child),
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card span:not(.sidebar-help-icon),
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card > span:not(.sidebar-user-avatar),
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-logout-button {
  display: none !important;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark {
  width: 48px;
  height: 48px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  z-index: 5;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-sidebar-nav {
  margin-top: 42px;
  gap: 8px;
  padding-inline: 0;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group {
  align-items: center;
  gap: 7px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link {
  justify-content: center;
  width: 52px;
  min-height: 46px;
  margin-inline: auto;
  padding: 0;
  border-radius: 17px;
  font-size: 1rem;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link.active {
  box-shadow: inset 0 -2px 0 #7c9cff, 0 10px 22px rgba(0, 0, 0, .22);
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link .premium-crown-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 15px;
  height: 15px;
  margin: 0;
  font-size: .52rem;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-footer-stack {
  align-items: center;
  margin-top: 10px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card {
  display: grid;
  place-items: center;
  width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 18px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-avatar,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-icon {
  margin: 0;
}

@media (max-width: 900px) {
  body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
    grid-template-columns: 1fr;
  }
  body.dashboard-sidebar-collapsed:not(.public-landing) .brand-copy,
  body.dashboard-sidebar-collapsed:not(.public-landing) .auth-panel,
  body.dashboard-sidebar-collapsed:not(.public-landing) .guild-panel,
  body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group h2,
  body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link span:not(:first-child),
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card span:not(.sidebar-help-icon),
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card > span:not(.sidebar-user-avatar),
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-logout-button {
    display: initial !important;
  }
}

/* Phase V0.7.1.4 — alignement strict de la sidebar réduite */
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  display: grid;
  justify-items: center;
  align-items: start;
  width: 86px;
  padding-inline: 0;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-sidebar-nav,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-footer-stack {
  width: 100%;
  justify-items: center;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  margin-inline: auto;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark {
  display: grid;
  place-items: center;
  margin: 0 auto;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark img,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-avatar img {
  display: block;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  display: grid;
  place-items: center;
  line-height: 1;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  align-items: center;
  justify-items: center;
  width: 50px;
  height: 50px;
  min-height: 50px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  line-height: 1;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link > span:first-child {
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  line-height: 1;
  font-size: 1.02rem;
  text-align: center;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link > span:first-child svg,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link > span:first-child img {
  display: block;
  width: 1.12em;
  height: 1.12em;
  margin: auto;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link .premium-crown-badge {
  display: grid !important;
  place-items: center;
  line-height: 1;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  align-items: center;
  justify-items: center;
  width: 50px;
  height: 50px;
  min-height: 50px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  line-height: 1;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-icon,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-avatar {
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  line-height: 1;
  text-align: center;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-icon {
  font-size: 1rem;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-avatar {
  overflow: hidden;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link::before {
  pointer-events: none;
}

/* Phase V0.7.1.5 — sidebar réduite compacte + tooltips */
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 86px;
  min-height: auto;
  padding-block: 14px;
  overflow: visible;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand {
  width: 100%;
  margin: 0;
  padding: 0 0 4px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin: 2px auto 6px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 0;
  padding: 0;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group + .dashboard-nav-group {
  margin-top: 4px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-footer-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  overflow: visible;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 250;
  display: block;
  width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid rgba(157, 180, 255, .24);
  border-radius: 11px;
  background: rgba(7, 13, 24, .96);
  color: #eef4ff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .045);
  font-size: .74rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .01em;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .14s ease, transform .14s ease;
  white-space: nowrap;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle::before {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  z-index: 251;
  width: 8px;
  height: 8px;
  border-left: 1px solid rgba(157, 180, 255, .24);
  border-bottom: 1px solid rgba(157, 180, 255, .24);
  background: rgba(7, 13, 24, .96);
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%) rotate(45deg);
  transition: opacity .14s ease, transform .14s ease;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:hover::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:focus-visible::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:focus-visible::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:hover::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:focus-visible::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:focus-visible::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:hover::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:focus-within::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:focus-within::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:hover::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:focus-visible::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%) rotate(0deg);
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link:focus-visible::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card:focus-visible::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card:focus-within::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:hover::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle:focus-visible::before {
  transform: translate(0, -50%) rotate(45deg);
}
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  position: relative;
}


/* Phase V0.7.1.6 — tooltips sidebar réduite au-dessus du contenu, sans tooltip natif */
body:not(.public-landing) .app-shell {
  overflow: visible;
}

body:not(.public-landing) .main-content {
  position: relative;
  z-index: 1;
}

body:not(.public-landing) .sidebar {
  position: sticky;
  z-index: 1200;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  z-index: 2200;
  isolation: isolate;
  overflow: visible;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card::after,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle::after {
  z-index: 6000;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card::before,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle::before {
  z-index: 6001;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .premium-crown-badge {
  pointer-events: none;
}

/* Phase V0.7.2 — état de navigation hors vue serveur */
body:not(.public-landing) .brand-mark-button.active {
  border-color: rgba(157, 180, 255, 0.72);
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.34), rgba(124, 156, 255, 0.13));
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.14), 0 18px 40px rgba(76, 105, 255, 0.16);
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark-button.active {
  border-color: rgba(157, 180, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 156, 255, 0.16), 0 16px 34px rgba(76, 105, 255, 0.18);
}

/* Phase V0.7.2.2 — page Modules plus proche du mockup */
body.dashboard-tab-modules:not(.public-landing) #guild-summary-card {
  display: none;
}

body.dashboard-tab-modules:not(.public-landing) .dashboard-tabs {
  display: none;
}

body.dashboard-tab-modules:not(.public-landing) .dashboard-grid {
  gap: 0;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  position: relative;
  overflow: hidden;
  gap: 30px;
  padding: clamp(24px, 3vw, 38px);
  border-color: rgba(157, 180, 255, .16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 156, 255, .22), transparent 42%),
    radial-gradient(circle at 100% 12%, rgba(90, 77, 255, .13), transparent 42%),
    linear-gradient(145deg, rgba(13, 23, 42, .96), rgba(6, 13, 26, .96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .045);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.045), transparent 22%, transparent 76%, rgba(124,156,255,.05));
  opacity: .75;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card > * {
  position: relative;
  z-index: 1;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-hero {
  align-items: center;
  padding: 0 2px 4px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-hero .eyebrow {
  margin-bottom: 8px;
  color: #9fb4ff;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-hero h3 {
  margin: 0 0 8px;
  font-size: clamp(2.45rem, 5vw, 4.1rem);
  line-height: .95;
  letter-spacing: -.065em;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-hero .muted {
  max-width: 680px;
  color: #b8c7e4;
  font-size: 1rem;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-actions {
  align-items: center;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-actions .pill {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .01em;
}

body.dashboard-tab-modules:not(.public-landing) #modules-hub-save-button.hidden,
body.dashboard-tab-modules:not(.public-landing) #modules-hub-save-state.hidden {
  display: none !important;
}

body.dashboard-tab-modules:not(.public-landing) #modules-hub-save-button:not(.hidden) {
  position: sticky;
  top: 18px;
  z-index: 5;
  box-shadow: 0 16px 32px rgba(124, 156, 255, .22);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.modules-hub-kpi-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(157, 180, 255, .15);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.modules-hub-kpi-card.is-locked {
  background:
    linear-gradient(145deg, rgba(255,255,255,.036), rgba(255,255,255,.016));
}

.modules-hub-kpi-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 18px;
  background: rgba(124, 156, 255, .14);
  color: #dfe8ff;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.modules-hub-kpi-card strong {
  display: block;
  color: #eef4ff;
  font-size: 1.35rem;
  line-height: 1.1;
}

.modules-hub-kpi-card span:last-child {
  display: block;
  margin-top: 5px;
  color: #aebed8;
  font-size: .86rem;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-grid {
  gap: 34px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section {
  gap: 16px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading {
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.module-hub-section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  border: 1px solid rgba(157, 180, 255, .14);
  background: rgba(124, 156, 255, .11);
  line-height: 1;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading h4 {
  margin: 0 0 3px;
  font-size: 1.28rem;
  letter-spacing: -.02em;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading p {
  color: #aebed8;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  max-width: 760px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 18px;
  border-color: rgba(157, 180, 255, .14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 156, 255, .18), transparent 46%),
    linear-gradient(145deg, rgba(255,255,255,.048), rgba(255,255,255,.022));
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 180, 255, .28);
  box-shadow: 0 20px 58px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.045);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile.is-premium-locked {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 204, 112, .10), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.042), rgba(255,255,255,.018));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
  align-items: start;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  width: 52px;
  height: 52px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 50%),
    rgba(124, 156, 255, .15);
  font-size: 1.28rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile h5 {
  margin-top: 3px;
  font-size: 1.08rem;
  letter-spacing: -.015em;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile p {
  color: #aebed8;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta {
  min-height: 34px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta .pill {
  padding: 6px 10px;
  font-size: .73rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure {
  border-radius: 15px;
  background: rgba(124, 156, 255, .09);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure:not(:disabled):hover {
  border-color: rgba(157, 180, 255, .34);
  background: rgba(124, 156, 255, .16);
}

@media (max-width: 1180px) {
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-kpis,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

@media (max-width: 760px) {
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
    padding: 22px;
  }
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-kpis,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase V0.7.2.2 — header réservé à la vue d'ensemble + sidebar réduite équilibrée */
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.public-landing) .main-content > .hero {
  display: none;
}

body.dashboard-view-guild.dashboard-tab-overview:not(.public-landing) .main-content > .hero {
  display: block;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand {
  padding-top: 8px;
}

/* Phase V0.7.2.3 — header Modules allégé + sidebar brand simplifiée */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body:not(.public-landing) .brand-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}

body:not(.public-landing) .brand-title {
  margin: 0;
  color: #f3f7ff;
  font-size: 1.16rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
}

body:not(.public-landing) .brand-copy .phase-link {
  width: fit-content;
  max-width: 100%;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  gap: 26px;
  padding-top: clamp(22px, 2.4vw, 32px);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-toolbar {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-toolbar:has(#modules-hub-save-button.hidden) {
  display: none;
}

body.dashboard-tab-modules:not(.public-landing) #modules-hub-save-state,
body:not(.public-landing) #modules-save-state {
  display: none !important;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-grid {
  margin-top: 0;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-copy {
  display: none !important;
}


/* Phase V0.7.2.4 — cadre commun des pages modules */
body:not(.public-landing) .app-shell {
  align-items: start;
  padding: 32px clamp(18px, 2vw, 34px);
  min-height: 100vh;
}

body:not(.public-landing) .main-content {
  padding: 0;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .sidebar {
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  padding: 22px;
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 156, 255, .18), transparent 42%),
    linear-gradient(180deg, rgba(10, 19, 34, .96), rgba(7, 13, 24, .94));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
  scrollbar-width: thin;
  scrollbar-color: rgba(124,156,255,.42) transparent;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .sidebar::-webkit-scrollbar {
  width: 6px;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(124,156,255,.36);
}

body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
  padding: 32px clamp(18px, 2vw, 34px);
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 156, 255, .16), transparent 45%),
    linear-gradient(180deg, rgba(10, 19, 34, .96), rgba(7, 13, 24, .94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .035);
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.public-landing) #guild-summary-card {
  display: none !important;
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid {
  position: relative;
  overflow: hidden;
  gap: 20px;
  padding: clamp(22px, 2.4vw, 34px);
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 0%, rgba(124, 156, 255, .18), transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(90, 77, 255, .12), transparent 42%),
    linear-gradient(145deg, rgba(12, 22, 40, .96), rgba(6, 13, 26, .96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.04), transparent 26%, transparent 78%, rgba(124,156,255,.05));
  opacity: .72;
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid > * {
  position: relative;
  z-index: 1;
}

.module-context-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 156, 255, .22), transparent 52%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 48px rgba(0,0,0,.16);
}

.module-context-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 21px;
  border: 1px solid rgba(157, 180, 255, .18);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 50%),
    rgba(124, 156, 255, .15);
  color: #dfe8ff;
  font-size: 1.35rem;
  line-height: 1;
}

.module-context-copy {
  min-width: 0;
}

.module-context-copy .eyebrow {
  margin-bottom: 7px;
  color: #9fb4ff;
}

.module-context-copy h3 {
  margin: 0 0 6px;
  color: #f2f6ff;
  font-size: clamp(1.45rem, 2.3vw, 2.2rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.module-context-copy p {
  max-width: 850px;
}

.module-context-helper {
  margin-top: 7px;
  color: #93a7c7;
  font-size: .9rem;
}

.module-context-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .card:not(.module-context-card) {
  border-color: rgba(157, 180, 255, .13);
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 156, 255, .08), transparent 45%),
    linear-gradient(145deg, rgba(255,255,255,.042), rgba(255,255,255,.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 42px rgba(0,0,0,.14);
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .subtabs {
  padding: 8px;
  border: 1px solid rgba(157, 180, 255, .12);
  border-radius: 22px;
  background: rgba(255,255,255,.028);
}

@media (max-width: 960px) {
  body:not(.public-landing) .app-shell,
  body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
    padding: 18px;
  }

  body:not(.public-landing):not(.dashboard-sidebar-collapsed) .sidebar,
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
    position: static;
    max-height: none;
  }

  .module-context-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .module-context-actions {
    justify-content: flex-start;
  }
}


/* Phase V0.7.2.6 — page Modules sans statistiques redondantes */
body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  gap: 24px;
}

.modules-hub-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(157, 180, 255, .15);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 156, 255, .18), transparent 52%),
    linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 48px rgba(0,0,0,.14);
}

.modules-hub-intro-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.modules-hub-intro-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 21px;
  border: 1px solid rgba(157, 180, 255, .18);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 50%),
    rgba(124, 156, 255, .15);
  color: #dfe8ff;
  font-size: 1.35rem;
  line-height: 1;
}

.modules-hub-intro h3 {
  margin: 0 0 6px;
  color: #f2f6ff;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.modules-hub-intro p:last-child {
  max-width: 780px;
  color: #b8c7e4;
}

.modules-hub-intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions #modules-hub-save-button:not(.hidden) {
  position: static;
  top: auto;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-toolbar {
  display: none !important;
}

@media (max-width: 760px) {
  .modules-hub-intro,
  .modules-hub-intro-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .modules-hub-intro-actions {
    justify-content: flex-start;
  }
}

/* Phase V0.7.2.6 — le hub Modules garde uniquement l’encart d’introduction en haut. */
body.dashboard-tab-modules:not(.public-landing) .modules-hub-card > .modules-hub-kpis {
  display: none !important;
}

/* Phase V0.7.2.7 — vue d’ensemble utile + alignement global */
body:not(.public-landing) .app-shell {
  align-items: start;
}

body.dashboard-view-guild:not(.public-landing) .main-content {
  padding-top: 0;
}

body.dashboard-view-guild:not(.public-landing) .dashboard-grid {
  align-content: start;
  margin-top: 0;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid,
body.dashboard-view-guild.dashboard-tab-overview:not(.public-landing) .overview-card {
  margin-top: 0;
}

body.dashboard-view-guild.dashboard-tab-overview:not(.public-landing) .overview-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 34px);
  border-color: rgba(157, 180, 255, .16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 0%, rgba(124, 156, 255, .18), transparent 40%),
    radial-gradient(circle at 100% 10%, rgba(90, 77, 255, .12), transparent 42%),
    linear-gradient(145deg, rgba(12, 22, 40, .96), rgba(6, 13, 26, .96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.dashboard-view-guild.dashboard-tab-overview:not(.public-landing) .overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.042), transparent 22%, transparent 78%, rgba(124,156,255,.05));
  opacity: .72;
}

body.dashboard-view-guild.dashboard-tab-overview:not(.public-landing) .overview-card > * {
  position: relative;
  z-index: 1;
}

.overview-home {
  display: grid;
  gap: 22px;
}

.overview-welcome-card,
.overview-watch-card,
.overview-modules-card,
.overview-quick-actions {
  border: 1px solid rgba(157, 180, 255, .14);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.047), rgba(255,255,255,.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 42px rgba(0,0,0,.13);
}

.overview-welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: clamp(20px, 2.4vw, 28px);
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 156, 255, .18), transparent 48%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}

.overview-welcome-card h3 {
  margin: 0 0 8px;
  color: #f2f6ff;
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.overview-welcome-card p {
  max-width: 780px;
  color: #b8c7e4;
  line-height: 1.55;
}

.overview-license-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: #94a7c8;
  font-size: .82rem;
  font-weight: 800;
}

.overview-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-metric-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 16px;
  border: 1px solid rgba(157, 180, 255, .14);
  border-radius: 22px;
  background: rgba(255,255,255,.034);
}

.overview-metric-icon,
.overview-module-icon,
.overview-alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(157, 180, 255, .18);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 52%),
    rgba(124, 156, 255, .14);
  color: #dfe8ff;
  line-height: 1;
}

.overview-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  font-size: 1.12rem;
}

.overview-metric-card strong {
  display: block;
  color: #f3f7ff;
  font-size: 1.45rem;
  line-height: 1.05;
}

.overview-metric-card span {
  display: block;
  margin-top: 4px;
  color: #b8c7e4;
  font-size: .9rem;
}

.overview-metric-card small {
  display: block;
  margin-top: 5px;
  color: #8396b8;
  font-size: .78rem;
  font-weight: 750;
}

.overview-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.overview-quick-actions h3,
.overview-section-title-row h3 {
  margin: 0;
  color: #f2f6ff;
  font-size: 1.25rem;
}

.overview-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-action-button {
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
}

.overview-watch-card,
.overview-modules-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.overview-section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview-alert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overview-alert-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(157, 180, 255, .13);
  border-radius: 20px;
  background: rgba(255,255,255,.032);
}

.overview-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  font-size: 1rem;
}

.overview-alert-card strong {
  display: block;
  color: #f3f7ff;
  font-size: .98rem;
}

.overview-alert-card p {
  margin: 5px 0 0;
  color: #aebed8;
  line-height: 1.45;
  font-size: .9rem;
}

.overview-alert-card .overview-action-button {
  margin-top: 12px;
  min-height: 36px;
  padding-inline: 14px;
}

.overview-alert-success {
  border-color: rgba(85, 217, 141, .24);
  background: rgba(85, 217, 141, .07);
}

.overview-alert-warning,
.overview-alert-premium {
  border-color: rgba(255, 209, 102, .22);
  background: rgba(255, 209, 102, .065);
}

.overview-alert-danger {
  border-color: rgba(255, 127, 138, .25);
  background: rgba(255, 127, 138, .07);
}

.overview-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overview-module-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 15px;
  min-height: 156px;
  padding: 16px;
  border: 1px solid rgba(157, 180, 255, .14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 156, 255, .11), transparent 45%),
    rgba(255,255,255,.032);
}

.overview-module-card.is-disabled {
  opacity: .68;
}

.overview-module-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.overview-module-icon {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  font-size: 1.08rem;
}

.overview-module-card h4 {
  margin: 2px 0 6px;
  color: #f2f6ff;
  font-size: 1rem;
}

.overview-module-card p {
  color: #aebed8;
  font-size: .86rem;
  line-height: 1.38;
}

.overview-module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-module-card-footer .overview-action-button {
  min-height: 36px;
  padding-inline: 14px;
}

@media (max-width: 1280px) {
  .overview-metrics-grid,
  .overview-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .overview-welcome-card,
  .overview-quick-actions {
    grid-template-columns: 1fr;
  }

  .overview-license-stack {
    justify-items: start;
  }

  .overview-action-grid,
  .overview-alert-grid,
  .overview-metrics-grid,
  .overview-module-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase V0.7.2.8 — retrait de la Vue d’ensemble et des permissions visibles */
body.dashboard-view-guild:not(.public-landing) .main-content > .hero {
  display: none !important;
}

body:not(.public-landing) [data-sidebar-nav-tab="overview"],
body:not(.public-landing) [data-tab-target="overview"],
body:not(.public-landing) .overview-card {
  display: none !important;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  margin-top: 0;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-icon,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon {
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Phase V0.7.2.9 — accueil Modules plus aéré + chargement en modale */
body.auth-checking .main-content > .hero,
body.auth-checking #empty-view,
body.auth-checking #guild-view,
body.auth-checking #global-admin-view,
body.auth-checking #changelog-view,
body.auth-checking .dashboard-tabs,
body.auth-checking .subtabs {
  display: none !important;
}

body.auth-checking .app-shell {
  filter: blur(8px);
  opacity: .58;
  transform: scale(.992);
  pointer-events: none;
  user-select: none;
}

body.auth-checking .auth-checking-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(124,156,255,.18), transparent 34rem),
    rgba(3, 8, 18, .48);
  backdrop-filter: blur(16px) saturate(1.12);
}

.auth-checking-card {
  width: min(420px, calc(100vw - 32px));
  padding: 26px 28px 28px;
  border-radius: 24px;
}

.auth-checking-card h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -.045em;
}

.auth-checking-card p:last-child {
  font-size: .95rem;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 3vw, 40px);
  gap: clamp(28px, 3vw, 40px);
  border-radius: 32px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124,156,255,.16), transparent 34rem),
    radial-gradient(circle at 95% 8%, rgba(129,88,255,.12), transparent 30rem),
    linear-gradient(145deg, rgba(10, 19, 36, .96), rgba(5, 11, 23, .96));
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.24), transparent 34rem),
    linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.022));
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3 {
  font-size: clamp(2.25rem, 4.2vw, 3.55rem);
  letter-spacing: -.06em;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro p:last-child {
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.55;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-grid {
  display: grid;
  gap: clamp(30px, 3.3vw, 44px);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section {
  display: grid;
  gap: 18px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.14), transparent 52%),
    rgba(124, 156, 255, .13);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading h4 {
  margin: 0 0 4px;
  color: #f4f7ff;
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading p {
  margin: 0;
  color: #aebed8;
  line-height: 1.45;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: none;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  min-height: 196px;
  padding: 22px;
  border-radius: 26px;
  display: grid;
  grid-template-rows: auto minmax(34px, 1fr) auto;
  gap: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.18), transparent 24rem),
    linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(157,180,255,.30);
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.23), transparent 24rem),
    linear-gradient(145deg, rgba(255,255,255,.064), rgba(255,255,255,.024));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  font-size: 1.35rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile h5 {
  margin: 1px 0 7px;
  color: #f4f7ff;
  font-size: 1.22rem;
  line-height: 1.12;
  letter-spacing: -.025em;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile p {
  max-width: 34rem;
  color: #b5c4df;
  line-height: 1.48;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta {
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta .pill {
  padding: 7px 11px;
  font-size: .75rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-switch {
  margin-left: auto;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  font-size: .95rem;
  background: rgba(124,156,255,.10);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure:not(:disabled):hover {
  background: rgba(124,156,255,.18);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile.is-premium-locked {
  border-color: rgba(255, 204, 112, .16);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,204,112,.10), transparent 23rem),
    linear-gradient(145deg, rgba(255,255,255,.044), rgba(255,255,255,.018));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile.is-disabled,
body.dashboard-tab-modules:not(.public-landing) .module-hub-tile.is-disabled-module:not(.is-premium-locked) {
  opacity: .82;
}

@media (max-width: 980px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
    grid-template-columns: 1fr;
  }

  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta {
    justify-content: flex-start;
  }
}


/* Phase V0.7.2.10 — chargement discret + accueil Modules façon catalogue */
body.dashboard-view-empty:not(.public-landing) .main-content > .hero {
  display: none !important;
}

body.dashboard-view-empty:not(.public-landing) .welcome-card-minimal {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 28px;
  text-align: center;
}

body.auth-checking .app-shell {
  filter: blur(10px) saturate(.95);
  opacity: .46;
  transform: scale(.99);
}

body.auth-checking .auth-checking-overlay {
  z-index: 10050;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  width: min(1180px, 100%);
  padding: clamp(22px, 2.4vw, 32px);
  gap: 26px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 9% 0%, rgba(124,156,255,.18), transparent 31rem),
    radial-gradient(circle at 100% 4%, rgba(92,77,255,.12), transparent 30rem),
    linear-gradient(145deg, rgba(11, 20, 37, .96), rgba(5, 11, 22, .96));
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(157,180,255,.16);
  background:
    linear-gradient(135deg, rgba(124,156,255,.13), rgba(255,255,255,.025)),
    rgba(255,255,255,.018);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main {
  gap: 16px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.22), transparent 48%),
    rgba(124,156,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 12px 34px rgba(58,83,190,.16);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3 {
  margin: 0 0 4px;
  font-size: clamp(2rem, 3.7vw, 3rem);
  line-height: .96;
  letter-spacing: -.055em;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro p:last-child {
  max-width: 620px;
  color: #b9c8e5;
  font-size: .96rem;
  line-height: 1.45;
}

.modules-hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 2px 2px;
}

.modules-hub-filter {
  border: 1px solid rgba(157,180,255,.14);
  border-radius: 999px;
  padding: 9px 13px;
  color: #aebed8;
  background: rgba(255,255,255,.025);
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.modules-hub-filter:hover,
.modules-hub-filter:focus-visible {
  border-color: rgba(157,180,255,.34);
  background: rgba(124,156,255,.10);
  color: #edf4ff;
}

.modules-hub-filter.active {
  border-color: rgba(157,180,255,.54);
  background: linear-gradient(135deg, rgba(124,156,255,.30), rgba(124,156,255,.13));
  color: #f5f8ff;
  box-shadow: 0 12px 28px rgba(80,108,255,.14), inset 0 1px 0 rgba(255,255,255,.08);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-grid {
  gap: 32px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section {
  gap: 15px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading {
  padding: 0 2px;
  gap: 12px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: rgba(124,156,255,.12);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading h4 {
  font-size: 1.28rem;
  letter-spacing: -.028em;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading p {
  font-size: .91rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: none;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  position: relative;
  min-height: 218px;
  padding: 20px;
  border-radius: 24px;
  border-color: rgba(157,180,255,.13);
  background:
    radial-gradient(circle at 0 0, rgba(124,156,255,.14), transparent 19rem),
    linear-gradient(145deg, rgba(255,255,255,.052), rgba(255,255,255,.018));
  box-shadow: 0 18px 48px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.036);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(124,156,255,.72), rgba(95,221,163,.42), transparent 72%);
  opacity: .55;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(157,180,255,.30);
  background:
    radial-gradient(circle at 0 0, rgba(124,156,255,.20), transparent 19rem),
    linear-gradient(145deg, rgba(255,255,255,.068), rgba(255,255,255,.024));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.18), transparent 50%),
    rgba(124,156,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile h5 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile p {
  color: #aebed8;
  font-size: .9rem;
  line-height: 1.42;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-detail {
  align-self: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(157,180,255,.12);
  border-radius: 999px;
  color: #d8e3f8;
  background: rgba(2, 8, 20, .30);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta {
  min-height: 32px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure {
  min-height: 42px;
  border-radius: 14px;
}

@media (max-width: 1280px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.7.2.11 — harmonisation globale futuriste Harka-Chan */
:root {
  --hc-deep: #050b16;
  --hc-deep-2: #07111f;
  --hc-panel: rgba(8, 16, 31, .92);
  --hc-panel-soft: rgba(13, 24, 44, .78);
  --hc-panel-lift: rgba(20, 33, 58, .70);
  --hc-line: rgba(145, 169, 255, .16);
  --hc-line-strong: rgba(145, 169, 255, .28);
  --hc-glow-blue: rgba(117, 149, 255, .17);
  --hc-glow-green: rgba(85, 217, 141, .09);
  --hc-glow-purple: rgba(126, 90, 255, .13);
}

body:not(.public-landing) {
  background:
    radial-gradient(circle at 12% -8%, rgba(124, 156, 255, .17), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(118, 83, 255, .14), transparent 36rem),
    radial-gradient(circle at 50% 112%, rgba(85, 217, 141, .07), transparent 44rem),
    linear-gradient(180deg, #060d19 0%, #050b15 52%, #040811 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body:not(.public-landing)::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(157, 180, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 180, 255, .048) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at 50% 36%, #000 0%, transparent 70%);
  z-index: -1;
}

body:not(.public-landing) .app-shell,
body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
  align-items: start;
  gap: clamp(24px, 3vw, 42px);
  padding-top: 30px;
  padding-bottom: 42px;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .sidebar,
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
  top: 30px;
  border-color: var(--hc-line);
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 156, 255, .18), transparent 20rem),
    linear-gradient(180deg, rgba(10, 19, 34, .96), rgba(5, 11, 21, .95));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255,255,255,.046);
}

body:not(.public-landing) .brand,
body:not(.public-landing) .guild-selector .guild-selector-current,
body:not(.public-landing) .sidebar-help-card,
body:not(.public-landing) .sidebar-user-card {
  border-color: var(--hc-line);
  background:
    radial-gradient(circle at 10% 0%, rgba(124,156,255,.12), transparent 18rem),
    rgba(4, 10, 20, .48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

body:not(.public-landing) .dashboard-nav-link {
  min-height: 42px;
  border-radius: 14px;
  color: #aebcda;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

body:not(.public-landing) .dashboard-nav-link:hover,
body:not(.public-landing) .dashboard-nav-link:focus-visible {
  color: #edf4ff;
  background: rgba(124,156,255,.08);
  border-color: rgba(157,180,255,.18);
}

body:not(.public-landing) .dashboard-nav-link.active {
  color: #f6f9ff;
  border-color: rgba(133,164,255,.58);
  background:
    linear-gradient(135deg, rgba(124,156,255,.24), rgba(124,156,255,.08)),
    rgba(255,255,255,.018);
  box-shadow: 0 12px 32px rgba(68, 99, 220, .16), inset 0 1px 0 rgba(255,255,255,.07);
}

body:not(.public-landing) .main-content {
  width: min(1240px, 100%);
}

body:not(.public-landing) .hero,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-card,
body:not(.public-landing) .global-admin-view,
body:not(.public-landing) .changelog-view {
  border: 1px solid var(--hc-line);
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 156, 255, .13), transparent 34rem),
    radial-gradient(circle at 94% 4%, rgba(117, 82, 255, .10), transparent 30rem),
    linear-gradient(145deg, rgba(7, 15, 29, .94), rgba(4, 10, 21, .94));
  box-shadow:
    0 30px 95px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(255,255,255,.04);
}

body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid {
  padding: clamp(22px, 2.4vw, 32px);
}

body:not(.public-landing) .hero::after,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid::after,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.045), transparent 24%, transparent 76%, rgba(124,156,255,.045));
  opacity: .42;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid {
  position: relative;
  overflow: hidden;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card > *,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid > * {
  position: relative;
  z-index: 1;
}

.module-context-card,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
  border-color: var(--hc-line-strong);
  background:
    radial-gradient(circle at 2% 0%, rgba(124,156,255,.24), transparent 28rem),
    linear-gradient(145deg, rgba(28, 43, 74, .72), rgba(12, 20, 38, .66));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 52px rgba(0,0,0,.20);
}

.module-context-icon,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  border-color: rgba(157,180,255,.20);
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.20), transparent 50%),
    linear-gradient(145deg, rgba(124,156,255,.26), rgba(124,156,255,.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 34px rgba(78, 105, 230, .12);
}

body:not(.public-landing) .card,
body:not(.public-landing) .panel,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .subtab-section,
body:not(.public-landing) .empty-state-card,
body:not(.public-landing) .ticket-panel-card,
body:not(.public-landing) .nextcloud-card,
body:not(.public-landing) .twitch-channel-card,
body:not(.public-landing) .ticket-archive-card,
body:not(.public-landing) .ticket-counter-card,
body:not(.public-landing) .nextcloud-deck-card,
body:not(.public-landing) .nextcloud-user-card,
body:not(.public-landing) .embed-list-main,
body:not(.public-landing) .embed-editor-panel,
body:not(.public-landing) .embed-preview-panel,
body:not(.public-landing) .auto-response-card,
body:not(.public-landing) .auto-response-embed-field-row,
body:not(.public-landing) .member-lifecycle-card-preview-card,
body:not(.public-landing) .member-lifecycle-snapshot-card {
  border-color: rgba(145,169,255,.13);
  background:
    radial-gradient(circle at 8% 0%, rgba(124,156,255,.075), transparent 21rem),
    linear-gradient(145deg, rgba(15, 26, 46, .72), rgba(6, 13, 26, .70));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.032), 0 14px 42px rgba(0,0,0,.16);
}

body:not(.public-landing) .ticket-panel-card,
body:not(.public-landing) .twitch-channel-card,
body:not(.public-landing) .embed-list-main,
body:not(.public-landing) .nextcloud-deck-card,
body:not(.public-landing) .nextcloud-user-card,
body:not(.public-landing) .ticket-archive-card,
body:not(.public-landing) .ticket-counter-card {
  border-radius: 22px;
}

body:not(.public-landing) .subtabs,
body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .nextcloud-subtabs,
body:not(.public-landing) .subtabs-inline {
  border-color: rgba(145,169,255,.13);
  background: rgba(6, 13, 25, .56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.028);
}

body:not(.public-landing) .subtab,
body:not(.public-landing) .tab,
body:not(.public-landing) .nextcloud-subtab-button {
  border-radius: 14px;
}

body:not(.public-landing) .subtab.active,
body:not(.public-landing) .tab.active,
body:not(.public-landing) .nextcloud-subtab-button.active {
  background: linear-gradient(135deg, rgba(124,156,255,.95), rgba(124,156,255,.68));
  color: #08101d;
  box-shadow: 0 12px 34px rgba(91, 121, 255, .24), inset 0 1px 0 rgba(255,255,255,.36);
}

body:not(.public-landing) input,
body:not(.public-landing) textarea,
body:not(.public-landing) select,
body:not(.public-landing) .compact-select {
  border-color: rgba(145,169,255,.14);
  background: rgba(3, 9, 19, .52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.026);
}

body:not(.public-landing) input:focus,
body:not(.public-landing) textarea:focus,
body:not(.public-landing) select:focus,
body:not(.public-landing) .compact-select:focus {
  border-color: rgba(124,156,255,.58);
  box-shadow: 0 0 0 3px rgba(124,156,255,.14), inset 0 1px 0 rgba(255,255,255,.04);
}

body:not(.public-landing) .button,
body:not(.public-landing) button.button {
  border-radius: 14px;
}

body:not(.public-landing) .button-primary {
  background: linear-gradient(135deg, #9db4ff, #6f90ff);
  color: #061022;
  border-color: rgba(181, 198, 255, .44);
  box-shadow: 0 14px 36px rgba(85, 113, 255, .26), inset 0 1px 0 rgba(255,255,255,.34);
}

body:not(.public-landing) .button-ghost {
  background: rgba(124,156,255,.07);
  border-color: rgba(145,169,255,.16);
}

body:not(.public-landing) .button-ghost:not(:disabled):hover {
  background: rgba(124,156,255,.14);
  border-color: rgba(145,169,255,.32);
}

body:not(.public-landing) .pill {
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) .pill-success {
  border-color: rgba(85,217,141,.28);
  background: rgba(85,217,141,.13);
  color: #83ffc0;
}

body:not(.public-landing) .pill-accent {
  border-color: rgba(255,209,102,.26);
  background: rgba(255,209,102,.12);
  color: #ffe29b;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card {
  gap: 24px;
  padding: clamp(24px, 2.8vw, 38px);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
  padding: clamp(20px, 2.5vw, 30px);
  border-radius: 28px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3 {
  font-size: clamp(2.2rem, 4.2vw, 3.35rem);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters {
  padding: 2px;
  gap: 10px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-filter {
  border-color: rgba(145,169,255,.15);
  background: rgba(7, 14, 28, .62);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-filter.active {
  background: linear-gradient(135deg, rgba(124,156,255,.82), rgba(92,121,255,.54));
  color: #061022;
  border-color: rgba(181,198,255,.42);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  min-height: 178px;
  padding: 20px;
  border-color: rgba(145,169,255,.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.13), transparent 18rem),
    linear-gradient(145deg, rgba(17, 29, 51, .70), rgba(6, 13, 26, .72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.034), 0 18px 48px rgba(0,0,0,.17);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile::before {
  height: 2px;
  opacity: .45;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(157,180,255,.32);
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.18), transparent 18rem),
    linear-gradient(145deg, rgba(22, 36, 62, .76), rgba(7, 15, 30, .74));
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-detail {
  align-self: start;
  background: rgba(3, 9, 19, .38);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-configure {
  background: rgba(124,156,255,.08);
  border-color: rgba(145,169,255,.18);
}

body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card {
  min-height: 132px;
}

body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .card:not(.module-context-card) {
  border-radius: 26px;
}

body:not(.public-landing) .ticket-panel-card.publication-attention {
  border-color: rgba(255,209,102,.28);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,209,102,.10), transparent 22rem),
    linear-gradient(145deg, rgba(22, 29, 42, .78), rgba(8, 15, 27, .74));
}

body:not(.public-landing) .notice,
body:not(.public-landing) .warning-box,
body:not(.public-landing) .soft-warning {
  border-color: rgba(255,209,102,.22);
  background: rgba(255,209,102,.08);
}

@media (min-width: 1500px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: 1fr;
  }
}


/* Phase V0.7.2.12 — charte typographique finale Harka-Chan
   À conserver comme base pour les prochains modules/pages. */
:root {
  --hc-font-title-xl: clamp(1.9rem, 2.65vw, 2.55rem);
  --hc-font-title-lg: clamp(1.35rem, 1.65vw, 1.65rem);
  --hc-font-title-md: 1.12rem;
  --hc-font-body: .95rem;
  --hc-font-help: .88rem;
  --hc-font-meta: .76rem;
  --hc-heading-tracking: -.035em;
  --hc-body-line: 1.48;
  --hc-header-icon: 58px;
  --hc-header-radius: 28px;
  --hc-card-radius: 22px;
  --hc-header-padding-y: clamp(20px, 2vw, 26px);
  --hc-header-padding-x: clamp(22px, 2.25vw, 30px);
}

body:not(.public-landing) {
  font-size: 15px;
}

body:not(.public-landing) .eyebrow,
body:not(.public-landing) .module-context-copy .eyebrow,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .eyebrow,
body:not(.public-landing) .card-heading .eyebrow,
body:not(.public-landing) .section-heading-row .eyebrow {
  margin: 0 0 8px;
  color: #a9bbff;
  font-size: var(--hc-font-meta);
  line-height: 1.1;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 900;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-card,
body.dashboard-view-guild:not(.dashboard-tab-overview):not(.dashboard-tab-modules):not(.public-landing) .dashboard-grid {
  padding: clamp(24px, 2.6vw, 34px);
  gap: 24px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
.module-context-card {
  min-height: 150px;
  padding: var(--hc-header-padding-y) var(--hc-header-padding-x);
  border-radius: var(--hc-header-radius);
  border-color: rgba(157, 180, 255, .22);
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.24), transparent 27rem),
    linear-gradient(145deg, rgba(25, 41, 72, .72), rgba(10, 19, 36, .70));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.052), 0 18px 52px rgba(0,0,0,.20);
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main,
.module-context-card {
  align-items: center;
  gap: 18px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main {
  grid-template-columns: var(--hc-header-icon) minmax(0, 1fr);
}

.module-context-card {
  grid-template-columns: var(--hc-header-icon) minmax(0, 1fr) auto;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
.module-context-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon,
body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
.module-context-icon {
  width: var(--hc-header-icon);
  height: var(--hc-header-icon);
  border-radius: 20px;
  font-size: 1.28rem;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
.module-context-copy h3 {
  margin: 0 0 8px;
  color: #f3f7ff;
  font-size: var(--hc-font-title-xl);
  line-height: .98;
  letter-spacing: var(--hc-heading-tracking);
  font-weight: 950;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro p:last-child,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy p,
.module-context-copy p,
body:not(.public-landing) .card > p.muted,
body:not(.public-landing) .card-heading + p.muted {
  color: #b8c7e4;
  font-size: var(--hc-font-body);
  line-height: var(--hc-body-line);
}

.module-context-helper {
  margin-top: 8px;
  color: #96a9c8;
  font-size: var(--hc-font-help);
  line-height: 1.42;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
.module-context-actions {
  align-self: center;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions .pill,
.module-context-actions .pill,
body:not(.public-landing) .pill {
  font-size: var(--hc-font-meta);
  line-height: 1;
  font-weight: 900;
  padding: 7px 11px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters {
  gap: 9px;
  margin-top: 2px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-filter {
  min-height: 36px;
  padding: 8px 13px;
  font-size: .82rem;
  line-height: 1;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section {
  gap: 14px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading {
  align-items: center;
  gap: 12px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 1rem;
  flex: 0 0 38px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading h4,
body:not(.public-landing) .card-heading h3,
body:not(.public-landing) .section-heading-row h3,
body:not(.public-landing) .inline-heading h3 {
  margin: 0 0 4px;
  color: #f2f6ff;
  font-size: var(--hc-font-title-lg);
  line-height: 1.08;
  letter-spacing: -.026em;
  font-weight: 920;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-section-heading p,
body:not(.public-landing) .section-heading-row p,
body:not(.public-landing) .card-heading p.muted {
  color: #aebdd8;
  font-size: .92rem;
  line-height: 1.4;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  gap: 18px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  min-height: 176px;
  padding: 19px;
  border-radius: var(--hc-card-radius);
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-main {
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-icon {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  font-size: 1.12rem;
  flex: 0 0 50px;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile h5 {
  margin: 0 0 6px;
  color: #f2f6ff;
  font-size: var(--hc-font-title-md);
  line-height: 1.12;
  letter-spacing: -.018em;
  font-weight: 920;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile p {
  color: #aebdd8;
  font-size: .91rem;
  line-height: 1.42;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-detail {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  font-size: .78rem;
  line-height: 1.18;
  font-weight: 850;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-tile-meta {
  align-items: center;
}

body:not(.public-landing) .subtabs,
body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .nextcloud-subtabs,
body:not(.public-landing) .subtabs-inline {
  min-height: 58px;
  align-items: center;
}

body:not(.public-landing) .subtab,
body:not(.public-landing) .tab,
body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .nextcloud-subtab-button {
  font-size: .84rem;
  font-weight: 900;
  line-height: 1;
}

body:not(.public-landing) .button,
body:not(.public-landing) button.button,
body.dashboard-tab-modules:not(.public-landing) .module-hub-configure {
  font-size: .88rem;
  font-weight: 900;
  line-height: 1;
}

body:not(.public-landing) input,
body:not(.public-landing) textarea,
body:not(.public-landing) select,
body:not(.public-landing) .compact-select {
  font-size: .94rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
  .module-context-actions {
    justify-content: flex-start;
  }
}

/* Phase V0.7.2.13 — header dashboard unique réutilisable
   Utiliser .dashboard-page-header pour les prochaines pages/modules. */
:root {
  --hc-page-header-height: 164px;
  --hc-page-header-icon-size: 58px;
  --hc-page-header-gap: 18px;
}

body:not(.public-landing) .dashboard-page-header,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
.module-context-card {
  display: grid !important;
  grid-template-columns: var(--hc-page-header-icon-size) minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: var(--hc-page-header-gap) !important;
  min-height: var(--hc-page-header-height) !important;
  padding: var(--hc-header-padding-y) var(--hc-header-padding-x) !important;
  border-radius: var(--hc-header-radius) !important;
  border: 1px solid rgba(157, 180, 255, .22) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(124,156,255,.24), transparent 27rem),
    linear-gradient(145deg, rgba(25, 41, 72, .72), rgba(10, 19, 36, .70)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.052), 0 18px 52px rgba(0,0,0,.20) !important;
}

body:not(.public-landing) .dashboard-page-header-icon,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
.module-context-icon {
  display: grid !important;
  place-items: center !important;
  width: var(--hc-page-header-icon-size) !important;
  height: var(--hc-page-header-icon-size) !important;
  min-width: var(--hc-page-header-icon-size) !important;
  border-radius: 21px !important;
  border: 1px solid rgba(157,180,255,.22) !important;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.20), transparent 50%),
    linear-gradient(145deg, rgba(124,156,255,.26), rgba(124,156,255,.10)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 34px rgba(78,105,230,.12) !important;
  color: #dfe8ff !important;
  font-size: 1.28rem !important;
  line-height: 1 !important;
  text-align: center !important;
}

body:not(.public-landing) .dashboard-page-header-copy,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy,
.module-context-copy {
  min-width: 0 !important;
  align-self: center !important;
}

body:not(.public-landing) .dashboard-page-header-eyebrow,
body:not(.public-landing) .dashboard-page-header .eyebrow,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .eyebrow,
.module-context-copy .eyebrow {
  margin: 0 0 8px !important;
  color: #a9bbff !important;
  font-size: var(--hc-font-meta) !important;
  line-height: 1.1 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  font-weight: 900 !important;
}

body:not(.public-landing) .dashboard-page-header-title,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
.module-context-copy h3 {
  margin: 0 0 7px !important;
  color: #f2f6ff !important;
  font-size: var(--hc-font-title-xl) !important;
  line-height: .98 !important;
  letter-spacing: var(--hc-heading-tracking) !important;
  font-weight: 950 !important;
}

body:not(.public-landing) .dashboard-page-header-description,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
.module-context-copy > .muted:not(.module-context-helper) {
  margin: 0 !important;
  max-width: 900px !important;
  color: #b8c7e6 !important;
  font-size: var(--hc-font-body) !important;
  line-height: var(--hc-body-line) !important;
}

body:not(.public-landing) .dashboard-page-header-helper,
.module-context-helper {
  display: block !important;
  min-height: calc(var(--hc-font-help) * 1.35) !important;
  margin: 7px 0 0 !important;
  color: #93a7c7 !important;
  font-size: var(--hc-font-help) !important;
  line-height: 1.35 !important;
}

body:not(.public-landing) .dashboard-page-header-helper.is-empty {
  visibility: hidden !important;
}

body:not(.public-landing) .dashboard-page-header-actions,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
.module-context-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  align-self: center !important;
}

body:not(.public-landing) .dashboard-page-header-status,
body:not(.public-landing) .dashboard-page-header .pill {
  white-space: nowrap !important;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main {
  display: contents !important;
}

@media (max-width: 760px) {
  body:not(.public-landing) .dashboard-page-header,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  .module-context-card {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    align-items: start !important;
  }

  body:not(.public-landing) .dashboard-page-header-actions,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
  .module-context-actions {
    justify-content: flex-start !important;
  }
}

/* Phase V0.7.2.14 — socle UI réutilisable Harka-Chan
   Ces classes sont le gabarit commun à reprendre sur les prochains modules. */
body:not(.public-landing) .dashboard-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(157,180,255,.14);
  border-radius: 999px;
  padding: 9px 14px;
  color: #aebed8;
  background: rgba(3, 9, 20, .36);
  font: inherit;
  font-size: var(--hc-font-button, .86rem);
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

body:not(.public-landing) .dashboard-filter-chip:hover,
body:not(.public-landing) .dashboard-filter-chip:focus-visible {
  border-color: rgba(157,180,255,.34);
  background: rgba(124,156,255,.10);
  color: #edf4ff;
  transform: translateY(-1px);
}

body:not(.public-landing) .dashboard-filter-chip.active {
  border-color: rgba(157,180,255,.54);
  background: linear-gradient(135deg, rgba(124,156,255,.82), rgba(124,156,255,.56));
  color: #08101d;
  box-shadow: 0 12px 28px rgba(80,108,255,.18), inset 0 1px 0 rgba(255,255,255,.20);
}

body:not(.public-landing) .dashboard-module-section {
  display: grid;
  gap: 16px;
}

body:not(.public-landing) .dashboard-module-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

body:not(.public-landing) .dashboard-module-section-icon,
body:not(.public-landing) .dashboard-module-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 1;
  text-align: center;
}

body:not(.public-landing) .dashboard-module-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(157,180,255,.18);
}

body:not(.public-landing) .dashboard-module-section-heading h4 {
  margin: 0;
  color: #f2f6ff;
  font-size: var(--hc-font-section-title, 1.28rem);
  font-weight: 900;
  letter-spacing: -.028em;
}

body:not(.public-landing) .dashboard-module-section-heading p {
  margin: 2px 0 0;
  color: #aebed8;
  font-size: var(--hc-font-body, .93rem);
  line-height: 1.4;
}

body:not(.public-landing) .dashboard-module-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body:not(.public-landing) .dashboard-module-tile {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(145,169,255,.14);
  background:
    radial-gradient(circle at 0 0, rgba(124,156,255,.13), transparent 18rem),
    linear-gradient(145deg, rgba(15, 26, 46, .74), rgba(6, 13, 26, .72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 16px 44px rgba(0,0,0,.16);
}

body:not(.public-landing) .dashboard-module-tile-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

body:not(.public-landing) .dashboard-module-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(157,180,255,.18);
}

body:not(.public-landing) .dashboard-module-tile-copy h5 {
  margin: 0 0 6px;
  color: #f2f6ff;
  font-size: var(--hc-font-card-title, 1.08rem);
  font-weight: 900;
  letter-spacing: -.018em;
}

body:not(.public-landing) .dashboard-module-tile-copy p {
  margin: 0;
  color: #aebed8;
  font-size: var(--hc-font-card-body, .9rem);
  line-height: 1.42;
}

body:not(.public-landing) .dashboard-module-tile-detail {
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(157,180,255,.12);
  border-radius: 999px;
  color: #d8e3f8;
  background: rgba(2, 8, 20, .30);
  font-size: var(--hc-font-small, .78rem);
  font-weight: 800;
  line-height: 1.2;
}

body:not(.public-landing) .dashboard-module-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}

@media (max-width: 980px) {
  body:not(.public-landing) .dashboard-module-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase V0.7.2.16 — gabarit header réellement unique
   Les pages Modules et modules utilisent exactement le même bloc : mêmes dimensions,
   mêmes rangées typographiques, mêmes espacements et même alignement d'actions. */
:root {
  --hc-page-header-height: 168px;
  --hc-page-header-icon-size: 58px;
  --hc-page-header-content-min-height: 112px;
  --hc-page-header-padding-y: 24px;
  --hc-page-header-padding-x: 30px;
  --hc-page-header-gap: 18px;
}

body:not(.public-landing) .dashboard-page-header,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
body:not(.public-landing) .module-context-card {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: var(--hc-page-header-height) !important;
  height: var(--hc-page-header-height) !important;
  max-height: var(--hc-page-header-height) !important;
  display: grid !important;
  grid-template-columns: var(--hc-page-header-icon-size) minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  column-gap: var(--hc-page-header-gap) !important;
  padding: var(--hc-page-header-padding-y) var(--hc-page-header-padding-x) !important;
  border-radius: var(--hc-header-radius, 28px) !important;
  overflow: hidden !important;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-main {
  display: contents !important;
}

body:not(.public-landing) .dashboard-page-header-icon,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
body:not(.public-landing) .module-context-icon {
  box-sizing: border-box !important;
  width: var(--hc-page-header-icon-size) !important;
  height: var(--hc-page-header-icon-size) !important;
  min-width: var(--hc-page-header-icon-size) !important;
  min-height: var(--hc-page-header-icon-size) !important;
  max-width: var(--hc-page-header-icon-size) !important;
  max-height: var(--hc-page-header-icon-size) !important;
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 1.24rem !important;
}

body:not(.public-landing) .dashboard-page-header-copy,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy,
body:not(.public-landing) .module-context-copy {
  min-width: 0 !important;
  min-height: var(--hc-page-header-content-min-height) !important;
  height: var(--hc-page-header-content-min-height) !important;
  display: grid !important;
  grid-template-rows: 18px 42px 24px 24px !important;
  align-content: center !important;
  align-items: center !important;
  align-self: center !important;
  gap: 0 !important;
  margin: 0 !important;
}

body:not(.public-landing) .dashboard-page-header-eyebrow,
body:not(.public-landing) .dashboard-page-header .eyebrow,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .eyebrow,
body:not(.public-landing) .module-context-copy .eyebrow {
  display: block !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  line-height: 18px !important;
  font-size: var(--hc-font-meta, .76rem) !important;
}

body:not(.public-landing) .dashboard-page-header-title,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
body:not(.public-landing) .module-context-copy h3 {
  display: flex !important;
  align-items: center !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #f3f7ff !important;
  font-size: var(--hc-font-title-xl, clamp(1.9rem, 2.65vw, 2.55rem)) !important;
  line-height: 1 !important;
  letter-spacing: var(--hc-heading-tracking, -.035em) !important;
  font-weight: 950 !important;
}

body:not(.public-landing) .dashboard-page-header-description,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .dashboard-page-header-description,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy > .dashboard-page-header-description,
body:not(.public-landing) .module-context-copy > .dashboard-page-header-description {
  display: block !important;
  min-height: 24px !important;
  height: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #b8c7e4 !important;
  font-size: var(--hc-font-body, .95rem) !important;
  line-height: 24px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body:not(.public-landing) .dashboard-page-header-helper,
body:not(.public-landing) .module-context-helper {
  display: block !important;
  min-height: 24px !important;
  height: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #96a9c8 !important;
  font-size: var(--hc-font-help, .88rem) !important;
  line-height: 24px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

body:not(.public-landing) .dashboard-page-header-helper.is-empty {
  visibility: hidden !important;
}

body:not(.public-landing) .dashboard-page-header-actions,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
body:not(.public-landing) .module-context-actions {
  min-height: var(--hc-page-header-content-min-height) !important;
  height: var(--hc-page-header-content-min-height) !important;
  align-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin: 0 !important;
}

body:not(.public-landing) .dashboard-page-header-status,
body:not(.public-landing) .dashboard-page-header-actions .pill,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions .pill,
body:not(.public-landing) .module-context-actions .pill {
  flex: 0 0 auto !important;
  align-self: center !important;
}

@media (max-width: 760px) {
  body:not(.public-landing) .dashboard-page-header,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body:not(.public-landing) .module-context-card {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body:not(.public-landing) .dashboard-page-header-copy,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy,
  body:not(.public-landing) .module-context-copy,
  body:not(.public-landing) .dashboard-page-header-actions,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
  body:not(.public-landing) .module-context-actions {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body:not(.public-landing) .dashboard-page-header-description,
  body:not(.public-landing) .dashboard-page-header-helper {
    height: auto !important;
    max-height: none !important;
    white-space: normal !important;
  }
}


/* Phase V0.7.2.16 — socle UI renforcé
   Classes génériques utilisées par dashboard-ui.js pour éviter de recréer les mêmes blocs. */
body:not(.public-landing) .dashboard-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

body:not(.public-landing) .dashboard-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 112px;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(147, 177, 255, .12);
  border-radius: 22px;
  background: rgba(5, 12, 28, .36);
  color: #aebddb;
}

body:not(.public-landing) .dashboard-empty-state strong {
  color: #edf4ff;
  font-size: var(--hc-font-body, .95rem);
}

body:not(.public-landing) .dashboard-empty-state p {
  max-width: 52ch;
  margin: 0;
  color: #9fb0ce;
  font-size: var(--hc-font-help, .88rem);
  line-height: 1.5;
}

body:not(.public-landing) .dashboard-empty-state-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(129, 140, 248, .22), rgba(45, 212, 191, .10));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

body:not(.public-landing) .dashboard-toggle-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

body:not(.public-landing) .button.is-loading {
  cursor: progress;
  opacity: .82;
}

/* Phase V0.7.2.17 — ajustements composants communs */
body.dashboard-sidebar-collapsed:not(.public-landing) .brand {
  width: 64px;
  padding: 8px 0 9px;
  gap: 8px;
  margin-inline: auto;
  border-radius: 24px;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark,
body.dashboard-sidebar-collapsed:not(.public-landing) .brand-mark-button {
  width: 48px;
  height: 48px;
  margin-inline: auto;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-collapse-toggle {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 13px;
  margin: 0 auto;
}

body:not(.public-landing) .dashboard-module-tile-detail {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .74rem;
  line-height: 1;
  letter-spacing: .005em;
  white-space: nowrap;
}

body:not(.public-landing) .dashboard-module-tile-meta .pill,
body:not(.public-landing) .dashboard-module-tile .pill {
  min-height: 26px;
  padding: 5px 9px;
  font-size: .72rem;
  line-height: 1;
}

body:not(.public-landing) .embed-image-crop-card {
  border-color: rgba(145, 169, 255, .22);
  background:
    radial-gradient(circle at 0 0, rgba(124, 156, 255, .16), transparent 22rem),
    linear-gradient(145deg, rgba(17, 27, 50, .98), rgba(5, 11, 22, .96));
}

body:not(.public-landing) .embed-image-crop-canvas {
  cursor: grab;
  touch-action: none;
}

body:not(.public-landing) .embed-image-crop-canvas:active {
  cursor: grabbing;
}


/* Phase V0.7.2.20 — messages et labels dashboard centralisés */
body:not(.public-landing) .dashboard-image-crop-card {
  border-color: rgba(145, 169, 255, .22);
  background:
    radial-gradient(circle at 0 0, rgba(124, 156, 255, .16), transparent 22rem),
    linear-gradient(145deg, rgba(17, 27, 50, .98), rgba(5, 11, 22, .96));
}

body:not(.public-landing) .dashboard-image-crop-canvas {
  cursor: grab;
  touch-action: none;
}

body:not(.public-landing) .dashboard-image-crop-canvas:active {
  cursor: grabbing;
}

body:not(.public-landing) .dashboard-image-crop-actions {
  justify-content: flex-end;
}

body:not(.public-landing) .banner-crop-controls .muted {
  grid-column: 1 / -1;
}

/* Phase V0.7.2.29 — correction visibilité header module sur la vue Modules */
body:not(.public-landing) .dashboard-page-header.hidden,
body:not(.public-landing) .module-context-card.hidden {
  display: none !important;
}


/* Phase V0.7.2.32 — migration i18n formulaires */
body:not(.public-landing) .sidebar-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px;
  border: 1px solid rgba(157, 180, 255, .18);
  border-radius: 999px;
  background: rgba(8, 16, 29, .52);
  width: fit-content;
}
body:not(.public-landing) .language-switch-button {
  width: 26px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #dbeafe;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  filter: saturate(.82);
  opacity: .72;
  transition: transform .16s ease, opacity .16s ease, background .16s ease, box-shadow .16s ease, filter .16s ease;
}
body:not(.public-landing) .language-switch-button:hover,
body:not(.public-landing) .language-switch-button:focus-visible {
  opacity: 1;
  filter: saturate(1);
  transform: translateY(-1px);
  outline: none;
}
body:not(.public-landing) .language-switch-button.active {
  opacity: 1;
  filter: saturate(1.1);
  background: linear-gradient(135deg, rgba(139, 167, 255, .32), rgba(84, 227, 174, .16));
  box-shadow: 0 0 0 1px rgba(157, 180, 255, .24), 0 10px 24px rgba(0, 0, 0, .22);
}
body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-language-switch {
  display: none;
}

/* Phase V0.7.4.12.1 — Purge UI : socle dashboard unique Tickets / Embeds
   Règle : les classes ticket-* / embed-* restent des hooks fonctionnels.
   Les couleurs, fonds, bordures, espacements et halos viennent des classes dashboard-*.
*/

/* Layout commun des pages module en liste + éditeur */
body:not(.public-landing) .dashboard-module-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 0;
  overflow: visible;
}

/* Colonne de liste commune */
body:not(.public-landing) .dashboard-module-list-column {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  min-height: 680px;
  max-height: calc(100vh - 140px);
  padding: 12px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .48), rgba(6, 12, 24, .32));
}

/* Outils de liste : recherche, filtres, création */
body:not(.public-landing) .dashboard-module-list-tools {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body:not(.public-landing) .dashboard-module-search-field,
body:not(.public-landing) .dashboard-module-filter-field select,
body:not(.public-landing) .embed-category-filter-field select {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  max-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(3, 7, 18, .48);
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

body:not(.public-landing) .dashboard-module-search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

body:not(.public-landing) .dashboard-module-create-button {
  width: 100%;
  min-height: 44px;
  max-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  justify-content: center;
  font-size: .95rem;
}

/* Liste et cartes communes */
body:not(.public-landing) .dashboard-module-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
  min-height: 0;
  margin: 0;
  padding-top: 6px;
}

body:not(.public-landing) .dashboard-module-list.empty-state {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, .18);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(3, 7, 18, .24);
}

body:not(.public-landing) .dashboard-module-list-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

body:not(.public-landing) .dashboard-module-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, .42);
  background: rgba(124, 156, 255, .07);
}

body:not(.public-landing) .dashboard-module-list-item.selected {
  border-color: rgba(66, 133, 244, .88);
  background: linear-gradient(135deg, rgba(59, 130, 246, .13), rgba(15, 23, 42, .38));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .18);
}

body:not(.public-landing) .dashboard-module-list-item.publication-attention {
  border-color: rgba(255, 209, 102, .42);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .14);
}

body:not(.public-landing) .dashboard-module-list-item.premium-locked-soft {
  opacity: .72;
}

body:not(.public-landing) .dashboard-module-list-item-top,
body:not(.public-landing) .dashboard-module-list-item-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-list-item-top h4 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .98rem;
  line-height: 1.25;
}

body:not(.public-landing) .dashboard-module-list-order-actions,
body:not(.public-landing) .dashboard-module-list-primary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-list-order-actions .icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}

body:not(.public-landing) .dashboard-module-list-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-list-primary-actions .button,
body:not(.public-landing) .dashboard-module-list-primary-actions .button-compact {
  min-width: 108px;
  min-height: 34px;
  padding-inline: 14px;
  border-radius: 999px;
  justify-content: center;
  white-space: nowrap;
  font-size: .76rem;
  font-weight: 800;
}

body:not(.public-landing) .dashboard-module-list-item-meta {
  display: none;
}

/* Colonne éditeur commune */
body:not(.public-landing) .dashboard-module-config-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-config-column > .ticket-hub-create-panel,
body:not(.public-landing) .dashboard-module-config-column > .embed-editor-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body:not(.public-landing) .dashboard-module-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
}

body:not(.public-landing) .dashboard-module-editor-topbar .eyebrow {
  display: none;
}

body:not(.public-landing) .dashboard-module-editor-topbar h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

body:not(.public-landing) .dashboard-module-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

body:not(.public-landing) .dashboard-module-editor-actions .button {
  min-height: 36px;
}

body:not(.public-landing) .dashboard-module-editor-actions .button-danger {
  border-color: rgba(251, 113, 133, .35);
  background: rgba(127, 29, 29, .2);
  color: #fda4af;
}

/* Etat vide commun */
body:not(.public-landing) .dashboard-module-empty-selection {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  background: rgba(255, 255, 255, .032);
  box-shadow: none;
}

body:not(.public-landing) .dashboard-module-empty-selection.hidden {
  display: none !important;
}

body:not(.public-landing) .dashboard-module-empty-selection-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 380px;
  text-align: center;
}

body:not(.public-landing) .dashboard-module-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(82, 125, 255, .5), rgba(111, 82, 255, .32));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

body:not(.public-landing) .dashboard-module-empty-selection h4 {
  margin: 0;
  font-size: 1.08rem;
}

body:not(.public-landing) .dashboard-module-empty-selection p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Cartes formulaire communes : même fond, même bordure, même lumière */
body:not(.public-landing) .dashboard-form-card,
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid,
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-types-panel,
body:not(.public-landing) .dashboard-module-config-column .embed-editor-section,
body:not(.public-landing) .dashboard-module-config-column .embed-fields-editor,
body:not(.public-landing) .dashboard-module-config-column .embed-media-grid,
body:not(.public-landing) .dashboard-module-config-column .embed-color-footer-grid {
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  background: rgba(255, 255, 255, .032);
  box-shadow: none;
  overflow: hidden;
}

/* Layout fonctionnel Tickets : uniquement placement, pas de style visuel */
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .52fr);
  gap: 0;
  padding: 0;
}

body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid > .field,
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid > .resource-create-panel,
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid > .ticket-panel-preview-card {
  min-width: 0;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  border-radius: 0;
  background: transparent;
}

body:not(.public-landing) .ticket-panel-order-field,
body:not(.public-landing) .ticket-panel-create-channel-option {
  display: none !important;
}

body:not(.public-landing) .ticket-panel-name-field,
body:not(.public-landing) #ticket-panel-channel-field {
  min-height: auto;
}

body:not(.public-landing) .ticket-panel-name-field {
  grid-column: 1 / -1;
}

body:not(.public-landing) #ticket-panel-channel-field {
  grid-column: 1 / -1;
}

body:not(.public-landing) .ticket-panel-message-description-field,
body:not(.public-landing) .ticket-panel-color-field {
  grid-column: 1 / 2;
}

body:not(.public-landing) .ticket-panel-preview-card {
  grid-column: 2 / 3;
  grid-row: 4 / span 3;
}

body:not(.public-landing) .ticket-panel-preview-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

body:not(.public-landing) .ticket-panel-discord-preview {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 170px;
  border-radius: 18px;
  overflow: hidden;
}

body:not(.public-landing) .ticket-panel-discord-preview::before {
  content: '';
  position: absolute;
  inset: 16px auto 16px 0;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: var(--panel-preview-color, #5865F2);
}

body:not(.public-landing) .ticket-panel-discord-content {
  padding-left: 0;
}

body:not(.public-landing) .ticket-panel-discord-content::before {
  display: none !important;
}

body:not(.public-landing) .ticket-panel-preview-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body:not(.public-landing) .ticket-panel-preview-buttons.is-empty {
  margin-top: 10px;
}

body:not(.public-landing) .ticket-panel-preview-empty {
  margin: 0;
  padding: 9px 12px;
  border: 1px dashed rgba(148, 163, 184, .24);
  border-radius: 10px;
  color: var(--muted);
  font-size: .88rem;
}

body:not(.public-landing) .ticket-panel-preview-button-primary { background: #5865f2; }
body:not(.public-landing) .ticket-panel-preview-button-secondary { background: #4e5058; }
body:not(.public-landing) .ticket-panel-preview-button-success { background: #248046; }
body:not(.public-landing) .ticket-panel-preview-button-danger { background: #da373c; }

body:not(.public-landing) .ticket-panel-simple-buttons-list {
  display: grid;
  gap: 8px;
}

body:not(.public-landing) .ticket-simple-button-row {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

body:not(.public-landing) .ticket-simple-button-main {
  min-width: 0;
}

body:not(.public-landing) .ticket-simple-button-main strong,
body:not(.public-landing) .ticket-simple-button-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .ticket-simple-button-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
}

/* Layout fonctionnel Embeds : uniquement placement, pas de style visuel */
body:not(.public-landing) .embed-editor-grid,
body:not(.public-landing) .embed-editor-form {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

body:not(.public-landing) .embed-editor-section,
body:not(.public-landing) .embed-color-footer-grid,
body:not(.public-landing) .embed-media-grid {
  padding: 0;
}

body:not(.public-landing) .embed-editor-section-basics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

body:not(.public-landing) .embed-editor-section-basics .embed-name-category-grid {
  display: contents;
}

body:not(.public-landing) .embed-editor-section-basics .dashboard-field,
body:not(.public-landing) .embed-editor-section-message > .dashboard-field,
body:not(.public-landing) .embed-color-footer-grid > .dashboard-field,
body:not(.public-landing) .embed-media-grid > .embed-image-uploader {
  min-width: 0;
  min-height: 118px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body:not(.public-landing) .embed-editor-section-basics .embed-name-category-grid > .dashboard-field:first-child,
body:not(.public-landing) .embed-color-footer-grid > .dashboard-field:first-child,
body:not(.public-landing) .embed-media-grid > .embed-image-uploader:first-child {
  border-right: 1px solid rgba(148, 163, 184, .10);
}

body:not(.public-landing) .embed-editor-section-basics > .resource-field {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(148, 163, 184, .10);
}

body:not(.public-landing) .embed-editor-section-message > .dashboard-field + .dashboard-field {
  border-top: 1px solid rgba(148, 163, 184, .10);
}

body:not(.public-landing) .embed-editor-preview-section {
  padding: 18px;
}

body:not(.public-landing) .embed-editor-preview-section .ticket-panel-preview-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

body:not(.public-landing) .embed-preview {
  display: block;
  min-height: 170px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(3, 7, 18, .48);
  overflow: hidden;
}

body:not(.public-landing) .embed-preview .discord-embed-preview {
  width: min(100%, 760px);
  max-width: 100%;
}

body:not(.public-landing) .embed-fields-editor {
  display: grid;
  gap: 12px;
  padding: 18px;
}

body:not(.public-landing) .embed-fields-editor > .section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

body:not(.public-landing) .embed-fields-list {
  display: grid;
  gap: 10px;
}

body:not(.public-landing) .embed-field-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 14px;
  background: rgba(3, 7, 18, .32);
  overflow: hidden;
}

body:not(.public-landing) .embed-field-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body:not(.public-landing) .embed-field-row-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr) minmax(104px, max-content) !important;
  gap: 10px !important;
  align-items: end !important;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

body:not(.public-landing) .embed-media-grid,
body:not(.public-landing) .embed-color-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

body:not(.public-landing) .embed-image-uploader,
body:not(.public-landing) .embed-image-preview-box,
body:not(.public-landing) .embed-color-control,
body:not(.public-landing) .embed-field-row-grid .emoji-input-wrap,
body:not(.public-landing) .embed-field-row-grid input,
body:not(.public-landing) .embed-field-row-grid textarea {
  min-width: 0;
  max-width: 100%;
}

/* Styles fonctionnels conservés hors socle list/editor */
.ticket-counters-list.is-readonly .ticket-counter-card {
  opacity: .64;
}

.modal-field-heading-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.modal-field-heading-main .eyebrow,
.modal-field-heading-main .modal-field-macro {
  margin: 0;
}

.ticket-archive-empty-selection {
  min-height: 420px;
}

.ticket-archive-card {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ticket-archive-card:hover {
  border-color: rgba(124, 156, 255, .36);
  background: rgba(20, 32, 58, 0.64);
}

.ticket-archive-card.selected {
  border-color: rgba(92, 150, 255, .68);
  background: linear-gradient(135deg, rgba(64, 120, 255, .16), rgba(255, 255, 255, .04));
  box-shadow: 0 0 0 1px rgba(92, 150, 255, .15), 0 16px 34px rgba(18, 76, 178, .12);
}

.ticket-archive-preview-panel.hidden,
.ticket-archive-empty-selection.hidden {
  display: none !important;
}

/* Responsive commun */
@media (max-width: 1180px) {
  body:not(.public-landing) .dashboard-module-workspace,
  body:not(.public-landing) .embed-editor-section-basics,
  body:not(.public-landing) .embed-media-grid,
  body:not(.public-landing) .embed-color-footer-grid,
  body:not(.public-landing) .embed-field-row-grid {
    grid-template-columns: 1fr !important;
  }

  body:not(.public-landing) .dashboard-module-list-column {
    position: static;
    min-height: auto;
    max-height: none;
  }

  body:not(.public-landing) .embed-editor-section-basics .embed-name-category-grid > .dashboard-field:first-child,
  body:not(.public-landing) .embed-color-footer-grid > .dashboard-field:first-child,
  body:not(.public-landing) .embed-media-grid > .embed-image-uploader:first-child {
    border-right: 0;
  }

  body:not(.public-landing) .embed-editor-section-basics .dashboard-field + .dashboard-field,
  body:not(.public-landing) .embed-color-footer-grid > .dashboard-field + .dashboard-field,
  body:not(.public-landing) .embed-media-grid > .embed-image-uploader + .embed-image-uploader {
    border-top: 1px solid rgba(148, 163, 184, .10);
  }

  body:not(.public-landing) .embed-field-inline.checkbox-field,
  body:not(.public-landing) .embed-field-inline {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid {
    grid-template-columns: 1fr;
  }

  body:not(.public-landing) .ticket-panel-name-field,
  body:not(.public-landing) #ticket-panel-channel-field,
  body:not(.public-landing) .ticket-panel-message-description-field,
  body:not(.public-landing) .ticket-panel-color-field,
  body:not(.public-landing) .ticket-panel-preview-card {
    grid-column: 1 / -1;
    min-height: 0;
  }

  body:not(.public-landing) .ticket-simple-button-row {
    grid-template-columns: 24px 34px minmax(0, 1fr) auto auto;
  }

  body:not(.public-landing) .ticket-simple-button-row .pill-toggle-button {
    grid-column: 3 / -1;
    width: fit-content;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .dashboard-module-list-item-top,
  body:not(.public-landing) .dashboard-module-list-item-bottom {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  body:not(.public-landing) .dashboard-module-list-order-actions,
  body:not(.public-landing) .dashboard-module-list-primary-actions {
    justify-content: flex-start;
  }

  body:not(.public-landing) .dashboard-module-list-primary-actions .button,
  body:not(.public-landing) .dashboard-module-list-primary-actions .button-compact,
  body:not(.public-landing) .dashboard-module-editor-actions,
  body:not(.public-landing) .dashboard-module-editor-actions .button {
    width: 100%;
  }
}


/* Phase V0.7.4.12.1 — corrections purge UI : actions Embeds + aperçu Tickets */
/* Tickets : description, couleur puis aperçu sur trois lignes lisibles. */
body:not(.public-landing) .dashboard-module-config-column .ticket-panel-message-description-field,
body:not(.public-landing) .dashboard-module-config-column .ticket-panel-color-field,
body:not(.public-landing) .dashboard-module-config-column .ticket-panel-preview-card {
  grid-column: 1 / -1;
  grid-row: auto;
}

body:not(.public-landing) .dashboard-module-config-column .ticket-panel-color-field {
  min-height: 96px;
}

body:not(.public-landing) .ticket-panel-preview-card {
  overflow: hidden;
}

/* Aperçu Discord Tickets : on borne l'avatar pour éviter qu'une image serveur prenne toute la carte. */
body:not(.public-landing) .ticket-panel-discord-preview {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 170px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(3, 7, 18, .48);
  overflow: hidden;
}

body:not(.public-landing) .ticket-panel-discord-avatar {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(148, 163, 184, .16);
}

body:not(.public-landing) .ticket-panel-discord-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body:not(.public-landing) .ticket-panel-discord-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-left: 0;
}

body:not(.public-landing) .ticket-panel-discord-author {
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--text);
}

body:not(.public-landing) .ticket-panel-discord-author span {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 5px;
  background: #5865f2;
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  vertical-align: middle;
}

body:not(.public-landing) #ticket-panel-preview-title {
  display: block;
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 800;
}

body:not(.public-landing) #ticket-panel-preview-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* Phase V0.7.4.12.3 — refresh Embed mutualisé + preview boutons Tickets */
body:not(.public-landing) .ticket-panel-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  pointer-events: none;
}

body:not(.public-landing) .ticket-panel-preview-button[aria-disabled="true"],
body:not(.public-landing) .ticket-panel-preview-button-disabled {
  background: #4e5058 !important;
  color: rgba(255,255,255,.62) !important;
  opacity: .72;
}

body:not(.public-landing) .embeds-card .embeds-page-heading .muted:empty {
  display: none;
}


/* Phase V0.7.4.13 — responsive dashboard shell commun
   Socle global uniquement : app-shell / sidebar / main-content / module shell.
   Ne pas recréer de variantes locales par module pour le responsive. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body:not(.public-landing) .app-shell,
body.auth-checking .app-shell,
body:not(.public-landing) .main-content,
body:not(.public-landing) .sidebar,
body:not(.public-landing) .dashboard-view,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .card,
body:not(.public-landing) .panel,
body:not(.public-landing) .hero,
body:not(.public-landing) .dashboard-page-header,
body:not(.public-landing) .module-context-card,
body:not(.public-landing) .dashboard-module-workspace,
body:not(.public-landing) .dashboard-module-list-column,
body:not(.public-landing) .dashboard-module-config-column,
body:not(.public-landing) .dashboard-module-editor-shell,
body:not(.public-landing) .ticket-hub-create-panel {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .main-content > *,
body:not(.public-landing) .dashboard-module-workspace > *,
body:not(.public-landing) .settings-grid > *,
body:not(.public-landing) .resource-picker,
body:not(.public-landing) .emoji-input-wrap,
body:not(.public-landing) input,
body:not(.public-landing) textarea,
body:not(.public-landing) select {
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

body:not(.public-landing) .dashboard-tabs::-webkit-scrollbar,
body:not(.public-landing) .subtabs::-webkit-scrollbar {
  height: 6px;
}

/* Tablette : le shell principal passe en pile et la navigation reste lisible. */
@media (max-width: 1120px) {
  body:not(.public-landing) .app-shell,
  body.auth-checking .app-shell {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 16px !important;
    margin: 0 !important;
  }

  body:not(.public-landing) .sidebar {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body:not(.public-landing) .main-content {
    width: 100% !important;
    padding: 0 !important;
  }

  body:not(.public-landing) .dashboard-sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body:not(.public-landing) .sidebar-footer-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.public-landing) .dashboard-module-workspace,
  body:not(.public-landing) .ticket-panel-workspace,
  body:not(.public-landing) .embeds-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) .dashboard-module-list-column {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}

/* Mobile : le contenu ne déborde plus, les headers et cartes deviennent compacts. */
@media (max-width: 760px) {
  body:not(.public-landing) .app-shell,
  body.auth-checking .app-shell {
    padding: 12px !important;
    gap: 14px !important;
  }

  body:not(.public-landing) .sidebar {
    gap: 12px !important;
  }

  body:not(.public-landing) .brand {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  body:not(.public-landing) .brand h1,
  body:not(.public-landing) .brand-title {
    font-size: 1.12rem !important;
    line-height: 1.05;
  }

  body:not(.public-landing) .brand-mark {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 16px !important;
  }

  body:not(.public-landing) .sidebar-collapse-toggle {
    display: none !important;
  }

  body:not(.public-landing) .guild-panel,
  body:not(.public-landing) .auth-panel,
  body:not(.public-landing) .status-panel,
  body:not(.public-landing) .sidebar-help-card,
  body:not(.public-landing) .sidebar-user-card {
    border-radius: 20px !important;
    padding: 14px !important;
  }

  body:not(.public-landing) .dashboard-sidebar-nav,
  body:not(.public-landing) .sidebar-footer-stack {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body:not(.public-landing) .dashboard-nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.public-landing) .dashboard-nav-group h2 {
    grid-column: 1 / -1;
    margin: 10px 6px 2px;
  }

  body:not(.public-landing) .dashboard-nav-link {
    min-height: 42px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: .9rem;
  }

  body:not(.public-landing) .dashboard-nav-link > span:first-child {
    width: 22px;
    height: 22px;
  }

  body:not(.public-landing) .hero,
  body:not(.public-landing) .dashboard-page-header,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body:not(.public-landing) .module-context-card {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 14px !important;
    padding: 18px !important;
    border-radius: 22px !important;
    text-align: left !important;
  }

  body:not(.public-landing) .dashboard-page-header-icon,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
  body:not(.public-landing) .module-context-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 16px !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body:not(.public-landing) .module-context-copy h3 {
    font-size: clamp(1.9rem, 10vw, 2.7rem) !important;
    line-height: 1 !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper) {
    font-size: .92rem !important;
  }

  body:not(.public-landing) .card,
  body:not(.public-landing) .panel,
  body:not(.public-landing) .tickets-panels-card,
  body:not(.public-landing) .embeds-card {
    border-radius: 22px !important;
  }

  body:not(.public-landing) .dashboard-module-list-column,
  body:not(.public-landing) .dashboard-module-config-column,
  body:not(.public-landing) .dashboard-module-empty-selection {
    border-radius: 20px !important;
  }

  body:not(.public-landing) .dashboard-module-editor-topbar,
  body:not(.public-landing) .ticket-hub-create-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  body:not(.public-landing) .dashboard-module-editor-actions,
  body:not(.public-landing) .ticket-panel-editor-heading-actions {
    justify-content: stretch !important;
  }

  body:not(.public-landing) .dashboard-module-editor-actions .button,
  body:not(.public-landing) .ticket-panel-editor-heading-actions .button {
    width: 100%;
    justify-content: center;
  }

  body:not(.public-landing) .settings-grid,
  body:not(.public-landing) .settings-grid-compact,
  body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid,
  body:not(.public-landing) .embed-editor-section-basics,
  body:not(.public-landing) .embed-media-grid,
  body:not(.public-landing) .embed-color-footer-grid,
  body:not(.public-landing) .embed-field-row-grid,
  body:not(.public-landing) .modules-grid,
  body:not(.public-landing) .kpi-grid,
  body:not(.public-landing) .welcome-grid,
  body:not(.public-landing) .config-sections {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) .span-2,
  body:not(.public-landing) .ticket-panel-preview-card,
  body:not(.public-landing) .ticket-panel-color-field,
  body:not(.public-landing) .ticket-panel-message-description-field,
  body:not(.public-landing) .ticket-panel-title-field,
  body:not(.public-landing) .ticket-panel-name-field,
  body:not(.public-landing) #ticket-panel-channel-field {
    grid-column: 1 / -1 !important;
  }

  body:not(.public-landing) .ticket-panel-discord-preview,
  body:not(.public-landing) .embed-preview {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  body:not(.public-landing) .ticket-simple-button-row {
    grid-template-columns: 24px 32px minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  body:not(.public-landing) .ticket-simple-button-row .pill-toggle-button,
  body:not(.public-landing) .ticket-simple-button-row .icon-button:nth-last-child(-n + 2) {
    grid-column: auto !important;
  }
}

/* Petit mobile : navigation en une colonne et actions pleine largeur. */
@media (max-width: 520px) {
  body:not(.public-landing) .app-shell,
  body.auth-checking .app-shell {
    padding: 10px !important;
  }

  body:not(.public-landing) .dashboard-nav-group {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.public-landing) .panel-heading,
  body:not(.public-landing) .card-heading,
  body:not(.public-landing) .inline-heading,
  body:not(.public-landing) .ticket-buttons-header,
  body:not(.public-landing) .embed-fields-editor > .section-heading-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body:not(.public-landing) .button-row,
  body:not(.public-landing) .button-row-inline {
    width: 100%;
  }

  body:not(.public-landing) .button-row .button,
  body:not(.public-landing) .button-row-inline .button,
  body:not(.public-landing) .ticket-buttons-header .button,
  body:not(.public-landing) .embed-fields-editor > .section-heading-row .button {
    width: 100%;
    justify-content: center;
  }

  body:not(.public-landing) .dashboard-module-list-item {
    padding: 12px !important;
  }

  body:not(.public-landing) .dashboard-module-list-item-top,
  body:not(.public-landing) .dashboard-module-list-item-bottom {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  body:not(.public-landing) .dashboard-module-list-order-actions,
  body:not(.public-landing) .dashboard-module-list-primary-actions {
    justify-content: flex-start !important;
  }

  body:not(.public-landing) .dashboard-module-list-primary-actions .button {
    width: 100%;
  }
}

/* Phase V0.7.4.14.1 — shell mobile dédié : topbar persistante + navigation mobile nettoyée */
body:not(.public-landing) .mobile-dashboard-topbar,
body:not(.public-landing) .mobile-sidebar-backdrop,
body:not(.public-landing) .mobile-sidebar-close {
  display: none;
}

@media (max-width: 900px) {
  body:not(.public-landing) {
    overflow-x: hidden;
  }

  body:not(.public-landing).dashboard-mobile-nav-open {
    overflow: hidden;
  }

  body:not(.public-landing) .app-shell,
  body.auth-checking .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body:not(.public-landing) .mobile-dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    background: rgba(10, 15, 28, .96);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0,0,0,.24);
  }

  body:not(.public-landing) .mobile-menu-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 14px;
    font-size: 1.25rem;
  }

  body:not(.public-landing) .mobile-topbar-brand {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  body:not(.public-landing) .mobile-topbar-brand strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: 1.04rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.public-landing) .mobile-topbar-brand small {
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.public-landing) .mobile-topbar-phase {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:not(.public-landing) .mobile-sidebar-backdrop[hidden] {
    display: none !important;
  }

  body:not(.public-landing).dashboard-mobile-nav-open .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1240;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .56);
    backdrop-filter: blur(4px);
  }

  body:not(.public-landing) .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 1250;
    display: flex !important;
    width: min(86vw, 360px) !important;
    max-width: calc(100vw - 36px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 18px !important;
    gap: 14px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-right: 1px solid rgba(148, 163, 184, .18) !important;
    border-radius: 0 28px 28px 0 !important;
    background: linear-gradient(180deg, rgba(11, 18, 32, .98), rgba(5, 10, 20, .98)) !important;
    box-shadow: 28px 0 90px rgba(0,0,0,.45) !important;
    transform: translateX(-110%);
    transition: transform 180ms ease;
    scrollbar-gutter: stable;
  }

  body:not(.public-landing).dashboard-mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body:not(.public-landing) .mobile-sidebar-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 14px;
    font-size: 1.24rem;
  }

  body:not(.public-landing) .sidebar .brand {
    padding-right: 50px !important;
  }

  body:not(.public-landing) .sidebar-collapse-toggle {
    display: none !important;
  }

  body.dashboard-sidebar-collapsed:not(.public-landing) .app-shell {
    grid-template-columns: none !important;
  }

  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar {
    width: min(86vw, 360px) !important;
  }

  body.dashboard-sidebar-collapsed:not(.public-landing) .brand-copy,
  body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link span:not(:first-child),
  body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-group h2,
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-help-card span:not(.sidebar-help-icon),
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-user-card > span:not(.sidebar-user-avatar),
  body.dashboard-sidebar-collapsed:not(.public-landing) .sidebar-logout-button {
    display: initial !important;
  }

  body:not(.public-landing) .main-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 16px !important;
    overflow: visible !important;
  }

  body:not(.public-landing) .hero {
    display: none !important;
  }

  body:not(.public-landing) #guild-view,
  body:not(.public-landing) #global-admin-view,
  body:not(.public-landing) #empty-view,
  body:not(.public-landing) #changelog-view {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body:not(.public-landing) .module-context-card,
  body:not(.public-landing) .dashboard-page-header,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    margin: 0 0 16px !important;
  }

  body:not(.public-landing) .dashboard-tabs,
  body:not(.public-landing) .superadmin-tabs,
  body:not(.public-landing) .twitch-subtabs,
  body:not(.public-landing) .member-lifecycle-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 6px !important;
    scrollbar-width: none;
  }

  body:not(.public-landing) .dashboard-tabs::-webkit-scrollbar,
  body:not(.public-landing) .superadmin-tabs::-webkit-scrollbar,
  body:not(.public-landing) .twitch-subtabs::-webkit-scrollbar,
  body:not(.public-landing) .member-lifecycle-tabs::-webkit-scrollbar {
    display: none;
  }

  body:not(.public-landing) .dashboard-tabs .dashboard-tab,
  body:not(.public-landing) .superadmin-tabs .dashboard-tab,
  body:not(.public-landing) .twitch-subtabs .dashboard-tab,
  body:not(.public-landing) .member-lifecycle-tabs .dashboard-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body:not(.public-landing) .module-hub-card-grid,
  body:not(.public-landing) .modules-grid,
  body:not(.public-landing) .config-sections,
  body:not(.public-landing) .settings-grid,
  body:not(.public-landing) .settings-grid-compact,
  body:not(.public-landing) .dashboard-module-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) .dashboard-module-list-column,
  body:not(.public-landing) .dashboard-module-config-column {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .mobile-dashboard-topbar {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  body:not(.public-landing) .mobile-topbar-phase {
    display: none;
  }

  body:not(.public-landing) .main-content {
    padding: 12px !important;
  }

  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body:not(.public-landing) .module-context-copy h3 {
    font-size: clamp(1.75rem, 12vw, 2.35rem) !important;
  }
}


/* Phase V0.7.4.14.1 — topbar mobile persistante et actions unifiées */
@media (max-width: 1120px) {
  body:not(.public-landing) .mobile-dashboard-topbar {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 1230 !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  }

  body:not(.public-landing) .mobile-topbar-phase {
    display: none !important;
  }

  body:not(.public-landing) .mobile-topbar-user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: rgba(15, 23, 42, .64);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    cursor: pointer;
  }

  body:not(.public-landing) .mobile-topbar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124,156,255,.42), rgba(139,92,246,.32));
    color: #f8fafc;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1;
  }

  body:not(.public-landing) .mobile-topbar-user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body:not(.public-landing) .main-content {
    padding-top: 86px !important;
  }

  body:not(.public-landing) #guild-view > .dashboard-tabs {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .mobile-dashboard-topbar {
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
  }

  body:not(.public-landing) .mobile-topbar-user-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  body:not(.public-landing) .mobile-topbar-user-avatar {
    width: 32px;
    height: 32px;
  }

  body:not(.public-landing) .main-content {
    padding-top: 82px !important;
  }
}

/* Phase V0.7.4.14.2 — menus mobiles en scrollers lisibles */
@media (max-width: 900px) {
  body:not(.public-landing) .dashboard-scroll-menu,
  body:not(.public-landing) .subtabs,
  body:not(.public-landing) .superadmin-tabs,
  body:not(.public-landing) .twitch-subtabs,
  body:not(.public-landing) .member-lifecycle-tabs,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 9px 12px 10px !important;
    border-radius: 22px !important;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(157, 180, 255, .42) transparent;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.public-landing) .dashboard-scroll-menu::-webkit-scrollbar,
  body:not(.public-landing) .subtabs::-webkit-scrollbar,
  body:not(.public-landing) .superadmin-tabs::-webkit-scrollbar,
  body:not(.public-landing) .twitch-subtabs::-webkit-scrollbar,
  body:not(.public-landing) .member-lifecycle-tabs::-webkit-scrollbar,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters::-webkit-scrollbar {
    height: 4px;
  }

  body:not(.public-landing) .dashboard-scroll-menu::-webkit-scrollbar-track,
  body:not(.public-landing) .subtabs::-webkit-scrollbar-track,
  body:not(.public-landing) .superadmin-tabs::-webkit-scrollbar-track,
  body:not(.public-landing) .twitch-subtabs::-webkit-scrollbar-track,
  body:not(.public-landing) .member-lifecycle-tabs::-webkit-scrollbar-track,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters::-webkit-scrollbar-track {
    background: transparent;
  }

  body:not(.public-landing) .dashboard-scroll-menu::-webkit-scrollbar-thumb,
  body:not(.public-landing) .subtabs::-webkit-scrollbar-thumb,
  body:not(.public-landing) .superadmin-tabs::-webkit-scrollbar-thumb,
  body:not(.public-landing) .twitch-subtabs::-webkit-scrollbar-thumb,
  body:not(.public-landing) .member-lifecycle-tabs::-webkit-scrollbar-thumb,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(157, 180, 255, .42);
  }

  body:not(.public-landing) .dashboard-scroll-menu > *,
  body:not(.public-landing) .subtabs > *,
  body:not(.public-landing) .superadmin-tabs > *,
  body:not(.public-landing) .twitch-subtabs > *,
  body:not(.public-landing) .member-lifecycle-tabs > *,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > * {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
  }

  body:not(.public-landing) .subtab,
  body:not(.public-landing) .superadmin-tabs .dashboard-tab,
  body:not(.public-landing) .twitch-subtabs .dashboard-tab,
  body:not(.public-landing) .member-lifecycle-tabs .dashboard-tab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filter {
    min-height: 42px;
    padding-inline: 16px !important;
  }

  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters {
    margin: 0 0 18px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, .14) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filter {
    border-radius: 14px !important;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .subtabs,
  body:not(.public-landing) .superadmin-tabs,
  body:not(.public-landing) .twitch-subtabs,
  body:not(.public-landing) .member-lifecycle-tabs,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters {
    margin-left: calc(-1 * min(10px, 3vw));
    margin-right: calc(-1 * min(10px, 3vw));
    width: calc(100% + min(20px, 6vw)) !important;
    max-width: calc(100% + min(20px, 6vw)) !important;
  }
}


/* Phase V0.7.4.14.3 — menus mobiles visibles uniquement dans leur module + scrollers lisibles */
@media (max-width: 900px) {
  /* La règle V0.7.4.14.2 transformait toutes les subtabs en flex, y compris les menus cachés.
     On rétablit la règle globale : un élément caché reste caché, même s'il est scrollable en mobile. */
  body:not(.public-landing) .subtabs.hidden,
  body:not(.public-landing) .subtabs-inline.hidden,
  body:not(.public-landing) .superadmin-tabs.hidden,
  body:not(.public-landing) .twitch-subtabs.hidden,
  body:not(.public-landing) .member-lifecycle-tabs.hidden,
  body:not(.public-landing) .nextcloud-subtabs.hidden,
  body:not(.public-landing) [data-tab-section].hidden {
    display: none !important;
  }

  /* Scroller commun plus lisible : les onglets gardent leur texte complet et ne se compressent pas. */
  body:not(.public-landing) .subtabs:not(.hidden),
  body:not(.public-landing) .subtabs-inline:not(.hidden),
  body:not(.public-landing) .superadmin-tabs:not(.hidden),
  body:not(.public-landing) .twitch-subtabs:not(.hidden),
  body:not(.public-landing) .member-lifecycle-tabs:not(.hidden),
  body:not(.public-landing) .nextcloud-subtabs:not(.hidden),
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters:not(.hidden) {
    justify-content: flex-start !important;
    scroll-padding-inline: 14px;
    overscroll-behavior-inline: contain;
  }

  body:not(.public-landing) .subtabs:not(.hidden) .subtab,
  body:not(.public-landing) .subtabs-inline:not(.hidden) .subtab,
  body:not(.public-landing) .superadmin-tabs:not(.hidden) .dashboard-tab,
  body:not(.public-landing) .twitch-subtabs:not(.hidden) .dashboard-tab,
  body:not(.public-landing) .member-lifecycle-tabs:not(.hidden) .dashboard-tab,
  body:not(.public-landing) .nextcloud-subtabs:not(.hidden) .subtab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters:not(.hidden) .modules-hub-filter,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters:not(.hidden) .dashboard-filter-chip {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Sur mobile, les menus horizontaux sont des rails de navigation, pas des boîtes qui tentent de centrer tout le contenu. */
  body:not(.public-landing) .subtabs:not(.hidden),
  body:not(.public-landing) .subtabs-inline:not(.hidden),
  body:not(.public-landing) .twitch-subtabs:not(.hidden),
  body:not(.public-landing) .member-lifecycle-tabs:not(.hidden),
  body:not(.public-landing) .nextcloud-subtabs:not(.hidden) {
    border-radius: 18px !important;
    background: rgba(3, 9, 20, .34) !important;
  }

  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters:not(.hidden) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 2px 8px !important;
  }
}


/* Phase V0.7.4.14.4 — responsive mobile polish */
@media (max-width: 900px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    align-items: start !important;
    gap: 16px !important;
    padding: 22px 18px !important;
    min-height: 220px !important;
  }

  body:not(.public-landing) .dashboard-page-header-icon,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
  body:not(.public-landing) .module-context-icon {
    display: none !important;
  }

  body:not(.public-landing) .dashboard-page-header-copy,
  body:not(.public-landing) .module-context-copy,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy {
    display: grid !important;
    gap: 10px !important;
    align-content: start !important;
  }

  body:not(.public-landing) .dashboard-page-header-eyebrow,
  body:not(.public-landing) .dashboard-page-header .eyebrow {
    margin: 0 !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body:not(.public-landing) .module-context-copy h3 {
    margin: 0 !important;
    line-height: 1.04 !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    margin: 0 !important;
    line-height: 1.45 !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body:not(.public-landing) .dashboard-page-header-actions,
  body:not(.public-landing) .module-context-actions {
    margin-top: 2px !important;
    align-self: end !important;
  }

  body:not(.public-landing) .dashboard-scroll-menu,
  body:not(.public-landing) .subtabs,
  body:not(.public-landing) .superadmin-tabs,
  body:not(.public-landing) .twitch-subtabs,
  body:not(.public-landing) .member-lifecycle-tabs,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters,
  body:not(.public-landing) .dashboard-tabs {
    padding: 10px 14px 12px !important;
    gap: 12px !important;
  }

  body:not(.public-landing) .dashboard-tabs .dashboard-tab,
  body:not(.public-landing) .subtabs .subtab,
  body:not(.public-landing) .superadmin-tabs .dashboard-tab,
  body:not(.public-landing) .twitch-subtabs .dashboard-tab,
  body:not(.public-landing) .member-lifecycle-tabs .dashboard-tab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > button,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .button,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .tab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .dashboard-tab {
    flex: 0 0 auto !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow: visible !important;
    scroll-snap-align: start;
  }

  body:not(.public-landing) .member-lifecycle-card-preview-image-block,
  body:not(.public-landing) .member-lifecycle-card-preview-frame,
  body:not(.public-landing) .member-lifecycle-card-preview-frame img {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body:not(.public-landing) .member-lifecycle-preview-panel,
  body:not(.public-landing) .member-lifecycle-preview-block,
  body:not(.public-landing) .member-lifecycle-public-preview,
  body:not(.public-landing) .member-lifecycle-public-preview-stack {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body:not(.public-landing) .member-lifecycle-card-preview-frame {
    overflow: hidden !important;
  }

  body:not(.public-landing) .member-lifecycle-card-preview-frame img {
    display: block !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    padding: 24px 18px !important;
    min-height: 236px !important;
    gap: 14px !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body:not(.public-landing) .module-context-copy h3 {
    font-size: clamp(1.95rem, 11vw, 2.55rem) !important;
    line-height: 1.06 !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    font-size: .98rem !important;
    line-height: 1.5 !important;
  }

  body:not(.public-landing) .dashboard-page-header-actions,
  body:not(.public-landing) .module-context-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  body:not(.public-landing) .dashboard-tabs .dashboard-tab,
  body:not(.public-landing) .subtabs .subtab,
  body:not(.public-landing) .superadmin-tabs .dashboard-tab,
  body:not(.public-landing) .twitch-subtabs .dashboard-tab,
  body:not(.public-landing) .member-lifecycle-tabs .dashboard-tab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > button,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .button,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .tab,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-filters > .dashboard-tab {
    min-height: 42px !important;
    padding: 0 14px !important;
    font-size: .94rem !important;
  }
}


/* Phase V0.7.4.14.5 — mobile headers sans compression */
@media (max-width: 900px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    align-content: start !important;
    padding: 24px 20px !important;
    overflow: visible !important;
  }

  body:not(.public-landing) .dashboard-page-header-copy,
  body:not(.public-landing) .module-context-copy,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    align-content: start !important;
    align-items: start !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  body:not(.public-landing) .dashboard-page-header-eyebrow,
  body:not(.public-landing) .dashboard-page-header .eyebrow,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .eyebrow,
  body:not(.public-landing) .module-context-copy .eyebrow,
  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
  body:not(.public-landing) .module-context-copy h3,
  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
  body:not(.public-landing) .module-context-copy h3 {
    display: block !important;
    align-items: unset !important;
    font-size: clamp(2rem, 7vw, 2.55rem) !important;
    line-height: 1.08 !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    display: block !important;
    font-size: .98rem !important;
    line-height: 1.5 !important;
  }

  body:not(.public-landing) .dashboard-page-header-actions,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-actions,
  body:not(.public-landing) .module-context-actions {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
    justify-content: flex-start !important;
    margin-top: 2px !important;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    padding: 24px 18px !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
  body:not(.public-landing) .module-context-copy h3 {
    font-size: clamp(1.85rem, 10vw, 2.35rem) !important;
  }
}

@media (max-width: 360px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    padding: 22px 16px !important;
  }

  body:not(.public-landing) .dashboard-page-header-title,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro h3,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy h3,
  body:not(.public-landing) .module-context-copy h3 {
    font-size: clamp(1.7rem, 11vw, 2.05rem) !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    font-size: .92rem !important;
    line-height: 1.48 !important;
  }
}


/* Phase V0.7.4.14.6 — headers medium sans crop + previews bornées */
@media (max-width: 1280px) and (min-width: 901px) {
  body:not(.public-landing) .dashboard-page-header,
  body:not(.public-landing) .module-context-card,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro {
    height: auto !important;
    min-height: 176px !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: center !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  body:not(.public-landing) .dashboard-page-header-copy,
  body:not(.public-landing) .module-context-copy,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-copy {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    gap: 8px !important;
    align-content: center !important;
    overflow: visible !important;
  }

  body:not(.public-landing) .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .dashboard-page-header-description,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro .muted,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .dashboard-page-header-description,
  body:not(.public-landing) .module-context-copy > .muted:not(.module-context-helper),
  body:not(.public-landing) .dashboard-page-header-helper,
  body:not(.public-landing) .module-context-helper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.42 !important;
  }
}

body:not(.public-landing) .member-lifecycle-card-preview-image-block,
body:not(.public-landing) .member-lifecycle-card-preview-frame {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

body:not(.public-landing) .member-lifecycle-card-preview-frame img {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


/* Phase V0.7.5.1.1 — correctifs Réponses auto : socle commun réel */
body:not(.public-landing) .auto-responses-card.tickets-panels-card {
  padding: 24px;
  border: 1px solid rgba(145,169,255,.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124,156,255,.075), transparent 21rem),
    linear-gradient(145deg, rgba(15, 26, 46, .72), rgba(6, 13, 26, .70));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.032), 0 14px 42px rgba(0,0,0,.16);
}

body:not(.public-landing) .auto-responses-card .card-heading {
  margin-bottom: 18px;
}

body:not(.public-landing) .auto-response-editor-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body:not(.public-landing) .auto-response-editor-panel.hidden {
  display: none !important;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card,
body:not(.public-landing) .auto-response-messages-section,
body:not(.public-landing) .auto-response-message-card {
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .auto-response-messages-section .section-heading-row {
  align-items: start;
  gap: 12px;
}

body:not(.public-landing) .auto-response-messages-section .button-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

body:not(.public-landing) .dashboard-preview-modal,
body:not(.public-landing) .dashboard-modal {
  z-index: 5000;
}

body:not(.public-landing) .dashboard-preview-modal .dashboard-modal-backdrop {
  background: rgba(4, 9, 18, .78);
  backdrop-filter: blur(7px);
}

body:not(.public-landing) .dashboard-preview-card {
  width: min(940px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

body:not(.public-landing) .dashboard-preview-content,
body:not(.public-landing) .dashboard-preview-content > *,
body:not(.public-landing) .dashboard-preview-content .auto-response-preview-block,
body:not(.public-landing) .dashboard-preview-content .discord-embed-preview,
body:not(.public-landing) .dashboard-preview-content .embed-preview-content,
body:not(.public-landing) .dashboard-preview-content .auto-response-preview-text {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  body:not(.public-landing) .auto-responses-card.tickets-panels-card {
    padding: 18px;
  }

  body:not(.public-landing) .auto-response-messages-section .section-heading-row,
  body:not(.public-landing) .auto-response-messages-section .button-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch;
  }

  body:not(.public-landing) .auto-response-messages-section .button-row .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  body:not(.public-landing) .auto-responses-card.tickets-panels-card {
    padding: 14px;
    border-radius: 22px;
  }

  body:not(.public-landing) .dashboard-preview-modal {
    padding: 12px;
  }

  body:not(.public-landing) .dashboard-preview-card {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    border-radius: 22px;
  }
}


/* Phase V0.7.5.1.2 — Réponses auto : actions cohérentes + champs lisibles */
body:not(.public-landing) #auto-response-editor-state {
  display: none !important;
}

body:not(.public-landing) #auto-response-enabled-input[hidden] {
  display: none !important;
}

body:not(.public-landing) .auto-response-description-textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.45;
}

body:not(.public-landing) .auto-responses-list .dashboard-module-list-primary-actions .button {
  min-width: 108px;
}

body:not(.public-landing) .auto-response-messages-editor > .muted {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, .22);
  border-radius: 14px;
  background: rgba(3, 7, 18, .26);
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > #auto-response-enabled-input {
  display: none !important;
}


/* Phase V0.7.5.1.3 — Réponses auto : états, libellés et aides */
body:not(.public-landing) #auto-response-editor-state {
  display: none !important;
}

body:not(.public-landing) .field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

body:not(.public-landing) .field-label-with-help > span:first-child {
  min-width: 0;
}

body:not(.public-landing) .field-label-with-help .field-help,
body:not(.public-landing) .field-label-with-help > button.field-help {
  flex: 0 0 18px;
}

body:not(.public-landing) .auto-response-description-field,
body:not(.public-landing) .auto-response-description-field textarea {
  min-width: 0;
}

body:not(.public-landing) .auto-response-description-textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

body:not(.public-landing) .auto-response-form-grid .auto-response-description-field {
  align-self: stretch;
}


/* Réponses auto : les bulles d’aide doivent passer au-dessus des cartes voisines. */
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .field,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .checkbox-field,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-send-row,
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-messages-section {
  overflow: visible !important;
}


/* Phase V0.7.5.1.4 — Réponses auto : derniers ajustements formulaire */
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-name-field {
  align-self: start !important;
  min-height: 118px !important;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-description-field {
  align-self: stretch !important;
}

body:not(.public-landing) .auto-response-delete-toggle .field-help::after {
  left: auto !important;
  right: 0 !important;
  width: min(340px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  transform: translate(0, -4px) !important;
}

body:not(.public-landing) .auto-response-delete-toggle .field-help.tooltip-visible::after {
  transform: translate(0, 0) !important;
}

body:not(.public-landing) .auto-response-delete-toggle .field-help::before {
  left: auto !important;
  right: 4px !important;
  transform: rotate(45deg) translateY(-4px) !important;
}

body:not(.public-landing) .auto-response-delete-toggle .field-help.tooltip-visible::before {
  transform: rotate(45deg) translateY(0) !important;
}


/* Phase V0.7.5.1.5 — Réponses auto : première ligne formulaire alignée */
body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-name-field {
  align-self: stretch !important;
  display: grid !important;
  align-content: start !important;
  grid-auto-rows: max-content !important;
  gap: 10px !important;
  min-height: 118px !important;
}

body:not(.public-landing) .auto-response-form-grid.dashboard-form-card > .auto-response-description-field {
  align-self: stretch !important;
  display: grid !important;
  align-content: start !important;
  grid-auto-rows: max-content !important;
  gap: 10px !important;
}

body:not(.public-landing) .auto-response-name-field #auto-response-name-input {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
}

/* Phase V0.7.5.2 — Arrivées / Départs sur socle commun */
body:not(.public-landing) .member-lifecycle-card.tickets-panels-card {
  padding: 24px;
  border: 1px solid rgba(145,169,255,.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124,156,255,.075), transparent 21rem),
    linear-gradient(145deg, rgba(15, 26, 46, .72), rgba(6, 13, 26, .70));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.032), 0 14px 42px rgba(0,0,0,.16);
  overflow: visible;
}

body:not(.public-landing) .member-lifecycle-card .member-lifecycle-page-tools {
  margin-bottom: 18px;
}

body:not(.public-landing) .member-lifecycle-toolbar-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

body:not(.public-landing) .member-lifecycle-toolbar-actions .icon-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
}

body:not(.public-landing) .member-lifecycle-card .member-lifecycle-subtabs {
  margin-bottom: 18px;
}

body:not(.public-landing) .member-lifecycle-card .member-lifecycle-tab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 18px;
  align-items: start;
}

body:not(.public-landing) .member-lifecycle-settings-panel.dashboard-form-card,
body:not(.public-landing) .member-lifecycle-preview-panel.dashboard-form-card,
body:not(.public-landing) .member-lifecycle-events-panel.dashboard-form-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  background: rgba(255, 255, 255, .032);
  box-shadow: none;
  overflow: visible;
}

body:not(.public-landing) .member-lifecycle-settings-panel.dashboard-form-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin: 0;
}

body:not(.public-landing) .member-lifecycle-preview-panel.dashboard-form-card {
  position: sticky;
  top: 18px;
}

body:not(.public-landing) .member-lifecycle-message-builder.dashboard-form-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 18px;
  background: rgba(255, 255, 255, .032);
  box-shadow: none;
  overflow: visible;
}

body:not(.public-landing) .member-lifecycle-events-panel.dashboard-form-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .15);
}

body:not(.public-landing) .member-lifecycle-card .field-label-with-help,
body:not(.public-landing) .member-lifecycle-card .compact-heading-row,
body:not(.public-landing) .member-lifecycle-card .section-heading-row {
  min-width: 0;
  overflow: visible;
}

body:not(.public-landing) .member-lifecycle-card .field-help::before,
body:not(.public-landing) .member-lifecycle-card .field-help::after {
  z-index: 5200;
}

body:not(.public-landing) .member-lifecycle-card-preview-frame,
body:not(.public-landing) .member-lifecycle-card-preview-frame img,
body:not(.public-landing) .member-lifecycle-public-preview,
body:not(.public-landing) .member-lifecycle-public-preview-stack {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body:not(.public-landing) .member-lifecycle-card-preview-frame {
  overflow: hidden;
}

@media (max-width: 1180px) {
  body:not(.public-landing) .member-lifecycle-card.tickets-panels-card {
    padding: 18px;
  }

  body:not(.public-landing) .member-lifecycle-card .member-lifecycle-tab-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.public-landing) .member-lifecycle-preview-panel.dashboard-form-card {
    position: static;
  }
}

@media (max-width: 720px) {
  body:not(.public-landing) .member-lifecycle-toolbar-actions,
  body:not(.public-landing) .member-lifecycle-toolbar-actions .button {
    width: 100%;
  }

  body:not(.public-landing) .member-lifecycle-toolbar-actions {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
  }
}


/* Phase V0.7.5.3 — Twitch / Nextcloud / Administration : migration au socle commun */
body:not(.public-landing) .guild-membership-card.dashboard-form-card,
body:not(.public-landing) .profile-card.dashboard-form-card,
body:not(.public-landing) .modules-card.dashboard-form-card,
body:not(.public-landing) .nextcloud-card.dashboard-form-card,
body:not(.public-landing) .twitch-planning-card.dashboard-form-card,
body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card,
body:not(.public-landing) .twitch-banners-card.dashboard-form-card {
  display: grid;
  gap: 18px;
  padding: 28px;
}

body:not(.public-landing) .guild-membership-card.dashboard-form-card > .card-heading,
body:not(.public-landing) .profile-card.dashboard-form-card > .card-heading,
body:not(.public-landing) .modules-card.dashboard-form-card > .card-heading,
body:not(.public-landing) .nextcloud-card.dashboard-form-card > .card-heading,
body:not(.public-landing) .twitch-planning-card.dashboard-form-card .twitch-section-heading,
body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card > .card-heading,
body:not(.public-landing) .twitch-banners-card.dashboard-form-card > .card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

body:not(.public-landing) .dashboard-shared-action-toolbar,
body:not(.public-landing) .ticket-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body:not(.public-landing) .nextcloud-editor-section.dashboard-form-card,
body:not(.public-landing) .twitch-weekly-reminder-panel.dashboard-form-card,
body:not(.public-landing) .module-disabled-panel.dashboard-form-card,
body:not(.public-landing) .planning-preview-editor,
body:not(.public-landing) .planning-example-breakdown,
body:not(.public-landing) .planning-format-preview,
body:not(.public-landing) .bot-identity-panel,
body:not(.public-landing) .bot-media-column .dashboard-field,
body:not(.public-landing) .bot-form-column .dashboard-field,
body:not(.public-landing) .bot-preview-column,
body:not(.public-landing) .nextcloud-status-panel,
body:not(.public-landing) .nextcloud-decks-editor,
body:not(.public-landing) .nextcloud-archives-list,
body:not(.public-landing) .twitch-banners-panel {
  border-color: rgba(148, 163, 184, .15);
  background: rgba(255, 255, 255, .032);
  box-shadow: none;
}

body:not(.public-landing) .bot-identity-layout,
body:not(.public-landing) .planning-preview-editor-grid,
body:not(.public-landing) .planning-format-help,
body:not(.public-landing) .nextcloud-config-form .settings-grid {
  min-width: 0;
}

body:not(.public-landing) .bot-banner-preview,
body:not(.public-landing) .bot-avatar-preview,
body:not(.public-landing) .bot-profile-preview,
body:not(.public-landing) .discord-event-preview,
body:not(.public-landing) .discord-event-banner,
body:not(.public-landing) .discord-event-banner-image {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

body:not(.public-landing) .discord-event-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  body:not(.public-landing) .guild-membership-card.dashboard-form-card,
  body:not(.public-landing) .profile-card.dashboard-form-card,
  body:not(.public-landing) .modules-card.dashboard-form-card,
  body:not(.public-landing) .nextcloud-card.dashboard-form-card,
  body:not(.public-landing) .twitch-planning-card.dashboard-form-card,
  body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card,
  body:not(.public-landing) .twitch-banners-card.dashboard-form-card {
    padding: 20px;
    gap: 16px;
  }

  body:not(.public-landing) .guild-membership-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .profile-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .modules-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .nextcloud-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .twitch-planning-card.dashboard-form-card .twitch-section-heading,
  body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card > .card-heading,
  body:not(.public-landing) .twitch-banners-card.dashboard-form-card > .card-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  body:not(.public-landing) .dashboard-shared-action-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  body:not(.public-landing) .guild-membership-card.dashboard-form-card,
  body:not(.public-landing) .profile-card.dashboard-form-card,
  body:not(.public-landing) .modules-card.dashboard-form-card,
  body:not(.public-landing) .nextcloud-card.dashboard-form-card,
  body:not(.public-landing) .twitch-planning-card.dashboard-form-card,
  body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card,
  body:not(.public-landing) .twitch-banners-card.dashboard-form-card {
    padding: 16px;
    border-radius: 20px;
  }

  body:not(.public-landing) .guild-membership-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .profile-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .modules-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .nextcloud-card.dashboard-form-card > .card-heading,
  body:not(.public-landing) .twitch-planning-card.dashboard-form-card .twitch-section-heading,
  body:not(.public-landing) .twitch-automatic-messages-panel.dashboard-form-card > .card-heading,
  body:not(.public-landing) .twitch-banners-card.dashboard-form-card > .card-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.public-landing) .dashboard-shared-action-toolbar .button,
  body:not(.public-landing) .dashboard-shared-action-toolbar select {
    width: 100%;
  }
}

/* Phase V0.7.5.4 — Superadmin sur socle commun */
body:not(.public-landing) #global-admin-view {
  display: grid;
  gap: 16px;
  min-width: 0;
}

body:not(.public-landing) #global-admin-view.hidden {
  display: none !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu {
  margin: 0;
}

body:not(.public-landing) #global-admin-view > .dashboard-form-card,
body:not(.public-landing) #global-admin-view .admin-guild-card.dashboard-form-card,
body:not(.public-landing) #global-admin-view .admin-banner-requests-card.dashboard-form-card {
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 22px;
  background:
    radial-gradient(circle at 9% 0%, rgba(124, 156, 255, .075), transparent 22rem),
    linear-gradient(145deg, rgba(15, 26, 46, .72), rgba(6, 13, 26, .70));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.032), 0 14px 42px rgba(0,0,0,.16);
}

body:not(.public-landing) #global-admin-view > .dashboard-form-card {
  padding: 18px;
}

body:not(.public-landing) #global-admin-view .card-heading.inline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

body:not(.public-landing) #global-admin-view .card-heading.inline-heading .icon-button.icon-button-inline {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 14px;
}

body:not(.public-landing) #global-admin-view .admin-guilds-list,
body:not(.public-landing) #global-admin-view .admin-audit-log-list,
body:not(.public-landing) #global-admin-view .planning-publication-log-list,
body:not(.public-landing) #global-admin-view .admin-banner-requests-list,
body:not(.public-landing) #global-admin-view .banner-logs-list,
body:not(.public-landing) #global-admin-view .global-bot-avatars-list,
body:not(.public-landing) #global-admin-view .release-entries-list,
body:not(.public-landing) #global-admin-view .bot-dm-conversation-list,
body:not(.public-landing) #global-admin-view .bot-dm-message-list {
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) #global-admin-view .admin-guild-card.dashboard-form-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
}

body:not(.public-landing) #global-admin-view .admin-guild-actions,
body:not(.public-landing) #global-admin-view .admin-banner-request-actions,
body:not(.public-landing) #global-admin-view .compact-actions,
body:not(.public-landing) #global-admin-view .banner-history-toolbar,
body:not(.public-landing) #global-admin-view .admin-audit-logs-toolbar,
body:not(.public-landing) #global-admin-view .admin-twitch-publications-toolbar {
  min-width: 0;
}

body:not(.public-landing) #global-admin-view .banner-history-toolbar,
body:not(.public-landing) #global-admin-view .admin-audit-logs-toolbar,
body:not(.public-landing) #global-admin-view .admin-twitch-publications-toolbar,
body:not(.public-landing) #global-admin-view .banner-approval-settings,
body:not(.public-landing) #global-admin-view .bot-dm-reply-box,
body:not(.public-landing) #global-admin-view .release-entry-list-panel,
body:not(.public-landing) #global-admin-view .release-entry-editor-panel,
body:not(.public-landing) #global-admin-view .bot-dm-conversation-panel,
body:not(.public-landing) #global-admin-view .bot-dm-thread-panel {
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 18px;
  background: rgba(3, 7, 18, .30);
}

body:not(.public-landing) #global-admin-view .banner-history-toolbar,
body:not(.public-landing) #global-admin-view .admin-audit-logs-toolbar,
body:not(.public-landing) #global-admin-view .admin-twitch-publications-toolbar,
body:not(.public-landing) #global-admin-view .banner-approval-settings {
  padding: 12px;
}

body:not(.public-landing) #global-admin-view .bot-dm-inbox-layout,
body:not(.public-landing) #global-admin-view .release-manager-layout {
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) #global-admin-view img,
body:not(.public-landing) #global-admin-view canvas,
body:not(.public-landing) #global-admin-view .global-avatar-crop-preview,
body:not(.public-landing) #global-admin-view .twitch-banner-preview,
body:not(.public-landing) #global-admin-view .banner-preview {
  max-width: 100%;
}

@media (max-width: 900px) {
  body:not(.public-landing) #global-admin-view {
    gap: 14px;
  }

  body:not(.public-landing) #global-admin-view .card-heading.inline-heading,
  body:not(.public-landing) #global-admin-view .admin-guild-card.dashboard-form-card,
  body:not(.public-landing) #global-admin-view .bot-dm-inbox-layout,
  body:not(.public-landing) #global-admin-view .release-manager-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) #global-admin-view .admin-guild-actions,
  body:not(.public-landing) #global-admin-view .compact-actions,
  body:not(.public-landing) #global-admin-view .button-row {
    justify-content: flex-start;
  }

  body:not(.public-landing) #global-admin-view .admin-guild-actions .button,
  body:not(.public-landing) #global-admin-view .compact-actions .button,
  body:not(.public-landing) #global-admin-view .release-editor-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Phase V0.7.5.5 — stabilisation globale avant validation commune */
body:not(.public-landing) .field-help.tooltip-visible::after {
  position: fixed !important;
  top: var(--field-help-top, 50vh) !important;
  left: var(--field-help-left, 50vw) !important;
  z-index: 100500 !important;
  width: min(var(--field-help-width, 420px), calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  transform: translate(-50%, 0) !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

body:not(.public-landing) .field-help.tooltip-visible.tooltip-above::after {
  transform: translate(-50%, -100%) !important;
}

body:not(.public-landing) .field-help.tooltip-visible::before {
  display: none !important;
}

body:not(.public-landing) .dashboard-form-card,
body:not(.public-landing) .dashboard-module-list-column,
body:not(.public-landing) .dashboard-module-config-column,
body:not(.public-landing) .dashboard-module-editor-topbar,
body:not(.public-landing) .dashboard-module-list-item,
body:not(.public-landing) .dashboard-module-empty-selection,
body:not(.public-landing) .tickets-panels-card,
body:not(.public-landing) #global-admin-view > .dashboard-form-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body:not(.public-landing) .dashboard-module-editor-topbar,
body:not(.public-landing) .dashboard-shared-action-toolbar,
body:not(.public-landing) .ticket-panel-toolbar,
body:not(.public-landing) .button-row {
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-editor-topbar > *,
body:not(.public-landing) .card-heading.inline-heading > *,
body:not(.public-landing) .section-heading-row > *,
body:not(.public-landing) .dashboard-field,
body:not(.public-landing) .field,
body:not(.public-landing) .checkbox-field,
body:not(.public-landing) .emoji-input-wrap,
body:not(.public-landing) input,
body:not(.public-landing) textarea,
body:not(.public-landing) select {
  min-width: 0;
  box-sizing: border-box;
}

body:not(.public-landing) .dashboard-module-editor-actions,
body:not(.public-landing) .dashboard-shared-action-toolbar,
body:not(.public-landing) .ticket-panel-toolbar {
  max-width: 100%;
}

body:not(.public-landing) .dashboard-module-editor-actions .button,
body:not(.public-landing) .dashboard-module-editor-actions .icon-button,
body:not(.public-landing) .dashboard-shared-action-toolbar .button,
body:not(.public-landing) .dashboard-shared-action-toolbar .icon-button,
body:not(.public-landing) .ticket-panel-toolbar .button,
body:not(.public-landing) .ticket-panel-toolbar .icon-button {
  flex: 0 0 auto;
}

body:not(.public-landing) .dashboard-preview-card,
body:not(.public-landing) .dashboard-preview-content,
body:not(.public-landing) .discord-embed-preview,
body:not(.public-landing) .embed-preview-content,
body:not(.public-landing) .member-lifecycle-public-preview,
body:not(.public-landing) .bot-profile-preview,
body:not(.public-landing) .discord-event-preview {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  body:not(.public-landing) .dashboard-module-editor-topbar,
  body:not(.public-landing) .card-heading.inline-heading,
  body:not(.public-landing) .section-heading-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body:not(.public-landing) .dashboard-module-editor-actions,
  body:not(.public-landing) .dashboard-shared-action-toolbar,
  body:not(.public-landing) .ticket-panel-toolbar {
    width: 100%;
    justify-content: flex-start !important;
  }

  body:not(.public-landing) .card-heading.inline-heading > .button,
  body:not(.public-landing) .section-heading-row > .button {
    align-self: flex-start;
  }
}


/* Phase V0.7.5.6 — corrections validation commune */
body:not(.public-landing) .save-state:not(.error) {
  display: none !important;
}

body:not(.public-landing) .dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(7, 14, 28, .42);
  color: var(--muted);
  font-size: .9rem;
  width: 100%;
  box-sizing: border-box;
}

body:not(.public-landing) .dashboard-pagination .icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}

body:not(.public-landing) .dashboard-pagination .icon-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

body:not(.public-landing) .auto-response-message-block-heading {
  align-items: center;
}

body:not(.public-landing) .auto-response-message-block-heading > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline {
  display: flex !important;
  grid-template-columns: none !important;
  width: auto !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline .icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
}

body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline .button {
  width: auto !important;
  min-height: 38px;
}

body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-tab-layout,
body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-tab-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:welcome"] .member-lifecycle-preview-panel.dashboard-form-card,
body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:departure"] .member-lifecycle-preview-panel.dashboard-form-card {
  position: static !important;
}

body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:journal"] .member-lifecycle-tab-layout {
  align-items: stretch !important;
}

body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:journal"] .member-lifecycle-settings-panel.dashboard-form-card,
body:not(.public-landing) .member-lifecycle-subtab-section[data-subtab-section="memberLifecycle:journal"] .member-lifecycle-preview-panel.dashboard-form-card {
  height: 100%;
}

body:not(.public-landing) .member-lifecycle-card .member-lifecycle-top-row,
body:not(.public-landing) .member-lifecycle-card .member-lifecycle-card-content-grid,
body:not(.public-landing) .member-lifecycle-card .member-lifecycle-card-row,
body:not(.public-landing) .member-lifecycle-card .settings-grid,
body:not(.public-landing) .member-lifecycle-card .form-grid.two-columns {
  min-width: 0;
}

body:not(.public-landing) .member-lifecycle-card input,
body:not(.public-landing) .member-lifecycle-card textarea,
body:not(.public-landing) .member-lifecycle-card select,
body:not(.public-landing) .member-lifecycle-card .resource-picker,
body:not(.public-landing) .member-lifecycle-card .emoji-input-wrap,
body:not(.public-landing) .member-lifecycle-card .embed-color-control,
body:not(.public-landing) .member-lifecycle-card .member-lifecycle-range-control {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  body:not(.public-landing) .auto-response-message-block-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline {
    justify-content: flex-start !important;
  }

  body:not(.public-landing) .member-lifecycle-card .member-lifecycle-top-row,
  body:not(.public-landing) .member-lifecycle-card .member-lifecycle-card-content-grid,
  body:not(.public-landing) .member-lifecycle-card .member-lifecycle-card-row,
  body:not(.public-landing) .member-lifecycle-card .settings-grid,
  body:not(.public-landing) .member-lifecycle-card .form-grid.two-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Phase V0.7.5.6.1 — correctifs validation mobile et Twitch */
body:not(.public-landing) {
  overflow-x: hidden;
}

body:not(.public-landing) .app-shell,
body:not(.public-landing) .main-content,
body:not(.public-landing) .dashboard-view,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .card,
body:not(.public-landing) .dashboard-form-card {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .dashboard-page-header,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
body:not(.public-landing) .module-context-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

body:not(.public-landing) .dashboard-page-header-icon,
body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro-icon,
body:not(.public-landing) .module-context-icon,
body:not(.public-landing) .dashboard-module-icon,
body:not(.public-landing) .dashboard-module-section-icon,
body:not(.public-landing) .modules-hub-kpi-icon,
body:not(.public-landing) .dashboard-empty-state-icon {
  display: none !important;
}

body:not(.public-landing) .dashboard-module-tile-main {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.public-landing) .dashboard-module-section-heading {
  gap: 0 !important;
}

body:not(.public-landing) .modules-card[data-subtab-section="administration:modules"] {
  display: none !important;
}

body:not(.public-landing) .twitch-channel-badges,
body:not(.public-landing) #twitch-free-limit-note {
  display: none !important;
}

body:not(.public-landing) .banner-preview {
  width: 100%;
  aspect-ratio: 5 / 2;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

body:not(.public-landing) .twitch-banner-row .banner-preview,
body:not(.public-landing) .admin-banner-request-row .banner-preview {
  height: auto;
  min-height: 0;
}

body:not(.public-landing) .banner-future-preview img,
body:not(.public-landing) .banner-test-result .banner-preview {
  width: 100%;
  aspect-ratio: 5 / 2;
  height: auto;
  object-fit: cover;
}

@media (max-width: 980px) {
  body:not(.public-landing) .twitch-banner-row,
  body:not(.public-landing) .admin-banner-request-row {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  body:not(.public-landing) .twitch-banner-row .button-row,
  body:not(.public-landing) .admin-banner-request-row .button-row {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .dashboard-page-header,
  body.dashboard-tab-modules:not(.public-landing) .modules-hub-intro,
  body.dashboard-view-guild:not(.dashboard-tab-modules):not(.public-landing) .module-context-card,
  body:not(.public-landing) .module-context-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: hidden;
  }

  body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline .icon-button {
    flex: 0 0 38px !important;
  }

  body:not(.public-landing) .auto-response-message-block-heading .button-row.button-row-inline .button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    padding-inline: 10px !important;
    white-space: nowrap !important;
  }
}


/* Phase V0.7.5.6.2 — superadmin responsive polish + hotfix prod */
body:not(.public-landing) #global-admin-view .global-admin-intro-card.dashboard-page-header {
  display: block !important;
  grid-template-columns: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body:not(.public-landing) #global-admin-view .global-admin-intro-card .card-heading.inline-heading {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body:not(.public-landing) #global-admin-view .global-admin-intro-card .card-heading.inline-heading > div {
  min-width: 0 !important;
  max-width: 100% !important;
}

body:not(.public-landing) #global-admin-view .global-admin-intro-card .eyebrow,
body:not(.public-landing) #global-admin-view .global-admin-intro-card h3,
body:not(.public-landing) #global-admin-view .global-admin-intro-card .muted,
body:not(.public-landing) #global-admin-title {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

body:not(.public-landing) #global-admin-view .global-admin-intro-card .muted {
  display: block !important;
  margin-top: 18px !important;
  max-width: 78ch !important;
  line-height: 1.55 !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 12px 14px !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 180, 255, .42) transparent !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu::-webkit-scrollbar {
  height: 5px !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu::-webkit-scrollbar-track {
  background: transparent !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(157, 180, 255, .42) !important;
}

body:not(.public-landing) #global-admin-view > .superadmin-tabs.dashboard-scroll-menu .dashboard-tab {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  scroll-snap-align: start !important;
}

@media (max-width: 620px) {
  body:not(.public-landing) #global-admin-view .global-admin-intro-card .card-heading.inline-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) #global-admin-view .global-admin-intro-card .pill {
    justify-self: start !important;
  }
}

/* Phase V0.7.6.1 — superadmins dashboard + polling MP */
.superadmin-manager-panel {
  margin-top: 22px;
  padding: 18px;
}

.superadmin-manager-form {
  align-items: end;
}

.superadmin-manager-action {
  justify-content: end;
}

.superadmin-manager-action .button {
  width: 100%;
}

.superadmin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.superadmin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.38);
}

.superadmin-list-item strong,
.superadmin-list-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.superadmin-list-item small {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .superadmin-list-item {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Phase V0.8.0 — derniers correctifs candidate prod
   Règles : prod forcée en FR, sidebar épurée, boutons jamais cassés lettre par lettre,
   blocs administration alignés sur le socle dashboard. */
body:not(.public-landing) .sidebar-language-switch,
body:not(.public-landing) .sidebar-help-card {
  display: none !important;
}

body:not(.public-landing) .dashboard-nav-link > span[aria-hidden="true"] {
  display: none !important;
}

body:not(.public-landing) .dashboard-nav-link {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.public-landing) .button,
body:not(.public-landing) .icon-button,
body:not(.public-landing) .sidebar-logout-button,
body:not(.public-landing) button[class*="button"] {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

body:not(.public-landing) .button-row,
body:not(.public-landing) .admin-guild-actions,
body:not(.public-landing) .admin-banner-request-actions,
body:not(.public-landing) .compact-actions,
body:not(.public-landing) .banner-history-toolbar {
  align-items: center !important;
}

body:not(.public-landing) #global-admin-view .button,
body:not(.public-landing) #global-admin-view .button-compact {
  min-width: max-content;
}

body:not(.public-landing) #global-admin-view .admin-license-editor {
  grid-template-columns: minmax(150px, 180px) minmax(150px, 180px) minmax(125px, 145px) minmax(190px, auto) !important;
  align-items: end !important;
}

body:not(.public-landing) #global-admin-view .admin-license-editor .button {
  width: auto !important;
  justify-content: center;
}

body:not(.public-landing) #global-admin-view .banner-history-toolbar {
  grid-template-columns: minmax(160px, 200px) minmax(220px, 1fr) auto auto !important;
}

body:not(.public-landing) #global-admin-view .banner-history-toolbar .button,
body:not(.public-landing) #global-admin-view .banner-history-toolbar .icon-button {
  width: auto !important;
}

body:not(.public-landing) .sidebar-logout-icon-button {
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 14px;
}

body:not(.public-landing) .sidebar-user-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

body:not(.public-landing) .sidebar-user-copy strong,
body:not(.public-landing) .sidebar-user-copy small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .guild-membership-card.dashboard-action-card {
  border: 1px solid rgba(148, 163, 184, .18) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 156, 255, .10), transparent 22rem),
    linear-gradient(145deg, rgba(15, 26, 46, .78), rgba(6, 13, 26, .74)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 48px rgba(0,0,0,.18) !important;
}

body:not(.public-landing) .guild-membership-card.dashboard-action-card .card-heading.inline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  margin-bottom: 14px;
}

body:not(.public-landing) .guild-membership-card.dashboard-action-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.05;
}

body:not(.public-landing) .guild-membership-card.dashboard-action-card .eyebrow {
  margin-bottom: 6px;
}

@media (max-width: 980px) {
  body:not(.public-landing) #global-admin-view .admin-license-editor,
  body:not(.public-landing) #global-admin-view .banner-history-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) #global-admin-view .admin-license-editor .button,
  body:not(.public-landing) #global-admin-view .banner-history-toolbar .button,
  body:not(.public-landing) #global-admin-view .banner-history-toolbar .icon-button {
    width: 100% !important;
    min-width: 0 !important;
  }

  body:not(.public-landing) .guild-membership-card.dashboard-action-card .card-heading.inline-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.public-landing) .guild-membership-card.dashboard-action-card .button {
    width: 100%;
    justify-content: center;
  }
}


/* Phase V0.8.0 — correctif prod final : sidebar mobile, superadmin distinct, modules sans débordement */
body:not(.public-landing),
body:not(.public-landing) .main-content {
  overflow-x: clip;
}

body:not(.public-landing) .guild-install-button,
body:not(.public-landing) .guild-selector-install {
  width: 100%;
  min-width: 0 !important;
  padding: 12px 14px !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  text-align: center !important;
  justify-content: center !important;
}

body:not(.public-landing) .guild-install-button span:last-child,
body:not(.public-landing) .guild-selector-install span:last-child {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .guild-selector,
body:not(.public-landing) .guild-selector-menu,
body:not(.public-landing) .guild-button {
  min-width: 0;
}

body:not(.public-landing) .guild-button {
  min-height: 0;
  padding-right: 44px !important;
}

body:not(.public-landing) .guild-button strong,
body:not(.public-landing) .guild-button span:not(.guild-premium-crown) {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .sidebar-user-copy {
  min-width: 0;
}

body:not(.public-landing) .sidebar-user-card {
  gap: 12px;
}

body:not(.public-landing) .modules-hub-install-card {
  margin-bottom: 20px;
}

body.dashboard-tab-modules:not(.public-landing) .modules-hub-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section,
body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-tile {
  min-width: 0 !important;
  width: 100%;
}

body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1180px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.dashboard-tab-modules:not(.public-landing) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(2) .module-hub-card-grid,
  body.dashboard-tab-modules:not(.public-landing) .module-hub-section:nth-child(3) .module-hub-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

body:not(.public-landing) .admin-banner-requests-list:empty {
  display: none;
}

@media (max-width: 900px) {
  body:not(.public-landing) .guild-button {
    padding-right: 42px !important;
  }

  body:not(.public-landing) .sidebar-user-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}


/* Phase V0.8.0 — prod hotfix 2 : superadmin bannières + changelog + sidebar sans débordement */
body:not(.public-landing) .guild-selector-menu {
  overflow: hidden !important;
}

body:not(.public-landing) .guild-selector-install,
body:not(.public-landing) .guild-install-button {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body:not(.public-landing) .guild-selector-install span,
body:not(.public-landing) .guild-install-button span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:not(.public-landing) .guild-selector-install span[aria-hidden="true"],
body:not(.public-landing) .guild-install-button span[aria-hidden="true"] {
  flex: 0 0 auto !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card.dashboard-form-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings {
  width: 100% !important;
  max-width: 620px;
  justify-self: end;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar {
  width: 100% !important;
  max-width: 650px;
  grid-template-columns: minmax(150px, 180px) minmax(220px, 1fr) 48px auto !important;
  align-items: end !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel {
  width: min(100%, 560px) !important;
  max-width: 100% !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .admin-banner-requests-list {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .admin-banner-requests-list:empty {
  display: none !important;
}

body:not(.public-landing) .changelog-entry small {
  display: block !important;
  white-space: pre-wrap !important;
}

body:not(.public-landing) .release-info-grid textarea,
body:not(.public-landing) #release-notes-input {
  min-height: 180px;
}

@media (max-width: 1180px) {
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel {
    max-width: 100% !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar .button,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar .icon-button,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings .button {
    width: 100% !important;
  }
}


/* Phase V0.8.0 — prod hotfix 3 : superadmin compact + sélecteur serveur multi-lignes */
body:not(.public-landing) .guild-button span:not(.guild-premium-crown) {
  white-space: pre-line !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  line-height: 1.25 !important;
  max-height: 2.6em !important;
}

body:not(.public-landing) .guild-selector-install,
body:not(.public-landing) .guild-install-button {
  flex-wrap: wrap !important;
  white-space: normal !important;
  min-height: 48px !important;
  overflow: visible !important;
}

body:not(.public-landing) .guild-selector-install span,
body:not(.public-landing) .guild-install-button span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.18 !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card.dashboard-form-card {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  padding: 16px !important;
  min-height: 0 !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings,
body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar,
body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel {
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
  margin: 0 !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar {
  grid-template-columns: minmax(150px, 180px) minmax(220px, 1fr) 48px auto !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .admin-banner-requests-list:empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel:not([open]) {
  width: min(100%, 560px) !important;
}

body:not(.public-landing) .changelog-entry small {
  white-space: pre-line !important;
}

@media (min-width: 900px) {
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings {
    grid-template-columns: minmax(260px, 1fr) auto !important;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-history-toolbar,
  body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-approval-settings {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* Phase V0.8.0 — prod hotfix 4 : compte embeds + sidebar multi-lignes + superadmin compact */
body:not(.public-landing) .guild-button span:not(.guild-premium-crown) {
  white-space: pre-line !important;
  line-height: 1.25 !important;
  max-height: none !important;
}

body:not(.public-landing) .guild-button {
  min-height: 68px !important;
}

body:not(.public-landing) .guild-selector-current {
  min-height: 72px !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card.dashboard-form-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 16px !important;
  min-height: 0 !important;
  align-content: start !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card > * {
  min-height: 0 !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .admin-banner-requests-list:empty,
body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-list:empty {
  display: none !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel {
  align-self: start !important;
}

body:not(.public-landing) #global-admin-view .admin-banner-requests-card .banner-logs-panel:not([open]) {
  min-height: 44px !important;
}


/* Phase V0.8.0 — Modération / Anti-spam comportemental */
body:not(.public-landing) .moderation-card {
  display: grid;
  gap: 18px;
}

body:not(.public-landing) .moderation-card.hidden {
  display: none !important;
}

body:not(.public-landing) .moderation-tab-panel {
  display: grid;
  gap: 16px;
}

body:not(.public-landing) .moderation-tab-panel.hidden {
  display: none !important;
}

body:not(.public-landing) .moderation-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

body:not(.public-landing) .moderation-incidents-list {
  display: grid;
  gap: 12px;
}

body:not(.public-landing) .moderation-incident-card {
  display: grid;
  gap: 10px;
}

body:not(.public-landing) .moderation-incident-card blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(124, 156, 255, .7);
  border-radius: 12px;
  background: rgba(2, 8, 20, .42);
  color: #dbeafe;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .moderation-permissions-warning {
  border-color: rgba(255, 196, 87, .22) !important;
}


/* Phase V0.8.0.2 — polish Modération + sélecteur langue superadmin */
body:not(.public-landing) .superadmin-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body:not(.public-landing) .dashboard-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(157, 180, 255, .18);
  border-radius: 999px;
  background: rgba(2, 8, 20, .38);
}

body:not(.public-landing) .dashboard-language-switch button {
  min-width: 34px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #aebed8;
  font: inherit;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
}

body:not(.public-landing) .dashboard-language-switch button.active,
body:not(.public-landing) .dashboard-language-switch button[aria-pressed="true"] {
  color: #07111f;
  background: linear-gradient(135deg, #9db6ff, #6d8eff);
}

body:not(.public-landing) .moderation-card {
  padding: clamp(22px, 2.25vw, 30px) !important;
  overflow: visible !important;
}

body:not(.public-landing) .moderation-card > .card-heading {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 8px;
}

body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

body:not(.public-landing) .moderation-card > .moderation-action-heading {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

body:not(.public-landing) .moderation-current-section-heading {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 620px;
}

body:not(.public-landing) .moderation-current-section-heading .eyebrow {
  margin: 0 !important;
  color: #b7c7ff;
  letter-spacing: .18em;
  text-transform: uppercase;
}

body:not(.public-landing) .moderation-current-section-heading h3 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.1;
  font-weight: 950;
}

body:not(.public-landing) .moderation-current-section-heading .muted {
  margin: 0;
  max-width: 720px;
}

body:not(.public-landing) .moderation-section-readonly {
  opacity: .58;
}

body:not(.public-landing) .moderation-section-readonly input,
body:not(.public-landing) .moderation-section-readonly select,
body:not(.public-landing) .moderation-section-readonly textarea,
body:not(.public-landing) .moderation-section-readonly .resource-picker {
  cursor: not-allowed;
}

body:not(.public-landing) .moderation-card .resource-picker.resource-picker-disabled {
  pointer-events: none;
}

body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar .button {
  min-height: 44px;
}

@media (max-width: 860px) {
  body:not(.public-landing) .moderation-card > .moderation-action-heading {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar {
    justify-content: stretch;
    margin-left: 0;
  }

  body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar .button,
  body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar .icon-button {
    width: 100%;
  }
}

body:not(.public-landing) .moderation-card > .muted {
  margin: 0 0 18px;
  max-width: 820px;
  line-height: 1.55;
}

body:not(.public-landing) .moderation-card .dashboard-form-card {
  padding: clamp(18px, 2vw, 24px) !important;
  overflow: visible !important;
  min-height: 0 !important;
}

body:not(.public-landing) .moderation-card .section-heading-row,
body:not(.public-landing) .moderation-card .compact-heading {
  margin: 0 0 18px !important;
  padding: 0 !important;
  min-width: 0;
}

body:not(.public-landing) .moderation-card .section-heading-row > div,
body:not(.public-landing) .moderation-card .compact-heading > div {
  min-width: 0;
}

body:not(.public-landing) .moderation-card .section-heading-row .eyebrow {
  display: block;
  margin: 0 0 10px !important;
  padding: 0 !important;
  white-space: normal;
}

body:not(.public-landing) .moderation-card .section-heading-row h4 {
  margin: 0;
  line-height: 1.25;
}

body:not(.public-landing) .moderation-kpi-grid {
  display: grid !important;
  gap: 14px !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
}


body:not(.public-landing) .moderation-kpi-card {
  display: grid !important;
  gap: 8px !important;
  align-content: center !important;
  min-height: 86px;
  padding: 16px 18px !important;
  border: 1px solid rgba(157, 180, 255, .17);
  border-radius: 18px;
  background: rgba(4, 12, 25, .32);
}

body:not(.public-landing) .moderation-kpi-card span {
  display: block;
  color: #aebed8;
  font-size: .82rem;
  font-weight: 800;
}

body:not(.public-landing) .moderation-kpi-card strong {
  display: block;
  color: #f8fbff;
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 900;
}

body:not(.public-landing) .moderation-kpi-card > .field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

body:not(.public-landing) .moderation-kpi-card > .field-label-with-help > span:first-child {
  display: inline;
  color: #aebed8;
  font-size: .82rem;
  font-weight: 800;
}

body:not(.public-landing) .moderation-kpi-card > .field-label-with-help .field-help {
  flex: 0 0 18px;
}


body:not(.public-landing) .moderation-card .form-grid {
  gap: 16px !important;
  align-items: start;
}

body:not(.public-landing) .moderation-card .dashboard-field {
  display: grid !important;
  gap: 9px !important;
  min-width: 0;
}

body:not(.public-landing) .moderation-card .dashboard-field > span {
  line-height: 1.25;
}

body:not(.public-landing) .moderation-card input:not([type="checkbox"]):not([type="radio"]),
body:not(.public-landing) .moderation-card select,
body:not(.public-landing) .moderation-card textarea {
  width: 100%;
  min-width: 0;
}

body:not(.public-landing) .moderation-card textarea {
  resize: vertical;
}

body:not(.public-landing) .moderation-permissions-warning:not(.hidden) {
  display: grid !important;
  gap: 4px;
  padding: 14px 16px !important;
  line-height: 1.45;
}

body:not(.public-landing) .moderation-permissions-warning p {
  margin: 0;
}

@media (max-width: 760px) {
  body:not(.public-landing) .moderation-card > .card-heading {
    display: grid;
  }

  body:not(.public-landing) .moderation-card > .card-heading .ticket-panel-toolbar,
  body:not(.public-landing) .moderation-card > .card-heading .button,
  body:not(.public-landing) .moderation-card > .card-heading .icon-button {
    width: 100%;
    justify-content: center;
  }
}


/* Phase V0.8.0.3 — Modération : pickers Discord + incidents lisibles */
body:not(.public-landing) .moderation-card .resource-field {
  min-width: 0;
}

body:not(.public-landing) .moderation-card .resource-hidden-value {
  display: none !important;
}

body:not(.public-landing) .moderation-incident-card .compact-actions {
  flex-wrap: wrap;
  align-items: center;
}

body:not(.public-landing) .moderation-incident-card .button {
  white-space: normal !important;
  min-width: fit-content;
}


/* Beta V0.8 — modération : seuil minimal et journal d’analyse */
body:not(.public-landing) .field-help::before,
body:not(.public-landing) .field-help::after {
  content: none !important;
  display: none !important;
}

body:not(.public-landing) .field-help.tooltip-visible,
body:not(.public-landing) .field-help:focus-visible {
  border-color: rgba(157, 180, 255, .72);
  background: rgba(124, 156, 255, .22);
  color: #f8fbff;
  box-shadow: 0 0 0 3px rgba(124, 156, 255, .14);
}

body:not(.public-landing) .dashboard-field-help-tooltip {
  position: fixed;
  z-index: 100500;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border: 1px solid rgba(124, 156, 255, .36);
  border-radius: 12px;
  background: rgba(8, 15, 27, .98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  color: #f8fbff;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

body:not(.public-landing) .dashboard-field-help-tooltip.tooltip-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body:not(.public-landing) .dashboard-field-help-tooltip.tooltip-visible.tooltip-above {
  transform: translate(-50%, 0);
}

body:not(.public-landing) .moderation-incident-action-summary {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(85, 217, 141, .18);
  border-radius: 12px;
  background: rgba(20, 184, 166, .08);
  color: #c8fff0;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.45;
}


/* Beta V0.8 — Anti-Raid / Anti-Bots : historique exploitable */
body:not(.public-landing) .moderation-history-heading {
  align-items: start !important;
  gap: 14px !important;
}

body:not(.public-landing) .moderation-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: min(100%, 420px);
}

body:not(.public-landing) .moderation-history-search {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
  margin: 0;
}

body:not(.public-landing) .moderation-history-search input {
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 14px;
}

body:not(.public-landing) .moderation-incident-card-treated .compact-actions {
  display: none !important;
}

body:not(.public-landing) .moderation-incident-treated-note {
  margin: 10px 0 0;
  font-size: .86rem;
}

body:not(.public-landing) .moderation-incident-metrics .moderation-inline-help {
  display: inline-flex;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted rgba(174, 190, 216, .55);
  text-underline-offset: 3px;
}

body:not(.public-landing) .moderation-incident-metrics .moderation-inline-help:hover,
body:not(.public-landing) .moderation-incident-metrics .moderation-inline-help:focus-visible {
  color: #f8fbff;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 760px) {
  body:not(.public-landing) .moderation-history-actions,
  body:not(.public-landing) .moderation-history-actions .button,
  body:not(.public-landing) .moderation-history-search {
    width: 100%;
  }
}

/* Beta V0.8 — sidebar : séparation visuelle des catégories */
body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-sidebar-nav {
  gap: 12px;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-group {
  position: relative;
  padding: 12px 0 10px;
  border-top: 1px solid rgba(157, 180, 255, .12);
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-group:first-child {
  border-top: 0;
  padding-top: 4px;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-group h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  color: #9fb3ff;
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .22em;
  line-height: 1.2;
  opacity: .92;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-group .dashboard-nav-link {
  width: calc(100% - 12px);
  margin-left: 12px;
  min-height: 38px;
  padding-left: 12px;
  color: #b7c5df;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-group .dashboard-nav-link.active {
  margin-left: 4px;
  width: calc(100% - 4px);
}


/* Beta V0.8 — sidebar réduite + mode Anti-Raid simplifié */
body:not(.public-landing) .moderation-timeout-duration-field.hidden {
  display: none !important;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link > span[aria-hidden="true"] {
  display: grid !important;
  place-items: center;
}

body.dashboard-sidebar-collapsed:not(.public-landing) .dashboard-nav-link {
  grid-template-columns: 1fr !important;
}

body:not(.public-landing):not(.dashboard-sidebar-collapsed) .dashboard-nav-link > span[aria-hidden="true"] {
  display: none !important;
}


/* Beta V0.8.12 — hotfix prod Tickets : cartes de panels lisibles dans la colonne étroite. */
body:not(.public-landing) .dashboard-module-list-item-top,
body:not(.public-landing) .dashboard-module-list-item-bottom {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

body:not(.public-landing) .dashboard-module-list-order-actions,
body:not(.public-landing) .dashboard-module-list-primary-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

body:not(.public-landing) .dashboard-module-list-primary-actions .button,
body:not(.public-landing) .dashboard-module-list-primary-actions .button-compact {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

/* Beta V0.8.12 — pickers Discord au-dessus des cartes */
body:not(.public-landing) .resource-picker.resource-picker-open {
  z-index: 140;
}

body:not(.public-landing) .resource-picker-parent-open {
  position: relative;
  z-index: 130;
  overflow: visible !important;
}

body:not(.public-landing) .resource-picker.resource-picker-open .resource-picker-menu {
  z-index: 160;
}

/* Beta V0.8.13 — listes Tickets/Embeds compactes + catégorie visible. */
body:not(.public-landing) .dashboard-module-list-item {
  gap: 9px;
  min-height: 108px;
}

body:not(.public-landing) .dashboard-module-list-item-top,
body:not(.public-landing) .dashboard-module-list-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

body:not(.public-landing) .dashboard-module-list-item-top h4 {
  flex: 1 1 auto;
  min-width: 7.5rem;
  max-width: 100%;
}

body:not(.public-landing) .dashboard-module-list-order-actions,
body:not(.public-landing) .dashboard-module-list-primary-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

body:not(.public-landing) .dashboard-module-list-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.25;
}

body:not(.public-landing) .dashboard-module-list-meta-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(145, 169, 255, .16);
  border-radius: 999px;
  background: rgba(124, 156, 255, .065);
  color: #b9c8e5;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.public-landing) .dashboard-module-list-meta-category {
  border-color: rgba(157, 180, 255, .24);
  background: rgba(124, 156, 255, .11);
  color: #d8e2ff;
}

body:not(.public-landing) .dashboard-module-list-meta-channel {
  max-width: 100%;
}

body:not(.public-landing) .dashboard-module-list-status-row {
  flex: 1 1 auto;
}

body:not(.public-landing) .dashboard-module-list-primary-actions .button,
body:not(.public-landing) .dashboard-module-list-primary-actions .button-compact {
  min-width: 108px;
  max-width: 100%;
}

@media (max-width: 760px) {
  body:not(.public-landing) .dashboard-module-list-item-top,
  body:not(.public-landing) .dashboard-module-list-item-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  body:not(.public-landing) .dashboard-module-list-order-actions,
  body:not(.public-landing) .dashboard-module-list-primary-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body:not(.public-landing) .dashboard-module-list-primary-actions .button,
  body:not(.public-landing) .dashboard-module-list-primary-actions .button-compact {
    width: 100%;
  }
}

/* Beta V0.8.17 — correction lisibilité des options des pickers Discord */
body:not(.public-landing) .resource-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body:not(.public-landing) .resource-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .resource-option-meta {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}


/* Beta V0.8.18 — affichage métier des pickers Discord */
body:not(.public-landing) .resource-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

body:not(.public-landing) .resource-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .resource-option-primary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .resource-option-meta {
  display: none;
}

body:not(.public-landing) .resource-role-dot-neutral {
  background: rgba(255, 255, 255, 0.35);
}

/* Beta V0.8.19 — pickers Discord lisibles sur plusieurs lignes */
body:not(.public-landing) .resource-picker-menu {
  width: min(520px, calc(100vw - 48px));
  min-width: 100%;
  max-width: calc(100vw - 48px);
}

body:not(.public-landing) .resource-option {
  align-items: flex-start;
  min-height: 44px;
}

body:not(.public-landing) .resource-option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

body:not(.public-landing) .resource-option-primary {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .resource-option-roles .resource-option-primary,
body:not(.public-landing) .resource-option-members .resource-option-primary {
  overflow-wrap: break-word;
}

/* Beta V0.8.20 — pickers Discord flottants non coupés par les cartes */
body:not(.public-landing) .resource-picker.resource-picker-open .resource-picker-menu {
  position: fixed;
  z-index: 10000;
  min-width: 260px;
  overflow-x: hidden;
}

body:not(.public-landing) .resource-picker.resource-picker-open .resource-option {
  width: 100%;
  max-width: 100%;
}

body:not(.public-landing) .resource-picker.resource-picker-open .resource-option-label,
body:not(.public-landing) .resource-picker.resource-picker-open .resource-option-primary {
  min-width: 0;
  max-width: 100%;
}


/* Beta V0.8.21 — pickers Discord sortis des cartes pour éviter les masques de layout. */
body:not(.public-landing) .resource-picker-menu.resource-picker-floating {
  position: fixed;
  z-index: 10000;
  min-width: min(320px, calc(100vw - 24px));
  box-sizing: border-box;
  overflow-x: hidden;
}

body:not(.public-landing) .resource-picker-menu.resource-picker-floating .resource-option {
  width: 100%;
  max-width: 100%;
}

body:not(.public-landing) .resource-picker-menu.resource-picker-floating .resource-option-label,
body:not(.public-landing) .resource-picker-menu.resource-picker-floating .resource-option-primary {
  min-width: 0;
  max-width: 100%;
}


/* Beta V0.8.22 — sélection des pickers lisible sans préfixe inutile. */
body:not(.public-landing) .resource-picker[data-resource-mode="single"].resource-picker-has-selection .resource-picker-shell {
  align-items: flex-start;
}

body:not(.public-landing) .resource-picker[data-resource-mode="single"] .resource-picker-selection {
  flex: 1 1 100%;
  width: 100%;
}

body:not(.public-landing) .resource-single-value {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(124, 156, 255, 0.24);
  border-radius: 14px;
  background: rgba(124, 156, 255, 0.10);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

body:not(.public-landing) .resource-single-value-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

body:not(.public-landing) .resource-picker[data-resource-mode="single"] .resource-single-clear {
  position: static;
  right: auto;
  top: auto;
  flex: 0 0 auto;
  transform: none;
  margin-left: auto;
}

body:not(.public-landing) .resource-picker[data-resource-mode="single"].resource-picker-has-selection .resource-picker-search {
  flex-basis: 100%;
  min-width: 100%;
  padding-right: 4px;
}

body:not(.public-landing) .dashboard-module-list-meta-channel {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  border-radius: 14px;
}


/* Beta V0.8.24 — prévisualisations Embeds : les mentions résolues restent cohérentes dans les champs. */
body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid #ticket-panel-channel-field .resource-picker-shell {
  align-items: stretch;
}

body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid #ticket-panel-channel-field .resource-single-value {
  display: flex;
  width: 100%;
  max-width: 100%;
}

body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid #ticket-panel-channel-field .resource-single-value-label {
  white-space: normal;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .dashboard-module-config-column .ticket-hub-create-grid #ticket-panel-channel-field .resource-picker-search {
  width: 100%;
}


/* Phase V0.9.1 — Actualités / Updates de jeux */
.patchnotes-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.patchnotes-list-card,
.patchnotes-editor-card,
.patchnotes-history-card {
  background: rgba(11, 18, 34, 0.56);
  border: 1px solid rgba(140, 166, 255, 0.16);
  border-radius: 20px;
  padding: 18px;
}

.patchnotes-list-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.patchnotes-watches-list {
  display: grid;
  gap: 12px;
}

.patchnotes-watch-card {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(140, 166, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(9, 15, 29, 0.7);
  color: inherit;
  cursor: pointer;
}

.patchnotes-watch-card:hover,
.patchnotes-watch-card.active {
  border-color: rgba(139, 162, 255, 0.78);
  box-shadow: 0 12px 30px rgba(80, 110, 255, 0.14);
}

.patchnotes-watch-title {
  font-weight: 800;
  color: var(--text-strong, #f8fbff);
}

.patchnotes-watch-summary {
  color: var(--text-muted, #aebbd4);
  line-height: 1.35;
  font-size: 0.92rem;
}

.patchnotes-watch-footer,
.patchnotes-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.patchnotes-editor-actions {
  margin-top: 18px;
}

.patchnotes-history-card {
  margin-top: 20px;
}

.patchnotes-history-list {
  display: grid;
  gap: 12px;
}

.patchnotes-history-entry {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(140, 166, 255, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(7, 12, 23, 0.55);
}

.patchnotes-history-entry p {
  margin: 6px 0 0;
}

@media (max-width: 980px) {
  .patchnotes-layout {
    grid-template-columns: 1fr;
  }
  .patchnotes-history-entry {
    display: grid;
  }
}

/* Phase V0.9.3 — Patchnotes polish */
.patchnotes-history-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 12px 0 14px;
}

.patchnotes-history-tools .dashboard-input {
  flex: 1 1 260px;
  min-width: 0;
}

.patchnotes-history-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.patchnotes-history-entry strong {
  color: var(--text-strong, #f8fbff);
}

.patchnotes-history-entry .button-compact {
  white-space: nowrap;
}

/* Phase V0.9.7 — Patchnotes calculés */
.patchnotes-preview-card {
  margin-top: 18px;
}

.patchnotes-preview-box {
  margin-top: 10px;
}

.patchnotes-discord-preview {
  display: grid;
  gap: 10px;
}

.patchnotes-discord-content {
  margin: 0;
  color: var(--text-strong, #f8fbff);
  font-weight: 700;
}

.patchnotes-preview-embed,
.patchnotes-reader-panel {
  border: 1px solid rgba(140, 166, 255, 0.16);
  border-left: 4px solid rgba(122, 162, 255, 0.85);
  border-radius: 16px;
  background: rgba(7, 12, 23, 0.64);
  padding: 14px;
}

.patchnotes-preview-embed h5 {
  margin: 0 0 10px;
  color: var(--text-strong, #f8fbff);
  font-size: 1rem;
}

.patchnotes-preview-embed p,
.patchnotes-reader-body p {
  margin: 8px 0;
  color: var(--text-muted, #aebbd4);
  line-height: 1.45;
}

.patchnotes-preview-embed strong,
.patchnotes-reader-body strong {
  color: var(--text-strong, #f8fbff);
}

.patchnotes-preview-embed ul,
.patchnotes-reader-body ul {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--text-muted, #aebbd4);
  line-height: 1.45;
}

.patchnotes-reader-panel {
  margin: 12px 0 14px;
}

.patchnotes-reader-body {
  display: grid;
  gap: 8px;
}

/* Phase V0.9.9 — Patchnotes états et accès */
.patchnotes-history-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  align-items: start;
  gap: 18px;
  min-height: 116px;
  padding-top: 18px;
}

.patchnotes-history-main {
  min-width: 0;
  padding-right: 14px;
}

.patchnotes-history-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
  min-width: 170px;
  padding-top: 40px;
}

.patchnotes-history-status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.patchnotes-history-actions {
  justify-content: flex-end;
  align-items: center;
}

.patchnotes-history-actions .button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

@media (max-width: 760px) {
  .patchnotes-history-entry {
    grid-template-columns: 1fr;
  }

  .patchnotes-history-side {
    justify-items: start;
    gap: 10px;
    min-width: 0;
  }

  .patchnotes-history-actions {
    justify-content: flex-start;
    align-items: center;
  }
}


/* Phase V0.9.10 — Patchnotes filtres et cartes */
.patchnotes-history-tools .compact-select {
  flex: 0 1 190px;
  min-width: 160px;
}

.patchnotes-history-entry {
  grid-template-columns: 1fr;
  padding-right: 86px;
  padding-bottom: 16px;
}

.patchnotes-history-main {
  padding-right: 0;
}

.patchnotes-history-main > p {
  max-width: none;
}

.patchnotes-history-side {
  display: none;
}

.patchnotes-history-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.patchnotes-history-status {
  top: 14px;
  right: 14px;
}

@media (max-width: 760px) {
  .patchnotes-history-entry {
    padding-right: 14px;
    padding-top: 48px;
  }
}

/* V0.9.17 — diagnostic source Actualités / Updates de jeux */
.patchnotes-source-test-card {
  margin-top: 16px;
}

.patchnotes-source-test-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.patchnotes-source-test-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(143, 165, 255, 0.16);
  border-radius: 16px;
  background: rgba(7, 14, 28, 0.42);
}

.patchnotes-source-test-entry strong {
  display: block;
  margin-bottom: 4px;
}

.patchnotes-source-test-entry a {
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
  color: #9db4ff;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.patchnotes-source-test-entry a:hover {
  text-decoration: underline;
}


/* Phase V0.9.29 — Anti-Raid : layout coches rôle vérifié */
body:not(.public-landing) .moderation-verified-role-controls {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field {
  width: 100%;
  min-height: 56px;
  justify-content: flex-start;
  align-items: center;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field .field-label-with-help {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field .field-label-with-help > span:first-child {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body:not(.public-landing) .moderation-verified-options-grid {
  margin-top: 0;
}

body:not(.public-landing) .moderation-verified-options-grid.hidden {
  display: none !important;
}


/* Phase V0.9.30 — Anti-Raid : layout coches rôle vérifié robuste */
body:not(.public-landing) .moderation-verified-role-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  margin-top: 16px !important;
}

body:not(.public-landing) .moderation-verified-role-controls > label.checkbox-field,
body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 52px !important;
  max-width: 100% !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field input[type="checkbox"],
body:not(.public-landing) .moderation-verified-role-controls > label.checkbox-field input[type="checkbox"] {
  display: inline-block !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  flex: 0 0 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  position: static !important;
  transform: none !important;
  box-sizing: border-box !important;
  accent-color: var(--accent);
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field .field-label-with-help,
body:not(.public-landing) .moderation-verified-role-controls > label.checkbox-field .field-label-with-help {
  display: inline-flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  transform: none !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  overflow: visible !important;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field .field-label-with-help > span:first-child,
body:not(.public-landing) .moderation-verified-role-controls > label.checkbox-field .field-label-with-help > span:first-child {
  display: inline !important;
  min-width: 0 !important;
  max-width: 100% !important;
  color: var(--text) !important;
  font-size: .95rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

body:not(.public-landing) .moderation-verified-role-controls > .checkbox-field .field-help,
body:not(.public-landing) .moderation-verified-role-controls > label.checkbox-field .field-help {
  position: relative !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  writing-mode: horizontal-tb !important;
}

body:not(.public-landing) .moderation-verified-options-grid {
  width: 100% !important;
  margin-top: 0 !important;
}

body:not(.public-landing) .moderation-verified-options-grid.hidden,
body:not(.public-landing) .moderation-verified-option-field.hidden,
body:not(.public-landing) .moderation-verified-existing-role-field.hidden,
body:not(.public-landing) .moderation-verified-auto-role-field.hidden {
  display: none !important;
}


/* V0.9.33 — superadmin Anti-Raid */
.admin-antiraid-section {
  margin-top: 18px;
  padding: 18px;
}
.admin-antiraid-toolbar {
  align-items: end;
  grid-template-columns: minmax(180px, 260px) minmax(240px, 1fr) auto;
}
.admin-antiraid-member-card,
.admin-antiraid-log-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(129, 160, 255, .20);
  border-radius: 18px;
  background: rgba(8, 14, 26, .58);
}
.admin-antiraid-member-card + .admin-antiraid-member-card,
.admin-antiraid-log-card + .admin-antiraid-log-card {
  margin-top: 10px;
}
.admin-antiraid-member-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-antiraid-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-antiraid-log-line {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted, #c8d3ef);
}
@media (max-width: 920px) {
  .admin-antiraid-toolbar {
    grid-template-columns: 1fr;
  }
  .admin-antiraid-member-head {
    flex-direction: column;
  }
}


/* V0.9.35 — superadmin Anti-Raid resets granulaires */
.admin-antiraid-member-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 460px;
}
.admin-antiraid-member-actions .button {
  white-space: nowrap;
}
@media (max-width: 920px) {
  .admin-antiraid-member-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

/* V0.9.43 — superadmin Anti-Raid scam bank previews */
.admin-antiraid-scam-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
}
.admin-antiraid-scam-preview {
  width: 132px;
  min-height: 86px;
  border: 1px solid rgba(129, 160, 255, .22);
  border-radius: 14px;
  background: rgba(5, 10, 20, .68);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted, #c8d3ef);
  font-size: 12px;
  text-align: center;
  padding: 8px;
}
.admin-antiraid-scam-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 118px;
  object-fit: cover;
  border-radius: 10px;
}
.admin-antiraid-scam-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}
@media (max-width: 760px) {
  .admin-antiraid-scam-layout {
    grid-template-columns: 1fr;
  }
  .admin-antiraid-scam-preview {
    width: 100%;
  }
}

/* V0.10.2 — Actualités license notice */
.patchnotes-license-note {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.patchnotes-license-warning {
  color: #ffd37a;
}


/* V0.10.3 — Actualités premium limit button */
#create-patchnotes-watch-button.is-disabled,
#create-patchnotes-watch-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

/* Beta V1.1 — permissions preview + maintenance Actualités */
.dashboard-access-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(145, 171, 255, .32);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(91, 125, 255, .24), rgba(18, 28, 52, .88));
  box-shadow: 0 16px 38px rgba(20, 34, 78, .32);
}

.dashboard-access-preview-banner.hidden {
  display: none !important;
}

.dashboard-access-preview-banner strong {
  display: block;
  color: #f5f7ff;
}

.dashboard-access-preview-banner p {
  margin: 4px 0 0;
}

.resource-chip-preview {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(145, 171, 255, .25);
  border-radius: 999px;
  background: rgba(145, 171, 255, .16);
  color: #dbe5ff;
  cursor: pointer;
  font-size: .78rem;
  line-height: 1;
}

.resource-chip-preview:hover,
.resource-chip-preview:focus-visible {
  border-color: rgba(155, 184, 255, .58);
  background: rgba(145, 171, 255, .28);
  outline: none;
}

.superadmin-maintenance-panel {
  margin: 16px 0;
  padding: 16px;
}

.superadmin-maintenance-form {
  margin-top: 12px;
}

.superadmin-maintenance-action {
  justify-content: end;
}

/* Beta V1.1.2.2 — Planning d’équipe : activation, design et refresh */
body:not(.public-landing) .team-planning-card {
  overflow: visible;
}

body:not(.public-landing) .team-planning-page-tools {
  margin-bottom: 16px;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body:not(.public-landing) .team-planning-workspace {
  align-items: start;
}

body:not(.public-landing) .team-planning-list-column {
  min-height: 0;
  max-height: none;
}

body:not(.public-landing) .team-planning-list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  padding: 2px 2px 0;
}

body:not(.public-landing) .team-planning-list-empty {
  min-height: 220px;
}

body:not(.public-landing) .team-planning-list-item {
  width: 100%;
  text-align: left;
  min-height: 118px;
}

body:not(.public-landing) .team-planning-list-item .dashboard-module-list-status-row .pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-editor {
  gap: 14px;
}

body:not(.public-landing) .team-planning-editor-panel {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.public-landing) .team-planning-form-grid {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .028);
}

body:not(.public-landing) .team-planning-days-field {
  border: 1px solid rgba(135, 161, 255, .18);
  border-radius: 18px;
  padding: 14px 16px 16px;
  background: rgba(8, 15, 29, .38);
}

body:not(.public-landing) .team-planning-days-field legend {
  padding: 0 8px;
  color: var(--muted-strong, #c7d4f3);
  font-weight: 800;
}

body:not(.public-landing) .team-planning-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(68px, 1fr));
  gap: 10px;
}

body:not(.public-landing) .team-planning-days-grid label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(15, 23, 42, .42);
  font-weight: 800;
  color: var(--text, #f5f7ff);
}

body:not(.public-landing) .team-planning-days-grid input {
  width: 16px;
  height: 16px;
  accent-color: #91a7ff;
}

body:not(.public-landing) .team-planning-summary-section {
  display: grid;
  gap: 12px;
  margin: 0;
}

body:not(.public-landing) .team-planning-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(135, 161, 255, .16);
  border-radius: 18px;
  background: rgba(8, 15, 29, .32);
}

body:not(.public-landing) .team-planning-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

body:not(.public-landing) .team-planning-table th,
body:not(.public-landing) .team-planning-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(135, 161, 255, .12);
  border-right: 1px solid rgba(135, 161, 255, .10);
  vertical-align: top;
}

body:not(.public-landing) .team-planning-table th:last-child,
body:not(.public-landing) .team-planning-table td:last-child { border-right: 0; }
body:not(.public-landing) .team-planning-table tr:last-child td { border-bottom: 0; }

body:not(.public-landing) .team-planning-table th {
  color: var(--text, #f5f7ff);
  font-size: .88rem;
  background: rgba(124, 140, 255, .10);
}

body:not(.public-landing) .team-planning-table td strong {
  display: block;
  color: #6ef0ad;
  font-size: 1.05rem;
}

body:not(.public-landing) .team-planning-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #aab7d4);
  line-height: 1.35;
}

@media (max-width: 1180px) {
  body:not(.public-landing) .team-planning-days-grid {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions,
  body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions .button {
    width: 100%;
  }
  body:not(.public-landing) .team-planning-days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Beta V1.1.2.3 — Planning d’équipe : cleanup UI + retrait /avail */
body:not(.public-landing) .team-planning-page-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-copy {
  min-width: 0;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: .98;
  font-size: clamp(2.15rem, 4vw, 3.15rem);
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-description,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-helper {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 720px;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 460px;
}

body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

body:not(.public-landing) .team-planning-list-column {
  overflow: hidden;
}

body:not(.public-landing) .team-planning-list-tools .dashboard-module-create-button {
  width: 100%;
}

body:not(.public-landing) .team-planning-list-item {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

body:not(.public-landing) .team-planning-list-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-list-item-title {
  min-width: 0;
  color: var(--text, #f5f7ff);
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-response-pill {
  flex: 0 0 auto;
  max-width: 106px;
}

body:not(.public-landing) .team-planning-list-channel {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(145, 171, 255, .18);
  border-radius: 999px;
  background: rgba(145, 171, 255, .10);
  color: var(--muted-strong, #c7d4f3);
  font-weight: 800;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-editor,
body:not(.public-landing) .team-planning-editor-panel,
body:not(.public-landing) .team-planning-summary-section {
  min-width: 0;
  overflow: hidden;
}

body:not(.public-landing) .team-planning-empty-panel {
  min-height: 420px;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

body:not(.public-landing) .team-planning-form-grid .dashboard-field,
body:not(.public-landing) .team-planning-form-grid .resource-picker {
  min-width: 0;
  max-width: 100%;
}

body:not(.public-landing) .team-planning-days-field {
  min-width: 0;
  overflow: hidden;
}

body:not(.public-landing) .team-planning-days-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-days-grid label {
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  gap: 6px;
}

body:not(.public-landing) .team-planning-days-grid label span {
  display: inline-block;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1;
}

body:not(.public-landing) .team-planning-summary-section .section-heading-row {
  align-items: center;
  gap: 12px;
}

body:not(.public-landing) .team-planning-summary-section .section-heading-row > div {
  min-width: 0;
}

body:not(.public-landing) .team-planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-summary-day {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(135, 161, 255, .14);
  border-radius: 14px;
  background: rgba(8, 15, 29, .34);
}

body:not(.public-landing) .team-planning-summary-day strong,
body:not(.public-landing) .team-planning-summary-day span,
body:not(.public-landing) .team-planning-summary-day small {
  display: block;
  min-width: 0;
}

body:not(.public-landing) .team-planning-summary-day strong {
  color: var(--text, #f5f7ff);
  font-size: .86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-summary-day span {
  margin-top: 10px;
  color: #6ef0ad;
  font-weight: 950;
  font-size: 1.18rem;
}

body:not(.public-landing) .team-planning-summary-day small {
  margin-top: 3px;
  color: var(--muted, #aab7d4);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1240px) {
  body:not(.public-landing) .team-planning-page-tools {
    grid-template-columns: 1fr;
  }
  body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
    justify-content: flex-start;
    max-width: 100%;
  }
  body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body:not(.public-landing) .team-planning-days-grid,
  body:not(.public-landing) .team-planning-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Beta V1.1.2.4 — Planning d’équipe : lisibilité et anti-débordement */
body:not(.public-landing) .team-planning-page-tools {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: clamp(20px, 3vw, 28px);
  overflow: visible;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-copy,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-title,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-description,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-helper {
  max-width: none;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-title {
  font-size: clamp(2.05rem, 3vw, 2.9rem);
  line-height: 1.05;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
  justify-content: flex-start;
  max-width: none;
  width: 100%;
  gap: 10px;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions .button {
  min-width: max-content;
}

body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  overflow: visible;
}

body:not(.public-landing) .team-planning-list-column,
body:not(.public-landing) .team-planning-editor,
body:not(.public-landing) .team-planning-editor-panel,
body:not(.public-landing) .team-planning-summary-section {
  overflow: visible;
}

body:not(.public-landing) .team-planning-list-item {
  padding: 14px;
  gap: 12px;
}

body:not(.public-landing) .team-planning-list-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

body:not(.public-landing) .team-planning-list-item-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: block;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .team-planning-response-pill {
  max-width: none;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-list-channel {
  border-radius: 14px;
  padding: 8px 10px;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .team-planning-list-meta {
  display: none !important;
}

body:not(.public-landing) .team-planning-days-grid {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}

body:not(.public-landing) .team-planning-days-grid label {
  min-height: 46px;
  padding: 9px 10px;
}

body:not(.public-landing) .team-planning-days-grid label span {
  white-space: normal;
  text-align: center;
  line-height: 1.1;
}

body:not(.public-landing) .team-planning-summary-section {
  padding: 18px;
  border: 1px solid rgba(135, 161, 255, .16);
  border-radius: 18px;
  background: rgba(8, 15, 29, .32);
}

body:not(.public-landing) .team-planning-summary-section .section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 12px;
}

body:not(.public-landing) .team-planning-summary-section .section-heading-row .eyebrow,
body:not(.public-landing) .team-planning-summary-section .section-heading-row h4 {
  margin-left: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

body:not(.public-landing) .team-planning-summary-section .section-heading-row .button {
  position: static;
  flex: 0 0 auto;
  max-width: 100%;
}

body:not(.public-landing) .team-planning-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

body:not(.public-landing) .team-planning-summary-day strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}

body:not(.public-landing) .team-planning-summary-day small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

@media (max-width: 1240px) {
  body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
    grid-template-columns: 1fr;
  }
}


/* Beta V1.1.2.6 — Planning d’équipe : refresh manuel non destructeur */
body:not(.public-landing) .team-planning-page-tools.dashboard-page-header {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  gap: 16px !important;
  overflow: visible !important;
  padding: clamp(22px, 3vw, 30px) !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-icon,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-helper {
  display: none !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-copy {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  gap: 4px !important;
  overflow: visible !important;
  align-content: start !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-eyebrow,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-title,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-description {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-title {
  display: block !important;
  line-height: 1.05 !important;
  font-size: clamp(2.05rem, 3vw, 2.85rem) !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-description {
  line-height: 1.45 !important;
  max-width: 760px !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions .button,
body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions .icon-button {
  flex: 0 0 auto !important;
  max-width: 100% !important;
}

body:not(.public-landing) .team-planning-empty-panel {
  min-height: 520px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
}

body:not(.public-landing) .team-planning-empty-panel .dashboard-module-empty-selection-inner {
  margin: auto !important;
  max-width: 380px !important;
}

body:not(.public-landing) .team-planning-days-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  gap: 10px !important;
}

body:not(.public-landing) .team-planning-days-grid label {
  justify-content: center !important;
  min-height: 48px !important;
  padding: 10px 12px !important;
}

body:not(.public-landing) .team-planning-days-grid label span {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.1 !important;
}

body:not(.public-landing) .team-planning-summary-section.hidden {
  display: none !important;
}

body:not(.public-landing) .team-planning-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
}

/* Beta V1.1.2.7 — Planning d’équipe : DA alignée Tickets + ordre */
body:not(.public-landing) .team-planning-page-tools.dashboard-page-header {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
  justify-content: flex-end !important;
  width: auto !important;
}

body:not(.public-landing) .team-planning-list-item {
  display: grid !important;
  gap: 10px !important;
  padding: 14px !important;
  cursor: default !important;
}

body:not(.public-landing) .team-planning-list-select,
body:not(.public-landing) .team-planning-list-channel {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

body:not(.public-landing) .team-planning-list-select {
  min-width: 0;
  padding: 0;
}

body:not(.public-landing) .team-planning-list-item-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
}

body:not(.public-landing) .team-planning-order-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

body:not(.public-landing) .team-planning-order-actions .icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  opacity: .92;
}

body:not(.public-landing) .team-planning-order-actions .icon-button:disabled {
  opacity: .34;
  cursor: not-allowed;
}

body:not(.public-landing) .team-planning-list-channel {
  width: 100%;
}

body:not(.public-landing) .team-planning-list-actions {
  display: grid !important;
  grid-template-columns: minmax(0, max-content) minmax(0, max-content) minmax(96px, 1fr);
  align-items: center;
  gap: 8px;
}

body:not(.public-landing) .team-planning-list-actions .button {
  justify-self: end;
  min-width: 96px;
}

body:not(.public-landing) .team-planning-editor-panel .dashboard-module-editor-topbar {
  align-items: center;
}

body:not(.public-landing) .team-planning-editor-panel .dashboard-module-editor-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  body:not(.public-landing) .team-planning-page-tools.dashboard-page-header {
    grid-template-columns: 1fr !important;
  }
  body:not(.public-landing) .team-planning-page-tools .dashboard-page-header-actions {
    justify-content: flex-start !important;
  }
  body:not(.public-landing) .team-planning-list-actions {
    grid-template-columns: 1fr;
  }
  body:not(.public-landing) .team-planning-list-actions .button {
    justify-self: stretch;
    width: 100%;
  }
}

/* Beta V1.1.2.9 — Planning d’équipe : validation et republication sécurisée */
body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading {
  margin: 0 0 18px !important;
  padding: 0 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(135, 161, 255, .14) !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  overflow: visible !important;
}

body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading h3 {
  margin: 0 !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading .eyebrow {
  margin: 0 0 6px !important;
}

body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading .team-planning-toolbar {
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading .icon-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
}

@media (max-width: 760px) {
  body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading .team-planning-toolbar,
  body:not(.public-landing) .team-planning-card > .team-planning-page-tools.card-heading .icon-button {
    width: 100% !important;
  }
}

/* Beta V1.1.3 — Planning d'équipe : réponses dashboard */
body:not(.public-landing) .team-planning-responses-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}

body:not(.public-landing) .team-planning-responses-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

body:not(.public-landing) .team-planning-response-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(8, 15, 30, .48);
}

body:not(.public-landing) .team-planning-response-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-response-main > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-response-main strong,
body:not(.public-landing) .team-planning-response-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-response-main small {
  color: var(--muted, #aab6d3);
}

body:not(.public-landing) .team-planning-response-actions,
body:not(.public-landing) .team-planning-response-editor-actions {
  justify-content: flex-end;
}

body:not(.public-landing) .team-planning-response-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

body:not(.public-landing) .team-planning-response-days label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .54);
  color: var(--text, #e5edff);
  font-weight: 700;
}

body:not(.public-landing) .team-planning-responses-empty {
  padding: 12px 0 2px;
}

@media (max-width: 760px) {
  body:not(.public-landing) .team-planning-response-main,
  body:not(.public-landing) .team-planning-response-actions,
  body:not(.public-landing) .team-planning-response-editor-actions {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
  }
}

/* Beta V1.1.3.1 — Planning d'équipe : réponses en lecture seule */
body:not(.public-landing) .team-planning-responses-heading {
  align-items: center !important;
  gap: 14px !important;
}

body:not(.public-landing) .team-planning-responses-heading > div {
  min-width: 0;
}

body:not(.public-landing) .team-planning-responses-heading .button {
  flex: 0 0 auto;
}

body:not(.public-landing) .team-planning-response-card {
  gap: 14px !important;
}

body:not(.public-landing) .team-planning-response-days-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-response-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(15, 23, 42, .42);
  color: var(--muted, #aab6d3);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-response-day.is-selected {
  border-color: rgba(110, 240, 173, .36);
  background: rgba(26, 154, 106, .13);
  color: var(--text, #f5f7ff);
}

body:not(.public-landing) .team-planning-response-day span[aria-hidden="true"] {
  color: rgba(148, 163, 184, .72);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-response-day.is-selected span[aria-hidden="true"] {
  color: #6ef0ad;
}

body:not(.public-landing) .team-planning-response-actions {
  justify-content: flex-end !important;
}

@media (max-width: 760px) {
  body:not(.public-landing) .team-planning-responses-heading {
    align-items: stretch !important;
    flex-direction: column;
  }
  body:not(.public-landing) .team-planning-responses-heading .button,
  body:not(.public-landing) .team-planning-response-actions .button {
    width: 100%;
  }
}

/* Beta V1.1.4.1 — Planning d'équipe : import membres depuis rôle + hotfix sélection */
body:not(.public-landing) .team-planning-grid-panel {
  display: grid;
  gap: 12px;
}

body:not(.public-landing) .team-planning-availability-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(135, 161, 255, .18);
  border-radius: 18px;
  background: rgba(6, 12, 24, .42);
}

body:not(.public-landing) .team-planning-availability-grid {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

body:not(.public-landing) .team-planning-availability-grid th,
body:not(.public-landing) .team-planning-availability-grid td {
  border-right: 1px solid rgba(135, 161, 255, .12);
  border-bottom: 1px solid rgba(135, 161, 255, .12);
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

body:not(.public-landing) .team-planning-availability-grid th:first-child {
  width: 180px;
  text-align: left;
}

body:not(.public-landing) .team-planning-availability-grid th:last-child,
body:not(.public-landing) .team-planning-availability-grid td:last-child {
  border-right: 0;
}

body:not(.public-landing) .team-planning-availability-grid thead th {
  color: var(--text, #f5f7ff);
  font-weight: 900;
  background: rgba(124, 140, 255, .14);
}

body:not(.public-landing) .team-planning-availability-grid tbody th {
  color: var(--text, #f5f7ff);
  font-weight: 900;
  background: rgba(15, 23, 42, .38);
}

body:not(.public-landing) .team-planning-availability-grid tbody th span,
body:not(.public-landing) .team-planning-availability-grid tbody th small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-availability-grid tbody th small {
  margin-top: 2px;
  color: var(--muted, #aab6d3);
  font-size: .74rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-availability-grid td.is-available {
  color: #61f0a5;
  background: rgba(22, 163, 115, .22);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-availability-grid td.is-unavailable {
  color: rgba(180, 193, 219, .62);
  background: rgba(239, 68, 68, .10);
  font-weight: 900;
}

body:not(.public-landing) .team-planning-availability-grid tr.is-missing td.is-unavailable {
  background: rgba(148, 163, 184, .06);
}

body:not(.public-landing) .team-planning-availability-grid tfoot th,
body:not(.public-landing) .team-planning-availability-grid tfoot td {
  border-bottom: 0;
  color: #fff176;
  background: rgba(255, 241, 118, .07);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-grid-empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, .24);
  border-radius: 16px;
  text-align: center;
}

body:not(.public-landing) .team-planning-form-grid select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(135, 161, 255, .18);
  background: rgba(5, 11, 22, .82);
  color: var(--text, #f5f7ff);
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
}


.team-planning-role-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.team-planning-role-import-row .resource-picker {
  min-width: 0;
}

.team-planning-role-import-row .button {
  white-space: nowrap;
  min-height: 44px;
}

@media (max-width: 760px) {
  .team-planning-role-import-row {
    grid-template-columns: 1fr;
  }

  .team-planning-role-import-row .button {
    width: 100%;
  }
}


/* Beta V1.1.4.2 — Planning d'équipe : tableau pleine largeur + refresh formulaire */
body:not(.public-landing) .team-planning-summary-section {
  margin: 16px 0 18px;
  width: 100%;
  max-width: none;
}

body:not(.public-landing) .team-planning-summary-section.hidden {
  display: none !important;
}

body:not(.public-landing) .team-planning-summary-section .team-planning-summary-toolbar {
  align-items: center;
  gap: 16px;
}

body:not(.public-landing) .team-planning-summary-section .team-planning-summary-toolbar > div {
  min-width: 0;
}

body:not(.public-landing) .team-planning-grid-panel,
body:not(.public-landing) .team-planning-responses-panel {
  width: 100%;
  min-width: 0;
}

body:not(.public-landing) .team-planning-availability-grid-wrap {
  overflow-x: visible;
}

body:not(.public-landing) .team-planning-availability-grid {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

body:not(.public-landing) .team-planning-availability-grid th,
body:not(.public-landing) .team-planning-availability-grid td {
  padding: 10px 8px;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-availability-grid th:first-child {
  width: 190px;
}

body:not(.public-landing) .team-planning-availability-grid thead th:not(:first-child) {
  font-size: .82rem;
  letter-spacing: -.01em;
}

@media (max-width: 1100px) {
  body:not(.public-landing) .team-planning-availability-grid-wrap {
    overflow-x: auto;
  }
  body:not(.public-landing) .team-planning-availability-grid {
    min-width: 720px;
  }
}


/* Beta V1.1.4.3 — Planning d'équipe : grille clarifiée + réponses repliées */
body:not(.public-landing) .team-planning-summary-section {
  overflow: visible;
}

body:not(.public-landing) .team-planning-grid-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body:not(.public-landing) .team-planning-grid-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-availability-grid-wrap {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(6, 12, 24, .50);
}

body:not(.public-landing) .team-planning-availability-grid {
  border-collapse: separate;
  border-spacing: 0;
}

body:not(.public-landing) .team-planning-availability-grid th,
body:not(.public-landing) .team-planning-availability-grid td {
  border-right: 1px solid rgba(135, 161, 255, .12);
  border-bottom: 1px solid rgba(135, 161, 255, .12);
}

body:not(.public-landing) .team-planning-availability-grid thead th:first-child {
  border-top-left-radius: 17px;
}

body:not(.public-landing) .team-planning-availability-grid thead th:last-child {
  border-top-right-radius: 17px;
}

body:not(.public-landing) .team-planning-availability-grid tfoot th:first-child {
  border-bottom-left-radius: 17px;
}

body:not(.public-landing) .team-planning-availability-grid tfoot td:last-child {
  border-bottom-right-radius: 17px;
}

body:not(.public-landing) .team-planning-availability-grid tbody tr:last-child th,
body:not(.public-landing) .team-planning-availability-grid tbody tr:last-child td {
  border-bottom: 1px solid rgba(135, 161, 255, .12);
}

body:not(.public-landing) .team-planning-availability-grid tfoot th,
body:not(.public-landing) .team-planning-availability-grid tfoot td {
  border-bottom: 0;
  background: rgba(255, 241, 118, .07);
}

body:not(.public-landing) .team-planning-grid-warning {
  margin: 10px 12px 12px;
  font-size: .82rem;
}

body:not(.public-landing) .team-planning-responses-disclosure {
  margin-top: 16px;
  border: 1px solid rgba(135, 161, 255, .18);
  border-radius: 18px;
  background: rgba(6, 12, 24, .34);
  overflow: hidden;
}

body:not(.public-landing) .team-planning-responses-disclosure > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

body:not(.public-landing) .team-planning-responses-disclosure > summary::-webkit-details-marker {
  display: none;
}

body:not(.public-landing) .team-planning-responses-disclosure > summary::after {
  content: '›';
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(135, 161, 255, .18);
  color: var(--muted, #aab6d3);
  transform: rotate(0deg);
  transition: transform .18s ease, border-color .18s ease;
}

body:not(.public-landing) .team-planning-responses-disclosure[open] > summary::after {
  transform: rotate(90deg);
  border-color: rgba(135, 161, 255, .42);
}

body:not(.public-landing) .team-planning-responses-disclosure > summary strong,
body:not(.public-landing) .team-planning-responses-disclosure > summary .eyebrow {
  display: block;
}

body:not(.public-landing) .team-planning-responses-disclosure .team-planning-responses-list,
body:not(.public-landing) .team-planning-responses-disclosure .team-planning-responses-empty {
  padding: 0 18px 18px;
}

body:not(.public-landing) .team-planning-responses-disclosure .team-planning-response-card {
  margin-top: 0;
}

@media (max-width: 900px) {
  body:not(.public-landing) .team-planning-grid-heading,
  body:not(.public-landing) .team-planning-responses-disclosure > summary {
    align-items: stretch;
    flex-direction: column;
  }

  body:not(.public-landing) .team-planning-grid-heading-actions {
    justify-content: flex-start;
  }
}


/* Beta V1.1.4.5 — Planning d'équipe : tableau seul + états dispo/non dispo/en attente */
body:not(.public-landing) .team-planning-response-pill,
body:not(.public-landing) .team-planning-grid-heading-actions .pill {
  display: none !important;
}

body:not(.public-landing) .team-planning-grid-heading {
  align-items: center;
}

body:not(.public-landing) .team-planning-grid-heading-actions {
  margin-left: auto;
}

body:not(.public-landing) .team-planning-availability-grid td.is-unavailable {
  color: #ff7b91;
  background: rgba(225, 57, 92, .16);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-availability-grid td.is-pending {
  color: #ffb44c;
  background: rgba(245, 158, 11, .18);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-availability-grid td.is-available span,
body:not(.public-landing) .team-planning-availability-grid td.is-unavailable span,
body:not(.public-landing) .team-planning-availability-grid td.is-pending span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

body:not(.public-landing) .team-planning-availability-grid td.is-available span {
  background: rgba(52, 211, 153, .12);
}

body:not(.public-landing) .team-planning-availability-grid td.is-unavailable span {
  background: rgba(248, 113, 113, .12);
}

body:not(.public-landing) .team-planning-availability-grid td.is-pending span {
  background: rgba(251, 191, 36, .14);
}

body:not(.public-landing) .team-planning-responses-panel,
body:not(.public-landing) .team-planning-responses-disclosure {
  display: none !important;
}

/* Beta V1.1.4.6 — Planning d'équipe : tableau compact + garde sauvegarde */
body:not(.public-landing) .team-planning-summary-section {
  padding: 18px !important;
}

body:not(.public-landing) .team-planning-summary-section > .team-planning-summary-toolbar {
  display: none !important;
}

body:not(.public-landing) .team-planning-grid-heading {
  margin: 0 0 12px !important;
  align-items: center !important;
}

body:not(.public-landing) .team-planning-grid-heading > div {
  min-width: 0;
}

body:not(.public-landing) .team-planning-grid-heading .eyebrow {
  margin: 0 0 6px !important;
}

body:not(.public-landing) .team-planning-grid-heading h4 {
  margin: 0 !important;
}

body:not(.public-landing) .team-planning-grid-heading-actions {
  margin-left: auto !important;
}

body:not(.public-landing) .team-planning-grid-heading-actions .button {
  margin-left: auto;
}

body:not(.public-landing) .team-planning-list-item {
  display: flex !important;
  flex-direction: column !important;
  min-height: 150px !important;
}

body:not(.public-landing) .team-planning-list-item-head {
  align-items: center !important;
}

body:not(.public-landing) .team-planning-list-select {
  display: block;
  min-width: 0;
}

body:not(.public-landing) .team-planning-list-item-title {
  display: block;
  white-space: normal !important;
  line-height: 1.18 !important;
}

body:not(.public-landing) .team-planning-list-channel {
  margin-top: 2px;
  margin-bottom: 8px;
}

body:not(.public-landing) .team-planning-list-actions {
  margin-top: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  margin-left: auto !important;
}


/* Beta V1.1.5.1 — Planning d'équipe : dates du tableau sur deux lignes */
body:not(.public-landing) .team-planning-availability-grid thead th.team-planning-date-heading {
  padding: 8px 6px;
  white-space: normal !important;
  line-height: 1.08;
}

body:not(.public-landing) .team-planning-grid-day-label,
body:not(.public-landing) .team-planning-grid-date-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.public-landing) .team-planning-grid-day-label {
  color: var(--text, #f5f7ff);
  font-weight: 950;
}

body:not(.public-landing) .team-planning-grid-date-label {
  margin-top: 3px;
  color: var(--muted, #aab6d3);
  font-size: .76rem;
  font-weight: 850;
}

body:not(.public-landing) .team-planning-availability-grid th:first-child {
  width: 190px;
}

body:not(.public-landing) .team-planning-availability-grid th:not(:first-child),
body:not(.public-landing) .team-planning-availability-grid td:not(:first-child) {
  min-width: 82px;
}

/* Beta V1.1.6 — Planning dates personnalisées */
body:not(.public-landing) .team-planning-custom-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
body:not(.public-landing) .team-planning-custom-dates-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
body:not(.public-landing) .team-planning-custom-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(143, 168, 255, 0.22);
  border-radius: 14px;
  background: rgba(13, 21, 37, 0.58);
  color: var(--text-strong);
  font-weight: 800;
}
body:not(.public-landing) .team-planning-custom-date-item > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body:not(.public-landing) .team-planning-custom-date-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}
body:not(.public-landing) .team-planning-custom-dates-empty {
  margin: 0;
  padding: 8px 0 0;
}
@media (max-width: 760px) {
  body:not(.public-landing) .team-planning-custom-date-row {
    grid-template-columns: 1fr;
  }
}

/* Beta V1.1.7 — Planning publié verrouillé */
body:not(.public-landing) .team-planning-editor-panel.is-published-locked .dashboard-field,
body:not(.public-landing) .team-planning-editor-panel.is-published-locked .team-planning-role-import-field,
body:not(.public-landing) .team-planning-editor-panel.is-published-locked .team-planning-days-field {
  opacity: 0.72;
}
body:not(.public-landing) .team-planning-editor-panel.is-published-locked input:disabled,
body:not(.public-landing) .team-planning-editor-panel.is-published-locked select:disabled,
body:not(.public-landing) .team-planning-editor-panel.is-published-locked textarea:disabled,
body:not(.public-landing) .team-planning-editor-panel.is-published-locked button:disabled {
  cursor: not-allowed;
}
body:not(.public-landing) .team-planning-editor-panel .resource-picker.is-disabled {
  pointer-events: none;
  opacity: 0.72;
}
body:not(.public-landing) .team-planning-grid-empty strong,
body:not(.public-landing) .team-planning-grid-empty span {
  display: block;
}
body:not(.public-landing) .team-planning-grid-empty strong {
  color: var(--text-primary, #f4f7ff);
  margin-bottom: 6px;
}

/* Beta V1.1.7 — Planning multi-créneaux */
body:not(.public-landing) .team-planning-slots-field {
  gap: 10px;
}
body:not(.public-landing) .team-planning-slots-list {
  display: grid;
  gap: 8px;
}
body:not(.public-landing) .team-planning-slot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(142, 164, 255, 0.22);
  border-radius: 14px;
  background: rgba(9, 18, 34, 0.52);
}
body:not(.public-landing) .team-planning-slot-select {
  min-width: 0;
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(18, 29, 53, 0.7);
  color: var(--text);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
body:not(.public-landing) .team-planning-slot-select.is-active {
  border-color: rgba(127, 166, 255, 0.8);
  background: rgba(127, 166, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(127, 166, 255, 0.16) inset;
}
body:not(.public-landing) .team-planning-slot-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}
body:not(.public-landing) .team-planning-slot-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
body:not(.public-landing) .team-planning-slot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
body:not(.public-landing) .team-planning-slot-tab {
  border: 1px solid rgba(142, 164, 255, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 25, 45, 0.82);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
body:not(.public-landing) .team-planning-slot-tab.is-active {
  background: rgba(127, 166, 255, 0.22);
  border-color: rgba(127, 166, 255, 0.8);
  color: var(--text);
}
body:not(.public-landing) .team-planning-current-slot {
  margin: 4px 0 0;
  font-size: 0.86rem;
}
@media (max-width: 720px) {
  body:not(.public-landing) .team-planning-slot-add-row {
    grid-template-columns: 1fr;
  }
}

/* Beta V1.1.8.4 — Planning d'équipe : respiration côté édition + actions directes */
body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) !important;
  gap: 22px !important;
}

body:not(.public-landing) .team-planning-editor {
  min-width: 0;
  padding-right: clamp(14px, 2vw, 30px);
}

body:not(.public-landing) .team-planning-editor-panel {
  padding-right: clamp(22px, 2.4vw, 34px) !important;
}

body:not(.public-landing) .team-planning-form-grid {
  column-gap: 22px !important;
}

@media (max-width: 1240px) {
  body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
    grid-template-columns: 1fr !important;
  }
  body:not(.public-landing) .team-planning-editor {
    padding-right: 0;
  }
}


/* Beta V1.1.8.4.1 — Planning d'équipe : cartes compactes + colonne d'édition réélargie */
body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) !important;
  gap: 16px !important;
}

body:not(.public-landing) .team-planning-editor {
  min-width: 0;
  padding-right: 0 !important;
}

body:not(.public-landing) .team-planning-editor-panel {
  padding-right: 0 !important;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 18px !important;
}

body:not(.public-landing) .team-planning-list-item {
  gap: 8px !important;
  padding: 12px !important;
}

body:not(.public-landing) .team-planning-list-item-head {
  gap: 8px !important;
}

body:not(.public-landing) .team-planning-list-item-title {
  line-height: 1.1 !important;
}

body:not(.public-landing) .team-planning-order-actions {
  gap: 5px !important;
}

body:not(.public-landing) .team-planning-order-actions .icon-button {
  width: 32px;
  height: 32px;
  min-width: 32px;
}

body:not(.public-landing) .team-planning-list-channel {
  padding: 6px 10px !important;
}

body:not(.public-landing) .team-planning-list-actions {
  gap: 6px !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  min-width: 92px;
}

@media (max-width: 1240px) {
  body:not(.public-landing) .team-planning-workspace.dashboard-module-workspace {
    grid-template-columns: 1fr !important;
  }
}


/* Beta V1.1.8.4.2 — Planning d'équipe : cartes encore plus compactes + alignements liste */
body:not(.public-landing) .team-planning-list-item {
  gap: 6px !important;
  padding: 10px 12px !important;
}

body:not(.public-landing) .team-planning-list-item-head {
  gap: 6px !important;
}

body:not(.public-landing) .team-planning-order-actions .icon-button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}

body:not(.public-landing) .team-planning-list-channel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-align: left !important;
  justify-self: start !important;
  color: var(--text-soft, #d6def5) !important;
}

body:not(.public-landing) .team-planning-list-actions {
  grid-template-columns: max-content max-content !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  justify-self: end !important;
  min-width: 88px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: .95rem !important;
  line-height: 1 !important;
}


/* Beta V1.1.8.4.3 — Planning d'équipe : resserrage final liste */
body:not(.public-landing) .team-planning-list-item {
  gap: 4px !important;
}

body:not(.public-landing) .team-planning-list-channel {
  margin-bottom: -1px !important;
}

body:not(.public-landing) .team-planning-list-actions {
  margin-top: -2px !important;
  gap: 6px !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  min-width: 84px !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  font-size: .9rem !important;
}


/* Beta V1.1.8.4.4 — Planning d'équipe : cartes réellement ajustées au contenu */
body:not(.public-landing) .team-planning-list-item.dashboard-module-list-item,
body:not(.public-landing) .team-planning-list-item {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-content: start !important;
  align-items: start !important;
  grid-auto-rows: min-content !important;
  padding: 10px 12px 8px !important;
  gap: 4px !important;
}

body:not(.public-landing) .team-planning-list-item > * {
  min-height: 0 !important;
}

body:not(.public-landing) .team-planning-list-actions {
  align-self: start !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body:not(.public-landing) .team-planning-list-actions .pill {
  min-height: 26px !important;
  height: 26px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  min-height: 26px !important;
  height: 26px !important;
  min-width: 78px !important;
  padding: 0 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* Beta V1.1.8.4.5 — Planning d'équipe : publier calé à droite + flèches calées en haut */
body:not(.public-landing) .team-planning-list-item {
  grid-template-rows: auto auto auto !important;
}

body:not(.public-landing) .team-planning-list-item-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  width: 100% !important;
}

body:not(.public-landing) .team-planning-list-select {
  display: block !important;
  width: 100% !important;
}

body:not(.public-landing) .team-planning-order-actions {
  justify-self: end !important;
  align-self: start !important;
}

body:not(.public-landing) .team-planning-list-actions {
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  justify-content: initial !important;
  align-items: center !important;
}

body:not(.public-landing) .team-planning-list-actions .pill {
  justify-self: start !important;
}

body:not(.public-landing) .team-planning-list-actions .button {
  justify-self: end !important;
}


/* Beta V1.1.8.4.6 — Planning d'équipe : léger rééquilibrage des espacements */
body:not(.public-landing) .team-planning-list-channel {
  margin-bottom: 4px !important;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  row-gap: 18px !important;
}


/* Beta V1.1.8.4.7 — Planning d'équipe : colonne droite réalignée sur les espacements communs */
body:not(.public-landing) .team-planning-editor {
  display: grid !important;
  gap: 18px !important;
  align-content: start !important;
}

body:not(.public-landing) .team-planning-editor-panel {
  display: grid !important;
  gap: 18px !important;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  row-gap: 22px !important;
  column-gap: 18px !important;
}

body:not(.public-landing) .team-planning-form-grid .dashboard-field {
  margin: 0 !important;
}

body:not(.public-landing) .team-planning-custom-dates-field,
body:not(.public-landing) .team-planning-slots-field,
body:not(.public-landing) .team-planning-role-import-field {
  display: grid !important;
  gap: 10px !important;
}

body:not(.public-landing) .team-planning-custom-date-row,
body:not(.public-landing) .team-planning-slot-add-row,
body:not(.public-landing) .team-planning-role-import-row {
  margin-top: 0 !important;
}


/* Beta V1.1.8.4.8 — Planning d'équipe : panneau vide masqué quand un planning est édité */
body:not(.public-landing) .team-planning-empty-panel.hidden {
  display: none !important;
}


/* Beta V1.1.8.4.9 — Planning d'équipe : éditeur masqué sans sélection */
body:not(.public-landing) .team-planning-editor-panel.hidden {
  display: none !important;
}


/* Beta V1.1.8.4.10 — Planning d'équipe : espacements colonne droite alignés sur les autres modules */
body:not(.public-landing) .team-planning-editor {
  gap: 16px !important;
}

body:not(.public-landing) .team-planning-editor-panel {
  gap: 16px !important;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  row-gap: 16px !important;
  column-gap: 16px !important;
}

body:not(.public-landing) .team-planning-form-grid .dashboard-field {
  display: grid !important;
  gap: 9px !important;
  margin: 0 !important;
}

body:not(.public-landing) .team-planning-custom-dates-field,
body:not(.public-landing) .team-planning-slots-field,
body:not(.public-landing) .team-planning-role-import-field {
  display: grid !important;
  gap: 9px !important;
}


/* Beta V1.1.8.5.1 — Planning d'équipe : hotfix rollback CSS + cases jours disponibles */
body:not(.public-landing) .team-planning-days-grid input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 0 !important;
  accent-color: #87a1ff;
  flex: 0 0 16px;
  position: static !important;
  opacity: 1 !important;
}

body:not(.public-landing) .team-planning-days-grid label {
  align-items: center !important;
}


/* Beta V1.1.8.5.2 — Planning d'équipe : espacement vertical final côté formulaire */
body:not(.public-landing) .team-planning-editor {
  gap: 20px !important;
}

body:not(.public-landing) .team-planning-editor-panel {
  gap: 20px !important;
}

body:not(.public-landing) .team-planning-form-grid.two-columns {
  row-gap: 22px !important;
  column-gap: 18px !important;
}

body:not(.public-landing) .team-planning-form-grid .dashboard-field {
  display: grid !important;
  gap: 10px !important;
  margin: 0 !important;
}

body:not(.public-landing) .team-planning-custom-dates-field,
body:not(.public-landing) .team-planning-slots-field,
body:not(.public-landing) .team-planning-role-import-field {
  display: grid !important;
  gap: 14px !important;
}

body:not(.public-landing) .team-planning-custom-dates-list,
body:not(.public-landing) .team-planning-slots-list {
  display: grid !important;
  gap: 10px !important;
}

body:not(.public-landing) .team-planning-custom-dates-list:empty,
body:not(.public-landing) .team-planning-slots-list:empty {
  min-height: 8px !important;
}

body:not(.public-landing) .team-planning-custom-date-row,
body:not(.public-landing) .team-planning-slot-add-row,
body:not(.public-landing) .team-planning-role-import-row {
  margin-top: 0 !important;
}


/* Beta V1.1.8.5.3 — Planning d'équipe : espacement forcé entre blocs du formulaire */
body:not(.public-landing) .team-planning-form-grid {
  display: grid !important;
  gap: 0 !important;
}

body:not(.public-landing) .team-planning-form-grid > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body:not(.public-landing) .team-planning-form-grid > * + * {
  margin-top: 18px !important;
}

body:not(.public-landing) .team-planning-form-grid .dashboard-field {
  display: grid !important;
  gap: 9px !important;
}

body:not(.public-landing) .team-planning-custom-dates-field > * + *,
body:not(.public-landing) .team-planning-slots-field > * + *,
body:not(.public-landing) .team-planning-role-import-field > * + * {
  margin-top: 10px !important;
}

body:not(.public-landing) .team-planning-custom-dates-list,
body:not(.public-landing) .team-planning-slots-list {
  display: grid !important;
  gap: 10px !important;
}


/* Beta V1.1.8.5.4 — Planning d'équipe : formulaire une colonne + jours lisibles */
body:not(.public-landing) .team-planning-form-grid.two-columns {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.public-landing) .team-planning-form-grid > * {
  grid-column: 1 / -1 !important;
}

body:not(.public-landing) .team-planning-days-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body:not(.public-landing) .team-planning-days-grid label {
  justify-content: flex-start !important;
}


/* Beta V1.1.9 — Planning d'équipe : jours disponibles masqués en dates personnalisées */
body:not(.public-landing) .team-planning-days-field.hidden {
  display: none !important;
}


/* Beta V1.1.9 — Planning d'équipe : récurrence + masquage des dates personnalisées en semaine auto */
body:not(.public-landing) .team-planning-custom-dates-field.hidden,
body:not(.public-landing) .team-planning-days-field.hidden,
body:not(.public-landing) .team-planning-recurrence-field.hidden {
  display: none !important;
}

body:not(.public-landing) .team-planning-recurrence-field {
  border: 1px solid rgba(135, 161, 255, .18);
  border-radius: 18px;
  padding: 14px 16px 16px;
  background: rgba(8, 15, 29, .38);
}
body:not(.public-landing) .team-planning-recurrence-field legend {
  padding: 0 8px;
  color: var(--muted-strong, #c7d4f3);
  font-weight: 800;
}
body:not(.public-landing) .team-planning-recurrence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
body:not(.public-landing) .team-planning-recurrence-next-run {
  margin: 12px 0 0;
  line-height: 1.45;
}
body:not(.public-landing) .team-planning-recurrence-actions {
  margin-top: 12px;
}
@media (max-width: 820px) {
  body:not(.public-landing) .team-planning-recurrence-grid {
    grid-template-columns: 1fr;
  }
}


/* Beta V1.1.9.1 — Discord custom emoji rendering in dashboard previews */
body:not(.public-landing) .discord-emoji-render {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  max-width: 1.5em;
  line-height: 1;
  flex: 0 0 auto;
}

body:not(.public-landing) .discord-custom-emoji-inline {
  width: 1.15em;
  height: 1.15em;
  min-width: 1.15em;
  object-fit: contain;
  vertical-align: -0.18em;
  display: inline-block;
}

body:not(.public-landing) .ticket-panel-preview-button .discord-custom-emoji-inline,
body:not(.public-landing) .ticket-panel-preview-buttons .discord-custom-emoji-inline {
  width: 1.05em;
  height: 1.05em;
  min-width: 1.05em;
}

body:not(.public-landing) .ticket-simple-button-icon.discord-emoji-render {
  overflow: hidden;
}

body:not(.public-landing) .ticket-simple-button-icon.discord-emoji-render .discord-custom-emoji-inline {
  width: 1.35em;
  height: 1.35em;
  min-width: 1.35em;
}


/* Beta V1.1.20 — Planning d'équipe : archivage */
body:not(.public-landing) .team-planning-archive-field {
  display: grid;
  gap: 12px;
}

body:not(.public-landing) .team-planning-archive-actions,
body:not(.public-landing) .team-planning-recurrence-actions {
  justify-content: flex-start;
}

body:not(.public-landing) .team-planning-archive-state {
  margin: 0;
}


/* Beta V1.1.21.3 — Planning : options récurrence / archivage conditionnelles */
body:not(.public-landing) .team-planning-recurrence-options.hidden,
body:not(.public-landing) .team-planning-archive-options.hidden,
body:not(.public-landing) .team-planning-recurrence-field.hidden {
  display: none !important;
}


/* Beta V1.1.21.3 — Planning : rôles à ping */
body:not(.public-landing) .team-planning-card [data-resource-target="#team-planning-ping-role-ids-input"] {
  min-width: 0;
}


/* Beta V1.1.21.3 — Planning : occurrences et historique */
body:not(.public-landing) .team-planning-list-view-toolbar {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
}

body:not(.public-landing) .team-planning-list-view-summary {
  color: var(--text-muted, #aeb9d6);
  font-size: .86rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-list-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-list-group + .team-planning-list-group {
  margin-top: 8px;
}

body:not(.public-landing) .team-planning-occurrence-list {
  display: grid;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(135, 161, 255, .22);
}

body:not(.public-landing) .team-planning-occurrence-summary {
  padding: 3px 10px 5px 12px;
  color: var(--text-muted, #aeb9d6);
  font-size: .82rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-list-item-occurrence {
  padding-top: 8px !important;
  padding-bottom: 7px !important;
  background: rgba(255, 255, 255, .025) !important;
  border-color: rgba(135, 161, 255, .14) !important;
}

body:not(.public-landing) .team-planning-list-period {
  display: block;
  margin-top: 2px;
  color: var(--text-muted, #aeb9d6);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.public-landing) .team-planning-list-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

body:not(.public-landing) .team-planning-list-badges .pill {
  min-height: 22px;
  height: 22px;
  padding: 0 8px;
  font-size: .74rem;
}

body:not(.public-landing) .team-planning-list-item.is-archived {
  opacity: .78;
}


/* Beta V1.1.21.3.1 — Planning : occurrences en résumé, archives masquées du dashboard */
body:not(.public-landing) .team-planning-occurrence-summary {
  display: grid;
  gap: 6px;
  padding: 7px 10px 8px 12px;
  border-left: 1px solid rgba(135, 161, 255, .22);
  color: var(--text-muted, #aeb9d6);
}

body:not(.public-landing) .team-planning-occurrence-summary-title,
body:not(.public-landing) .team-planning-occurrence-summary-collapsed {
  color: var(--text-muted, #aeb9d6);
  font-size: .82rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-occurrence-summary-collapsed {
  padding: 3px 10px 5px 12px;
  border-left: 1px solid rgba(135, 161, 255, .18);
}

body:not(.public-landing) .team-planning-occurrence-summary-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body:not(.public-landing) .team-planning-occurrence-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body:not(.public-landing) .team-planning-occurrence-summary-period {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-occurrence-summary-more {
  color: var(--text-muted, #aeb9d6);
  font-size: .78rem;
  font-weight: 800;
}

body:not(.public-landing) .team-planning-list-view-toolbar {
  margin-bottom: 10px;
}


/* Beta V1.1.21.3 — Planning : occurrences intégrées aux cartes maîtres */
body:not(.public-landing) .team-planning-list-view-toolbar {
  margin: 6px 0 10px;
}

body:not(.public-landing) .team-planning-list-view-summary {
  display: none !important;
}

body:not(.public-landing) .team-planning-list-badges:empty {
  display: none !important;
}

body:not(.public-landing) .team-planning-occurrence-summary {
  display: grid;
  gap: 7px;
  margin: -2px 0 0;
  padding: 8px 10px 9px;
  border: 1px solid rgba(135, 161, 255, .13);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(8, 15, 29, .22);
}

body:not(.public-landing) .team-planning-occurrence-summary-title {
  color: var(--text-muted, #aeb9d6);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

body:not(.public-landing) .team-planning-occurrence-chip-list {
  display: grid;
  gap: 6px;
}

body:not(.public-landing) .team-planning-occurrence-chip {
  appearance: none;
  border: 1px solid rgba(135, 161, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-soft, #d6def5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 7px 5px 10px;
  text-align: left;
  cursor: pointer;
}

body:not(.public-landing) .team-planning-occurrence-chip:hover,
body:not(.public-landing) .team-planning-occurrence-chip.is-active {
  border-color: rgba(135, 161, 255, .45);
  background: rgba(79, 105, 255, .12);
}

body:not(.public-landing) .team-planning-occurrence-chip-period {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 900;
}

body:not(.public-landing) .team-planning-occurrence-summary-collapsed {
  margin: -2px 0 0;
  padding: 7px 10px 8px;
  border: 1px solid rgba(135, 161, 255, .10);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(8, 15, 29, .18);
  color: var(--text-muted, #aeb9d6);
  font-size: .8rem;
  font-weight: 900;
}

body:not(.public-landing) .team-planning-occurrence-summary-more {
  color: var(--text-muted, #aeb9d6);
  font-size: .78rem;
  font-weight: 800;
  padding-left: 4px;
}


/* Beta V1.1.21.3 — Planning occurrences intégrées + permissions boutons tickets */
body:not(.public-landing) .team-planning-occurrence-summary-collapsed,
body:not(.public-landing) .team-planning-list-view-summary,
body:not(.public-landing) .team-planning-occurrence-summary-title {
  display: none !important;
}

body:not(.public-landing) .team-planning-list-badges:empty {
  display: none !important;
}

body:not(.public-landing) .team-planning-occurrence-summary {
  display: grid;
  gap: 6px;
  margin: -2px 0 0;
  padding: 8px 9px 9px;
  border: 1px solid rgba(135, 161, 255, .13);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(8, 15, 29, .22);
}

body:not(.public-landing) .team-planning-occurrence-chip-list {
  display: grid;
  gap: 6px;
}

body:not(.public-landing) .team-planning-occurrence-chip {
  appearance: none;
  border: 1px solid rgba(135, 161, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-soft, #d6def5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px 7px 5px 10px;
  text-align: left;
  cursor: pointer;
}

body:not(.public-landing) .team-planning-occurrence-chip:hover,
body:not(.public-landing) .team-planning-occurrence-chip.is-active {
  border-color: rgba(135, 161, 255, .45);
  background: rgba(79, 105, 255, .12);
}

body:not(.public-landing) .team-planning-occurrence-chip-period {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 900;
}


/* Beta V1.1.2.1 — Planning : état incertain */
body:not(.public-landing) .team-planning-availability-grid td.is-uncertain {
  color: #76b7ff;
  background: rgba(59, 130, 246, .16);
  font-weight: 950;
}


/* Beta V1.1.2 — Hotfix rendu checkbox planning */
body:not(.public-landing) .team-planning-option-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(135, 161, 255, .18);
  border-radius: 16px;
  background: rgba(5, 11, 24, .36);
  color: var(--text);
  font-weight: 800;
}

body:not(.public-landing) .team-planning-option-toggle input[type="checkbox"] {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  flex: 0 0 20px;
  appearance: auto;
  accent-color: var(--accent);
  box-shadow: none;
}

body:not(.public-landing) .team-planning-option-toggle span {
  min-width: 0;
  line-height: 1.35;
}


/* Beta V1.1.2 — Superadmin : activité dashboard */
body:not(.public-landing) .global-dashboard-activity-card .admin-dashboard-activity-toolbar {
  align-items: end;
}

body:not(.public-landing) .admin-dashboard-activity-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body:not(.public-landing) .admin-dashboard-activity-user small,
body:not(.public-landing) .admin-dashboard-activity-path {
  color: var(--muted);
}


/* Beta V1.1.2 — Superadmin MP : ouverture par ID utilisateur */
body:not(.public-landing) .bot-dm-open-user-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

body:not(.public-landing) .bot-dm-open-user-card .button {
  width: 100%;
}


/* Beta V1.1.2 — Anti-Raid : ajout local images scam */
body:not(.public-landing) .admin-antiraid-scam-upload {
  align-items: end;
}
body:not(.public-landing) .admin-antiraid-scam-upload input[type="file"] {
  cursor: pointer;
}


/* Beta V1.1.2 — Twitch preview fallback sans bannière */
body:not(.public-landing) .discord-event-banner-fallback .discord-event-banner-image,
body:not(.public-landing) .discord-event-banner-image.hidden {
  display: none !important;
}

body:not(.public-landing) .discord-event-banner-fallback .discord-event-banner-title {
  opacity: 1;
}


/* Beta V1.1.2 — Twitch preview : cadre bannière unique */
body:not(.public-landing) .discord-event-preview {
  width: 100%;
}

body:not(.public-landing) .discord-event-banner {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 5 / 2;
  overflow: hidden;
}

body:not(.public-landing) .discord-event-banner-image {
  position: absolute !important;
  inset: 0 !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  z-index: 0 !important;
}

body:not(.public-landing) .discord-event-banner::before {
  z-index: 1;
}

body:not(.public-landing) .discord-event-banner-title {
  position: relative;
  z-index: 2;
}

body:not(.public-landing) .discord-event-banner::after {
  z-index: 3;
}

body:not(.public-landing) .discord-event-banner-has-image .discord-event-banner-title {
  opacity: 0;
}


/* Beta V1.1.2 — mentions # salons dans les zones de texte */
.mention-choice-icon.channel {
  background: rgba(52, 211, 153, 0.16);
  color: #77f7c0;
}

.mention-choice-icon.channel.voiceChannels {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

.mention-choice-icon.channel.forums {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}


/* Beta V1.1.2 — hotfix picker mentions : largeur stable */
body:not(.public-landing) .dashboard-mention-popover {
  width: min(420px, calc(100vw - 24px)) !important;
  min-width: min(320px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  box-sizing: border-box;
  contain: layout paint;
}

body:not(.public-landing) .dashboard-mention-popover *,
body:not(.public-landing) .dashboard-mention-popover *::before,
body:not(.public-landing) .dashboard-mention-popover *::after {
  box-sizing: border-box;
}

body:not(.public-landing) .mention-popover-content {
  width: 100%;
  max-height: min(320px, calc(100vh - 96px));
  overflow-x: hidden;
  overflow-y: auto;
}

body:not(.public-landing) .mention-picker-section,
body:not(.public-landing) .mention-choice,
body:not(.public-landing) .mention-choice > span {
  min-width: 0;
}

body:not(.public-landing) .mention-choice {
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) !important;
}

body:not(.public-landing) .mention-choice strong,
body:not(.public-landing) .mention-choice small {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body:not(.public-landing) .mention-empty {
  min-width: 0;
}

/* Beta V1.1.2 — champs Embed : layout propre et unique
   Objectif : éviter les surcharges successives sur Nom / Valeur / Inline. */
body:not(.public-landing) .embed-fields-editor,
body:not(.public-landing) .embed-fields-list,
body:not(.public-landing) .auto-response-embed-fields-list {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body:not(.public-landing) .embed-fields-editor .embed-field-row,
body:not(.public-landing) .auto-response-embed-field-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "header"
    "body" !important;
  gap: 12px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  container-type: inline-size;
}

body:not(.public-landing) .embed-field-row-header {
  grid-area: header !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-width: 0 !important;
  width: 100% !important;
}

body:not(.public-landing) .embed-field-row-grid {
  grid-area: body !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) 148px !important;
  grid-template-areas:
    "name inline"
    "value value" !important;
  gap: 12px !important;
  align-items: end !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
}

body:not(.public-landing) .embed-field-row-grid > .field:first-child {
  grid-area: name !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body:not(.public-landing) .embed-field-row-grid > .embed-field-value-field {
  grid-area: value !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body:not(.public-landing) .embed-field-row-grid > .embed-field-inline.checkbox-field {
  grid-area: inline !important;
  justify-self: end !important;
  align-self: end !important;
  box-sizing: border-box !important;
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 0 !important;
}

body:not(.public-landing) .embed-field-row-grid .emoji-input-wrap,
body:not(.public-landing) .embed-field-row-grid input:not([type="checkbox"]),
body:not(.public-landing) .embed-field-row-grid textarea,
body:not(.public-landing) .embed-field-value-field .embed-field-readable-preview {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body:not(.public-landing) textarea.embed-field-value-textarea {
  min-height: 112px !important;
  max-height: none !important;
  resize: vertical !important;
  overflow-y: auto !important;
  white-space: pre-wrap !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  line-height: 1.45 !important;
}

body:not(.public-landing) .embed-field-readable-preview {
  display: block !important;
  margin-top: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
}

@container (max-width: 620px) {
  body:not(.public-landing) .embed-field-row-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "name"
      "value"
      "inline" !important;
  }

  body:not(.public-landing) .embed-field-row-grid > .embed-field-inline.checkbox-field {
    justify-self: start !important;
  }
}


/* Beta V1.2.4 — salons en lecture seule : conservation des pièces jointes dans les logs */
body:not(.public-landing) .protected-channels-workspace {
  align-items: start;
}

body:not(.public-landing) .protected-channels-list-column,
body:not(.public-landing) .protected-channel-config-column {
  min-width: 0;
}

body:not(.public-landing) .protected-channel-config-column {
  align-self: start;
  height: fit-content;
}

body:not(.public-landing) .protected-channel-editor-panel {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  align-self: start;
  gap: 12px;
  min-width: 0;
  height: fit-content;
}

body:not(.public-landing) .protected-channel-editor-topbar {
  align-self: start;
  min-height: 56px;
  height: auto;
}

body:not(.public-landing) .protected-channel-editor-panel.hidden {
  display: none !important;
}

body:not(.public-landing) .protected-channel-rule-grid {
  align-items: start;
  margin: 0;
}

body:not(.public-landing) .protected-channel-enabled-toggle,
body:not(.public-landing) .protected-channel-option {
  align-self: end;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
}

body:not(.public-landing) .protected-channel-enabled-toggle {
  justify-content: flex-start;
}

body:not(.public-landing) .protected-channel-option .field-help {
  margin-left: auto;
}

body:not(.public-landing) .protected-channel-seconds-field.hidden {
  display: none !important;
}

body:not(.public-landing) .protected-channel-message-field {
  min-width: 0;
}

body:not(.public-landing) .protected-channel-message-field textarea {
  min-height: 116px;
  resize: vertical;
}

body:not(.public-landing) .protected-channel-macro-help {
  margin-top: 8px;
}

body:not(.public-landing) .protected-channel-list-tools {
  align-content: start;
}

body:not(.public-landing) .protected-channel-status-filter-field,
body:not(.public-landing) .protected-channel-status-filter-field select {
  width: 100%;
  min-width: 0;
}

body:not(.public-landing) .input-suffix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body:not(.public-landing) .input-suffix-row > span {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

@media (max-width: 820px) {
  body:not(.public-landing) .protected-channel-editor-topbar {
    align-items: stretch;
  }

  body:not(.public-landing) .protected-channel-editor-topbar .dashboard-module-editor-actions {
    width: 100%;
  }
}

/* Beta V1.3.8 — Anniversaires sur les composants communs du dashboard */
body:not(.public-landing) .subtabs + .subtab-section,
body:not(.public-landing) .subtabs-inline + .subtab-section {
  margin-top: 16px;
}

body:not(.public-landing) [data-subtab-section="birthdays:members"],
body:not(.public-landing) [data-subtab-section="birthdays:configuration"],
body:not(.public-landing) #birthday-editor-panel {
  min-width: 0;
}

body:not(.public-landing) [data-subtab-section="birthdays:members"].hidden,
body:not(.public-landing) [data-subtab-section="birthdays:configuration"].hidden,
body:not(.public-landing) #birthday-editor-panel.hidden {
  display: none !important;
}

body:not(.public-landing) [data-subtab-section="birthdays:members"] {
  display: grid;
  gap: 18px;
}

body:not(.public-landing) #birthday-editor-panel {
  display: grid;
  gap: 12px;
}

body:not(.public-landing) #birthdays-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

body:not(.public-landing) .birthday-list-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 34px;
  background: rgba(255,255,255,.06);
}

body:not(.public-landing) .birthday-list-title {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

body:not(.public-landing) .birthday-list-title-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

body:not(.public-landing) .dashboard-form-intro {
  margin: 0 0 18px;
  line-height: 1.55;
}

body:not(.public-landing) .birthday-message-fields {
  margin-top: 18px;
}

@media (max-width: 620px) {
  body:not(.public-landing) .birthday-message-fields {
    grid-template-columns: 1fr !important;
  }
}

/* Beta V1.3.8 — calendrier et diagnostic Anniversaires */
body:not(.public-landing) [data-subtab-section="birthdays:calendar"] {
  min-width: 0;
}

body:not(.public-landing) [data-subtab-section="birthdays:calendar"].hidden {
  display: none !important;
}

body:not(.public-landing) .birthday-announcement-diagnostic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body:not(.public-landing) .birthday-announcement-diagnostic > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(7, 14, 28, .38);
}

body:not(.public-landing) .birthday-announcement-diagnostic span,
body:not(.public-landing) .birthday-announcement-diagnostic small {
  color: var(--muted);
}

body:not(.public-landing) .birthday-announcement-diagnostic strong,
body:not(.public-landing) .birthday-announcement-diagnostic small {
  overflow-wrap: anywhere;
}

body:not(.public-landing) .birthday-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

body:not(.public-landing) .birthday-calendar-title {
  margin: 0 0 14px;
}

body:not(.public-landing) .birthday-calendar-weekdays,
body:not(.public-landing) .birthday-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body:not(.public-landing) .birthday-calendar-weekdays {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

body:not(.public-landing) .birthday-calendar-weekdays span {
  padding: 8px 3px;
}

body:not(.public-landing) .birthday-calendar-grid {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5, 11, 23, .36);
}

body:not(.public-landing) .birthday-calendar-day {
  position: relative;
  display: grid;
  align-content: space-between;
  justify-items: start;
  min-width: 0;
  min-height: 82px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

body:not(.public-landing) .birthday-calendar-day:nth-child(7n) {
  border-right: 0;
}

body:not(.public-landing) .birthday-calendar-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

body:not(.public-landing) .birthday-calendar-day:hover,
body:not(.public-landing) .birthday-calendar-day:focus-visible {
  background: rgba(126, 155, 255, .10);
  outline: none;
}

body:not(.public-landing) .birthday-calendar-day.is-outside {
  color: rgba(180, 192, 220, .42);
}

body:not(.public-landing) .birthday-calendar-day.is-today .birthday-calendar-day-number {
  color: var(--accent);
  font-weight: 900;
}

body:not(.public-landing) .birthday-calendar-day.is-selected {
  background: linear-gradient(145deg, rgba(126, 155, 255, .30), rgba(124, 92, 255, .18));
  box-shadow: inset 0 0 0 2px rgba(142, 166, 255, .78);
}

body:not(.public-landing) .birthday-calendar-day-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

body:not(.public-landing) .birthday-calendar-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5, 11, 23, .34);
}

body:not(.public-landing) .birthday-calendar-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

body:not(.public-landing) .birthday-calendar-detail-heading > h4 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  body:not(.public-landing) .birthday-announcement-diagnostic,
  body:not(.public-landing) .birthday-calendar-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body:not(.public-landing) .birthday-calendar-day {
    min-height: 56px;
    padding: 7px;
  }

  body:not(.public-landing) .birthday-calendar-day-marker {
    width: 22px;
    height: 22px;
    font-size: .85rem;
  }

  body:not(.public-landing) .birthday-calendar-detail-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Beta V1.3.9 — avatars membres dans les pickers communs */
body:not(.public-landing) .resource-member-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,.07);
}

body:not(.public-landing) .resource-member-avatar-empty {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.08);
}
