/* =========================================================
   TV'ON — style « plateforme de streaming »
   Pensé d'abord pour le mobile, puis élargi pour l'ordinateur.
   ========================================================= */

:root {
  --fond: #0b0b0f;
  --surface: #15151c;
  --surface-2: #1f1f29;
  --surface-3: #2a2a36;
  --bord: rgba(255, 255, 255, .08);
  --texte: #f5f5f7;
  --discret: #9a9aab;
  --accent: #ff3d5a;
  --degrade: linear-gradient(135deg, #ff5a3c 0%, #e3125b 100%);
  --rayon: 12px;
  --haut-barre: 60px;
  --haut-nav: 64px;
  --bas-sur: env(safe-area-inset-bottom, 0px);
  --marge: 16px;
  --carte: 132px;
  --ombre: 0 12px 40px rgba(0, 0, 0, .55);
  --vitesse: .22s cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--haut-nav) + var(--bas-sur));
  overflow-x: hidden;
}

body.bloque { overflow: hidden; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 22px; height: 22px; flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }

.discret { color: var(--discret); }
.petit { font-size: .8rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 10px;
  font-weight: 700; font-size: 1rem;
  transition: transform var(--vitesse), opacity var(--vitesse), background var(--vitesse);
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-principal { background: #fff; color: #0b0b0f; }
.btn-principal:hover:not(:disabled) { background: #e6e6ea; }
.btn-accent { background: var(--degrade); color: #fff; }
.btn-verre {
  background: rgba(255, 255, 255, .14); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-verre:hover { background: rgba(255, 255, 255, .22); }

.btn-icone {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  color: var(--texte);
  transition: background var(--vitesse), transform var(--vitesse), color var(--vitesse);
}
.btn-icone:hover { background: rgba(255, 255, 255, .1); }
.btn-icone:active { transform: scale(.9); }
.btn-icone.petit { width: 36px; height: 36px; }
.btn-icone.petit svg { width: 18px; height: 18px; }
.btn-icone.actif { color: var(--accent); }

.lien-discret {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--discret); font-size: .85rem; padding: 8px 12px; border-radius: 8px;
}
.lien-discret svg { width: 16px; height: 16px; }
.lien-discret:hover { color: var(--texte); background: var(--surface); }

/* ---------- En-tête ---------- */
.barre {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--haut-barre);
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--marge);
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent);
  transition: background var(--vitesse), box-shadow var(--vitesse);
}
.barre.opaque {
  background: rgba(11, 11, 15, .88);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--bord);
}

.marque { display: flex; align-items: center; color: var(--texte); text-decoration: none; }

/* Logo TV'ON : « TV » en blanc, « 'ON » en dégradé, petit point « en direct » */
.logo {
  position: relative;
  font-family: "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  font-weight: 900; font-size: 1.55rem; line-height: 1;
  letter-spacing: -.04em;
  color: #fff;
  padding-right: 12px;
}
.logo b {
  font-weight: 900;
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-point {
  position: absolute; right: 0; top: 1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulsation 1.6s infinite;
}

.nav-haut { display: none; gap: 4px; margin-left: 18px; }
.nav-haut button {
  padding: 8px 12px; border-radius: 8px; color: var(--discret); font-weight: 600;
  transition: color var(--vitesse);
}
.nav-haut button:hover, .nav-haut button.actif { color: var(--texte); }

.barre-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.choix-pays {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 10px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-weight: 600; font-size: .9rem;
  max-width: 46vw;
  transition: background var(--vitesse);
}
.choix-pays:hover { background: rgba(255, 255, 255, .2); }
.choix-pays svg { width: 16px; height: 16px; opacity: .8; }
#pays-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drapeau { font-size: 1.15rem; line-height: 1; }

/* ---------- Recherche ---------- */
.recherche {
  position: fixed; z-index: 49; left: 0; right: 0; top: var(--haut-barre);
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--marge) 12px;
  background: rgba(11, 11, 15, .95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bord);
  animation: descendre .2s ease-out;
}
.recherche > svg { color: var(--discret); position: absolute; left: calc(var(--marge) + 14px); width: 18px; }
.recherche input {
  flex: 1; height: 46px; padding: 0 14px 0 42px;
  border-radius: 12px; border: 1px solid var(--bord);
  background: var(--surface-2); color: var(--texte);
  font-size: 16px; /* 16px : évite le zoom automatique sur iPhone */
  outline: none;
}
.recherche input:focus { border-color: var(--accent); }
/* En recherche : on cache la bannière pour voir directement les résultats */
body.en-recherche .accroche { display: none; }
body.en-recherche:not(.lecture-active) #contenu { padding-top: calc(var(--haut-barre) + 66px); }
body.en-recherche.lecture-active #contenu { padding-top: 66px; }

/* ---------- Scène : bannière d'accueil ---------- */
.accroche {
  position: relative;
  min-height: 74vh; max-height: 680px;
  display: flex; align-items: flex-end;
  padding: calc(var(--haut-barre) + 20px) var(--marge) 34px;
  overflow: hidden;
  isolation: isolate;
}
.accroche-fond {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 80% 10%, hsl(var(--teinte, 350) 75% 38% / .9), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, hsl(calc(var(--teinte, 350) + 40) 70% 25% / .8), transparent 60%),
    #120d14;
  transition: background .6s ease;
}
.accroche-fond img {
  position: absolute; inset: -10%;
  width: 120%; height: 120%;
  object-fit: cover;
  filter: blur(60px) saturate(160%);
  opacity: .55;
}
.accroche::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--fond) 2%, rgba(11, 11, 15, .6) 40%, transparent 75%),
    linear-gradient(to right, rgba(11, 11, 15, .7), transparent 70%);
}
.accroche-texte { max-width: 620px; animation: monter .6s ease-out both; }
.accroche h1 {
  font-size: clamp(2rem, 8vw, 3.6rem);
  font-weight: 900; letter-spacing: -.035em; line-height: 1.02;
  margin: 12px 0 10px;
  text-wrap: balance;
}
.accroche p { color: rgba(255, 255, 255, .82); font-size: 1rem; max-width: 46ch; }
.accroche-boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.accroche-logo {
  /* Mobile : logo centré dans le haut de la bannière */
  position: absolute; left: 50%; top: calc(var(--haut-barre) + 7vh); transform: translateX(-50%);
  width: 56vw; max-width: 260px; max-height: 20vh;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6));
  opacity: .95;
  animation: apparaitre .8s ease-out both;
}
/* Pendant la préparation (pas encore de chaîne à la une) : bannière plus courte */
.accroche.compacte { min-height: 46vh; }

.etiquette-direct {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(255, 61, 90, .18); color: #ff8094;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
}
.etiquette-direct i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 61, 90, .7);
  animation: pulsation 1.6s infinite;
}

/* ---------- Scène : lecteur ---------- */
.lecteur { padding-top: var(--haut-barre); }
.ecran {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.ecran video { width: 100%; height: 100%; display: block; background: #000; }
.sur-video {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0, 0, 0, .55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.voile {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at center, rgba(20, 20, 28, .82), rgba(0, 0, 0, .94));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-align: center; padding: 16px;
  animation: apparaitre .25s ease-out;
}
.voile-boite { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 380px; }
.voile-logo {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-size: 1.8rem; font-weight: 800;
  overflow: hidden;
  animation: respirer 1.8s ease-in-out infinite;
}
.voile-logo img { width: 80%; height: 80%; object-fit: contain; }
.voile.erreur .voile-logo { animation: none; filter: grayscale(1); opacity: .7; }
.anneau {
  width: 34px; height: 34px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--accent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: tourner .8s linear infinite;
  margin: 6px 0 2px;
}
.voile.erreur .anneau { display: none; }
.voile-titre { font-weight: 800; font-size: 1.05rem; }
.voile-texte { color: var(--discret); font-size: .9rem; min-height: 1.2em; }
.voile-boutons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.voile-boutons .btn { height: 40px; padding: 0 16px; font-size: .9rem; }

.lecture-infos {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px var(--marge) 6px;
}
.lecture-chaine { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lecture-texte { min-width: 0; }
.lecture-texte h2 {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lecture-texte p { font-size: .85rem; margin-top: 2px; }
.lecture-actions {
  display: flex; gap: 2px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.lecture-actions::-webkit-scrollbar { display: none; }
.lecture-actions .btn-icone { background: var(--surface); width: 44px; height: 44px; flex-shrink: 0; }
.lecture-actions .btn-icone:hover { background: var(--surface-2); }
.lecture-actions .btn-icone + .btn-icone { margin-left: 6px; }
#btn-fermer-lecteur { margin-left: auto !important; }

.vignette {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-weight: 800; font-size: 1.3rem;
  overflow: hidden;
}
.vignette img { width: 82%; height: 82%; object-fit: contain; }

/* ---------- Filtres (catégories) ---------- */
.filtres {
  position: sticky; top: var(--haut-barre); z-index: 40;
  display: flex; gap: 8px;
  padding: 10px var(--marge);
  overflow-x: auto; scrollbar-width: none;
  background: rgba(11, 11, 15, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.filtres::-webkit-scrollbar { display: none; }
.filtres:empty { display: none; }
.puce {
  flex-shrink: 0;
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .87rem; font-weight: 600; white-space: nowrap;
  color: rgba(255, 255, 255, .88);
  transition: background var(--vitesse), color var(--vitesse), border-color var(--vitesse);
}
.puce:hover { background: rgba(255, 255, 255, .08); }
.puce.actif { background: #fff; color: #0b0b0f; border-color: #fff; }
.puce small { opacity: .55; font-weight: 600; margin-left: 4px; }
body.en-recherche .filtres { display: none; }

/* ---------- Préparation (tests en cours) ---------- */
.preparation { padding: 16px var(--marge) 4px; }
.preparation-carte {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 61, 90, .16), transparent 55%),
    var(--surface);
  border: 1px solid var(--bord);
  animation: monter .4s ease-out;
}
.progression { width: 78px; height: 78px; transform: rotate(-90deg); flex-shrink: 0; }
.progression circle { fill: none; stroke-width: 8; }
.progression-fond { stroke: var(--surface-3); }
.progression-barre {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 276.46;
  transition: stroke-dashoffset .6s ease;
}
.progression-pourcent {
  position: absolute; left: 18px; top: 50%;
  width: 78px; transform: translateY(-50%);
  text-align: center; font-weight: 800; font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.preparation-texte { min-width: 0; }
.preparation-texte h3 { font-size: 1.05rem; font-weight: 800; }
.etapes { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 3px; font-size: .86rem; color: var(--discret); }
.etapes li { display: flex; align-items: center; gap: 8px; }
.etapes li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--surface-3);
}
.etapes li.en-cours { color: var(--texte); }
.etapes li.en-cours::before {
  border-color: var(--accent); border-right-color: transparent;
  animation: tourner .8s linear infinite;
}
.etapes li.fait { color: var(--texte); }
.etapes li.fait::before {
  border: 0;
  background: #2ecc71 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
#etape-2-detail { font-variant-numeric: tabular-nums; color: var(--discret); }
.astuce {
  margin-top: 10px; font-size: .85rem; color: rgba(255, 255, 255, .75);
  min-height: 2.4em;
  animation: apparaitre .5s ease-out;
}

/* Petite bannière « mise à jour en cours » (quand on affiche déjà une ancienne liste) */
.maj {
  display: flex; align-items: center; gap: 10px;
  margin: 12px var(--marge) 0;
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--bord);
  font-size: .85rem; color: var(--discret);
}
.maj .anneau { width: 16px; height: 16px; margin: 0; }

/* ---------- Rangées ---------- */
.rangees { padding-bottom: 8px; }
.rangee { margin-top: 22px; position: relative; animation: monter .45s ease-out both; }
.rangee-tete {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0 var(--marge); margin-bottom: 10px;
}
.rangee-tete h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.rangee-tete h3 small { color: var(--discret); font-weight: 600; font-size: .8rem; margin-left: 6px; }
.voir-tout {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--discret); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.voir-tout svg { width: 14px; height: 14px; }
.voir-tout:hover { color: var(--texte); }

.piste {
  display: flex; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--marge);
  padding: 4px var(--marge) 10px;
  scrollbar-width: none;
}
.piste::-webkit-scrollbar { display: none; }
.piste > * { scroll-snap-align: start; }

.fleche {
  display: none;
  position: absolute; top: 38px; bottom: 10px; z-index: 3;
  width: 48px;
  align-items: center; justify-content: center;
  background: linear-gradient(to right, rgba(11, 11, 15, .9), transparent);
  opacity: 0; transition: opacity var(--vitesse);
}
.fleche.droite { right: 0; background: linear-gradient(to left, rgba(11, 11, 15, .9), transparent); }
.fleche.gauche { left: 0; }
.fleche svg { width: 28px; height: 28px; }
.rangee:hover .fleche { opacity: 1; }

/* ---------- Cartes de chaînes ---------- */
.carte {
  flex: 0 0 var(--carte);
  width: var(--carte);
  text-align: left;
  position: relative;
}
.carte-visuel {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 0%, hsl(var(--teinte) 55% 32%), hsl(var(--teinte) 45% 13%) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: transform var(--vitesse), box-shadow var(--vitesse);
}
.carte-visuel img {
  width: 66%; height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
}
.carte-initiales {
  font-size: 1.7rem; font-weight: 900; letter-spacing: -.03em;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 3px 12px rgba(0, 0, 0, .4);
}
.carte:hover .carte-visuel { transform: translateY(-3px) scale(1.03); box-shadow: var(--ombre), inset 0 0 0 1px rgba(255, 255, 255, .14); }
.carte:active .carte-visuel { transform: scale(.96); }
.carte.actif .carte-visuel { box-shadow: 0 0 0 2px var(--accent), 0 8px 26px rgba(255, 61, 90, .35); }
.carte.actif .carte-nom { color: #ff8094; }

.badge {
  position: absolute; top: 6px; right: 6px;
  padding: 2px 6px; border-radius: 5px;
  font-size: .62rem; font-weight: 800; letter-spacing: .04em;
  background: rgba(0, 0, 0, .55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge.fhd, .badge.uhd { background: rgba(255, 255, 255, .92); color: #0b0b0f; }
.carte-direct {
  position: absolute; bottom: 6px; left: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 5px;
  font-size: .6rem; font-weight: 800; letter-spacing: .06em;
  background: var(--accent); color: #fff;
}
.carte-direct.lecture { background: #fff; color: var(--accent); }
.carte-coeur {
  position: absolute; bottom: 6px; right: 6px;
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--accent); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.carte-coeur svg { width: 16px; height: 16px; }
.carte-nom {
  margin-top: 7px;
  font-size: .86rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carte-meta {
  font-size: .74rem; color: var(--discret);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Carte « Voir tout » au bout d'une rangée */
.carte-plus .carte-visuel {
  background: var(--surface); color: var(--discret);
  font-weight: 700; font-size: .9rem;
  display: flex; flex-direction: column; gap: 4px;
}
.carte-plus:hover .carte-visuel { color: var(--texte); }

/* Squelettes (pendant le chargement) */
.squelette .carte-visuel,
.squelette .carte-nom,
.squelette .carte-meta {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: reflet 1.3s ease-in-out infinite;
  box-shadow: none;
  color: transparent;
}
.squelette .carte-nom { height: 12px; width: 80%; border-radius: 4px; }
.squelette .carte-meta { height: 10px; width: 50%; border-radius: 4px; margin-top: 6px; }
.squelette-titre {
  height: 16px; width: 140px; border-radius: 5px; margin: 0 var(--marge) 12px;
  background: var(--surface);
}

/* ---------- Grille (catégorie, recherche, Ma liste) ---------- */
.vue-grille { padding: 14px var(--marge) 10px; animation: apparaitre .3s ease-out; }
.vue-grille-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.vue-grille-tete h2 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }
#grille-compte { margin-left: auto; font-size: .85rem; }
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px 10px;
}
.grille .carte { width: auto; }
.sentinelle { height: 1px; }

/* ---------- États vides ---------- */
.vide {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.vide-icone {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--discret);
}
.vide-icone svg { width: 32px; height: 32px; }
.vide h3 { font-size: 1.15rem; font-weight: 800; }
.vide p { color: var(--discret); max-width: 36ch; }
.vide .btn { margin-top: 8px; }

/* ---------- Pied de page ---------- */
.pied {
  margin-top: 36px; padding: 22px var(--marge) 28px;
  border-top: 1px solid var(--bord);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  font-size: .85rem;
}

/* ---------- Navigation du bas (mobile) ---------- */
.nav-bas {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--haut-nav) + var(--bas-sur));
  padding-bottom: var(--bas-sur);
  background: rgba(14, 14, 19, .92);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--bord);
}
.nav-bas button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--discret); font-size: .7rem; font-weight: 600;
  transition: color var(--vitesse);
}
.nav-bas button svg { width: 23px; height: 23px; transition: transform var(--vitesse); }
.nav-bas button.actif { color: var(--texte); }
.nav-bas button.actif svg { transform: scale(1.08); }
.nav-bas button:active svg { transform: scale(.88); }

/* ---------- Panneau (choix du pays) ---------- */
.feuille { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; }
.feuille-fond {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: apparaitre .2s ease-out;
}
.feuille-boite {
  position: relative;
  width: 100%; max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding-bottom: var(--bas-sur);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  animation: glisser-haut .3s cubic-bezier(.2, .8, .2, 1);
}
.feuille-poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 10px auto 2px; }
.feuille-tete { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 4px; }
.feuille-tete h2 { font-size: 1.2rem; font-weight: 900; letter-spacing: -.02em; }
.feuille-recherche { position: relative; padding: 8px 18px 6px; }
.feuille-recherche svg { position: absolute; left: 32px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--discret); }
.feuille-recherche input {
  width: 100%; height: 44px; padding: 0 14px 0 40px;
  border-radius: 12px; border: 1px solid var(--bord);
  background: var(--surface-2); color: var(--texte);
  font-size: 16px; outline: none;
}
.feuille-recherche input:focus { border-color: var(--accent); }
.feuille-contenu { overflow-y: auto; padding: 6px 18px 22px; overscroll-behavior: contain; }
.feuille-contenu h4 {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--discret);
  margin: 16px 0 8px;
}
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.option {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: left; font-weight: 600; font-size: .9rem;
  border: 1px solid transparent;
  transition: background var(--vitesse), border-color var(--vitesse);
}
.option:hover { background: var(--surface-3); }
.option.actif { border-color: var(--accent); background: rgba(255, 61, 90, .12); }
.option .drapeau { font-size: 1.4rem; }
.option-texte { min-width: 0; }
.option-texte small { display: block; color: var(--discret); font-weight: 500; font-size: .74rem; }
.option.large { grid-column: 1 / -1; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; z-index: 200;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--haut-nav) + var(--bas-sur) + 14px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  padding: 11px 16px; border-radius: 12px;
  background: #fff; color: #0b0b0f;
  font-weight: 600; font-size: .9rem;
  box-shadow: var(--ombre);
  animation: toast-entree .3s cubic-bezier(.2, .8, .2, 1);
}
.toast.sortie { animation: toast-sortie .25s ease-in forwards; }

/* =========================================================
   TV'ON+ : bouton, cartes verrouillées, offre, compte
   ========================================================= */
.btn-plus {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px;
  border-radius: 999px;
  background: var(--degrade); color: #fff;
  font-weight: 800; font-size: .8rem; letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(227, 18, 91, .35);
  transition: transform var(--vitesse);
}
.btn-plus svg { width: 15px; height: 15px; color: #ffd76a; }
.btn-plus:active { transform: scale(.94); }
.btn-plus.abonne { background: rgba(255, 201, 77, .14); color: #ffd76a; box-shadow: none; }

/* Carte d'une chaîne réservée à TV'ON+ : visible, mais on sent qu'il manque quelque chose */
.carte.verrouillee .carte-visuel img,
.carte.verrouillee .carte-initiales { filter: grayscale(.35) brightness(.6) blur(.4px); }
.carte.verrouillee .carte-visuel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 60%);
}
.carte-verrou {
  position: absolute; bottom: 6px; left: 6px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 5px;
  font-size: .62rem; font-weight: 900; letter-spacing: .04em;
  background: linear-gradient(135deg, #ffd76a, #ffb22e); color: #1a1205;
}
.carte-verrou svg { width: 11px; height: 11px; }
.carte.verrouillee .carte-nom { color: rgba(255, 255, 255, .78); }

/* Bannière « +120 chaînes avec TV'ON+ » */
.promo {
  display: flex; align-items: center; gap: 12px;
  width: calc(100% - 2 * var(--marge)); margin: 22px var(--marge) 0;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 201, 77, .22), transparent 55%),
    linear-gradient(135deg, rgba(255, 90, 60, .22), rgba(227, 18, 91, .22));
  border: 1px solid rgba(255, 201, 77, .25);
  animation: monter .45s ease-out both;
  transition: transform var(--vitesse);
}
.promo:active { transform: scale(.98); }
.promo-icone {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffd76a, #ffb22e); color: #1a1205;
}
.promo-texte { flex: 1; min-width: 0; display: grid; gap: 2px; }
.promo-texte b { font-size: .98rem; }
.promo-texte small { color: rgba(255, 255, 255, .75); font-size: .8rem; }
.promo-fleche { color: rgba(255, 255, 255, .7); }

/* Panneau (offre, compte) */
.panneau-fermer { position: absolute; top: 10px; right: 12px; z-index: 2; background: var(--surface-2); }
#panneau .feuille-contenu { padding-top: 14px; }

.offre-vue, .compte-vue, .suivi-vue { display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.offre-entete { text-align: center; display: grid; justify-items: center; gap: 6px; }
.offre-couronne {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffd76a, #ffb22e); color: #1a1205;
  box-shadow: 0 10px 30px rgba(255, 178, 46, .35);
}
.offre-couronne svg { width: 28px; height: 28px; }
.offre-entete h2 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.offre-entete h2 em { font-style: normal; background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.offre-entete p { color: var(--discret); font-size: .9rem; }

.avantages { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.avantages li { display: flex; gap: 9px; align-items: flex-start; }
.avantages li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: #2ecc71 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.offre {
  position: relative;
  display: grid; justify-items: center; gap: 2px;
  padding: 18px 6px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 2px solid transparent;
  transition: border-color var(--vitesse), transform var(--vitesse), background var(--vitesse);
}
.offre:active { transform: scale(.97); }
.offre.actif { border-color: var(--accent); background: rgba(255, 61, 90, .1); }
.offre-etiquette {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 8px; border-radius: 999px;
  font-size: .64rem; font-weight: 900; letter-spacing: .03em;
  background: var(--degrade); color: #fff;
}
.offre-nom { font-size: .82rem; font-weight: 700; color: var(--discret); }
.offre.actif .offre-nom { color: var(--texte); }
.offre-jour { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }
.offre-jour small { font-size: .7rem; font-weight: 700; color: var(--discret); margin-left: 1px; }
.offre-total { font-size: .7rem; color: var(--discret); }
.offre-eco {
  margin-top: 3px; padding: 1px 6px; border-radius: 5px;
  font-size: .66rem; font-weight: 800;
  background: rgba(46, 204, 113, .16); color: #5be39a;
}

.petit-titre { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--discret); margin: 2px 0 -4px; }
.methodes { display: flex; flex-wrap: wrap; gap: 8px; }
.methode {
  height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--surface-2); border: 2px solid transparent;
  font-weight: 700; font-size: .87rem;
  transition: border-color var(--vitesse);
}
.methode.actif { border-color: var(--accent); background: rgba(255, 61, 90, .1); }

.btn-payer, .btn-large { width: 100%; height: 52px; font-size: 1.02rem; }
.rassurance { text-align: center; font-size: .76rem; color: var(--discret); margin-top: -4px; }
.offre-erreur {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 61, 90, .14); color: #ff8094; font-size: .88rem;
}

.formulaire-compte { display: grid; gap: 10px; }
.champ { display: grid; gap: 5px; font-size: .82rem; color: var(--discret); font-weight: 600; }
.champ input {
  height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--bord);
  background: var(--surface-2); color: var(--texte);
  font-size: 16px; outline: none;
}
.champ input:focus { border-color: var(--accent); }
.champ input[name=pin] { letter-spacing: .5em; font-weight: 800; }
.aide { font-size: .78rem; color: var(--discret); margin-top: -2px; }

.compte-vue h2, .suivi-vue h2 { font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; }
.compte-carte {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 14px;
  background: var(--surface-2);
}
.compte-carte:not(.premium) .offre-couronne { background: var(--surface-3); color: var(--discret); box-shadow: none; }
.compte-carte div { display: grid; gap: 2px; }
.compte-carte small { color: var(--discret); }

.suivi-vue { align-items: center; text-align: center; padding: 18px 0 8px; }
.anneau.grand { width: 54px; height: 54px; }
.succes { font-size: 3.2rem; line-height: 1; animation: respirer 1.8s ease-in-out infinite; }

/* ---------- Animations ---------- */
@keyframes tourner { to { transform: rotate(360deg); } }
@keyframes reflet { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }
@keyframes monter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes descendre { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes glisser-haut { from { transform: translateY(100%); } to { transform: none; } }
@keyframes respirer { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes pulsation {
  0% { box-shadow: 0 0 0 0 rgba(255, 61, 90, .7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 61, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0); }
}
@keyframes toast-entree { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-sortie { to { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Tablette et ordinateur
   ========================================================= */
@media (max-width: 420px) {
  .btn-plus span { display: none; }
  .btn-plus { width: 34px; padding: 0; justify-content: center; }
  .marque .logo { font-size: 1.35rem; }
}

@media (min-width: 600px) {
  :root { --carte: 168px; --marge: 24px; }
  .options { grid-template-columns: repeat(3, 1fr); }
  .grille { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .lecture-infos { flex-direction: row; align-items: center; justify-content: space-between; }
  #btn-fermer-lecteur { margin-left: 6px !important; }
}

@media (min-width: 900px) {
  :root { --carte: 210px; --marge: 4vw; --haut-barre: 68px; }
  body { padding-bottom: 0; font-size: 16px; }
  .nav-bas { display: none; }
  .nav-haut { display: flex; }
  .toasts { bottom: 28px; }

  .accroche { min-height: 78vh; padding-bottom: 60px; }
  .accroche-logo {
    left: auto; right: 8%; top: 50%; transform: translateY(-55%);
    width: min(30vw, 300px); max-width: none; max-height: 46%;
  }
  .accroche.compacte { min-height: 56vh; }

  .lecteur { padding: calc(var(--haut-barre) + 18px) var(--marge) 0; max-width: 1400px; margin: 0 auto; }
  .ecran { border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
  .lecture-infos { padding: 18px 0 4px; }
  .lecture-texte h2 { font-size: 1.45rem; }

  .fleche { display: flex; }
  .rangee { margin-top: 32px; }
  .rangee-tete h3 { font-size: 1.25rem; }
  .piste { gap: 12px; }
  .carte-nom { font-size: .92rem; }

  .feuille { align-items: center; justify-content: center; }
  .feuille-boite {
    width: min(720px, 92vw); max-height: 80vh;
    border-radius: 22px;
    animation: monter .25s ease-out;
  }
  .feuille-poignee { display: none; }
  .feuille-tete { padding-top: 18px; }
  .options { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1600px) {
  :root { --carte: 240px; }
}

/* Téléphone tourné à l'horizontale pendant la lecture : la vidéo prend tout l'écran */
@media (max-width: 900px) and (orientation: landscape) {
  body.lecture-active .ecran { height: 100vh; aspect-ratio: auto; }
  body.lecture-active .lecteur { padding-top: 0; }
  body.lecture-active .barre,
  body.lecture-active .nav-bas { display: none; }
  body.lecture-active { padding-bottom: 0; }
}
