/* Hallmark · genre: modern-minimal · theme: brand (OptSolution), locked by DESIGN.md · redesign: restyle · copy: verbatim · page: /optvision · hero: Stage (head left, the OptVision screens right) · nav: banner over a retracting bar (shared) · footer: mast (shared) · imagery: screenshots 3 (real app, carousel) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, the layout is the owner's (restyle); the system, the controls and the chrome are the landing's */
/* Hallmark · dropped .tete-halo · an empty wash behind the hero (81) */
/* Hallmark · dropped "Application mobile · Android", "Pour qui", "Accès" · eyebrows (54); Android is already in the line under the badge */
/* ════════════════════════════════════════════════
   PAGE OPTVISION (/optvision) - système du site public (DESIGN.md)
   ════════════════════════════════════════════════
   Chargée après brand.css, vitrine-tokens.css, vitrine-base.css et
   pied-site.css : elle consomme les rôles --color-*, l'échelle --space-* et
   les composants communs (en-tête, boutons, lien d'évitement). Aucune
   couleur ni famille de police en dur. */

main { padding-top: calc(var(--banniere-h) + var(--barre-h)); }

/* ═══ Trame commune ═══ */
.section { padding-block: var(--space-2xl); }
.section--alt { background: var(--color-paper-2); }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section p, .tete p { color: var(--color-ink-2); }
.entete { max-width: 46rem; margin: 0 auto var(--space-xl); text-align: center; display: grid; gap: var(--space-md); justify-items: center; }
.entete p { font-size: var(--text-lead); line-height: 1.55; max-width: 60ch; }

/* ═══ En-tête de page ═══ */
.tete { padding-block: var(--space-2xl) var(--space-3xl); }
.tete-grille {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--space-2xl); align-items: center;
}
.tete h1 { font-size: var(--text-display-s); max-width: 16ch; text-wrap: balance; margin-bottom: var(--space-lg); }
/* La ligne d'audience est le garde-fou principal : elle nomme les fonctions
   concernées avant que le visiteur n'atteigne le bouton de téléchargement. */
.tete .audience {
  font-size: var(--text-lg); font-weight: 600; line-height: 1.5;
  color: var(--color-ink); max-width: 46ch; margin-bottom: var(--space-md);
}
.chapeau { font-size: var(--text-lead); line-height: 1.55; max-width: 52ch; }
.actions { margin-top: var(--space-xl); }
/* Le badge officiel porte sa propre zone de dégagement : ni coins arrondis ni
   ombre à lui ajouter, les règles de marque l'interdisent. */
.badge-play {
  display: inline-block; line-height: 0; border-radius: var(--radius-input);
  transition: transform var(--dur-short) var(--ease-out);
}
.badge-play:hover { transform: translateY(-2px); }
.badge-play:active { transform: translateY(1px); }
.badge-play:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.badge-play img { width: 200px; height: auto; }
.tete .meta { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.6; margin-top: var(--space-sm); max-width: 64ch; }
.meta a {
  color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule-2);
  text-underline-offset: 0.2em; border-radius: 2px;
  transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out);
}
.meta a:hover { color: var(--color-accent-text); text-decoration-color: currentColor; }
.meta a:active { color: var(--color-accent-hover); }
.meta a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ═══ Visite guidée de l'application (js/visite-optvision.js) ═══
   Les vrais écrans d'OptVision dans un téléphone à peine incliné (lisible),
   un projecteur sur la zone expliquée, un doigt qui montre où toucher, une
   légende numérotée et sa barre de progression. Sans script : le premier
   écran, et toutes les étapes en liste sous le téléphone. Mouvements :
   transform et opacité ; le projecteur seul se déplace par ses bords (un
   élément, dans un écran rogné). */
.ov-visite { display: grid; justify-items: center; gap: var(--space-lg); }
.ov-scene { perspective: 1600px; padding-top: var(--space-sm); }
@keyframes ov-arrivee {
  from { opacity: 0; transform: translateY(var(--space-lg)) rotateY(-18deg) rotateX(6deg); }
  to { opacity: 1; transform: rotateY(-9deg) rotateX(3deg); }
}
/* Le boîtier est taillé dans l'encre de la planche (--color-board), la
   seule teinte sombre du système ; il se redresse au survol. */
.tel {
  width: 244px;
  border-radius: 36px; padding: var(--space-xs);
  background: linear-gradient(165deg, var(--color-board-rule) 0%, var(--color-board-2) 45%, var(--color-board) 100%);
  box-shadow: var(--edge-stock), var(--cast-stock-lift);
  transform: rotateY(-9deg) rotateX(3deg);
  animation: ov-arrivee 900ms var(--ease-out) both;
  transition: transform var(--dur-long) var(--ease-out);
}
.ov-visite:hover .tel { transform: rotateY(0deg) rotateX(0deg); }
/* Les captures servies ici sont déjà rognées de la barre d'état Android et de
   la barre de navigation du bas : ni l'heure, ni la batterie, ni les icônes de
   notification personnelles n'ont leur place sur une page publique. D'où le
   rapport 640 × 1261, et non le 1080 × 2340 des fichiers d'origine. */
.ecran {
  position: relative; overflow: hidden; border-radius: 28px;
  background: var(--color-board); aspect-ratio: 640 / 1261;
  isolation: isolate;
}
.ecran picture, .ecran img { display: block; width: 100%; height: auto; }
.ov-cadre {
  position: absolute; inset: 0;
  transition: transform 700ms var(--ease-in-out);
}

/* Écrans : celui qui part glisse d'un tiers (profondeur), celui qui arrive
   le recouvre, comme une navigation dans l'application. */
.ov-ecran {
  position: absolute; inset: 0; margin: 0;
  transform: translateX(100%); visibility: hidden;
  transition: none;
}
.ov-ecran[data-actif] {
  transform: none; visibility: visible; z-index: 1;
  transition: transform var(--ov-glissement, 520ms) var(--ease-in-out);
}
.ov-ecran[data-sortie] {
  transform: translateX(-30%); visibility: visible; z-index: 0;
  transition: transform var(--ov-glissement, 520ms) var(--ease-in-out);
}
.ov-visite[data-sens="arriere"] .ov-ecran:not([data-actif]):not([data-sortie]) { transform: translateX(-30%); }
.ov-visite[data-sens="arriere"] .ov-ecran[data-sortie] { transform: translateX(100%); z-index: 2; }
.ov-visite[data-sens="aucun"] .ov-ecran { transition: none; }

/* Projecteur : l'écran s'assombrit autour de la zone, cerclée de la couleur
   de la marque et numérotée comme l'étape de la légende. Caché pendant les
   touchers, pour qu'on voie le doigt et l'écran qui change. */
.ov-zone {
  position: absolute; z-index: 3; left: 3%; top: 16%; width: 94%; height: 19.5%;
  border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--color-accent), 0 0 0 9999px color-mix(in oklab, var(--color-board) 62%, transparent);
  opacity: 0;
  transition: left 650ms var(--ease-in-out), top 650ms var(--ease-in-out), width 650ms var(--ease-in-out), height 650ms var(--ease-in-out), opacity var(--dur-short) var(--ease-out);
}
.ov-visite.est-pret .ov-zone { opacity: 1; }
.ov-visite.est-en-transit .ov-zone { opacity: 0; }
.ov-zone::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit;
  border: 2px solid var(--color-accent); opacity: 0;
}
@keyframes ov-pulsation {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}
.ov-zone.est-pose::after { animation: ov-pulsation 1.4s var(--ease-out) 650ms 2; }
.ov-zone-num {
  position: absolute; top: -13px; left: 12px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-ink);
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px var(--color-board);
}

/* Doigt : il se pose, appuie, et l'onde du toucher part de lui. */
.ov-doigt {
  position: absolute; z-index: 4; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: color-mix(in oklab, var(--color-board-type) 55%, transparent);
  border: 2px solid var(--color-board-type);
  box-shadow: 0 6px 18px -6px color-mix(in oklab, var(--color-board) 70%, transparent);
  opacity: 0; pointer-events: none;
}
.ov-doigt::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--color-board-type); opacity: 0;
}
@keyframes ov-appui {
  0% { opacity: 0; transform: scale(1.6); }
  30% { opacity: 1; transform: scale(1); }
  48% { transform: scale(0.8); }
  64% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes ov-onde {
  0%, 45% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(2.8); }
}
.ov-doigt.est-appui { animation: ov-appui 900ms var(--ease-out) forwards; }
.ov-doigt.est-appui::after { animation: ov-onde 900ms var(--ease-out) forwards; }

/* ─── Légende ─── */
.ov-legende { width: min(100%, 22.5rem); display: grid; gap: var(--space-sm); }
.ov-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); }
.ov-etapes li { display: flex; gap: var(--space-sm); align-items: flex-start; }
/* Avec le script, les étapes se superposent : la légende garde la hauteur de
   la plus longue, rien ne saute quand le texte change. */
.ov-visite.est-pret .ov-etapes { gap: 0; }
.ov-visite.est-pret .ov-etapes li {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short);
}
.ov-visite.est-pret .ov-etapes li[data-actif] {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out), visibility 0s;
}
.ov-etape-num {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-ink);
  font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.ov-etape-texte strong { display: block; font-family: var(--font-display); font-size: var(--text-md); font-weight: 700; color: var(--color-ink); line-height: 1.35; }
.tete .ov-etape-texte p { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); line-height: 1.55; color: var(--color-ink-2); }

.ov-controles { display: flex; align-items: center; gap: var(--space-2xs); }
.ov-controles[hidden] { display: none; }
.ov-bouton {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); color: var(--color-ink);
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.ov-bouton svg { width: 18px; height: 18px; }
.ov-bouton:hover { color: var(--color-accent-text); border-color: var(--color-accent); }
.ov-bouton:active { background: var(--color-paper-2); }
.ov-bouton:focus-visible, .ov-segment:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.ov-bouton .ico-lecture { display: none; }
.ov-bouton.est-en-pause .ico-lecture { display: block; }
.ov-bouton.est-en-pause .ico-pause { display: none; }

.ov-progression { flex: 1; min-width: 0; display: flex; gap: 4px; }
.ov-segment {
  position: relative; flex: 1; min-width: 0; height: 44px;
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 4px;
}
.ov-segment::before, .ov-segment-plein {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; margin-top: -2px; border-radius: 2px;
}
.ov-segment::before { background: var(--color-rule); transition: background-color var(--dur-micro) var(--ease-out); }
.ov-segment:hover::before { background: var(--color-rule-2); }
.ov-segment-plein { background: var(--color-accent); transform: scaleX(0); transform-origin: left center; }
.ov-segment.est-passe .ov-segment-plein { transform: scaleX(1); }
@keyframes ov-remplir { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ov-segment.est-courant .ov-segment-plein { animation: ov-remplir var(--ov-duree, 6000ms) linear forwards; animation-play-state: paused; }
.ov-visite.est-en-lecture .ov-segment.est-courant .ov-segment-plein { animation-play-state: running; }

/* ═══ Fiches « pour qui » ═══ */
.cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); }
.carte {
  background: var(--color-stock); border-radius: var(--radius-card);
  box-shadow: var(--edge-stock), var(--cast-stock);
  padding: var(--space-lg);
  display: grid; gap: var(--space-xs); align-content: start;
}
.carte h3 { margin-top: var(--space-xs); }
.carte p { font-size: var(--text-md); line-height: 1.6; }
.carte-ico {
  width: 44px; height: 44px; border-radius: var(--radius-input);
  background: var(--color-paper-3); color: var(--color-accent-text);
  display: grid; place-items: center;
}
.carte-ico svg { width: 20px; height: 20px; }

/* ═══ Étapes ═══ */
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); counter-reset: etape; }
.etape { counter-increment: etape; display: grid; gap: var(--space-xs); align-content: start; }
.etape::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--font-outlier); font-size: var(--text-xl); font-weight: 400;
  font-variant-numeric: tabular-nums; line-height: 1;
  color: var(--color-accent-text);
  padding-bottom: var(--space-sm); margin-bottom: var(--space-xs);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}
.etape p { font-size: var(--text-md); line-height: 1.6; }

/* ═══ Encart étudiant ═══ */
/* C'est lui qui évite les installations par erreur, et les avis « impossible
   de se connecter » qui suivraient sur la fiche Play Store. */
.section .encart {
  width: min(46rem, 100% - 2 * var(--gutter)); margin-inline: auto;
  display: flex; gap: var(--space-md); align-items: flex-start;
  padding: var(--space-lg); border-radius: var(--radius-card);
  background: var(--color-stock); box-shadow: var(--edge-stock), var(--cast-stock);
  font-size: var(--text-md); color: var(--color-ink-2); line-height: 1.6;
}
.encart svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--color-accent-text); margin-top: var(--space-2xs); }
.encart strong { color: var(--color-ink); font-weight: 600; }
.encart a {
  color: var(--color-accent-text); font-weight: 600;
  text-decoration: underline; text-underline-offset: 0.2em; border-radius: 2px;
  transition: color var(--dur-micro) var(--ease-out);
}
.encart a:hover { color: var(--color-accent-hover); }
.encart a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@media (max-width: 60rem) {
  .tete-grille { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .cartes { grid-template-columns: minmax(0, 1fr); }
  .etapes { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
}
@media (max-width: 40rem) {
  .tete { padding-block: var(--space-xl) var(--space-2xl); }
  .tel { width: 236px; }
  .badge-play img { width: 178px; }
  .section .encart { padding: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  .tel { animation: none; }
  .ov-zone, .ov-cadre { transition: none; }
}
