/* =============================================
   WEBINAR ROOM — Salle de webinaire Evergreen
   ============================================= */

/* ── Body ── */
.wr-body {
  margin: 0;
  padding: 0;
  background: var(--wr-bg-deep);
  color: var(--wr-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  height: 100dvh;
}

/* ── Countdown overlay ── */
.wr-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  text-align: center;
  background: linear-gradient(135deg, var(--wr-bg-deep) 0%, var(--wr-bg-surface) 100%);
}

.wr-countdown__content {
  max-width: 480px;
  padding: 2rem;
}

.wr-countdown__icon {
  font-size: 3rem;
  color: var(--wr-accent);
  margin-bottom: 1rem;
}

.wr-countdown__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.wr-countdown__desc {
  font-size: 0.95rem;
  color: var(--wr-text-muted);
  margin: 0 0 2rem;
}

.wr-countdown__timer {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--wr-accent);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.wr-countdown__hint {
  font-size: 0.85rem;
  color: var(--wr-text-dim);
  margin: 0;
}

/* ── Room layout ── */
.wr-room {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--wr-bg-deep);
}

/* ── Header ── */
.wr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--wr-bg-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wr-header__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wr-header__title i {
  color: var(--wr-accent);
  flex-shrink: 0;
}

.wr-header__viewers {
  font-size: 0.8rem;
  color: var(--wr-text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.wr-header__viewers i {
  color: var(--color-success);
}

/* ── Content (video + chat) ── */
.wr-content {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── Video ── */
.wr-video {
  flex: 1;
  background: #000;
  min-width: 0;
  position: relative;
}

.wr-video video,
.wr-video iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Sidebar (chat) ── */
.wr-sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  background: var(--wr-bg-surface);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* ── Chat ── */
.wr-chat {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wr-chat__welcome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--wr-text-dim);
  padding: 0.5rem 0;
}

.wr-chat__welcome i {
  font-size: 1.2rem;
}

.wr-chat__msg {
  display: flex;
  gap: 0.5rem;
  animation: wr-fadeIn 0.3s ease;
}

@keyframes wr-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wr-chat__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.wr-chat__body {
  flex: 1;
  min-width: 0;
}

.wr-chat__author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wr-text-muted);
  display: block;
  margin-bottom: 2px;
}

.wr-chat__text {
  font-size: 0.85rem;
  color: var(--wr-text);
  line-height: 1.4;
  word-wrap: break-word;
}

/* ── Typing indicator ── */
.wr-chat__typing {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--wr-text-dim);
  font-style: italic;
  padding: 0.25rem 0;
}

.wr-typing-dots span {
  animation: wr-bounce 1.4s infinite;
  display: inline-block;
}
.wr-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.wr-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wr-bounce {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ── Chat input (disabled) ── */
.wr-chat-input {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wr-chat-input input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--wr-text-dim);
  font-size: 0.8rem;
  font-family: inherit;
  box-sizing: border-box;
}

/* ── CTA bar ── */
.wr-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wr-cta--visible {
  transform: translateY(0);
}

.wr-cta__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--wr-accent), #5a4bcf);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
}

.wr-cta__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.wr-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: var(--wr-accent);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: wr-pulse 2s infinite;
}

.wr-cta__btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  color: var(--wr-accent);
}

@keyframes wr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

/* ── Expired overlay ── */
.wr-expired {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  text-align: center;
  background: linear-gradient(135deg, var(--wr-bg-deep) 0%, var(--wr-bg-surface) 100%);
}

.wr-expired__content {
  max-width: 400px;
  padding: 2rem;
}

.wr-expired__icon {
  font-size: 3rem;
  color: var(--color-error);
  margin-bottom: 1rem;
}

.wr-expired h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.wr-expired p {
  font-size: 0.95rem;
  color: var(--wr-text-muted);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .wr-content {
    flex-direction: column;
  }

  .wr-video {
    flex: none;
    height: 56.25vw; /* 16:9 */
    max-height: 50dvh;
  }

  .wr-sidebar {
    width: 100%;
    flex: 1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .wr-countdown__timer {
    font-size: 2.5rem;
  }

  .wr-cta__inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .wr-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Scrollbar style for chat ── */
.wr-chat::-webkit-scrollbar { width: 4px; }
.wr-chat::-webkit-scrollbar-track { background: transparent; }
.wr-chat::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 2px; }
