/* ===== Thème « streaming sombre » ===== */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080c; --bg-2: #0c0e14; --card: #11141c; --card-2: #181c26;
  --line: #20253180; --line-solid: #222735; --line-2: #2e3445;
  --text: #f3f4f8; --muted: #8b93a7; --dim: #7d859a;
  --accent: #ff2e63; --accent-2: #ff8a3d; --accent-soft: rgba(255, 46, 99, .14); --accent-text: #ff7a99;
  /* Dégradé de marque assez soutenu pour que le texte blanc posé dessus reste net (contraste ≥ 4,5) */
  --grad: linear-gradient(135deg, #e11d48 0%, #c2410c 100%);
  --ok: #22c55e; --ok-text: #4ade80; --off: #4a5163; --danger: #ef4444; --warn: #f5a524;
  --radius: 16px; --radius-sm: 10px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc; --bg-2: #ffffff; --card: #ffffff; --card-2: #f1f5f9;
  --line: #e2e8f0; --line-solid: #cbd5e1; --line-2: #cbd5e1;
  --text: #090d16; --muted: #475569; --dim: #64748b;
  --ok-text: #15803d;
  /* Couleurs de texte foncées en mode clair : les teintes pâles du thème sombre y sont illisibles */
  --accent: #e11d48; --accent-text: #be123c; --accent-soft: rgba(255, 46, 99, .08); --warn: #b45309; --err-text: #b91c1c;
}
:root { --err-text: #fca5a5; }
[data-theme="light"] button.danger { color: #b91c1c; border-color: #fca5a5; }
[data-theme="light"] .note { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
[data-theme="light"] .badge.pending { background: #fef3c7; color: #b45309; }
[data-theme="light"] .badge.err { background: #fee2e2; color: #b91c1c; }
[data-theme="light"] .badge.ok { background: #dcfce7; }
[data-theme="light"] .status-icon.err,
[data-theme="light"] .check-stats .off b { color: #b91c1c; }
[data-theme="light"] .eyebrow { color: #9f1239; }
[data-theme="light"] .chips li { color: var(--text); }
/* Survols en mode clair : fonds clairs, texte toujours foncé et lisible */
[data-theme="light"] button.secondary:hover, [data-theme="light"] .button.secondary:hover { background: #e2e8f0; border-color: #94a3b8; color: var(--text); }
[data-theme="light"] button.danger:hover { background: #fee2e2; }
[data-theme="light"] .tabs button:hover { background: var(--card-2); }
[data-theme="light"] tbody tr:hover td { background: #f8fafc; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1000px 460px at 50% -160px, rgba(255, 46, 99, .2), transparent 70%), var(--bg) no-repeat;
  color: var(--text); overflow-x: clip;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 72px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; background: var(--card-2); border: 1px solid var(--line-solid); padding: 2px 7px; border-radius: 6px; word-break: break-all; }
code.small { font-size: 12px; }
.muted { color: var(--muted); font-size: 13.5px; }
.center { text-align: center; margin: 0; }
.icon { flex: none; vertical-align: -3px; }
::selection { background: rgba(255, 46, 99, .35); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ===== Boutons ===== */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: var(--radius-sm);
  background: var(--grad); color: #fff; font: inherit; font-weight: 600; line-height: 1.3;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 24px -12px rgba(255, 46, 99, .8);
  transition: filter .15s, transform .15s, background-color .15s, border-color .15s;
}
button:hover, .button:hover { filter: brightness(.92); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button.secondary, .button.secondary { background: var(--card-2); border: 1px solid var(--line-2); color: var(--text); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { background: #20252f; filter: none; }
.button.ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.button.ghost:hover { background: rgba(255, 255, 255, .1); filter: none; }
button.danger { background: transparent; border: 1px solid rgba(239, 68, 68, .45); color: #fca5a5; box-shadow: none; }
button.danger:hover { background: rgba(239, 68, 68, .12); filter: none; }
button.big, .button.big { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.button.small, button.small { padding: 7px 14px; font-size: 14px; }
button.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
button:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Formulaires ===== */
input, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--dim); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 46, 99, .18); }
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
}
select option { background: var(--card); }
label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 400; font-size: 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }

/* ===== Blocs ===== */
.card { background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.flash { background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .35); color: #bfdbfe; padding: 11px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; }
.flash.err { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fecaca; }
[data-theme="light"] .flash { background: #eff6ff; border-color: #93c5fd; color: #1e40af; font-weight: 500; }
[data-theme="light"] .flash.err { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
[data-theme="light"] .flash.ok { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.warn { color: var(--warn); font-size: 13px; }
.note { margin: 20px 0; padding: 14px 16px; border-radius: 12px; background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .3); color: #fde4b0; font-size: 14px; }
.note code { background: rgba(0, 0, 0, .3); border-color: rgba(245, 165, 36, .3); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: rgba(34, 197, 94, .14); color: var(--ok-text); }
.badge.pending { background: rgba(245, 165, 36, .14); color: #fbbf24; }
.badge.err { background: rgba(239, 68, 68, .14); color: #f87171; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.actions form.extend { display: flex; gap: 6px; }
select.small { width: auto; padding: 6px 32px 6px 10px; font-size: 13px; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; margin: 0 0 14px; align-items: baseline; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; min-width: 0; }

/* ===== En-tête et pied de page ===== */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(7, 8, 12, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand.small { font-size: 15px; }
.brand.small .brand-mark { width: 24px; height: 24px; }
.links { display: flex; align-items: center; gap: 4px; }
.links a:not(.button) { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.links a:not(.button):hover, .links a.current { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }
.links .button { margin-left: 6px; }
.site-footer { border-top: 1px solid var(--line-solid); background: var(--bg-2); padding: 26px 0; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a:not(.brand) { color: var(--muted); }
.site-footer a:not(.brand):hover { color: var(--text); }

/* ===== Accueil ===== */
.hero { text-align: center; padding: 44px 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #ffd0db; background: var(--accent-soft); border: 1px solid rgba(255, 46, 99, .3); padding: 6px 14px; border-radius: 99px; margin-bottom: 22px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 46, 99, .6); } 70% { box-shadow: 0 0 0 9px rgba(255, 46, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 46, 99, 0); } }
.hero h1 { font-size: clamp(34px, 6.4vw, 62px); line-height: 1.04; letter-spacing: -.04em; margin: 0 auto 20px; max-width: 860px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 600px; margin: 0 auto 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }
.hero-stats { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 640px; border: 1px solid var(--line-solid); border-radius: var(--radius); background: rgba(17, 20, 28, .75); }
.hero-stats li { padding: 16px 10px; display: flex; flex-direction: column; }
.hero-stats li + li { border-left: 1px solid var(--line-solid); }
.hero-stats b { font-size: clamp(20px, 3.6vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: var(--muted); }

.section { margin: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 24px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin: 0; }
.section-head p { margin: 0; }

.genres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.genre {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(150deg, var(--g1), var(--g2));
  transition: transform .2s;
}
.genre:hover { transform: translateY(-3px); }
.genre::before { content: ""; position: absolute; right: -18%; top: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.genre::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 65%); }
.genre b, .genre span { position: relative; z-index: 1; }
.genre b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.genre span { font-size: 13px; color: rgba(255, 255, 255, .78); }
.genre:nth-child(8n+1) { --g1: #5b1230; --g2: #ff2e63; }
.genre:nth-child(8n+2) { --g1: #13285a; --g2: #3b82f6; }
.genre:nth-child(8n+3) { --g1: #4a1d5e; --g2: #a855f7; }
.genre:nth-child(8n+4) { --g1: #0f3d33; --g2: #10b981; }
.genre:nth-child(8n+5) { --g1: #5a2a0c; --g2: #f97316; }
.genre:nth-child(8n+6) { --g1: #0e3a4a; --g2: #06b6d4; }
.genre:nth-child(8n+7) { --g1: #4a1438; --g2: #ec4899; }
.genre:nth-child(8n+8) { --g1: #3d3a0e; --g2: #eab308; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step { background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 22px; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Commande */
.order-card { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.order-card > .order { padding: 28px; }
.order-side { padding: 28px; background: linear-gradient(160deg, rgba(255, 46, 99, .13), rgba(255, 138, 61, .04) 60%); border-left: 1px solid var(--line-solid); }
.order-side h3 { margin-bottom: 16px; }
.order { display: flex; flex-direction: column; gap: 16px; }
.order h2 { margin: 0; font-size: 22px; font-weight: 800; }
.order .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order .row[hidden] { display: none; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 8px; }
.plan {
  position: relative; background: var(--bg-2); color: var(--text); border: 1.5px solid var(--line-2); border-radius: 12px;
  padding: 16px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: none; font-weight: 400; white-space: normal;
}
.plan:hover { border-color: #4a5163; filter: none; }
.plan span { font-size: 13px; color: var(--muted); }
.plan b { font-size: 18px; font-weight: 800; }
.plan small { font-size: 12px; color: var(--muted); }
.plan.active { border-color: var(--accent); background: rgba(255, 46, 99, .08); box-shadow: 0 0 0 3px rgba(255, 46, 99, .15); }
.plan .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; background: var(--grad); color: #fff; padding: 3px 8px; border-radius: 99px; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--ok-text); background: rgba(34, 197, 94, .14); border-radius: 50%; padding: 3px; margin-top: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-2); color: #c9cedb; }
.side-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }

.apps { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.apps-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.apps h2 { margin-bottom: 6px; }
.apps p { color: var(--muted); margin-bottom: 14px; }

/* ===== Pages simples (commande, retrouver, connexion) ===== */
.narrow { max-width: 620px; margin: 20px auto; }
.narrow h1 { font-size: 26px; margin-bottom: 8px; }
.narrow > p { color: var(--muted); }
.narrow .order { margin-top: 20px; }
.status-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; background: var(--accent-soft); color: var(--accent-text); }
.status-icon.ok { background: rgba(34, 197, 94, .14); color: var(--ok-text); }
.status-icon.err { background: rgba(239, 68, 68, .14); color: #f87171; }
.status-icon.wait .icon { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-title { color: var(--text); }
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line-solid); }
.creds { background: var(--bg-2); border: 1px solid var(--line-solid); border-radius: 12px; padding: 16px; margin: 20px 0 16px; }
.creds code { background: var(--card); }
.creds dd { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.creds dl { margin: 0; }
.copy-mini { padding: 5px 8px; border-radius: 7px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); box-shadow: none; font-size: 12px; font-weight: 500; }
.copy-mini:hover { color: var(--text); background: var(--card-2); filter: none; }
.howto { list-style: none; counter-reset: howto; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.howto li { counter-increment: howto; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.howto li::before { content: counter(howto); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--accent-text); }
.narrow h2 { margin-top: 28px; }
.below { margin-top: 18px; }

/* ===== Lecteur web ===== */
.page-watch main { max-width: 1440px; padding-top: 20px; }
.page-watch .wrap { max-width: 1440px; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.player { position: sticky; top: 80px; z-index: 5; background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(255, 46, 99, .35); }
.screen { position: relative; background: #000; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; display: block; background: #000; }
.screen video[hidden] { display: none !important; }
/* Qualité adaptative : la nouvelle version démarre par-dessus, le temps que le lecteur principal la reprenne */
.screen #video-next { position: absolute; inset: 0; pointer-events: none; }
.screen video::-webkit-media-controls-loading-indicator { display: none !important; }
.screen iframe { width: 100%; height: 100%; display: block; border: none; background: #000; }
.screen iframe[hidden] { display: none !important; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: #c9cedb; font-size: 15px; text-align: center; padding: 16px; pointer-events: none; background: radial-gradient(circle at center, rgba(255, 46, 99, .14), transparent 60%); }
.overlay[hidden] { display: none; }
.overlay .icon { color: var(--accent); width: 44px; height: 44px; }
.overlay.loading { background: #0a0d14; z-index: 5; }
.overlay.loading .icon { display: none; }
.overlay.loading::before { content: ""; width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.overlay.error .icon { color: #f87171; }
.now { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.now-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.now-title > div { min-width: 0; display: flex; flex-direction: column; }
.now-title b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-title .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; }
.live-badge[hidden] { display: none; }
#now-mode { flex: none; font-size: 12px; }
.browser { background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search-box input { padding-left: 40px; }
.pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pickers select { min-width: 0; text-overflow: ellipsis; }
.q-badge { flex: none; margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; line-height: 1; padding: 4px 6px; border-radius: 5px; border: 1px solid; vertical-align: 2px; }
.q-sd { color: #9aa3b5; border-color: #3a4152; }
.q-hd { color: #60a5fa; border-color: rgba(96, 165, 250, .45); background: rgba(96, 165, 250, .08); }
.q-fhd { color: #c084fc; border-color: rgba(192, 132, 252, .45); background: rgba(192, 132, 252, .08); }
.q-4k { color: #fff; border-color: transparent; background: var(--grad); }
.now-title .q-badge { margin-left: 6px; }
.channels { list-style: none; margin: 0 -6px; padding: 4px 6px 0; max-height: calc(100vh - 340px); min-height: 280px; overflow-y: auto; border-top: 1px solid var(--line-solid); }
.channels li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.channels li:hover { background: var(--card-2); }
.channels li.active { background: rgba(255, 46, 99, .14); box-shadow: inset 0 0 0 1px rgba(255, 46, 99, .45); }
.channels li.empty { cursor: default; color: var(--muted); justify-content: center; padding: 28px 8px; }
.channels li.empty:hover { background: none; }
/* Logo : fond clair (la plupart des logos sont prévus pour un fond blanc), icône TV en attendant ou à défaut */
.ch-logo { position: relative; flex: none; width: 56px; height: 40px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; color: var(--dim); background: var(--card-2); border: 1px solid var(--line-2); }
.ch-logo img { position: absolute; inset: 4px 6px; width: calc(100% - 12px); height: calc(100% - 8px); object-fit: contain; opacity: 1; transition: opacity .2s; }
.ch-logo:has(img) { background: #eef0f4; border-color: transparent; }
.ch-logo.has-img { background: #eef0f4; border-color: transparent; }
.ch-logo.has-img.dark-bg, .ch-logo.dark-bg { background: #232837; border-color: var(--line-2); }
.ch-logo.has-img img { opacity: 1; }
.channels li.active .ch-logo:not(.has-img) { color: var(--accent-text); border-color: rgba(255, 46, 99, .45); }
.ch-logo.cover img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-logo.cover.has-img { background: #000; }
.now-title .ch-logo { width: 64px; height: 44px; }

/* Onglets TV / Films / Radios */
.channels li.back { color: var(--accent-text); border-bottom: 1px solid var(--line-solid); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.channels li.back small { color: var(--muted); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-solid); border-radius: 12px; }
.tabs button { background: transparent; color: var(--muted); box-shadow: none; padding: 8px 4px; font-size: 13.5px; gap: 5px; border-radius: 9px; }
.tabs button:hover { color: var(--text); filter: none; background: rgba(255, 255, 255, .04); }
.tabs button[aria-selected="true"] { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs button[aria-selected="true"] .icon { color: var(--accent); }
.pickers[hidden] { display: none; }
.pickers.single { grid-template-columns: 1fr; }

/* Guide des programmes et infos du film, sous le lecteur */
.now-info { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.now-info[hidden] { display: none; }
.embed-bar { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px; flex-wrap: wrap; }
.embed-bar[hidden] { display: none; }
.embed-title { font-size: 12px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.embed-servers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn-server { background: var(--bg-2); border: 1px solid var(--line-solid); color: #fff; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-server:hover { background: var(--card-2); border-color: rgba(255, 46, 99, .5); }
.btn-server.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(255, 46, 99, .35); }
.now-info p { margin: 0; }
.epg-now { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-solid); }
.epg-now b { font-size: 15px; }
.epg-now p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.epg-bar { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: 2px 0 4px; }
.epg-bar div { height: 100%; background: var(--grad); }
.epg-next { padding: 0 4px; }
.credit { font-size: 12px; }

/* Radio en cours : carte au centre de l'écran */
.radio-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none; padding: 16px; text-align: center; background: radial-gradient(circle at center, rgba(255, 46, 99, .18), transparent 65%); }
.radio-card[hidden] { display: none; }
.radio-card .ch-logo { width: 120px; height: 120px; border-radius: 24px; }
.radio-card .ch-logo .icon { width: 48px; height: 48px; }
.radio-card b { font-size: 20px; }
.now-title .ch-logo[hidden] { display: none; }
.ch-text { min-width: 0; display: flex; flex-direction: column; }
.ch-text span, .ch-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-text small { color: var(--muted); font-size: 12px; }
.small-note { font-size: 12px; margin: 0; }

/* ===== Administration ===== */
.admin main:not(.login), .admin .wrap { max-width: 1200px; }
.admin main.login, .login {
  max-width: 440px !important;
  width: 100%;
  margin: 8vh auto 0;
  padding: 0 16px;
  text-align: center;
  box-sizing: border-box;
}
.login .brand { font-size: 22px; margin-bottom: 24px; }
.login .brand-mark { width: 40px; height: 40px; }
.login .card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line-solid);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .55), 0 0 35px -10px rgba(255, 46, 99, .15);
}
.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(255, 46, 99, .12);
  border: 1px solid rgba(255, 46, 99, .25);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.login-header h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.login-header .muted { font-size: 13.5px; margin: 0 0 22px; line-height: 1.5; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; font-weight: 600; color: #d1d5db; letter-spacing: .01em; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon .input-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; display: flex; align-items: center; }
.input-with-icon input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid var(--line-solid);
  background: var(--bg-2);
  color: #fff;
  transition: all .2s;
  box-sizing: border-box;
}
.input-with-icon input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 46, 99, .25);
  background: #141720;
}
.btn-toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color .2s;
}
.btn-toggle-pass:hover { color: #fff; }
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(255, 46, 99, .4);
  transition: transform .15s, box-shadow .15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -5px rgba(255, 46, 99, .55); }
.login-btn:active { transform: translateY(0); }
.login-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-solid);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.back-link:hover { color: #fff; text-decoration: none; }
.page-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-title h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat span { color: var(--muted); font-size: 13px; }
.stat b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat.highlight { background: linear-gradient(150deg, rgba(255, 46, 99, .2), rgba(255, 138, 61, .06)); border-color: rgba(255, 46, 99, .35); }
.info-bar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.info-bar .stat { flex-direction: row; align-items: center; gap: 12px; justify-content: space-between; }
.info-bar .stat > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.table { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line-solid); vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.grid .wide { grid-column: span 3; }
.users { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.user { background: var(--bg-2); border: 1px solid var(--line-solid); border-radius: 14px; padding: 18px; min-width: 0; }
.user .head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 4px; }
.user .head strong { font-size: 16px; }
.user .sub { margin-bottom: 14px; }
.user dl { grid-template-columns: 100px 1fr; }
.user.inactive { opacity: .7; }
.progress { position: relative; margin-top: 14px; height: 32px; background: var(--bg-2); border: 1px solid var(--line-solid); border-radius: var(--radius-sm); overflow: hidden; }
.progress[hidden] { display: none; }
.progress div { height: 100%; width: 0; background: var(--grad); opacity: .45; transition: width .3s; }
.progress span { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 12px; font-size: 13px; }
.check-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0; font-size: 14px; }
.check-stats b { font-size: 18px; }
.check-stats .on b { color: var(--ok-text); }
.check-stats .off b { color: #f87171; }
.inline-search { display: flex; gap: 8px; margin-bottom: 14px; }
.renames { display: flex; flex-direction: column; }
.rename-row { display: flex; gap: 8px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-solid); }
.rename-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rename-info .muted { font-size: 12px; }
.tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.task { background: var(--bg-2); border: 1px solid var(--line-solid); border-radius: 14px; padding: 16px; min-width: 0; }
.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.task-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task p { margin: 0; }
.task .count { color: var(--text); }
#contenus { margin-top: 18px; }
@media (max-width: 960px) { .tasks { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.two-col > .card { margin-bottom: 0; }
.subtitle { font-size: 15px; margin: 0 0 8px; }

/* ===== Écrans moyens et petits ===== */
@media (max-width: 960px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .player { top: 64px; border-radius: 0 0 var(--radius) var(--radius); margin: -20px -16px 0; border-width: 0 0 1px; }
  .channels { max-height: none; min-height: 0; overflow: visible; }
  .order-card { grid-template-columns: 1fr; }
  .order-side { border-left: 0; border-top: 1px solid var(--line-solid); }
  .genres { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .info-bar, .two-col, .users { grid-template-columns: 1fr; }
  .two-col { gap: 0; }
  .two-col > .card { margin-bottom: 18px; }
}
@media (max-width: 700px) {
  .card { padding: 18px; }
  .card.order-card { padding: 0 !important; }
  .order-card > .order, .order-side { padding: 20px; }
  .table { margin: 0 -18px; padding: 0 18px; }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .order .row { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .wide { grid-column: 1 / -1; }
  dl, .user dl { grid-template-columns: 1fr; gap: 2px; }
  dd { margin-bottom: 8px; }
  .apps { grid-template-columns: 1fr; gap: 14px; }
  .section { margin: 44px 0; }
  .rename-row { flex-wrap: wrap; }
  .rename-info { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .hide-sm, .links a.hide-sm { display: none; }
  .links a:not(.button) { padding: 8px 9px; }
  .brand span { font-size: 16px; }
  .hero { padding-top: 28px; }
  .hero-stats li { padding: 12px 6px; }
  .genre { aspect-ratio: 4 / 3; padding: 12px; }
  .genre b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Bouton et Modal Résolution & Qualité Vidéo ===== */
.screen-q-btn {
  display: none !important;
}
.now-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-quality-menu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-solid);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-quality-menu:hover {
  background: var(--card-2);
  border-color: var(--accent);
  color: #fff;
}
.btn-quality-menu .icon {
  color: var(--accent);
}
.now-q-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.now-q-btn .icon {
  color: var(--dim);
  transition: color 0.2s;
}
.now-q-btn:hover .icon {
  color: var(--accent);
}

/* Modale de Résolution */
.quality-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
}
.quality-modal[hidden] {
  display: none !important;
}
.quality-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.quality-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  background: #141721;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modalPop .2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.quality-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-solid);
  background: rgba(255, 255, 255, 0.02);
}
.quality-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15.5px;
  color: #fff;
}
.quality-modal-title .icon {
  color: var(--accent);
}
.quality-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}
.quality-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.quality-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}
.q-current-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-solid);
  border-radius: 12px;
}
.q-current-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  flex: none;
}
.q-current-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.q-current-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}
.q-current-desc {
  font-size: 12.5px;
  color: var(--muted);
}
.q-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dim);
  margin-top: 4px;
}
.q-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 13.5px;
  transition: all .15s ease;
  text-align: left;
}
.q-option-btn:hover {
  background: rgba(255, 46, 99, 0.12);
  border-color: rgba(255, 46, 99, 0.5);
}
.q-option-btn.active {
  background: rgba(255, 46, 99, 0.18);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.q-option-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}
.q-note {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--line-solid);
}

/* Accueil : applis à télécharger et écran de connexion d'exemple */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.app-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--card); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 22px; color: var(--text); transition: border-color .15s, transform .15s; }
/* Carte entière cliquable : pas de soulignement de tout son texte au survol (la bordure et le léger soulèvement suffisent) */
a.app-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.app-card b { font-size: 17px; }
.app-card .button { margin-top: auto; }
.app-for { font-size: 12.5px; color: var(--muted); }
.app-note { margin-top: 14px; }
.app-mock { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 14px; background: linear-gradient(150deg, #3b1f8f, #7c3aed 55%, #c026d3); box-shadow: 0 18px 40px rgba(124, 58, 237, .25); }
.app-mock-title { color: #fff; font-weight: 700; text-align: center; margin-bottom: 4px; }
.app-mock-field { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 8px; background: rgba(255, 255, 255, .88); color: #1e1b4b; font-size: 14px; word-break: break-all; }
.app-mock-field small { font-size: 11px; color: #4b5563; }
.app-mock-button { text-align: center; padding: 10px; border-radius: 8px; background: linear-gradient(90deg, #2563eb, #7c3aed); color: #fff; font-weight: 700; font-size: 14px; }
@media (max-width: 960px) { .app-grid { grid-template-columns: 1fr; } }

/* ===== Accueil (refonte) ===== */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 36px 0 20px; }
.home-hero-text h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -.04em; margin: 0 0 18px; }
.home-hero-text .lead { margin: 0 0 28px; }
.home-hero-text .hero-cta { justify-content: flex-start; margin-bottom: 28px; }
.home-hero-text .hero-stats { margin: 0; max-width: 520px; }
.home-tv { position: relative; }
.home-tv::before { content: ""; position: absolute; inset: 8% -6%; background: var(--grad); filter: blur(70px); opacity: .28; z-index: -1; }
.home-tv-screen { position: relative; border-radius: 18px; padding: 16px; background: #05060a; border: 10px solid #1a1d26; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); }
/* Badge « EN DIRECT » au-dessus de la grille, sans recouvrir les cases */
.home-tv-live { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #e11d48; padding: 4px 10px; border-radius: 99px; }
.home-tv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.home-tv-grid .genre { padding: 10px; border-radius: 10px; }
.home-tv-grid .genre b { font-size: 13px; }
.home-tv-grid .genre span { font-size: 11px; }
.home-tv-foot { display: block; width: 34%; height: 10px; margin: 0 auto; border-radius: 0 0 10px 10px; background: #1a1d26; }
.home-devices { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin: 36px 0 8px; padding: 16px; border: 1px solid var(--line-solid); border-radius: var(--radius); background: var(--card); }
.home-devices .side-label { margin: 0; }
.home-steps .step h3 { font-size: 17px; }
.home-faq { display: flex; flex-direction: column; gap: 10px; }
.home-faq details { background: var(--card); border: 1px solid var(--line-solid); border-radius: 12px; padding: 0 18px; }
.home-faq details[open] { border-color: var(--line-2); }
.home-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; font-weight: 600; list-style: none; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary .icon { flex: none; color: var(--muted); transition: transform .2s; }
.home-faq details[open] summary .icon { transform: rotate(180deg); }
.home-faq details p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.home-cta { text-align: center; margin: 56px 0 8px; padding: 40px 20px; border-radius: var(--radius); border: 1px solid rgba(255, 46, 99, .25); background: linear-gradient(160deg, rgba(255, 46, 99, .14), rgba(255, 138, 61, .05) 70%); }
.home-cta h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); }
.home-cta p { margin: 0 0 20px; }
@media (max-width: 960px) {
  .home-hero { grid-template-columns: 1fr; gap: 20px; text-align: center; padding-top: 16px; }
  .home-hero-text .hero-cta { justify-content: center; }
  .home-hero-text .hero-stats { margin: 0 auto; }
  .home-hero-text .lead { margin: 0 auto 16px; }
  .home-tv { max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 520px) {
  .home-tv-screen { border-width: 6px; padding: 10px; }
  .home-tv-grid { grid-template-columns: repeat(2, 1fr); }
  .home-tv-grid .genre:nth-child(n+5) { display: none; }
}

/* ===== Accueil en mode clair : couleurs prévues pour un fond sombre, adaptées au fond blanc ===== */
.genre { color: #fff; }
[data-theme="light"] body.shop { background: radial-gradient(1000px 460px at 50% -160px, rgba(255, 46, 99, .1), transparent 70%), var(--bg) no-repeat; }
[data-theme="light"] .topbar { background: rgba(255, 255, 255, .85); border-bottom-color: var(--line); }
[data-theme="light"] .links a:not(.button):hover { background: var(--card-2); }
[data-theme="light"] .eyebrow { color: #be123c; border-color: rgba(255, 46, 99, .35); }
[data-theme="light"] .button.ghost { background: #fff; border-color: var(--line-solid); color: var(--text); }
[data-theme="light"] .button.ghost:hover { background: var(--card-2); }
[data-theme="light"] .hero-stats { background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .06); }
[data-theme="light"] .chips li { color: var(--muted); background: var(--card-2); border-color: var(--line); }
[data-theme="light"] .home-devices, [data-theme="light"] .step, [data-theme="light"] .app-card, [data-theme="light"] .home-faq details { box-shadow: 0 6px 20px rgba(15, 23, 42, .04); }
[data-theme="light"] .home-tv::before { opacity: .18; }
[data-theme="light"] .home-cta { background: linear-gradient(160deg, rgba(255, 46, 99, .09), rgba(255, 138, 61, .04) 70%); }

/* Menu des opérateurs Mobile Money avec drapeaux (abonnement, inscription technicien) */
.op-picker { position: relative; }
.op-current {
  width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; font-weight: 400;
  padding: 11px 36px 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--text); font: inherit; cursor: pointer; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.op-current:hover { filter: none; }
.op-current:focus, .op-current[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 46, 99, .18); }
.op-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  max-height: 320px; overflow-y: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .35);
}
.op-list[hidden] { display: none; }
.op-list li { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14.5px; font-weight: 400; }
.op-list li:hover, .op-list li:focus { outline: none; background: var(--card-2); }
.op-list li[aria-selected="true"] { background: var(--accent-soft); font-weight: 600; }
.op-picker .flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
[data-theme="light"] .op-list { box-shadow: 0 16px 36px rgba(15, 23, 42, .14); }

/* Bouton lune / soleil de la barre du haut : lune en mode clair, soleil en mode nuit */
.theme-toggle { width: 38px; height: 38px; padding: 0; margin-left: 6px; border-radius: 10px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); box-shadow: none; }
.theme-toggle:hover { color: var(--text); background: var(--card-2); filter: none; }
.theme-toggle span { display: inline-flex; }
[data-theme="light"] .theme-toggle .t-sun, :root:not([data-theme="light"]) .theme-toggle .t-moon { display: none; }

/* Télé de l'accueil : aperçu en direct de France 24 */
.home-tv-video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.home-tv-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-tv-video[hidden], .home-tv-grid[hidden], .home-tv-bar [hidden] { display: none; }
/* Bandeau au-dessus de l'image : « EN DIRECT », nom de la chaîne et bouton du son, sans rien cacher de la vidéo */
.home-tv-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.home-tv-bar .home-tv-live { margin-bottom: 0; }
.home-tv-channel { color: #fff; font-size: 13px; font-weight: 700; }
.home-tv-sound { margin-left: auto; padding: 5px 12px; font-size: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); box-shadow: none; }
.home-tv-sound:hover { background: rgba(255, 255, 255, .18); filter: none; }

/* Reduire l'espacement et remonter le contenu sur mobile */
@media (max-width: 768px) {
  main { padding-top: 8px; }
  .home-hero { padding: 6px 0 16px; gap: 16px; }
  .home-hero-text .eyebrow { margin-top: 0; margin-bottom: 10px; }
  .home-hero-text h1 { font-size: clamp(26px, 6.8vw, 36px); margin-bottom: 10px; }
  .home-hero-text .lead { margin: 0 auto 14px; font-size: 14px; }
  .home-hero-text .hero-cta { margin-bottom: 16px; gap: 8px; }
  .home-hero-text .hero-cta .button.big { padding: 11px 18px; font-size: 14px; }
  .home-hero-text .hero-stats { margin-bottom: 0; }
  .home-hero-text .hero-stats li { padding: 8px 6px; }
  .home-hero-text .hero-stats b { font-size: 20px; }
  .home-hero-text .hero-stats span { font-size: 11.5px; }
}

/* Actions mobiles sous le téléviseur et masquage dans la topbar sur mobile */
.home-tv-mobile-actions {
  display: none;
}
@media (max-width: 768px) {
  .nav-desktop-only,
  .links a.nav-desktop-only,
  .hide-sm,
  .links a.hide-sm {
    display: none !important;
  }
  .home-tv-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    width: 100%;
  }
  .home-tv-mobile-actions .button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  }
}
@media (max-width: 440px) {
  .home-tv-mobile-actions {
    flex-direction: column;
    gap: 10px;
  }
  .home-tv-mobile-actions .button {
    width: 100%;
    flex: none;
  }
}

/* Abonnement mobile optimization */
@media (max-width: 768px) {
  .page-abonnement main { padding: 12px 8px 48px !important; }
}
@media (max-width: 420px) {
  .page-abonnement main { padding: 8px 4px 36px !important; }
}
