/* ===== Polices ===== */
@font-face { font-family: "Type Light Sans"; src: url("/fonts/TypeLightSans-KV84p.otf") format("opentype"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Giants — lettres & ponctuation latine (WOFF2 subset, ~370 Ko) */
@font-face { font-family: "Giants"; src: url("/fonts/GiantsItalicBoldItalic-latin.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; unicode-range: U+0000-0024, U+0026-002F, U+003A-00FF; }
/* Giants — fallback complet pour caractères hors latin de base */
@font-face { font-family: "Giants"; src: url("/fonts/GiantsItalicBoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; unicode-range: U+0100-FFFF; }
/* Giants — chiffres 0-9 et % empruntés à Rijusans */
@font-face { font-family: "Giants"; src: url("/fonts/Rijusans.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; unicode-range: U+0025, U+0030-0039; }
@font-face { font-family: "Rijusans"; src: url("/fonts/Rijusans.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Charte Salt — thème clair premium */
  --bg: #ffffff;
  --bg2: #ffffff;
  --bg3: #f4f5f7;
  --line: #e5e7eb;
  --text: #0a0a0a;
  --muted: #6b7280;
  --accent: #16c172;   /* vert Salt */
  --accent2: #0e9f5a;  /* vert foncé (boutons/hover) */
  --font-display: "Giants", "Type Light Sans", sans-serif;
  --font-body: "Rijusans", "Type Light Sans", -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Les form elements (button, input, select) n'héritent pas font-family par défaut en CSS */
button, input, select, textarea { font-family: inherit; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}
/* Titres Giants (lettres Giants + chiffres Rijusans via unicode-range) */
.lp-brand, .brand, .lp-hero h1, .lp-options h2, .login-card h1, .lp-card h3 {
  font-family: var(--font-display); font-weight: 700; font-style: italic; letter-spacing: -0.01em;
}
/* .lp-tag reste en police corps (badge/chip) */
.lp-tag { font-family: var(--font-body); font-style: normal; }
.brand-logo {
  height: 28px; width: auto; display: block; object-fit: contain; flex-shrink: 0;
}
.login-card h1 .brand-logo { height: 36px; }
.lp-nav .brand-logo { height: 32px; }
.hidden { display: none !important; }

/* ---- Login ---- */
.login {
  min-height: 100vh; display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; background: radial-gradient(900px 500px at 50% -10%, #f1f8f4, var(--bg));
}
.login-card {
  width: 360px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.login-card h1 { margin: 0; font-size: 24px; text-align: center; }
.login-card .sub { margin: 0 0 8px; color: var(--muted); text-align: center; font-size: 13px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.login-card input {
  background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 14px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
button {
  cursor: pointer; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
}
#loginBtn { background: var(--accent2); color: #fff; padding: 11px; margin-top: 4px; }
#loginBtn:hover { background: var(--accent); }
.msg { font-size: 13px; min-height: 16px; text-align: center; }
.msg.err { color: #ff6b6b; }
.msg.ok { color: #4ade80; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.free-btn { background: var(--bg3); color: var(--text); padding: 11px; border: 1px solid var(--line); }
.free-btn:hover { background: var(--bg2); border-color: var(--accent); }

/* Mode gratuit : Films/Séries indisponibles (besoin d'un compte Xtream) */
body.free .tab[data-type="vod"], body.free .tab[data-type="series"] { display: none; }

/* ---- App ---- */
.app { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tabs { display: flex; gap: 6px; }
.tab {
  background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 8px;
}
.tab:hover { color: var(--text); background: var(--bg3); }
.tab.active { background: var(--accent2); color: #fff; }
.search {
  margin-left: auto; background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  padding: 8px 12px; border-radius: 8px; width: 220px; font-size: 14px;
}
.search:focus { outline: none; border-color: var(--accent); }
.layout-btn { background: var(--bg3); color: var(--text); padding: 8px 12px; }
.layout-btn:hover { background: var(--accent2); }
.logout { background: var(--bg3); color: var(--text); padding: 8px 12px; }
.logout:hover { background: #fdecec; color: #c0392b; }
.country-pick-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.country-pick-sel {
  background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 8px; font-size: 13px; cursor: pointer;
  max-width: 130px; font-family: inherit;
}
.country-pick-sel:focus { outline: none; border-color: var(--accent); }
.flag-sm { width: 18px; height: auto; border-radius: 2px; flex-shrink: 0; }

.layout { flex: 1; display: flex; min-height: 0; }
.categories {
  width: 240px; background: var(--bg2); border-right: 1px solid var(--line);
  overflow-y: auto; flex-shrink: 0;
}
.cat-search {
  display: none; width: calc(100% - 16px); margin: 8px; padding: 8px 10px;
  background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; font-size: 13px; position: sticky; top: 8px; z-index: 2;
}
.cat-search:focus { outline: none; border-color: var(--accent); }
body.free .cat-search { display: block; }
.cat-list { padding: 8px; }
.cat {
  padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat:hover { background: var(--bg3); color: var(--text); }
.cat.active { background: var(--accent2); color: #fff; }
.cat-sep {
  padding: 12px 12px 5px; margin-top: 8px; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line);
}

.content { flex: 1; overflow-y: auto; padding: 16px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.card {
  position: relative;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; cursor: pointer; transition: transform .08s, border-color .08s;
}
.fav-btn {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #ffd24a; font-size: 16px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  opacity: 0; transition: opacity .1s, background .1s;
}
.card:hover .fav-btn, .fav-btn.on { opacity: 1; }
.fav-btn:hover { background: rgba(0,0,0,.85); }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Badge numéro de chaîne (style TNT) */
.num-badge {
  position: absolute; top: 6px; left: 6px; min-width: 26px; height: 24px; padding: 0 6px;
  border-radius: 6px; background: var(--accent2); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.num-badge:hover { background: var(--accent); }

/* Overlay du zapping (numéro saisi à la télécommande/clavier) */
.zap {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: rgba(0,0,0,.82); color: #fff; font-size: 44px; font-weight: 800;
  padding: 14px 28px; border-radius: 14px; border: 2px solid var(--accent);
  letter-spacing: 2px; pointer-events: none;
}

/* ---- Focus télécommande (Vidaa TV) ---- */
:focus { outline: none; }
.card:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent); outline-offset: 2px;
  transform: translateY(-2px);
}
.card:focus .fav-btn { opacity: 1; }
.tab:focus, .layout-btn:focus, .logout:focus, .search:focus,
.close:focus, .act:focus, .fav-btn:focus {
  box-shadow: 0 0 0 3px var(--accent);
}
.cat:focus { background: var(--bg3); color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }
.cat.active:focus { background: var(--accent2); }
.card .thumb {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--bg3); display: block;
}
.card.live .thumb { aspect-ratio: 16/9; object-fit: contain; padding: 8px; }
.card.ep .thumb { aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 8px 10px; }
.card .name { font-size: 13px; line-height: 1.3; }
.status { padding: 24px; text-align: center; color: var(--muted); }

/* EPG (guide des programmes) */
.epg { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.epg-now { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-bar { height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.epg-fill { height: 100%; background: var(--accent); }
.epg-time { font-size: 11px; color: var(--muted); }
.epg-next { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* En-têtes pleine largeur dans la grille des épisodes */
.ep-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-bottom: 4px;
}
.ep-title { font-weight: 700; font-size: 16px; }
.season-title {
  grid-column: 1 / -1; font-weight: 700; font-size: 15px; color: var(--accent);
  margin: 14px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}

/* ---- Mode Liste (façon guide Zattoo) ---- */
.grid.list { display: flex; flex-direction: column; gap: 6px; }
.grid.list .card {
  display: flex; align-items: center; gap: 14px; padding: 0 14px 0 0;
}
.grid.list .card .thumb,
.grid.list .card.live .thumb,
.grid.list .card.ep .thumb {
  width: 110px; height: 64px; aspect-ratio: auto; object-fit: contain;
  padding: 6px; flex-shrink: 0; border-radius: 8px 0 0 8px; background: var(--bg3);
}
.grid.list .card:hover { transform: none; }
.grid.list .card-body { flex: 1; min-width: 0; padding: 8px 0; }
.grid.list .card .name { font-size: 14px; }
.grid.list .card .epg { margin-top: 4px; }
/* en-têtes pleine largeur restent corrects en flex column */
.grid.list .ep-bar { margin: 4px 0 8px; }
.grid.list .season-title { margin: 14px 0 4px; }

/* ---- Lecteur ---- */
.player {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.player-inner {
  width: min(1100px, 94vw); background: #000; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
}
.player-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg2); font-weight: 600;
}
.player-actions { display: flex; align-items: center; gap: 8px; }
.act { background: var(--bg3); color: var(--text); padding: 6px 10px; font-size: 13px; }
.act:hover { background: var(--accent2); }
.close { background: var(--bg3); color: var(--text); padding: 6px 10px; }
.close:hover { background: #3a2030; }
#video { width: 100%; max-height: 75vh; background: #000; display: block; }
.player-msg { padding: 10px 14px; color: var(--muted); font-size: 13px; min-height: 8px; word-break: break-all; }
.player-msg.err { color: #ff6b6b; }
.player-msg.ok { color: #4ade80; }

/* ====== Smartphone (responsive) ====== */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .brand { font-size: 15px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }
  .search { order: 4; width: 100%; margin-left: 0; }
  #layoutToggle { order: 1; margin-left: auto; }
  #logout { order: 2; }

  .layout { flex-direction: column; }
  .categories {
    width: 100%; max-height: none; overflow: visible;
    border-right: none; border-bottom: 1px solid var(--line); flex-shrink: 0;
  }
  .cat-list {
    display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
  }
  .cat { white-space: nowrap; padding: 7px 12px; flex-shrink: 0; }

  .content { padding: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
  .card .name { font-size: 12px; padding: 6px 8px; }

  /* Le lecteur occupe tout l'écran sur mobile */
  .player-inner { width: 100vw; border-radius: 0; border: none; }
  #video { max-height: 60vh; }

  /* L'étoile favori reste visible (pas de survol au doigt) */
  .fav-btn { opacity: 1; width: 34px; height: 34px; }

  /* Mode liste : vignette un peu plus grande au doigt */
  .grid.list .card .thumb { width: 110px; height: 62px; }
}

/* ===================== LANDING PAGE ===================== */
.landing { min-height: 100vh; background: radial-gradient(1200px 700px at 50% -180px, #eef7f2, var(--bg)); }
.lp-nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 20px 24px;
}
.lp-brand { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.lp-nav-btn { background: var(--accent2); color: #fff; padding: 9px 18px; border-radius: 999px; font-weight: 600; }
.lp-nav-btn:hover { background: var(--accent); }

.lp-hero { max-width: 820px; margin: 0 auto; padding: 40px 24px 24px; text-align: center; }
.lp-badge {
  display: inline-block; background: var(--bg3); border: 1px solid var(--line);
  color: var(--muted); padding: 6px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 22px;
}
.lp-hero h1 { font-size: 72px; line-height: 1.05; margin: 0 0 18px; letter-spacing: -1px; }
.lp-hero h1 span { color: var(--accent); }
.lp-sub { font-size: 18px; color: var(--muted); line-height: 1.6; max-width: 640px; margin: 0 auto 28px; }
.lp-sub strong { color: var(--text); }
.lp-email { display: flex; gap: 8px; max-width: 460px; margin: 0 auto 12px; }
.lp-email input {
  flex: 1; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  padding: 14px 16px; border-radius: 12px; font-size: 15px;
}
.lp-email input:focus { outline: none; border-color: var(--accent); }
.lp-email button { background: var(--accent2); color: #fff; padding: 0 22px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.lp-email button:hover { background: var(--accent); }
.lp-note { font-size: 13px; color: var(--muted); margin: 0; }

.lp-options { max-width: 1080px; margin: 0 auto; padding: 50px 24px 20px; }
.lp-options h2 { text-align: center; font-size: 28px; margin: 0 0 28px; }
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-card {
  text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; cursor: pointer; transition: transform .1s, border-color .1s; color: var(--text);
  display: flex; flex-direction: column; gap: 8px;
}
.lp-card { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.lp-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,.09); }
.lp-card.featured { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset; }
.lp-card-ic { font-size: 34px; }
.lp-card h3 { margin: 6px 0 0; font-size: 20px; }
.lp-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.lp-card-go { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 10px; }

.lp-features {
  max-width: 1080px; margin: 0 auto; padding: 50px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.lp-feat { text-align: center; }
.lp-feat-ic { font-size: 28px; margin-bottom: 8px; }
.lp-feat h4 { margin: 0 0 6px; font-size: 16px; }
.lp-feat p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.lp-foot {
  text-align: center; padding: 40px 24px 56px; border-top: 1px solid var(--line);
  margin-top: 20px; color: var(--muted);
}
.lp-foot .lp-brand { margin-bottom: 10px; }
.lp-foot p { margin: 4px 0; font-size: 13px; }
.lp-foot-love { font-size: 15px !important; color: var(--text) !important; margin-top: 14px !important; }
.lp-foot-love .heart { color: #ff4d6d; }

/* Panneaux de connexion + retour */
.back-home { background: transparent; color: var(--muted); padding: 6px 0; margin-bottom: 6px; text-align: left; }
.back-home:hover { color: var(--text); }
.auth-panel { display: flex; flex-direction: column; gap: 14px; }
.m3u-example { margin: -6px 0 0; font-size: 12px; color: var(--muted); }
.m3u-ex-link { background: none; border: none; padding: 0; font-size: 12px; color: var(--accent2); font-weight: 500; text-decoration: underline; cursor: pointer; }
.m3u-ex-link:hover { color: var(--accent); }

@media (max-width: 760px) {
  .lp-hero h1 { font-size: 48px; }
  .lp-sub { font-size: 16px; }
  .lp-cards { grid-template-columns: 1fr; }
  .lp-features { grid-template-columns: 1fr 1fr; }
}

/* Story 5.1 — Mes chaînes */
.cat-mine { color: var(--accent); font-weight: 600; }
.add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 120px; border: 2px dashed var(--line); background: transparent; color: var(--muted);
}
.add-card:hover { border-color: var(--accent); color: var(--text); }
.add-plus { font-size: 40px; line-height: 1; }
.add-label { font-size: 13px; }
.del-btn {
  position: absolute; bottom: 6px; right: 6px; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #ff8b8b; font-size: 14px;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .1s;
}
.card:hover .del-btn, .card:focus .del-btn { opacity: 1; }
.del-btn:hover { background: rgba(120,20,20,.9); }

/* Auth — barre landing (boutons à gauche, CTA à droite) */
.lp-nav-left { display: flex; align-items: center; gap: 20px; }
.lp-auth-btns { display: flex; align-items: center; gap: 8px; }
.lp-nav-link { background: transparent; color: var(--muted); padding: 8px 10px; font-weight: 600; border-radius: 8px; }
.lp-nav-link:hover { color: var(--text); background: var(--bg3); }
.lp-nav-link-outline { border: 1px solid var(--line) !important; color: var(--text) !important; padding: 7px 12px; }
.lp-nav-link-sm { font-size: 13px; padding: 6px 8px; }
.lp-nav-user { display: flex; align-items: center; gap: 8px; }
.lp-nav-avatar { font-size: 16px; }
.lp-nav-email-text { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Signup form extras --- */
.field-hint { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 4px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: not-allowed; opacity: .6;
}
.soon-tag { background: var(--bg3); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.auth-switch { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch-btn { background: none; border: none; padding: 0; color: var(--accent2); font-weight: 600; font-size: 13px; text-decoration: underline; cursor: pointer; }
.auth-switch-btn:hover { color: var(--accent); }

/* --- ToU inline (Xtream / M3U forms) --- */
.tou-inline { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-size: 13px; color: var(--text) !important; line-height: 1.4; margin-top: 4px; }
.tou-inline input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent2); width: 15px; height: 15px; }
.tou-inline a { color: var(--accent2); }

/* --- Modale ToU (mode gratuit) --- */
.tou-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.tou-card {
  background: var(--bg); border-radius: 16px; padding: 40px 48px;
  max-width: 720px; width: 100%; display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.tou-card h2 { margin: 0; font-size: 20px; }
.tou-desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tou-desc strong { color: var(--text); }
.tou-url-row { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.tou-url-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tou-url-row code { color: var(--text); font-size: 12px; word-break: break-all; }
.tou-accept-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.tou-accept-label input { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent2); width: 16px; height: 16px; }
.tou-desc a { color: var(--accent2); text-decoration: none; }
.tou-desc a:hover { text-decoration: underline; }
.tou-url-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font-size: 13px; padding: 7px 10px; font-family: inherit;
  margin-top: 4px;
}
.tou-url-input:focus { outline: none; border-color: var(--accent); }
.tou-accept-label a { color: var(--accent2); }
.tou-actions { display: flex; gap: 10px; justify-content: flex-end; }
.tou-cancel { background: var(--bg3); color: var(--text); border: 1px solid var(--line); padding: 10px 18px; border-radius: 8px; }
.tou-cancel:hover { background: var(--line); }
#touConfirm:disabled { opacity: .45; cursor: not-allowed; }

/* ===================== HUB COUPE DU MONDE (Landing) ===================== */
.lp-wc {
  max-width: 1080px; margin: 0 auto; padding: 40px 24px;
  background: radial-gradient(900px 400px at 50% -80px, #f1f8f4, var(--bg));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.lp-wc h2 { text-align: center; font-size: 28px; margin: 0 0 8px; }
.lp-wc-sub { text-align: center; color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.lp-wc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px;
}
.lp-wc-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; text-align: center; transition: transform .08s, border-color .08s;
}
.lp-wc-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.lp-wc-teams { font-size: 16px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.lp-wc-flag { font-size: 24px; line-height: 1; margin: 0 4px; }
.flag-img { width: 28px; height: auto; border-radius: 3px; vertical-align: middle; flex-shrink: 0; }
.flag-emoji { font-size: 22px; }
.wc-flag .flag-img, .wc-teams .flag-img { width: 24px; }
.lp-wc-vs { color: var(--muted); font-weight: 500; font-size: 13px; margin: 0 6px; }
.lp-wc-info { font-size: 13px; color: var(--muted); line-height: 1.5; }
.lp-wc-btn {
  display: block; margin: 0 auto;
  background: var(--accent2); color: #fff; padding: 12px 28px; border-radius: 12px;
  font-size: 15px; font-weight: 700;
}
.lp-wc-btn:hover { background: var(--accent); }

@media (max-width: 760px) {
  .lp-wc-grid { grid-template-columns: 1fr; }
  .lp-wc { padding: 28px 16px; }
}

/* Liens légaux dans le footer landing */
.lp-legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px;
  margin: 14px 0 6px; font-size: 13px;
}
.lp-legal a { color: var(--muted); text-decoration: none; }
.lp-legal a:hover { color: var(--accent); text-decoration: underline; }

/* Badge "100% gratuit & légal" sur la carte Gratuit */
.lp-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.35);
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}

/* ===================== HUB COUPE DU MONDE 2026 ===================== */
.wc-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.wc-header h2 { margin: 0; font-size: 22px; }
.wc-header .wc-sub { color: var(--muted); font-size: 13px; }
/* Flat match cards */
.wc-match {
  grid-column: 1 / -1;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .08s, border-color .08s;
}
.wc-match:hover { border-color: var(--accent); transform: translateY(-1px); }
.wc-match.wc-next { border-color: var(--accent2); box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.wc-match.wc-past { opacity: .6; }
/* Badge row */
.wc-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wc-phase-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg3); border: 1px solid var(--line); color: var(--muted);
  padding: 2px 7px; border-radius: 99px;
}
.wc-prochain-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  background: var(--accent2); color: #fff;
  padding: 2px 7px; border-radius: 99px;
}
.wc-past-badge { font-size: 10px; color: var(--muted); background: var(--bg3); border: 1px solid var(--line); padding: 2px 6px; border-radius: 99px; }
.wc-live { color: #ff4d6d; font-weight: 700; font-size: 11px; }
.wc-soon { color: #f59e0b; font-weight: 700; font-size: 11px; }
/* Teams */
.wc-teams {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 18px; font-weight: 700; text-align: center;
}
.wc-flag { font-size: 28px; line-height: 1; }
.wc-vs { color: var(--muted); font-size: 14px; font-weight: 500; }
.wc-info {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); font-size: 12px; flex-wrap: wrap;
}
.wc-stadium { display: flex; align-items: center; gap: 4px; }
/* Broadcaster chips */
.wc-broadcasters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.wc-broadcaster {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; color: var(--text); cursor: pointer;
  transition: background .1s;
}
.wc-broadcaster:hover { background: var(--accent2); color: #fff; border-color: var(--accent2); }
.wc-broadcaster.disabled { opacity: .55; cursor: not-allowed; }
.wc-broadcaster.disabled:hover { background: var(--bg3); color: var(--text); border-color: var(--line); }
.wc-broadcaster .flag-xs, .wc-broadcaster .flag-img { width: 16px; height: auto; border-radius: 1px; flex-shrink: 0; }
.wc-broadcaster .wc-geo { color: #ff4d6d; font-size: 11px; }
.wc-broadcaster:hover .wc-geo { color: #ffd1d1; }
.wc-broadcaster .wc-lang { color: var(--muted); font-size: 10px; opacity: .75; }
.wc-broadcaster:hover .wc-lang { color: #e5e7eb; opacity: 1; }
.wc-broadcaster.free { border-color: var(--accent2); }
.wc-free-badge { background: var(--accent2); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .02em; }
.wc-broadcaster:hover .wc-free-badge { background: rgba(255,255,255,.25); }
/* Past toggle + expand buttons */
.wc-past-toggle, .wc-expand-btn {
  grid-column: 1 / -1;
  background: none; border: 1px dashed var(--line); border-radius: 8px;
  color: var(--muted); font-size: 13px; padding: 8px 16px; cursor: pointer;
  width: 100%; text-align: center; transition: border-color .1s, color .1s;
}
.wc-past-toggle:hover, .wc-expand-btn:hover { border-color: var(--accent); color: var(--accent); }
/* Compact select filters */
.wc-filter { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 10px; }
.wc-filter-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wc-select {
  width: 100%; background: var(--bg3); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font-size: 13px; padding: 5px 8px; cursor: pointer;
}
.wc-select:focus { outline: 2px solid var(--accent); }

/* ===================== MULTI-SELECT DÉROULANT ===================== */
.ms-wrap { position: relative; padding: 8px; }
.ms-btn {
  width: 100%; text-align: left; background: var(--bg3);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; color: var(--text);
  cursor: pointer; transition: border-color .1s;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden;
}
.ms-btn:hover, .ms-btn:focus-visible { border-color: var(--accent); outline: none; }
.ms-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ms-arrow { color: var(--muted); font-size: 10px; flex-shrink: 0; }
.ms-count {
  display: inline-block; background: var(--accent2); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 99px;
  padding: 1px 7px; margin-left: 4px; vertical-align: middle;
}
.ms-dropdown {
  position: absolute; top: calc(100% + 2px); left: 8px; right: 8px; z-index: 200;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  display: flex; flex-direction: column; max-height: 340px; overflow: hidden;
}
.ms-dropdown.hidden { display: none; }
.ms-search {
  width: 100%; padding: 8px 12px; font-size: 13px; color: var(--text);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  outline: none; box-sizing: border-box; border-radius: 10px 10px 0 0;
}
.ms-opts { overflow-y: auto; padding: 4px 0; flex: 1; }
.ms-sep {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 12px 4px; pointer-events: none; user-select: none;
}
.ms-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
  transition: background .08s; user-select: none;
}
.ms-opt:hover { background: var(--bg3); }
.ms-opt input[type="checkbox"] { flex-shrink: 0; accent-color: var(--accent2); cursor: pointer; }
.ms-opt-label { flex: 1; line-height: 1.3; }

/* ===================== PAGES LÉGALES ===================== */
.legal-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.legal-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; width: 100%; padding: 20px 24px;
}
.legal-header .lp-brand { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--text); }
.legal-main {
  flex: 1; max-width: 820px; margin: 0 auto; width: 100%; padding: 24px;
}
.legal-main h1 { font-size: 32px; margin: 0 0 18px; }
.legal-main h2 { font-size: 18px; margin: 28px 0 10px; color: var(--accent); }
.legal-main p, .legal-main li { font-size: 15px; line-height: 1.7; color: var(--text); }
.legal-main ul { padding-left: 22px; margin: 8px 0; }
.legal-main a { color: var(--accent2); }
.legal-main a:hover { text-decoration: underline; }
.contact-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin: 14px 0;
}
.contact-card h2 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.contact-card p { margin: 4px 0; }

/* World Cup responsive */
@media (max-width: 640px) {
  .wc-teams { font-size: 16px; gap: 8px; }
  .wc-flag { font-size: 24px; }
  .wc-filter { padding: 6px 8px; }
  .ms-wrap { min-width: 120px; flex: 1; flex-shrink: 0; }
}
