/* ==========================================================================
   tv/style.css — Pages publiques WebTV MMPB Broadcasting
   Design system public basé sur Bootstrap 5 + Bootstrap Icons
   Palette sombre professionnelle cohérente
   ========================================================================== */

/* === VARIABLES PUBLIQUES === */
:root {
  --pub-bg:            #f4f6f8;
  --pub-bg-soft:       #ffffff;
  --pub-card:          #ffffff;
  --pub-card-hover:    #f8f9fa;
  --pub-border:        rgba(15, 23, 42, 0.08);
  --pub-border-strong: rgba(15, 23, 42, 0.15);
  --pub-text:          #1a2332;
  --pub-text-soft:     #475569;
  --pub-text-mute:     #94a3b8;
  --pub-primary:       #1a5276;
  --pub-primary-hover: #2980b9;
  --pub-accent:        #e67e22;
  --pub-danger:        #c0392b;
  --pub-danger-soft:   rgba(192, 57, 43, 0.10);
  --pub-success:       #27ae60;
  --pub-success-soft:  rgba(39, 174, 96, 0.10);
  --pub-warning:       #f39c12;
  --pub-warning-soft:  rgba(243, 156, 18, 0.10);
  --pub-info-soft:     rgba(41, 128, 185, 0.10);
  --pub-radius:        0.5rem;
  --pub-radius-lg:     0.75rem;
  --pub-radius-xl:     0.875rem;
  --pub-shadow:        0 2px 12px -2px rgba(15, 23, 42, 0.08);
  --pub-shadow-lg:     0 12px 32px -8px rgba(15, 23, 42, 0.12);
  --pub-transition:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --pub-font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pub-font-heading:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pub-font-mono:     'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* === BODY / GLOBAL === */
body {
  font-family: var(--pub-font-body);
  color: var(--pub-text);
  background-color: var(--pub-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.tv-page,
body.pub-login {
  overflow-y: auto;
  height: auto;
}

/* Override custom.css overflow:hidden for public pages */
html {
  overflow: auto !important;
  height: auto !important;
}

body.tv-page,
body.pub-login {
  overflow-y: auto !important;
  height: auto !important;
}

/* === SCROLLBAR === */
body.tv-page::-webkit-scrollbar,
body.pub-login::-webkit-scrollbar {
  width: 6px;
}
body.tv-page::-webkit-scrollbar-track,
body.pub-login::-webkit-scrollbar-track {
  background: var(--pub-bg);
}
body.tv-page::-webkit-scrollbar-thumb,
body.pub-login::-webkit-scrollbar-thumb {
  background: var(--pub-border-strong);
  border-radius: 3px;
}

/* ==================================================================
   HEADER — Navbar publique Bootstrap 5
   ================================================================== */
.pub-navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--pub-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 0.5rem 0;
  z-index: 1040;
}

.pub-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 0.25rem 0;
}

.pub-navbar .pub-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--pub-radius);
  background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.pub-navbar .pub-brand-text {
  font-family: var(--pub-font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--pub-text);
  line-height: 1.1;
}

.pub-navbar .pub-brand-sub {
  font-size: 0.65rem;
  color: var(--pub-text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.pub-navbar .nav-link {
  color: var(--pub-text-soft) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pub-navbar .nav-link:hover,
.pub-navbar .nav-link:focus {
  color: var(--pub-text) !important;
  background: rgba(255, 255, 255, 0.04);
}

.pub-navbar .nav-link.active {
  color: var(--pub-primary) !important;
  background: transparent;
  font-weight: 700;
}

.pub-navbar .nav-link.active i {
  color: var(--pub-primary);
}

.pub-navbar .nav-link i {
  font-size: 1rem;
  color: var(--pub-text-mute);
  transition: color var(--pub-transition);
}

.pub-navbar .nav-link:hover i {
  color: var(--pub-text-soft);
}

.pub-navbar .navbar-toggler {
  border: 1px solid var(--pub-border);
  padding: 0.35rem 0.6rem;
  border-radius: var(--pub-radius);
  color: var(--pub-text-soft);
  transition: all var(--pub-transition);
}

.pub-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(106, 92, 248, 0.3);
  border-color: var(--pub-primary);
}

.pub-navbar .navbar-toggler-icon {
  filter: invert(0.7);
}

/* Bouton S'abonner dans la navbar */
.btn-pub-subscribe {
  background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-pub-subscribe:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}

/* ==================================================================
   FOOTER
   ================================================================== */
.pub-footer {
  background: var(--pub-primary);
  border-top: none;
  padding: 3.5rem 0 1.75rem;
  margin-top: auto;
}

.pub-footer h6 {
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.1rem;
}

.pub-footer p,
.pub-footer .pub-footer-desc {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.pub-footer .pub-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-footer .pub-footer-links li {
  margin-bottom: 0.6rem;
}

.pub-footer .pub-footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.83rem;
  text-decoration: none;
  transition: color var(--pub-transition), transform var(--pub-transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pub-footer .pub-footer-links a:hover {
  color: var(--pub-accent);
  transform: translateX(3px);
}

.pub-footer .pub-footer-links a i {
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

.pub-footer .pub-footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.7rem;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.82);
}

.pub-footer .pub-footer-contact-item i {
  color: var(--pub-accent);
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.pub-footer .pub-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--pub-border);
  color: var(--pub-text-soft);
  font-size: 0.95rem;
  transition: all var(--pub-transition);
  text-decoration: none;
}

.pub-footer .pub-footer-social a:hover {
  background: var(--pub-primary);
  border-color: var(--pub-primary);
  color: #fff;
}

.pub-footer-bottom {
  border-top: 1px solid var(--pub-border);
  padding-top: 1.25rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--pub-text-mute);
}

.pub-footer-bottom a {
  color: var(--pub-text-soft);
  text-decoration: none;
}

.pub-footer-bottom a:hover {
  color: var(--pub-accent);
}

/* ==================================================================
   MAIN CONTENT WRAPPER
   ================================================================== */
.pub-main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.pub-page-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-page-wrap-wide {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==================================================================
   CARDS
   ================================================================== */
.pub-card {
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-xl);
  padding: 1.75rem;
  box-shadow: var(--pub-shadow);
}

.pub-card + .pub-card {
  margin-top: 1.25rem;
}

.pub-card-title {
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--pub-text);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-card-title i {
  color: var(--pub-primary);
  font-size: 1.2rem;
}

.pub-card-subtitle {
  font-size: 0.82rem;
  color: var(--pub-text-mute);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ==================================================================
   FORMS
   ================================================================== */
.pub-form-group {
  margin-bottom: 1rem;
}

.pub-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pub-text-soft);
  margin-bottom: 0.4rem;
}

/* Override Bootstrap form-control for public pages */
body.tv-page .form-control,
body.pub-login .form-control,
.pub-form-control {
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  color: var(--pub-text);
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
}

body.tv-page .form-control:focus,
body.pub-login .form-control:focus,
.pub-form-control:focus {
  background: var(--pub-bg-soft);
  border-color: var(--pub-primary);
  color: var(--pub-text);
  box-shadow: 0 0 0 3px rgba(106, 92, 248, 0.15);
}

body.tv-page .form-control::placeholder,
body.pub-login .form-control::placeholder,
.pub-form-control::placeholder {
  color: var(--pub-text-mute);
}

/* Input group (icon + input) */
.pub-input-group .input-group-text {
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-right: none;
  color: var(--pub-text-mute);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
}

.pub-input-group .form-control {
  border-left: none;
}

.pub-input-group .form-control:focus {
  border-color: var(--pub-primary);
}

.pub-input-group .input-group-text + .form-control:focus {
  box-shadow: 0 0 0 3px rgba(106, 92, 248, 0.15);
}

/* Select */
body.tv-page .form-select,
body.pub-login .form-select,
.pub-form-select {
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  color: var(--pub-text);
  font-size: 0.875rem;
  padding: 0.65rem 2.25rem 0.65rem 0.85rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7299'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 10px 6px;
}

body.tv-page .form-select:focus,
body.pub-login .form-select:focus,
.pub-form-select:focus {
  background-color: var(--pub-bg-soft);
  border-color: var(--pub-primary);
  color: var(--pub-text);
  box-shadow: 0 0 0 3px rgba(106, 92, 248, 0.15);
}

body.tv-page .form-select option,
body.pub-login .form-select option {
  background: var(--pub-card);
  color: var(--pub-text);
}

/* Textarea */
.pub-form-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
  font-family: var(--pub-font-body);
}

/* Counter */
.pub-char-counter {
  font-family: var(--pub-font-mono);
  font-size: 0.72rem;
  color: var(--pub-text-mute);
  text-align: right;
  margin-top: 0.3rem;
}

/* ==================================================================
   BOUTONS
   ================================================================== */
.btn-pub-primary {
  background: linear-gradient(135deg, var(--pub-primary), #8b7df8);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-pub-primary:hover {
  background: linear-gradient(135deg, var(--pub-primary-hover), #9b8ff9);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(106, 92, 248, 0.5);
}

.btn-pub-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-pub-danger {
  background: linear-gradient(135deg, var(--pub-danger), #e0234a);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
}

.btn-pub-danger:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(251, 61, 94, 0.5);
}

.btn-pub-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-pub-outline {
  background: transparent;
  border: 1px solid var(--pub-border-strong);
  color: var(--pub-text-soft);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--pub-radius);
  transition: all var(--pub-transition);
}

.btn-pub-outline:hover {
  color: var(--pub-text);
  border-color: var(--pub-primary);
  background: rgba(106, 92, 248, 0.08);
}

.btn-pub-link {
  background: none;
  border: none;
  color: var(--pub-primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  transition: color var(--pub-transition);
}

.btn-pub-link:hover {
  color: var(--pub-accent);
  text-decoration: underline;
}

/* ==================================================================
   ALERTS / MESSAGES
   ================================================================== */
.pub-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--pub-radius);
  font-size: 0.82rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.pub-alert i {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
}

.pub-alert-success {
  background: var(--pub-success-soft);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--pub-success);
}

.pub-alert-error {
  background: var(--pub-danger-soft);
  border: 1px solid rgba(251, 61, 94, 0.25);
  color: var(--pub-danger);
}

.pub-alert-info {
  background: var(--pub-info-soft);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--pub-accent);
}

/* ==================================================================
   SPECTATEUR BADGE
   ================================================================== */
.tv-spectator-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 1rem;
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  font-size: 0.82rem;
  color: var(--pub-text-soft);
}

.tv-spectator-badge strong {
  color: var(--pub-text);
  font-family: var(--pub-font-heading);
  font-weight: 700;
}

.tv-spectator-logout {
  background: none;
  border: none;
  color: var(--pub-text-mute);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 4px;
  transition: color var(--pub-transition);
}

.tv-spectator-logout:hover {
  color: var(--pub-danger);
}

/* ==================================================================
   STEPS (sabonner)
   ================================================================== */
.tv-step {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.tv-step.is-active {
  display: flex;
}

.tv-step-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--pub-text-soft);
  padding: 0.75rem 0 0;
  margin-top: 0.5rem;
  border-top: 1px dashed var(--pub-border);
}

/* ==================================================================
   CHANNELS LIST (sabonner)
   ================================================================== */
.tv-channels-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tv-channel-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  cursor: pointer;
  transition: all var(--pub-transition);
  user-select: none;
}

.tv-channel-option:hover {
  border-color: var(--pub-border-strong);
  background: var(--pub-card-hover);
}

.tv-channel-option.selected {
  border-color: var(--pub-primary);
  background: rgba(106, 92, 248, 0.08);
  box-shadow: 0 0 0 1px var(--pub-primary);
}

.tv-channel-option-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--pub-radius);
  background: var(--pub-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pub-font-mono);
  font-size: 0.85rem;
  color: var(--pub-text-soft);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--pub-border);
}

.tv-channel-option-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-channel-option-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-channel-option-name {
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pub-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-channel-option-meta {
  font-family: var(--pub-font-mono);
  font-size: 0.68rem;
  color: var(--pub-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tv-channel-option-badge {
  font-family: var(--pub-font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pub-warning-soft);
  color: var(--pub-warning);
  border: 1px solid rgba(247, 165, 49, 0.2);
  flex-shrink: 0;
}

/* ==================================================================
   REVIEWS (avis)
   ================================================================== */
.tv-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tv-review-item {
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color var(--pub-transition);
}

.tv-review-item:hover {
  border-color: var(--pub-border-strong);
}

.tv-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.25rem;
}

.tv-review-pseudo {
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--pub-accent);
  letter-spacing: 0.01em;
}

.tv-review-date {
  font-family: var(--pub-font-mono);
  font-size: 0.7rem;
  color: var(--pub-text-mute);
  letter-spacing: 0.04em;
}

.tv-review-channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pub-font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pub-text-soft);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(106, 92, 248, 0.08);
  border: 1px solid rgba(106, 92, 248, 0.15);
}

.tv-review-content {
  font-size: 0.85rem;
  color: var(--pub-text);
  line-height: 1.6;
  word-break: break-word;
}

.tv-reviews-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--pub-text-mute);
}

/* ==================================================================
   SUBSCRIPTIONS LIST
   ================================================================== */
.tv-sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tv-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
}

.tv-sub-item-name {
  font-family: var(--pub-font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--pub-text);
}

.tv-sub-item-expires {
  font-family: var(--pub-font-mono);
  font-size: 0.7rem;
  color: var(--pub-text-soft);
}

.tv-sub-item-expires.is-soon {
  color: var(--pub-warning);
}

.tv-sub-item-expires.is-expired {
  color: var(--pub-danger);
}

.tv-sub-status {
  font-family: var(--pub-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.tv-sub-status.is-active {
  background: var(--pub-success-soft);
  color: var(--pub-success);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.tv-sub-status.is-expired {
  background: var(--pub-danger-soft);
  color: var(--pub-danger);
  border: 1px solid rgba(251, 61, 94, 0.25);
}

/* ==================================================================
   JS-GENERATED MESSAGE CLASSES (compat)
   Ces classes sont assignees dynamiquement par le JS existant.
   ================================================================== */
.tv-success,
.tv-error,
.tv-info-box {
  padding: 0.85rem 1rem;
  border-radius: var(--pub-radius);
  font-size: 0.82rem;
  font-family: var(--pub-font-body);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.tv-success {
  background: var(--pub-success-soft);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--pub-success);
}

.tv-error {
  background: var(--pub-danger-soft);
  border: 1px solid rgba(251, 61, 94, 0.25);
  color: var(--pub-danger);
}

.tv-info-box {
  background: var(--pub-info-soft);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--pub-accent);
}

.tv-success-icon,
.tv-error-icon,
.tv-info-icon {
  font-family: var(--pub-font-mono);
  font-weight: 700;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  line-height: 1;
}

.tv-success-icon {
  background: var(--pub-success);
  color: var(--pub-bg);
}

.tv-error-icon {
  background: var(--pub-danger);
  color: #fff;
}

.tv-info-icon {
  background: var(--pub-accent);
  color: #fff;
}

/* ==================================================================
   LOGIN PAGE SPECIFIC
   ================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pub-bg);
  font-family: var(--pub-font-body);
}

.pub-main-centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-xl);
  box-shadow: var(--pub-shadow-lg);
  padding: 2rem 1.75rem;
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-brand .brand-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--pub-radius);
  background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 16px -4px rgba(106, 92, 248, 0.4);
}

.login-brand .brand-title {
  font-family: var(--pub-font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pub-text);
}

.login-brand .brand-sub {
  font-size: 0.72rem;
  color: var(--pub-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pub-text-soft);
  margin-bottom: 0.4rem;
}

.login-form input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  color: var(--pub-text);
  font-family: var(--pub-font-body);
  font-size: 0.875rem;
  transition: border-color var(--pub-transition), box-shadow var(--pub-transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--pub-primary);
  box-shadow: 0 0 0 3px rgba(106, 92, 248, 0.15);
}

.login-form input::placeholder {
  color: var(--pub-text-mute);
}

.form-error {
  background: var(--pub-danger-soft);
  border: 1px solid rgba(251, 61, 94, 0.25);
  color: var(--pub-danger);
  padding: 0.75rem 1rem;
  border-radius: var(--pub-radius);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  width: 100%;
  padding: 0.72rem;
  background: linear-gradient(135deg, var(--pub-primary), #8b7df8);
  border: none;
  border-radius: var(--pub-radius);
  color: #fff;
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 16px -4px rgba(106, 92, 248, 0.45);
  transition: transform var(--pub-transition), box-shadow var(--pub-transition);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(106, 92, 248, 0.55);
}

.btn-login:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==================================================================
   TV FORM ELEMENTS (compat with JS-generated HTML)
   ================================================================== */
.tv-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tv-form-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pub-text-soft);
}

.tv-form-input,
.tv-form-select,
.tv-form-textarea {
  width: 100%;
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  padding: 0.65rem 0.85rem;
  color: var(--pub-text);
  font-family: var(--pub-font-body);
  font-size: 0.875rem;
  transition: border-color var(--pub-transition), box-shadow var(--pub-transition);
}

.tv-form-input::placeholder,
.tv-form-textarea::placeholder {
  color: var(--pub-text-mute);
}

.tv-form-input:focus,
.tv-form-select:focus,
.tv-form-textarea:focus {
  border-color: var(--pub-primary);
  box-shadow: 0 0 0 3px rgba(106, 92, 248, 0.15);
  outline: none;
}

.tv-form-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.tv-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7299'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2rem;
}

.tv-form-select option {
  background: var(--pub-card);
  color: var(--pub-text);
}

.tv-form-counter {
  font-family: var(--pub-font-mono);
  font-size: 0.72rem;
  color: var(--pub-text-mute);
  text-align: right;
  letter-spacing: 0.02em;
}

.tv-form-counter.is-warn {
  color: var(--pub-warning);
}

.tv-form-counter.is-limit {
  color: var(--pub-danger);
  font-weight: 600;
}

/* ==================================================================
   TV BUTTONS (compat with JS)
   ================================================================== */
.tv-btn {
  width: 100%;
  padding: 0.72rem 1rem;
  background: linear-gradient(135deg, var(--pub-primary), #8b7df8);
  border: none;
  border-radius: var(--pub-radius);
  color: #fff;
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 16px -4px rgba(106, 92, 248, 0.4);
  transition: transform var(--pub-transition), opacity var(--pub-transition), box-shadow var(--pub-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(106, 92, 248, 0.55);
}

.tv-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tv-btn-link {
  background: none;
  border: none;
  padding: 6px 2px;
  color: var(--pub-primary);
  font-family: var(--pub-font-body);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: color var(--pub-transition);
}

.tv-btn-link:hover {
  color: var(--pub-accent);
  text-decoration: underline;
}

/* ==================================================================
   TV CARD (compat with JS class references)
   ================================================================== */
.tv-card {
  background: var(--pub-card);
  border: 1px solid var(--pub-border-strong);
  border-radius: var(--pub-radius-xl);
  padding: 1.75rem;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.10);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow var(--pub-transition), transform var(--pub-transition);
}

.tv-card:hover {
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.14);
}

.tv-card-title {
  font-family: var(--pub-font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--pub-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tv-card-subtitle {
  font-size: 0.82rem;
  color: var(--pub-text-mute);
  line-height: 1.5;
}

/* ==================================================================
   BACK LINK
   ================================================================== */
.tv-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  color: var(--pub-text-soft);
  font-size: 0.82rem;
  text-decoration: none;
  transition: all var(--pub-transition);
}

.tv-back-link:hover {
  color: var(--pub-text);
  border-color: var(--pub-primary);
  background: rgba(106, 92, 248, 0.06);
}

/* ==================================================================
   HERO SECTION (sabonner)
   ================================================================== */
.pub-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.pub-hero h1 {
  font-family: var(--pub-font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--pub-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.pub-hero p {
  font-size: 0.95rem;
  color: var(--pub-text-soft);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* Steps visual */
.pub-steps-visual {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pub-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  max-width: 140px;
}

.pub-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pub-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pub-text);
  line-height: 1.4;
}

.pub-step-desc {
  font-size: 0.7rem;
  color: var(--pub-text-mute);
  line-height: 1.4;
}

/* ==================================================================
   PAGE HEADER (old tv-header — kept for compat but restyled)
   ================================================================== */
.tv-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--pub-border);
  margin-bottom: 0.5rem;
}

.tv-header .tv-header-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--pub-radius);
  background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(106, 92, 248, 0.4);
  flex-shrink: 0;
}

.tv-header .tv-header-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.tv-header .tv-header-title .brand {
  font-family: var(--pub-font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--pub-text);
  line-height: 1;
}

.tv-header .tv-header-title .page-title {
  font-family: var(--pub-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pub-text);
  line-height: 1.2;
}

.tv-header .tv-header-title .breadcrumb {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pub-text-mute);
  font-weight: 500;
}

/* ==================================================================
   INFO BOX
   ================================================================== */
.tv-info-box {
  padding: 0.85rem 1rem;
  border-radius: var(--pub-radius);
  font-size: 0.82rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  background: var(--pub-info-soft);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--pub-accent);
}

.tv-info-box .tv-info-icon {
  background: var(--pub-accent);
  color: #fff;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 767.98px) {
  .pub-hero h1 {
    font-size: 1.5rem;
  }

  .pub-hero {
    padding: 1.5rem 1rem 1.25rem;
  }

  .pub-steps-visual {
    gap: 1.25rem;
  }

  .pub-footer {
    padding: 2rem 0 1rem;
  }

  .pub-main {
    padding: 1.5rem 0 2rem;
  }

  .pub-card,
  .tv-card,
  .login-card {
    padding: 1.25rem 1.15rem;
  }
}

@media (max-width: 575.98px) {
  .pub-page-wrap,
  .pub-page-wrap-wide {
    padding: 0 0.75rem;
  }

  .pub-hero h1 {
    font-size: 1.3rem;
  }

  .pub-step-item {
    max-width: 100px;
  }

  .pub-step-number {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .pub-step-label {
    font-size: 0.72rem;
  }
}
