/* Site vitrine KAI TV.
 *
 * Meme identite que l'application : fond nuit, violet de marque, menthe pour
 * l'etat actif, police Golos Text (servie depuis /app/assets/fonts : un seul
 * exemplaire pour le site et l'appli). Aucune contrainte TV ici : le site vise
 * des navigateurs recents (telephone et ordinateur). */

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/app/assets/fonts/GolosText-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/app/assets/fonts/GolosText-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113;
}

:root {
  --bg: #0e1122;
  --bg-2: #121528;
  --panel: #1a1e33;
  --panel-2: #22273f;
  --line: #2b3050;
  --fg: #f4f5fb;
  --fg-dim: #a3abc8;
  --fg-faint: #6f789c;
  --accent: #8168fe;
  --accent-2: #9c88ff;
  --pink: #fb5a72;
  --mint: #a5ece8;
  --warn: #fde047;
  --radius: 18px;
  --wrap: 1140px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 900; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.dim { color: var(--fg-dim); }
.faint { color: var(--fg-faint); font-size: 14px; }
.eyebrow { color: var(--mint); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 16px; color: var(--fg);
  background: var(--panel-2); border: 1px solid var(--line);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: #2b3150; }
.btn-primary { background: linear-gradient(135deg, var(--pink), var(--accent)); border: 0; color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #ff6a80, var(--accent-2)); }
.btn-small { min-height: 40px; padding: 8px 18px; font-size: 15px; }

/* --- En-tete --- */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(14, 17, 34, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(43, 48, 80, .6); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--fg-dim); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); text-decoration: none; }
.nav a.btn, .nav a.btn:hover { color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 10px; width: 44px; height: 44px; font-size: 20px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; }
  .nav .btn { margin-top: 8px; }
}

/* --- Sections --- */
section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid rgba(43,48,80,.5); border-bottom: 1px solid rgba(43,48,80,.5); }
.section-head { max-width: 720px; margin-bottom: 40px; }

/* --- Accueil : hero --- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(129,104,254,.35), transparent); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 20px; color: var(--fg-dim); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.disclaimer { font-size: 14px; color: var(--fg-faint); max-width: 560px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Maquette d'ecran (faite en CSS : pas d'image a maintenir) */
.mock { background: linear-gradient(180deg, #1c2038, #13162a); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.mock-row { display: flex; gap: 12px; }
.mock-tile { flex: 1; aspect-ratio: 2/3; border-radius: 12px; position: relative; overflow: hidden; }
.mock-tile span { position: absolute; left: 10px; right: 10px; bottom: 10px; font-weight: 700; font-size: 13px; }
.mock-tile i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent-2); }
.t1 { background: linear-gradient(160deg, #3b2f78, #1b1d3a); }
.t2 { background: linear-gradient(160deg, #1f5c58, #142037); }
.t3 { background: linear-gradient(160deg, #6a2d4c, #1c1b33); }
.mock-label { font-size: 13px; color: var(--mint); font-weight: 700; margin: 2px 0 10px; letter-spacing: .06em; text-transform: uppercase; }
.mock-resume { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); }
.mock-resume b { display: block; font-size: 15px; }
.mock-resume small { color: var(--fg-dim); }
.mock-dot { width: 40px; height: 40px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--pink), var(--accent)); display: grid; place-items: center; font-weight: 900; }

/* --- Fonction phare (deux colonnes, alternees) --- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.is-reverse .feature-text { order: 2; }
.feature ul { list-style: none; padding: 0; margin: 20px 0 0; }
.feature li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--fg-dim); }
.feature li strong { color: var(--fg); }
.feature li::before { content: ''; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--pink), var(--accent)); }
.feature .note { margin-top: 16px; font-size: 14px; color: var(--fg-faint); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.is-reverse .feature-text { order: 0; }
}

/* Maquette des appareils (reprise) */
.devices { display: flex; align-items: flex-end; gap: 14px; }
.dev { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.dev-tv { flex: 3; aspect-ratio: 16/9; display: flex; flex-direction: column; justify-content: flex-end; }
.dev-phone { flex: 1; aspect-ratio: 9/17; border-radius: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
.dev small { color: var(--fg-dim); font-size: 12px; }
.dev b { font-size: 14px; }
.bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 62%; background: var(--accent-2); }
.sync-arrow { color: var(--mint); font-weight: 900; align-self: center; font-size: 22px; }

/* Maquette du replay du direct */
.timeline { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.tl-live { color: #fff; background: #ef4056; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 800; }
.tl-replay { color: #1a1a1a; background: var(--warn); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 800; }
.tl-track { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); }
.tl-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 6px; background: rgba(129,104,254,.35); }
.tl-track b { position: absolute; left: 0; top: 0; bottom: 0; width: 71%; border-radius: 6px; background: var(--accent-2); }
.tl-track em { position: absolute; left: 71%; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(129,104,254,.4); }
.tl-times { display: flex; justify-content: space-between; color: var(--fg-dim); font-size: 13px; margin-top: 10px; }
.tl-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tl-keys span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }

/* --- Grille de fonctions --- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--fg-dim); margin: 0; font-size: 16px; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(129,104,254,.16); color: var(--accent-2); }
.ico svg { width: 24px; height: 24px; }

/* --- Etapes --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin-bottom: 14px; font-weight: 900; background: linear-gradient(135deg, var(--pink), var(--accent)); }
.step p { color: var(--fg-dim); margin: 0; }

/* --- Appareils --- */
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms span, .platforms a { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; }

/* --- Bandeau d'appel --- */
.platforms a { color: var(--fg); }
.platforms a:hover { text-decoration: none; border-color: var(--accent-2); background: var(--panel-2); }
.cta { text-align: center; }
.cta .hero-actions { justify-content: center; }

/* --- Pages interieures --- */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head p { color: var(--fg-dim); font-size: 19px; max-width: 720px; }
.prose { max-width: 780px; }
.prose h2 { font-size: 26px; margin-top: 40px; }
.prose h3 { margin-top: 26px; }
.prose ul, .prose ol { padding-left: 22px; color: var(--fg-dim); }
.prose li { margin-bottom: 6px; }
.prose p { color: var(--fg-dim); }
.prose strong { color: var(--fg); }
.todo { background: rgba(253, 224, 71, .12); color: var(--warn); border-radius: 6px; padding: 1px 6px; font-weight: 700; }

/* Telechargements */
.dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 800px) { .dl { grid-template-columns: 1fr; } }
.dl .card { display: flex; flex-direction: column; }
.dl .card ol { color: var(--fg-dim); padding-left: 20px; margin: 12px 0 18px; }
.dl .card ol li { margin-bottom: 6px; }
.dl .card .btn { align-self: flex-start; margin-top: auto; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; margin-left: 8px; vertical-align: middle; background: rgba(165,236,232,.14); color: var(--mint); }
.tag-beta { background: rgba(253,224,71,.14); color: var(--warn); }
code, .code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; color: var(--fg); font-size: .95em; }
.big-code { display: inline-block; font-size: 22px; font-weight: 800; letter-spacing: .02em; padding: 8px 14px; margin: 4px 0; }

/* FAQ */
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-2); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq .a { padding: 0 22px 18px; color: var(--fg-dim); }
.faq .a p:last-child { margin-bottom: 0; }

/* --- Pied de page --- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--fg-dim); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-foot h4 { color: var(--fg); margin: 0 0 10px; font-size: 15px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot a { color: var(--fg-dim); }
.site-foot .legal-line { margin-top: 28px; font-size: 13px; color: var(--fg-faint); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
