/* IPTV+'s look on the web: the TV app's theme (tv-web/src/ui/theme.css): black, its card greys, the brand red, white
   capsule buttons; the system's own font (no font is downloaded). Dark only, as the apps. */
:root {
  --bg: #000;
  --card: rgb(19, 19, 19);       /* Color.fluxCard */
  --panel: rgb(28, 28, 28);      /* TV.panel */
  --panel-hi: rgb(48, 48, 48);   /* TV.panelHi */
  --stroke: rgb(43, 43, 43);     /* Color.fluxStroke */
  --flux: rgb(230, 46, 36);      /* the brand red */
  --flux-hi: rgb(255, 93, 83);   /* the red that reads on black (links) */
  --text: #fff;
  --secondary: rgba(255, 255, 255, 0.66);
  --green: rgb(48, 209, 88);
  --radius: 14px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 18px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
a { color: var(--flux-hi); text-underline-offset: 3px; }

.top { padding: 28px 24px 8px; max-width: 1120px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.brand img { display: block; }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px; }
.foot { max-width: 1120px; width: 100%; margin: 0 auto; padding: 24px 24px 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot a { color: var(--secondary); font-size: 16px; white-space: nowrap; }

.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 22px; padding: 40px; }
.narrow { max-width: 520px; margin: 24px auto; }
h1 { font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
h3 { font-size: 21px; margin: 36px 0 8px; }
h3:first-child { margin-top: 0; }
p { margin: 0 0 16px; }
.hint, .sub { color: var(--secondary); font-size: 16px; }
.sub { display: block; }
.big { font-size: 24px; font-weight: 700; }
.good { color: var(--green); }
.price { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.warn { padding: 14px 16px; border-left: 4px solid var(--flux); background: var(--panel); border-radius: 8px; }

.field { margin: 0 0 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field .hint { margin: 8px 0 0; }
input[type=text], input[type=email], input[type=password], input:not([type]) {
  width: 100%; min-height: 56px; padding: 12px 16px; font: inherit; font-size: 19px; color: var(--text);
  background: var(--panel); border: 1px solid var(--panel-hi); border-radius: 12px;
}
input[name=code] { letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; }
input:focus-visible { border-color: #fff; }
.check, .choice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; cursor: pointer; }
.check input, .choice input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--flux); }
.choices { border: 0; padding: 0; margin: 0 0 20px; }
.choices legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.choice { padding: 14px 16px; background: var(--panel); border-radius: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px;
  border: 0; border-radius: 28px; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.primary { background: #fff; color: #000; }          /* TVCapsuleButtonStyle, prominent */
.btn.quiet { background: rgba(255, 255, 255, 0.17); color: #fff; }
.btn.primary:not(:disabled):hover { background: #e6e6e6; }
.btn.quiet:not(:disabled):hover { background: rgba(255, 255, 255, 0.24); }
.btn.danger { background: var(--flux); color: #fff; }
.btn.link { background: none; color: var(--flux-hi); min-height: 44px; padding: 0; font-size: 18px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: default; }
form .btn.primary, form .btn.danger { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .btn { flex: 1 1 200px; }
.links { margin-top: 20px; }
.links .btn + .btn { margin-left: 24px; } /* two link-buttons in one line (/tv) never read as one */

.msg { padding: 14px 16px; border-radius: 12px; background: var(--panel); }
.msg.error { border-left: 4px solid var(--flux); }
.msg.ok { border-left: 4px solid var(--green); }
.badge { display: inline-block; font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 10px; background: rgba(48, 209, 88, 0.16); color: var(--green); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 16px 32px; margin: 0 0 28px; }
.facts dt { color: var(--secondary); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.confirm { padding: 16px; margin: 0 0 16px; background: var(--panel); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.confirm p { flex: 1 1 100%; margin: 0; font-weight: 600; }

.devices { list-style: none; padding: 0; margin: 0; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--stroke); }
.devices li > div:first-child { min-width: 0; }

.tvbox { padding: 20px; margin: 0 0 20px; background: var(--panel); border-radius: var(--radius); text-align: center; }
.tvbox .big { margin: 0; overflow-wrap: anywhere; }

/* /compte: a side menu, a top menu on a phone */
.account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.side a, .side .btn.link {
  display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; width: 100%;
  color: var(--secondary); text-decoration: none; font-weight: 600; font-size: 18px; justify-content: flex-start;
}
.side a:hover, .side .btn.link:hover { color: #fff; background: var(--card); }
.side a[aria-current=page] { color: #fff; background: var(--panel); }
.side li:last-child { margin-top: 16px; border-top: 1px solid var(--stroke); padding-top: 16px; }

@media (max-width: 820px) {
  .account { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side ul { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .side li { flex: none; }
  .side li:last-child { margin: 0; border: 0; padding: 0; }
  .side a, .side .btn.link { width: auto; white-space: nowrap; background: var(--card); border-radius: 24px; }
}
@media (max-width: 560px) {
  .top { padding: 20px 16px 0; }
  main { padding: 16px; }
  .foot { padding: 16px 16px 32px; }
  .card { padding: 24px 20px; border-radius: 18px; }
  .narrow { margin: 8px auto; }
  h1 { font-size: 28px; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 12px; }
}
.code { font-size: 1.2em; letter-spacing: 0.08em; white-space: nowrap; }

/* The top bar (js/ui.js topbar): the brand, « Fonctionnalités », « Aide » and « Mon compte », visible at every width
   without a menu; on a narrow phone the brand keeps its logo only (its link's label says IPTV+). */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
a.brand { color: var(--text); text-decoration: none; }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.bar nav a:not(.btn) { color: var(--secondary); font-weight: 600; font-size: 17px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.bar nav a:not(.btn):hover, .bar nav a[aria-current=page]:not(.btn) { color: #fff; }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 16px; white-space: nowrap; }

/* The public pages: /, /fonctionnalites, /aide */
.public h1 { font-size: clamp(32px, 5vw, 56px); }
.public h1, .public h2 { overflow-wrap: break-word; hyphens: manual; text-wrap: balance; }
h2 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 16px; }
.block { padding-top: 56px; scroll-margin-top: 16px; }
.block h3 { margin: 0 0 8px; font-size: 20px; }
.lead { font-size: 20px; color: var(--secondary); max-width: 62ch; }
.hero { display: grid; gap: 32px; align-items: center; padding-top: 8px; }
.grid { display: grid; gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 24px; }
.tile p:last-child, .tile ul { margin-bottom: 0; }
.tile ul { padding-left: 22px; }
.offer { max-width: 720px; }
.facts-list { padding-left: 22px; max-width: 62ch; }
.facts-list li + li { margin-top: 8px; }
.row.end { align-items: center; justify-content: space-between; margin-top: 56px; }
.public .row .btn { flex: 0 1 auto; }
.grid + p { margin-top: 20px; }

/* Our own frames around the captures: a TV, a phone, a computer window. */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot .screen { overflow: hidden; background: var(--panel); }
.chapter .shot { margin-top: 16px; }
.shot.tv .screen { position: relative; overflow: visible; border: 8px solid rgb(26, 26, 26); border-radius: 12px; box-shadow: 0 0 0 1px var(--stroke); }
.shot.tv img { border-radius: 3px; }
.shot.tv .screen::after { content: ""; position: absolute; left: 36%; right: 36%; bottom: -15px; height: 6px; border-radius: 0 0 6px 6px; background: rgb(38, 38, 38); }
.shot.tv figcaption { margin-top: 22px; }
.shot.phone .screen { border: 8px solid rgb(26, 26, 26); border-radius: 36px; box-shadow: 0 0 0 1px var(--stroke); max-width: 300px; margin: 0 auto; }
.shot.mac .screen { border: 1px solid var(--stroke); border-top: 20px solid rgb(38, 38, 38); border-radius: 12px; }
.shot figcaption { color: var(--secondary); font-size: 16px; margin-top: 12px; }
.shots { display: grid; gap: 28px; }
.shots.apple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots.apple .mac { grid-column: 1 / -1; }

/* Summaries and the help's questions (details / summary: no script). */
.summary ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.summary a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--card); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; }
.summary a:hover { background: var(--panel-hi); }
.qa { border-top: 1px solid var(--stroke); }
.qa summary { cursor: pointer; padding: 14px 0; font-weight: 700; }
.qa > :not(summary) { max-width: 70ch; }
.qa ul { padding-left: 22px; }
.qa li + li { margin-top: 6px; }
.langs { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--secondary); font-size: 16px; }
.foot p { color: var(--secondary); font-size: 15px; margin: 16px 0 0; }

@media (min-width: 600px) {
  .grid.two, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shots.gallery { grid-template-columns: 2fr 2fr 1fr; align-items: center; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .shots.apple { grid-template-columns: 1fr 1fr 2.6fr; align-items: center; }
  .shots.apple .mac { grid-column: auto; }
}
@media (max-width: 480px) {
  .public .row .btn { flex: 1 1 100%; }
  .bar .brand span { display: none; }
  .bar nav { gap: 14px; }
  .bar nav a:not(.btn) { font-size: 16px; }
  .lead { font-size: 18px; }
  .shot.phone .screen { border-width: 5px; border-radius: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
