/* Feuille de style des pages de contenu statiques (guides).
 *
 * Ces pages ne passent PAS par React ni par vite : elles sont assemblées par
 * saas/bin/build_pages.py et servies telles quelles, pour rester lisibles par
 * tout robot sans exécuter une ligne de JavaScript. Cette feuille est donc du
 * CSS ordinaire, à un chemin STABLE (pas d'empreinte de build) — ne pas la
 * renommer sans regénérer les pages.
 *
 * Les couleurs et le vocabulaire visuel reprennent ceux de la page d'accueil
 * (saas/frontend/src/styles/index.css, bloc .lp) pour que les guides ne
 * ressemblent pas à un autre site.
 */

:root {
  /* Jetons de la refonte (docs/redesign-site-2026-11.md) : les mêmes que vv.css. */
  --black: #1d2122;
  --anthracite: #3a4246;
  --grey: rgba(29, 33, 34, 0.62);
  --line: rgba(29, 33, 34, 0.1);
  --wash: #f0f3f4;
  --white: #ffffff;
  --accent: #5468d6;
  --accent-ink: #3d4daa;
  --accent-soft: #e4e9ff;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

/* Polices auto-hébergées de la refonte (mêmes fichiers que l'application, servis
   sous /app/fonts/ ; déclarations identiques à saas/frontend/src/styles/vv.css). */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/app/fonts/space-grotesk-latin.woff2") format("woff2"); 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: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/app/fonts/space-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/app/fonts/dm-sans-latin.woff2") format("woff2"); 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: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/app/fonts/dm-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------------------------------------------------------- en-tête */
.pg-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pg-header .shell { display: flex; align-items: center; gap: 0.75rem; min-height: 72px; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.pg-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.pg-brand svg { height: 24px; width: auto; display: block; }
.pg-nav { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.pg-nav a {
  color: var(--grey); text-decoration: none; font-size: 0.875rem;
  padding: 0.4rem 0.7rem; border-radius: 999px; transition: color .2s, background .2s;
}
.pg-nav a:hover { color: var(--black); background: var(--wash); }
.pg-nav a.cta {
  background: var(--black); color: var(--white); font-weight: 500; padding: 0.55rem 1.1rem;
  display: inline-flex; align-items: center; height: 38px;
}
.pg-nav a.cta:hover { background: var(--anthracite); transform: translateY(-1px); }

/* Sélecteur de langue — même vocabulaire visuel que celui de la SPA
   (LangSwitch.tsx) : deux cases jointes, la courante en noir plein. */
.pg-lang {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid rgba(29, 33, 34, 0.18); border-radius: 999px; margin-left: 0.25rem;
}
.pg-lang > * {
  padding: 0.3rem 0.5rem; font-size: 0.6875rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.5;
  text-decoration: none; transition: background .2s, color .2s;
}
.pg-lang .on { background: var(--black); color: var(--white); font-weight: 600; }
.pg-lang a { background: var(--white); color: var(--grey); border-radius: 0; }
.pg-lang a:hover { background: var(--wash); color: var(--black); }
@media (max-width: 720px) { .pg-brand svg { height: 20px; } }
/* Sous 640 px, mesuré : logo 32 + « Démonstrations » 117 + langue 41 + appel à
   l'action 133 + marges 48 = 394 px pour 390 disponibles. La barre passait sur
   deux lignes et faisait 110 px de haut, en position collante. Ne restent donc
   que l'essentiel : le logo (qui mène à l'accueil), la langue, et l'action. */
@media (max-width: 640px) {
  .pg-nav a.secondary { display: none; }
  /* Faute de place, on ne garde que l'AUTRE langue : afficher la langue
     courante serait redondant avec la page qu'on est en train de lire. */
  .pg-lang { border: 0; margin-left: 0; }
  .pg-lang .on { display: none; }
  .pg-lang a { border: 1px solid rgba(29, 33, 34, 0.18); border-radius: 999px; }
}

/* -------------------------------------------------------------- contenu */
.pg-main { padding: 2.5rem 0 4rem; }
@media (min-width: 768px) { .pg-main { padding: 3.5rem 0 5rem; } }

.pg-crumb { font-size: 0.8125rem; color: var(--grey); margin: 0 0 1.5rem; }
.pg-crumb a { color: var(--grey); text-decoration: none; }
.pg-crumb a:hover { color: var(--black); }
.pg-crumb span { margin: 0 0.4rem; }

/* La colonne de lecture est bornée : au-delà de ~70 caractères par ligne
   l'œil perd la ligne suivante. Les tableaux, eux, prennent toute la largeur. */
.prose { max-width: 44rem; }

h1 {
  font-family: var(--display); font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.9rem);
  line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; margin: 0; text-wrap: balance;
}
h2 {
  font-family: var(--display); font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.75rem);
  line-height: 1.2; letter-spacing: -0.02em; font-weight: 700;
  margin: 3rem 0 0.75rem; scroll-margin-top: 5rem;
}
h3 {
  font-family: var(--display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em;
  margin: 2rem 0 0.4rem; scroll-margin-top: 5rem;
}
p { margin: 0 0 1rem; }
.lead { font-size: 1.125rem; line-height: 1.6; color: var(--anthracite); margin: 1.25rem 0 0; }
.updated { font-size: 0.8125rem; color: var(--grey); margin-top: 1rem; }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(84, 104, 214, 0.4); }
a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }
strong { font-weight: 600; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: 0.35rem 0; }
li > ul, li > ol { margin-top: 0.35rem; }
/* Glossaire : le terme porte le poids, la définition respire en dessous.
   <dt>/<dd> plutôt que des titres, parce que c'est la structure exacte de la
   chose — et parce que le générateur en tire les DefinedTerm du JSON-LD. */
dl { margin: 1.5rem 0 0; }
dt {
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.015em;
  margin-top: 1.75rem; scroll-margin-top: 5rem;
}
dt:first-child { margin-top: 0; }
dd { margin: 0.4rem 0 0; padding-left: 1rem; border-left: 2px solid var(--line); }

kbd {
  font-family: inherit; font-size: 0.8125em; background: var(--white);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 0.3rem;
  padding: 0.05em 0.4em; white-space: nowrap;
}
sup { font-size: 0.7em; vertical-align: super; line-height: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em; background: var(--wash); border: 1px solid var(--line);
  border-radius: 0.35rem; padding: 0.08em 0.35em;
}
pre {
  background: var(--wash); border: 1px solid var(--line); border-radius: 0.75rem;
  padding: 1rem; overflow-x: auto; font-size: 0.8125rem; line-height: 1.6;
}
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

/* Encadré : ce qu'il faut retenir, ou l'avertissement qu'on ne veut pas rater */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 0.75rem 0.75rem 0; background: var(--wash);
  padding: 1rem 1.25rem; margin: 1.75rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note-title { font-family: var(--display); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-ink); margin-bottom: 0.4rem; }

/* --------------------------------------------------------------- tableaux */
.table-wrap { overflow-x: auto; margin: 1.75rem 0; border: 1px solid var(--line); border-radius: 0.9rem; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.9375rem; }
thead th {
  text-align: left; font-family: var(--display); font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey);
  padding: 0.85rem 1rem; background: var(--wash); border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
tbody th { text-align: left; font-weight: 600; }
td, tbody th { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* -------------------------------------------------------------------- FAQ */
.qa { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.qa:first-of-type { border-top: 0; }
.qa h3 { margin-top: 0; }
.qa p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- démos/CTA */
.demo-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1.75rem; }
.demo-links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); border-radius: 0.6rem; background: var(--white);
  padding: 0.45rem 0.8rem; font-size: 0.875rem; text-decoration: none; color: var(--black);
  transition: background .2s, border-color .2s;
}
.demo-links a:hover { background: var(--wash); border-color: var(--accent); }

/* ------------------------------------------------ vignettes des exemples */
/* Deux colonnes dès qu'il y a la place : les quatre formats d'un bien se
   comparent à l'œil, ce qui est tout l'intérêt de la page. */
.demo-grid { display: grid; gap: 1.25rem; margin: 2rem 0; }
@media (min-width: 760px) { .demo-grid { grid-template-columns: 1fr 1fr; } }

.demo { margin: 0; }
.demo-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 0.9rem; border: 1px solid var(--line); background: var(--wash);
}
.demo-frame img, .demo-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.demo-frame img { object-fit: cover; }

/* Le bouton EST le lien : sans JavaScript il mène à la visite, avec il
   l'ouvre sur place. Voir assets/demo.js. */
a.demo-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.85rem;
  text-decoration: none; color: var(--white); font-size: 0.9375rem; font-weight: 500;
  text-shadow: 0 1px 3px rgb(10 10 10 / 0.5);
  background: linear-gradient(180deg, rgb(10 10 10 / 0.10), rgb(10 10 10 / 0.45));
  transition: background .25s;
}
.demo-play-icon {
  position: relative; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: rgb(255 255 255 / 0.94); box-shadow: 0 4px 16px rgb(10 10 10 / 0.35);
  transition: transform .25s;
}
.demo-play-icon::after {          /* le triangle, centré optiquement */
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-left: 0.85rem solid var(--black);
  border-top: 0.55rem solid transparent; border-bottom: 0.55rem solid transparent;
  transform: translate(-40%, -50%);
}
a.demo-play:hover { background: linear-gradient(180deg, rgb(10 10 10 / 0.05), rgb(10 10 10 / 0.55)); }
a.demo-play:hover .demo-play-icon { transform: scale(1.07); }

.demo figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem;
  margin-top: 0.7rem;
}
.demo-fmt { font-size: 0.9375rem; font-weight: 600; }
.demo-num { font-size: 0.8125rem; color: var(--grey); font-variant-numeric: tabular-nums; }
/* Un décompte incomplet se voit : c'est l'information de la page, pas un
   détail à noyer dans le gris. */
.demo-num.partial { color: var(--black); font-weight: 500; }

.cta-box {
  margin: 3rem 0 0; padding: 1.75rem; border: 1px solid var(--line);
  border-radius: 1rem; background: var(--wash);
}
.cta-box h2 { margin-top: 0; }
.cta-box { background: var(--wash); border-radius: 1.5rem; padding: 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0 1.5rem; height: 44px; font-size: 0.9375rem;
  font-weight: 500; text-decoration: none; transition: background .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--accent); color: var(--white); box-shadow: 0 0 0 1px rgba(84, 104, 214, 0.12), 0 18px 48px -20px rgba(84, 104, 214, 0.45); }
.btn-dark:hover { background: var(--accent-ink); }
.btn-light { background: var(--white); color: var(--black); border: 1px solid rgba(29, 33, 34, 0.18); }
.btn-light:hover { background: var(--wash); }

/* --------------------------------------------------------------- voir aussi */
.also { margin-top: 3.5rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.also h2 { margin-top: 0; font-size: 1.0625rem; }
.also ul { list-style: none; padding: 0; display: grid; gap: 0.75rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .also ul { grid-template-columns: 1fr 1fr; } }
.also li { margin: 0; }
.also a {
  display: block; border: 1px solid var(--line); border-radius: 0.9rem;
  padding: 1rem 1.15rem; text-decoration: none; color: inherit; background: var(--white);
  transition: box-shadow .25s, border-color .25s;
}
.also a:hover { border-color: rgba(29, 33, 34, 0.18); box-shadow: 0 1px 2px rgba(23, 26, 30, 0.04), 0 12px 32px -12px rgba(23, 26, 30, 0.1); transform: translateY(-2px); }
.also a { transition: box-shadow .25s, border-color .25s, transform .25s; }
.also strong { display: block; font-family: var(--display); font-size: 0.9375rem; font-weight: 600; }
.also em { display: block; font-style: normal; font-size: 0.8125rem; color: var(--grey); margin-top: 0.25rem; }

/* ------------------------------------------------------------------ pied */
.pg-footer { background: var(--wash); color: var(--black); border-top: 1px solid var(--line); margin-top: 4rem; }
.pg-footer .shell { padding-top: 3rem; padding-bottom: 3rem; text-align: center; }
.pg-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; font-size: 0.875rem; }
/* Les guides d'abord, le légal ensuite et séparé : deux rangs de nature
   différente sur une seule ligne se lisent comme une bouillie de liens. */
.pg-footer-head {
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent-ink); font-family: var(--display); margin-bottom: 1rem;
}
.pg-footer-legal {
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.pg-footer a { color: var(--grey); text-decoration: none; transition: color .2s; }
.pg-footer a:hover { color: var(--black); }
.pg-footer .brand { color: var(--black); font-weight: 600; font-family: var(--display); }
.pg-footer .vat { font-size: 0.75rem; color: var(--grey); margin-top: 1.25rem; }

/* Légende de tableau lisible par un lecteur d'écran, invisible à l'œil : le
   tableau a déjà son titre juste au-dessus, le répéter serait du bruit visuel. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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