/* Explain: Styles for UI components like buttons, badges, and cards. */
/* ===== Boutons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.75rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47, 125, 255, 0.32);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.75rem 1.35rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.btn-ghost:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-icon:hover {
    border-color: var(--primary-color);
    background: var(--surface-2);
}

.btn-icon.is-followed {
    border-color: var(--live-color);
    color: var(--live-color);
}

/* ===== Badges, puces, tags ===== */
.badge-live,
.badge-vod {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.badge-live {
    background: var(--live-color);
    color: #ffffff;
}

.badge-vod {
    background: rgba(7, 11, 20, 0.78);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
}

.badge-live i,
.live-dot {
    font-size: 0.5rem;
    animation: livePulse 1.6s ease-in-out infinite;
}

.live-dot {
    color: var(--live-color);
}

@keyframes livePulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip:hover {
    color: var(--text-color);
    border-color: var(--primary-color);
}

.chip-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===== Cartes chaîne ===== */
.channel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.channel-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

.channel-media .media-img,
.replay-media .media-img {
    transition: transform 0.5s ease;
}

.channel-card:hover .channel-media .media-img,
.replay-card:hover .replay-media .media-img {
    transform: scale(1.07);
}

.channel-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 20, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.channel-media:hover .channel-overlay,
.replay-media:hover .channel-overlay {
    opacity: 1;
}

.channel-overlay i {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1.2rem;
}

.channel-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
}

.channel-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.channel-meta {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.channel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.65rem;
}

.viewers {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Cartes replay ===== */
.replay-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.replay-card:hover,
.replay-card.is-active {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.replay-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

.replay-duration {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    z-index: 2;
    padding: 0.22rem 0.5rem;
    border-radius: 8px;
    background: rgba(7, 11, 20, 0.85);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
}

.replay-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
}

.replay-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.replay-meta {
    display: block;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Lecteur vidéo ===== */
.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow-soft);
}

.player-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
}

/* ===== Grille du jour ===== */
.schedule-item {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.schedule-item:last-child {
    border-bottom: 0;
}

.schedule-time {
    min-width: 58px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.schedule-title {
    font-size: 0.92rem;
}

.schedule-item.is-now {
    padding-left: 0.75rem;
    border-left: 3px solid var(--live-color);
}

.schedule-item.is-now .schedule-time,
.schedule-item.is-now .schedule-title {
    color: var(--accent-color);
    font-weight: 700;
}

/* ===== Hero & bandeau communauté ===== */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-eyebrow i {
    color: var(--live-color);
    font-size: 0.55rem;
    animation: livePulse 1.6s ease-in-out infinite;
}

.text-gradient {
    background: linear-gradient(100deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-box {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.community-band {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, rgba(47, 125, 255, 0.18), rgba(124, 77, 255, 0.14));
}

.mini-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.mini-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.mini-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

/* ===== Vignettes chaînes secondaires ===== */
.channel-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    text-align: center;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.channel-tile:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.channel-tile-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-fit: cover;
}

.channel-tile-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.channel-tile-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Bandeau hero avec photo de fond ===== */
.hero-band {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-band-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-band-bg {
    position: absolute;
    inset: 0;
    display: block;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.hero-band-bg.is-active {
    opacity: 0.34;
}

.hero-band::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.55) 0%, rgba(7, 11, 20, 0.82) 60%, var(--background-color) 100%);
}

/* ===== Bannière promotionnelle ===== */
.promo-banner {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.promo-banner:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.promo-banner-img {
    display: block;
    width: 100%;
    height: auto;
}