/*
Theme Name: RigarduMás
Theme URI: https://rigardumas.com/
Author: RigarduMás
Description: Thème média sombre, blanc et or, conçu pour les plugins RigarduMás (direct, guide TV, fiches chaînes). Aucun flux vidéo : chaque chaîne renvoie vers son lecteur officiel.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: rigardumas
*/

:root {
	--bg: #0c0e10;
	--panel: #171a1e;
	--panel2: #20242a;
	--line: #2d3136;
	--gold: #ddbd70;
	--gold-hi: #f0d48e;
	--text: #f4f3ee;
	--muted: #aeb4bc;
	--green: #8ccead;
	--radius: 8px;
	--wrap: 1280px;
	--header: 72px;
	color-scheme: dark;
	font: 15px/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
h2 { font-size: clamp(21px, 2.2vw, 27px); font-weight: 750; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: #151511; padding: 10px 14px; border-radius: 6px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12, 14, 16, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 34px; height: var(--header); }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: .02em; padding: 6px 11px; background: #15171a; border: 1px solid #25282c; border-radius: 4px; white-space: nowrap; }
.brand .mas { color: var(--gold); border-left: 1px solid var(--gold); margin-left: 4px; padding-left: 4px; }
.brand img { height: 34px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: #dfe3e6; padding: 24px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.main-nav .live-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 2px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; height: 40px; }
.header-search input { background: none; border: 0; color: var(--text); width: 210px; font: inherit; font-size: 14px; }
.header-search input::placeholder { color: #8d949b; }
.header-search svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* ── Bottom tab bar (mobile) ────────────────────────────── */
.tabbar { display: none; }

/* ── Buttons, badges ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 6px; border: 1px solid #ffffff3d; background: #ffffff0d; color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffffff1a; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #191914; }
.btn-primary:hover { background: var(--gold-hi); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; background: #ffffff14; color: #e8eaec; }
.badge-live { background: var(--gold); color: #171710; }
.badge-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #171710; }
.badge-free { background: #8ccead26; color: var(--green); }
.badge-login { background: #8fb6ff22; color: #a9c6ff; }
.badge-pay { background: #ddbd7026; color: var(--gold); }
.eyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-link { color: var(--gold); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
.page-head { padding: 40px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head p { color: var(--muted); max-width: 62ch; margin: 0; }
.breadcrumbs { padding-top: 22px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }

/* ── Hero (accueil) ─────────────────────────────────────── */
.hero { position: relative; min-height: 430px; display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); background: #0a0b0d; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0c0e10f2 0%, #0c0e10c4 38%, #0c0e1030 75%), linear-gradient(0deg, #0c0e10 0%, transparent 45%); }
.hero .wrap { position: relative; z-index: 1; padding: 64px 0 44px; }
.hero-copy { max-width: 600px; }
.hero h1 { margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #d7dbdf; font-size: 14px; margin-bottom: 14px; }
.hero-meta .chan-logo { height: 26px; width: auto; max-width: 80px; background: #fff; border-radius: 3px; padding: 3px 6px; object-fit: contain; }
.hero p.lede { color: #d6dbe0; font-size: 17px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.country-bar { border-bottom: 1px solid var(--line); }
.country-bar .wrap { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 22px; min-height: 50px; font-size: 14px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.country-bar .wrap::-webkit-scrollbar { display: none; }
.country-bar a { flex: none; }
.country-bar .eyebrow { margin: 0; font-size: 10px; color: var(--muted); }
.country-bar a { text-decoration: none; color: #dfe3e6; }
.country-bar a:hover { color: var(--gold); }

/* ── Cartes chaînes (grille thème) ──────────────────────── */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.channel-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; text-align: center; font-size: 14px; font-weight: 600; transition: border-color .15s, transform .15s; }
.channel-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.channel-tile .rgdt-logo { width: 100%; height: 54px; display: grid; place-items: center; background: #fff; border-radius: 4px; padding: 6px 10px; }
.channel-tile .rgdt-logo img { max-height: 42px; max-width: 100%; object-fit: contain; }
.channel-tile .badge { font-size: 9px; }

.progress { height: 3px; background: #ffffff26; border-radius: 3px; overflow: hidden; width: 100%; max-width: 360px; }
.progress span { display: block; height: 100%; background: var(--gold); }
.times { display: flex; justify-content: space-between; width: 100%; max-width: 360px; font-size: 12px; color: var(--muted); }
.about-channel { color: #d6dbe0; max-width: 70ch; }

/* Logos : les fichiers sont souvent carrés avec marges ; on contraint l'image, pas le cadre */
.rgdt-logo img, .hero-meta .chan-logo { width: auto !important; height: auto !important; }
.rgdt-logo { overflow: hidden; }
.channel-tile .rgdt-logo img { max-width: 100%; max-height: 42px; }
.hero-meta .chan-logo { max-height: 26px; max-width: 80px; }

/* ── Emplacements publicitaires ─────────────────────────── */
.ad-slot { margin: 26px auto; min-height: 120px; display: grid; place-items: center; border: 1px dashed #3a3f45; border-radius: var(--radius); color: #7d858d; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: #111316; }
.ad-slot.rect { min-height: 280px; }

/* ── Contenu générique / plugins ────────────────────────── */
.entry-content { min-height: 30vh; }
.entry-content > * { max-width: 100%; }
.site-main { padding-bottom: 40px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #0a0b0d; padding: 40px 0 28px; color: var(--muted); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
.footer-cols h3 { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-cols a { text-decoration: none; color: var(--muted); }
.footer-cols a:hover { color: #fff; }
.legal { border-top: 1px solid var(--line); padding-top: 18px; font-size: 12px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
	.header-search input { width: 150px; }
}
@media (max-width: 860px) {
	:root { --header: 60px; }
	.main-nav, .header-search { display: none; }
	.site-header .wrap { gap: 12px; }
	.brand { font-size: 17px; }
	.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; background: #0c0e10f5; backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
	.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; text-decoration: none; font-size: 11px; color: #c9ced3; }
	.tabbar a[aria-current="page"] { color: var(--gold); }
	.tabbar svg { width: 21px; height: 21px; }
	body { padding-bottom: 64px; }
	.footer-cols { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
	.wrap { width: calc(100% - 32px); }
	.country-bar .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
	.country-bar .wrap::-webkit-scrollbar { display: none; }
	.hero { min-height: 380px; }
	.hero::after { background: linear-gradient(0deg, #0c0e10 0%, #0c0e10d9 50%, #0c0e1033 100%); }
	.hero p.lede { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
