/* kajy-erp.com : charte KAJY (rouge #C8102E, or #F2A900 en accent rare), fond blanc-beige, Arial.
   Verre dépoli clair sur un fond de reflets lents ; liseré or fin qui se trace au survol (règle du 23/10) ;
   captures de KAJY toujours DROITES (règle du 20/10) : translation et un seul facteur d'échelle, jamais de rotation. */
:root {
  --rouge: #C8102E;
  --rouge-fonce: #8B0A1E;
  --or: #F2A900;
  --fond: #FBF8F3;
  --fond-doux: rgba(244, 238, 228, 0.55);
  --texte: #1C140C;
  --texte-doux: #5E544B;
  --trait: rgba(120, 90, 60, 0.16);
  --verre: rgba(255, 255, 255, 0.58);
  --verre-fort: rgba(255, 255, 255, 0.78);
  --bord-verre: rgba(255, 255, 255, 0.85);
  --flou: blur(16px) saturate(150%);
  --ombre: 0 10px 34px rgba(70, 35, 10, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --ombre-haute: 0 22px 60px rgba(70, 35, 10, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --rayon: 18px;
  --large: 1160px;
  --doux: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--rouge); transition: color 0.2s ease; }
a:hover { color: var(--rouge-fonce); }
main, .pied, .entete, .maquette { position: relative; z-index: 1; }

/* ---------- Fond : reflets qui dérivent lentement (dégradés, sans filtre : léger sur téléphone) ---------- */
.aurore { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurore span { position: absolute; border-radius: 50%; will-change: transform; }
.aurore span:nth-child(1) { width: 70vmax; height: 70vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, rgba(200, 16, 46, 0.16), rgba(200, 16, 46, 0) 65%); animation: derive1 34s ease-in-out infinite alternate; }
.aurore span:nth-child(2) { width: 60vmax; height: 60vmax; right: -22vmax; top: 10vh; background: radial-gradient(circle, rgba(242, 169, 0, 0.18), rgba(242, 169, 0, 0) 65%); animation: derive2 40s ease-in-out infinite alternate; }
.aurore span:nth-child(3) { width: 55vmax; height: 55vmax; left: 20vw; bottom: -30vmax; background: radial-gradient(circle, rgba(232, 120, 90, 0.14), rgba(232, 120, 90, 0) 65%); animation: derive3 46s ease-in-out infinite alternate; }
@keyframes derive1 { to { transform: translate3d(12vw, 10vh, 0) scale(1.15); } }
@keyframes derive2 { to { transform: translate3d(-14vw, 18vh, 0) scale(0.9); } }
@keyframes derive3 { to { transform: translate3d(10vw, -16vh, 0) scale(1.1); } }

.maquette {
  background: var(--texte); color: #fff; text-align: center; font-size: 13px; padding: 6px 16px; letter-spacing: 0.02em;
}
.conteneur { max-width: var(--large); margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête de verre, sur deux lignes ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 248, 243, 0.62);
  -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 24px rgba(70, 35, 10, 0.05);
}
.entete .conteneur {
  display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "marque langue cta" "liens liens liens";
  align-items: center; gap: 4px 16px; padding-top: 10px;
}
.marque { grid-area: marque; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); font-weight: 800; font-size: 20px; letter-spacing: 0.04em; white-space: nowrap; }
.marque img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25); transition: transform 0.4s var(--doux); }
.marque:hover img { transform: scale(1.08); }
.marque small { font-weight: 400; font-size: 13px; color: var(--texte-doux); letter-spacing: 0; }
.langue {
  grid-area: langue; font-size: 14px; font-weight: 700; color: var(--texte-doux); text-decoration: none; padding: 6px 12px;
  border: 1px solid var(--bord-verre); border-radius: 999px; background: var(--verre); white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.langue:hover { color: var(--rouge); border-color: rgba(242, 169, 0, 0.8); box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.15); }
.nav { grid-area: liens; display: flex; align-items: center; gap: 24px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; text-decoration: none; color: var(--texte); font-size: 15px; white-space: nowrap; padding: 2px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rouge), var(--or)); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--doux);
}
.nav a:hover { color: var(--rouge); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--rouge); font-weight: 700; }
.entete .cta { grid-area: cta; white-space: nowrap; padding: 10px 18px; font-size: 15px; }
@media (max-width: 1040px) { .entete { position: relative; } }
/* Téléphone : les 5 onglets passent sur deux lignes au lieu de défiler sans le montrer. Sous 520 px, le bouton
   « Regarder les démos » quitte l'en-tête (il reste l'onglet Démos et le bouton du haut de chaque page) : sinon il
   recouvre le nom KAJY. */
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 4px 18px; overflow: visible; padding: 4px 0 10px; }
  .nav a { font-size: 14.5px; padding: 6px 0; }
}
@media (max-width: 520px) {
  .entete .conteneur { grid-template-columns: 1fr auto; grid-template-areas: "marque langue" "liens liens"; }
  .entete .cta { display: none; }
}
@media (max-width: 460px) {
  .marque small { display: none; }
  .entete .conteneur { gap: 4px 8px; }
  .langue { padding: 7px 12px; font-size: 13px; }
}

/* ---------- Boutons : lueur et reflet qui passe ---------- */
.bouton {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--rouge), var(--rouge-fonce)); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 8px 22px rgba(200, 16, 46, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s var(--doux), box-shadow 0.25s var(--doux);
}
.bouton::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s var(--doux);
}
.bouton:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(200, 16, 46, 0.38), 0 0 0 4px rgba(242, 169, 0, 0.18); }
.bouton:hover::after { transform: translateX(120%); }
.bouton:active { transform: translateY(0); }
.bouton.clair { background: var(--verre); color: var(--rouge); border: 1px solid rgba(200, 16, 46, 0.35); box-shadow: var(--ombre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou); }
.bouton.clair:hover { color: var(--rouge-fonce); border-color: var(--or); }
.bouton svg { width: 18px; height: 18px; flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.actions .tel { color: var(--texte-doux); font-size: 15px; }
.actions .tel a { color: var(--texte); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(242, 169, 0, 0.6); }
.actions .tel a:hover { color: var(--rouge); }

/* ---------- Haut de page ---------- */
.ouverture { padding: 64px 0 56px; }
.ouverture-grille { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .ouverture-grille { grid-template-columns: 1fr; gap: 36px; } }
.kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; font-weight: 700; color: var(--rouge); margin: 0 0 12px; }
h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.1; margin: 0; font-weight: 800; max-width: 22ch; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.3vw, 36px); line-height: 1.2; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.005em; }
h3 { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.chapeau { font-size: clamp(18px, 2.1vw, 21px); color: var(--texte-doux); max-width: 60ch; margin: 20px 0 0; }

/* ---------- Pile de captures en profondeur ---------- */
.pile { position: relative; aspect-ratio: 1 / 0.9; width: 100%; max-width: 600px; justify-self: end; }
@media (max-width: 900px) { .pile { justify-self: center; max-width: 520px; } }
.carte-capture {
  position: absolute; margin: 0; width: min(78%, calc(100% - (var(--n) - 1) * 8%));
  left: calc(var(--rang) * 8%); top: calc((var(--n) - 1 - var(--rang)) * 9%);
  z-index: calc(10 - var(--rang));
  translate: var(--px, 0px) var(--py, 0px);
  scale: calc(1 - var(--rang) * 0.035);
  border-radius: 14px; overflow: hidden;
  background: var(--verre-fort); border: 1px solid var(--bord-verre);
  box-shadow: 0 26px 60px rgba(70, 35, 10, 0.20), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
  opacity: calc(1 - var(--rang) * 0.1);
  filter: saturate(calc(1 - var(--rang) * 0.15)) brightness(calc(1 + var(--rang) * 0.02));
  transition: scale 0.45s var(--doux), box-shadow 0.45s var(--doux), opacity 0.3s, filter 0.3s;
  animation: flotte 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--rang) * -1.3s);
}
.carte-capture img { width: 100%; height: auto; }
.carte-capture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.35), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.carte-capture:hover { z-index: 30; opacity: 1; filter: none; scale: 1.03; box-shadow: 0 34px 80px rgba(70, 35, 10, 0.28), 0 0 0 1.5px rgba(242, 169, 0, 0.85); }
.carte-capture:hover::after { opacity: 1; }
@keyframes flotte { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.douce { background: var(--fond-doux); border-top: 1px solid rgba(255, 255, 255, 0.6); border-bottom: 1px solid rgba(255, 255, 255, 0.6); }

/* ---------- Verre dépoli : cartes, chiffres, récit ---------- */
.carte, .chiffre, .recit, .film .attente, .films figure, .texte-legal {
  position: relative; isolation: isolate;
  background: var(--verre);
  -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  border: 1px solid var(--bord-verre);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
/* Lumière qui suit le pointeur (site.js règle --mx et --my) */
.carte::before, .chiffre::before, .films figure::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.75), transparent 45%);
  opacity: 0; transition: opacity 0.35s;
}
/* Liseré or de 1,5 px qui se trace au survol, lueur rognée au bord */
.carte::after, .chiffre::after, .films figure::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(120deg, rgba(242, 169, 0, 0) 0%, rgba(242, 169, 0, 0.95) 35%, rgba(200, 16, 46, 0.55) 60%, rgba(242, 169, 0, 0) 100%) 0 0 / 250% 250%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity 0.3s, background-position 0.8s var(--doux);
}
.carte:hover::before, .chiffre:hover::before, .films figure:hover::before { opacity: 1; }
.carte:hover::after, .chiffre:hover::after, .films figure:hover::after { opacity: 1; background-position: 100% 100%; }

.grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte { padding: 24px; transition: transform 0.35s var(--doux), box-shadow 0.35s var(--doux), background 0.35s; }
.carte:hover { transform: translateY(-5px); box-shadow: var(--ombre-haute); background: var(--verre-fort); }
a.carte { text-decoration: none; color: var(--texte); display: flex; flex-direction: column; gap: 8px; }
a.carte:hover { color: var(--texte); }
.carte .suite { margin-top: auto; color: var(--rouge); font-weight: 700; font-size: 15px; display: inline-flex; gap: 6px; transition: gap 0.3s var(--doux); }
a.carte:hover .suite { gap: 12px; }
.carte p { margin: 0; color: var(--texte-doux); }

/* Récit : constat → cause → besoin */
.recit { display: grid; gap: 0; max-width: 820px; padding: 8px 28px; }
.recit p { margin: 0; font-size: 19px; }
.recit .etape { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--trait); transition: transform 0.3s var(--doux); }
.recit .etape:hover { transform: translateX(6px); }
.recit .etape:last-child { border-bottom: 0; }
.recit .etiquette { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--rouge); font-weight: 700; }
@media (max-width: 560px) { .recit { padding: 4px 18px; } .recit .etape { grid-template-columns: 1fr; gap: 4px; } }

/* Chiffres du cas réel */
.chiffres { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.chiffre { padding: 22px 22px 22px 26px; overflow: hidden; transition: transform 0.35s var(--doux), box-shadow 0.35s var(--doux); }
.chiffre > strong::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--or), var(--rouge)); transition: top 0.35s var(--doux), bottom 0.35s var(--doux); }
.chiffre:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); }
.chiffre:hover > strong::before { top: 0; bottom: 0; }
.chiffre strong { display: block; font-size: clamp(26px, 3.3vw, 34px); line-height: 1.15; font-weight: 800; color: var(--texte); }
.chiffre span { display: block; margin-top: 6px; color: var(--texte-doux); font-size: 15px; }
.source { font-size: 13px; color: var(--texte-doux); margin-top: 16px; }

/* Vidéo */
.film { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr; align-items: center; }
.film.vertical { grid-template-columns: minmax(220px, 340px) 1fr; }
.film video, .films video { width: 100%; border-radius: var(--rayon); background: #000; box-shadow: 0 24px 60px rgba(70, 35, 10, 0.22); transition: transform 0.45s var(--doux), box-shadow 0.45s var(--doux); }
.film video:hover { transform: scale(1.012); box-shadow: 0 30px 80px rgba(70, 35, 10, 0.3), 0 0 0 1.5px rgba(242, 169, 0, 0.7); }
.film .attente { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--texte-doux); border-style: dashed; }
@media (max-width: 820px) { .film, .film.vertical { grid-template-columns: 1fr; } .film.vertical video { max-width: 340px; margin: 0 auto; } }

/* Résultat : bandeau rouge, reflet de verre qui suit le pointeur */
.resultat {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--rouge), var(--rouge-fonce)); color: #fff;
  border-radius: 26px; padding: 44px 34px; box-shadow: 0 30px 70px rgba(139, 10, 30, 0.28);
}
.resultat::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 85%) var(--my, 10%), rgba(255, 255, 255, 0.22), transparent 50%),
              radial-gradient(400px circle at 10% 110%, rgba(242, 169, 0, 0.28), transparent 55%);
}
.resultat h2 { color: #fff; }
.resultat p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 18px; max-width: 60ch; }
.resultat .bouton { background: #fff; color: var(--rouge); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.resultat .bouton:hover { color: var(--rouge-fonce); }
.resultat .bouton::after { background: linear-gradient(110deg, transparent 30%, rgba(242, 169, 0, 0.35) 50%, transparent 70%); }
.resultat .tel, .resultat .tel a { color: #fff; }

/* Trois en un */
.trois { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trois .carte h3::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--or), var(--rouge)); margin-bottom: 14px; transition: width 0.4s var(--doux); }
.trois .carte:hover h3::before { width: 56px; }

/* Étapes numérotées (revendeurs) */
.etapes { counter-reset: etape; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.etapes .carte { padding-top: 60px; }
.etapes .carte > h3::before {
  counter-increment: etape; content: counter(etape);
  position: absolute; top: 20px; left: 24px; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rouge), var(--rouge-fonce)); color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(200, 16, 46, 0.3);
  transition: transform 0.4s var(--doux);
}
.etapes .carte:hover > h3::before { transform: scale(1.12); }

.liste-simple { padding-left: 20px; margin: 0; }
.liste-simple li { margin: 6px 0; }

/* ---------- Onglet Démos : raccourcis et sections par accroche ---------- */
.raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.raccourcis a {
  text-decoration: none; font-size: 14px; color: var(--texte); background: var(--verre); border: 1px solid var(--bord-verre);
  border-radius: 999px; padding: 7px 15px; box-shadow: var(--ombre); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  transition: transform 0.25s var(--doux), border-color 0.25s, color 0.25s;
}
.raccourcis a:hover { transform: translateY(-2px); border-color: var(--or); color: var(--rouge); }
.accroche { scroll-margin-top: 130px; }
.accroche blockquote { margin: 0 0 12px; font-size: clamp(22px, 3vw, 31px); font-weight: 800; line-height: 1.25; max-width: 38ch; }
.accroche blockquote::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--or), var(--rouge)); margin-bottom: 16px; }
.accroche .chapeau { margin-top: 8px; }
.duree { display: inline-block; font-size: 13px; color: var(--texte-doux); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--trait); border-radius: 6px; padding: 1px 8px; margin-left: 6px; font-weight: 400; }
/* Films « maquette seulement » (29/10) : étiquette visible sur la maquette, bloc retiré du site public par build.js. */
.films .etiquette { display: inline-block; font-size: 12px; color: #7a4a00; background: rgba(242, 169, 0, 0.16); border: 1px solid rgba(242, 169, 0, 0.55); border-radius: 6px; padding: 1px 8px; margin: 4px 0 0 6px; font-weight: 500; }
.films { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: 24px; }
.films figure { margin: 0; padding: 12px; transition: transform 0.35s var(--doux), box-shadow 0.35s var(--doux); }
.films figure:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); }
.films figcaption { font-size: 15px; color: var(--texte-doux); margin: 10px 4px 2px; }
.films figcaption strong { color: var(--texte); }
.films video { border-radius: 12px; box-shadow: none; }
.films .carre video, .films .vertical video { max-height: 520px; width: auto; max-width: 100%; margin: 0 auto; }

/* ---------- Onglet Fonctionnalités : un titre par sujet, récit à gauche, preuve à droite ---------- */
.fonction h2 { margin-bottom: 8px; }
.fonction-grille { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; margin-top: 22px; }
.fonction-grille .chiffres { margin-top: 0; grid-template-columns: 1fr; }
.fonction-grille .source { margin: 12px 0 16px; }
.fonction .reponse h3 { color: var(--rouge); }
.fonction .reponse p { color: var(--texte); }
.fonction .actions { margin-top: 18px; }
@media (max-width: 860px) { .fonction-grille { grid-template-columns: 1fr; } }

/* ---------- Cartes d'écrans sous chaque sous-titre ---------- */
.ecrans-titre { margin: 30px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--texte-doux); }
.ecrans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 14px; }
.ecrans-verticaux { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 820px; }
.ecran { margin: 0; }
.ecran figcaption { font-size: 14px; line-height: 1.45; color: var(--texte-doux); margin: 9px 2px 0; }
.ecran-bouton, .vignette {
  position: relative; display: block; width: 100%; padding: 0; margin: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--bord-verre); border-radius: 14px; background: var(--verre-fort);
  box-shadow: var(--ombre); font: inherit; color: inherit;
  transition: transform 0.35s var(--doux), box-shadow 0.35s var(--doux);
}
.ecran-bouton img, .vignette img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  transition: transform 0.7s var(--doux), filter 0.4s;
}
.ecran.vertical .ecran-bouton img { aspect-ratio: 9 / 16; }
.ecran-loupe {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--rouge);
  background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou);
  box-shadow: 0 6px 16px rgba(70, 35, 10, 0.18); opacity: 0; transform: translateY(6px) scale(0.9);
  transition: opacity 0.3s, transform 0.35s var(--doux);
}
.ecran-loupe svg { width: 20px; height: 20px; }
.ecran-bouton:hover, .vignette:hover, .ecran-bouton:focus-visible, .vignette:focus-visible {
  transform: translateY(-4px); box-shadow: var(--ombre-haute), 0 0 0 1.5px rgba(242, 169, 0, 0.85);
}
.ecran-bouton:hover img, .vignette:hover img { transform: scale(1.04); }
.ecran-bouton:hover .ecran-loupe, .vignette:hover .ecran-loupe, .ecran-bouton:focus-visible .ecran-loupe { opacity: 1; transform: none; }
/* Vignette en tête d'une carte : bord à bord en haut de la carte */
.carte > .vignette { width: calc(100% + 48px); margin: -24px -24px 16px; border-radius: var(--rayon) var(--rayon) 0 0; border: 0; border-bottom: 1px solid var(--bord-verre); box-shadow: none; }
.carte > .vignette:hover { transform: none; box-shadow: none; }
.carte > .vignette img { aspect-ratio: 16 / 9; }
.carte.probleme { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.carte.probleme .suite { text-decoration: none; }
.carte.probleme:hover .suite { gap: 12px; }
.trois .carte { overflow: hidden; }
.carte-capture { cursor: zoom-in; }
.carte-capture:focus-visible { box-shadow: 0 0 0 2px var(--or), 0 26px 60px rgba(70, 35, 10, 0.2); }

/* ---------- Visionneuse : l'image en grand, les voisines sur les côtés, molette pour passer de l'une à l'autre ---------- */
.visionneuse {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: rgba(24, 14, 8, 0.6); -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
  overscroll-behavior: contain; touch-action: none;
}
.visionneuse.ouverte { opacity: 1; visibility: visible; }
.v-diapo {
  position: absolute; left: 50%; top: 46%; margin: 0; width: min(76vw, 1120px);
  display: flex; justify-content: center; align-items: center;
  transform: translate(-50%, -50%) translateX(calc(var(--d, 0) * 66vw)) scale(var(--s, 1));
  opacity: var(--o, 1); filter: blur(var(--b, 0px));
  transition: transform 0.6s var(--doux), opacity 0.45s ease, filter 0.45s ease;
  cursor: pointer;
}
.v-diapo.vertical { width: min(42vh, 78vw); }
.v-diapo.actuelle { cursor: default; }
.v-diapo img {
  max-width: 100%; max-height: 72vh; border-radius: 16px; background: #fff;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.visionneuse.ouverte .v-diapo.actuelle img { animation: entree 0.45s var(--doux); }
@keyframes entree { from { transform: scale(0.94); } to { transform: none; } }
.v-legende {
  position: absolute; left: 50%; bottom: 5.5vh; transform: translateX(-50%); width: max-content; max-width: min(90vw, 760px);
  text-align: center; color: #fff; font-size: 15px; line-height: 1.45; padding: 10px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.v-legende small { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--or); margin-bottom: 2px; }
.v-compte { opacity: 0.75; margin-left: 8px; font-size: 13px; }
.v-bouton {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background 0.2s, transform 0.25s var(--doux), border-color 0.2s;
}
.v-bouton:hover, .v-bouton:focus-visible { background: rgba(255, 255, 255, 0.26); border-color: var(--or); transform: scale(1.06); }
.v-bouton svg { width: 22px; height: 22px; }
.v-fermer { top: 18px; right: 18px; }
.v-prec { left: 2.5vw; top: 46%; translate: 0 -50%; }
.v-suiv { right: 2.5vw; top: 46%; translate: 0 -50%; }
.v-aide { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.7); font-size: 13px; white-space: nowrap; }
@media (max-width: 720px) {
  .v-diapo { width: 88vw; transform: translate(-50%, -50%) translateX(calc(var(--d, 0) * 94vw)) scale(var(--s, 1)); }
  .v-diapo.vertical { width: min(52vh, 72vw); }
  .v-prec, .v-suiv { top: auto; bottom: 5.5vh; translate: none; width: 42px; height: 42px; }
  .v-legende { bottom: calc(5.5vh + 56px); font-size: 14px; }
  .v-aide { display: none; }
}

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid rgba(255, 255, 255, 0.7); padding: 44px 0; font-size: 15px; color: var(--texte-doux); background: rgba(251, 248, 243, 0.6); -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou); }
.pied .conteneur { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.pied a { color: var(--texte-doux); text-decoration: none; display: block; margin: 4px 0; transition: color 0.2s, transform 0.25s var(--doux); }
.pied a:hover { color: var(--rouge); transform: translateX(3px); }
.pied .marque { display: inline-flex; }
.pied h4 { color: var(--texte); margin: 0 0 8px; font-size: 15px; }
@media (max-width: 720px) { .pied .conteneur { grid-template-columns: 1fr; } }

.texte-legal { max-width: 820px; padding: 32px; }
.texte-legal h1 { font-size: clamp(30px, 4vw, 42px); }
.texte-legal h2 { font-size: 22px; margin-top: 32px; }
.a-completer { background: #FFF4D6; border: 1px solid var(--or); border-radius: 8px; padding: 2px 6px; }

/* ---------- Apparition au défilement ---------- */
.a-reveler { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--doux), transform 0.8s var(--doux); }
.a-reveler.revele { opacity: 1; transform: none; }

/* ---------- Moins d'animations si le visiteur l'a demandé ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .a-reveler { opacity: 1; transform: none; }
}
.calme .carte-capture { animation: none; }

/* Onglet Télécharger (29/10) : deux sorties, les tarifs, ce qu'il faut, et les chapitres du guide de prise en main. */
.telechargements { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 30px; max-width: 760px; }
.telechargement h2 { font-size: 22px; margin: 0 0 6px; }
.telechargement .version { color: var(--texte-doux); font-size: 15px; margin: 0 0 18px; min-height: 1.4em; }
.telechargement .bouton { width: 100%; justify-content: center; }
.petit { font-size: 14px; color: var(--texte-doux); margin: 12px 0 0; }
.tarifs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 26px; }
.tarif .prix { font-size: 18px; color: var(--texte-doux); margin: 4px 0 0; }
.tarif .prix strong { font-size: 40px; color: var(--rouge); letter-spacing: -0.02em; margin-right: 4px; }
.tarif .liste-simple { margin-top: 16px; }
.chapitres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chapitres button { font: inherit; font-size: 14px; color: var(--texte); background: var(--verre); border: 1px solid var(--trait); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.2s; -webkit-backdrop-filter: var(--flou); backdrop-filter: var(--flou); }
.chapitres button:hover, .chapitres button:focus-visible { border-color: var(--or); color: var(--rouge); transform: translateY(-1px); }
.chapitres button.fort { border-color: rgba(200, 16, 46, 0.45); color: var(--rouge); font-weight: 600; }

/* Navigation au clavier (audit du 29/10) : un anneau rouge foncé bien visible partout (contraste 9:1 sur le fond). */
:focus-visible { outline: 3px solid var(--rouge-fonce); outline-offset: 3px; }
.vignette:focus-visible, .ecran-bouton:focus-visible, .carte-capture:focus-visible { outline: 3px solid var(--rouge-fonce); outline-offset: -3px; }
.visionneuse :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (min-width: 1041px) { html { scroll-padding-top: 120px; } }
