@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap");

:root {
  --discord-bg: #111214;
  --discord-surface: #15171a;
  --discord-surface-elevated: #1e2025;
  --discord-message-hover: #24262d;
  --discord-border: hsla(0, 0%, 100%, 0.08);
  --discord-border-strong: hsla(0, 0%, 100%, 0.14);
  --discord-text: #f2f3f5;
  --discord-muted: #949ba4;
  --discord-soft: #b5bac1;
  --discord-link: #00a8fc;
  --discord-blurple: #5865f2;
  --discord-green: #23a559;
  --discord-yellow: #f0b232;
  --discord-red: #f23f43;
  --discord-radius: 8px;
  --discord-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  --emoji-size: 24px;
  --font-geist-sans: "Geist", system-ui, sans-serif;
  --font-geist-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --page-pad-x: clamp(14px, 3vw, 28px);
  --avatar-size: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--discord-bg);
  color: var(--discord-text);
  font-family: var(--font-geist-sans);
}

body {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

a {
  color: var(--discord-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

/* ——— Shell ——— */
.discord-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  background: var(--discord-surface);
  display: flex;
  flex-direction: column;
}

.discord-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px var(--page-pad-x);
  background: #1e2025;
  border-bottom: 1px solid var(--discord-border);
}

.discord-channel-info,
.discord-header-actions,
.discord-header-pill {
  display: flex;
  align-items: center;
}

.discord-channel-info {
  min-width: 0;
  gap: 10px;
  flex: 1 1 auto;
}

.discord-channel-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  color: var(--discord-soft);
  background: #2b2d34;
  border: 1px solid var(--discord-border);
  border-radius: 50%;
  font-size: 16px;
}

.discord-channel-name {
  overflow: hidden;
  color: var(--discord-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-header-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.discord-header-pill {
  min-height: 32px;
  gap: 8px;
  padding: 0 12px;
  color: var(--discord-soft);
  background: #262932;
  border: 1px solid var(--discord-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.discord-header-pill svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.discord-header-pill span {
  line-height: 1;
}

/* ——— Body: résumé 30% | conversation 70% — pleine largeur ——— */
.discord-body {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px var(--page-pad-x) 40px;
  display: grid;
  grid-template-columns: minmax(260px, 30%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  box-sizing: border-box;
}

.discord-body:not(:has(.ticket-info-panel)) {
  grid-template-columns: 1fr;
}

/* ——— Ticket summary (colonne gauche) ——— */
.ticket-info-panel {
  margin: 0;
  padding: 0;
  width: 100%;
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

.ticket-info-card {
  background: var(--discord-surface-elevated);
  border: 1px solid var(--discord-border);
  border-radius: 10px;
  padding: 14px 14px 12px;
}

.ticket-info-title {
  margin: 0 0 10px;
  color: var(--discord-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-info-grid {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ticket-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--discord-border);
  font-size: 13px;
  line-height: 1.45;
}

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

.ticket-info-row dt {
  margin: 0;
  color: var(--discord-muted);
  font-weight: 650;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticket-info-row dd {
  margin: 0;
  color: var(--discord-soft);
  min-width: 0;
  overflow-wrap: anywhere;
}

.ticket-info-row-block {
  align-items: stretch;
}

.ticket-info-demande {
  white-space: pre-wrap;
  color: #dbdee1;
  background: rgba(15, 16, 18, 0.45);
  border: 1px solid var(--discord-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  font-family: var(--font-geist-mono);
  max-height: 280px;
  overflow: auto;
}

.ticket-info-ai {
  background: rgba(155, 89, 182, 0.08);
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-left: 3px solid #9b59b6;
  border-radius: 6px;
  padding: 10px 12px;
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
}

.ticket-info-ai.discord-markdown h1,
.ticket-info-ai.discord-markdown h2,
.ticket-info-ai.discord-markdown h3 {
  font-size: 14px;
  margin: 8px 0 4px;
}

.ticket-info-ai.discord-markdown h1:first-child,
.ticket-info-ai.discord-markdown h2:first-child,
.ticket-info-ai.discord-markdown h3:first-child {
  margin-top: 0;
}

.ticket-info-card code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-geist-mono);
  font-size: 0.92em;
  color: var(--discord-text);
}

/* ——— Chat (colonne droite) ——— */
.discord-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  width: 100%;
  min-width: 0;
}

.discord-chat-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0 8px;
  padding: 0 4px;
  color: var(--discord-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legend-staff::before,
.legend-player::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 0;
}

.legend-staff::before {
  background: #5865f2;
}

.legend-player::before {
  background: #23a559;
}

.discord-message-block {
  min-width: 0;
  display: flex;
  width: 100%;
}

.discord-message-block.is-staff {
  justify-content: flex-start;
}

.discord-message-block.is-player {
  justify-content: flex-end;
}

.discord-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: auto;
  max-width: min(100%, 920px);
  padding: 10px 12px;
  border-radius: 12px;
  transition: background-color 0.12s ease;
}

.discord-message-staff {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-bottom-left-radius: 4px;
}

.discord-message-player {
  flex-direction: row-reverse;
  background: rgba(35, 165, 89, 0.1);
  border: 1px solid rgba(35, 165, 89, 0.22);
  border-bottom-right-radius: 4px;
}

.discord-message:hover {
  filter: brightness(1.06);
}

.discord-message-player .discord-message-header {
  justify-content: flex-end;
}

.discord-message-player .discord-components-v2,
.discord-message-player .discord-media-grid,
.discord-message-player .discord-embed {
  margin-left: auto;
}

.side-tag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
}

.side-tag-player {
  background: rgba(35, 165, 89, 0.25);
  color: #3ba55d;
}

.discord-message-deleted {
  opacity: 0.66;
}

.discord-message-deleted .discord-markdown {
  text-decoration: line-through;
}

.discord-user-trigger {
  display: block;
  flex: 0 0 var(--avatar-size);
  width: var(--avatar-size);
  height: var(--avatar-size);
  padding: 0;
  margin-top: 2px;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
}

.discord-avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  background: #2b2d34;
  border: 1px solid var(--discord-border-strong);
}

.discord-user-trigger:focus-visible,
.discord-username-button:focus-visible {
  outline: 2px solid var(--discord-blurple);
  outline-offset: 2px;
}

.discord-message-content {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 1px;
}

.discord-message-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-height: 22px;
  margin-bottom: 2px;
}

.discord-username-button {
  padding: 0;
  color: var(--discord-text);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.discord-username-button:hover {
  text-decoration: underline;
}

.bot-tag {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--discord-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.discord-time,
.discord-edited {
  color: var(--discord-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.discord-deleted {
  color: var(--discord-red);
  font-size: 12px;
  font-weight: 650;
}

/* ——— Markdown ——— */
.discord-markdown {
  color: #dbdee1;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.discord-embed-content p,
.discord-markdown p {
  margin: 0 0 6px;
}

.discord-embed-content p:last-child,
.discord-markdown p:last-child {
  margin-bottom: 0;
}

.discord-embed-content strong,
.discord-markdown strong {
  color: var(--discord-text);
  font-weight: 700;
}

.discord-embed-content h1,
.discord-embed-content h2,
.discord-embed-content h3,
.discord-markdown h1,
.discord-markdown h2,
.discord-markdown h3 {
  margin: 10px 0 6px;
  color: var(--discord-text);
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.discord-embed-content h1:first-child,
.discord-embed-content h2:first-child,
.discord-embed-content h3:first-child,
.discord-markdown h1:first-child,
.discord-markdown h2:first-child,
.discord-markdown h3:first-child {
  margin-top: 0;
}

.discord-markdown h1 {
  font-size: 1.35rem;
}

.discord-markdown h2 {
  font-size: 1.15rem;
}

.discord-markdown h3 {
  font-size: 1.02rem;
}

.discord-embed-content a,
.discord-markdown a {
  color: #00a8fc;
  text-decoration: none;
}

.discord-embed-content a:hover,
.discord-markdown a:hover {
  text-decoration: underline;
}

.discord-embed-content em,
.discord-markdown em {
  color: #cfd2d7;
}

.discord-embed-content blockquote,
.discord-markdown blockquote {
  margin: 8px 0;
  padding: 2px 0 2px 10px;
  color: var(--discord-soft);
  border-left: 4px solid #4e5058;
}

.discord-embed-content code,
.discord-markdown code {
  padding: 2px 5px;
  color: #f7f8f8;
  background: #0f1012;
  border: 1px solid var(--discord-border);
  border-radius: 4px;
  font-family: var(--font-geist-mono);
  font-size: 0.92em;
}

.discord-embed-content pre,
.discord-markdown pre {
  max-width: 100%;
  margin: 8px 0;
  padding: 12px;
  overflow: auto;
  background: #0f1012;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
}

.discord-embed-content pre code,
.discord-markdown pre code {
  padding: 0;
  background: transparent;
  border: 0;
}

.discord-embed-content ol,
.discord-embed-content ul,
.discord-markdown ol,
.discord-markdown ul {
  padding-left: 22px;
  margin: 6px 0 8px;
}

.discord-embed-content li,
.discord-markdown li {
  margin: 2px 0;
}

.discord-embed-content li > p,
.discord-markdown li > p {
  margin: 0;
}

.discord-embed-content hr,
.discord-markdown hr {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--discord-border-strong);
}

.mention {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  border-radius: 3px;
  padding: 0 2px;
}

/* ——— Media ——— */
.discord-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 500px);
  gap: 10px;
  margin-top: 8px;
}

.discord-media,
.video-container {
  width: min(100%, 500px);
  overflow: hidden;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
  background: #0f1012;
}

.discord-media-button {
  display: block;
  width: min(100%, 500px);
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: var(--discord-radius);
  cursor: zoom-in;
}

.discord-media-button:focus-visible {
  outline: 2px solid var(--discord-blurple);
  outline-offset: 3px;
}

.discord-media {
  display: block;
  height: auto;
  object-fit: contain;
}

.video-player {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}

/* ——— Components V2 ——— */
.discord-components-v2 {
  display: flex;
  width: 100%;
  max-width: 680px;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.discord-component-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  color: #dbdee1;
  background: rgba(32, 35, 42, 0.9);
  border: 1px solid var(--discord-border);
  border-left: 4px solid var(--discord-blurple);
  border-radius: var(--discord-radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.discord-component-text {
  min-width: 0;
}

.discord-component-text .discord-markdown {
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.45;
}

.discord-component-text .discord-markdown h1,
.discord-component-text .discord-markdown h2,
.discord-component-text .discord-markdown h3 {
  margin: 0 0 8px;
  color: var(--discord-text);
  font-weight: 750;
  line-height: 1.2;
}

.discord-component-text .discord-markdown h1 {
  font-size: 21px;
}

.discord-component-text .discord-markdown h2 {
  font-size: 18px;
}

.discord-component-text .discord-markdown h3 {
  font-size: 16px;
}

.discord-component-separator {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: var(--discord-border-strong);
}

.discord-component-spacing-2 {
  margin: 8px 0;
}

.discord-component-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.discord-component-section-content,
.discord-component-unknown {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.discord-component-accessory {
  width: 80px;
  flex: 0 0 auto;
}

.discord-component-media {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: #0f1012;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
  line-height: 0;
}

.discord-component-media img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0;
  cursor: zoom-in;
}

.discord-component-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.discord-component-gallery-item {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: #0f1012;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
}

.discord-component-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
}

.discord-component-file {
  display: flex;
  width: min(100%, 420px);
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--discord-text);
  text-decoration: none;
  background: rgba(15, 16, 18, 0.54);
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
}

.discord-component-file:hover {
  border-color: var(--discord-border-strong);
  background: rgba(20, 22, 26, 0.74);
  text-decoration: none;
}

.discord-component-file-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: #5865f2;
  border-radius: 8px;
}

.discord-component-file small,
.discord-component-file strong {
  display: block;
  overflow-wrap: anywhere;
}

.discord-component-file small {
  margin-top: 2px;
  color: var(--discord-muted);
  font-size: 12px;
}

.discord-component-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.discord-component-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  gap: 6px;
  color: #dbdee1;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  background: #4e5058;
  border: 1px solid transparent;
  border-radius: 6px;
  opacity: 0.92;
  cursor: not-allowed;
}

.discord-component-button-primary {
  color: #fff;
  background: #5865f2;
}

.discord-component-button-secondary {
  color: #dbdee1;
  background: #4e5058;
}

.discord-component-button-success {
  color: #fff;
  background: #248046;
}

.discord-component-button-danger {
  color: #fff;
  background: #da373c;
}

.discord-component-button-link {
  color: #fff;
  text-decoration: none;
  background: #5865f2;
  cursor: pointer;
}

.discord-component-button-link:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

/* ——— Embeds (inside message content → no extra left margin) ——— */
.discord-embed {
  width: min(100%, 660px);
  margin: 8px 0 0;
  padding: 12px;
  color: var(--discord-soft);
  background: rgba(32, 35, 42, 0.94);
  border: 1px solid var(--discord-border);
  border-left: 4px solid var(--discord-green);
  border-radius: var(--discord-radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.discord-embed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.discord-embed-main {
  min-width: 0;
}

.discord-embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--discord-text);
  font-size: 14px;
  font-weight: 720;
}

.discord-embed-author a {
  color: inherit;
  text-decoration: none;
}

.discord-embed-author a:hover,
.discord-embed-title:hover {
  text-decoration: underline;
}

.discord-embed-author-image {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-header {
  margin-bottom: 8px;
}

.discord-embed-title {
  color: var(--discord-text);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.discord-embed-content {
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.discord-embed-field {
  min-width: 0;
  grid-column: 1 / -1;
}

.discord-embed-field-inline {
  grid-column: span 1;
}

.discord-embed-field-name,
.discord-embed-field-value {
  display: block;
  overflow-wrap: anywhere;
}

.discord-embed-field-name {
  margin-bottom: 2px;
  color: var(--discord-text);
  font-size: 13px;
  font-weight: 750;
}

.discord-embed-field-value {
  color: var(--discord-soft);
  font-size: 13px;
  line-height: 1.42;
}

.discord-embed-field-name p,
.discord-embed-field-value p {
  margin: 0 0 4px;
}

.discord-embed-field-name p:last-child,
.discord-embed-field-value p:last-child {
  margin-bottom: 0;
}

.discord-embed-image-button,
.discord-embed-thumbnail-button {
  display: block;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: var(--discord-radius);
  cursor: zoom-in;
}

.discord-embed-image {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
}

.discord-embed-thumbnail-button {
  width: 96px;
  max-width: 24vw;
}

.discord-embed-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--discord-border);
  border-radius: var(--discord-radius);
}

.discord-embed-image-button:focus-visible,
.discord-embed-thumbnail-button:focus-visible {
  outline: 2px solid var(--discord-blurple);
  outline-offset: 3px;
}

.discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--discord-muted);
  font-size: 12px;
}

.discord-embed-footer-image {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-empty-state {
  display: grid;
  min-height: 200px;
  place-items: center;
  color: var(--discord-muted);
  font-size: 14px;
  margin: 0;
}

hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--discord-border);
}

/* ——— Home card (fallback routes) ——— */
.home-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--discord-bg);
}

.home-card {
  max-width: 420px;
  padding: 28px;
  background: var(--discord-surface);
  border: 1px solid var(--discord-border);
  border-radius: 12px;
  box-shadow: var(--discord-shadow);
}

.home-card h1 {
  margin: 8px 0;
  font-size: 28px;
}

.home-card p {
  margin: 0;
  color: var(--discord-muted);
  line-height: 1.5;
}

.home-kicker {
  margin: 0;
  color: var(--discord-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ——— Lightbox ——— */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  background: rgba(17, 18, 20, 0.85);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(35, 165, 89, 0.9);
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  cursor: default;
}

/* ——— Mobile ——— */
@media (max-width: 720px) {
  :root {
    --avatar-size: 36px;
    --page-pad-x: 12px;
  }

  .discord-header {
    gap: 10px;
    min-height: 48px;
  }

  .discord-channel-name {
    font-size: 15px;
  }

  .discord-header-pill {
    padding: 0 10px;
    font-size: 12px;
  }

  .discord-message {
    gap: 10px;
    padding: 8px 10px;
    max-width: 100%;
  }

  .discord-chat-legend {
    margin-bottom: 6px;
  }

  .discord-body {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px var(--page-pad-x) 28px;
  }

  /* Pas de panneau résumé sur téléphone — conversation seule */
  .ticket-info-panel {
    display: none !important;
  }

  .ticket-info-demande,
  .ticket-info-ai {
    max-height: none;
  }

  .ticket-info-row {
    padding: 8px 0;
  }

  .ticket-info-row dt {
    font-size: 11px;
  }

  .discord-component-section {
    grid-template-columns: 1fr;
  }

  .discord-component-accessory {
    width: 72px;
  }

  .discord-component-button {
    min-width: 0;
    white-space: normal;
  }

  .discord-embed-fields,
  .discord-embed-grid {
    grid-template-columns: 1fr;
  }

  .discord-embed-field-inline {
    grid-column: 1;
  }

  .discord-embed-thumbnail-button {
    width: min(140px, 100%);
    max-width: 100%;
  }
}
