/* Aperçu Discord (thème sombre, PC). Valeurs reprises du CSS de Discord. Chargé après style.css. */
.dc-preview {
  --dc-bg: #313338; --dc-embed: #2b2d31; --dc-text: #dbdee1; --dc-strong: #f2f3f5; --dc-muted: #949ba4; --dc-link: #00a8fc;
  background: var(--dc-bg); color: var(--dc-text); border-radius: 8px; padding: 16px 0 20px; max-height: 80vh; overflow: auto;
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.375rem;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
.dc-preview * { box-sizing: border-box; }
/* Message */
.dc-preview .dc-message { position: relative; padding: 2px 48px 2px 72px; min-height: 2.75rem; }
.dc-preview .dc-message.is-first { margin-top: 1.0625rem; }
.dc-preview .dc-message.is-first:first-child { margin-top: 0; }
.dc-preview .dc-message.is-cont { margin-top: 0; padding-top: .125rem; min-height: 1.375rem; }
.dc-preview .dc-avatar { position: absolute; left: 16px; top: 2px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.dc-preview .dc-hover-time { position: absolute; left: 0; width: 56px; text-align: right; font-size: .6875rem; line-height: 1.375rem; color: var(--dc-muted); opacity: 0; }
.dc-preview .dc-message.is-cont:hover .dc-hover-time { opacity: 1; }
.dc-preview .dc-header { display: block; line-height: 1.375rem; min-height: 1.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-preview .dc-username { font-size: 1rem; font-weight: 500; color: var(--dc-strong); }
.dc-preview .dc-bot-tag { display: inline-flex; align-items: center; gap: 1px; height: .9375rem; padding: 0 .275rem 0 .1rem; margin-left: .25rem; border-radius: .1875rem;
  background: #5865f2; color: #fff; font-size: .625rem; font-weight: 500; line-height: .9375rem; text-transform: uppercase; vertical-align: top; position: relative; top: .2rem; }
.dc-preview .dc-check { width: .9375rem; height: .9375rem; margin-left: -.1rem; }
.dc-preview .dc-timestamp { margin-left: .25rem; font-size: .75rem; font-weight: 500; line-height: 1.375rem; color: var(--dc-muted); vertical-align: baseline; }
.dc-preview .dc-content { font-size: 1rem; line-height: 1.375rem; color: var(--dc-text); }
.dc-preview .dc-empty { color: var(--dc-muted); font-style: italic; }
.dc-preview .dc-ephemeral { margin-top: 4px; font-size: .75rem; color: var(--dc-muted); }

/* Markdown (dans le message et dans les embeds) */
.dc-preview .dc-markup { white-space: normal; }
.dc-preview .dc-text { white-space: pre-wrap; }
.dc-preview .dc-markup strong { font-weight: 700; }
.dc-preview .dc-markup .dc-h { font-weight: 700; color: var(--dc-strong); line-height: 1.375em; margin: 16px 0 8px; }
.dc-preview .dc-markup > .dc-h:first-child { margin-top: 8px; }
.dc-preview .dc-markup h1.dc-h { font-size: 1.5rem; }
.dc-preview .dc-markup h2.dc-h { font-size: 1.25rem; }
.dc-preview .dc-markup h3.dc-h { font-size: 1rem; }
.dc-preview .dc-subtext { display: block; font-size: .8125rem; line-height: 1.11719rem; color: var(--dc-muted); }
.dc-preview .dc-list { margin: 4px 0 0 16px; padding: 0; list-style: disc outside; }
.dc-preview ol.dc-list { list-style: decimal outside; margin-left: 24px; }
.dc-preview .dc-list .dc-list { margin-top: 0; list-style-type: circle; }
.dc-preview .dc-list li { margin-bottom: 4px; white-space: pre-wrap; }
.dc-preview .dc-quote { display: flex; margin: 0; }
.dc-preview .dc-quote-bar { flex: none; width: 4px; border-radius: 4px; background: #4e5058; }
.dc-preview .dc-quote blockquote { margin: 0; padding: 0 8px 0 12px; max-width: 90%; text-indent: 0; }
.dc-preview .dc-inline-code { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", monospace; font-size: .85em; line-height: 1.125rem;
  padding: 0 .2em; margin: -.2em 0; border-radius: 4px; background: var(--dc-embed); border: 1px solid #1e1f22; white-space: pre-wrap; }
.dc-preview .dc-embed .dc-inline-code { background: #1e1f22; }
.dc-preview .dc-codeblock { margin: 6px 0 0; }
.dc-preview .dc-codeblock code { display: block; padding: .5em; border-radius: 4px; background: #2b2d31; border: 1px solid #1e1f22; font-family: Consolas, "Lucida Console", monospace;
  font-size: .875rem; line-height: 1.125rem; color: #b5bac1; white-space: pre-wrap; }
.dc-preview .dc-embed .dc-codeblock code { background: #1e1f22; }
.dc-preview .dc-link { color: var(--dc-link); text-decoration: none; cursor: pointer; }
.dc-preview .dc-link:hover { text-decoration: underline; }
.dc-preview .dc-mention { border-radius: 3px; padding: 0 2px; font-weight: 500; background: rgba(88, 101, 242, .3); color: #c9cdfb; unicode-bidi: plaintext; }
.dc-preview .dc-channel::before { content: "#"; margin-right: 1px; }
.dc-preview .dc-time-tag { background: rgba(78, 80, 88, .48); border-radius: 3px; padding: 0 2px; }
.dc-preview .dc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; }
.dc-preview .dc-spoiler:hover { color: inherit; background: rgba(255, 255, 255, .1); }
.dc-preview img.dc-emoji { width: 1.375em; height: 1.375em; vertical-align: bottom; object-fit: contain; margin: 0 .05em 0 .1em; }

/* Embed */
.dc-preview .dc-embeds { display: grid; gap: 4px; padding: .125rem 0; justify-items: start; }
.dc-preview .dc-embed { position: relative; display: grid; grid-template-columns: auto; gap: 0; max-width: 520px; width: fit-content; min-width: 0; box-sizing: border-box;
  padding: 0 !important; margin: 0; border-radius: 4px; border-left: 4px solid #1e1f22; background: var(--dc-embed); }
.dc-preview .dc-embed-grid { display: inline-grid; grid-template-columns: auto; grid-template-rows: auto; padding: .5rem 1rem 1rem .75rem; min-width: 0; overflow: hidden; }
.dc-preview .dc-embed-grid.has-thumb { grid-template-columns: auto min-content; }
.dc-preview .dc-embed-grid > * { grid-column: 1 / 1; min-width: 0; }
.dc-preview .dc-embed-author { display: flex; align-items: center; margin-top: 8px; font-size: .875rem; font-weight: 600; line-height: 1.375rem; color: var(--dc-strong); }
.dc-preview .dc-embed-author-icon { width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; object-fit: contain; }
.dc-preview .dc-embed-title { margin-top: 8px; font-size: 1rem; font-weight: 600; line-height: 1.375rem; color: var(--dc-strong); display: inline-block; }
.dc-preview .dc-embed-title.is-link { color: var(--dc-link); }
.dc-preview .dc-embed-desc { margin-top: 8px; font-size: .875rem; line-height: 1.125rem; color: var(--dc-text); }
.dc-preview .dc-embed-desc .dc-h { line-height: 1.375em; }
.dc-preview .dc-embed-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.dc-preview .dc-embed-field { min-width: 0; font-size: .875rem; line-height: 1.125rem; }
.dc-preview .dc-embed-field-name { margin-bottom: 2px; font-weight: 600; color: var(--dc-strong); }
.dc-preview .dc-embed-field-value { color: var(--dc-text); }
.dc-preview .dc-embed-thumb { grid-row: 1 / 8; grid-column: 2 / 2; margin: 8px 0 0 16px; max-width: 80px; max-height: 80px; border-radius: 4px; object-fit: contain; justify-self: end; }
.dc-preview .dc-embed-image { margin-top: 16px; border-radius: 4px; overflow: hidden; max-width: 400px; }
.dc-preview .dc-embed-image img { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; }
.dc-preview .dc-embed-footer { display: flex; align-items: center; margin-top: 8px; font-size: .75rem; line-height: 1rem; font-weight: 500; color: var(--dc-text); }
.dc-preview .dc-embed-footer-icon { width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; object-fit: contain; }
.dc-preview .dc-sep { margin: 0 4px; }

/* Boutons */
.dc-preview .dc-components { display: grid; gap: 8px; padding: 4px 0; }
.dc-preview .dc-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-preview .dc-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 32px; min-width: 60px; padding: 2px 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 16px; color: #fff; user-select: none; }
.dc-preview .dc-button.is-primary { background: #5865f2; }
.dc-preview .dc-button.is-success { background: #248046; }
.dc-preview .dc-button.is-danger { background: #da373c; }
.dc-preview .dc-button.is-secondary { background: #4e5058; }
.dc-preview .dc-btn-emoji, .dc-preview .dc-btn-emoji-wrap img { width: 1.375em; height: 1.375em; object-fit: contain; }
.dc-preview .dc-btn-emoji-wrap { display: inline-flex; }
.dc-preview .dc-btn-link-icon { display: inline-flex; margin-left: 4px; }
/* Menu déroulant (Informations) */
.dc-preview .dc-select { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 400px; height: 40px; margin-top: 4px; padding: 8px 12px;
  border-radius: 8px; background: #1e1f22; border: 1px solid #1e1f22; color: var(--dc-muted); font-size: 15px; }

/* Les images du dashboard sont « display: block » par défaut : pas dans l'aperçu. */
.dc-preview img.dc-emoji, .dc-preview .dc-btn-emoji, .dc-preview .dc-btn-emoji-wrap img { display: inline-block; max-width: none; }
.dc-preview .dc-embed-author-icon, .dc-preview .dc-embed-footer-icon { display: inline-block; }

/* Image en pièce jointe (au-dessus de l'embed) */
.dc-preview .dc-attachment { grid-column: 2; margin-top: 4px; max-width: 550px; }
.dc-preview .dc-attachment img { display: block; max-width: 100%; max-height: 350px; border-radius: 8px; }

