/*
 * Livre des recettes, le site.
 *
 * Le socle visuel de l'application, repris tel quel (public/css/theme.css) :
 * papier ivoire, bleu nuit du menu, bleu d'action, encres de domaine,
 * Commissioner, arrondis et ombres. S'y ajoutent l'échelle typographique
 * d'une page qui se lit et les mises en page de tous les écrans, du
 * téléphone au grand moniteur.
 */

@font-face {
  font-family: 'Commissioner';
  src: url('/polices/commissioner-latin.woff2?v=68c544f00e') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  --fond: #f6f4ef;
  --fond-2: #efebe3;
  --carte: #ffffff;
  --carte-2: #faf8f3;
  --bordure: #e6e1d6;
  --bordure-douce: #efebe3;
  --bordure-controle: #cdc5b6;
  --survol: rgba(60, 50, 30, 0.045);

  --texte: #1c1a17;
  --texte-2: #524d45;
  --texte-3: #6f685d;

  --rail: #1a2f75;
  --rail-haut: #1e3683;
  --rail-texte: #c7d2fe;
  --rail-texte-fort: #ffffff;
  --rail-filet: rgba(255, 255, 255, 0.14);
  --rail-survol: rgba(255, 255, 255, 0.08);
  --logo-haut: #3b82f6;
  --logo-bas: #2563eb;

  --accent: #2563eb;
  --accent-survol: #1d4ed8;
  --accent-doux: #eef3ff;
  --accent-texte: #1d4ed8;
  --anneau: rgba(37, 99, 235, 0.22);

  --vente: #2563eb;
  --vente-doux: #eef3ff;
  --vente-texte: #1d4ed8;
  --prestation: #16a34a;
  --prestation-doux: #e8f7ee;
  --prestation-texte: #15803d;
  --achat: #7c3aed;
  --achat-doux: #f3eefe;
  --achat-texte: #6d28d9;
  --sarcelle: #0f766e;
  --sarcelle-doux: #e2f2ef;
  --sarcelle-texte: #0d5f58;
  --sarcelle-rail: #5eead4;
  --framboise: #be185d;
  --framboise-doux: #fbe8f0;
  --framboise-texte: #9d174d;
  --or: #a16207;
  --or-doux: #f8efd4;
  --or-texte: #854d0e;
  --alerte: #ea580c;
  --alerte-doux: #fff1e6;
  --alerte-texte: #9a3412;
  --danger: #dc2626;
  --danger-doux: #fdecec;
  --danger-texte: #b91c1c;
  --champ: #ffffff;

  --ombre-carte: 0 1px 2px rgba(41, 32, 15, 0.06), 0 1px 1px rgba(41, 32, 15, 0.04);
  --ombre-haute: 0 1px 3px rgba(41, 32, 15, 0.08), 0 6px 12px -6px rgba(41, 32, 15, 0.16);
  --ombre-ecran: 0 1px 2px rgba(41, 32, 15, 0.06), 0 8px 12px -8px rgba(41, 32, 15, 0.24);
  --bouton: #2563eb;
  --bouton-survol: #1d4ed8;

  --rayon-petit: 8px;
  --rayon: 10px;
  --rayon-groupe: 11px;
  --rayon-moyen: 12px;
  --rayon-carte: 14px;
  --rayon-ecran: 18px;

  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 32px;
  --e7: 48px;
  --e8: 64px;

  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --rapide: 150ms;
  --moyen: 260ms;
  --ressort-vif: linear(0, 0.0209, 0.0651, 0.1298, 0.2036, 0.2741, 0.3506, 0.4181, 0.4874, 0.5512, 0.6045, 0.6569, 0.7036, 0.7415, 0.7781, 0.8075, 0.8355, 0.8598, 0.8791, 0.8973, 0.9129, 0.9252, 0.9368, 0.9458, 0.9543, 0.9615, 0.9671, 0.9723, 0.9767, 0.9801, 0.9833, 0.9858, 0.9881, 0.99, 0.9915, 0.9929, 0.9941, 0.995, 0.9958, 0.9964, 1);
  --ressort-vif-duree: 465ms;

  --police: 'Commissioner', 'Segoe UI', system-ui, sans-serif;
  --largeur: 1200px;
  --gouttiere: clamp(16px, 4.5vw, 40px);
  --section: clamp(72px, 9vw, 128px);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --fond: #121314;
  --fond-2: #17181b;
  --carte: #1b1c1f;
  --carte-2: #17181b;
  --bordure: #2c2d32;
  --bordure-douce: #232428;
  --bordure-controle: #44464d;
  --survol: rgba(255, 255, 255, 0.05);
  --texte: #ecebe8;
  --texte-2: #b5b2ab;
  --texte-3: #969289;
  --rail: #0c0d0f;
  --rail-haut: #101114;
  --rail-texte: #b8b5ae;
  --rail-filet: rgba(255, 255, 255, 0.09);
  --rail-survol: rgba(255, 255, 255, 0.06);
  --accent: #3b82f6;
  --accent-survol: #2563eb;
  --accent-doux: rgba(59, 130, 246, 0.14);
  --accent-texte: #93c5fd;
  --anneau: rgba(59, 130, 246, 0.35);
  --vente: #3b82f6;
  --vente-doux: rgba(59, 130, 246, 0.15);
  --vente-texte: #93c5fd;
  --prestation: #1faa55;
  --prestation-doux: rgba(34, 197, 94, 0.14);
  --prestation-texte: #86efac;
  --achat: #a78bfa;
  --achat-doux: rgba(167, 139, 250, 0.15);
  --achat-texte: #c4b5fd;
  --sarcelle: #2dd4bf;
  --sarcelle-doux: rgba(45, 212, 191, 0.13);
  --sarcelle-texte: #5eead4;
  --framboise: #f472b6;
  --framboise-doux: rgba(244, 114, 182, 0.14);
  --framboise-texte: #f9a8d4;
  --or: #eab308;
  --or-doux: rgba(234, 179, 8, 0.14);
  --or-texte: #fcd34d;
  --alerte: #f97316;
  --alerte-doux: rgba(249, 115, 22, 0.14);
  --alerte-texte: #fdba74;
  --danger: #ef4444;
  --danger-doux: rgba(239, 68, 68, 0.14);
  --danger-texte: #fca5a5;
  --champ: #161719;
  --ombre-carte: 0 1px 2px rgba(0, 0, 0, 0.35);
  --ombre-haute: 0 2px 6px rgba(0, 0, 0, 0.4), 0 6px 12px -6px rgba(0, 0, 0, 0.55);
  --ombre-ecran: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 12px -8px rgba(0, 0, 0, 0.6);
}

/* Sans choix enregistré, le site suit le système. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --fond: #121314;
    --fond-2: #17181b;
    --carte: #1b1c1f;
    --carte-2: #17181b;
    --bordure: #2c2d32;
    --bordure-douce: #232428;
    --bordure-controle: #44464d;
    --survol: rgba(255, 255, 255, 0.05);
    --texte: #ecebe8;
    --texte-2: #b5b2ab;
    --texte-3: #969289;
    --rail: #0c0d0f;
    --rail-haut: #101114;
    --rail-texte: #b8b5ae;
    --rail-filet: rgba(255, 255, 255, 0.09);
    --rail-survol: rgba(255, 255, 255, 0.06);
    --accent: #3b82f6;
    --accent-survol: #2563eb;
    --accent-doux: rgba(59, 130, 246, 0.14);
    --accent-texte: #93c5fd;
    --anneau: rgba(59, 130, 246, 0.35);
    --vente: #3b82f6;
    --vente-doux: rgba(59, 130, 246, 0.15);
    --vente-texte: #93c5fd;
    --prestation: #1faa55;
    --prestation-doux: rgba(34, 197, 94, 0.14);
    --prestation-texte: #86efac;
    --achat: #a78bfa;
    --achat-doux: rgba(167, 139, 250, 0.15);
    --achat-texte: #c4b5fd;
    --sarcelle: #2dd4bf;
    --sarcelle-doux: rgba(45, 212, 191, 0.13);
    --sarcelle-texte: #5eead4;
    --framboise: #f472b6;
    --framboise-doux: rgba(244, 114, 182, 0.14);
    --framboise-texte: #f9a8d4;
    --or: #eab308;
    --or-doux: rgba(234, 179, 8, 0.14);
    --or-texte: #fcd34d;
    --alerte: #f97316;
    --alerte-doux: rgba(249, 115, 22, 0.14);
    --alerte-texte: #fdba74;
    --danger: #ef4444;
    --danger-doux: rgba(239, 68, 68, 0.14);
    --danger-texte: #fca5a5;
    --champ: #161719;
    --ombre-carte: 0 1px 2px rgba(0, 0, 0, 0.35);
    --ombre-haute: 0 2px 6px rgba(0, 0, 0, 0.4), 0 6px 12px -6px rgba(0, 0, 0, 0.55);
    --ombre-ecran: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 12px -8px rgba(0, 0, 0, 0.6);
  }
}

/* ---- Socle ---------------------------------------------------------------- */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  scrollbar-color: var(--bordure-controle) transparent;
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--anneau);
  color: var(--texte);
}

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

main:focus {
  outline: none;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 1.45rem + 3.2vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.8rem, 1.3rem + 1.9vw, 2.75rem);
  letter-spacing: -0.026em;
}

h3 {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--accent-texte);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.icone {
  flex-shrink: 0;
  display: block;
}

.hors-ecran {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lien-evitement {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--rayon);
  background: var(--bouton);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.lien-evitement:focus {
  transform: none;
}

.conteneur {
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

/* Section qui prolonge la précédente, sur le même fond : pas de double marge. */
.section.sans-haut {
  padding-top: 0;
}

.suite-lien {
  margin-top: 28px;
}

.actions-gauche {
  justify-content: flex-start !important;
  margin-top: 40px;
}

.actions-gauche-haut {
  justify-content: flex-start !important;
}

.titre-suite {
  margin-bottom: var(--e4);
  font-size: 1.35rem;
}

/* Un titre de section, et la phrase qui le prolonge. */
.tete-section {
  display: grid;
  gap: var(--e4);
  max-width: 46rem;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.tete-section.centree {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.tete-section p {
  max-width: 40rem;
  color: var(--texte-2);
  font-size: 1.125rem;
}

.insecable {
  white-space: nowrap;
}

.chapo {
  color: var(--texte-2);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.55;
}

/* ---- Boutons (ceux de l'app) ------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--bordure-controle);
  border-radius: var(--rayon);
  background: var(--carte);
  color: var(--texte);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  transition: background var(--rapide), border-color var(--rapide), box-shadow var(--rapide), scale var(--rapide);
}

.btn:hover {
  background: var(--carte-2);
  border-color: var(--texte-3);
}

.btn:active {
  scale: 0.97;
}

/* Le bleu foncé de l'app dans les deux thèmes : texte blanc à 5,2:1. */
.btn-principal {
  background: var(--bouton);
  border-color: var(--bouton);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(15, 23, 42, 0.18);
}

.btn-principal:hover {
  background: var(--bouton-survol);
  border-color: var(--bouton-survol);
}

.btn-grand {
  height: 50px;
  padding: 0 22px;
  border-radius: var(--rayon-moyen);
  font-size: 1.02rem;
}

/* Sur le bleu nuit. */
.btn-clair {
  border-color: var(--rail-filet);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.btn-clair:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.btn-icone {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--rayon);
  background: transparent;
  color: var(--texte-2);
  transition: background var(--rapide), color var(--rapide);
}

.btn-icone:hover {
  background: var(--survol);
  color: var(--texte);
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 0 6px;
  border: 1px solid var(--bordure-controle);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--carte);
  color: var(--texte-2);
  font: 600 0.78rem/20px var(--police);
  text-align: center;
}

/* Pastilles de l'app : une couleur de domaine, un point. */
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent-doux);
  color: var(--accent-texte);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.pastille i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Pastille d'icône de l'app (« tuile ») : un carré arrondi teinté. */
.tuile {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rayon-groupe);
  background: var(--accent-doux);
  color: var(--accent-texte);
}

.encre-sarcelle { --encre: var(--sarcelle); --encre-doux: var(--sarcelle-doux); --encre-texte: var(--sarcelle-texte); }
.encre-achat { --encre: var(--achat); --encre-doux: var(--achat-doux); --encre-texte: var(--achat-texte); }
.encre-framboise { --encre: var(--framboise); --encre-doux: var(--framboise-doux); --encre-texte: var(--framboise-texte); }
.encre-or { --encre: var(--or); --encre-doux: var(--or-doux); --encre-texte: var(--or-texte); }
.encre-bleu { --encre: var(--accent); --encre-doux: var(--accent-doux); --encre-texte: var(--accent-texte); }
.encre-vert { --encre: var(--prestation); --encre-doux: var(--prestation-doux); --encre-texte: var(--prestation-texte); }
.encre-alerte { --encre: var(--alerte); --encre-doux: var(--alerte-doux); --encre-texte: var(--alerte-texte); }

[class*='encre-'] .tuile,
.tuile[class*='encre-'] {
  background: var(--encre-doux);
  color: var(--encre-texte);
}

[class*='encre-'] .pastille,
.pastille[class*='encre-'] {
  background: var(--encre-doux);
  color: var(--encre-texte);
}

/* ---- En-tête -------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--fond) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--moyen), background var(--moyen);
}

.entete.defile {
  border-bottom-color: var(--bordure);
  background: var(--fond);
}

.entete-dedans {
  display: flex;
  align-items: center;
  gap: var(--e5);
  width: min(100% - 2 * var(--gouttiere), 1280px);
  height: 68px;
  margin-inline: auto;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--texte);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.marque-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--rayon-groupe);
  background: linear-gradient(145deg, var(--logo-haut), var(--logo-bas));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px -2px rgba(15, 23, 42, 0.35);
}

.nav-principale {
  margin-inline: auto;
}

.nav-liens {
  position: relative;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-liens a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 8px 12px;
  border-radius: var(--rayon);
  color: var(--texte-2);
  font-size: 0.94rem;
  font-weight: 560;
  text-decoration: none;
  transition: color var(--rapide);
}

.nav-liens a:hover,
.nav-liens a[aria-current='page'] {
  color: var(--texte);
}

.nav-liens a[aria-current='page'] {
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

/* Le surlignage glisse d'un lien à l'autre, comme dans le menu de l'app. */
.surlignage {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--rayon);
  background: var(--survol);
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--ressort-vif-duree) var(--ressort-vif), opacity 160ms;
}

.surlignage.visible {
  opacity: 1;
}

.entete-actions {
  display: flex;
  align-items: center;
  gap: var(--e2);
}

.bascule-theme .icone-soleil,
:root[data-theme='dark'] .bascule-theme .icone-lune {
  display: none;
}

:root[data-theme='dark'] .bascule-theme .icone-soleil {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .bascule-theme .icone-lune {
    display: none;
  }
  :root:not([data-theme]) .bascule-theme .icone-soleil {
    display: block;
  }
}

.bouton-menu {
  display: none;
}

.bouton-menu .icone-fermer,
.bouton-menu[aria-expanded='true'] .icone-menu {
  display: none;
}

.bouton-menu[aria-expanded='true'] .icone-fermer {
  display: block;
}

.menu-mobile {
  border-top: 1px solid var(--bordure);
  background: var(--fond);
}

.menu-mobile ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: var(--e3) var(--gouttiere) var(--e5);
  list-style: none;
}

.menu-mobile a {
  display: block;
  padding: 12px 8px;
  border-radius: var(--rayon);
  color: var(--texte);
  font-size: 1.05rem;
  font-weight: 560;
  text-decoration: none;
}

.menu-mobile a[aria-current='page'] {
  color: var(--accent-texte);
}

@media (max-width: 1080px) {
  .nav-principale,
  .entete-telecharger {
    display: none;
  }
  .entete-actions {
    margin-left: auto;
  }
  .bouton-menu {
    display: inline-grid;
  }
}

@media (min-width: 1081px) {
  .menu-mobile {
    display: none !important;
  }
}

/* ---- Accueil : le titre et le tableau de bord ----------------------------------- */

.hero {
  padding-block: clamp(28px, 3.6vw, 52px) clamp(56px, 7vw, 104px);
  overflow: clip;
}

.hero-texte {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 62rem;
  margin-inline: auto;
  text-align: center;
}

.hero-texte .chapo {
  max-width: 56rem;
}

.hero-actions,
.appel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--e3);
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--e2) var(--e5);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--texte-2);
  font-size: 0.92rem;
  font-weight: 540;
}

.assurances li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.assurances .icone {
  color: var(--prestation);
}

/* Le tableau de bord, seul et en grand, dans sa fenêtre. */
.hero-scene {
  width: min(100% - 2 * var(--gouttiere), 1200px);
  margin: clamp(36px, 4.4vw, 60px) auto 0;
  perspective: 1600px;
}

.hero-ecran {
  --arrondi: var(--rayon-ecran);
  transform-origin: 50% 0;
}

.hero-ecran img {
  width: 100%;
}

/* L'écran suit le thème du site : l'application en sombre sur la page sombre.
   L'image cachée, différée, n'est pas téléchargée. */
.selon-theme-sombre {
  display: none !important;
}

:root[data-theme='dark'] .selon-theme-clair {
  display: none !important;
}

:root[data-theme='dark'] .selon-theme-sombre {
  display: block !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .selon-theme-clair {
    display: none !important;
  }
  :root:not([data-theme='light']) .selon-theme-sombre {
    display: block !important;
  }
}

/* Le titre sort du flou mot à mot, puis le reste de l'en-tête se pose. */
@media (prefers-reduced-motion: no-preference) {
  .js .titre-flou .mot {
    display: inline-block;
    animation: mot-flou 760ms var(--sortie) both;
  }
  .js .titre-flou .mot:nth-child(2) { animation-delay: 55ms; }
  .js .titre-flou .mot:nth-child(3) { animation-delay: 110ms; }
  .js .titre-flou .mot:nth-child(4) { animation-delay: 165ms; }
  .js .titre-flou .mot:nth-child(5) { animation-delay: 220ms; }
  .js .titre-flou .mot:nth-child(6) { animation-delay: 275ms; }
  .js .titre-flou .mot:nth-child(7) { animation-delay: 330ms; }
  .js .titre-flou .mot:nth-child(8) { animation-delay: 385ms; }

  .js .hero-texte > :not(h1) {
    animation: fondu-flou 700ms var(--sortie) both 380ms;
  }
  .js .hero-texte > .hero-actions { animation-delay: 460ms; }
  .js .hero-texte > .assurances { animation-delay: 540ms; }

  /* La fenêtre se déplie du haut vers le bas. */
  .js .hero-ecran {
    animation: deplier 1000ms var(--sortie) both 420ms;
  }
}

/* Puis elle se redresse au fil du défilement : inclinée vers l'arrière au
   chargement, à plat quand on arrive dessus. Sans prise en charge, elle est
   simplement à plat. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .hero-ecran {
      animation: deplier 1000ms var(--sortie) both 420ms, redresser linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 62vh;
    }
  }
}

@keyframes mot-flou {
  from {
    opacity: 0;
    filter: blur(12px);
  }
}

@keyframes fondu-flou {
  from {
    opacity: 0;
    filter: blur(6px);
  }
}

@keyframes deplier {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0 round var(--arrondi, var(--rayon-carte)));
  }
  40% {
    opacity: 1;
  }
  to {
    clip-path: inset(0 0 0 0 round var(--arrondi, var(--rayon-carte)));
  }
}

@keyframes redresser {
  from {
    transform: rotateX(17deg) scale(0.93);
  }
  to {
    transform: none;
  }
}

/* ---- Visite des écrans ---------------------------------------------------- */

.visite {
  background: var(--fond-2);
  border-block: 1px solid var(--bordure-douce);
}

/* Les onglets et, quand la visite défile seule, son bouton pause. */
.visite-commandes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--e2);
  margin-bottom: var(--e5);
}

.onglets {
  position: relative;
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--bordure-controle);
  border-radius: var(--rayon-moyen);
  background: var(--carte);
  scrollbar-width: none;
}

.onglets::-webkit-scrollbar {
  display: none;
}

.onglets button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--rayon);
  background: transparent;
  color: var(--texte-2);
  font-size: 0.92rem;
  font-weight: 580;
  white-space: nowrap;
  transition: color var(--rapide), background var(--rapide);
}

.onglets button:hover {
  color: var(--texte);
}

.onglets button[aria-selected='true'] {
  color: var(--accent-texte);
}

.onglets button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--encre, var(--accent));
}

/* Le curseur : la place de l'onglet choisi, découpée dans un fond qui couvre
   la barre, et qui glisse d'un onglet à l'autre (le « segmenté » de l'app). */
.onglets .curseur {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  z-index: 0;
  width: var(--largeur-barre, 100%);
  border-radius: var(--rayon);
  background: var(--accent-doux);
  clip-path: inset(0 100% 0 0 round var(--rayon));
  transition: clip-path var(--ressort-vif-duree) var(--ressort-vif);
}

.no-js .onglets button[aria-selected='true'],
.onglets:not(.avec-curseur) button[aria-selected='true'] {
  background: var(--accent-doux);
}

/* La visite défile seule, comme une vidéo : un filet se remplit sous
   l'onglet en cours, puis l'écran suivant prend la place. */
.visite.lecture-auto .onglets button[aria-selected='true']::after {
  content: '';
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: progression var(--duree-ecran, 6s) linear both;
}

.visite.en-pause .onglets button[aria-selected='true']::after {
  animation-play-state: paused;
}

@keyframes progression {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.lecture {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--bordure-controle);
  border-radius: var(--rayon-moyen);
  background: var(--carte);
}

.lecture .icone-lecture,
.visite:not(.lecture-auto) .lecture .icone-pause {
  display: none;
}

.visite:not(.lecture-auto) .lecture .icone-lecture {
  display: block;
}

.fenetre {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-ecran);
  background: var(--carte);
  box-shadow: var(--ombre-ecran);
}

.fenetre-barre {
  display: flex;
  align-items: center;
  gap: var(--e3);
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--bordure-douce);
  background: var(--carte-2);
  color: var(--texte-3);
  font-size: 0.8rem;
}

.fenetre-barre .adresse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline: auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--fond-2);
  font-weight: 560;
}

.panneaux-visite {
  display: grid;
}

.panneau-visite {
  grid-area: 1 / 1;
  display: grid;
  gap: var(--e5);
}

.panneau-visite[hidden] {
  display: none !important;
}

/* D'un écran à l'autre : un fondu qui sort du flou. */
@media (prefers-reduced-motion: no-preference) {
  .js .panneau-visite:not([hidden]) .fenetre img {
    animation: fondu-flou 520ms var(--sortie) both;
  }
  .js .panneau-visite:not([hidden]) .legende-visite {
    animation: fondu 420ms var(--sortie) both 80ms;
  }
}

@keyframes fondu {
  from {
    opacity: 0;
  }
}

/* Hauteur réservée : d'un écran à l'autre, la page ne bouge pas sous la visite. */
.legende-visite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--e3) var(--e6);
  max-width: 64rem;
  min-height: 7.5rem;
  margin-inline: auto;
}

.legende-visite p {
  color: var(--texte-2);
  font-size: 1.05rem;
}

.legende-visite h3 {
  margin-bottom: 6px;
}

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  text-wrap: balance;
}

.lien-fleche .icone {
  transition: translate var(--moyen) var(--sortie);
}

.lien-fleche:hover .icone {
  translate: 3px 0;
}

@media (max-width: 720px) {
  .legende-visite {
    grid-template-columns: minmax(0, 1fr);
    min-height: 13rem;
  }
  .onglets {
    flex: 1;
    width: auto;
    margin-left: calc(var(--gouttiere) * -1);
    border-left: 0;
    border-radius: 0 var(--rayon-moyen) var(--rayon-moyen) 0;
  }
}

.agrandir {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--carte);
  color: var(--texte-2);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--ombre-haute);
  opacity: 0;
  transition: opacity var(--moyen);
}

.fenetre:hover .agrandir,
.cadre-capture:hover .agrandir,
.agrandir:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .agrandir {
    opacity: 1;
  }
}

/* Visionneuse plein écran. */
.visionneuse {
  width: min(96vw, 1680px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--rayon-ecran);
  background: var(--carte);
  box-shadow: var(--ombre-ecran);
}

.visionneuse::backdrop {
  background: rgba(18, 16, 12, 0.72);
}

.visionneuse img {
  width: 100%;
  max-height: calc(94vh - 52px);
  object-fit: contain;
  background: var(--carte-2);
}

.visionneuse-barre {
  display: flex;
  align-items: center;
  gap: var(--e3);
  height: 52px;
  padding: 0 8px 0 18px;
  border-bottom: 1px solid var(--bordure-douce);
  font-weight: 600;
}

.visionneuse-barre button {
  margin-left: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .visionneuse[open] {
    animation: fondu 240ms var(--sortie);
  }
}

/* ---- Clair et sombre, côte à côte --------------------------------------- */

.comparaison {
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
  user-select: none;
}

.comparaison .couche {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--partage, 50%));
}

.comparaison .couche img,
.comparaison > .fenetre img {
  width: 100%;
}

.comparaison .poignee {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--partage, 50%);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 16px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.comparaison .poignee span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #1c1a17;
  box-shadow: var(--ombre-haute);
  translate: -50% -50%;
}

.comparaison input[type='range'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.comparaison input[type='range']:focus-visible + .poignee span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.etiquettes-theme {
  display: flex;
  justify-content: space-between;
  max-width: 1100px;
  margin: var(--e3) auto 0;
  color: var(--texte-3);
  font-size: 0.88rem;
  font-weight: 560;
}

/* ---- Rangées de fonctionnalités ----------------------------------------- */

.rangees {
  display: grid;
  gap: clamp(64px, 9vw, 120px);
}

.rangee {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 15fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.rangee.inverse {
  grid-template-columns: minmax(0, 15fr) minmax(0, 9fr);
}

.rangee.inverse .rangee-texte {
  order: 2;
}

.rangee-texte {
  display: grid;
  gap: var(--e4);
}

.rangee-texte > p {
  color: var(--texte-2);
  font-size: 1.08rem;
}

.rangee-texte h3 {
  font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.85rem);
  letter-spacing: -0.02em;
}

/* La pastille s'aligne sur la première ligne du titre, même quand il en a deux. */
.rangee-titre {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.rangee-titre .tuile {
  margin-top: 1px;
}

.cadre-capture {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  box-shadow: var(--ombre-ecran);
}

.cadre-capture img {
  width: 100%;
}

.cadre-capture.limite img {
  max-height: 560px;
  object-fit: cover;
  object-position: top left;
}

@media (max-width: 860px) {
  .rangee,
  .rangee.inverse {
    grid-template-columns: minmax(0, 1fr);
  }
  .rangee.inverse .rangee-texte {
    order: 0;
  }
}

/* Liste des points d'une rangée, cochés. */
.liste-coches {
  display: grid;
  gap: 10px;
  margin: var(--e2) 0 0;
  padding: 0;
  list-style: none;
}

.liste-coches li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.liste-coches .icone {
  margin-top: 2px;
  color: var(--prestation);
}

/* Les coches se tracent quand la liste arrive à l'écran (celles de l'app). */
@media (prefers-reduced-motion: no-preference) {
  .js .liste-coches .icone path {
    stroke-dasharray: 26;
    stroke-dashoffset: 26;
  }
  .js .liste-coches.vue .icone path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 420ms var(--sortie);
    transition-delay: calc(var(--rang, 0) * 70ms);
  }
}

/* ---- Autres fonctionnalités : une liste, pas des cartes ------------------- */

.autres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.autres li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding-block: var(--e5);
  border-top: 1px solid var(--bordure);
}

.autres strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.autres p {
  color: var(--texte-2);
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .autres {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .autres {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Bande bleu nuit : vos données --------------------------------------- */

.bande-nuit {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--rail-haut), var(--rail) 70%);
  color: var(--rail-texte);
}

.bande-nuit h2,
.bande-nuit h3,
.bande-nuit strong {
  color: #fff;
}

.bande-nuit .tete-section p {
  color: var(--rail-texte);
}

.bande-nuit a:not(.btn) {
  color: #fff;
}

.bande-nuit .liste-coches .icone {
  color: var(--sarcelle-rail);
}

.donnees {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.donnees .liste-coches {
  gap: var(--e4);
  font-size: 1.04rem;
}

.donnees .liste-coches span {
  display: block;
  color: var(--rail-texte);
  font-size: 0.95rem;
}

.donnees .cadre-capture {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 8px 12px -8px rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .donnees {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Ce que la loi demande : deux registres ------------------------------ */

.registres {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.registre {
  display: grid;
  align-content: start;
  gap: var(--e4);
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  box-shadow: var(--ombre-carte);
}

.registre-tete {
  display: flex;
  align-items: center;
  gap: var(--e3);
}

.registre > p {
  color: var(--texte-2);
}

.qui {
  font-size: 0.95rem;
}

/* Les colonnes d'un registre, en étiquettes pleines comme les pastilles de
   l'app : sans contour, pour ne pas poser de boîtes dans la carte. */
.colonnes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.colonnes li {
  padding: 5px 10px;
  border-radius: var(--rayon-petit);
  background: var(--fond-2);
  color: var(--texte-2);
  font-size: 0.85rem;
  font-weight: 560;
}

.source {
  margin-top: var(--e5);
  color: var(--texte-3);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .registres {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Tableaux (comparatif, spécimen de registre) -------------------------- */

.tableau-defile {
  overflow-x: auto;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  box-shadow: var(--ombre-carte);
}

.tableau {
  width: 100%;
  min-width: 640px;
  font-size: 0.97rem;
}

.tableau caption {
  padding: 16px 20px 0;
  color: var(--texte-3);
  font-size: 0.88rem;
  text-align: left;
  caption-side: bottom;
  padding-bottom: 16px;
}

.tableau th,
.tableau td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bordure-douce);
  text-align: left;
  vertical-align: top;
}

.tableau thead th {
  background: var(--carte-2);
  color: var(--texte-2);
  font-size: 0.85rem;
  font-weight: 600;
}

.tableau tbody th {
  font-weight: 600;
}

.tableau tbody tr:last-child > * {
  border-bottom: 0;
}

.tableau .col-app {
  background: color-mix(in srgb, var(--accent-doux) 55%, transparent);
}

.tableau thead .col-app {
  color: var(--accent-texte);
}

.oui,
.non {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.oui .icone {
  color: var(--prestation);
  margin-top: 2px;
}

.non .icone {
  color: var(--texte-3);
  margin-top: 2px;
}

.montant {
  text-align: right !important;
  white-space: nowrap;
}

/* Un exemple de registre : une ligne par écriture, sans retour à la ligne. */
.tableau-registre th,
.tableau-registre td {
  padding: 12px 14px;
  white-space: nowrap;
}

/* ---- Types d'activité ------------------------------------------------------ */

.pastille-neutre {
  background: var(--fond-2);
  color: var(--texte-2);
}

.pastilles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tableau-activites td,
.tableau-activites th {
  vertical-align: middle;
}

.tableau-activites td:nth-child(2) {
  color: var(--texte-2);
}

/* Sur un téléphone, chaque activité devient un bloc : les quatre colonnes
   n'y tiennent pas, et la réponse sur le registre des achats doit rester
   visible sans défiler de côté. */
@media (max-width: 640px) {
  .tableau-activites {
    min-width: 0;
  }
  .tableau-activites thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .tableau-activites tbody,
  .tableau-activites tr,
  .tableau-activites th,
  .tableau-activites td {
    display: block;
  }
  .tableau-activites tr {
    padding: 18px 20px;
    border-bottom: 1px solid var(--bordure-douce);
  }
  .tableau-activites tbody tr:last-child {
    border-bottom: 0;
  }
  .tableau-activites th,
  .tableau-activites td {
    padding: 0;
    border-bottom: 0;
  }
  .tableau-activites td {
    margin-top: 12px;
  }
  .tableau-activites td:nth-child(2) {
    margin-top: 4px;
  }
  .tableau-activites td[data-libelle]::before {
    content: attr(data-libelle);
    display: block;
    margin-bottom: 6px;
    color: var(--texte-3);
    font-size: 0.82rem;
    font-weight: 600;
  }
}

.activites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.activites li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding-block: var(--e5);
  border-top: 1px solid var(--bordure);
}

.activites .tuile {
  width: 40px;
  height: 40px;
}

.activites h3 {
  font-size: 1.06rem;
  margin-bottom: 4px;
}

.activites p {
  color: var(--texte-2);
  font-size: 0.96rem;
}

.activites .regime {
  display: block;
  margin-top: 6px;
  color: var(--texte-3);
  font-size: 0.85rem;
  font-weight: 560;
}

/* ---- Trois étapes (l'accueil guidé de l'app) ------------------------------ */

.etapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.etapes li {
  position: relative;
  display: grid;
  gap: var(--e3);
  align-content: start;
  counter-increment: etape;
}

.etapes li::before {
  content: counter(etape);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--carte);
  color: var(--accent-texte);
  font-weight: 600;
  box-shadow: 0 0 0 5px var(--accent-doux);
}

/* Le fil qui relie les étapes, comme dans l'accueil guidé de l'app. */
.etapes li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 56px;
  right: -12px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--bordure));
}

.etapes p {
  color: var(--texte-2);
}

@media (max-width: 760px) {
  .etapes {
    grid-template-columns: minmax(0, 1fr);
  }
  .etapes li::after {
    display: none;
  }
}

/* ---- Questions fréquentes -------------------------------------------------- */

.faq {
  max-width: 52rem;
  margin-inline: auto;
  border-top: 1px solid var(--bordure);
}

.faq details {
  border-bottom: 1px solid var(--bordure);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--e4);
  padding: 22px 4px;
  font-size: 1.1rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icone {
  margin-left: auto;
  color: var(--texte-3);
  transition: rotate var(--moyen) var(--sortie);
}

.faq details[open] summary .icone {
  rotate: 180deg;
}

.faq summary:hover {
  color: var(--accent-texte);
}

.faq .reponse {
  display: grid;
  gap: var(--e3);
  padding: 0 4px 24px;
  color: var(--texte-2);
  max-width: 46rem;
}

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .reponse {
    animation: fondu 320ms var(--sortie);
  }
}

/* ---- Appel final -------------------------------------------------------- */

.appel-final {
  padding-block: clamp(64px, 8vw, 104px);
  background: linear-gradient(180deg, var(--rail-haut), var(--rail) 70%);
  color: var(--rail-texte);
  text-align: center;
}

.appel-final-dedans {
  display: grid;
  justify-items: center;
  gap: var(--e4);
  width: min(100% - 2 * var(--gouttiere), 46rem);
  margin-inline: auto;
}

.appel-final h2 {
  color: #fff;
}

.appel-final .appel-actions {
  margin-top: var(--e3);
}

/* ---- Pied de page ---------------------------------------------------------- */

.pied {
  padding-block: clamp(48px, 6vw, 72px) var(--e6);
  background: var(--fond-2);
  border-top: 1px solid var(--bordure-douce);
  font-size: 0.94rem;
}

.pied-dedans {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: var(--e6);
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
}

.pied-marque {
  display: grid;
  gap: var(--e4);
  align-content: start;
  max-width: 22rem;
}

.pied-marque p {
  color: var(--texte-2);
}

.pied-titre {
  margin-bottom: var(--e3);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--texte-3);
}

.pied ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pied ul a {
  color: var(--texte-2);
  text-decoration: none;
}

.pied ul a:hover {
  color: var(--texte);
  text-decoration: underline;
}

.lien-soutien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--texte-2);
  font-weight: 560;
  text-decoration: none;
}

.lien-soutien:hover {
  color: var(--or-texte);
}

.pied-bas {
  display: grid;
  gap: var(--e3);
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding-top: var(--e5);
  border-top: 1px solid var(--bordure);
  color: var(--texte-3);
  font-size: 0.86rem;
}

.pied-mentions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e3) var(--e5);
}

.pied-mentions a {
  color: var(--texte-3);
}

@media (max-width: 860px) {
  .pied-dedans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pied-marque {
    grid-column: 1 / -1;
  }
}

/* ---- Pages intérieures ------------------------------------------------------ */

.entete-page {
  padding-block: clamp(36px, 5vw, 64px) clamp(40px, 5vw, 72px);
}

.entete-page .conteneur {
  display: grid;
  gap: var(--e5);
}

.entete-page h1 {
  max-width: 22ch;
  font-size: clamp(2.15rem, 1.4rem + 2.8vw, 3.5rem);
}

.entete-page .chapo {
  max-width: 44rem;
}

.fil-ariane ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--texte-3);
  font-size: 0.88rem;
}

.fil-ariane li:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: var(--bordure-controle);
}

.fil-ariane a {
  color: var(--texte-2);
  text-decoration: none;
}

.fil-ariane a:hover {
  text-decoration: underline;
}

/* Un texte qui se lit : colonne de lecture et rythme vertical. */
/* La colonne de lecture garde 44 rem ; tableaux et captures prennent toute la largeur de l'article. */
.prose > :not(figure, .tableau-defile) {
  max-width: 44rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2.05rem);
}

.prose h3 {
  margin-top: 1.8em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.7em;
}

.prose p,
.prose li {
  color: var(--texte-2);
  font-size: 1.07rem;
  line-height: 1.68;
}

.prose strong {
  color: var(--texte);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose figure {
  margin-block: 2em;
}

.prose figcaption,
figure figcaption {
  margin-top: var(--e3);
  color: var(--texte-3);
  font-size: 0.9rem;
}

/* Page à deux colonnes : le texte, et un sommaire qui reste à l'écran. */
.page-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-bottom: var(--section);
}

.sommaire {
  position: sticky;
  top: 96px;
  display: grid;
  gap: var(--e3);
  padding: var(--e5);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  font-size: 0.92rem;
}

.sommaire p {
  color: var(--texte-3);
  font-size: 0.82rem;
  font-weight: 600;
}

.sommaire ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sommaire a:not(.btn) {
  color: var(--texte-2);
  text-decoration: none;
}

.sommaire a:not(.btn):hover {
  color: var(--accent-texte);
}

.sommaire .btn {
  margin-top: var(--e2);
}

@media (max-width: 960px) {
  .page-guide {
    grid-template-columns: minmax(0, 1fr);
  }
  .sommaire {
    position: static;
    order: -1;
  }
}

.page-seule {
  grid-template-columns: minmax(0, 1fr);
}

.btn-sommaire {
  width: 100%;
  height: 44px;
  font-size: 0.95rem;
}

.cadre-etroit,
.cadre-400 {
  max-width: 400px;
}

/* Une capture étroite garde sa taille réelle : agrandie, elle deviendrait floue. */
.cadre-400,
.cadre-540 {
  justify-self: center;
  width: 100%;
}

.cadre-540 {
  max-width: 540px;
}

code {
  padding: 1px 6px;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  background: var(--carte-2);
  color: var(--texte);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-moyen);
  background: var(--carte-2);
  line-height: 1.7;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.92rem;
  overflow-wrap: normal;
}

.introuvable .hero-texte {
  min-height: 50vh;
  align-content: center;
}

/* Une remarque dans le texte : filet fin, pas de bordure colorée épaisse. */
.encart {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-moyen);
  background: var(--carte);
}

.encart p {
  font-size: 0.98rem !important;
}

/* ---- Contact ------------------------------------------------------------------ */

.page-contact {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.carte-formulaire {
  padding: clamp(22px, 3.5vw, 40px);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  box-shadow: var(--ombre-carte);
}

.carte-formulaire > h2 {
  margin-bottom: var(--e5);
  font-size: 1.35rem;
}

.formulaire {
  display: grid;
  gap: 22px;
}

.formulaire .champ {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.formulaire .champ > label,
.formulaire .etiquette {
  padding: 0;
  font-size: 0.94rem;
  font-weight: 600;
}

.facultatif {
  color: var(--texte-3);
  font-weight: 450;
}

.champs-ligne {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}

/* Les champs de l'app, à la taille d'un doigt. */
.champ-texte {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--bordure-controle);
  border-radius: var(--rayon);
  background: var(--champ);
  color: var(--texte);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--rapide), box-shadow var(--rapide);
}

textarea.champ-texte {
  padding: 11px 14px;
  line-height: 1.55;
  resize: vertical;
}

.champ-texte::placeholder {
  color: var(--texte-3);
}

.champ-texte:hover {
  border-color: var(--texte-3);
}

.champ-texte:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--anneau);
}

.champ-texte:user-invalid,
.champ-texte[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-doux);
}

.aide {
  color: var(--texte-3);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Les raisons d'écrire : des boutons radio habillés comme les choix de l'app,
   chacun avec son encre. */
.objets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.objet {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--bordure-controle);
  border-radius: var(--rayon-moyen);
  background: var(--champ);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--rapide), background-color var(--rapide), box-shadow var(--rapide);
}

.objet input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.objet-icone {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--rayon-petit);
  background: var(--encre-doux);
  color: var(--encre-texte);
  transition: background-color var(--rapide);
}

.objet:hover {
  border-color: var(--texte-3);
}

.objet:has(input:checked) {
  border-color: var(--encre);
  background: var(--encre-doux);
  box-shadow: inset 0 0 0 1px var(--encre);
}

.objet:has(input:checked) .objet-icone {
  background: var(--carte);
}

.objet:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* La version et le système ne servent qu'à un bug. Sans :has(), le champ reste visible. */
.formulaire:has(input[name='objet']) .champ-bug {
  display: none;
}

.formulaire:has(#objet-bug:checked) .champ-bug {
  display: flex;
}

/* Le piège à robots : invisible et hors du parcours au clavier. */
.piege {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Le widget Turnstile ; en mode invisible, il ne laisse pas de vide. */
.anti-robot:empty {
  display: none;
}

.formulaire-pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.formulaire-pied .btn[disabled] {
  opacity: 0.72;
  cursor: progress;
}

.formulaire-etat {
  color: var(--texte-2);
  font-size: 0.95rem;
}

.formulaire-etat:empty {
  display: none;
}

.formulaire-etat.erreur {
  color: var(--danger-texte);
  font-weight: 560;
}

/* L'accord pour l'usage des données : une case native, à l'encre du site. */
.consentement {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--texte-2);
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
}

.consentement input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consentement input:user-invalid {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.envoye {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding-block: var(--e2);
}

.envoye:focus {
  outline: none;
}

.envoye .tuile {
  width: 44px;
  height: 44px;
  margin-bottom: var(--e1);
}

.envoye-titre {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.envoye p:not(.envoye-titre) {
  color: var(--texte-2);
}

.envoye .btn {
  margin-top: var(--e2);
}

.contact-autres {
  display: grid;
  gap: var(--e5);
  padding-top: var(--e2);
}

.contact-autres > h2 {
  font-size: 1.1rem;
}

.contact-moyen {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
}

.contact-moyen h3 {
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.contact-moyen p {
  margin-bottom: 8px;
  color: var(--texte-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.contact-moyen .lien-fleche {
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .page-contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .objets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .objet {
    gap: 8px;
    padding: 6px 8px 6px 6px;
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .objet-icone {
    width: 30px;
    height: 30px;
  }
  .champs-ligne {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cartes de choix : le système à télécharger. */
.systemes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.systeme {
  display: flex;
  flex-direction: column;
  gap: var(--e4);
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  background: var(--carte);
  box-shadow: var(--ombre-carte);
  transition: border-color var(--moyen), box-shadow var(--moyen);
}

.systeme.suggere {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-doux), var(--ombre-haute);
}

.systeme .detail {
  color: var(--texte-3);
  font-size: 0.92rem;
}

/* Les trois boutons sur la même ligne, quelle que soit la longueur du texte au-dessus. */
.systeme .btn {
  margin-top: auto;
}

@media (max-width: 860px) {
  .systemes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Liens vers les autres pages, en fin de page. */
.liens-suite {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0 var(--e6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.liens-suite a {
  display: grid;
  gap: 4px;
  padding-block: var(--e5);
  border-top: 1px solid var(--bordure);
  color: var(--texte);
  text-decoration: none;
}

.liens-suite a strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.liens-suite a span {
  color: var(--texte-2);
  font-size: 0.95rem;
}

.liens-suite a:hover strong {
  color: var(--accent-texte);
}

.liens-suite .icone {
  transition: translate var(--moyen) var(--sortie);
}

.liens-suite a:hover .icone {
  translate: 3px 0;
}

/* ---- Mouvements au fil de la page ------------------------------------------ */

/* Les ancres glissent jusqu'à leur section. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Les trois étapes : chaque pastille sort du flou, puis le fil se tire
   jusqu'à la suivante. */
@media (prefers-reduced-motion: no-preference) {
  .js .etapes[data-revele]:not(.vu) li {
    opacity: 0;
  }
  .js .etapes[data-revele]:not(.vu) li::after {
    transform: scaleX(0);
  }
  .js .etapes.vu li {
    animation: fondu-flou 640ms var(--sortie) both;
  }
  .js .etapes.vu li:nth-child(2) { animation-delay: 380ms; }
  .js .etapes.vu li:nth-child(3) { animation-delay: 760ms; }
  .js .etapes.vu li::after {
    transform-origin: left;
    animation: tirer 560ms var(--sortie) both 200ms;
  }
  .js .etapes.vu li:nth-child(2)::after { animation-delay: 580ms; }
}

@keyframes tirer {
  from {
    transform: scaleX(0);
  }
}

/* Un halo suit la souris sur les cartes, à l'encre de la carte. */
.projecteur {
  position: relative;
  isolation: isolate;
}

.projecteur::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(460px circle at var(--px, 50%) var(--py, 0%), color-mix(in srgb, var(--encre, var(--accent)) 11%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity var(--moyen) var(--sortie);
  pointer-events: none;
}

@media (hover: hover) {
  .projecteur:hover::before {
    opacity: 1;
  }
}

/* Un reflet traverse la capture au survol. */
.cadre-capture::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
  transform: translateX(-110%);
  pointer-events: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cadre-capture:hover::after {
    transform: translateX(110%);
    transition: transform 1100ms var(--sortie);
  }
}

/* Un éclat balaie les grands boutons d'action au survol. */
.btn-principal.btn-grand {
  overflow: hidden;
}

.btn-principal.btn-grand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-principal.btn-grand:hover::after {
    transform: translateX(120%);
    transition: transform 900ms var(--sortie);
  }
}

/* ---- Mouvement réduit ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
