/* Sources citees par les reponses IA. Charge uniquement sur l'interface chat. */
.msg-citations {
  width: min(100%, 760px);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.msg-citations__heading {
  margin-bottom: 8px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.msg-citations__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.msg-citation {
  display: flex;
  min-width: 0;
  gap: 9px;
  padding: 10px;
  color: var(--text2);
  text-decoration: none;
  background: color-mix(in srgb, var(--surface2) 78%, transparent);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.msg-citation:is(a):hover {
  color: var(--text);
  background: var(--surface2);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  transform: translateY(-1px);
}
.msg-citation--document { cursor: default; }
.msg-citation__number {
  display: inline-grid;
  flex: 0 0 26px;
  width: 26px;
  height: 22px;
  padding: 0 3px;
  place-items: center;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 7px;
}
.msg-citation__body,
.msg-citation__title,
.msg-citation__domain,
.msg-citation__excerpt { display: block; min-width: 0; }
.msg-citation__body { overflow: hidden; }
.msg-citation__title {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-citation__domain {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-citation__excerpt {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text3);
  font-size: 11.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (max-width: 680px) {
  .msg-citations__list { grid-template-columns: 1fr; }
  .msg-citation__excerpt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .msg-citation { transition: none; }
}
