/* ============================================================================
   W.O.L.F. — Mur d'échange « Chat process » (T9). Habillage charte.
   Chargée UNIQUEMENT sur la page /chat (voir head.php). Consomme les tokens
   sémantiques (aucune valeur brute) : cohérence dark-first + accent de meute.
   ============================================================================ */

/* --- Cadre d'usage (charte du mur) ----------------------------------------- */
.wolf-chat__charter {
  margin-block: var(--wolf-space-6);
  padding: var(--wolf-space-5);
  background: var(--wolf-color-surface-2);
  border: var(--wolf-border-hairline) solid var(--wolf-color-border-subtle);
  border-inline-start: var(--wolf-border-thick) solid var(--wolf-color-accent-line);
  border-radius: var(--wolf-radius-md);
}
.wolf-chat__charter-title {
  margin: 0 0 var(--wolf-space-2);
  font-weight: var(--wolf-weight-semibold);
  color: var(--wolf-color-text);
}
.wolf-chat__charter-list {
  margin: 0;
  padding-inline-start: var(--wolf-space-5);
  color: var(--wolf-color-text-muted);
  font-size: var(--wolf-text-sm);
}
.wolf-chat__charter-list li { margin-block: var(--wolf-space-1); }

/* --- Notices (résultat d'un envoi no-JS, états du mur) ---------------------- */
.wolf-chat__notice,
.wolf-chat__closed,
.wolf-chat__disabled {
  margin-block: var(--wolf-space-4);
  padding: var(--wolf-space-3) var(--wolf-space-4);
  border-radius: var(--wolf-radius-md);
  border: var(--wolf-border-hairline) solid var(--wolf-color-border);
  font-size: var(--wolf-text-sm);
  color: var(--wolf-color-text);
}
.wolf-chat__notice--ok   { background: var(--wolf-color-success-soft); border-color: var(--wolf-color-success); }
.wolf-chat__notice--err  { background: var(--wolf-color-danger-soft);  border-color: var(--wolf-color-danger); }
.wolf-chat__notice--warn { background: var(--wolf-color-warning-soft); border-color: var(--wolf-color-warning); }
.wolf-chat__closed,
.wolf-chat__disabled { background: var(--wolf-color-surface-2); color: var(--wolf-color-text-muted); }

/* --- Enveloppe du mur ------------------------------------------------------ */
.wolf-chat {
  max-width: 760px;
  margin-block: var(--wolf-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--wolf-space-5);
}

/* --- Fil des messages ------------------------------------------------------ */
.wolf-chat__stream {
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--wolf-space-5);
  background:
    radial-gradient(900px 300px at 85% -30%, var(--wolf-color-accent-soft), transparent 60%),
    var(--wolf-color-surface);
  border: var(--wolf-border-hairline) solid var(--wolf-color-border);
  border-radius: var(--wolf-radius-lg);
  box-shadow: var(--wolf-shadow-md);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  .wolf-chat__stream { scroll-behavior: auto; }
}

.wolf-chat__empty {
  margin: 0;
  padding-block: var(--wolf-space-6);
  text-align: center;
  color: var(--wolf-color-text-subtle);
  font-style: italic;
}

.wolf-chat__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--wolf-space-4);
}

.wolf-chat__msg {
  padding: var(--wolf-space-3) var(--wolf-space-4);
  background: var(--wolf-color-surface-2);
  border: var(--wolf-border-hairline) solid var(--wolf-color-border-subtle);
  border-radius: var(--wolf-radius-md);
  animation: wolf-chat-in var(--wolf-duration-normal) var(--wolf-ease);
}
@keyframes wolf-chat-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wolf-chat__msg { animation: none; }
}

.wolf-chat__msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wolf-space-3);
  margin-bottom: var(--wolf-space-1);
}
.wolf-chat__msg-name {
  font-weight: var(--wolf-weight-semibold);
  color: var(--wolf-color-accent-text);
  overflow-wrap: anywhere;
}
.wolf-chat__msg-time {
  flex: none;
  font-family: var(--wolf-font-mono);
  font-size: var(--wolf-text-2xs);
  color: var(--wolf-color-text-subtle);
}
.wolf-chat__msg-text {
  margin: 0;
  color: var(--wolf-color-text);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* --- Composeur ------------------------------------------------------------- */
.wolf-chat__form {
  display: flex;
  flex-direction: column;
  gap: var(--wolf-space-4);
  padding: var(--wolf-space-5);
  background: var(--wolf-color-surface);
  border: var(--wolf-border-hairline) solid var(--wolf-color-border);
  border-radius: var(--wolf-radius-lg);
}
.wolf-chat__textarea { min-height: 90px; }

.wolf-chat__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wolf-space-4);
  flex-wrap: wrap;
}
.wolf-chat__counter {
  font-family: var(--wolf-font-mono);
  font-size: var(--wolf-text-xs);
  color: var(--wolf-color-text-subtle);
}
.wolf-chat__counter.is-low { color: var(--wolf-color-warning); }

.wolf-chat__privacy {
  margin: 0;
  font-size: var(--wolf-text-xs);
  color: var(--wolf-color-text-subtle);
}

.wolf-chat__status {
  margin: 0;
  font-size: var(--wolf-text-sm);
  color: var(--wolf-color-text-muted);
}
.wolf-chat__status--ok  { color: var(--wolf-color-success); }
.wolf-chat__status--err { color: var(--wolf-color-danger); }

/* --- Pot de miel (jamais visible, hors flux, hors lecteurs pratiques) ------- */
.wolf-chat__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
