/* RESET & BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-main: #05060a;
  --bg-elevated: #10121b;
  --bg-elevated-soft: #151823;
  --accent: #4f8bff;
  --accent-soft: #7aa4ff;
  --text-primary: #f3f4f8;
  --text-secondary: #a3a6b4;
  --border-subtle: #262938;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.75);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.55);
  --transition-fast: 0.16s ease-out;
  --transition-med: 0.22s ease-out;
}

body {
  background: radial-gradient(circle at top, #161a2b 0, #05060a 55%);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  background: linear-gradient(180deg, rgba(5, 7, 14, 0.98), rgba(5, 7, 14, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 4px 8px;
  background: radial-gradient(circle at top, #202538, #10121b);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.logo-link:hover {
  transform: scale(1.03) translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  border-color: rgba(79, 139, 255, 0.5);
}

header img.logo {
  height: 52px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.brand-title {
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
}

/* NAVIGATION HEADER */
.header-nav {
  margin-left: auto;
}

.header-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.header-nav a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* MAIN LAYOUT */
.content-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
  gap: 18px;
  padding: 16px 22px 22px;
  max-width: 1400px;
  margin: 0 auto;
  flex: 1; /* Pousse le footer vers le bas */
  width: 100%;
}

/* SECTION VIDÉO & LANGUES */
.video-section {
  background: radial-gradient(circle at top left, #1c2235 0, #05060a 50%);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform var(--transition-fast), border-color var(--transition-med);
}

.video-section:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 139, 255, 0.25);
}

.video-container-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* BOUTONS VO / VF */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 4px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.lang-btn.active {
  background: linear-gradient(135deg, #4f8bff, #8ba8ff);
  color: #05060a;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(79, 139, 255, 0.4);
}

/* WRAPPER IFRAME 16:9 */
.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: calc(var(--radius-lg) - 3px);
  overflow: hidden;
  background: #000;
  padding-bottom: 56.25%;
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* LISTE ÉPISODES */
aside.episode-list {
  background: radial-gradient(circle at top right, #1a1f33 0, #090b11 55%);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(255, 255, 255, 0.04);
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

aside.episode-list h2 {
  margin-bottom: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.episode-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Scrollbar personnalisée */
.episode-list::-webkit-scrollbar {
  width: 8px;
}
.episode-list::-webkit-scrollbar-thumb {
  background: linear-gradient(#353851, #23263a);
  border-radius: 8px;
}

/* Boutons Épisodes */
.episode-list li {
  padding: 10px 14px;
  cursor: pointer;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: all var(--transition-fast);
  color: #d5d7e5;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.episode-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.episode-list li:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.05);
}

.episode-list li:hover::before {
  background: var(--accent-soft);
  transform: scale(1.2);
}

.episode-list li.active {
  background: linear-gradient(135deg, #4f8bff, #8ba8ff);
  color: #05060a;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(79, 139, 255, 0.15);
  border-color: transparent;
}

.episode-list li.active::before {
  background: #05060a;
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 20px;
  background: #030407;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  aside.episode-list {
    max-height: 400px;
  }
}
@media (max-width: 600px) {
  .header-nav ul {
    gap: 12px;
  }
  .header-nav a {
    font-size: 0.8rem;
  }
  .lang-btn {
    padding: 6px 18px;
  }
}