.tvp-numerotation-page {
  --tvp-num-surface: #ffffff;
  --tvp-num-surface-muted: #f6f9fe;
  --tvp-num-surface-muted-2: #ecf3ff;
  --tvp-num-border: #d7e2ef;
  --tvp-num-border-strong: #bfd0e4;
  --tvp-num-text: #0f172a;
  --tvp-num-text-muted: #43566d;
  --tvp-num-title: #0f172a;
  --tvp-num-chip-bg: #e8f0ff;
  --tvp-num-chip-border: #c6d6ef;
  --tvp-num-chip-text: #0f2f57;
  --tvp-num-print-bg: #1f7a43;
  --tvp-num-print-bg-hover: #176337;
  --tvp-num-print-text: #ffffff;
  --tvp-num-head-link-border: #a8bdd4;
  --tvp-num-head-link-text: #20344f;
  --tvp-num-head-print-bg: #e8f0fb;
  --tvp-num-head-print-text: #20344f;
  --tvp-num-focus: #0f6fdb;
  --tvp-num-shadow: 0 1px 4px rgb(15 23 42 / 0.08);
  --tvp-num-shadow-hover: 0 10px 24px rgb(15 23 42 / 0.15);

  min-width: 0;
  max-width: 100%;
  color: var(--tvp-num-text);
}

.tvp-numerotation-toolbar {
  margin-bottom: 0.78rem;
}

.tvp-numerotation-print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--tvp-num-print-bg);
  border-radius: 999px;
  background: var(--tvp-num-print-bg);
  color: var(--tvp-num-print-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  width: 100%;
  padding: 0.58rem 1rem;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tvp-numerotation-print-btn:visited,
.tvp-numerotation-print-btn:hover,
.tvp-numerotation-print-btn:active {
  color: var(--tvp-num-print-text);
}

.tvp-numerotation-print-btn:hover {
  border-color: var(--tvp-num-print-bg-hover);
  background: var(--tvp-num-print-bg-hover);
  transform: translateY(-1px);
}

.tvp-numerotation-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tvp-numerotation-print-btn .tvp-numerotation-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.tvp-numerotation-icon--printer {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tvp-numerotation-print-btn:focus-visible,
.tvp-numerotation-head-link:focus-visible,
.tvp-numerotation-head-print:focus-visible,
.tvp-numerotation-channel-link:focus-visible {
  outline: 2px solid var(--tvp-num-focus);
  outline-offset: 2px;
}

.tvp-numerotation-table-wrap {
  overflow: auto;
  max-width: 100%;
  max-height: min(72vh, 900px);
  border: 1px solid var(--tvp-num-border);
  border-radius: 0.88rem;
  background: var(--tvp-num-surface);
  box-shadow: var(--tvp-num-shadow);
  -webkit-overflow-scrolling: touch;
}

.tvp-numerotation-table-wrap:focus-visible {
  outline: 2px solid var(--tvp-num-focus);
  outline-offset: 2px;
}

.tvp-numerotation-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tvp-numerotation-head {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid var(--tvp-num-border-strong);
  background: linear-gradient(180deg, var(--tvp-num-surface) 0%, var(--tvp-num-surface-muted) 100%);
  vertical-align: middle;
  padding: 0.6rem 0.52rem;
}

.tvp-numerotation-head--chaine {
  position: sticky;
  left: 0;
  z-index: 7;
  min-width: 220px;
  max-width: 280px;
  text-align: left;
}

.tvp-numerotation-head--bouquet,
.tvp-numerotation-cell {
  min-width: 126px;
}

.tvp-numerotation-head-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.36rem;
}

.tvp-numerotation-head-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid var(--tvp-num-head-link-border);
  border-radius: 999px;
  background: var(--tvp-num-surface);
  color: var(--tvp-num-head-link-text);
  text-decoration: none;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  padding: 0.35rem 0.7rem;
  text-wrap: balance;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.tvp-numerotation-head-link:hover {
  color: var(--tvp-num-head-link-text);
  border-color: var(--tvp-num-border-strong);
  background: var(--tvp-num-surface-muted);
  transform: translateY(-1px);
}

.tvp-numerotation-head-link--static,
.tvp-numerotation-head-link--static:hover {
  cursor: default;
  pointer-events: none;
  transform: none;
}

.tvp-numerotation-head-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--tvp-num-head-link-border);
  border-radius: 999px;
  background: var(--tvp-num-head-print-bg);
  color: var(--tvp-num-head-print-text);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tvp-numerotation-head-print:hover {
  color: var(--tvp-num-head-link-text);
  border-color: var(--tvp-num-border-strong);
  background: var(--tvp-num-surface);
  transform: translateY(-1px);
}

.tvp-numerotation-channel-cell,
.tvp-numerotation-cell {
  border-bottom: 1px solid var(--tvp-num-border);
}

.tvp-numerotation-channel-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 220px;
  max-width: 280px;
  border-right: 1px solid var(--tvp-num-border);
  background: var(--tvp-num-surface);
  text-align: left;
  padding: 0;
}

.tvp-numerotation-row:nth-child(even) .tvp-numerotation-channel-cell,
.tvp-numerotation-row:nth-child(even) .tvp-numerotation-cell {
  background: var(--tvp-num-surface-muted);
}

.tvp-numerotation-row:hover .tvp-numerotation-channel-cell,
.tvp-numerotation-row:hover .tvp-numerotation-cell {
  background: var(--tvp-num-surface-muted-2);
}

.tvp-numerotation-channel-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.95rem;
  width: 100%;
  text-decoration: none;
  color: var(--tvp-num-text);
  padding: 0.5rem 0.68rem;
}

.tvp-numerotation-logo-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--tvp-num-border);
  border-radius: 0.72rem;
  background: var(--tvp-num-surface);
}

.tvp-numerotation-logo-wrap .tvp-numerotation-logo {
  width: 2.2rem;
  height: 2.2rem;
}

.tvp-numerotation-channel-name {
  display: block;
  min-width: 0;
  color: var(--tvp-num-title);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.24;
  text-align: left;
}

.tvp-numerotation-cell {
  text-align: center;
  background: var(--tvp-num-surface);
  padding: 0.5rem 0.42rem;
}

.tvp-numerotation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  min-height: 2rem;
  border: 1px solid var(--tvp-num-chip-border);
  border-radius: 999px;
  background: var(--tvp-num-chip-bg);
  color: var(--tvp-num-chip-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.22rem 0.72rem;
}

.tvp-numerotation-cell--empty {
  color: var(--tvp-num-text-muted);
}

.tvp-numerotation-dash {
  display: inline-block;
  opacity: 0.56;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.tvp-numerotation-empty-row td {
  text-align: center;
  color: var(--tvp-num-text-muted);
  background: var(--tvp-num-surface-muted);
  padding: 1rem;
}

.tvp-numerotation-note {
  margin-top: 0.85rem;
  border: 1px solid var(--tvp-num-border);
  border-radius: 0.8rem;
  background: var(--tvp-num-surface-muted);
  color: var(--tvp-num-text);
  line-height: 1.55;
  padding: 0.76rem 0.84rem;
}

.tvp-numerotation-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

html[data-theme="dark"] .tvp-numerotation-page,
html.dark .tvp-numerotation-page,
body.dark-mode .tvp-numerotation-page,
body.dark-theme .tvp-numerotation-page {
  --tvp-num-surface: #1b2636;
  --tvp-num-surface-muted: #162334;
  --tvp-num-surface-muted-2: #203146;
  --tvp-num-border: #334155;
  --tvp-num-border-strong: #455a73;
  --tvp-num-text: #e5edf7;
  --tvp-num-text-muted: #b9c9dc;
  --tvp-num-title: #f1f5f9;
  --tvp-num-chip-bg: #2a3d55;
  --tvp-num-chip-border: #486384;
  --tvp-num-chip-text: #e7f1ff;
  --tvp-num-print-bg: #2f8c56;
  --tvp-num-print-bg-hover: #246f44;
  --tvp-num-print-text: #ffffff;
  --tvp-num-head-link-border: #597394;
  --tvp-num-head-link-text: #f1f6ff;
  --tvp-num-head-print-bg: #27384f;
  --tvp-num-head-print-text: #e5efff;
  --tvp-num-focus: #7aa8ff;
  --tvp-num-shadow: 0 2px 8px rgb(2 6 23 / 0.5);
  --tvp-num-shadow-hover: 0 11px 24px rgb(2 6 23 / 0.56);
}


@media (max-width: 991.98px) {
  .tvp-numerotation-table-wrap {
    max-height: min(68vh, 780px);
  }

  .tvp-numerotation-head--chaine,
  .tvp-numerotation-channel-cell {
    min-width: 200px;
    max-width: 240px;
  }
}

@media (max-width: 575.98px) {
  .tvp-numerotation-toolbar {
    margin-bottom: 0.65rem;
  }

  .tvp-numerotation-print-btn {
    width: 100%;
  }

  .tvp-numerotation-table-wrap {
    max-height: min(64vh, 640px);
    border-radius: 0.72rem;
  }

  .tvp-numerotation-head {
    padding: 0.46rem 0.34rem;
  }

  .tvp-numerotation-head--chaine,
  .tvp-numerotation-channel-cell {
    min-width: 184px;
    max-width: 184px;
  }

  .tvp-numerotation-head--bouquet,
  .tvp-numerotation-cell {
    min-width: 106px;
  }

  .tvp-numerotation-head-link {
    font-size: 0.66rem;
    padding: 0.31rem 0.5rem;
  }

  .tvp-numerotation-channel-link {
    gap: 0.45rem;
    min-height: 3.45rem;
    padding: 0.42rem 0.46rem;
  }

  .tvp-numerotation-logo-wrap {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.64rem;
  }

  .tvp-numerotation-logo-wrap .tvp-numerotation-logo {
    width: 1.82rem;
    height: 1.82rem;
  }

  .tvp-numerotation-channel-name {
    font-size: 0.86rem;
  }

  .tvp-numerotation-chip {
    min-width: 2.38rem;
    min-height: 1.84rem;
    font-size: 0.93rem;
    padding-inline: 0.56rem;
  }
}
