/* ══════════════════════════════════════════════
   twitch-widget.css — Widget Stream Twitch
   Thème : dark Yggdräsïl (#0d1117 / #00e5b0 accent)
   ══════════════════════════════════════════════ */

.twitch-widget {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: #0d1117;
  border: 1px solid rgba(0, 229, 176, 0.15);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,229,176,0.05),
    0 8px 40px rgba(0,0,0,0.6),
    0 0 60px rgba(0,229,176,0.04);
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

/* ── Chargement ─────────────────────────────── */
.twitch-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 60px 20px;
}

.twitch-pulse {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0,229,176,0.3);
  border-top-color: #00e5b0;
  animation: twitchSpin 0.8s linear infinite;
}

@keyframes twitchSpin {
  to { transform: rotate(360deg); }
}

/* ── Live ───────────────────────────────────── */
.twitch-live-container {
  flex-direction: column;
  width: 100%;
}

.twitch-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 14px 16px 10px;
  padding: 4px 12px 4px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  width: fit-content;
}

.twitch-badge.badge-guild {
  background: rgba(0, 229, 176, 0.12);
  border: 1px solid rgba(0, 229, 176, 0.3);
  color: #00e5b0;
}

.twitch-badge.badge-fallback {
  background: rgba(145, 70, 255, 0.12);
  border: 1px solid rgba(145, 70, 255, 0.3);
  color: #9146ff;
}

.twitch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: twitchBlink 1.4s ease-in-out infinite;
}

@keyframes twitchBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.twitch-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.twitch-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.twitch-info {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.twitch-streamer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.95rem;
}

.twitch-streamer svg {
  color: #9146ff;
  flex-shrink: 0;
}

.twitch-title {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

.twitch-viewers {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.twitch-viewers-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e91916;
  animation: twitchBlink 1.4s ease-in-out infinite;
}

/* ── Offline ────────────────────────────────── */
.twitch-offline {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
  text-align: center;
}

.twitch-offline-img {
  width: 160px;
  opacity: 0.5;
  filter: grayscale(0.3);
}

.twitch-offline-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.twitch-offline-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}

.twitch-offline p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 500px) {
  .twitch-widget {
    border-radius: 10px;
    min-height: 260px;
  }
}
