/* TvZapeo - page d'activation (tv/) - prefixe tv- */

/* ---------- base ---------- */
:root {
  --tv-bg: #0f1522;
  --tv-card: #182131;
  --tv-card-2: #1f2a3d;
  --tv-border: #2a364b;
  --tv-text: #e8edf5;
  --tv-muted: #93a1b6;
  --tv-violet: #8b5cf6;
  --tv-blue: #3b82f6;
  --tv-green: #3ccf8e;
  --tv-red: #f06a6a;
  --tv-rainbow: linear-gradient(90deg, #8b5cf6, #ec6aa0, #f59e3f, #f5c84b, #4cc38a, #3b82f6);
  --tv-radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--tv-bg); color: var(--tv-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .35rem; text-align: center; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .6rem; }
p { margin: 0 0 1rem; }
a { color: #8fb4ff; }

/* ---------- mise en page ---------- */
.tv-rainbow { height: 4px; background: var(--tv-rainbow); }
.tv-wrap { max-width: 560px; margin: 0 auto; padding: 28px 16px 40px; }
.tv-head { text-align: center; margin-bottom: 26px; }
.tv-logo { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 10px 34px rgba(139, 92, 246, .38); }
.tv-brand { font-weight: 700; font-size: 1.15rem; margin: 10px 0 18px; }
.tv-brand span { color: var(--tv-muted); font-weight: 400; }
.tv-lead { color: var(--tv-muted); text-align: center; }
.tv-muted { color: var(--tv-muted); margin: 0; }

/* ---------- cartes / etapes ---------- */
.tv-card { background: var(--tv-card); border: 1px solid var(--tv-border); border-radius: var(--tv-radius); padding: 20px; margin-bottom: 16px; }
.tv-step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tv-rainbow); color: #fff; font-size: .8rem; font-weight: 700; flex: 0 0 auto; }

/* ---------- appareil reconnu ---------- */
.tv-device { display: flex; align-items: center; gap: 14px; background: var(--tv-card-2); border-radius: 12px; padding: 14px; }
.tv-device-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(139, 92, 246, .16); color: #b9a2ff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tv-device-name { font-weight: 600; }
.tv-device-code { white-space: nowrap; color: var(--tv-muted); font-size: .85rem; font-family: Menlo, Consolas, monospace; letter-spacing: .08em; }
.tv-ok { margin-left: auto; color: var(--tv-green); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.tv-link-small { display: inline-block; margin-top: 10px; font-size: .85rem; color: var(--tv-muted); }

/* ---------- formules ---------- */
.tv-plans { display: grid; gap: 10px; }
.tv-plan { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px solid var(--tv-border); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.tv-plan input { position: absolute; opacity: 0; pointer-events: none; }
.tv-plan-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tv-border); flex: 0 0 auto; transition: border-color .2s, box-shadow .2s; }
.tv-plan-body { flex: 1 1 auto; }
.tv-plan-title { font-weight: 600; }
.tv-plan-sub { color: var(--tv-muted); font-size: .85rem; }
.tv-plan-price { font-size: 1.35rem; font-weight: 700; white-space: nowrap; }
.tv-plan:hover { border-color: #3d4a62; }
.tv-plan.is-active { border-color: var(--tv-violet); background: linear-gradient(90deg, rgba(139, 92, 246, .12), rgba(59, 130, 246, .06)); }
.tv-plan.is-active .tv-plan-radio { border-color: var(--tv-violet); box-shadow: inset 0 0 0 5px var(--tv-violet); }
.tv-badge { position: absolute; top: -10px; right: 14px; background: var(--tv-rainbow); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: .02em; }
.tv-note { color: var(--tv-muted); font-size: .85rem; text-align: center; margin: 14px 0 0; }

/* ---------- formulaire ---------- */
.tv-label { display: block; font-weight: 600; margin-bottom: 6px; }
.tv-input { width: 100%; padding: 14px; font-size: 1rem; color: var(--tv-text); background: var(--tv-bg); border: 1.5px solid var(--tv-border); border-radius: 10px; outline: none; transition: border-color .2s; }
.tv-input:focus { border-color: var(--tv-violet); }
.tv-input-code { text-align: center; font-family: Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: .25em; text-transform: uppercase; }
.tv-hint { color: var(--tv-muted); font-size: .85rem; margin-top: 6px; }
.tv-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: .9rem; color: var(--tv-muted); cursor: pointer; }
.tv-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--tv-violet); flex: 0 0 auto; }

/* ---------- boutons ---------- */
.tv-btn { display: block; width: 100%; padding: 16px; border: 0; border-radius: 12px; font-size: 1.05rem; font-weight: 700; color: #fff; cursor: pointer; text-align: center; text-decoration: none; background: linear-gradient(90deg, var(--tv-violet), var(--tv-blue)); box-shadow: 0 8px 26px rgba(99, 102, 241, .35); transition: transform .15s, box-shadow .15s; }
.tv-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(99, 102, 241, .45); }
.tv-btn-ghost { background: transparent; border: 1.5px solid var(--tv-border); box-shadow: none; color: var(--tv-text); }
.tv-pay-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.tv-chip { font-size: .75rem; color: var(--tv-muted); border: 1px solid var(--tv-border); border-radius: 20px; padding: 3px 10px; }
.tv-secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--tv-muted); font-size: .8rem; margin-top: 10px; }

/* ---------- confirmation ---------- */
.tv-success { text-align: center; }
.tv-success-icon { width: 76px; height: 76px; margin: 6px auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(60, 207, 142, .14); color: var(--tv-green); }
.tv-recap { margin: 18px 0 0; text-align: left; }
.tv-recap-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--tv-border); font-size: .95rem; }
.tv-recap-row:last-child { border-bottom: 0; }
.tv-recap-row span { color: var(--tv-muted); }
.tv-wait { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; color: var(--tv-muted); font-size: .9rem; }
.tv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tv-green); animation: tv-pulse 1.4s infinite; }
@keyframes tv-pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 142, .6); } 100% { box-shadow: 0 0 0 12px rgba(60, 207, 142, 0); } }

/* ---------- pied de page ---------- */
.tv-foot { text-align: center; color: var(--tv-muted); font-size: .8rem; margin-top: 26px; }
.tv-foot a { color: var(--tv-muted); }

/* ---------- ordinateur : formules en 3 colonnes ---------- */
@media (min-width: 620px) {
  .tv-wrap { max-width: 720px; padding-top: 44px; }
  .tv-plans { grid-template-columns: repeat(3, 1fr); }
  .tv-plan { flex-direction: column; text-align: center; padding: 24px 14px 18px; }
  .tv-plan-radio { order: 3; }
  .tv-plan-price { font-size: 1.7rem; }
}

/* ---------- langues ---------- */
.tv-langs { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.tv-langs a { padding: 4px 9px; border-radius: 8px; font-size: .75rem; font-weight: 600; text-decoration: none; color: var(--tv-muted); }
.tv-langs a:hover { background: var(--tv-card); }
.tv-langs a.is-active { background: var(--tv-card-2); color: var(--tv-text); }

/* ---------- cet appareil : places du compte ---------- */
.tv-device-add { color: var(--tv-muted); font-size: .9rem; margin: 12px 0 0; }
.tv-device-add strong { color: var(--tv-text); }

/* =========================================================
   LICENCE UNIQUE (1 licence = 1 appareil) + ESPACE CLIENT
   ========================================================= */

/* ---------- carte prix arc-en-ciel (comme le site) ---------- */
.tv-solo { position: relative; text-align: center; padding: 26px 20px 22px; margin-bottom: 16px; border: 2px solid transparent; border-radius: 18px; background: radial-gradient(320px 180px at 50% 0%, rgba(139, 92, 246, .30), transparent 70%) padding-box, linear-gradient(var(--tv-card), var(--tv-card)) padding-box, var(--tv-rainbow) border-box; box-shadow: 0 18px 60px rgba(139, 92, 246, .25); }
.tv-solo-badge { display: inline-block; background: var(--tv-rainbow); color: #fff; font-size: .72rem; font-weight: 800; padding: 4px 14px; border-radius: 20px; letter-spacing: .02em; }
.tv-solo-amount { font-size: 3.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 16px 0 6px; }
.tv-solo-sub { font-weight: 600; }
.tv-solo-once { color: var(--tv-muted); font-size: .85rem; margin-top: 4px; }

/* ---------- liste avec coches ---------- */
.tv-list { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 7px; font-size: .92rem; }
.tv-list li { position: relative; padding-left: 26px; }
.tv-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(60, 207, 142, .15); color: var(--tv-green); font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

/* ---------- encadre info (licence libre, regle) ---------- */
.tv-info { display: flex; gap: 12px; align-items: flex-start; background: rgba(59, 130, 246, .10); border: 1px solid rgba(59, 130, 246, .30); border-radius: 12px; padding: 14px; font-size: .9rem; color: var(--tv-text); margin: 0 0 16px; }
.tv-info svg { flex: 0 0 auto; color: #8fb4ff; margin-top: 1px; }
.tv-info p { margin: 0; }
.tv-info-green { background: rgba(60, 207, 142, .10); border-color: rgba(60, 207, 142, .35); }
.tv-info-green svg { color: var(--tv-green); }

/* ---------- boutons secondaires ---------- */
.tv-btn + .tv-btn { margin-top: 10px; }
.tv-btn-small { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: .82rem; font-weight: 600; border-radius: 9px; border: 1.5px solid var(--tv-border); background: transparent; color: var(--tv-text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.tv-btn-small:hover { border-color: #3d4a62; }
.tv-btn-danger { color: var(--tv-red); border-color: rgba(240, 106, 106, .35); }
.tv-btn-danger:hover { border-color: var(--tv-red); }

/* ---------- espace client : barre du haut ---------- */
.tv-account-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px 0 18px; font-size: .88rem; color: var(--tv-muted); }
.tv-account-bar strong { color: var(--tv-text); word-break: break-all; }

/* ---------- espace client : chiffres ---------- */
.tv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.tv-stat { background: var(--tv-card); border: 1px solid var(--tv-border); border-radius: 12px; padding: 14px 8px; text-align: center; }
.tv-stat-num { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.tv-stat-label { display: block; color: var(--tv-muted); font-size: .76rem; margin-top: 2px; }
.tv-stat-free .tv-stat-num { color: var(--tv-green); }

/* ---------- espace client : lignes appareils / licences ---------- */
.tv-items { display: grid; gap: 10px; }
.tv-item { display: flex; align-items: center; gap: 12px; background: var(--tv-card-2); border-radius: 12px; padding: 12px 14px; }
.tv-item-body { flex: 1 1 auto; min-width: 0; }
.tv-item-title { font-weight: 600; }
.tv-item-sub { color: var(--tv-muted); font-size: .8rem; }
.tv-item .tv-device-icon { width: 40px; height: 40px; border-radius: 10px; }
.tv-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: 1px; }
.tv-tag-green { background: rgba(60, 207, 142, .15); color: var(--tv-green); }
.tv-tag-violet { background: rgba(139, 92, 246, .18); color: #b9a2ff; }
.tv-card-foot { color: var(--tv-muted); font-size: .82rem; margin: 12px 0 0; }

/* ---------- lien "mon compte" ---------- */
.tv-account-link { display: block; text-align: center; margin-top: 18px; font-size: .9rem; }


/* ---------- pages en PHP : complements ---------- */
.tv-info-red { background: rgba(240, 106, 106, .10); border-color: rgba(240, 106, 106, .35); }
.tv-info-red svg { color: var(--tv-red); }
.tv-tag-grey { background: rgba(147, 161, 182, .15); color: var(--tv-muted); }
.tv-btn-green { color: var(--tv-green); border-color: rgba(60, 207, 142, .40); }
.tv-btn-green:hover { border-color: var(--tv-green); }
.tv-item form, .tv-account-bar form { margin: 0; }
.tv-btn-pay { margin-top: 16px; }
.tv-check-top { margin: 0 0 14px; }
.tv-add { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--tv-border); }
.tv-add-row { display: flex; gap: 10px; }
.tv-add-row .tv-input { flex: 1 1 auto; font-size: 1.1rem; padding: 11px; }
.tv-add-row .tv-btn { width: auto; flex: 0 0 auto; padding: 11px 18px; font-size: .95rem; }
.tv-wait.is-ok .tv-dot { animation: none; }
.tv-wait.is-ok { color: var(--tv-green); font-weight: 600; }
.tv-item-actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 480px) {
  .tv-item { flex-wrap: wrap; }
  .tv-item-body { flex: 1 1 calc(100% - 60px); }
  .tv-item-actions { width: 100%; padding-left: 52px; }
}

/* ---------- espace client : nombre de licences ---------- */
.tv-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 16px; }
.tv-qty-row .tv-label { margin: 0; }
.tv-qty { display: flex; align-items: center; border: 1.5px solid var(--tv-border); border-radius: 12px; overflow: hidden; }
.tv-qty-btn { width: 44px; height: 44px; border: 0; background: var(--tv-card-2); color: var(--tv-text); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.tv-qty-btn:hover { background: #283650; }
.tv-qty-btn:disabled { color: var(--tv-border); cursor: default; }
.tv-qty-input { width: 48px; height: 44px; border: 0; background: var(--tv-bg); color: var(--tv-text); text-align: center; font-size: 1.1rem; font-weight: 700; outline: none; }
/* badge (active / sans licence / libre) toujours au debut de la 2e ligne */
.tv-item-sub .tv-tag { margin: 0 8px 0 0; }
.tv-item-sub { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin-top: 3px; }
.tv-item-title { overflow-wrap: anywhere; }
/* sous la case des conditions : rappel de l'essai gratuit */
.tv-terms-note { margin: 6px 0 0 34px; font-size: .8rem; color: var(--tv-muted); }
.tv-check-top + .tv-terms-note { margin: -8px 0 14px 34px; }
