/* SPDX-License-Identifier: GPL-3.0-or-later
   Site vitrine MonTube. Une page statique, sans framework ni build. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson_hyperlegible_regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson_hyperlegible_bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Jetons. Les couleurs viennent du design system de l'app :
   accent 047857, point « direct » C62828, fond TV 0E1311, texte TV E4ECE8. */
:root {
  --bg: #f3f8f5;
  --surface: #ffffff;
  --ink: #0f1e18;
  --muted: #4c5f57;
  --line: #cfdcd5;
  --accent: #047857;
  --on-accent: #ffffff;
  --accent-soft: #dcefe6;
  --live: #c62828;
  --bezel: #1a211e;

  --font: "Atkinson Hyperlegible", "Segoe UI", Roboto, system-ui, sans-serif;
  --measure: 62ch;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1311;
    --surface: #16201c;
    --ink: #e4ece8;
    --muted: #9fb3aa;
    --line: #27352e;
    --accent: #3ddc97;
    --on-accent: #062b1e;
    --accent-soft: #15302a;
    --bezel: #2a3530;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1311;
  --surface: #16201c;
  --ink: #e4ece8;
  --muted: #9fb3aa;
  --line: #27352e;
  --accent: #3ddc97;
  --on-accent: #062b1e;
  --accent-soft: #15302a;
  --bezel: #2a3530;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--accent-soft);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }

/* Boutons */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 700;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 120ms ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.big { font-size: 1.15rem; padding: 0.75em 1.4em; }

/* En-tête */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}
.top nav { display: flex; align-items: center; gap: 1.5rem; }
.top nav a:not(.button) { color: var(--ink); text-decoration: none; }
.top nav a:not(.button):hover { text-decoration: underline; }

/* Accroche : texte à gauche, télé et téléphone à droite. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 6rem) var(--gutter) clamp(4rem, 8vw, 8rem);
}
.pitch .lead { font-size: 1.25rem; margin: 1.5rem 0 2rem; max-width: 38ch; }
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  max-width: none;
}
.meta { color: var(--muted); font-size: 0.95rem; line-height: 1.35; }

.devices {
  margin: 0;
  position: relative;
  padding-bottom: 12%;
  padding-right: 12%;
}
.devices .tv {
  background: #000;
  border: 10px solid var(--bezel);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(6, 30, 20, 0.5);
}
.devices .phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26%;
  background: #000;
  border: 7px solid var(--bezel);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(6, 30, 20, 0.6);
}
.devices .phone img { border-radius: 20px; }
.devices figcaption {
  position: absolute;
  left: 0;
  bottom: 2%;
  max-width: 60%;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Sections */
main > section { padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }
.functions { border-top: 1px solid var(--line); }
.functions dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2rem 3rem;
  margin: 2rem 0 0;
  max-width: 68rem;
}
.functions dt { font-weight: 700; font-size: 1.2rem; margin-bottom: 0.4rem; }
.functions dd { margin: 0; color: var(--muted); }

/* Téléchargement : encart sur fond accent doux, le seul bloc coloré de la page. */
.download {
  background: var(--accent-soft);
}
.download > * { max-width: 68rem; }
.links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
/* Encadré « Sur TV » : adresse à saisir dans Downloader. */
.tv-install {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}
/* Encadré « Soutenir » : même carte que « Sur TV », boutons de don côte à côte. */
.support {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem 1.4rem;
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}
.support h3 { margin-top: 0; }
.support p { margin: 0 0 0.25rem; color: var(--muted); }
.support .links { margin-top: 1rem; gap: 0.75rem 1rem; }
.tv-install p { margin: 0; }
.tv-install a { color: var(--ink); }
.steps { padding-left: 1.3rem; max-width: var(--measure); }
.steps li { margin-bottom: 0.5rem; }

/* Questions fréquentes : même grille que les fonctions, questions en gras. */
.faq { border-top: 1px solid var(--line); }
.faq dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2rem 3rem;
  margin: 2rem 0 0;
  max-width: 68rem;
}
.faq dt { font-weight: 700; font-size: 1.2rem; margin-bottom: 0.4rem; }
.faq dd { margin: 0; color: var(--muted); }

/* Pages de texte (politique de confidentialité, 404) : une colonne lisible. */
.prose {
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  max-width: calc(var(--measure) + 2 * var(--gutter));
}
.prose > section { padding: 0; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1rem; }
.prose h2 { margin-top: 3rem; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.3rem; max-width: var(--measure); }
.prose li { margin-bottom: 0.6rem; }
.prose li strong { color: var(--ink); }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.crumbs li + li::before { content: "›"; margin-right: 0.5rem; }

/* Journal des versions : liste bordée à gauche, ligne par version. */
.changelog article {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-top: 1.5rem;
  max-width: 68rem;
}
.changelog article + article { margin-top: 2.5rem; }
.changelog h3 { margin-top: 0; font-size: 1.6rem; }
.changelog .when { color: var(--muted); margin-bottom: 0.75rem; }
.changelog ul { padding-left: 1.3rem; margin: 0; max-width: var(--measure); }
.changelog li { margin-bottom: 0.35rem; }

footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--gutter) 3.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
footer p { max-width: 72ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.5rem; }

/* Tablette et téléphone */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .devices { margin-top: 1rem; }
}
@media (max-width: 600px) {
  .top { padding-top: 1rem; padding-bottom: 1rem; }
  .top nav a:not(.button) { display: none; }
  .button.big { white-space: normal; }
  .devices { padding-right: 0; padding-bottom: 0; }
  .devices .phone {
    position: static;
    width: 44%;
    margin: 1.25rem auto 0;
  }
  .devices figcaption { position: static; max-width: none; margin-top: 1rem; text-align: center; }
}

/* Installation TV : l’adresse courte reste lisible à distance. */
.tv-install h3 { margin: 0 0 0.75rem; }
.tv-install p + p { margin-top: 0.75rem; color: var(--muted); }
.tv-address { font-weight: 700; white-space: nowrap; }
#soutenir { scroll-margin-top: 1rem; }
