/**
 * Curelea TV — Styles principaux de l'interface (Page, Header, EPG 24h, Footer)
 * Identité Curelea.NET : sobre, atmosphérique, glassmorphism sombre.
 */

@font-face {
  font-family: "CureleaVerdana";
  src: local("Verdana Bold"),
       local("Verdana-Bold"),
       url("https://curelea.net/verdanab.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #05070b;
  --bg-elevated: #0a0f18;
  --text-main: #f8fafc;
  --text-muted: rgba(241, 245, 249, 0.66);
  --text-dim: rgba(241, 245, 249, 0.44);
  --glass-bg: rgba(10, 14, 22, 0.74);
  --glass-bg-soft: rgba(255, 255, 255, 0.032);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --live-red: #ef4444;
  --accent-emerald: #34d399;
  --accent-ice: #7dd3fc;
  --accent-amber: #fbbf24;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html,
body {
  min-height: 100vh;
  width: 100%;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Fond atmosphérique subtil */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 45% at 50% 8%, rgba(30, 52, 78, 0.30) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 90%, rgba(16, 36, 48, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #04060a 0%, #080c14 50%, #040609 100%);
}

/* En-tête : centrage symétrique du logo curelea-network.js */
.site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  padding: 2rem 1rem 1.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#curelea-header-logo {
  margin: 0 auto;
}

/* Conteneur principal */
.tv-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Bandeau ON AIR / UP NEXT */
.epg-bar {
  background: var(--glass-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.epg-slot {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.epg-slot-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.epg-slot-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.epg-slot-tag.is-live {
  color: var(--accent-emerald);
}

.epg-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.75);
}

.epg-slot-title {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-slot-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.epg-next {
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  padding-left: 1.5rem;
}

/* Grille complète des prochaines 24 heures (EPG) */
.schedule-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.55rem 1.85rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.schedule-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.schedule-header h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.schedule-tz-note {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
}

.schedule-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.schedule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 410px;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.schedule-list::-webkit-scrollbar {
  width: 6px;
}

.schedule-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.schedule-day-divider {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.65rem 0.4rem 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.schedule-day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--glass-bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 0.89rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.schedule-row.is-current {
  background: rgba(52, 211, 153, 0.10);
  border-color: rgba(52, 211, 153, 0.38);
}

.sched-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-ice);
  width: 68px;
  flex-shrink: 0;
}

.schedule-row.is-current .sched-time {
  color: var(--accent-emerald);
}

.sched-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}

.sched-badge.is-live {
  background: rgba(239, 68, 68, 0.20);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
}

.sched-badge.is-special {
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.42);
}

.sched-badge.is-module {
  background: rgba(125, 211, 252, 0.11);
  color: #bae6fd;
  border-color: rgba(125, 211, 252, 0.26);
}

.schedule-empty {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Pied de page Curelea.NET */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 1.15rem 1.5rem 2.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.15rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 15, 22, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background: #ffffff;
  color: #000000;
}

.copyright {
  width: 100%;
  text-align: center;
}

.legal-credits {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  max-width: 640px;
  line-height: 1.5;
}

.legal-credits a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-credits a:hover {
  color: #ffffff;
}

.signature-block {
  text-align: center;
}

.signature-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 0.45rem;
  margin-top: 1.65rem;
}

.signature-link {
  display: inline-block;
  text-decoration: none;
}

.signature-img {
  max-width: 110px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Accessibilité lecteur d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    padding: 1.45rem 1rem 1.25rem;
  }

  .tv-shell {
    padding: 0 0.9rem 2rem;
    gap: 1.05rem;
  }

  .epg-bar {
    grid-template-columns: 1fr;
    padding: 1.1rem 1.25rem;
    gap: 0.95rem;
  }

  .epg-next {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding-left: 0;
    padding-top: 0.9rem;
  }

  .schedule-panel {
    padding: 1.25rem 1.15rem;
  }

  .schedule-row {
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.84rem;
  }

  .sched-time {
    width: 48px;
    font-size: 0.72rem;
  }
}
