/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  background-color: #001a3d;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Custom Doctor Who Streaming Style */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #001a3d;
  color: #ffffff;
  line-height: 1.6;
}

/* ==========================================================================
   Modern UI tokens + auth/donate pages
   ========================================================================== */

:root {
  --tardis-blue: #003b6f;
  --tardis-bg: #001a3d;
  --ui-accent: #00a2ed;
  --ui-bg: #001a3d;
  --ui-card: rgba(22, 35, 48, 0.92);
  --ui-input: #1a2a3a;
  --ui-text: #f0f6fc;
  --ui-dim: rgba(240, 246, 252, 0.72);
  --ui-border: rgba(240, 246, 252, 0.1);
  --ui-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

/* Auth pages (login/register) */
.auth-body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: block;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 20% 20%, rgba(0,168,232,0.22), transparent 55%),
    linear-gradient(135deg, rgba(6, 13, 23, 0.97), rgba(0, 168, 232, 0.10)),
    url('https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?q=80&w=1400');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--ui-text);
}

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
}

.auth-left {
  padding: 56px 56px 56px 64px;
  display: flex;
  align-items: center;
}

.auth-left__inner {
  max-width: 620px;
}

.auth-left__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,168,232,0.10);
  border: 1px solid rgba(0,168,232,0.22);
  color: rgba(255,255,255,0.86);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.auth-left__title {
  margin: 18px 0 10px;
  font-size: 2.6rem;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.auth-left__subtitle {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 540px;
}

.auth-left__features {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-feature {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.86);
  font-weight: 600;
}

.auth-feature__label--mobile {
  display: none;
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.auth-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 420px at 40% 25%, rgba(0,168,232,0.18), transparent 60%),
    rgba(6, 13, 23, 0.55);
  border-left: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.auth-container {
  position: relative; /* au-dessus du ruban */
  z-index: 1;
}

.auth-ribbon {
  width: min(520px, 100%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-right .auth-container {
  width: 100%;
  max-width: 520px;
  padding: 24px;
}

.auth-right .auth-card {
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.65);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  animation: authFadeIn 0.8s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card {
  background: var(--ui-card);
  backdrop-filter: blur(10px);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  box-shadow: var(--ui-shadow);
  border: 1px solid rgba(0, 168, 232, 0.28);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--ui-accent), transparent);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.auth-header h1 {
  color: var(--ui-accent);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(0, 168, 232, 0.35);
}

.auth-header p {
  color: var(--ui-dim);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.error-box {
  background: rgba(255, 68, 68, 0.15);
  color: #ff6b6b;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(255, 68, 68, 0.30);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-box {
  background: rgba(0, 168, 232, 0.14);
  border-color: rgba(0, 168, 232, 0.28);
  color: #bfefff;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ui-text);
  font-size: 0.85rem;
  padding-left: 4px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  transition: color 0.25s ease;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 15px 14px 48px;
  background: rgba(27, 38, 59, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: white;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-sizing: border-box;
}

.input-wrapper input:focus {
  border-color: rgba(0, 168, 232, 0.85);
  background: rgba(27, 38, 59, 0.82);
  box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.12);
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--ui-accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  margin-top: 0.8rem;
  box-shadow: 0 10px 25px rgba(0, 168, 232, 0.22);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 35px rgba(0, 168, 232, 0.28);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-discord {
  background: #5865F2;
  box-shadow: 0 10px 25px rgba(88, 101, 242, 0.22);
}

.btn-discord:hover {
  box-shadow: 0 14px 35px rgba(88, 101, 242, 0.28);
}

.auth-alt {
  margin-top: 12px;
}

.auth-footer {
  margin-top: 1.7rem;
  text-align: center;
  color: rgba(255,255,255,0.62);
  font-size: 0.92rem;
}

.auth-footer a {
  color: var(--ui-accent);
  text-decoration: none;
  font-weight: 700;
  margin-left: 6px;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.2rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
}

.back-home:hover {
  color: rgba(255,255,255,0.92);
}

@media (max-width: 980px) {
  .auth-body {
    background-attachment: scroll;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .auth-split {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    min-height: 100dvh;
  }
  /* Carte Discord en premier : visible sans scroller */
  .auth-right {
    order: -1;
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 0;
    min-height: 0;
  }
  .auth-right::before {
    border-left: none;
    border-top: none;
    background: rgba(6, 13, 23, 0.35);
  }
  .auth-ribbon {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px 8px;
    align-items: stretch;
  }
  .auth-right .auth-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    animation: none;
  }
  .auth-right .auth-card {
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
  .auth-left {
    order: 0;
    flex: 0 0 auto;
    padding: 10px 12px 16px;
    text-align: center;
    align-items: flex-start;
  }
  .auth-left__inner {
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
  }
  .auth-left__title {
    font-size: 1.35rem;
    margin: 8px 0 4px;
  }
  .auth-left__subtitle {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
  .auth-left__features {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .auth-feature {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    font-size: 0.72rem;
    border-radius: 10px;
    text-align: center;
    min-height: 52px;
    box-sizing: border-box;
  }
  .auth-feature i {
    font-size: 1rem;
  }
  .auth-feature__label--desktop {
    display: none;
  }
  .auth-feature__label--mobile {
    display: inline;
  }
}

@media (max-width: 600px) {
  /* Page inscription (register) : conteneur centré sans split */
  body.auth-body > .auth-container {
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px 16px;
    max-width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
  }

  .auth-ribbon {
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px 6px;
  }
  .auth-left {
    padding: 8px 10px 14px;
  }
  .auth-left__badge {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 6px;
  }
  .auth-left__title {
    font-size: 1.2rem;
    margin: 6px 0 4px;
  }
  .auth-left__subtitle {
    font-size: 0.84rem;
    line-height: 1.4;
  }
  .auth-left__features {
    margin-top: 8px;
    gap: 5px;
  }
  .auth-feature {
    padding: 7px 3px;
    font-size: 0.68rem;
    min-height: 48px;
  }
  .auth-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
  }
  .auth-header {
    margin-bottom: 1rem;
  }
  .auth-header h1 {
    font-size: 1.4rem;
    letter-spacing: 1.2px;
  }
  .auth-header p {
    font-size: 0.85rem;
    margin-top: 0.35rem;
  }
  .form-group {
    margin-bottom: 0.9rem;
  }
  .form-group label {
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
  }
  .input-wrapper input {
    padding: 12px 13px 12px 42px;
    font-size: 16px; /* évite zoom iOS Safari */
    border-radius: 10px;
  }
  .input-wrapper i {
    left: 14px;
    font-size: 0.95rem;
  }
  .btn-submit {
    padding: 13px;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 0.5rem;
  }
  .auth-alt {
    margin-top: 8px;
  }
  .error-box {
    padding: 0.75rem;
    font-size: 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.9rem;
  }
  .auth-footer {
    margin-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .back-home {
    font-size: 0.82rem;
    margin-top: 0.75rem;
  }
}

@media (max-width: 380px) {
  .auth-left__title {
    font-size: 1.1rem;
  }
  .auth-card {
    padding: 1.1rem 0.85rem;
  }
  .auth-feature {
    font-size: 0.62rem;
    min-height: 44px;
  }
}

/* Donate page */
.donate-page .donate-main {
  margin-top: 100px;
  padding: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.donate-hero {
  background: rgba(0,168,232,0.06);
  border: 1px solid rgba(0,168,232,0.25);
  border-radius: 16px;
  padding: 1.6rem;
}

.donate-title {
  margin: 0 0 0.6rem 0;
  color: #fff;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.donate-title__icon {
  color: var(--ui-accent);
}

.donate-subtitle {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
}

.donate-cta-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.donate-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
}

.donate-card__title {
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.donate-card__text {
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.donate-card__actions {
  margin-top: 10px;
}

.donate-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

.donate-links {
  margin-top: 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  display: grid;
  gap: 6px;
}

.donate-links__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  color: rgba(255,255,255,0.85);
}

header {
  background-color: rgba(0, 59, 111, 0.9); /* TARDIS Blue */
  padding: 0.8rem 2rem;
  height: 70px;
  box-sizing: border-box;
  position: fixed; /* Changement de sticky à fixed pour éviter le trou noir */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Header repensé : le ruban type catalogue s'affiche en haut puis défile avec la page */
#main-header {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1450;
  height: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

header.home-header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

header.header-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #00a8e8;
  text-shadow: 0 0 10px rgba(0,168,232,0.5);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 1 auto;
  min-width: 0;
  order: 1;
}

.vribbon-toggle {
  height: 40px;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(0, 168, 232, 0.10);
  border: 1px solid rgba(0, 168, 232, 0.28);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex: 0 0 auto;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.vribbon-toggle:hover {
  background: rgba(0, 168, 232, 0.18);
  border-color: rgba(0, 168, 232, 0.55);
  transform: translateY(-1px);
}

.vribbon-toggle__text {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .vribbon-toggle__text {
    display: none;
  }
}

.vribbon-panel {
  position: fixed;
  top: 70px;
  left: 0;
  height: calc(100vh - 70px);
  width: 320px;
  max-width: min(88vw, 340px);
  background: rgba(13, 27, 42, 0.97);
  border: 1px solid rgba(0, 168, 232, 0.28);
  border-left: none;
  border-radius: 0 18px 18px 0;
  box-shadow: 0 20px 45px rgba(0,0,0,0.6);
  z-index: 1400;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.vribbon-panel__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vribbon-panel__title {
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.70);
  padding: 0;
  margin: 0;
}

.vribbon-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vribbon-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
}

.vribbon-close:hover {
  border-color: rgba(0, 168, 232, 0.4);
  background: rgba(0, 168, 232, 0.12);
}

.vribbon-section {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vribbon-section--center {
  margin-top: auto;
}

.vribbon-panel__divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.vribbon-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.vribbon-user i {
  color: #00a8e8;
  font-size: 1.1rem;
}

.vribbon-user__name {
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  line-height: 1.1;
}

.vribbon-user__role {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.60);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.vribbon-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.vribbon-link:hover {
  background: rgba(0, 168, 232, 0.12);
  border-color: rgba(0, 168, 232, 0.35);
  transform: translateY(-1px);
}

.vribbon-link--danger {
  border-color: rgba(255, 68, 68, 0.22);
  background: rgba(255, 68, 68, 0.08);
}

.vribbon-link--danger:hover {
  border-color: rgba(255, 68, 68, 0.35);
  background: rgba(255, 68, 68, 0.12);
}

.logo a {
  display: inline-block;
  max-width: min(38vw, 20rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Series Menu Dropdown */
.series-menu-dropdown {
  position: relative;
  display: inline-block;
}

.menu-btn {
  background: rgba(0, 168, 232, 0.1);
  border: 1px solid rgba(0, 168, 232, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}

.menu-btn:hover {
  background: rgba(0, 168, 232, 0.2);
  border-color: #00a8e8;
}

.menu-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #0d1b2a;
  min-width: 250px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  z-index: 1001;
  border: 1px solid rgba(0, 168, 232, 0.3);
  border-radius: 8px;
  margin-top: 10px;
  padding: 1rem;
  animation: slideDownFade 0.3s ease;
}

.series-menu-dropdown:hover .menu-content {
  display: block;
}

.menu-category {
  margin-bottom: 1rem;
}

.menu-category:last-child {
  margin-bottom: 0;
}

.category-title {
  display: block;
  color: #00a8e8;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 168, 232, 0.2);
  padding-bottom: 2px;
}

.menu-item {
  display: block;
  color: white;
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.menu-item:hover {
  background: rgba(0, 168, 232, 0.1);
  color: #00a8e8;
  padding-left: 0.8rem;
}

.nav-series-btn {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 168, 232, 0.3);
  border-radius: 5px;
  transition: all 0.3s;
  background: rgba(0, 168, 232, 0.1);
}

.nav-series-btn:hover {
  background: rgba(0, 168, 232, 0.3);
  color: #00a8e8;
  border-color: #00a8e8;
}

.search-bar-container {
  position: static;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  order: 2;
  padding: 0 0.35rem;
}

.search-bar {
  width: 100%;
  max-width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-bar-container {
  position: relative;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-width: min(520px, 100%);
  margin: 0 auto;
  background: rgba(13, 27, 42, 0.96);
  border: 1px solid rgba(0, 168, 232, 0.28);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
  overflow: hidden;
  z-index: 1300;
  backdrop-filter: blur(8px);
}

/* Catalog page: search replaces the page title */
.catalog-search-bar-container {
  padding: 0;
  justify-content: center;
}

.catalog-search-bar-container .search-bar {
  max-width: min(560px, 100%);
}

.catalog-title-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
}

.catalog-title-left {
  position: relative;
  flex: 0 0 auto;
  order: 0;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  order: 2;
  justify-self: end;
}

.catalog-title-actions .catalog-title-btn {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  white-space: nowrap;
}

.catalog-search-bar-container {
  min-width: 240px;
  justify-content: center;
  padding: 0;
  order: 1;
  justify-self: center;
  width: min(560px, 100%);
}

@media (max-width: 820px) {
  .catalog-title-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .catalog-title-actions {
    justify-content: center;
  }
}

.catalog-page .catalog-page-title {
  width: 100%;
  position: relative;
  z-index: 60; /* above catalog cards, prevents click-through */
}

.catalog-ribbon-sentinel {
  height: 1px;
  width: 100%;
}

/* Card-like frame around the catalog top bar */
.catalog-title-frame {
  display: block;
  width: 100%;
  padding: 14px 14px;
  border-radius: 16px;
  border: 2px solid rgba(0, 168, 232, 0.55);
  background: rgba(13, 27, 42, 0.55);
  box-shadow:
    0 10px 28px rgba(0, 168, 232, 0.14),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 28px rgba(0, 168, 232, 0.10);
  position: relative;
  z-index: 60;
  pointer-events: auto;
}

.catalog-title-frame.catalog-title-frame--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1450; /* above results dropdown + cards */
  border-radius: 0 0 16px 16px;
  width: 100%;
  max-width: none;
}

.catalog-page.catalog-has-fixed-ribbon {
  /* set via JS to prevent content jump */
  padding-top: var(--catalog-ribbon-offset, 0px);
}

.catalog-title-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,168,232,0.18), transparent 60%);
  pointer-events: none;
  opacity: 0.9;
  filter: blur(0.2px);
}

.catalog-title-frame > * {
  position: relative;
  z-index: 1;
}

.catalog-page .catalog-title-bar,
.catalog-page .catalog-title-left,
.catalog-page .catalog-title-actions,
.catalog-page .catalog-search-bar-container {
  pointer-events: auto;
}

@media (max-width: 820px) {
  .catalog-title-bar {
    flex-wrap: wrap;
  }
  .catalog-search-bar-container {
    flex: 1 1 520px;
    width: 100%;
  }
}

.global-search-results__head {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.global-search-results__list {
  max-height: 340px;
  overflow: auto;
}

.global-search-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 12px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.global-search-item:last-child {
  border-bottom: none;
}

.global-search-item:hover,
.global-search-item.active {
  background: rgba(0, 168, 232, 0.12);
  color: #fff;
}

.global-search-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 168, 232, 0.14);
  border: 1px solid rgba(0, 168, 232, 0.25);
  color: #00a8e8;
  flex: 0 0 auto;
}

.global-search-item__label {
  font-weight: 700;
  line-height: 1.25;
}

.global-search-item__muted {
  color: rgba(255,255,255,0.62);
  font-size: 0.85rem;
  margin-top: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 0;
  order: 3;
}

/* User Account Menu */
.user-menu {
  position: relative;
  margin-left: 1.5rem;
}

.user-btn {
  background: rgba(0, 168, 232, 0.1);
  border: 1px solid rgba(0, 168, 232, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition: all 0.3s;
}

.user-btn:hover {
  background: rgba(0, 168, 232, 0.2);
  border-color: #00a8e8;
}

.user-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: #0d1b2a;
  border: 1px solid rgba(0, 168, 232, 0.3);
  border-radius: 12px;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: none;
  z-index: 1100;
  overflow: hidden;
  animation: slideDownFade 0.3s ease;
}

.user-menu:hover .user-dropdown {
  display: block;
}

.dropdown-item {
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(0, 168, 232, 0.15);
  color: #00a8e8;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 1rem;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 5px 0;
}

/* La déconnexion passe par un <form method=POST> (protection CSRF) : le form
   ne doit pas casser la mise en page flex, et le <button> doit ressembler
   exactement au lien d'origine. */
.logout-form {
  display: contents;
}
button.dropdown-item,
button.catalog-mobile-auth__link {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.dropdown-item.logout {
  color: #ff4d4d;
}

.dropdown-item.logout:hover {
  background: rgba(255, 77, 77, 0.12);
  color: #ff6b6b;
}

.dropdown-item.admin-link {
  color: #ffcc00;
}

.dropdown-item.admin-link:hover {
  background: rgba(255, 204, 0, 0.1);
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #00a8e8;
}

.search-bar input {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: none;
  background: #1a2a3a;
  color: white;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 168, 232, 0.3);
}

/* ==========================================================================
   Form controls (site) — inputs / search / file / select
   ========================================================================== */

body:not(.admin-body) input[type="text"],
body:not(.admin-body) input[type="password"],
body:not(.admin-body) input[type="email"],
body:not(.admin-body) input[type="url"],
body:not(.admin-body) input[type="search"],
body:not(.admin-body) input[type="number"],
body:not(.admin-body) textarea,
body:not(.admin-body) select {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(17, 26, 45, 0.88);
  border: 1px solid rgba(0, 168, 232, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body:not(.admin-body) input::placeholder,
body:not(.admin-body) textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

body:not(.admin-body) textarea {
  min-height: 120px;
}

body:not(.admin-body) input:focus,
body:not(.admin-body) textarea:focus,
body:not(.admin-body) select:focus {
  outline: none;
  border-color: rgba(0, 168, 232, 0.8);
  background: rgba(27, 38, 59, 0.78);
  box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.16);
}

body:not(.admin-body) input:focus-visible,
body:not(.admin-body) textarea:focus-visible,
body:not(.admin-body) select:focus-visible,
body:not(.admin-body) button:focus-visible,
body:not(.admin-body) a:focus-visible {
  outline: 2px solid rgba(0, 168, 232, 0.95);
  outline-offset: 2px;
}

body:not(.admin-body) select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.65) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* File input: modern button + readable filename */
body:not(.admin-body) input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(0, 168, 232, 0.35);
  background: rgba(17, 26, 45, 0.6);
  color: rgba(255,255,255,0.8);
}

body:not(.admin-body) input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid rgba(0, 168, 232, 0.35);
  background: rgba(0, 168, 232, 0.14);
  color: #00a8e8;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body:not(.admin-body) input[type="file"]::file-selector-button:hover {
  background: rgba(0, 168, 232, 0.22);
  border-color: rgba(0, 168, 232, 0.6);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  height: 100vh;
  margin-top: 0; /* Assure que le hero commence en haut */
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.78)), url('/img/hero-home-doctors.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Espace réservé pour le header en position absolute (juste assez pour la barre) */
body:not(.is-home) .content-section,
body:not(.is-home) main:not(.hero) {
    padding-top: 68px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.btn-primary {
  background-color: #00a8e8;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
  background-color: #007bb0;
  transform: scale(1.05);
}

/* Series Ribbon Styles */
.series-ribbon {
  background-color: #0d1b2a;
  border-bottom: 2px solid #00a8e8;
  padding: 0;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 70px; /* Ajustez selon la hauteur du header */
  left: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  max-height: 0;
  overflow: visible;
  transition: all 0.4s ease;
  pointer-events: none;
  opacity: 0;
}

.series-ribbon.active {
  max-height: 60px;
  opacity: 1;
  pointer-events: auto;
}

.ribbon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.ribbon-item {
  position: relative;
}

.ribbon-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  padding: 1rem 1.5rem;
  display: block;
  white-space: nowrap;
}

.ribbon-link:hover {
  background: rgba(0, 168, 232, 0.2);
  color: #00a8e8;
}

.seasons-flyout {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0d1b2a;
  border: 1px solid rgba(0, 168, 232, 0.3);
  border-top: none;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  display: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  z-index: 1200;
  min-width: 160px;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.has-seasons-flyout:hover .seasons-flyout {
  display: block;
}

.seasons-flyout li a {
  display: block;
  padding: 0.7rem 1.2rem;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
  text-align: center;
}

.seasons-flyout li a:hover {
  background-color: #00a8e8;
  color: #060d17;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduire l'espace header */
header {
  /* Les styles sont déjà définis au début du fichier */
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card {
  background: #112233;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s, border-color 0.4s;
  cursor: pointer;
  border: 1px solid rgba(0, 168, 232, 0.1);
  opacity: 0;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: #00a8e8;
}

.thumbnail {
  height: 140px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 59, 111, 0.2);
  transition: background 0.3s;
}

.video-card:hover .thumbnail::after {
  background: rgba(0, 59, 111, 0);
}

.play-icon {
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.3s;
  color: rgba(255, 255, 255, 0.8);
}

.video-card:hover .play-icon {
  opacity: 1;
}

.card-content {
  padding: 1rem;
}

.video-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #aaa;
}

.episode-info-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.badge {
  background: rgba(0, 168, 232, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Player Modal */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease-out;
}

.player-container {
  width: 90%;
  max-width: 1000px;
  background: #0d1b2a;
  padding: 2rem;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 168, 232, 0.3);
  animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-controls-overlay {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #00a8e8;
  font-weight: bold;
}

.control-group select {
  background: #1b263b;
  color: white;
  border: 1px solid #415a77;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Series Selector & Dropdown */
.series-selector {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 4rem;
  width: 95%; /* Réduit légèrement pour voir les bordures */
  max-width: 1400px; /* Limite pour les très grands écrans */
  margin-left: auto;
  margin-right: auto;
}

.series-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: rgba(0, 59, 111, 0.1);
  padding: 2.5rem;
  border-radius: 15px; /* Redonne des bords arrondis */
  border: 1px solid rgba(0, 168, 232, 0.2);
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.series-btn-container:hover {
  background: rgba(0, 59, 111, 0.2);
  border-color: #00a8e8;
  transform: translateY(-5px);
}

.series-btn {
  background: transparent;
  color: #00a8e8;
  border: none;
  padding: 0;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.series-btn:hover {
  background: transparent;
  color: white;
  transform: none;
  box-shadow: none;
}

.seasons-dropdown {
  position: static;
  transform: none;
  background: transparent;
  border: none;
  width: 100%;
  opacity: 1;
  visibility: visible;
  box-shadow: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.season-item {
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
  font-weight: 500;
  display: block;
  text-align: center;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 168, 232, 0.1);
}

.season-item:hover {
  background: #00a8e8;
  color: #060d17;
  border-color: #00a8e8;
}

.series-btn-container:hover .seasons-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.season-item.active {
  background: #00a8e8;
  color: white;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.video-card {
  background: #112233;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s;
  cursor: pointer;
  opacity: 0; /* Pour l'animation au scroll */
}

.video-card.visible {
  opacity: 1;
  animation: slideUpFade 0.6s ease-out forwards;
}

.video-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 168, 232, 0.2);
}

@keyframes slideUpFade {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #00a8e8;
  text-shadow: 0 0 10px rgba(0,168,232,0.5);
  animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
  0% { text-shadow: 0 0 10px rgba(0,168,232,0.5); }
  50% { text-shadow: 0 0 20px rgba(0,168,232,0.8), 0 0 30px rgba(0,168,232,0.4); }
  100% { text-shadow: 0 0 10px rgba(0,168,232,0.5); }
}

.close-player {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: black;
  margin: 1rem 0;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
}

.player-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: #ccc;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

footer {
  text-align: center;
  margin-top: auto;
  padding: 8px 16px;
  flex-shrink: 0;
  /* Ruban bas : reste sombre mais laisse voir le vortex (pas de bande opaque) */
  background:
    linear-gradient(
      0deg,
      rgba(1, 4, 10, 0.55) 0%,
      rgba(1, 4, 10, 0.28) 55%,
      rgba(1, 4, 10, 0) 100%
    );
  color: rgba(200, 210, 220, 0.72);
  border-top: none;
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  position: relative;
  z-index: 1;
}
footer p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
footer a {
  color: #54cfff;
  text-decoration: none;
}
footer a:hover {
  color: #a8f0ff;
}

/* Footer collé en bas. Évite :has() + 100svh (crash WebKit / Safari TestingBot). */
body:not(.is-player-page) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:not(.is-player-page) > main,
body:not(.is-player-page) > .salon-container,
body:not(.is-player-page) > .auth-container,
body:not(.is-player-page) > .login-screen {
  flex: 1 0 auto;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}


/* Styles pour la page Profil */
.profile-container {
  padding: 4rem 2rem;
  min-height: calc(100vh - 200px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-card {
  background: rgba(0, 59, 111, 0.2);
  border: 1px solid rgba(0, 59, 111, 0.5);
  border-radius: 20px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.profile-avatar {
  font-size: 5rem;
  color: #003b6f;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(0, 59, 111, 0.5));
}

.profile-header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #fff;
}

.badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: #333;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.admin-badge {
  background: #003b6f;
  color: #fff;
  border: 1px solid #00c3ff;
}

.vip-badge {
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.profile-details {
  margin: 2rem 0;
  text-align: left;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
}

.detail-item {
  margin-bottom: 1.5rem;
}

.detail-item label {
  display: block;
  font-size: 0.8rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-item p {
  margin: 0.2rem 0 0;
  font-size: 1.2rem;
  color: #fff;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-actions button {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  font-weight: bold;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #ff4444;
  color: #ff4444;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #ff4444;
  color: #fff;
}

/* Styles VIP Page */
.info-box {
    background: rgba(0, 188, 212, 0.1);
    border-left: 4px solid var(--tardis-blue);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.priority-star {
    color: #ffd700;
    margin-left: 5px;
}

.vip-badge {
    background: #ffd700 !important;
    color: #000 !important;
    font-weight: bold;
}

.user-badge {
    background: #666 !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .nav-text-mobile {
        display: none;
    }

    header {
        padding: 0.5rem 1rem;
        padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
        height: auto;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .nav-main-links {
        display: none;
    }

    .search-bar-container {
        position: static;
        transform: none;
        flex: 1;
        margin: 0 10px;
        max-width: none;
        order: 2; /* S'assurer qu'il est entre le logo et le menu burger */
    }

    .logo-section {
        order: 1;
    }

    .nav-right {
        display: none !important;
    }

    .search-bar {
        width: 100%;
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        padding: 2px 10px;
        border: 1px solid rgba(0, 168, 232, 0.2);
    }

    .search-bar input {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.9rem;
        background: transparent;
        border: none;
        color: white;
    }

    .search-bar input:focus {
        outline: none;
    }

    .search-icon-mobile {
        display: block;
        color: #00a8e8;
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        order: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        font-size: 1.5rem;
        color: white;
        cursor: pointer;
        box-sizing: border-box;
    }

    .nav-active .nav-main-links {
        display: none !important;
    }

    #mobile-menu-container {
        display: none;
        flex-direction: column;
        position: fixed;
        top: calc(60px + env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        height: calc(100dvh - 60px - env(safe-area-inset-top, 0px));
        min-height: calc(100vh - 60px - env(safe-area-inset-top, 0px));
        background: #0d1b2a;
        padding: 1.25rem 1.25rem max(1.5rem, env(safe-area-inset-bottom, 0px));
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 1.25rem;
    }

    .nav-active #mobile-menu-container {
        display: flex;
    }

    .nav-right {
        display: none !important;
    }

    #mobile-menu-container .nav-main-links,
    #mobile-menu-container .nav-right-mobile-clone {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        gap: 1.5rem !important;
        position: static;
        transform: none;
        background: transparent;
        padding: 0;
    }

    #mobile-menu-container .nav-right-mobile-clone {
        border-top: 1px solid rgba(0, 168, 232, 0.3);
        padding-top: 1.5rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem !important;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 12px 14px;
        box-sizing: border-box;
        background: rgba(0, 168, 232, 0.1);
        border-radius: 5px;
        text-align: center;
    }

    .user-menu {
        margin-left: 0;
        width: 100%;
    }

    .user-btn {
        justify-content: center;
        border-radius: 5px;
    }

    .user-dropdown {
        position: static;
        display: block;
        background: transparent;
        border: none;
        box-shadow: none;
        animation: none;
    }

    .dropdown-item {
        justify-content: center;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }

    .category-group {
        padding: 0.8rem !important;
        margin-bottom: 2rem !important;
        border-radius: 10px !important;
    }

    .category-header {
        margin: -0.8rem -0.8rem 1.5rem -0.8rem !important;
        padding: 0.5rem !important;
    }

    .category-header h3 {
        font-size: 1.2rem !important;
        letter-spacing: 1px !important;
    }

    .thumbnail {
        height: 100px !important;
    }

    .card-content {
        padding: 0.8rem !important;
    }

    .card-content h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
    }

    .season-badge {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .btn-primary {
        padding: 0.6rem !important;
        font-size: 0.9rem !important;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Ajustements pour la page series_detail */
    .series-header {
        flex-direction: column !important;
        padding: 1.5rem !important;
        gap: 1.5rem !important;
        text-align: center;
    }

    .series-thumb {
        width: 100% !important;
        max-width: 250px;
        height: 350px !important;
    }

    .series-info h1 {
        font-size: 1.8rem !important;
        margin-top: 1rem;
    }

    .series-info p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .season-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 0.8rem !important;
    }

    .season-card {
        padding: 1rem !important;
    }

    .season-card i {
        font-size: 1.8rem !important;
    }

    .season-card h3 {
        font-size: 1rem !important;
    }

    /* Ajustements pour la page season_detail */
    main {
        margin-top: 80px !important;
        padding: 1rem !important;
    }

    h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }

    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 1.5rem !important;
    }

    .episode-thumb {
        height: 150px !important;
    }

    .episode-info {
        padding: 1rem !important;
    }

    .episode-play-overlay {
        opacity: 1 !important;
        background: rgba(0,0,0,0.2) !important;
    }

    .episode-play-overlay i {
        font-size: 2rem !important;
    }

    /* Admin tables responsivity */
    .admin-container {
        padding: 0.8rem !important;
        overflow-x: hidden;
    }

    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        border: 1px solid rgba(0, 168, 232, 0.2);
    }

    table {
        display: table;
        width: 100%;
        min-width: 600px; /* Force le scroll horizontal sur petit écran */
    }
}

.mobile-menu-toggle {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-main-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

.search-icon-mobile {
    display: none;
}
@keyframes vipFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vipHeroDrift {
    0%,
    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 0.88;
        transform: scale(1.04) translate(1%, -1%);
    }
}

@keyframes vipHeartPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

@keyframes vipIconGlow {
    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(0, 195, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.45));
    }
}

@keyframes vipPricingShimmer {
    0%,
    100% {
        box-shadow: 0 0 28px rgba(0, 195, 255, 0.22);
    }
    50% {
        box-shadow: 0 0 42px rgba(0, 195, 255, 0.42);
    }
}

.hero-vip {
    position: relative;
    padding: 6rem 0 4rem;
    text-align: center;
    overflow: hidden;
    background: transparent;
}

.hero-vip__bg {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 35% 25%, rgba(0, 195, 255, 0.2) 0%, transparent 42%),
        radial-gradient(circle at 75% 65%, rgba(0, 168, 232, 0.12) 0%, transparent 48%),
        radial-gradient(circle at center, rgba(0, 195, 255, 0.08) 0%, transparent 65%);
    animation: vipHeroDrift 14s ease-in-out infinite;
    pointer-events: none;
}

.hero-vip__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    animation: vipFadeUp 0.9s ease forwards;
}

.hero-vip__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(255, 77, 106, 0.15);
    border: 1px solid rgba(255, 107, 129, 0.45);
    color: #ff6b81;
    font-size: 1.1rem;
    animation: vipHeartPulse 2.2s ease-in-out infinite;
}

.hero-vip__lead {
    font-size: 1.2rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto;
    max-width: 38rem;
}

.hero-vip h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #00c3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vip-advantages {
    padding: 4rem 0;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.advantage-card:hover {
    border-color: #00c3ff;
    box-shadow: 0 12px 40px rgba(0, 195, 255, 0.12);
}

.advantage-card--visible:hover {
    transform: translateY(-10px);
}

.advantage-card__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(0, 195, 255, 0.08);
    border: 1px solid rgba(0, 195, 255, 0.28);
}

.advantage-card__icon-wrap i {
    font-size: 2.25rem;
    color: #00c3ff;
    margin-bottom: 0;
}

.advantage-card__icon-wrap--pulse i {
    animation: vipIconGlow 3s ease-in-out infinite;
}

.advantage-card--highlight {
    border-color: rgba(255, 215, 0, 0.28);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 168, 232, 0.07) 100%);
}

.advantage-card--animated {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.advantage-card--animated:nth-child(1) {
    transition-delay: 0.05s;
}

.advantage-card--animated:nth-child(2) {
    transition-delay: 0.12s;
}

.advantage-card--animated:nth-child(3) {
    transition-delay: 0.19s;
}

.advantage-card--animated:nth-child(4) {
    transition-delay: 0.26s;
}

.advantage-card--animated.advantage-card--visible {
    opacity: 1;
    transform: translateY(0);
}

.advantage-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-card {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(0, 59, 111, 0.3), rgba(0, 195, 255, 0.1));
    padding: 4rem;
    border-radius: 30px;
    text-align: center;
    border: 2px solid #00c3ff;
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.2);
}

.pricing-card--animated {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.pricing-card--animated.pricing-card--visible {
    opacity: 1;
    transform: translateY(0);
    animation: vipPricingShimmer 5s ease-in-out infinite;
}

.pricing-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #fff;
}

.pricing-card .price span {
    font-size: 1.2rem;
    color: #aaa;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
    text-align: left;
    display: inline-block;
}

.pricing-card ul li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pricing-card ul li i {
    color: #00c3ff;
    margin-right: 10px;
}

.btn-buy {
    display: block;
    position: relative;
    overflow: hidden;
    background: #00c3ff;
    color: #000;
    padding: 1.2rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 195, 255, 0.4);
}

.btn-buy::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: vipBtnShine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vipBtnShine {
    0% {
        left: -120%;
    }
    18%,
    100% {
        left: 120%;
    }
}

.btn-buy span {
    position: relative;
    z-index: 1;
}

.btn-buy:hover {
    background: #fff;
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .hero-vip__bg,
    .hero-vip__badge,
    .hero-vip__inner,
    .advantage-card__icon-wrap--pulse i,
    .pricing-card--animated.pricing-card--visible,
    .btn-buy::after {
        animation: none !important;
    }

    .advantage-card--animated {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .pricing-card--animated {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Styles Request Page */
.request-form-container {
    max-width: 800px;
    margin: 4rem auto;
    background: rgba(0,0,0,0.3);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.requests-table th, .requests-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-badge.en.attente { background: #666; }
.status-badge.validé { background: #00c3ff; color: #000; }
.status-badge.terminé { background: #28a745; }
.status-badge.rejeté { background: #dc3545; }

/* Styles Suggestion Form */
.suggestion-form {
    margin-top: 2rem;
}

.suggestion-form .form-group {
    margin-bottom: 2rem;
}

.suggestion-form label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #00c3ff;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1.2rem;
    color: #00c3ff;
    font-size: 1.2rem;
}

.suggestion-form input[type="text"] {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 195, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.suggestion-form input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #00c3ff;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.3);
}

.suggestion-form .form-help {
    display: block;
    margin-top: 0.6rem;
    color: #aaa;
    font-size: 0.9rem;
    font-style: italic;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #28a745;
}

.vip-link {
    color: #ffd700;
    text-decoration: underline;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.priority-text {
    color: #00c3ff;
    font-size: 0.95rem;
    display: inline-block;
    margin-top: 5px;
}

/* Fin Styles Profil */

/* ==========================================================================
   Join page (levels)
   ========================================================================== */

.join-page {
  min-height: calc(100vh - 160px);
  padding: 140px 18px 70px;
  box-sizing: border-box;
}

.join-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.join-hero {
  background: linear-gradient(145deg, rgba(0, 59, 111, 0.22), rgba(0, 195, 255, 0.08));
  border: 1px solid rgba(0, 168, 232, 0.28);
  border-radius: 18px;
  padding: 34px 28px;
  min-height: 220px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  margin-bottom: 0;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.join-hero__badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(0, 168, 232, 0.14);
  border: 1px solid rgba(0, 168, 232, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00a8e8;
  margin-bottom: 10px;
}

.join-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: 1px;
  line-height: 1.1;
}

.join-hero p {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.78);
}

.join-hero__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.join-hero__desc {
  margin: 0;
  max-width: 56rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
  font-size: 1.05rem;
}

.join-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.join-pill--link:hover {
  border-color: rgba(0, 168, 232, 0.45);
  color: #fff;
}

.join-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 14px;
  margin-top: 0;
  justify-content: center;
}

@media (max-width: 980px) {
  .join-grid { grid-template-columns: 1fr; }
}

.join-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0, 168, 232, 0.16);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.join-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 168, 232, 0.45);
  box-shadow: 0 16px 36px rgba(0,168,232,0.12);
}

.join-card--active {
  border-color: rgba(255, 215, 0, 0.28);
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,215,0,0.04));
}

.join-card__top {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
}

.join-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(0, 168, 232, 0.12);
  border: 1px solid rgba(0, 168, 232, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00a8e8;
}

.join-card__title h2 {
  margin: 0;
  font-size: 1.1rem;
}

.join-card__subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-top: 2px;
}

.join-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.78);
  font-size: 0.9rem;
  white-space: nowrap;
}

.join-status--ok {
  border-color: rgba(0, 200, 81, 0.28);
  background: rgba(0, 200, 81, 0.10);
  color: rgba(255,255,255,0.92);
}

.join-advantages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-advantages li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
}

.join-advantages li i {
  width: 18px;
  margin-top: 2px;
}

.join-advantages li.ok i { color: #00c851; }
.join-advantages li.no i { color: rgba(255, 68, 68, 0.9); }
.join-advantages li.no { opacity: 0.85; }

.join-card__actions {
  margin-top: auto;
  padding-top: 2px;
}

.join-muted {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
}

.join-compare {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0, 168, 232, 0.16);
  border-radius: 18px;
  padding: 16px;
}

.join-compare__title h2 {
  margin: 0;
  font-size: 1.15rem;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.join-compare__subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
}

.join-compare__wrap {
  margin-top: 12px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}

.join-compare__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.join-compare__th,
.join-compare__td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}

.join-compare__th {
  position: sticky;
  top: 0;
  background: rgba(13, 27, 42, 0.98);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  z-index: 2;
  text-align: left;
}

.join-compare__th--sticky,
.join-compare__td--sticky {
  position: sticky;
  left: 0;
  z-index: 3;
}

.join-compare__td--sticky {
  background: rgba(10, 17, 32, 0.92);
  border-right: 1px solid rgba(255,255,255,0.08);
}

.join-compare__th--sticky {
  background: rgba(10, 17, 32, 0.98);
  border-right: 1px solid rgba(255,255,255,0.10);
}

.join-compare__tier {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}

.join-compare__tier i {
  color: #00a8e8;
}

.join-compare__badge {
  margin-left: auto;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  background: rgba(0, 200, 81, 0.10);
  border: 1px solid rgba(0, 200, 81, 0.25);
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.join-compare__ok {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 200, 81, 0.10);
  border: 1px solid rgba(0, 200, 81, 0.22);
  color: #00c851;
}

.join-compare__no {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 68, 68, 0.10);
  border: 1px solid rgba(255, 68, 68, 0.20);
  color: rgba(255, 110, 110, 0.95);
}

@media (max-width: 980px) {
  .join-compare { padding: 12px; }
  .join-compare__table { min-width: 720px; }
}

/* ==========================================================================
   Mobile coquille (dvh, encoches, cibles tactiles) — esprit panel type Tardis
   ========================================================================== */

@media (max-width: 900px) {
  html {
    overflow-x: hidden;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
  }

  #main-header {
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 820px) {
  .catalog-title-frame {
    padding-top: max(12px, calc(8px + env(safe-area-inset-top, 0px)));
    padding-left: max(12px, calc(10px + env(safe-area-inset-left, 0px)));
    padding-right: max(12px, calc(10px + env(safe-area-inset-right, 0px)));
  }

  .catalog-title-left,
  .catalog-title-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
    padding-bottom: 4px;
    justify-content: flex-start;
  }

  .catalog-title-actions {
    justify-content: flex-end;
  }

  .catalog-title-btn,
  .menu-btn.catalog-title-btn {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
  }

  .catalog-search-bar-container .search-bar input {
    min-height: 44px;
    box-sizing: border-box;
  }
}

/* ==========================================================================
   Tardis Streaming — shell public (palette + masthead, v18)
   ========================================================================== */

:root {
  --stream-bg: #001a3d;
  --stream-accent: #00a2ed;
  --stream-accent-hover: #33b5f3;
  --stream-panel: rgba(22, 35, 48, 0.9);
  --stream-border: rgba(0, 162, 237, 0.48);
  --stream-btn: #1a2a3a;
}

body:not(.admin-body) {
  background-color: var(--stream-bg);
  color: #f0f6fc;
}

/* Ruban masthead : transparence sans ligne de bord (le blur dur crée sinon un trait) */
.tardis-stream-masthead.catalog-title-frame {
  border: 0 !important;
  outline: none;
  border-radius: 0 !important;
  background: transparent;
  padding: 14px 28px 22px;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  isolation: isolate;
  container-type: inline-size;
  container-name: masthead;
}
/* Voile + flou en fondu (masque) : plus de bord net haut/bas */
.tardis-stream-masthead.catalog-title-frame::after {
  content: "";
  position: absolute;
  inset: 0 0 -8px 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(1, 4, 10, 0.42) 0%,
      rgba(1, 4, 10, 0.22) 42%,
      rgba(1, 4, 10, 0.08) 72%,
      rgba(1, 4, 10, 0) 100%
    );
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,.55) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgba(0,0,0,.55) 78%, transparent 100%);
}

/* Recherche centrée, colonnes qui se compressent sans se chevaucher */
.tardis-stream-masthead .catalog-title-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
  min-width: 0;
  width: 100%;
}
.tardis-stream-masthead .catalog-title-left,
.tardis-stream-masthead .catalog-search-bar-container,
.tardis-stream-masthead .catalog-title-actions {
  min-width: 0;
}
.tardis-stream-masthead .catalog-title-left {
  flex: 0 1 auto;
  gap: clamp(4px, 0.8vw, 10px);
}
.tardis-stream-masthead .catalog-search-bar-container {
  flex: 1 1 120px;
  width: auto;
  min-width: 0;
  max-width: min(360px, 100%);
  justify-self: center;
}
.tardis-stream-masthead .catalog-title-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  overflow: visible;
  gap: clamp(4px, 0.8vw, 10px);
}
.tardis-stream-masthead .search-bar {
  min-width: 0;
  width: 100%;
}
.tardis-stream-masthead .search-bar input {
  min-width: 0;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn i,
.tardis-stream-masthead .user-btn i {
  flex-shrink: 0;
}
/* Pseudo : affiché en entier (pas d’ellipse) */
.tardis-stream-masthead #username-display {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.tardis-stream-masthead.catalog-title-frame::before {
  display: none !important;
  content: none !important;
  opacity: 0;
  box-shadow: none;
  border: 0;
}

.tardis-stream-masthead .menu-btn.catalog-title-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #cfd9e3;
  border-radius: 8px;
  min-height: 0;
  height: clamp(34px, 4.2vw, 40px);
  padding: 0 clamp(0.4rem, 1vw, 0.85rem);
  justify-content: center;
  font-weight: 500;
  font-size: clamp(0.72rem, 1.05vw, 0.92rem);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tardis-stream-masthead .menu-btn.catalog-title-btn:hover {
  background: rgba(0, 162, 237, 0.10);
  border-color: rgba(0, 162, 237, 0.30);
  color: #fff;
}

/* --- Ruban du haut : finitions --- */
.tardis-stream-masthead .menu-btn.catalog-title-btn {
  position: relative;
  font-weight: 600;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: #00a2ed;
  opacity: 0;
  transition: left .2s ease, right .2s ease, opacity .2s ease;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn:hover::after {
  left: 0.85rem;
  right: 0.85rem;
  opacity: 1;
}
/* Accueil / Stats : encadrement type « Problème », teinte cyan */
.tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn--nav {
  color: #9fdfff;
  border: 1px solid rgba(0, 162, 237, 0.42);
  background: rgba(0, 162, 237, 0.10);
  font-weight: 700;
}
.tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn--nav i {
  color: #4fd0ff;
}
.tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn--nav:hover {
  color: #e8f7ff;
  border-color: rgba(79, 208, 255, 0.65);
  background: rgba(0, 162, 237, 0.18);
  filter: none;
}
.tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn--nav::after {
  display: none;
}

/* Bouton "Soutenir" mis en avant : dégradé multicolore animé */
.tardis-stream-masthead .menu-btn.catalog-title-btn[href="/join"],
.tardis-stream-masthead .menu-btn.catalog-title-btn--soutenir {
  color: #fff;
  border: 1px solid transparent;
  background:
    linear-gradient(90deg, #ff5fa2, #ffb347, #00d39a, #00a2ed, #b06dff, #ff5fa2);
  background-size: 300% 100%;
  animation: donsRainbow 6s linear infinite;
  box-shadow: 0 4px 16px rgba(176, 109, 255, 0.28);
  font-weight: 700;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn[href="/join"] i,
.tardis-stream-masthead .menu-btn.catalog-title-btn--soutenir i {
  color: #fff;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn[href="/join"]:hover,
.tardis-stream-masthead .menu-btn.catalog-title-btn--soutenir:hover {
  color: #fff;
  border-color: transparent;
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(255, 95, 162, 0.40);
}
.tardis-stream-masthead .menu-btn.catalog-title-btn[href="/join"]::after,
.tardis-stream-masthead .menu-btn.catalog-title-btn--soutenir::after {
  display: none;
}
@keyframes donsRainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Bouton "Problème" (connecté) */
.tardis-stream-masthead .menu-btn.catalog-title-btn--probleme {
  overflow: visible;
  color: #ffd28a;
  border: 1px solid rgba(255, 180, 70, 0.42);
  background: rgba(255, 180, 70, 0.12);
  font-weight: 700;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--probleme i {
  color: #ffb446;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--probleme:hover {
  color: #ffe2b0;
  border-color: rgba(255, 180, 70, 0.65);
  background: rgba(255, 180, 70, 0.2);
  filter: none;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--probleme::after {
  display: none;
}

/* Bouton Discord — à côté de Soutenir */
.tardis-stream-masthead .menu-btn.catalog-title-btn--discord {
  color: #fff;
  border: 1px solid rgba(88, 101, 242, 0.55);
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.28);
  white-space: nowrap;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--discord i {
  color: #fff;
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--discord:hover {
  color: #fff;
  border-color: rgba(114, 137, 218, 0.8);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.4);
}
.tardis-stream-masthead .menu-btn.catalog-title-btn--discord::after {
  display: none;
}
/* Menu utilisateur : items "Likes / Visionnages" dans le dropdown */
.user-dropdown .dropdown-item i { color: #00a8e8; }
.user-dropdown .dropdown-item.logout i { color: #ff4d4d; }

.tardis-stream-masthead .search-bar {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 0.85rem;
  height: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}

.tardis-stream-masthead .search-bar:hover {
  border-color: rgba(0, 162, 237, 0.30);
}

.tardis-stream-masthead .search-bar:focus-within {
  border-color: var(--stream-accent);
  background: rgba(0, 162, 237, 0.06);
}

.tardis-stream-masthead .search-bar input[type="search"],
.tardis-stream-masthead .search-bar input {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  line-height: normal;
  box-shadow: none;
  color: #e6edf3;
  font-weight: 400;
  font-size: 0.92rem;
}

.tardis-stream-masthead .search-bar input::placeholder {
  color: rgba(207, 217, 227, 0.55);
}

.tardis-stream-masthead .search-bar input[type="search"]:focus,
.tardis-stream-masthead .search-bar input:focus {
  outline: none;
  box-shadow: none;
}

.tardis-stream-masthead .catalog-user-menu,
.tardis-stream-masthead .user-menu {
  margin-left: 0;
}

.tardis-stream-masthead .catalog-title-actions {
  margin-right: 0;
  gap: 8px;
}

.tardis-stream-masthead .user-btn {
  background: transparent;
  border: 1px solid rgba(0, 162, 237, 0.30);
  color: #cfd9e3;
  border-radius: 8px;
  min-height: 40px;
  height: 40px;
  padding: 0 0.85rem;
  font-weight: 500;
  font-size: 0.92rem;
  justify-content: center;
  gap: 0.45rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.tardis-stream-masthead .user-btn:hover {
  background: rgba(0, 162, 237, 0.10);
  border-color: var(--stream-accent);
  color: #fff;
}

.tardis-stream-masthead .user-btn .fa-user-circle { font-size: 1.1rem; }
.tardis-stream-masthead .user-btn .fa-chevron-down { font-size: 0.7rem; }
.tardis-stream-masthead #username-display {
  font-size: 0.92rem;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

/* Cadre encore plus compact en mobile */
@media (max-width: 820px) {
  .tardis-stream-masthead.catalog-title-frame {
    padding: 6px 10px;
  }
}

.global-search-results {
  border-color: rgba(0, 162, 237, 0.35);
}

.global-search-item:hover,
.global-search-item.active {
  background: rgba(0, 162, 237, 0.14);
}

.global-search-item__icon {
  background: rgba(0, 162, 237, 0.12);
  border-color: rgba(0, 162, 237, 0.28);
  color: var(--stream-accent);
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(rgba(6, 10, 18, 0.52), rgba(6, 10, 18, 0.82)),
    url('/img/hero-home-doctors.png');
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

.btn-primary {
  background-color: var(--stream-accent);
  border-radius: 12px;
  padding: 0.95rem 2rem;
  font-weight: 700;
  box-shadow: 0 10px 32px rgba(0, 162, 237, 0.3);
}

.btn-primary:hover {
  background-color: var(--stream-accent-hover);
}

.catalog-mobile-auth {
  display: none;
}

@media (max-width: 820px) {
  #main-header {
    padding-left: max(2px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-top: max(6px, env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }

  /* Ruban mobile : 3 rangées empilées (plus de nav|actions côte à côte).
     Rangée 1 = Accueil, Stats…
     Rangée 2 = Likes, Visionnages, Dons, Déconnexion (ou Connexion)
     Rangée 3 = recherche pleine largeur — chaque rangée scroll horizontalement si besoin. */
  .tardis-stream-masthead .catalog-title-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .tardis-stream-masthead .catalog-title-left {
    order: 1;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn {
    flex: 0 0 auto !important;
    min-width: 58px !important;
    max-width: 88px !important;
  }

  .tardis-stream-masthead .catalog-title-left::-webkit-scrollbar {
    display: none;
  }

  .tardis-stream-masthead .catalog-title-actions {
    order: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    justify-content: flex-start;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tardis-stream-masthead .catalog-search-bar-container {
    order: 3;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .tardis-stream-masthead .catalog-mobile-auth {
    margin-left: 0 !important;
    gap: 6px !important;
  }

  .tardis-stream-masthead .catalog-title-left::-webkit-scrollbar,
  .tardis-stream-masthead .catalog-title-actions::-webkit-scrollbar {
    display: none;
  }

  /* Tous les boutons du ruban : icône au-dessus du libellé, plus aérés. */
  .tardis-stream-masthead .menu-btn.catalog-title-btn,
  .tardis-stream-masthead .user-btn,
  .tardis-stream-masthead .catalog-mobile-auth__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 54px !important;
    max-width: 72px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 5px 6px !important;
    flex: 0 0 auto;
    box-sizing: border-box;
    gap: 4px !important;
    font-size: 0.72rem !important;
    font-weight: 600;
    line-height: 1.05;
    border-radius: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tardis-stream-masthead .menu-btn.catalog-title-btn i,
  .tardis-stream-masthead .user-btn i,
  .tardis-stream-masthead .catalog-mobile-auth__link i {
    font-size: 1.2rem !important;
    line-height: 1;
    margin: 0 !important;
  }

  .tardis-stream-masthead .catalog-title-left .menu-btn.catalog-title-btn--nav {
    background: rgba(0, 162, 237, 0.10);
    border: 1px solid rgba(0, 162, 237, 0.40);
    color: #9fdfff;
  }

  /* Bouton "Soutenir" : accent jaune */
  .tardis-stream-masthead .catalog-title-left > .catalog-title-btn[href="/join"],
  .tardis-stream-masthead .catalog-title-left > .catalog-title-btn--soutenir,
  .tardis-stream-masthead .catalog-title-actions > .catalog-title-btn[href="/join"],
  .tardis-stream-masthead .catalog-title-actions > .catalog-title-btn--soutenir {
    background: rgba(255, 200, 80, 0.08);
    border: 1px solid rgba(255, 200, 80, 0.32);
    color: #ffd874;
  }

  /* Sur mobile connecté : Problème / Soutenir sont dans catalog-mobile-auth */
  .tardis-stream-masthead .catalog-title-bar:has(.catalog-mobile-auth) .catalog-title-left > .catalog-title-btn[href="/join"],
  .tardis-stream-masthead .catalog-title-bar:has(.catalog-mobile-auth) .catalog-title-left > .catalog-title-btn--soutenir,
  .tardis-stream-masthead .catalog-title-bar:has(.catalog-mobile-auth) .catalog-title-left > .catalog-title-btn--probleme {
    display: none !important;
  }

  /* Discord desktop à droite : sur mobile connecté, version courte dans mobile-auth */
  .tardis-stream-masthead .catalog-title-bar:has(.catalog-mobile-auth) .catalog-title-actions > .catalog-title-btn--discord {
    display: none !important;
  }

  /* Bouton "Connexion" (déconnecté) */
  .tardis-stream-masthead .catalog-title-actions > .catalog-title-btn[href="/login"] {
    background: rgba(0, 162, 237, 0.12);
    border: 1px solid rgba(0, 162, 237, 0.36);
    justify-content: center;
  }

  /* User pill (connecté) — masqué sur mobile, on a déjà Soutenir + Déconnexion
     dans le bloc catalog-mobile-auth, donc on libère la place pour la nav. */
  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu {
    display: none !important;
  }

  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu .user-btn {
    width: auto;
    min-width: 60px;
    max-width: 72px;
    background: rgba(0, 162, 237, 0.10);
    border-color: rgba(0, 162, 237, 0.35);
  }

  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu .user-btn .fa-chevron-down {
    display: none;
  }

  /* Username : on coupe sec à ~6 caractères avec ellipse pour ne pas voler la place */
  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu #username-display {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 600;
    display: block;
  }

  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu .user-dropdown,
  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu:hover .user-dropdown {
    display: none !important;
  }

  /* Bouton "Déconnexion" mobile-only : rouge */
  .tardis-stream-masthead .catalog-mobile-auth {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }

  .catalog-mobile-auth__link {
    text-decoration: none;
    border: 1px solid transparent;
  }

  .catalog-mobile-auth__link--admin {
    color: #ffcc00;
    border-color: rgba(255, 204, 0, 0.38);
    background: rgba(255, 204, 0, 0.09);
  }

  .catalog-mobile-auth__link--logout {
    color: #ff6b6b;
    border-color: rgba(255, 77, 77, 0.45);
    background: rgba(255, 77, 77, 0.10);
  }
}

/* Tout petit téléphone : encore plus serré */
@media (max-width: 380px) {
  .tardis-stream-masthead .menu-btn.catalog-title-btn,
  .tardis-stream-masthead .user-btn,
  .catalog-mobile-auth__link {
    min-width: 48px;
    padding: 4px 5px;
    font-size: 0.55rem;
  }

  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu .user-btn {
    min-width: 48px;
    max-width: 56px;
  }

  .tardis-stream-masthead .catalog-title-actions .catalog-user-menu #username-display {
    max-width: 44px;
    font-size: 0.55rem;
  }
}

/* ==========================================================================
   Mobile polish — masthead, formulaires, pages secondaires (v38)
   NOTE : la mise en page des boutons du ruban est définie plus haut.
   Ici on conserve uniquement le polish générique du masthead (search bar,
   espace sous le ruban, paddings du frame).
   ========================================================================== */

@media (max-width: 820px) {
  .tardis-stream-masthead.catalog-title-frame {
    padding: 6px 8px;
  }

  .tardis-stream-masthead .search-bar {
    height: 38px;
    min-height: 38px;
  }

  .tardis-stream-masthead .search-bar input[type="search"],
  .tardis-stream-masthead .search-bar input {
    font-size: 16px; /* évite le zoom auto iOS Safari */
  }

  /* Masthead mobile ≈ 3 rangées (nav + compte + recherche) */
  body:not(.is-home) .content-section,
  body:not(.is-home) main:not(.hero) {
    padding-top: 8px;
  }

  body.is-home .home-entry--solo .home-entry__content {
    padding-top: clamp(118px, 28vw, 156px);
  }

  body.is-universe-page .universe-page,
  body.is-universe-page main.home-landing {
    padding-top: calc(var(--site-header-offset, 120px) + 6px) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* ----- Pages "formulaires / containers" (suggestions, requests, donations) ----- */
@media (max-width: 720px) {
  .request-form-container {
    margin: 100px 12px 30px;
    padding: 1.4rem 1.1rem;
    border-radius: 14px;
  }

  .request-form-container h1 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
  }

  .suggestion-form .form-group {
    margin-bottom: 1.4rem;
  }

  .suggestion-form input[type="text"] {
    padding: 0.95rem 1rem 0.95rem 3rem;
    font-size: 1rem;
    border-radius: 10px;
  }

  .suggestion-form .input-with-icon i {
    left: 1rem;
    font-size: 1rem;
  }

  .btn-block {
    padding: 0.95rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }

  .requests-table {
    font-size: 0.85rem;
  }

  .requests-table th,
  .requests-table td {
    padding: 0.6rem 0.5rem;
  }

  .info-box {
    font-size: 0.92rem;
  }

  /* Page Donate : moins de padding */
  .donate-page .donate-main {
    margin-top: 92px;
    padding: 1rem 0.9rem 2rem;
  }

  .donate-hero {
    padding: 1.1rem 1rem;
  }

  .donate-title {
    font-size: 1.4rem;
    flex-wrap: wrap;
  }

  .donate-cta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Page Join (niveaux) */
  .join-page {
    padding: 100px 12px 40px;
  }

  .join-hero {
    padding: 22px 16px;
  }

  .join-card {
    padding: 14px;
  }

  .join-card__top {
    grid-template-columns: 40px 1fr;
    gap: 10px;
  }

  .join-card__top .join-status {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 0.82rem;
  }
}

/* Page Hero (accueil) : titres plus lisibles en mobile */
@media (max-width: 720px) {
  .hero {
    background-attachment: scroll;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.15;
  }

  .hero-content p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero .btn-primary {
    padding: 0.85rem 1.4rem;
    font-size: 1rem;
  }
}

/* Évite le zoom automatique de iOS Safari sur les champs de saisie */
@media (max-width: 720px) {
  body:not(.admin-body) input[type="text"],
  body:not(.admin-body) input[type="password"],
  body:not(.admin-body) input[type="email"],
  body:not(.admin-body) input[type="url"],
  body:not(.admin-body) input[type="search"],
  body:not(.admin-body) input[type="number"],
  body:not(.admin-body) textarea,
  body:not(.admin-body) select {
    font-size: 16px;
  }
}

/* Hide global scrollbar artefacts caused by 100vw children on small screens */
@media (max-width: 820px) {
  html, body {
    overflow-x: hidden;
  }
}

/* ==========================================================================
   Auth mobile final override (v33)
   ========================================================================== */

@media (max-width: 760px) {
  body.auth-body {
    min-height: 100dvh !important;
    background-attachment: scroll !important;
    overflow-x: hidden !important;
  }

  body.auth-body .auth-split {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh !important;
  }

  body.auth-body .auth-right {
    order: -1 !important;
    min-height: 0 !important;
    padding: 0 !important;
    align-items: flex-start !important;
  }

  body.auth-body .auth-right::before {
    display: none !important;
  }

  body.auth-body .auth-ribbon {
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px 4px !important;
    box-sizing: border-box !important;
  }

  body.auth-body .auth-right .auth-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  body.auth-body .auth-card {
    padding: 1.15rem 1rem !important;
    border-radius: 16px !important;
  }

  body.auth-body .auth-header {
    margin-bottom: 0.85rem !important;
  }

  body.auth-body .auth-header h1 {
    font-size: 1.35rem !important;
    letter-spacing: 1.2px !important;
  }

  body.auth-body .auth-header p {
    font-size: 0.84rem !important;
    margin-top: 0.35rem !important;
  }

  body.auth-body .btn-submit {
    min-height: 48px !important;
    padding: 0.78rem 0.9rem !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    margin-top: 0.35rem !important;
  }

  body.auth-body .auth-footer {
    margin-top: 0.85rem !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  body.auth-body .auth-left {
    padding: 8px 10px 14px !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  body.auth-body .auth-left__inner {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.auth-body .auth-left__badge {
    padding: 6px 10px !important;
    font-size: 0.76rem !important;
    gap: 6px !important;
  }

  body.auth-body .auth-left__title {
    max-width: 17rem !important;
    margin: 8px 0 4px !important;
    font-size: 1.18rem !important;
    line-height: 1.1 !important;
  }

  body.auth-body .auth-left__subtitle {
    max-width: 20rem !important;
    margin: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
  }

  body.auth-body .auth-left__features {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }

  body.auth-body .auth-feature {
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 6px 3px !important;
    border-radius: 10px !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 0.62rem !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }

  body.auth-body .auth-feature i {
    font-size: 0.95rem !important;
  }

  body.auth-body .auth-feature__label--desktop {
    display: none !important;
  }

  body.auth-body .auth-feature__label--mobile {
    display: inline !important;
  }
}

/* =====================================================================
   Page d'accueil (home.ejs) : hero + vitrine des rubriques cliquables
   ===================================================================== */
.is-home main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
/* Catalogue (accueil /univers) : ignorer le cadre 1280px — plein largeur, gouttières serrées */
body.is-universe-page main.home-landing,
.is-home.is-universe-page main {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding:
    calc(var(--site-header-offset, 52px) + 4px)
    clamp(10px, 1.4vw, 20px)
    48px !important;
  box-sizing: border-box;
}

/* --- Accueil : bandeau "À la une" cinématique --- */
.home-spot {
  --brand: #00a8e8;
  position: relative;
  margin: 28px 0 36px;
  border-radius: 22px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  isolation: isolate;
}
.home-spot__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.home-spot__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}
.home-spot__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 8, 14, 0.20) 0%, rgba(4, 8, 14, 0.55) 55%, rgba(4, 8, 14, 0.96) 100%),
    linear-gradient(90deg, rgba(4, 8, 14, 0.85) 0%, rgba(4, 8, 14, 0.35) 55%, transparent 100%);
}
.home-spot__inner {
  position: relative;
  max-width: 680px;
  padding: 40px 42px 38px;
}
.home-spot__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #042130;
  background: color-mix(in srgb, var(--brand) 90%, #fff);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 40%, transparent);
}
.home-spot__title {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.home-spot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.home-spot__pill {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: color-mix(in srgb, var(--brand) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 80%, transparent);
}
.home-spot__sxe {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(240, 246, 252, 0.82);
}
.home-spot__desc {
  margin: 0 0 24px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(240, 246, 252, 0.86);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.home-spot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-spot__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.home-spot__btn--play {
  color: #042130;
  background: linear-gradient(135deg, #fff, #d8eefb);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.home-spot__btn--play:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5); }
.home-spot__btn--info {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.home-spot__btn--info:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.22); }

@media (max-width: 640px) {
  .home-spot { min-height: 360px; border-radius: 16px; }
  .home-spot__inner { padding: 28px 22px 26px; }
}

.home-hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 8px;
  padding: 64px 40px 72px;
  border-radius: 22px;
  border: 1px solid rgba(0, 162, 237, 0.28);
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(0, 162, 237, 0.22), transparent 60%),
    linear-gradient(160deg, rgba(10, 18, 28, 0.96), rgba(6, 12, 20, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.home-hero__glow {
  position: absolute;
  inset: -40% 40% auto -10%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(0, 162, 237, 0.35), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.home-hero__content {
  position: relative;
  max-width: 720px;
}
.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 162, 237, 0.4);
  background: rgba(0, 162, 237, 0.08);
  color: #7fd2ff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.home-hero__title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.05;
  font-weight: 800;
  color: #f0f6fc;
}
.home-hero__subtitle {
  margin: 0 0 22px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(240, 246, 252, 0.78);
}
.home-hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.home-hero__stats li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 162, 237, 0.22);
  min-width: 86px;
}
.home-hero__stats strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: #7fd2ff;
  line-height: 1;
}
.home-hero__stats span {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(240, 246, 252, 0.6);
}

.home-brandwall-head {
  text-align: center;
  margin-bottom: 22px;
}
.home-brandwall-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f0f6fc;
}
.home-brandwall-sub {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(240, 246, 252, 0.6);
}

/* --- Mur de "logos" des rubriques (inspiré d'un bandeau de chaînes) --- */
.home-brandwall-section {
  margin-top: 30px;
  padding: 26px 22px;
  border-radius: 20px;
  background:
    radial-gradient(700px 300px at 50% -10%, rgba(0, 162, 237, 0.10), transparent 70%),
    #05070b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 20px 50px rgba(0, 0, 0, 0.45);
  scroll-margin-top: 90px;
}
.home-brandwall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.home-brand {
  --brand: #9fc2d8;
  position: relative;
  flex: 1 1 210px;
  max-width: 260px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 116px;
  padding: 16px 18px;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    #0a0d12;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  transition-delay: var(--brand-delay, 0s);
}
.home-brand--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.home-brand__shine {
  position: absolute;
  inset: 0;
  background: var(--brand-glow, none);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.home-brand:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6),
              0 0 0 1px color-mix(in srgb, var(--brand) 70%, transparent),
              0 0 30px color-mix(in srgb, var(--brand) 30%, transparent);
}
.home-brand:hover .home-brand__shine {
  opacity: 0.16;
}
.home-brand__icon {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  color: var(--brand);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--brand) 45%, transparent));
}
.home-brand__name {
  position: relative;
  z-index: 1;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.08;
  color: var(--brand);
  text-shadow: 0 2px 14px color-mix(in srgb, var(--brand) 30%, transparent);
}
.home-brand__meta {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(240, 246, 252, 0.55);
}

.home-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(240, 246, 252, 0.65);
}
.home-empty i {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: rgba(0, 162, 237, 0.6);
}

html:has(body.is-home) { scroll-behavior: smooth; }

/* --- Accueil : étoiles animées dans le hero --- */
.home-hero__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.6px 1.6px at 82% 16%, rgba(127, 210, 255, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 65% 70%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.8px 1.8px at 35% 80%, rgba(127, 210, 255, 0.55), transparent),
    radial-gradient(1.3px 1.3px at 50% 38%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 92% 60%, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.5;
  animation: homeStars 6s ease-in-out infinite alternate;
}
@keyframes homeStars {
  from { opacity: 0.3; }
  to { opacity: 0.7; }
}

/* --- Accueil : boutons d'action du hero --- */
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}
.home-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.home-hero__cta--primary {
  color: #042130;
  background: linear-gradient(135deg, #00a8e8, #36c9ff);
  border: 1px solid #36c9ff;
  box-shadow: 0 12px 28px rgba(0, 168, 232, 0.32);
}
.home-hero__cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 168, 232, 0.45);
}
.home-hero__cta--ghost {
  color: #cfe9fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 162, 237, 0.35);
}
.home-hero__cta--ghost:hover {
  transform: translateY(-2px);
  background: rgba(0, 162, 237, 0.12);
  border-color: rgba(0, 162, 237, 0.6);
}

/* --- Accueil : enrichissement des tuiles rubriques --- */
.home-brand { height: auto; min-height: 130px; padding: 20px 18px; }
.home-brand__dot { opacity: 0.5; margin: 0 4px; }
.home-brand__go {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--brand);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.home-brand:hover .home-brand__go {
  opacity: 1;
  transform: translateY(0);
}
.home-brand__go i { transition: transform 0.2s ease; }
.home-brand:hover .home-brand__go i { transform: translateX(3px); }

/* --- Accueil : section "Derniers ajouts" --- */
.home-recent-section {
  margin-top: 34px;
  scroll-margin-top: 90px;
}
.home-recent-section .home-brandwall-title { display: inline-flex; align-items: center; gap: 10px; }
.home-recent-section .home-brandwall-title i { color: #00a8e8; }
.ep-card__series {
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(240, 246, 252, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .home-hero {
    padding: 44px 22px 52px;
  }
  .is-home main {
    padding: 0 14px 48px;
  }
  .home-brandwall {
    gap: 12px;
  }
  .home-brand {
    flex: 1 1 140px;
    min-width: 140px;
    height: 104px;
  }
  .home-brand__name {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-brand {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   Accueil v3 - vraie landing page
   ===================================================================== */
/* Réserve l'espace de la barre de défilement uniquement sur les pages qui
   défilent (pas l'accueil plein écran), pour éviter la bande "bizarre" à droite
   et le rognage du pseudo. */
body.is-universe-page { scrollbar-gutter: stable; }

body.is-home {
  overflow-x: hidden;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(0, 162, 237, 0.28), transparent 62%),
    radial-gradient(700px 360px at 15% 55%, rgba(0, 59, 111, 0.45), transparent 70%),
    var(--tardis-bg, #001a3d);
}
/* Accueil catalogue : fond bleu TARDIS */
body.is-home.is-universe-page {
  background:
    radial-gradient(1000px 560px at 50% -8%, rgba(0, 162, 237, 0.22), transparent 58%),
    radial-gradient(800px 420px at 85% 90%, rgba(0, 59, 111, 0.55), transparent 65%),
    linear-gradient(165deg, #002447 0%, #001a3d 45%, #003b6f 100%);
}

/* Fond site : bleu TARDIS (police box) */
body {
  background:
    radial-gradient(1100px 600px at 50% -12%, rgba(0, 162, 237, 0.2), transparent 55%),
    radial-gradient(700px 400px at 100% 100%, rgba(0, 59, 111, 0.5), transparent 60%),
    linear-gradient(165deg, #001433 0%, #001a3d 40%, #002d5c 100%);
}
body > main,
body > footer,
body > .auth-container,
body > .login-screen {
  position: relative;
  z-index: 1;
}
/* Header déjà en position fixed/absolute — ne pas écraser */
#main-header {
  z-index: 1450;
}
/* Fond animé (vortex) désactivé — lag GPU/CPU. Fond uni seulement. */
.universe-vortex,
.universe-vortex__spiral,
.universe-vortex__spiral--alt,
.universe-vortex__core,
.universe-vortex__stars,
.universe-vortex__vignette {
  display: none !important;
  animation: none !important;
}
.home-landing {
  max-width: none;
  width: 100%;
  margin: 0;
  /* Gouttière latérale fluide : contenu quasi bord à bord */
  padding: 0 clamp(20px, 4vw, 64px) 72px;
  box-sizing: border-box;
}

/* Accueil = écran d'entrée seul, plein écran sans scroll */
.home-landing--solo {
  padding: 0;
  width: 100%;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
}
.home-entry.home-entry--solo {
  /* Plein écran sans breakout 100vw (qui débordait à droite) */
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100svh;
  height: 100svh;
  max-height: 100svh;
}

/* Accueil seul : pas de défilement (uniquement la page d'accueil, pas /univers) */
html:has(body.is-home:not(.is-universe-page)),
body.is-home:not(.is-universe-page) {
  width: 100%;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
}
/* Le footer n'a pas sa place sur l'écran d'accueil plein écran */
body.is-home:not(.is-universe-page) footer { display: none; }
body.is-home:not(.is-universe-page) .site-ads { display: none; }

/* Emplacements pub accueil (bandeau jaune = placeholder) */
.home-ad-slot {
  display: flex;
  justify-content: stretch;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 18px 0;
  padding: 0;
  box-sizing: border-box;
}
.home-ad-slot--homeAfterFeatured { margin-top: 22px; margin-bottom: 10px; }
.home-ad-slot--homeBeforeOndemand { margin-top: 16px; margin-bottom: 20px; }
.home-ad-slot__ph {
  width: 100%;
  height: 90px;
  border-radius: 10px;
  background: #ffd400;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(255, 212, 0, 0.35);
  flex: 1 1 auto;
}
.home-ad-slot__link {
  display: block;
  width: 100%;
  max-width: 728px;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}
.home-ad-slot__link img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: cover;
}

/* Bannières image hébergées (data/site-ads.json) */
.site-ads {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 4px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.site-ads--footer {
  margin-top: auto;
}
.site-ad {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.site-ad + .site-ad {
  margin-top: 10px;
}
.site-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 168, 232, 0.22);
}
.site-ad img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 640px) {
  .site-ads {
    padding: 10px 12px 2px;
  }
  .site-ad {
    border-radius: 10px;
  }
  .site-ad img {
    max-height: 120px;
  }
}

/* Image de fond de l'écran d'accueil + voile sombre pour la lisibilité */
.home-entry--solo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Voile allégé : on voit nettement plus l'image de fond, tout en gardant
     une zone sombre en bas pour la lisibilité du texte/bouton. */
  background-image:
    linear-gradient(180deg, rgba(5,8,13,.18) 0%, rgba(5,8,13,.06) 42%, rgba(5,8,13,.62) 100%),
    url('/images/home-bg.png');
  background-size: cover, cover;
  background-position: center, center top;
  background-repeat: no-repeat, no-repeat;
}
.home-entry--solo .home-entry__space { display: none; }
.home-entry--solo::before { display: none; }
.home-entry--solo .home-entry__tardis { display: none; }
.home-entry--solo .home-entry__content { margin-top: 0; }

/* Page "Choisir un univers" */
.universe-page {
  padding-top: 0;
  padding-bottom: 0;
}
.universe-page__top {
  margin-bottom: 4px;
}
.universe-page__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: .88rem;
  font-weight: 600;
  color: rgba(235,245,255,.7);
  text-decoration: none;
  transition: color .2s ease;
}
.universe-page__back:hover { color: #54cfff; }

/* En-têtes compacts sur /univers */
body.is-universe-page .home-section-head--compact {
  text-align: center;
  margin: 0 0 6px;
}
body.is-universe-page .home-section-head--compact h2 {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 800;
  line-height: 1.2;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
body.is-universe-page .home-section-head--row.home-section-head--compact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  min-height: 36px;
}
body.is-universe-page .home-section-head--row.home-section-head--compact h2 {
  margin: 0;
  max-width: min(920px, 100%);
  justify-content: center;
}
body.is-universe-page .home-section-head--row .home-univers-block__all {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 720px) {
  body.is-universe-page .home-section-head--row .home-univers-block__all {
    position: static;
    transform: none;
    margin-top: 4px;
  }
  body.is-universe-page .home-section-head--row.home-section-head--compact {
    flex-direction: column;
  }
}

/* Avis séries sans VF — au-dessus de Reprendre */
body.is-universe-page .home-vf-notice {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 138, 76, 0.28);
  border-radius: 14px;
  background: rgba(255, 138, 76, 0.08);
  width: 100%;
  box-sizing: border-box;
}
body.is-universe-page .home-vf-notice__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  color: rgba(235, 245, 255, 0.92);
  font-size: clamp(0.7rem, 1.1vw, 0.9rem);
  line-height: 1.35;
  font-weight: 600;
  text-align: center;
}
body.is-universe-page .home-vf-notice__list li {
  margin: 0;
  width: 100%;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

/* Section "Reprendre" sur la page /univers */
body.is-universe-page .home-resume {
  margin-top: 4px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(6, 12, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.is-universe-page .home-resume-row.home-univers-scroll {
  display: flex;
  flex-wrap: nowrap;
}
body.is-universe-page .univers-card-wrap {
  position: relative;
  flex: 0 0 250px;
  scroll-snap-align: start;
}
body.is-universe-page .univers-card-wrap .home-resume-card__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
}

/* Grille d'univers "agrandie" (page /univers) : cartes plus grandes, multi-lignes.
   Spécificité renforcée pour battre .home-universe-row (flex) + media query 900px. */
.home-universes--big .home-universe-row--wrap {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  overflow: visible !important;
}
.home-universes--big .home-universe-row--wrap .home-universe {
  flex: none !important;
  width: auto !important;
}
.home-universes--big .home-universe.has-cover {
  min-height: 230px;
}
.home-universes--big .home-universe__name { font-size: 1.12rem; }
.home-universes--big .home-universe.has-cover .home-universe__icon {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}
@media (max-width: 1100px) {
  .home-universes--big .home-universe-row--wrap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .home-universes--big .home-universe-row--wrap { grid-template-columns: repeat(2, 1fr); }
  .home-universes--big .home-universe.has-cover { min-height: 180px; }
}

/* Accueil : tuiles poster — independantes de .home-universe (evite opacity/width collapses) */
.home-hub {
  margin-top: 18px;
  margin-bottom: 8px;
  padding: 16px 16px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(6, 12, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Ligne bleue glow sous le hub (avant la rangée divers / Autre) */
.home-hub--glow-after {
  margin-bottom: 36px;
  position: relative;
}
.home-hub--glow-after::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  width: min(70%, 480px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,120,200,.15) 8%,
    rgba(0,162,237,.55) 22%,
    #4fd0ff 42%,
    #00a2ed 50%,
    #4fd0ff 58%,
    rgba(0,162,237,.55) 78%,
    rgba(0,120,200,.15) 92%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(0,162,237,.55),
    0 0 20px rgba(79,208,255,.35),
    0 0 36px rgba(0,162,237,.18);
  pointer-events: none;
}
.home-hub--glow-after::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, #54cfff 42%, #0088c9 100%);
  border: 1.5px solid rgba(168,240,255,.85);
  box-shadow:
    0 0 6px #00a2ed,
    0 0 14px rgba(84,207,255,.85),
    0 0 28px rgba(0,162,237,.4);
  pointer-events: none;
}
.home-hub__grid {
  display: grid !important;
  grid-template-columns: repeat(var(--hub-cols, 4), minmax(0, 1fr)) !important;
  gap: 12px !important;
  justify-content: center;
  align-items: start;
  overflow: visible !important;
  flex-wrap: wrap;
}
body.is-universe-page .home-hub__grid {
  overflow-x: visible !important;
  overflow-y: visible !important;
}
a.home-hub__tile {
  position: relative;
  display: block;
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 2 / 3;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: #0b1017;
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
  opacity: 1 !important;
  transform: none !important;
  flex: none !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.home-hub__tile:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px rgba(0,0,0,.55);
}
.home-hub__tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  background: #0b1017;
  transition: transform .35s ease;
}
a.home-hub__tile:hover .home-hub__tile-img {
  transform: scale(1.03);
}
/* Affiches : même rendu contain partout (pas de crop agressif) */
.home-hub__tile[data-slug="doctor-who-confidential"] .home-hub__tile-img,
.home-hub__tile[data-slug="good-omens"] .home-hub__tile-img,
.home-hub__tile[data-slug="lucifer"] .home-hub__tile-img,
.home-hub__tile[data-slug="doctor-who-only"] .home-hub__tile-img {
  object-fit: contain;
  object-position: center center;
  transform: none;
}
a.home-hub__tile[data-slug="doctor-who-confidential"]:hover .home-hub__tile-img,
a.home-hub__tile[data-slug="good-omens"]:hover .home-hub__tile-img,
a.home-hub__tile[data-slug="lucifer"]:hover .home-hub__tile-img,
a.home-hub__tile[data-slug="doctor-who-only"]:hover .home-hub__tile-img {
  transform: scale(1.03);
}
.home-hub__tile[data-slug="twenty-one-pilots-livestream-experience"] .home-hub__tile-img {
  object-fit: contain;
  object-position: center center;
}
.home-hub__tile-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,.55);
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 62%),
    #0b1017;
}
.home-hub--extra {
  margin-top: 28px;
  padding-top: 8px;
}
.home-hub--below-extra {
  margin-top: 12px;
  padding-top: 0;
}
.home-hub--below-extra .home-hub__grid,
.home-hub--below-extra .home-hub__grid.home-hub__grid--3 {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 12px !important;
  grid-template-columns: none !important;
  width: 100%;
}
.home-hub--below-extra .home-hub__tile {
  width: calc((100% - 36px) / 4) !important;
  max-width: calc((100% - 36px) / 4) !important;
  flex: 0 0 calc((100% - 36px) / 4) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 760px) {
  .home-hub--below-extra .home-hub__grid,
  .home-hub--below-extra .home-hub__grid.home-hub__grid--3 {
    display: flex !important;
    justify-content: center !important;
    grid-template-columns: none !important;
  }
  .home-hub--below-extra .home-hub__tile {
    width: min(48%, 220px) !important;
    max-width: min(48%, 220px) !important;
    flex: 0 0 min(48%, 220px) !important;
  }
}
.home-ondemand-title {
  text-align: center !important;
  margin: 0 0 16px !important;
  position: relative;
  z-index: 2;
}
.home-ondemand-title h2 {
  margin: 0 !important;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem) !important;
  font-weight: 800 !important;
  color: #f2f6fb !important;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.home-dwo-title {
  margin: 0 0 14px !important;
}
.home-dwo-title__link {
  color: inherit !important;
  text-decoration: none !important;
}
.home-dwo-title__link:hover {
  color: #7fd4ff !important;
}
/* Grille accueil : 4 tuiles par rangée (Docteur Who + Séries à la demande) */
.home-hub__grid--4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  justify-content: center;
  gap: 12px !important;
  overflow: visible !important;
}
/* Legacy alias */
.home-hub__grid--3 {
  display: grid !important;
  grid-template-columns: repeat(var(--hub-cols, 4), minmax(0, 1fr)) !important;
  justify-content: center;
  gap: 12px !important;
  overflow: visible !important;
}
.home-hub__grid--3 > .home-hub__tile:first-child {
  grid-column-start: auto;
}
/* Ruban Spin-off : mêmes tuiles que le hub Doctor Who, retour à la ligne au lieu du scroll */
.home-univers-block .home-hub__grid--featured {
  overflow: visible !important;
  overflow-x: visible !important;
  flex-wrap: wrap;
  margin-top: 2px;
}
.home-hub--autres .home-hub__grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 160px)) !important;
  justify-content: start;
}
@media (max-width: 760px) {
  .home-hub__grid--4,
  .home-hub__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .home-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .home-hub--autres .home-hub__grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 140px)) !important;
  }
  .home-hub--below-extra .home-hub__grid {
    display: flex !important;
    justify-content: center !important;
    grid-template-columns: none !important;
  }
}

/* Saisons / category : pas de bordure autour des affiches */
.is-category-page .season-card,
.is-category-page .season-card:hover {
  border: none;
  box-shadow: 0 12px 28px rgba(0,0,0,.42);
}
.is-category-page .season-card:hover {
  box-shadow: 0 16px 34px rgba(0,0,0,.55);
}

/* Section "Reprendre" sur la page /univers (fallback hors body.is-universe-page) */
.home-resume { margin-top: 48px; }
.home-resume-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.home-resume-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  background: #0b1017;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 30px rgba(0,0,0,.42);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-resume-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,162,237,.45);
  box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 28px rgba(0,162,237,.18);
}
.home-resume-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #060a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.home-resume-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-resume-card__thumb > i {
  font-size: 1.8rem;
  color: rgba(0,162,237,.5);
}
.home-resume-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  opacity: 0;
  background: rgba(3,8,14,.4);
  transition: opacity .2s ease;
}
.home-resume-card:hover .home-resume-card__play { opacity: 1; }
.home-resume-card__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255,255,255,.18);
}
.home-resume-card__bar > span {
  display: block;
  height: 100%;
  background: var(--stream-accent, #00a2ed);
}
.home-resume-card__body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 12px 12px;
  min-width: 0;
}
.home-resume-card__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}
.home-resume-card__body strong {
  color: #fff;
  font-size: .98rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-resume-card__body small {
  color: rgba(235,245,255,.55);
  font-size: .78rem;
}

/* --- Épisodes les plus aimés : une seule ligne (scroll horizontal) --- */
.home-topliked {
  margin: 60px 0 16px;
  scroll-margin-top: 92px;
}
body.is-universe-page .home-topliked {
  margin: 0 0 4px;
  scroll-margin-top: 72px;
}
body.is-universe-page .home-topliked--first {
  margin-top: 0;
  padding-bottom: 4px;
}
body.is-universe-page .home-rank-block {
  margin-top: 44px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(6, 12, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
}
body.is-universe-page .home-rank-block::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -23px;
  width: min(70%, 480px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,120,200,.15) 8%,
    rgba(0,162,237,.55) 22%,
    #4fd0ff 42%,
    #00a2ed 50%,
    #4fd0ff 58%,
    rgba(0,162,237,.55) 78%,
    rgba(0,120,200,.15) 92%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(0,162,237,.55),
    0 0 20px rgba(79,208,255,.35),
    0 0 36px rgba(0,162,237,.18);
  pointer-events: none;
}
body.is-universe-page .home-rank-block::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -27px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, #54cfff 42%, #0088c9 100%);
  border: 1.5px solid rgba(168,240,255,.85);
  box-shadow:
    0 0 6px #00a2ed,
    0 0 14px rgba(84,207,255,.85),
    0 0 28px rgba(0,162,237,.4);
  pointer-events: none;
}
body.is-universe-page .home-rank-block--watched {
  margin-top: 44px;
}
.topliked-card__views i { color: #54cfff; }
.topliked-card--watched:hover {
  border-color: rgba(84,207,255,.5);
  box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 28px rgba(84,207,255,.18);
}
.home-topliked .home-section-head { margin-bottom: 30px; }
body.is-universe-page .home-topliked .home-section-head { margin-bottom: 10px; }
.home-topliked-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 22px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 4px;
  -webkit-overflow-scrolling: touch;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(0,162,237,.55) rgba(255,255,255,.06);
}
/* WebKit / Chromium : barre fine, piste arrondie discrète, curseur accent. */
.home-topliked-row::-webkit-scrollbar {
  height: 10px;
}
.home-topliked-row::-webkit-scrollbar-track {
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  margin: 0 6px;
}
.home-topliked-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #00a2ed, #4fd0ff);
  border-radius: 999px;
  /* Cadre transparent : amincit le curseur et laisse voir la piste autour. */
  border: 2px solid transparent;
  background-clip: padding-box;
}
.home-topliked-row::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #1ab2ff, #7fe0ff);
  background-clip: padding-box;
}
.home-topliked-row::-webkit-scrollbar-thumb:active {
  background: #4fd0ff;
  background-clip: padding-box;
}
.topliked-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #0b1017;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 30px rgba(0,0,0,.42);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.topliked-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,77,109,.5);
  box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 28px rgba(255,77,109,.2);
}
.topliked-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #060a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.topliked-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.topliked-card__thumb > i { font-size: 1.8rem; color: rgba(0,162,237,.5); }
.topliked-card__likes {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  color: #fff;
  background: rgba(8,12,18,.72);
  backdrop-filter: blur(4px);
}
.topliked-card__likes i { color: #ff4d6d; }
.topliked-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  background: rgba(0,0,0,.72);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
.topliked-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  opacity: 0;
  background: rgba(3,8,14,.4);
  transition: opacity .2s ease;
}
.topliked-card:hover .topliked-card__play { opacity: 1; }
.topliked-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 15px 16px;
  min-width: 0;
}
.topliked-card__body strong {
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topliked-card__body small { color: rgba(235,245,255,.55); font-size: .8rem; }

/* --- Page /univers : rubriques en rangées horizontales --- */
.home-univers-block {
  margin: 0;
  padding: 12px 14px 12px;
  scroll-margin-top: 72px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(6, 12, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Espace entre catégories (sans ligne bleue) */
.home-univers-block--sep {
  margin-top: 28px;
}
/* Ligne bleue uniquement sur les séparations fortes */
.home-univers-block--sep-strong {
  margin-top: 44px;
  position: relative;
}
.home-univers-block--sep-strong::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -23px;
  width: min(70%, 480px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,120,200,.15) 8%,
    rgba(0,162,237,.55) 22%,
    #4fd0ff 42%,
    #00a2ed 50%,
    #4fd0ff 58%,
    rgba(0,162,237,.55) 78%,
    rgba(0,120,200,.15) 92%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(0,162,237,.55),
    0 0 20px rgba(79,208,255,.35),
    0 0 36px rgba(0,162,237,.18);
  pointer-events: none;
}
.home-univers-block--sep-strong::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -27px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, #54cfff 42%, #0088c9 100%);
  border: 1.5px solid rgba(168,240,255,.85);
  box-shadow:
    0 0 6px #00a2ed,
    0 0 14px rgba(84,207,255,.85),
    0 0 28px rgba(0,162,237,.4);
  pointer-events: none;
}
body.is-universe-page .home-univers-block:first-of-type {
  margin-top: 10px;
}
.home-univers-block--ephemeral {
  position: relative;
  margin-top: 12px;
  padding: 12px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(110,203,255,.4);
  background: linear-gradient(135deg, rgba(6,24,32,.88), rgba(12,48,64,.78));
  box-shadow: 0 0 32px rgba(110,203,255,.12);
  animation: univers-ephemeral-glow 4s ease-in-out infinite;
}
@keyframes univers-ephemeral-glow {
  0%, 100% { box-shadow: 0 0 24px rgba(110,203,255,.1); }
  50% { box-shadow: 0 0 40px rgba(110,203,255,.22); }
}
.home-univers-block__timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
  vertical-align: middle;
  color: #061820;
  background: linear-gradient(90deg, #6ecbff, #a8f0ff);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-univers-block__timer i { font-size: .65rem; }
.home-univers-block__notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.25;
  vertical-align: middle;
  color: #ffe8c8;
  background: rgba(180, 90, 20, 0.28);
  border: 1px solid rgba(255, 170, 80, 0.45);
  white-space: nowrap;
}
.home-univers-block__notice i {
  font-size: .72rem;
  opacity: 0.9;
}
.cat2-hero__notice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: #ffe8c8;
  background: rgba(180, 90, 20, 0.28);
  border: 1px solid rgba(255, 170, 80, 0.45);
}
.cat2-hero__notice i { font-size: .85rem; }
.home-section-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.home-univers-block__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand, #00a2ed);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.home-univers-block__all:hover {
  background: rgba(0,162,237,.12);
  border-color: rgba(0,162,237,.45);
}
.home-univers-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,162,237,.55) rgba(255,255,255,.06);
  justify-content: center;
}
/* Si beaucoup de cartes : scroll à gauche, pas d’espace vide au milieu */
.home-univers-scroll:has(> :nth-child(6)) {
  justify-content: flex-start;
}
.home-univers-scroll::-webkit-scrollbar { height: 10px; }
.home-univers-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,.05);
  border-radius: 999px;
  margin: 0 6px;
}
.home-univers-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--brand, #00a2ed), #4fd0ff);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.univers-card {
  flex: 0 0 250px;
  width: 250px;
  max-width: 250px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #0b1017;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(0,0,0,.42);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
/* Accueil : Épisodes Autres = même taille / format que les tuiles du ruban */
body.is-universe-page .home-univers-block .univers-card {
  flex: 0 0 calc((100% - 5 * 12px) / 6);
  width: calc((100% - 5 * 12px) / 6);
  max-width: none;
  min-width: 120px;
  border: none;
  border-radius: 12px;
  background: #0b1017;
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
body.is-universe-page .home-univers-block .univers-card__thumb {
  aspect-ratio: 2 / 3;
  background: #0b1017;
}
body.is-universe-page .home-univers-block .univers-card__thumb img {
  object-fit: contain;
  object-position: center center;
}
body.is-universe-page .home-univers-block .univers-card__body {
  min-height: 0;
  padding: 8px 8px 10px;
  flex: 0 0 auto;
}
body.is-universe-page .home-univers-block .home-univers-scroll {
  justify-content: flex-start;
  gap: 12px;
}
.univers-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,162,237,.5);
  box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 28px rgba(0,162,237,.18);
}
.univers-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  flex: 0 0 auto;
  background: #060a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.univers-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.univers-card__thumb > i { font-size: 1.8rem; color: var(--brand, #00a2ed); opacity: .65; }
.univers-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(0,0,0,.72);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}
.univers-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s ease;
  font-size: 2rem;
  color: #fff;
}
.univers-card:hover .univers-card__play { opacity: 1; }
.univers-card__body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0b1017;
  flex: 0 0 auto;
  min-height: 0;
}
.univers-card__body strong {
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.univers-card__body small {
  color: rgba(235,245,255,.5);
  font-size: .75rem;
  line-height: 1.2;
}

.home-resume-wrapper { position: relative; }
.home-resume-card__remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(235,245,255,.75);
  cursor: pointer;
  font-size: .8rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.home-resume-card__remove:hover {
  background: rgba(255,70,70,.85);
  border-color: rgba(255,70,70,.9);
  color: #fff;
  transform: scale(1.08);
}
.home-entry {
  position: relative;
  min-height: clamp(560px, 82vh, 780px);
  display: grid;
  place-items: center;
  overflow: hidden;
  /* Plein écran (bord à bord) : casse la largeur max du conteneur */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: 42px;
  border-radius: 0;
  isolation: isolate;
}
.home-entry__space {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1px 1px at 10% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 82% 22%, rgba(127,210,255,.8), transparent),
    radial-gradient(1px 1px at 62% 66%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 36% 76%, rgba(127,210,255,.55), transparent),
    radial-gradient(2px 2px at 90% 72%, rgba(255,255,255,.5), transparent),
    linear-gradient(180deg, rgba(8,14,22,.2), rgba(5,8,13,.96));
  animation: homeSpacePulse 8s ease-in-out infinite alternate;
}
@keyframes homeSpacePulse {
  from { opacity: .7; }
  to { opacity: 1; }
}
.home-entry::before {
  content: "";
  position: absolute;
  inset: 9% 18% auto;
  height: 360px;
  z-index: -2;
  background: radial-gradient(closest-side, rgba(0, 162, 237, .28), transparent 72%);
  filter: blur(22px);
}
.home-entry__tardis {
  position: absolute;
  top: 110px;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: rgba(0, 162, 237, .08);
  border: 1px solid rgba(0, 162, 237, .28);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 24px 70px rgba(0, 162, 237, .22);
}
.home-entry__tardis img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(0, 162, 237, .55));
}
.home-entry__content {
  width: min(860px, 100%);
  margin-top: 130px;
  text-align: center;
}
.home-entry__kicker {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 7px 15px;
  border-radius: 999px;
  color: #89ddff;
  background: rgba(0, 162, 237, .08);
  border: 1px solid rgba(0, 162, 237, .28);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-entry__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: .95;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 50px rgba(0,0,0,.58);
}
.home-entry__text {
  width: min(720px, 92%);
  margin: 22px auto 0;
  color: rgba(235, 245, 255, .78);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}
.home-entry__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.home-entry__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: .2px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
}
.home-entry__btn--main {
  color: #04161f;
  background: linear-gradient(120deg, #00c2ff 0%, #2fd2ff 38%, #7ae1ff 64%, #00a8e8 100%);
  background-size: 220% 100%;
  box-shadow:
    0 14px 34px rgba(0, 168, 232, .38),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  animation: homeBtnSheen 6s ease-in-out infinite;
}
/* Halo lumineux pulsé derrière le bouton principal */
.home-entry__btn--main::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(120deg, #00c2ff, #7ae1ff, #00a8e8);
  filter: blur(14px);
  opacity: .55;
  transition: opacity .25s ease;
}
/* Reflet glissant */
.home-entry__btn--main::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg);
  animation: homeBtnShine 4.5s ease-in-out infinite;
  pointer-events: none;
}
.home-entry__btn--main .fas {
  font-size: 1.05em;
}
.home-entry__btn--soft {
  color: #e8f7ff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}
.home-entry__btn:hover {
  transform: translateY(-2px);
}
.home-entry__btn--main:hover {
  background-position: 100% 0;
  box-shadow:
    0 20px 44px rgba(0, 168, 232, .5),
    inset 0 1px 0 rgba(255, 255, 255, .6);
}
.home-entry__btn--main:hover::before { opacity: .85; }
.home-entry__btn:active { transform: translateY(0) scale(.97); }

@keyframes homeBtnSheen {
  0%, 100% { background-position: 0 0; }
  50% { background-position: 100% 0; }
}
@keyframes homeBtnShine {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-entry__btn--main { animation: none; }
  .home-entry__btn--main::after { animation: none; display: none; }
}
.home-section-head {
  text-align: center;
  margin: 0 auto 22px;
}
.home-section-head__kicker {
  margin: 0 0 5px;
  color: #54cfff;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.home-section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 950;
  letter-spacing: -0.03em;
}
.home-section-head__sub {
  display: block;
  margin-top: 8px;
  color: rgba(235,245,255,.58);
}
/* Timer éphémère : rester en ligne à côté du titre */
.home-section-head .home-univers-block__timer {
  display: inline-flex;
  margin-top: 0;
  color: #061820;
}
.home-section-head .home-univers-block__timer-text {
  display: inline;
  margin-top: 0;
  color: inherit;
}
.home-universes,
.home-recent-clean {
  scroll-margin-top: 92px;
  margin-top: 40px;
}
/* Tous les univers sur une seule ligne (cartes compactes) */
.home-universe-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}
.home-universe {
  --brand: #00a8e8;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 12px 16px;
  border-radius: 18px;
  text-decoration: none;
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)),
    #0b1017;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 14px 34px rgba(0,0,0,.42);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .3s ease, border-color .25s ease, box-shadow .25s ease;
  transition-delay: var(--brand-delay, 0s);
}
.home-universe--visible { opacity: 1; transform: translateY(0); }
.home-universe:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow:
    0 24px 56px rgba(0,0,0,.58),
    0 0 34px color-mix(in srgb, var(--brand) 22%, transparent);
}

/* Carte avec image de fond : la vignette remplit la tuile, le contenu reste lisible. */
.home-universe.has-cover {
  min-height: 196px;
  justify-content: flex-end;
  padding: 16px 14px 16px;
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
}
/* Fond flou (même image, agrandie) : remplit la carte sans bandes noires,
   façon "backdrop" Netflix/Plex, et met l'affiche nette en valeur. */
.home-universe__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.25);
  filter: blur(22px) brightness(.42) saturate(1.15);
  transition: transform .55s ease, filter .35s ease;
}
/* Affiche entière, nette, centrée par-dessus le fond flou. */
.home-universe__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: scale(1);
  transition: transform .55s ease;
}
/* Voile dégradé pour garder le titre lisible en bas. */
.home-universe__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,12,18,0) 38%, rgba(8,12,18,.55) 72%, rgba(8,12,18,.92) 100%),
    radial-gradient(130% 80% at 50% -10%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 60%);
}
.home-universe.has-cover:hover .home-universe__bg { transform: scale(1.32); filter: blur(24px) brightness(.5) saturate(1.2); }
.home-universe.has-cover:hover .home-universe__cover { transform: scale(1.04); }
.home-universe.has-cover .home-universe__icon {
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}
.home-universe.has-cover .home-universe__name {
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.home-universe.has-cover .home-universe__tag {
  color: rgba(235,245,255,.78);
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.home-universe__halo {
  position: absolute;
  inset: -25%;
  background: var(--brand-glow, none);
  opacity: .1;
  pointer-events: none;
  transition: opacity .3s ease;
}
.home-universe:hover .home-universe__halo { opacity: .2; }
.home-universe__shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  pointer-events: none;
  transition: left .55s ease;
}
.home-universe:hover .home-universe__shine { left: 130%; }
.home-universe__icon,
.home-universe__name,
.home-universe__tag,
.home-universe__count {
  position: relative;
  z-index: 3;
}
.home-universe__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-glow, var(--brand));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 8px 20px color-mix(in srgb, var(--brand) 45%, transparent);
  font-size: 1.45rem;
  transition: transform .25s ease;
}
.home-universe:hover .home-universe__icon { transform: scale(1.1) rotate(-5deg); }
.home-universe__name {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.home-universe__tag {
  color: rgba(235,245,255,.55);
  font-size: .76rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-universe__count {
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--brand) 92%, #fff);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .home-universe-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .home-universe {
    flex: 0 0 auto;
    width: 150px;
    scroll-snap-align: start;
  }
}
.home-recent-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.home-recent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.home-recent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,168,232,.45);
  background: rgba(0,168,232,.075);
}
.home-recent-card__thumb {
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(0,168,232,.7);
  background: linear-gradient(135deg, #10212f, #1a3346);
}
.home-recent-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-recent-card__body {
  min-width: 0;
}
.home-recent-card__body strong {
  display: block;
  color: #f2f7ff;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-recent-card__body small {
  display: block;
  margin-top: 3px;
  color: rgba(235,245,255,.52);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .home-landing { padding: 0 14px 52px; }
  .home-entry { min-height: 560px; }
  .home-entry__tardis { top: 92px; width: 104px; height: 104px; }
  .home-entry__tardis img { width: 76px; height: 76px; }
  .home-entry__content { margin-top: 120px; }
  .home-entry__btn { width: 100%; justify-content: center; }
  .home-universe { width: 60vw; }
}

/* =====================================================================
   Page d'une rubrique dédiée (catalog.ejs en mode singleCategory)
   ===================================================================== */
.category-hero {
  --brand: #00a8e8;
  position: relative;
  margin: 8px 0 26px;
  padding: 26px 28px;
  border-radius: 18px;
  background:
    radial-gradient(600px 240px at 0% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    #080b10;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.category-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #cfe9fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease, transform 0.18s ease;
}
.category-hero__back:hover {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  transform: translateX(-3px);
}
.category-hero__main {
  display: flex;
  align-items: center;
  gap: 18px;
}
.category-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.9rem;
  color: var(--brand);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--brand) 35%, transparent));
}
.category-hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #f0f6fc;
}
.category-hero__tag {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--brand) 80%, #ffffff);
}

/* En mode rubrique unique : on retire le bandeau-titre redondant du groupe
   et l'encadré bleu, pour un rendu "page" épuré. */
body.is-category .category-group {
  border: none;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}
body.is-category .category-header {
  display: none;
}
body.is-category .category-body {
  overflow: visible;
}

@media (max-width: 640px) {
  .category-hero {
    padding: 20px 18px;
  }
  .category-hero__icon {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
}

/* =====================================================================
   Page rubrique v2 (category.ejs) + page saison (cartes d'épisodes)
   + fenêtres (modales) Épisode / Acteur. Palette accent #00a8e8.
   ===================================================================== */
.category-page2,
body.is-season main.season-page {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 96px clamp(16px, 2.4vw, 32px) 72px !important;
  box-sizing: border-box;
}

/* --- Hero rubrique v2 --- */
.cat2-hero {
  --brand: #00a8e8;
  position: relative !important;
  height: auto; width: auto;
  padding: 28px 30px;
  background:
    radial-gradient(700px 280px at 0% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    linear-gradient(160deg, #0a0f16, #05070b);
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  margin: 0 0 30px;
  box-sizing: border-box;
}
.cat2-hero__back {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #cfe9fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.18s ease, transform 0.18s ease;
}
.cat2-hero__back:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); transform: translateY(-50%) translateX(-3px); }
.cat2-hero__main { display: flex; align-items: center; justify-content: center; gap: 20px; text-align: center; padding: 0 200px; min-height: 40px; }
.cat2-hero__title { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 900; letter-spacing: 0.5px; color: #f0f6fc; }
.cat2-hero__tag { margin: 5px 0 0; font-weight: 600; color: color-mix(in srgb, var(--brand) 80%, #fff); }

.cat2-block { margin-bottom: 36px; }
.cat2-block__title {
  margin: 0 0 16px;
  font-size: 1.25rem; font-weight: 800; color: #e6eef6;
  display: inline-flex; align-items: center; gap: 10px;
}
.cat2-block__title::before { content: ""; width: 4px; height: 22px; border-radius: 3px; background: #00a8e8; display: inline-block; }

/* --- Grille de saisons --- */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.season-card {
  display: block;
  border-radius: 14px; overflow: hidden; text-decoration: none;
  background: #0d1219;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.season-card:hover { transform: translateY(-5px); border-color: rgba(0, 168, 232, 0.6); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); }
.season-card__thumb {
  position: relative; aspect-ratio: 2 / 3; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10212f, #1a3346); color: rgba(0, 168, 232, 0.7); font-size: 2rem;
  overflow: hidden;
}
.season-card__thumb.has-img { color: transparent; }
.season-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.season-card:hover .season-card__thumb img { transform: scale(1.04); }
.season-card__badge {
  position: absolute; left: 10px; top: 10px;
  padding: 4px 9px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: rgba(4, 10, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.season-card__go {
  position: absolute; right: 10px; bottom: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 168, 232, 0.92); color: #052230; font-size: 0.85rem;
  opacity: 0; transform: translateX(-6px); transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.season-card:hover .season-card__go { opacity: 1; transform: translateX(0); }
.season-card__body { display: none; }

/* --- Page saison : entête --- */
.season-head { margin-bottom: 24px; }
.season-back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 7px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  text-decoration: none; color: #cfe9fb; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12); transition: background 0.18s ease, transform 0.18s ease;
}
.season-back:hover { background: rgba(0, 168, 232, 0.18); transform: translateX(-3px); }
.season-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; font-weight: 800; }
.season-title__highlight { color: #00a8e8; }

/* --- Grille de cartes d'épisodes (carrés) --- */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 18px;
}
.ep-card {
  position: relative;
  display: flex; flex-direction: column; cursor: pointer;
  border-radius: 14px; overflow: hidden; background: #0d1219;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}
/* Lien plein-carte (ouvre la page épisode) ; les actions passent au-dessus */
.ep-card__link { position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.ep-card__link:focus-visible { outline: 2px solid #00a8e8; outline-offset: 2px; }
.ep-card__body .ep-card__actions { position: relative; z-index: 2; }
.ep-card:hover, .ep-card:focus-visible { transform: translateY(-5px); border-color: rgba(0, 168, 232, 0.6); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); }
.ep-card__thumb {
  position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10212f, #1a3346); overflow: hidden;
}
.ep-card__ph { color: rgba(0, 168, 232, 0.6); font-size: 2.2rem; }
.ep-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.ep-card:hover .ep-card__thumb img { transform: scale(1.05); }
.ep-card__badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.04em; color: #06141f; background: rgba(0, 168, 232, 0.95);
  text-transform: uppercase;
}
.ep-card__play {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.1rem;
  opacity: 0; transform: scale(0.85); transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(2px); pointer-events: none;
}
.ep-card:hover .ep-card__play, .ep-card:focus-visible .ep-card__play { opacity: 1; transform: scale(1); }
.ep-card__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.16); }
.ep-card__progress-fill { display: block; height: 100%; background: linear-gradient(90deg, #00a8e8, #1ec0ff); }
.ep-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ep-card__title { margin: 0; font-size: 0.98rem; font-weight: 600; color: #e6e8ee; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Barre de progression (remplace les boutons j'aime/lecture) */
.ep-card__prog { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.ep-card__prog-track { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.ep-card__prog-fill { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #00a8e8, #1ec0ff); transition: width 0.3s ease; }
.ep-card__prog-label { flex: 0 0 auto; font-size: 0.76rem; font-weight: 700; color: #8a93a2; min-width: 42px; text-align: right; }
.ep-card__prog.is-progress .ep-card__prog-label { color: #1ec0ff; }
.ep-card__prog.is-done .ep-card__prog-fill { background: linear-gradient(90deg, #26d07c, #4ce0a0); }
.ep-card__prog.is-done .ep-card__prog-label { color: #4ce0a0; }
.ep-card__actions { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.ep-card__like {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255, 77, 109, 0.4); color: #ff4d6d; font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease;
}
.ep-card__like:hover { background: rgba(255, 77, 109, 0.12); transform: translateY(-1px); }
.ep-card__like.is-liked { background: rgba(255, 77, 109, 0.18); border-color: #ff4d6d; }
.ep-card__playbtn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 0.88rem;
  background: #00a8e8; color: #052230; border: 1px solid #00a8e8;
  transition: background 0.15s ease, transform 0.1s ease;
}
.ep-card__playbtn:hover { background: #1ec0ff; transform: translateY(-1px); }

.ep-empty {
  text-align: center; padding: 50px 20px; margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.15); border-radius: 14px; color: #9aa1b1;
}
.ep-empty i { font-size: 1.8rem; color: #00a8e8; display: block; margin-bottom: 10px; }

/* =====================================================================
   Fenêtres (modales)
   ===================================================================== */
.tw-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.tw-modal--open { display: flex; }
.tw-modal__backdrop {
  position: absolute; inset: 0; background: rgba(2, 5, 10, 0.78);
  backdrop-filter: blur(4px); animation: twFade 0.2s ease;
}
.tw-modal__dialog {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 80px);
  overflow-y: auto; border-radius: 18px;
  background: #0b1016; border: 1px solid rgba(0, 168, 232, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: twPop 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.tw-modal__dialog--person { max-width: 680px; }
@keyframes twFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes twPop { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.tw-modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1rem; transition: background 0.15s ease;
}
.tw-modal__close:hover { background: rgba(255, 77, 109, 0.85); }
.tw-modal__loading { padding: 60px 20px; text-align: center; color: #9aa1b1; }
.tw-spinner {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px;
  border: 2px solid rgba(0, 168, 232, 0.3); border-top-color: #00a8e8; border-radius: 50%;
  animation: twSpin 0.8s linear infinite;
}
@keyframes twSpin { to { transform: rotate(360deg); } }

/* Épisode : hero */
.ep-modal__hero { position: relative; display: flex; gap: 18px; padding: 22px 22px 6px; }
.ep-modal__poster {
  flex: 0 0 200px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10212f, #1a3346); color: rgba(0, 168, 232, 0.7); font-size: 2rem;
}
.ep-modal__poster img { width: 100%; height: 100%; object-fit: cover; }
.ep-modal__head { flex: 1; min-width: 0; }
.ep-modal__crumb { margin: 2px 0 6px; font-size: 0.82rem; font-weight: 700; color: #00a8e8; text-transform: uppercase; letter-spacing: 0.06em; }
.ep-modal__title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.15; }
.ep-modal__meta { margin: 0 0 14px; color: #9aa6b4; font-size: 0.9rem; }
.ep-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tw-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 0.92rem;
  text-decoration: none; border: 1px solid transparent; transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.tw-btn:hover { transform: translateY(-1px); }
.tw-btn--play { background: #00a8e8; color: #052230; border-color: #00a8e8; }
.tw-btn--play:hover { background: #1ec0ff; }
.tw-btn--restart {
  background: transparent;
  border-color: rgba(0, 168, 232, 0.45);
  color: #b8d4e6;
}
.tw-btn--restart:hover {
  background: rgba(0, 168, 232, 0.12);
  border-color: #00a8e8;
  color: #fff;
}
.tw-btn--like { background: transparent; border-color: rgba(255, 77, 109, 0.45); color: #ff4d6d; }
.tw-btn--like:hover { background: rgba(255, 77, 109, 0.12); }
.tw-btn--like.is-liked { background: rgba(255, 77, 109, 0.18); border-color: #ff4d6d; }
.tw-btn--send { background: #00a8e8; color: #052230; border-color: #00a8e8; }
.tw-btn--send:hover { background: #1ec0ff; }
.tw-btn--send:disabled { opacity: 0.6; cursor: default; transform: none; }

.ep-modal__section { padding: 16px 22px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.ep-modal__h3 { margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; color: #e6eef6; display: flex; align-items: center; gap: 9px; }
.ep-modal__h3 i { color: #00a8e8; }
.ep-modal__count { color: #9aa6b4; font-weight: 600; font-size: 0.9rem; }
.ep-modal__desc { margin: 0; color: #c4ccd6; line-height: 1.6; }
.ep-modal__desc.is-empty { color: #6b7585; font-style: italic; }

/* Casting (bande horizontale) */
.cast-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 16px 12px;
  padding-bottom: 4px;
}
.cast-card {
  width: 100%; cursor: pointer; background: none; border: none; padding: 0; text-align: center;
}
.cast-card__photo {
  display: flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden;
  background: #16202c; border: 2px solid rgba(0, 168, 232, 0.35); color: #00a8e8; font-weight: 800; font-size: 1.2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cast-card:hover .cast-card__photo { border-color: #00a8e8; transform: translateY(-3px); }
.cast-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-card__name { display: block; font-size: 0.8rem; font-weight: 700; color: #e6e8ee; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cast-card__role { display: block; font-size: 0.72rem; color: #8a93a2; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Commentaires */
.comment-form { margin-bottom: 16px; }
.comment-form__input {
  width: 100%; resize: vertical; min-height: 46px; border-radius: 10px; padding: 11px 13px;
  background: #11161d; border: 1px solid rgba(255, 255, 255, 0.12); color: #e6e8ee; font: inherit;
}
.comment-form__input:focus { outline: none; border-color: #00a8e8; }
.comment-form__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.comment-form__hint { font-size: 0.82rem; color: #ff6b81; }
.comment-login { color: #9aa6b4; }
.comment-login a { color: #00a8e8; text-decoration: none; font-weight: 700; }
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-empty { color: #6b7585; font-style: italic; margin: 6px 0; }
.comment { display: flex; gap: 12px; }
.comment__avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #00a8e8, #0072c6); color: #042130; font-weight: 800; font-size: 0.85rem;
}
.comment__body { position: relative; flex: 1; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px; padding: 10px 12px; }
.comment__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment__author { font-weight: 700; color: #e6eef6; font-size: 0.9rem; }
.comment__time { font-size: 0.74rem; color: #7f8896; }
.comment__text { color: #c4ccd6; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.comment__del {
  position: absolute; top: 8px; right: 8px; cursor: pointer;
  background: none; border: none; color: #6b7585; font-size: 0.82rem; padding: 4px; border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.comment__del:hover { color: #ff4d6d; background: rgba(255, 77, 109, 0.12); }

/* Acteur */
.person-modal__head { display: flex; align-items: center; gap: 18px; padding: 26px 22px 18px; }
.person-modal__avatar {
  flex: 0 0 90px; width: 90px; height: 90px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16202c; border: 2px solid rgba(0, 168, 232, 0.4); color: #00a8e8; font-weight: 800; font-size: 1.7rem;
}
.person-modal__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-modal__name { margin: 0; font-size: 1.5rem; font-weight: 800; color: #fff; }
.person-modal__sub { margin: 4px 0 0; color: #9aa6b4; }
.person-modal__dialog--person .ep-modal__h3, .tw-modal__dialog--person .ep-modal__h3 { padding: 0 22px; }
.person-eps { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 6px 22px 24px; }
.person-ep {
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px; padding: 8px 10px; transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.person-ep:hover { background: rgba(0, 168, 232, 0.08); border-color: rgba(0, 168, 232, 0.4); transform: translateX(3px); }
.person-ep__thumb {
  flex: 0 0 96px; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10212f, #1a3346); color: rgba(0,168,232,0.6);
}
.person-ep__thumb img { width: 100%; height: 100%; object-fit: cover; }
.person-ep__info { min-width: 0; }
.person-ep__title { display: block; font-weight: 700; color: #e6eef6; font-size: 0.95rem;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.person-ep__sub { display: block; font-size: 0.8rem; color: #8a93a2; margin-top: 2px; }

/* =====================================================================
   Page épisode dédiée (/episode/:id)
   ===================================================================== */
.ep-page { max-width: none; width: 100%; margin: 0; padding: 96px clamp(16px, 2vw, 28px) 64px; box-sizing: border-box; }
.ep-page__nav { margin-bottom: 16px; }
.ep-page__back, .person-page .ep-page__back {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 0.9rem;
  color: #cfe8f6; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, transform 0.1s ease;
}
.ep-page__back:hover { background: rgba(0, 168, 232, 0.15); transform: translateX(-2px); }
.ep-page__hero {
  display: flex; gap: 22px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px; padding: 22px;
}
.ep-page__poster {
  flex: 0 0 320px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10212f, #1a3346); color: rgba(0,168,232,0.7); font-size: 2.4rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.ep-page__poster img { width: 100%; height: 100%; object-fit: cover; }
.ep-page__head { flex: 1; min-width: 0; }
.ep-page__crumb { margin: 0 0 8px; font-size: 0.82rem; font-weight: 800; color: var(--brand, #00a8e8); text-transform: uppercase; letter-spacing: 0.06em; }
.ep-page__title { margin: 0 0 8px; font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1.12; }
.ep-page__meta { margin: 0 0 18px; color: #9aa6b4; font-size: 0.95rem; }
.ep-page__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ep-page__section { padding: 24px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.ep-page__section:last-child { border-bottom: none; }
.ep-page__h2 { margin: 0 0 14px; font-size: 1.12rem; font-weight: 800; color: #e6eef6; display: flex; align-items: center; gap: 10px; }
.ep-page__h2 i { color: #00a8e8; }
.ep-page__desc { margin: 0; color: #c4ccd6; line-height: 1.7; font-size: 1.02rem; max-width: none; }
.ep-page__desc.is-empty { color: #6b7585; font-style: italic; }
.ep-page .cast-card { text-decoration: none; }

/* Bandeau (masthead) fixe sur les pages épisode et acteur */
body.is-person-page #main-header,
body.is-episode-page #main-header,
body.is-category-page #main-header,
body.is-season #main-header,
body.is-stats-page #main-header,
body.is-universe-page #main-header {
  position: fixed !important;
}

/* Page acteur dédiée (/person/:id) */
.person-page { max-width: 940px; margin: 0 auto; padding: 96px 22px 64px !important; }
.person-page .ep-page__nav { display: flex; justify-content: flex-start; }
.person-page__head {
  position: static !important; height: auto; width: auto; padding: 0;
  background: none; box-shadow: none; z-index: auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 14px; margin: 10px 0 40px;
}
.person-page__avatar {
  flex: 0 0 120px; width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16202c; border: 3px solid rgba(0, 168, 232, 0.4); color: #00a8e8; font-weight: 800; font-size: 2.2rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.person-page__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-page__name { margin: 0; font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.1; }
.person-page__sub { margin: 10px 0 0; color: #9aa6b4; line-height: 1.25; }
.person-page .ep-page__h2 { justify-content: center; margin: 0 0 30px; clear: both; }
.person-eps--page { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); padding: 4px 0 10px; margin-top: 0; }
.person-eps--page .person-ep { text-decoration: none; }

@media (max-width: 760px) {
  .ep-page__hero { flex-direction: column; }
  .ep-page__poster { flex: none; width: 100%; }
}

@media (max-width: 640px) {
  /* Le contenu se cale juste sous le header fixe mesuré (--site-header-offset)
     avec un petit espace, au lieu d'un 86px fixe qui laissait un grand vide
     entre la barre de recherche et la 1re bulle. */
  .category-page2, body.is-season main.season-page {
    padding: calc(var(--site-header-offset, 78px) + 8px) 14px 56px !important;
  }
  .ep-page { padding: 86px 14px 56px; }
  .person-page { padding: 86px 14px 56px !important; }
  .person-page__head { margin: 8px 0 32px; }
  .person-eps--page { grid-template-columns: 1fr; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .season-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .ep-modal__hero { flex-direction: column; }
  .ep-modal__poster { flex-basis: auto; width: 100%; }
  .tw-modal { padding: 16px 10px; }
  .tw-modal__dialog { max-height: calc(100vh - 32px); }
  .cat2-hero__icon { width: 44px; height: 44px; font-size: 1.3rem; }
  /* Mobile : hero compact — bandeau fin avec retour discret + titre serré. */
  .cat2-hero {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 0 0 18px;
  }
  /* Bouton retour : petite pastille en haut, peu de hauteur. */
  .cat2-hero__back {
    position: static;
    transform: none;
    margin: 0 0 10px;
    padding: 5px 11px;
    font-size: 0.78rem;
    gap: 6px;
  }
  .cat2-hero__back:hover { transform: translateX(-3px); }
  /* Titre recentré, collé au bouton, sans réserve de hauteur. */
  .cat2-hero__main {
    padding: 0;
    gap: 4px;
    min-height: 0;
    text-align: center;
    justify-content: center;
    align-items: center;
  }
  .cat2-hero__main > div { width: 100%; }
  .cat2-hero__title { font-size: 1.45rem; letter-spacing: 0.2px; line-height: 1.1; }
  .cat2-hero__tag { margin: 3px 0 0; font-size: 0.85rem; }
  /* Noms de saisons recentrés sous la vignette. */
  .season-card__body { align-items: center; text-align: center; }
  .cat2-block__title { justify-content: center; }
}

/* ==========================================================================
   Page Statistiques communauté (/community/stats)
   ========================================================================== */
.stats-page {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 96px clamp(16px, 2.4vw, 32px) 72px;
  box-sizing: border-box;
}
.stats-hero {
  position: static !important;
  text-align: center;
  margin-bottom: 34px;
}
.stats-hero__kicker {
  margin: 0 0 8px;
  color: #54cfff;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.stats-hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.03em;
}
.stats-hero__sub {
  margin: 10px 0 0;
  color: rgba(235,245,255,.6);
  font-size: 1.02rem;
}
/* KPIs */
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

/* Ruban affiches séries — une ligne par couverture audio */
.stats-series-band {
  margin: 0 0 28px;
}
.stats-series-band__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.stats-series-band__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #e8f4ff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.stats-series-band__title i {
  color: #54cfff;
  font-size: .95rem;
}
.stats-series-band[data-band="vf"] .stats-series-band__title i { color: #7ee0a8; }
.stats-series-band[data-band="vo"] .stats-series-band__title i { color: #ffb347; }
.stats-series-band__count {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
}
.stats-series-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
}
.stats-series-tile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 92px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(145deg, #12202c, #0a121a);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stats-series-tile:hover,
.stats-series-tile:focus-visible {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(84,207,255,.45);
  box-shadow: 0 16px 32px rgba(0,0,0,.45), 0 0 0 1px rgba(84,207,255,.2);
  outline: none;
}
.stats-series-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stats-series-tile__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(84,207,255,.55);
  font-size: 1.4rem;
}
.stats-kpi {
  --kpi: #00a2ed;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 10px 16px;
  border-radius: 16px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--kpi) 22%, transparent), transparent 65%),
    #0b1118;
  border: 1px solid color-mix(in srgb, var(--kpi) 24%, transparent);
  box-shadow: 0 14px 32px rgba(0,0,0,.4);
}
.stats-kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: #fff;
  background: color-mix(in srgb, var(--kpi) 80%, #06121d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px color-mix(in srgb, var(--kpi) 40%, transparent);
}
.stats-kpi__value {
  font-size: 1.7rem;
  font-weight: 950;
  line-height: 1;
  color: #fff;
}
.stats-kpi__label {
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(235,245,255,.6);
}

/* Colonnes panneaux */
.stats-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.stats-panel {
  background: #0b1118;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
}
.stats-panel--wide { margin-bottom: 0; }
.stats-panel__head { margin-bottom: 16px; }
.stats-panel__head h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 850;
  color: #f0f6fc;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Classements */
.stats-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stats-rank__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: background .15s ease;
}
.stats-rank__item:hover { background: rgba(255,255,255,.04); }
.stats-rank__pos {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: .85rem;
  color: #cfe9fb;
  background: rgba(255,255,255,.06);
}
.stats-rank__pos--1 { background: linear-gradient(135deg, #ffd700, #ffb000); color: #3a2c00; }
.stats-rank__pos--2 { background: linear-gradient(135deg, #d8dee6, #aab4c0); color: #2a2f36; }
.stats-rank__pos--3 { background: linear-gradient(135deg, #d39256, #b06a2c); color: #2a1700; }
.stats-rank__thumb {
  flex: 0 0 auto;
  width: 88px;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10212f, #1a3346);
  color: rgba(0,168,232,.7);
  text-decoration: none;
}
.stats-rank__thumb img { width: 100%; height: 100%; object-fit: cover; }
.stats-rank__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.stats-rank__title {
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-rank__title:hover { color: #54cfff; }
.stats-rank__meta { color: rgba(235,245,255,.5); font-size: .78rem; }
.stats-rank__score { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: .9rem; }
.stats-rank__likes { color: #ff5fa2; }
.stats-rank__dislikes { color: #e74c3c; }
.stats-rank__viewers { color: #54cfff; }

.stats-empty { text-align: center; padding: 30px 12px; color: rgba(235,245,255,.55); }
.stats-empty i { color: #00a8e8; margin-right: 6px; }

/* Séries pas encore en VF */
.stats-missing-vf-panel .stats-missing-vf__list {
  margin-top: 2px;
}
.stats-missing-vf__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-missing-vf__item { --brand: #ff8a4c; }
.stats-missing-vf__link {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: start;
  gap: 12px;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  transition: background .15s ease, border-color .15s ease;
}
.stats-missing-vf__link:hover {
  background: rgba(255,255,255,.06);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
}
.stats-missing-vf__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
  margin-top: 5px;
}
.stats-missing-vf__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-missing-vf__name {
  color: #e6eef6;
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-missing-vf__detail {
  color: rgba(235,245,255,.62);
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 500;
}
.stats-missing-vf__link:hover .stats-missing-vf__name { color: var(--brand); }
.stats-missing-vf__count {
  color: rgba(235,245,255,.55);
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
  margin-top: 2px;
}

/* Fréquentation (visiteurs / spectateurs) */
.stats-traffic { margin-top: 22px; margin-bottom: 22px; }
.stats-traffic__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
}
.stats-traffic__range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}
.stats-traffic__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8b9aab;
}
.stats-traffic__field input[type="date"] {
  background: #06101a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #e8eef6;
  padding: 8px 10px;
  font-size: .92rem;
  font-weight: 600;
  color-scheme: dark;
  min-width: 9.5rem;
}
.stats-traffic__field input[type="date"]:focus {
  outline: none;
  border-color: rgba(0,162,237,.55);
  box-shadow: 0 0 0 3px rgba(0,162,237,.18);
}
.stats-traffic__apply {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0088c8, #00a2ed);
  color: #fff;
  font-weight: 750;
  font-size: .88rem;
  padding: 9px 16px;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.stats-traffic__apply:hover { filter: brightness(1.08); }
.stats-traffic__apply:active { transform: translateY(1px); }
.stats-traffic__kpis {
  display: grid;
  grid-template-columns: minmax(0, 320px);
  gap: 14px;
  margin: 8px 0 18px;
}
.stats-traffic__kpi {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-traffic__kpi-value {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 850;
  color: #f0f6fc;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.stats-traffic__kpi .stats-traffic__kpi-value { color: #54cfff; }
.stats-traffic__kpi-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #8b9aab;
}
.stats-traffic__chart-wrap {
  position: relative;
  height: 240px;
  width: 100%;
}
.stats-traffic__charts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 4px;
}
.stats-traffic__chart-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-traffic__chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8b9aab;
}
.stats-traffic__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.stats-traffic__swatch--visits { background: #00a2ed; }
.stats-traffic__swatch--plays { background: #00d39a; }
.stats-traffic__hint {
  margin: 12px 0 0;
  font-size: .85rem;
  color: #8b9aab;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .stats-kpis { grid-template-columns: repeat(4, 1fr); }
  .stats-cols { grid-template-columns: 1fr; }
  .stats-series-strip { gap: 10px; }
  .stats-series-tile { width: 78px; }
}
@media (max-width: 620px) {
  .stats-page { padding: 86px 14px 56px; }
  .stats-kpis { grid-template-columns: repeat(2, 1fr); }
  .stats-series-strip { gap: 8px; margin-bottom: 28px; }
  .stats-series-tile { width: 68px; }
  .stats-rank__thumb { width: 56px; }
  .stats-traffic__kpis { grid-template-columns: 1fr; }
  .stats-traffic__chart-wrap { height: 200px; }
  .stats-traffic__head { align-items: stretch; }
  .stats-traffic__range { width: 100%; }
  .stats-traffic__field { flex: 1 1 auto; }
  .stats-traffic__field input[type="date"] { min-width: 0; width: 100%; }
  .stats-traffic__apply { width: 100%; }
}

/* ==========================================================================
   Interface mobile native (≤820px) — pas une copie réduite du desktop
   --------------------------------------------------------------------------
   Haut  = recherche seule
   Bas   = dock Accueil / Stats / Discord / Soutenir / Compte
   Contenu = carrousels plein bord, snap tactile
   ========================================================================== */
.catalog-btn-label--short { display: none; }
.mobile-dock { display: none; }

/* Ruban étroit (navigateur Cursor, tablette, fenêtre réduite) :
   les libellés se compriment comme des images, sans chevauchement. */
@container masthead (max-width: 1280px) {
  .tardis-stream-masthead .catalog-btn-label--full { display: none; }
  .tardis-stream-masthead .catalog-btn-label--short { display: inline; }
  .tardis-stream-masthead #username-display { display: none; }
  .tardis-stream-masthead .catalog-search-bar-container {
    max-width: min(320px, 100%);
  }
}
@container masthead (max-width: 980px) {
  .tardis-stream-masthead .catalog-btn-label { display: none; }
  .tardis-stream-masthead .menu-btn.catalog-title-btn {
    padding-inline: 0.55rem;
    gap: 0 !important;
  }
  .tardis-stream-masthead .catalog-search-bar-container {
    flex-basis: 100px;
    max-width: min(280px, 100%);
  }
}
@media (max-width: 1280px) {
  .tardis-stream-masthead .catalog-btn-label--full { display: none; }
  .tardis-stream-masthead .catalog-btn-label--short { display: inline; }
  .tardis-stream-masthead #username-display { display: none; }
  .tardis-stream-masthead .catalog-search-bar-container {
    max-width: min(320px, 100%);
  }
}
@media (max-width: 980px) {
  .tardis-stream-masthead .catalog-btn-label { display: none; }
  .tardis-stream-masthead .menu-btn.catalog-title-btn {
    padding-inline: 0.55rem;
    gap: 0 !important;
  }
  .tardis-stream-masthead .catalog-search-bar-container {
    flex-basis: 100px;
    max-width: min(280px, 100%);
  }
}

/* iPhone paysage : largeur ~844–956px (>820) mais hauteur ~390px.
   Sans ce 2e critère, Safari bascule en layout desktop (dock disparu, header PC). */
@media (max-width: 820px), (max-height: 540px) and (orientation: landscape) and (hover: none) {
  :root {
    --mobile-dock-h: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  /* Fond TARDIS aussi sur mobile (les overlays noirs le masquaient). */
  html,
  body,
  body:not(.admin-body) {
    background-color: #001a3d !important;
    background-image:
      radial-gradient(900px 480px at 50% -10%, rgba(0, 162, 237, 0.22), transparent 55%),
      radial-gradient(640px 360px at 100% 100%, rgba(0, 59, 111, 0.55), transparent 60%),
      linear-gradient(165deg, #001433 0%, #001a3d 40%, #002d5c 100%) !important;
    background-attachment: scroll !important;
  }

  body {
    padding-bottom: var(--mobile-dock-h) !important;
  }

  #main-header {
    padding: 0 !important;
  }

  .tardis-stream-masthead.catalog-title-frame {
    padding:
      max(6px, env(safe-area-inset-top, 0px))
      12px
      8px
      12px !important;
    background: rgba(0, 26, 61, 0.88) !important;
    backdrop-filter: blur(14px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.2) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(0, 162, 237, 0.18) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .tardis-stream-masthead.catalog-title-frame::after {
    display: none !important;
  }

  .tardis-stream-masthead .catalog-title-bar {
    display: block !important;
    width: 100% !important;
  }

  /* Masque toute la nav desktop : le dock bas s’en charge */
  .tardis-stream-masthead .catalog-title-left,
  .tardis-stream-masthead .catalog-title-actions,
  .tardis-stream-masthead .catalog-mobile-auth,
  .tardis-stream-masthead .catalog-user-menu {
    display: none !important;
  }

  .tardis-stream-masthead .catalog-search-bar-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    position: relative !important;
  }

  .tardis-stream-masthead .search-bar {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
  }
  .tardis-stream-masthead .search-bar input[type="search"],
  .tardis-stream-masthead .search-bar input {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    font-size: 15px !important;
  }
  .tardis-stream-masthead .search-bar .search-icon-mobile,
  .tardis-stream-masthead .search-bar i.fa-search {
    font-size: 0.95rem !important;
    opacity: 0.7;
  }

  .global-search-results {
    z-index: 1700 !important;
    border-radius: 14px !important;
  }

  /* —— Dock bas —— */
  .mobile-dock {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    height: var(--mobile-dock-h);
    padding: 6px 4px max(6px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: rgba(0, 26, 61, 0.94);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    border-top: 1px solid rgba(0, 162, 237, 0.22);
  }
  .mobile-dock__item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    padding: 4px 2px !important;
    border: 0 !important;
    background: transparent !important;
    color: rgba(220, 230, 240, 0.55) !important;
    text-decoration: none !important;
    font-size: 0.62rem !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-dock__item i {
    font-size: 1.15rem !important;
    line-height: 1 !important;
  }
  .mobile-dock__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-dock__item.is-active,
  .mobile-dock__item:active {
    color: #4fd0ff !important;
  }
  .mobile-dock__item--discord.is-active,
  .mobile-dock__item--discord:active {
    color: #aeb4ff !important;
  }

  .mobile-dock__account {
    position: relative;
    min-width: 0;
  }
  .mobile-dock__account > summary {
    list-style: none;
    cursor: pointer;
  }
  .mobile-dock__account > summary::-webkit-details-marker { display: none; }
  .mobile-dock__sheet {
    position: absolute;
    right: 4px;
    bottom: calc(100% + 10px);
    min-width: 200px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(0, 32, 72, 0.97);
    border: 1px solid rgba(0, 162, 237, 0.28);
    box-shadow: 0 12px 40px rgba(0, 20, 50, 0.55);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mobile-dock__sheet a,
  .mobile-dock__sheet button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e8eef6;
    text-decoration: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }
  .mobile-dock__sheet a:active,
  .mobile-dock__sheet button:active {
    background: rgba(0, 162, 237, 0.14);
  }
  .mobile-dock__sheet button {
    color: #ff8a8a;
  }
  .mobile-dock__sheet i {
    width: 1.1rem;
    text-align: center;
    opacity: 0.9;
  }

  /* —— Contenu accueil : cadres comme PC + carrousels optimisés —— */
  body.is-universe-page main.home-landing,
  .universe-page.home-landing,
  body.is-universe-page .universe-page {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-bottom: 16px !important;
  }

  body.is-universe-page .home-hub {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.is-universe-page .home-resume,
  body.is-universe-page .home-rank-block,
  body.is-universe-page .home-univers-block {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 14px !important;
    padding: 12px 10px 10px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 162, 237, 0.28) !important;
    background:
      radial-gradient(120% 80% at 50% 0%, rgba(0, 162, 237, 0.12), transparent 55%),
      rgba(0, 26, 61, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 10px 28px rgba(0, 20, 50, 0.35) !important;
    position: relative !important;
    overflow: hidden !important;
    contain: layout paint !important;
  }

  body.is-universe-page .home-resume {
    margin-top: 6px !important;
  }

  /* Séparateur lumineux comme sur PC (entre blocs) */
  body.is-universe-page .home-rank-block::before {
    display: block !important;
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: -12px !important;
    width: min(55%, 280px) !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 162, 237, 0.15) 12%,
      #4fd0ff 50%,
      rgba(0, 162, 237, 0.15) 88%,
      transparent 100%
    ) !important;
    box-shadow: 0 0 10px rgba(0, 162, 237, 0.45) !important;
    pointer-events: none !important;
  }
  body.is-universe-page .home-rank-block::after {
    display: block !important;
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: -15px !important;
    width: 7px !important;
    height: 7px !important;
    margin-left: -3.5px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 32% 28%, #fff, #54cfff 45%, #0088c9 100%) !important;
    border: 1px solid rgba(168, 240, 255, 0.85) !important;
    box-shadow: 0 0 8px rgba(0, 162, 237, 0.7) !important;
    pointer-events: none !important;
  }
  body.is-universe-page .home-rank-block--watched {
    margin-top: 18px !important;
  }
  body.is-universe-page .home-rank-block--watched::before,
  body.is-universe-page .home-rank-block--watched::after {
    display: none !important;
  }

  body.is-universe-page .home-topliked--first {
    margin-top: 10px !important;
  }

  body.is-universe-page .home-section-head--compact {
    margin: 0 0 8px !important;
    padding: 0 2px !important;
    text-align: left !important;
    justify-content: flex-start !important;
  }
  body.is-universe-page .home-section-head--compact h2 {
    font-size: 0.98rem !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }
  body.is-universe-page .home-section-head--row.home-section-head--compact {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 0 !important;
  }
  body.is-universe-page .home-section-head--row .home-univers-block__all {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    padding: 5px 9px !important;
    font-size: 0.72rem !important;
  }

  /* Carrousels : ~2 cartes visibles, scroll fluide (momentum natif) */
  .home-univers-scroll,
  .home-topliked-row,
  .home-resume-row {
    gap: 8px !important;
    padding: 2px 2px 8px !important;
    margin: 0 !important;
    scroll-snap-type: x proximity !important;
    scroll-padding-inline: 2px !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: auto !important;
    touch-action: pan-x !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 162, 237, 0.55) rgba(255, 255, 255, 0.06) !important;
    justify-content: flex-start !important;
  }
  .home-univers-scroll::-webkit-scrollbar,
  .home-topliked-row::-webkit-scrollbar,
  .home-resume-row::-webkit-scrollbar {
    display: block !important;
    height: 4px !important;
  }
  .home-univers-scroll::-webkit-scrollbar-track,
  .home-topliked-row::-webkit-scrollbar-track,
  .home-resume-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 999px !important;
  }
  .home-univers-scroll::-webkit-scrollbar-thumb,
  .home-topliked-row::-webkit-scrollbar-thumb,
  .home-resume-row::-webkit-scrollbar-thumb {
    background: rgba(0, 162, 237, 0.55) !important;
    border-radius: 999px !important;
  }

  .univers-card,
  body.is-universe-page .univers-card-wrap,
  .topliked-card {
    flex: 0 0 46vw !important;
    width: 46vw !important;
    max-width: 180px !important;
    min-width: 140px !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: normal !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32) !important;
    /* Couche GPU : moins de jank pendant le swipe */
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: none !important;
  }
  .univers-card:hover,
  .topliked-card:hover {
    transform: translateZ(0) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32) !important;
  }

  .univers-card__body,
  .topliked-card__body {
    padding: 7px 8px 8px !important;
  }
  .univers-card__body strong,
  .topliked-card__body strong {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
  }
  .univers-card__body small,
  .topliked-card__body small {
    font-size: 0.68rem !important;
  }
  .topliked-card__likes,
  .topliked-card__views,
  .univers-card__badge,
  .topliked-card__badge {
    font-size: 0.65rem !important;
    padding: 3px 7px !important;
  }

  /* Hub tuiles : grille 2 colonnes mobile */
  body.is-universe-page .home-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
  }
  body.is-universe-page .home-hub--below-extra .home-hub__grid {
    display: flex !important;
    justify-content: center !important;
    grid-template-columns: none !important;
  }
  body.is-universe-page .home-hub--below-extra .home-hub__tile {
    width: min(48%, 220px) !important;
    max-width: min(48%, 220px) !important;
    flex: 0 0 min(48%, 220px) !important;
  }

  footer {
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    font-size: 0.72rem !important;
  }
}

/* ==========================================================================
   Accueil plein écran : pas de scroll, contenu vers le bas de l'image
   --------------------------------------------------------------------------
   NB : on cible la PRÉSENCE de `.home-landing--solo` (via :has) plutôt que la
   classe `body.is-home` — celle-ci est retirée par app.js quand le header
   n'est pas `home-header`, ce qui désactivait les règles et laissait la page
   scroller + afficher le footer.
   ========================================================================== */
html:has(.home-landing--solo),
body:has(.home-landing--solo) {
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
}
body:has(.home-landing--solo) footer {
  display: none !important;
}

@media (max-width: 768px) {
  /* Neutralise le margin-top:80px global de <main> qui poussait le hero hors
     écran (cause du scroll résiduel). */
  .home-landing--solo {
    margin-top: 0 !important;
    padding: 0 !important;
    height: 100svh !important;
    max-height: 100svh !important;
    overflow: hidden !important;
  }

  /* Contenu aligné vers le BAS de l'image (un peu plus bas), pas centré. */
  .home-entry.home-entry--solo {
    min-height: 100svh !important;
    height: 100svh !important;
    place-items: end center !important;
  }

  .home-entry--solo .home-entry__content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: clamp(48px, 16svh, 150px) !important;
  }

  /* Titre réduit sur mobile. */
  .home-entry--solo .home-entry__title {
    font-size: clamp(1.7rem, 7.2vw, 2.5rem) !important;
    line-height: 1 !important;
  }

  /* Description : plus petite + bornée à 2 lignes maximum. */
  .home-entry--solo .home-entry__text {
    width: min(560px, 96%) !important;
    margin-top: 12px !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .home-entry--solo .home-entry__kicker {
    margin-bottom: 10px !important;
    font-size: 0.7rem !important;
    padding: 5px 12px !important;
  }

  .home-entry--solo .home-entry__actions {
    margin-top: 18px !important;
  }

  /* Fond dézoomé : on réduit l'échelle de l'image pour voir davantage la
     scène (moins de recadrage). Le fond sombre + le dégradé masquent la
     bande basse créée par le dézoom. */
  .home-entry--solo::after {
    background-color: #001a3d !important;
    background-size: cover, auto 84% !important;
    background-position: center, center 22% !important;
  }
}

/* Page interstitielle avant /video */
body.is-interstitial-page .site-ads { display: none; }
.interstitial {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  box-sizing: border-box;
}
.interstitial__card {
  border-radius: 18px;
  padding: 28px 24px 24px;
  background:
    linear-gradient(165deg, rgba(0, 40, 80, 0.72) 0%, rgba(1, 8, 18, 0.82) 100%);
  border: 1px solid rgba(0, 168, 232, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.interstitial__eyebrow {
  margin: 0 0 8px;
  color: #00a8e8;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.interstitial__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
}
.interstitial__msg {
  margin: 12px auto;
  max-width: 36em;
  color: rgba(220, 230, 240, 0.85);
  line-height: 1.45;
}
.interstitial__ep {
  margin: 16px 0 18px;
  color: rgba(200, 210, 220, 0.75);
  font-size: 0.95rem;
}
.interstitial__ep strong { color: #e8f4ff; }
.interstitial__ad {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  margin: 14px auto;
  line-height: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 168, 232, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  background: rgba(0, 20, 40, 0.5);
}
.interstitial__ad--above { margin-top: 16px; margin-bottom: 4px; }
.interstitial__ad--below { margin-top: 4px; margin-bottom: 8px; }
.interstitial__ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 168, 232, 0.22);
}
.interstitial__ad img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100px;
  max-height: 180px;
  object-fit: cover;
  object-position: center;
}
.interstitial__ad--ts {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
  background: rgba(0, 12, 28, 0.55);
}
.interstitial__ad--ts iframe {
  display: block;
  max-width: 100%;
}
.interstitial__opens {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 168, 232, 0.08);
  border: 1px solid rgba(0, 168, 232, 0.28);
}
.interstitial__opens-label {
  margin: 0 0 10px;
  color: rgba(220, 230, 240, 0.88);
  font-size: 0.92rem;
  line-height: 1.4;
}
.interstitial__opens-label strong { color: #7fdcff; }
.interstitial__btn--ad {
  background: rgba(255, 255, 255, 0.1);
  color: #e8f4ff;
  border: 1px solid rgba(0, 168, 232, 0.55);
  cursor: pointer;
  font: inherit;
  width: 100%;
  justify-content: center;
}
.interstitial__btn--ad:hover:not(.is-disabled):not(:disabled) {
  background: rgba(0, 168, 232, 0.22);
}
.interstitial__btn--ad.is-disabled,
.interstitial__btn--ad:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.interstitial__btn--ad.is-done {
  opacity: 0.85;
  border-color: rgba(80, 200, 120, 0.55);
  background: rgba(40, 120, 70, 0.25);
}
.interstitial__opens-count {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.interstitial__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.interstitial__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.interstitial__btn--primary {
  background: #00a8e8;
  color: #001a3d;
}
.interstitial__btn--primary:hover:not(.is-disabled) {
  transform: translateY(-1px);
  background: #33c0f2;
}
.interstitial__btn--primary.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: auto;
}
.interstitial__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e8f4ff;
  border: 1px solid rgba(0, 168, 232, 0.45);
}
.interstitial__btn--secondary:hover {
  background: rgba(0, 168, 232, 0.18);
}
.interstitial__wait {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}
.interstitial__hint {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: rgba(180, 195, 210, 0.65);
}
@media (max-width: 640px) {
  .interstitial { padding: 18px 12px 28px; }
  .interstitial__card { padding: 22px 16px 18px; }
  .interstitial__btn { width: 100%; justify-content: center; }
}
