/* =========================
 * Univers Center — Chat CSS
 * ========================= */
:root {
  --uc-bg: #0f1115;
  --uc-panel: #16181f;
  --uc-line: #22252e;
  --uc-text: #e5e7eb;
  --uc-sub: #a3a7b3;
  --uc-accent: #f29100;

  --bubble-user: rgba(255, 255, 255, 0.06);
  --bubble-ai: rgba(242, 145, 0, 0.10);
}

.uc-chat {
  padding: clamp(1.2rem, 2vw, 2rem) 0;
  background: var(--uc-bg);
  color: var(--uc-text);
}

.uc-chat__grid {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  width: min(1100px, 92%);
  margin: 0 auto;
}
@media (max-width: 900px) {
  .uc-chat__grid { grid-template-columns: 1fr; }
}

/* Colonne intro */
.uc-chat__intro {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  border: 1px solid #22242c;
  border-radius: 14px;
  padding: clamp(1rem, 2vw, 1.4rem);
}
.uc-chat__intro h2 {
  margin: 0 0 .4rem;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}
.uc-chat__intro .lead {
  opacity: .9;
  margin: .2rem 0 1rem;
  line-height: 1.5;
}
.uc-chat__intro .bullets { margin: .6rem 0 1rem 1rem; }
.uc-chat__intro .bullets li { margin: .25rem 0; color: var(--uc-sub); }
.btn-primary {
  background: var(--uc-accent); color: #111; border: 0;
  padding: .6rem 1rem; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.btn-primary:focus { outline: 2px solid #fff2; outline-offset: 2px; }
.hint { display: block; margin-top: .75rem; color: var(--uc-sub); }

/* Panneau mIRC */
.uc-irc {
  display: flex; flex-direction: column;
  background: var(--uc-panel);
  border: 1px solid var(--uc-line);
  border-radius: 14px;
  overflow: hidden;
  height: 520px;        /* hauteur fixe */
  max-height: 520px;
}
.uc-irc__header {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem;
  background: #12141a;
  border-bottom: 1px solid var(--uc-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.uc-irc__header .dot {
  width: .6rem; height: .6rem; background: #2ecc71; border-radius: 50%;
  box-shadow: 0 0 0 2px #1b1f27 inset;
}
.uc-irc__header .status { margin-left: auto; color: var(--uc-sub); font-size: .9rem; }

/* Badge typing dans l’entête */
.uc-irc__typing {
  display: none;
  align-items: center;
  gap: .35rem;
  margin-left: .5rem;
  color: var(--uc-sub);
  font-size: .9rem;
  opacity: .9;
}
.uc-irc__typing .typing-ellipsis {
  display: inline-flex; gap: .2rem; align-items: center;
}
.uc-irc__typing .typing-ellipsis span {
  width: .28rem; height: .28rem; border-radius: 50%;
  background: var(--uc-sub);
  opacity: .6;
  animation: uc-blink 1.2s infinite;
}
.uc-irc__typing .typing-ellipsis span:nth-child(2) { animation-delay: .15s; }
.uc-irc__typing .typing-ellipsis span:nth-child(3) { animation-delay: .3s; }

@keyframes uc-blink {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-2px); opacity: 1; }
}

.uc-irc__viewport {
  flex: 1;
  overflow-y: auto; overflow-x: hidden;
  background: repeating-linear-gradient(
    transparent, transparent 27px,
    rgba(255,255,255,.02) 27px, rgba(255,255,255,.02) 28px
  );
}

.uc-irc__stream {
  list-style: none; margin: 0; padding: .6rem .8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .95rem;
}

.uc-irc__stream li {
  padding: .25rem 0;
  display: flex; gap: .6rem; align-items: flex-start;
}

/* plus d’heure */
.uc-irc__ts { display: none; }

/* Colonne nom expéditeur plus étroite */
.uc-irc__nick {
  min-width: 5rem;
  max-width: 7rem;
  text-align: right;
  padding-right: .8rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Zone message large + bulles */
.uc-irc__msg {
  flex: 1;
  max-width: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.45;
  padding: .3rem .6rem;
  border-radius: 8px;
}
.uc-irc__line.is-user .uc-irc__msg { background: var(--bubble-user); }
.uc-irc__line.is-ai .uc-irc__msg { background: var(--bubble-ai); }

/* Bulle “typing…” animée dans le flux */
.uc-irc__line.typing .uc-irc__msg {
  display: inline-flex; align-items: center; gap: .35rem;
}
.uc-irc__line.typing .typing-ellipsis {
  display: inline-flex; gap: .2rem;
}
.uc-irc__line.typing .typing-ellipsis span {
  width: .3rem; height: .3rem; border-radius: 50%;
  background: var(--uc-sub);
  opacity: .6;
  animation: uc-blink 1.2s infinite;
}
.uc-irc__line.typing .typing-ellipsis span:nth-child(2) { animation-delay: .15s; }
.uc-irc__line.typing .typing-ellipsis span:nth-child(3) { animation-delay: .3s; }

/* Composer */
.uc-irc__composer {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem;
  padding: .6rem .8rem; border-top: 1px solid var(--uc-line); background: #12141a;
}
.uc-irc__input {
  resize: vertical; max-height: 180px; min-height: 44px;
  border: 1px solid #2a2d36; background: #0e1016; color: var(--uc-text);
  padding: .6rem .7rem; border-radius: 10px; font-family: inherit;
}
.btn-send {
  border: 1px solid #2a2d36; background: #1a1d25; color: #e5e7eb;
  border-radius: 10px; padding: 0 1rem; font-weight: 700; cursor: pointer;
}
.btn-send:hover { background: #202431; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Scrollbar WebKit */
.uc-irc__viewport::-webkit-scrollbar { width: 10px; }
.uc-irc__viewport::-webkit-scrollbar-thumb { background: #2a2d36; border-radius: 6px; }
