.wt-player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020712;
  border: 1px solid rgba(63, 211, 255, .24);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.wt-player::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(2, 7, 18, .5), transparent 28%, transparent 66%, rgba(2, 7, 18, .82));
}

.wt-player::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 7, 18, 0), #020712 34%, #020712 100%);
}

.wt-player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.wt-player__title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 12px 250px 12px 18px;
  color: #f3fbff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
  background: linear-gradient(180deg, #020712 0%, rgba(2, 7, 18, .96) 62%, rgba(2, 7, 18, .82) 100%);
}

.wt-player__title:hover,
.wt-player__title:focus-visible { color: #43d7ff; }

.wt-player__title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wt-player__brand {
  position: absolute;
  top: clamp(12px, 2vw, 18px);
  right: clamp(14px, 2vw, 20px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(67, 215, 255, .28);
  border-radius: 999px;
  background: rgba(3, 10, 22, .78);
  backdrop-filter: blur(12px);
  color: #eefbff;
  font-weight: 800;
  letter-spacing: .01em;
  pointer-events: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32), 0 0 0 1px rgba(255, 255, 255, .06);
  text-shadow: 0 2px 9px rgba(0, 0, 0, .7);
}

.wt-player__brand img {
  width: clamp(50px, 8vw, 60px);
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .62));
}
.wt-player__brand strong span:last-child { color: #36cfff; }

.wt-player__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  padding: 28px 16px 13px;
  background: linear-gradient(180deg, rgba(2, 7, 18, 0), rgba(2, 7, 18, .98) 28%, #020712 100%);
  transition: opacity .18s ease, transform .18s ease;
}

.wt-player.is-idle .wt-player__controls { opacity: 0; transform: translateY(8px); }
.wt-player:hover .wt-player__controls,
.wt-player:focus-within .wt-player__controls { opacity: 1; transform: none; }

.wt-player__timeline {
  --wt-progress: 0%;
  --wt-buffered: 0%;
  width: 100%;
  height: 6px;
  margin: 0 0 10px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      #32d3ff 0 var(--wt-progress),
      rgba(214, 229, 240, .46) var(--wt-progress) var(--wt-buffered),
      rgba(132, 162, 184, .32) var(--wt-buffered) 100%);
  cursor: pointer;
}

.wt-player__timeline::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.wt-player__timeline::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.wt-player__timeline::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #dff9ff;
  border-radius: 50%;
  background: #32d3ff;
  box-shadow: 0 0 0 4px rgba(50, 211, 255, .16);
}

.wt-player__timeline::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #dff9ff;
  border-radius: 50%;
  background: #32d3ff;
  box-shadow: 0 0 0 4px rgba(50, 211, 255, .16);
}

.wt-player__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wt-player__button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(99, 210, 255, .24);
  border-radius: 12px;
  background: rgba(8, 18, 35, .84);
  color: #effcff;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.wt-player__button:hover,
.wt-player__button:focus-visible,
.wt-player__button.is-active {
  color: #38d4ff;
  border-color: rgba(56, 212, 255, .7);
  background: rgba(15, 40, 67, .94);
  transform: translateY(-1px);
}

.wt-player__time {
  min-width: 92px;
  color: rgba(230, 247, 255, .82);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.wt-player__volume { width: 88px; accent-color: #32d3ff; }
.wt-player__spacer { flex: 1; }
.wt-player__settings-wrap { position: relative; }

.wt-player__settings {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 210px;
  padding: 10px;
  border: 1px solid rgba(67, 215, 255, .25);
  border-radius: 14px;
  background: rgba(4, 12, 26, .97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(14px);
}

.wt-player__settings[hidden] { display: none; }

.wt-player__settings strong {
  display: block;
  margin: 0 6px 7px;
  color: rgba(229, 247, 255, .72);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.wt-player__settings button {
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #eaf9ff;
  text-align: left;
  cursor: pointer;
}

.wt-player__settings button:hover,
.wt-player__settings button.is-active {
  background: rgba(47, 203, 255, .14);
  color: #42d6ff;
}

.wt-player__settings::after {
  content: 'QUALITÉ VIDÉO\A Automatique · gérée par YouTube';
  display: block;
  margin: 10px 6px 2px;
  padding: 11px 10px;
  border-top: 1px solid rgba(98, 205, 255, .15);
  border-radius: 10px;
  color: rgba(232, 248, 255, .82);
  background: rgba(44, 189, 255, .07);
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre-line;
}

body.wt-theater-mode .layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
body.wt-theater-mode .side-panel { display: none !important; }
body.wt-theater-mode .watch-panel { max-width: none !important; }
body.wt-theater-mode .wt-player iframe { max-height: calc(100vh - 170px); }

.wt-platform-stats {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(138px, auto));
  align-items: stretch;
  gap: .7rem;
}

.wt-platform-stats__channel,
.wt-channel-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.wt-platform-stats__channel {
  min-width: 0;
  color: var(--muted);
}

.wt-channel-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.wt-channel-link:hover,
.wt-channel-link:focus-visible {
  color: #37cfff;
}

.wt-platform-stat-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  min-width: 0;
  padding: .62rem .72rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
}

.wt-platform-stat-group strong,
.wt-platform-stat-group span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}

.wt-platform-stat-group strong {
  font-weight: 800;
  font-size: .78rem;
}

.wt-platform-stat-group span {
  color: rgba(231, 244, 250, .82);
  font-size: .78rem;
}

.wt-stats-youtube {
  border-color: rgba(255, 0, 51, .28);
  background: rgba(255, 0, 51, .07);
}

.wt-stats-youtube strong { color: #ff4d61; }

.wt-stats-wanatube {
  border-color: rgba(57, 207, 255, .30);
  background: rgba(57, 207, 255, .08);
}

.wt-stats-wanatube strong { color: #39d7ff; }

.wt-stats-total {
  border-color: rgba(190, 220, 236, .20);
  background: linear-gradient(135deg, rgba(57, 207, 255, .08), rgba(255, 255, 255, .04));
}

.wt-stats-total strong { color: #e7f9ff; }

html[data-theme="light"] .wt-platform-stat-group,
body.light .wt-platform-stat-group {
  border-color: rgba(28, 66, 96, .11);
  background: rgba(255, 255, 255, .72);
}

html[data-theme="light"] .wt-platform-stat-group span,
body.light .wt-platform-stat-group span {
  color: #526577;
}

html[data-theme="light"] .wt-stats-youtube,
body.light .wt-stats-youtube {
  border-color: rgba(220, 38, 38, .16);
  background: rgba(255, 237, 237, .78);
}

html[data-theme="light"] .wt-stats-youtube strong,
body.light .wt-stats-youtube strong { color: #c81e2f; }

html[data-theme="light"] .wt-stats-wanatube,
body.light .wt-stats-wanatube {
  border-color: rgba(32, 143, 183, .18);
  background: rgba(232, 249, 255, .82);
}

html[data-theme="light"] .wt-stats-wanatube strong,
body.light .wt-stats-wanatube strong { color: #16799f; }

html[data-theme="light"] .wt-stats-total strong,
body.light .wt-stats-total strong { color: #20394d; }

@media (max-width: 1080px) {
  .wt-platform-stats {
    grid-template-columns: 1fr;
  }

  .wt-platform-stat-group {
    grid-template-columns: auto auto auto;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .wt-platform-stat-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wt-player { border-radius: 13px; }
  .wt-player::after { height: 82px; }
  .wt-player__title { min-height: 48px; padding: 9px 136px 9px 11px; font-size: .82rem; }
  .wt-player__brand { top: 8px; right: 8px; padding: 5px 8px; font-size: .78rem; }
  .wt-player__brand img { width: 44px; }
  .wt-player__brand strong { display: none; }
  .wt-player__controls { padding: 20px 10px 9px; }
  .wt-player__button { width: 34px; height: 34px; border-radius: 10px; }
  .wt-player__volume { display: none; }
  .wt-player__time { min-width: 72px; font-size: .7rem; }
}
