/* V5 · ASSISTANT (PC) — une conversation : fil centré, messages de l'utilisateur à droite dans une bulle, réponses de
   l'assistant en texte simple à gauche, actions en petite ligne grise, champ de saisie ancré en bas (js/v5/pages/assistant.js). */
html.v5 #view-assistant.active{ display: flex; flex-direction: column; box-sizing: border-box; height: calc(100vh - var(--v5-barre-h)); max-width: none; margin: 0; padding: 0; }
html.v5 .as-fil{ flex: 1; min-height: 0; overflow-y: auto; box-sizing: border-box; padding: 28px max(24px, calc(50% - 360px)) 16px; display: flex; flex-direction: column; gap: 12px; }
html.v5 .as-msg{ max-width: 100%; font-size: var(--v5-t-13); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--v5-texte); }
html.v5 .as-moi{ align-self: flex-end; max-width: 78%; padding: 8px 12px; border-radius: var(--v5-r-groupe); background: var(--v5-rempli-2); }
html.v5 .as-ia{ align-self: flex-start; }
html.v5 .as-outil{ align-self: flex-start; font-size: var(--v5-t-12); color: var(--v5-texte-3); }
html.v5 .as-attente{ color: var(--v5-texte-3); }
html.v5 .as-erreur{ color: var(--v5-rouge); }

html.v5 .as-accueil{ margin: auto 0; text-align: center; }
html.v5 .as-accueil h2{ margin: 0 0 6px; font-size: var(--v5-t-22); font-weight: var(--v5-g-gras); line-height: var(--v5-i-22); letter-spacing: -.01em; }
html.v5 .as-accueil p{ margin: 0 0 20px; font-size: var(--v5-t-13); color: var(--v5-texte-2); }
html.v5 .as-exemples{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
html.v5 .as-exemple{ height: var(--v5-ctrl-l); padding: 0 12px; border: 0; border-radius: var(--v5-r-bouton); background: none; box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); color: var(--v5-texte); font: var(--v5-g-normal) var(--v5-t-12)/15px var(--v5-police); cursor: default; }
html.v5 .as-exemple:hover{ background: var(--v5-rempli-3); }

/* ---- le champ de saisie, à la manière de Claude : le texte en haut, une rangée d'outils en bas (trombone à gauche ;
   niveau des images et bouton d'envoi rond à droite). Les vignettes des photos jointes se posent au-dessus du texte. */
html.v5 .as-saisie{ flex: none; display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; margin: 0 max(24px, calc(50% - 360px)) 24px; padding: 12px 10px 10px 14px; border-radius: var(--v5-r-fenetre); background: var(--v5-fond-groupe); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort), var(--v5-ombre-capsule); cursor: text; }
html.v5 .as-saisie:focus-within{ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3), var(--v5-ombre-capsule); }
html.v5 .as-saisie textarea{ display: block; width: 100%; box-sizing: border-box; min-height: 44px; max-height: 200px; margin: 0; padding: 2px 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; resize: none; font: var(--v5-g-normal) var(--v5-t-15, 15px)/22px var(--v5-police); color: var(--v5-texte); }
html.v5 .as-saisie textarea::placeholder{ color: var(--v5-texte-3); }
html.v5 .as-barre{ display: flex; align-items: center; gap: 6px; margin-left: -6px; }
html.v5 .as-vide{ flex: 1; }
html.v5 .as-joindre{ display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--v5-r-bouton); background: none; box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); color: var(--v5-texte-2); cursor: default; }
html.v5 .as-joindre:hover{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-joindre svg{ width: 17px; height: 17px; }
html.v5 .as-niveau{ display: inline-flex; align-items: center; gap: 4px; flex: none; height: 32px; padding: 0 8px 0 10px; border: 0; border-radius: var(--v5-r-bouton); background: none; color: var(--v5-texte-2); font: var(--v5-g-moyen, 500) var(--v5-t-13)/16px var(--v5-police); cursor: default; }
html.v5 .as-niveau:hover, html.v5 .as-niveau[aria-expanded="true"]{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-niveau svg{ width: 13px; height: 13px; }
html.v5 .as-envoyer{ display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--v5-violet); color: var(--v5-sur-violet); cursor: default; }
html.v5 .as-envoyer:hover{ background: var(--v5-violet-survol); }
html.v5 .as-envoyer:disabled{ background: var(--v5-rempli-2); color: var(--v5-texte-3); }
html.v5 .as-envoyer svg{ width: 17px; height: 17px; stroke-width: 2.2; }

html.v5 .as-jointes{ display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 4px; cursor: default; }
html.v5 .as-jointes[hidden]{ display: none; }
html.v5 .as-jointe{ position: relative; width: 56px; height: 56px; }
html.v5 .as-jointe img{ width: 100%; height: 100%; object-fit: cover; border-radius: var(--v5-r-surface); }
html.v5 .as-jointe button{ position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: var(--v5-texte); color: var(--v5-fond); font-size: var(--v5-t-12); line-height: 18px; cursor: default; }
html.v5 #view-assistant.as-depot .as-saisie{ outline: var(--v5-focus-l) solid var(--v5-focus); }

/* ---- Vinty, la mascotte : en tête de l'accueil ; elle flotte doucement, cligne des yeux et son étoile scintille
   (tout s'arrête si l'utilisateur réduit les animations) */
html.v5 .as-mascotte{ display: block; width: 88px; height: 88px; margin: 0 auto 16px; overflow: visible; animation: as-flotte 3.6s ease-in-out infinite; }
html.v5 .as-m-oeil{ transform-box: fill-box; transform-origin: center; animation: as-cligne 4.8s infinite; }
html.v5 .as-m-etoile{ transform-box: fill-box; transform-origin: center; animation: as-scintille 2.4s ease-in-out infinite; }
@keyframes as-flotte{ 50%{ transform: translateY(-5px); } }
@keyframes as-cligne{ 0%, 92%, 100%{ transform: scaleY(1); } 96%{ transform: scaleY(.12); } }
@keyframes as-scintille{ 50%{ transform: scale(.72) rotate(18deg); } }
@media (prefers-reduced-motion: reduce){ html.v5 .as-mascotte, html.v5 .as-m-oeil, html.v5 .as-m-etoile{ animation: none; } }

/* ---- appel rapide de Vinty (Ctrl + I), à la manière de Cursor : une barre flottante en bas de l'écran, sur toutes les pages */
html.v5 .as-rapide{ position: fixed; z-index: 10035; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: min(560px, calc(100vw - 48px)); height: 44px; margin: 0; padding: 0 10px 0 8px; border-radius: var(--v5-r-groupe); background: var(--v5-fond-groupe); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort), var(--v5-ombre-popover); animation: as-monte 140ms ease-out; }
html.v5 .as-rapide-mascotte{ flex: none; width: 26px; height: 26px; }
html.v5 .as-rapide input{ flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; font: var(--v5-g-normal) var(--v5-t-13)/20px var(--v5-police); color: var(--v5-texte); }
html.v5 .as-rapide input::placeholder{ color: var(--v5-texte-3); }
html.v5 .as-rapide kbd{ flex: none; color: var(--v5-texte-2); }
html.v5 .as-accueil .as-astuce{ margin: 18px 0 0; font-size: var(--v5-t-12); color: var(--v5-texte-3); }
@keyframes as-monte{ from{ transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce){ html.v5 .as-rapide{ animation: none; } }

/* ---- question de Vinty, à la manière de Claude : une carte à la place du champ de saisie, avec des lignes numérotées,
   une ligne « Autre chose » où l'on écrit, et « Passer » */
html.v5 #view-assistant.as-en-question .as-saisie{ display: none; }
html.v5 .as-question{ flex: none; display: flex; flex-direction: column; box-sizing: border-box; margin: 0 max(24px, calc(50% - 360px)) 24px; padding: 6px; border-radius: var(--v5-r-fenetre); background: var(--v5-fond-groupe); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort), var(--v5-ombre-capsule); }
html.v5 .as-q-tete{ display: flex; align-items: flex-start; gap: 8px; padding: 8px 6px 8px 10px; }
html.v5 .as-q-texte{ flex: 1; min-width: 0; font: var(--v5-g-fort) var(--v5-t-13)/18px var(--v5-police); color: var(--v5-texte); }
html.v5 .as-q-fermer{ display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin: -3px 0; padding: 0; border: 0; border-radius: var(--v5-r-ctrl); background: none; color: var(--v5-texte-3); cursor: default; }
html.v5 .as-q-fermer:hover{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-q-fermer svg{ width: 14px; height: 14px; }
html.v5 .as-choix{ display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; height: 36px; margin: 0; padding: 0 10px; border: 0; border-radius: var(--v5-r-bouton); background: none; box-shadow: none; color: var(--v5-texte); font: var(--v5-g-normal) var(--v5-t-13)/16px var(--v5-police); text-align: left; cursor: default; }
html.v5 .as-choix + .as-choix{ box-shadow: 0 calc(-1 * var(--v5-trait-fort)) 0 var(--v5-separateur); }
html.v5 .as-choix:hover, html.v5 .as-choix:focus-visible, html.v5 .as-choix:focus-within{ background: var(--v5-rempli-3); outline: none; }
html.v5 .as-choix kbd{ flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border-radius: var(--v5-r-mini); color: var(--v5-texte-2); }
html.v5 .as-choix:focus-visible kbd, html.v5 .as-choix:focus-within kbd{ background: var(--v5-violet); color: var(--v5-sur-violet); }
html.v5 .as-choix-autre input{ flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; font: inherit; color: var(--v5-texte); cursor: text; }
html.v5 .as-choix-autre input::placeholder{ color: var(--v5-texte-3); }
html.v5 .as-q-pied{ display: flex; align-items: center; gap: 8px; padding: 8px 4px 2px 10px; font-size: var(--v5-t-11); color: var(--v5-texte-3); }
html.v5 .as-q-pied span{ flex: 1; }
html.v5 .as-q-passer{ flex: none; height: var(--v5-ctrl-l); padding: 0 12px; border: 0; border-radius: var(--v5-r-bouton); background: none; box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); color: var(--v5-texte); font: var(--v5-g-moyen) var(--v5-t-12)/15px var(--v5-police); cursor: default; }
html.v5 .as-q-passer:hover{ background: var(--v5-rempli-3); }

/* ---- dictée vocale : le micro du champ ; pendant l'écoute il passe à l'accent et bat doucement */
html.v5 .as-micro{ display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--v5-r-bouton); background: none; color: var(--v5-texte-2); cursor: default; }
html.v5 .as-micro[hidden]{ display: none; }
html.v5 .as-micro:hover{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-micro svg{ width: 17px; height: 17px; }
html.v5 .as-micro[aria-pressed="true"]{ background: var(--v5-violet); color: var(--v5-sur-violet); animation: as-bat 1.2s ease-in-out infinite; }
@keyframes as-bat{ 50%{ transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce){ html.v5 .as-micro[aria-pressed="true"]{ animation: none; } }

/* ---- à la manière de Cursor : mode (Agir / Demander), « réfléchit » en reflet, étapes avec état, bouton Arrêter */
html.v5 .as-mode{ display: inline-flex; align-items: center; gap: 5px; flex: none; height: 32px; padding: 0 8px 0 9px; border: 0; border-radius: var(--v5-r-capsule); background: var(--v5-rempli-3); color: var(--v5-texte); font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); cursor: default; }
html.v5 .as-mode:hover, html.v5 .as-mode[aria-expanded="true"]{ background: var(--v5-rempli-2); }
html.v5 .as-mode svg{ width: 13px; height: 13px; }
html.v5 #as-mode-ic{ display: grid; }
html.v5 #as-mode-ic svg{ width: 15px; height: 15px; }
html.v5 .as-ic-envoi, html.v5 .as-ic-stop{ display: grid; }
html.v5 .as-ic-stop, html.v5 .as-occupe .as-ic-envoi{ display: none; }
html.v5 .as-occupe .as-ic-stop{ display: grid; }
html.v5 .as-occupe .as-envoyer{ background: var(--v5-texte); color: var(--v5-fond); }

html.v5 .as-attente{ display: flex; align-items: center; gap: 8px; }
html.v5 .as-mini{ flex: none; width: 22px; height: 22px; animation: none; }
html.v5 .as-mini .as-m-oeil{ animation: none; }
html.v5 .as-reflet{ color: var(--v5-texte-3); background: none; -webkit-text-fill-color: currentColor; }

html.v5 .as-outil{ display: flex; align-items: center; gap: 7px; }
html.v5 .as-etape-ic{ flex: none; display: grid; place-items: center; width: 16px; height: 16px; }
html.v5 .as-etape-ic svg{ width: 13px; height: 13px; stroke-width: 2.2; }
html.v5 .as-outil[data-etat="fait"] .as-etape-ic{ color: var(--v5-vert); }
html.v5 .as-outil[data-etat="rate"] .as-etape-ic{ color: var(--v5-rouge); }
html.v5 .as-tourne{ display: block; width: 11px; height: 11px; box-sizing: border-box; border: 1.5px solid var(--v5-rempli-1); border-radius: 2px; background: var(--v5-rempli-1); animation: none; }

/* ---- mode vocal : pendant qu'il est actif, un bandeau discret au-dessus du champ le rappelle */
html.v5 #view-assistant.as-en-vocal .as-saisie{ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-violet), var(--v5-ombre-capsule); }
html.v5 #view-assistant.as-en-vocal .as-saisie textarea::placeholder{ color: var(--v5-texte-2); }

/* ---- barre de discussion, deuxième passe : plus d'air, un seul style de bouton (sans cadre), groupe d'outils à droite
   séparé par un filet, anneau violet quand on écrit, rappel des touches sous le champ */
html.v5 .as-saisie{ gap: 8px; margin-bottom: 8px; padding: 14px 12px 10px 16px; border-radius: var(--v5-r-fenetre); }
html.v5 .as-saisie:focus-within{ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-violet), 0 0 0 3px var(--v5-violet-doux), var(--v5-ombre-capsule); }
html.v5 .as-saisie textarea{ min-height: 48px; }
html.v5 .as-barre{ gap: 2px; margin-left: -8px; }
html.v5 .as-joindre{ box-shadow: none; }
html.v5 .as-joindre, html.v5 .as-micro{ width: 30px; height: 30px; border-radius: var(--v5-r-bouton); }
html.v5 .as-mode{ height: 30px; margin-left: 4px; }
html.v5 .as-niveau{ height: 30px; gap: 5px; margin: 0 6px 0 2px; padding: 0 6px 0 8px; }
html.v5 .as-niveau > svg:first-child{ width: 15px; height: 15px; }
html.v5 .as-vocal{ margin-right: 2px; }
html.v5 .as-envoyer{ width: 34px; height: 34px; }
html.v5 .as-pied{ flex: none; margin: 0 max(24px, calc(50% - 360px)) 14px; text-align: center; font-size: var(--v5-t-11); color: var(--v5-texte-3); }
html.v5 #view-assistant.as-en-question .as-pied{ display: none; }
html.v5 .as-question{ border-radius: var(--v5-r-fenetre); margin-bottom: 22px; }

/* ---- simple (demande de Lucas) : pas de rappel sous le champ, pas d'anneau de couleur quand on écrit */
html.v5 .as-pied{ display: none; }
html.v5 .as-saisie{ margin-bottom: 24px; }
html.v5 .as-saisie:focus-within{ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3), var(--v5-ombre-capsule); }

/* ---- accueil, deuxième passe : tant que la conversation est vide, tout est centré dans l'écran — mascotte et salut, puis le
   champ de saisie, puis les propositions dessous (le fil et l'accueil s'effacent en « contents » pour que le champ puisse
   se glisser entre le salut et les propositions) */
html.v5 #view-assistant.active:has(.as-accueil){ justify-content: center; padding-bottom: 6vh; }
html.v5 #view-assistant:has(.as-accueil) .as-fil, html.v5 #view-assistant .as-accueil{ display: contents; }
html.v5 #view-assistant:has(.as-accueil) .as-mascotte{ order: 1; flex: none; width: 72px; height: 72px; margin: 0 auto 18px; }
html.v5 #view-assistant .as-accueil h2{ order: 2; margin: 0 24px 8px; text-align: center; font-size: 30px; line-height: 36px; font-weight: var(--v5-g-fort); letter-spacing: -.02em; }
html.v5 #view-assistant .as-accueil .as-sous{ order: 3; margin: 0 24px 28px; text-align: center; font-size: var(--v5-t-15); line-height: 20px; color: var(--v5-texte-2); }
html.v5 #view-assistant:has(.as-accueil) .as-saisie{ order: 4; margin-bottom: 16px; }
html.v5 #view-assistant:has(.as-accueil) .as-question{ order: 4; }
html.v5 #view-assistant .as-accueil .as-exemples{ order: 5; margin: 0 max(24px, calc(50% - 360px)); gap: 8px; }
html.v5 #view-assistant .as-accueil .as-astuce{ order: 6; margin: 22px 24px 0; text-align: center; }
html.v5 #view-assistant:has(.as-accueil) .as-pied{ order: 7; }
html.v5 .as-exemple{ display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: var(--v5-r-capsule); font-size: var(--v5-t-13); line-height: 16px; color: var(--v5-texte-2); }
html.v5 .as-exemple:hover{ color: var(--v5-texte); }
html.v5 .as-exemple svg{ flex: none; width: 15px; height: 15px; color: var(--v5-texte-3); }

/* ---- la mascotte s'anime selon ce qui se passe (tout s'arrête si l'utilisateur réduit les animations) :
   elle arrive en rebondissant, saute quand on clique dessus, baisse les yeux vers le champ quand on écrit,
   bat doucement en mode vocal */
html.v5 #view-assistant .as-accueil .as-mascotte{ cursor: default; animation: as-arrive 520ms cubic-bezier(.2, 1.4, .4, 1) both, as-flotte 3.6s ease-in-out 520ms infinite; }
html.v5 #view-assistant .as-accueil .as-mascotte.as-saute{ animation: as-saute 620ms cubic-bezier(.3, 0, .3, 1); }
html.v5 #view-assistant.as-ecrit .as-accueil .as-m-oeil{ animation: none; transform: translateY(5px); transition: transform 160ms; }
html.v5 #view-assistant.as-en-vocal .as-accueil .as-mascotte{ animation: as-ecoute 1.1s ease-in-out infinite; }
@keyframes as-arrive{ from{ transform: translateY(14px) scale(.6); } }
@keyframes as-saute{ 0%{ transform: none; } 18%{ transform: translateY(4px) scale(1.12, .86); } 45%{ transform: translateY(-22px) scale(.94, 1.08); } 72%{ transform: translateY(0) scale(1.08, .9); } 100%{ transform: none; } }
@keyframes as-ecoute{ 50%{ transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce){ html.v5 #view-assistant .as-accueil .as-mascotte, html.v5 #view-assistant .as-accueil .as-mascotte.as-saute, html.v5 #view-assistant.as-en-vocal .as-accueil .as-mascotte{ animation: none; } }

/* ---- animations de la mascotte, suite : coucou du bras à l'ouverture, regard qui suit la souris, sommeil au repos,
   saut de joie de la petite mascotte quand une fiche part */
html.v5 .as-m-yeux{ transform: translate(var(--rx, 0px), var(--ry, 0px)); transition: transform 80ms steps(1, end);   /* d’un pixel à l’autre, sans glisser entre deux */ }
html.v5 .as-m-zzz{ display: none; }
html.v5 .as-mini .as-m-yeux{ transform: none; }
html.v5 #view-assistant .as-accueil .as-m-bras-d{ animation: as-coucou 1.4s steps(1) 650ms 1; }
html.v5 #view-assistant.as-dort .as-accueil .as-mascotte{ animation: as-flotte 6s ease-in-out infinite; }
html.v5 #view-assistant.as-dort .as-accueil .as-m-yeux{ transform: translateY(3px); }
html.v5 #view-assistant.as-dort .as-accueil .as-m-oeil{ animation: none; transform: scaleY(0.25); }
html.v5 #view-assistant.as-dort .as-accueil .as-m-zzz{ display: block; animation: as-zzz 2.6s ease-in-out infinite; }
html.v5 .as-mini.as-joie{ margin-left: 4px; animation: as-saute 560ms cubic-bezier(.3, 0, .3, 1) 2; }
html.v5 .as-mini.as-joie .as-m-oeil{ animation: none; }
@keyframes as-coucou{ 0%, 28%, 56%, 84%{ transform: translateY(-9px); } 14%, 42%, 70%, 100%{ transform: none; } }
@keyframes as-zzz{ 0%{ transform: translate(-6px, 8px); opacity: 0; } 30%{ opacity: 1; } 100%{ transform: translate(2px, -4px); opacity: 0; } }
@media (prefers-reduced-motion: reduce){ html.v5 #view-assistant .as-accueil .as-m-bras-d, html.v5 #view-assistant.as-dort .as-accueil .as-m-zzz, html.v5 .as-mini.as-joie{ animation: none; } html.v5 .as-m-yeux{ transition: none; } }

/* ---- accord avant écriture : la carte montre ce que Vinty va enregistrer (ancien → nouveau), « Annuler » ou « Confirmer » */
html.v5 .as-accord-ligne{ padding: 6px 10px; font: var(--v5-g-normal) var(--v5-t-13)/18px var(--v5-police); color: var(--v5-texte); overflow-wrap: anywhere; }
html.v5 .as-accord-ligne + .as-accord-ligne{ box-shadow: 0 calc(-1 * var(--v5-trait-fort)) 0 var(--v5-separateur); }
html.v5 .as-accord .as-q-pied{ padding-top: 10px; }
html.v5 .as-accord-oui{ background: var(--v5-violet); box-shadow: none; color: var(--v5-sur-violet); }
html.v5 .as-accord-oui:hover{ background: var(--v5-violet-survol); }

/* ---- le compagnon : Vinty perché sur le coin du champ de saisie (ou de la carte de question) pendant la conversation.
   Il mime l'état de Vinty (data-vinty sur la page). Tout bouge « en pixels » : des sauts nets, sans glissement ni rotation.
   Sur l'accueil il n'apparaît pas : la grande mascotte y est déjà. */
html.v5 .as-saisie, html.v5 .as-question{ position: relative; }
html.v5 .as-compagnon{ position: absolute; right: 18px; top: -33px; width: 40px; height: 40px; margin: 0; overflow: visible; pointer-events: none; animation: asc-repos 3.2s steps(1) infinite; }
html.v5 #view-assistant:has(.as-accueil) .as-saisie > .as-compagnon{ display: none; }
html.v5 .as-compagnon .as-a{ display: none; }
html.v5 .as-compagnon .as-m-yeux{ transition: none; transform: none; animation: asc-yeux 7s steps(1) infinite; }
html.v5 .as-compagnon :is(.as-m-bras-d, .as-m-bras-g, .as-m-oeil, .as-a rect){ transform-box: fill-box; transform-origin: center; }
@keyframes asc-repos{ 0%{ transform: translateY(0); } 50%{ transform: translateY(-2px); } }
@keyframes asc-yeux{ 0%, 36%, 66%, 92%{ transform: translate(0, 0); } 22%{ transform: translate(3px, 0); } 54%{ transform: translate(-3px, 0); } 82%{ transform: translate(0, 3px); } }

/* pense : il lève les yeux, trois points montent l'un après l'autre */
html.v5 [data-vinty="pense"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="pense"] .as-compagnon .as-m-yeux{ animation: asc-leve 1.6s steps(1) infinite; }
html.v5 [data-vinty="pense"] .as-compagnon .as-a-pense{ display: block; }
html.v5 [data-vinty="pense"] .as-compagnon .as-a-p1{ animation: asc-point 1.5s steps(1) infinite; }
html.v5 [data-vinty="pense"] .as-compagnon .as-a-p2{ animation: asc-point 1.5s steps(1) .3s infinite; }
html.v5 [data-vinty="pense"] .as-compagnon .as-a-p3{ animation: asc-point 1.5s steps(1) .6s infinite; }
@keyframes asc-leve{ 0%{ transform: translate(3px, -3px); } 50%{ transform: translate(0, -3px); } }
@keyframes asc-point{ 0%{ visibility: hidden; } 30%{ visibility: visible; } }

/* travaille : il s'active, les deux bras battent en alternance, petits sauts rapides */
html.v5 [data-vinty="travaille"] .as-compagnon{ animation: asc-repos .4s steps(1) infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-m-yeux{ animation: none; transform: translate(0, 3px); }
html.v5 [data-vinty="travaille"] .as-compagnon .as-m-bras-d{ animation: asc-bras .4s steps(1) infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-m-bras-g{ animation: asc-bras .4s steps(1) .2s infinite; }
@keyframes asc-bras{ 0%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }

/* content : deux sauts, les bras en l'air, des étincelles */
html.v5 [data-vinty="content"] .as-compagnon{ animation: asc-saut .5s steps(1) infinite; }
html.v5 [data-vinty="content"] .as-compagnon :is(.as-m-bras-d, .as-m-bras-g){ transform: translateY(-9px); }
html.v5 [data-vinty="content"] .as-compagnon .as-a-content{ display: block; animation: asc-clignote .25s steps(1) infinite; }
@keyframes asc-saut{ 0%{ transform: translateY(0); } 50%{ transform: translateY(-8px); } }
@keyframes asc-clignote{ 50%{ visibility: hidden; } }

/* erreur : il secoue la tête de gauche à droite, yeux plissés, un « ! » rouge */
html.v5 [data-vinty="erreur"] .as-compagnon{ animation: asc-secoue .3s steps(1) infinite; }
html.v5 [data-vinty="erreur"] .as-compagnon .as-m-yeux{ animation: none; }
html.v5 [data-vinty="erreur"] .as-compagnon .as-m-oeil{ animation: none; transform: scaleY(0.3); }
html.v5 [data-vinty="erreur"] .as-compagnon .as-a-erreur{ display: block; }
@keyframes asc-secoue{ 0%{ transform: translateX(-3px); } 50%{ transform: translateX(3px); } }

/* question : il te regarde, un « ? » clignote au-dessus de lui */
html.v5 [data-vinty="question"] .as-compagnon .as-a-question{ display: block; animation: asc-clignote 1.2s steps(1) infinite; }
html.v5 [data-vinty="question"] .as-compagnon .as-m-yeux{ animation: none; transform: translate(-3px, 3px); }
html.v5 #view-assistant.as-en-question .as-saisie > .as-compagnon{ display: none; }

/* écoute : immobile, trois barres de son qui montent et descendent */
html.v5 [data-vinty="ecoute"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="ecoute"] .as-compagnon .as-a-ecoute{ display: block; }
html.v5 [data-vinty="ecoute"] .as-compagnon .as-a-b1{ transform-origin: bottom; animation: asc-barre .5s steps(2) infinite; }
html.v5 [data-vinty="ecoute"] .as-compagnon .as-a-b2{ transform-origin: bottom; animation: asc-barre .5s steps(2) .15s infinite; }
html.v5 [data-vinty="ecoute"] .as-compagnon .as-a-b3{ transform-origin: bottom; animation: asc-barre .5s steps(2) .3s infinite; }
@keyframes asc-barre{ 0%{ transform: scaleY(1); } 50%{ transform: scaleY(0.4); } 100%{ transform: scaleY(1); } }

/* dort : il s'affaisse d'un cran, yeux fermés, un « z » monte */
html.v5 #view-assistant.as-dort .as-compagnon{ animation: none; transform: translateY(3px); }
html.v5 #view-assistant.as-dort .as-compagnon .as-m-yeux{ animation: none; }
html.v5 #view-assistant.as-dort .as-compagnon .as-m-oeil{ animation: none; transform: scaleY(0.25); }
html.v5 #view-assistant.as-dort .as-compagnon .as-m-zzz{ display: block; animation: as-zzz 2.6s steps(4) infinite; }
@media (prefers-reduced-motion: reduce){ html.v5 #view-assistant#view-assistant[data-vinty] .as-compagnon, html.v5 #view-assistant#view-assistant[data-vinty] .as-compagnon *{ animation: none; } }

/* ---- les objets du compagnon. Il tape sur un petit ordinateur quand Vinty travaille ; il prend des notes pendant qu'on
   écrit ; au repos, de temps en temps, il boit un café ou lit son carnet. Toujours par à-coups. */
html.v5 [data-vinty="travaille"] .as-compagnon .as-a-ordi{ display: block; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-a-l1{ animation: asc-point .9s steps(1) infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-a-l2{ animation: asc-point .9s steps(1) .3s infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-a-l3{ animation: asc-point .9s steps(1) .6s infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="travaille"] .as-compagnon :is(.as-m-bras-d, .as-m-bras-g){ animation-name: asc-tape; }
@keyframes asc-tape{ 0%{ transform: translateY(9px); } 50%{ transform: translateY(18px); } }

html.v5 [data-vinty="note"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="note"] .as-compagnon .as-a-notes{ display: block; }
html.v5 [data-vinty="note"] .as-compagnon .as-m-yeux{ animation: none; transform: translate(3px, 3px); }
html.v5 [data-vinty="note"] .as-compagnon .as-a-crayon{ animation: asc-crayon .45s steps(1) infinite; }
html.v5 [data-vinty="note"] .as-compagnon .as-a-trait{ animation: asc-clignote .9s steps(1) infinite; }
@keyframes asc-crayon{ 0%{ transform: translate(0, 0); } 33%{ transform: translate(-4px, 1px); } 66%{ transform: translate(3px, -1px); } }

html.v5 [data-vinty="cafe"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="cafe"] .as-compagnon .as-a-cafe{ display: block; animation: asc-boit 4.2s steps(1) 1; }
html.v5 [data-vinty="cafe"] .as-compagnon .as-m-bras-d{ animation: asc-leve-bras 4.2s steps(1) 1; }
html.v5 [data-vinty="cafe"] .as-compagnon .as-m-oeil{ animation: asc-savoure 4.2s steps(1) 1; }
html.v5 [data-vinty="cafe"] .as-compagnon .as-a-f1{ animation: asc-clignote .8s steps(1) infinite; }
html.v5 [data-vinty="cafe"] .as-compagnon .as-a-f2{ animation: asc-clignote .8s steps(1) .4s infinite; }
@keyframes asc-boit{ 0%, 80%{ transform: translate(0, 0); } 30%, 60%{ transform: translate(-22px, -6px); } }
@keyframes asc-leve-bras{ 0%, 80%{ transform: translateY(0); } 30%, 60%{ transform: translate(-9px, -9px); } }
@keyframes asc-savoure{ 0%, 80%{ transform: scaleY(1); } 30%, 60%{ transform: scaleY(0.25); } }

html.v5 [data-vinty="livre"] .as-compagnon{ animation: none; }
html.v5 [data-vinty="livre"] .as-compagnon .as-a-livre{ display: block; }
html.v5 [data-vinty="livre"] .as-compagnon .as-m-yeux{ animation: asc-lit 1.4s steps(1) infinite; }
html.v5 [data-vinty="livre"] .as-compagnon .as-a-trait{ animation: asc-clignote 1.4s steps(1) infinite; }
@keyframes asc-lit{ 0%{ transform: translate(-3px, 3px); } 50%{ transform: translate(3px, 3px); } }
html.v5 .as-compagnon{ right: 22px; top: -50px; width: 56px; height: 56px; }

/* ================= passe de qualité (11/10) =================
   Pixels nets : chaque taille fait tomber un bloc du dessin sur un nombre entier de points (32 → 3, 64 → 6, 96 → 9). */
html.v5 .as-mascotte{ width: 96px; height: 96px; image-rendering: pixelated; }
html.v5 #view-assistant:has(.as-accueil) .as-mascotte{ width: 96px; height: 96px; }
html.v5 .as-mini{ width: 32px; height: 32px; }
html.v5 .as-rapide-mascotte{ width: 32px; height: 32px; }
html.v5 .as-compagnon{ right: 22px; top: -60px; width: 64px; height: 64px; pointer-events: auto; cursor: default; }
html.v5 .as-m-bouche{ display: none; transform-box: fill-box; transform-origin: center; }
html.v5 .as-m-ombre{ display: none; transform-box: fill-box; transform-origin: center; }
html.v5 .as-compagnon .as-m-ombre{ display: block; }
html.v5 .as-m-corps{ transform-box: fill-box; transform-origin: 50% 100%; }

/* le compagnon : le mouvement est porté par le corps (l'ombre reste au sol) */
html.v5 .as-compagnon, html.v5 [data-vinty] .as-compagnon{ animation: none; }
html.v5 .as-compagnon .as-m-corps{ animation: asq-respire 3.2s steps(1) infinite; }
@keyframes asq-respire{ 0%{ transform: translateY(0); } 50%{ transform: translateY(-3px); } }
html.v5 .as-compagnon.as-suit .as-m-yeux{ animation: none; transform: translate(var(--cx, 0px), var(--cy, 0px)); }

/* saut de joie : élan (il s'écrase), envol, sommet, atterrissage (il s'écrase), retour ; l'ombre rétrécit en l'air */
html.v5 [data-vinty="content"] .as-compagnon .as-m-corps{ animation: asq-saut .75s steps(1) infinite; }
html.v5 [data-vinty="content"] .as-compagnon .as-m-ombre{ animation: asq-ombre .75s steps(1) infinite; }
@keyframes asq-saut{ 0%{ transform: scale(1.12, .89); } 15%{ transform: translateY(-9px) scale(.94, 1.06); } 35%{ transform: translateY(-18px); } 55%{ transform: translateY(-9px); } 70%{ transform: scale(1.12, .89); } 85%{ transform: none; } }
@keyframes asq-ombre{ 0%, 70%{ transform: scaleX(1.1); } 15%, 55%{ transform: scaleX(.78); } 35%{ transform: scaleX(.56); } 85%{ transform: none; } }

/* sursaut (on le touche, ou réveil) : il décolle d'un bloc, yeux grands ouverts, bras en l'air */
html.v5 [data-vinty="sursaut"] .as-compagnon .as-m-corps{ animation: asq-sursaut .6s steps(1) 1; }
html.v5 [data-vinty="sursaut"] .as-compagnon .as-m-oeil{ animation: none; transform: scale(1, 1.5); }
html.v5 [data-vinty="sursaut"] .as-compagnon .as-m-yeux{ animation: none; transform: none; }
html.v5 [data-vinty="sursaut"] .as-compagnon :is(.as-m-bras-d, .as-m-bras-g){ animation: none; transform: translateY(-9px); }
html.v5 [data-vinty="sursaut"] .as-compagnon .as-m-ombre{ animation: asq-ombre .6s steps(1) 1; }
@keyframes asq-sursaut{ 0%{ transform: scale(1.12, .89); } 20%{ transform: translateY(-12px); } 60%{ transform: translateY(-3px); } 85%{ transform: scale(1.06, .94); } }

/* tournis (quatre clics) : il tangue, ses yeux tournent, des points tournent au-dessus de sa tête */
html.v5 [data-vinty="tournis"] .as-compagnon .as-m-corps{ animation: asq-tangue .5s steps(1) infinite; }
html.v5 [data-vinty="tournis"] .as-compagnon .as-m-yeux{ animation: asq-yeux-tournent .5s steps(1) infinite; }
html.v5 [data-vinty="tournis"] .as-compagnon .as-a-tournis{ display: block; }
html.v5 [data-vinty="tournis"] .as-compagnon .as-a-t1{ animation: asc-clignote .5s steps(1) infinite; }
html.v5 [data-vinty="tournis"] .as-compagnon .as-a-t2{ animation: asc-clignote .5s steps(1) .17s infinite; }
html.v5 [data-vinty="tournis"] .as-compagnon .as-a-t3{ animation: asc-clignote .5s steps(1) .34s infinite; }
@keyframes asq-tangue{ 0%{ transform: translateX(-3px); } 50%{ transform: translateX(3px); } }
@keyframes asq-yeux-tournent{ 0%{ transform: translate(3px, 0); } 25%{ transform: translate(0, 3px); } 50%{ transform: translate(-3px, 0); } 75%{ transform: translate(0, -3px); } }

/* bâillement : la bouche s'ouvre en grand, les yeux se ferment, il s'étire d'un cran */
html.v5 [data-vinty="baille"] .as-compagnon .as-m-bouche{ display: block; animation: asq-baille 2.4s steps(1) 1 both; }
html.v5 [data-vinty="baille"] .as-compagnon .as-m-oeil{ animation: none; transform: scaleY(.25); }
html.v5 [data-vinty="baille"] .as-compagnon .as-m-yeux{ animation: none; transform: none; }
html.v5 [data-vinty="baille"] .as-compagnon .as-m-corps{ animation: asq-etire 2.4s steps(1) 1 both; }
html.v5 [data-vinty="baille"] .as-compagnon :is(.as-m-bras-d, .as-m-bras-g){ animation: asq-bras-etire 2.4s steps(1) 1 both; }
@keyframes asq-baille{ 0%{ transform: scale(.5, .3); } 20%{ transform: scale(.75, .7); } 40%, 70%{ transform: scale(1, 1.5); } 85%{ transform: scale(.75, .7); } 100%{ transform: scale(.5, .2); } }
@keyframes asq-etire{ 0%, 85%{ transform: none; } 40%, 70%{ transform: scale(.94, 1.06); } }
@keyframes asq-bras-etire{ 0%, 85%{ transform: none; } 40%, 70%{ transform: translateY(-9px); } }

/* il dort : affaissé d'un cran, il respire lentement ; l'ombre s'élargit */
html.v5 #view-assistant.as-dort .as-compagnon{ transform: none; }
html.v5 #view-assistant.as-dort .as-compagnon .as-m-corps{ animation: asq-dort 3.6s steps(1) infinite; }
html.v5 #view-assistant.as-dort .as-compagnon .as-m-ombre{ transform: scaleX(1.1); }
@keyframes asq-dort{ 0%{ transform: scale(1.06, .94); } 50%{ transform: scale(1.12, .89); } }

/* il cherche : une loupe passe de droite à gauche devant lui, ses yeux la suivent */
html.v5 [data-vinty="cherche"] .as-compagnon .as-a-loupe{ display: block; animation: asq-loupe 1.6s steps(1) infinite; }
html.v5 [data-vinty="cherche"] .as-compagnon .as-m-yeux{ animation: asq-yeux-loupe 1.6s steps(1) infinite; }
html.v5 [data-vinty="cherche"] .as-compagnon .as-m-corps{ animation: none; }
@keyframes asq-loupe{ 0%{ transform: translate(0, 0); } 25%{ transform: translate(-18px, 0); } 50%{ transform: translate(-36px, 0); } 75%{ transform: translate(-18px, 0); } }
@keyframes asq-yeux-loupe{ 0%{ transform: translate(3px, 3px); } 25%, 75%{ transform: translate(0, 3px); } 50%{ transform: translate(-3px, 3px); } }

/* il imprime : une étiquette à code-barres sort de l'imprimante par crans, il la regarde sortir */
html.v5 [data-vinty="imprime"] .as-compagnon .as-a-imprime{ display: block; }
html.v5 [data-vinty="imprime"] .as-compagnon .as-a-feuille{ animation: asq-sort 1.8s steps(1) infinite; }
html.v5 [data-vinty="imprime"] .as-compagnon .as-m-yeux{ animation: none; transform: translate(0, 3px); }
html.v5 [data-vinty="imprime"] .as-compagnon .as-m-corps{ animation: none; }
@keyframes asq-sort{ 0%{ transform: translateY(18px); } 25%{ transform: translateY(12px); } 50%{ transform: translateY(6px); } 75%{ transform: translateY(0); } }

/* il change un prix : il brandit une étiquette de prix, qui se balance */
html.v5 [data-vinty="prix"] .as-compagnon .as-a-prix{ display: block; animation: asq-etiquette .8s steps(1) infinite; }
html.v5 [data-vinty="prix"] .as-compagnon .as-m-bras-d{ animation: none; transform: translateY(-9px); }
html.v5 [data-vinty="prix"] .as-compagnon .as-m-yeux{ animation: none; transform: translate(3px, 0); }
@keyframes asq-etiquette{ 0%{ transform: translateY(-9px); } 50%{ transform: translateY(-12px); } }

/* les états déjà là, remis sur le corps (pour que l'ombre reste au sol) */
html.v5 [data-vinty="erreur"] .as-compagnon .as-m-corps{ animation: asq-tangue .3s steps(1) infinite; }
html.v5 [data-vinty="travaille"] .as-compagnon .as-m-corps, html.v5 [data-vinty="fiche"] .as-compagnon .as-m-corps, html.v5 [data-vinty="note"] .as-compagnon .as-m-corps, html.v5 [data-vinty="pense"] .as-compagnon .as-m-corps, html.v5 [data-vinty="ecoute"] .as-compagnon .as-m-corps, html.v5 [data-vinty="livre"] .as-compagnon .as-m-corps, html.v5 [data-vinty="cafe"] .as-compagnon .as-m-corps{ animation: none; }
@media (prefers-reduced-motion: reduce){ html.v5 #view-assistant#view-assistant .as-compagnon .as-m-corps, html.v5 #view-assistant#view-assistant .as-compagnon .as-m-ombre{ animation: none; } }

/* ---- Vinty en dessin animé (js/v5/pages/vinty-sprite.js) : un calque posé exactement sur le compagnon, mêmes blocs de
   6 points ; pendant une séquence image par image, il prend sa place */
html.v5 .as-sprite{ position: absolute; right: 18px; top: -90px; width: 126px; height: 90px; pointer-events: none; image-rendering: pixelated; }
html.v5 .as-sprite[hidden]{ display: none; }
html.v5 #view-assistant.as-en-sprite .as-saisie > .as-compagnon{ display: none; }   /* « display » et non « visibility » : ses accessoires animés se rendaient visibles tout seuls par-dessus le calque */

/* ---- l'attente : repères fixes à côté du texte et des étapes en cours */
html.v5 .as-attente{ gap: 9px; }
html.v5 .as-points{ flex: none; display: grid; grid-template-columns: 5px 5px; grid-template-rows: 5px 5px; gap: 2px; }
html.v5 .as-points i{ display: block; border-radius: 1px; background: var(--v5-rempli-1); }
html.v5 .as-susp{ margin-left: -7px; color: var(--v5-texte-3); }
html.v5 .as-susp i{ font-style: normal; visibility: visible; }

/* ---- le micro et son chevron (choix du périphérique d'entrée) : deux boutons accolés */
html.v5 .as-micro-groupe{ display: inline-flex; align-items: center; flex: none; }
html.v5 .as-micro-groupe[hidden]{ display: none; }
html.v5 .as-micro-groupe .as-micro{ border-radius: var(--v5-r-bouton) 0 0 var(--v5-r-bouton); }
html.v5 .as-micro-choix{ display: grid; place-items: center; flex: none; width: 16px; height: 30px; padding: 0; border: 0; border-radius: 0 var(--v5-r-bouton) var(--v5-r-bouton) 0; background: none; color: var(--v5-texte-3); cursor: default; }
html.v5 .as-micro-choix:hover, html.v5 .as-micro-choix[aria-expanded="true"]{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-micro-choix svg{ width: 11px; height: 11px; }
html.v5 .as-micro-choix:focus-visible{ outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: -1px; }
/* menus : le point d'état d'une ligne (comptes Vinted) est centré dans la case de l'icône, comme un pictogramme */
html.v5 .v5-menu-ic{ align-items: center; justify-content: center; }
html.v5 .v5-menu-ic > .v5-point{ margin: 0; }

/* ---- dictée par BDRD : pendant la transcription, le micro bat doucement */
html.v5 .as-micro.as-transcrit{ color: var(--v5-violet-texte); animation: as-bat 1.2s ease-in-out infinite; }
/* ---- le bouton Arrêter : même violet que l'envoi, un carré blanc bien lisible, et un anneau qui bat pour dire « ça travaille » */
html.v5 .as-occupe .as-envoyer{ background: var(--v5-violet); color: var(--v5-sur-violet); animation: none; }
html.v5 .as-occupe .as-envoyer:hover{ background: var(--v5-violet-survol); }
html.v5 .as-ic-stop svg{ width: 22px; height: 22px; }

/* ---- lignes d'action (11/10) : signe dans une petite pastille teintée, texte sur une ligne, lignes voisines resserrées ;
   « Arrêté. » est un choix de l'utilisateur, pas une erreur : gris, jamais rouge */
html.v5 .as-outil{ max-width: 100%; gap: 8px; line-height: 18px; color: var(--v5-texte-2); }
html.v5 .as-outil[data-etat="cours"]{ color: var(--v5-texte-3); }
html.v5 .as-outil + .as-outil{ margin-top: 2px; }
html.v5 .as-etape-ic{ width: 18px; height: 18px; border-radius: 50%; }
html.v5 .as-etape-ic svg{ width: 10px; height: 10px; stroke-width: 2.6; }
html.v5 .as-outil[data-etat="fait"] .as-etape-ic{ background: color-mix(in srgb, var(--v5-vert) 16%, transparent); }
html.v5 .as-outil[data-etat="rate"] .as-etape-ic{ background: color-mix(in srgb, var(--v5-rouge) 16%, transparent); }
html.v5 .as-outil[data-etat="arrete"]{ color: var(--v5-texte-3); }
html.v5 .as-outil[data-etat="arrete"] .as-etape-ic{ background: var(--v5-rempli-2); color: var(--v5-texte-3); }
html.v5 .as-outil[data-etat="arrete"] .as-etape-ic svg{ width: 8px; height: 8px; }
html.v5 .as-etape-lib{ min-width: 0; overflow-wrap: anywhere; white-space: normal; }
/* une photo jointe, à la manière de Claude de bureau : vignette bordée aux coins ronds ; au survol, une petite croix ronde
   et sombre se déplie sur le coin haut droit */
html.v5 .as-jointes{ gap: 10px; padding: 6px 6px 6px 0; }
html.v5 .as-jointe{ width: 72px; height: 72px; }
html.v5 .as-jointe img{ border-radius: var(--v5-r-sel); box-shadow: 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); }
html.v5 .as-jointe button{ top: -7px; right: -7px; display: grid; place-items: center; width: 20px; height: 20px; background: var(--v5-fond-groupe); color: var(--v5-texte-2); font-size: var(--v5-t-13); line-height: 1; box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); opacity: 0; transform: scale(.5); transition: opacity .12s ease-out, transform .16s cubic-bezier(.3, 1.4, .5, 1); }
html.v5 .as-jointe:hover button, html.v5 .as-jointe button:focus-visible{ opacity: 1; transform: none; }
html.v5 .as-jointe button:hover{ color: var(--v5-texte); background: var(--v5-rempli-2); }
@media (prefers-reduced-motion: reduce){ html.v5 .as-jointe button{ transition: none; } }

/* ---- copier un message : petit bouton qui apparaît à côté du message survolé (à gauche du tien, à droite d'une réponse) */
html.v5 .as-copier{ position: fixed; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--v5-r-ctrl); background: none; color: var(--v5-texte-3); cursor: default; }
html.v5 .as-copier[hidden]{ display: none; }
html.v5 .as-copier:hover{ background: var(--v5-rempli-3); color: var(--v5-texte); }
html.v5 .as-copier svg{ width: 14px; height: 14px; }

/* ---- discussions gardées, dans la barre latérale (partie « Discussion ») : une ligne par discussion, la croix au survol */
.as-discussions{ display: flex; flex-direction: column; }
.as-disc{ position: relative; display: flex; }
.as-disc .as-disc-nom{ flex: 1; min-width: 0; padding-right: 26px; font-weight: var(--v5-g-normal); color: var(--v5-texte-2); }
.as-disc.actif .as-disc-nom{ background: var(--v5-rempli-2); color: var(--v5-texte); }
.as-disc-suppr{ position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 20px; height: 20px; margin-top: -10px; padding: 0; border: 0; border-radius: var(--v5-r-ctrl); background: none; color: var(--v5-texte-3); cursor: default; opacity: 0; }
.as-disc:hover .as-disc-suppr, .as-disc-suppr:focus-visible{ opacity: 1; }
.as-disc-suppr:hover{ background: var(--v5-rempli-2); color: var(--v5-texte); }
.as-disc-suppr svg{ width: 12px; height: 12px; }
.v5-app[data-lateral="reduite"] .as-discussions .as-disc, .v5-app[data-lateral="reduite"] .as-discussions .v5-nav-titre{ display: none; }
/* la ligne « Vinty » ferait doublon avec la discussion ouverte : la liste des discussions la remplace */
.v5-lateral .v5-nav-groupe[data-partie="assistant"] > .v5-nav-item[data-cle="assistant"]{ display: none; }

/* ---- netteté des boutons de la barre de saisie (11/10) : à 17 px, le trait de 1,6 des symboles tombait à ~1,1 px et paraissait flou.
   Symboles à 16 px (2/3 de la grille de 24) avec un trait rendu de 1,5 px ; chevrons à 12 px, même gris que les symboles. */
html.v5 .as-saisie :is(.as-joindre, .as-micro, .as-envoyer) svg, html.v5 .as-niveau > svg:first-child{ width: 16px; height: 16px; stroke-width: 2.25; }
html.v5 .as-mode svg, html.v5 .as-niveau svg:last-child, html.v5 .as-micro-choix svg{ width: 12px; height: 12px; stroke-width: 2.5; }
html.v5 .as-mode #as-mode-ic svg{ width: 14px; height: 14px; stroke-width: 2.2; }
html.v5 .as-micro-choix{ color: var(--v5-texte-2); }
html.v5 .as-envoyer:disabled{ color: var(--v5-texte-2); }

/* ---- raccourci Ctrl I (11/10) : une vraie barre flottante en verre, opaque et floue comme un menu (le fond translucide laissait
   lire la page à travers), plus haute, texte en 15, ombre de popover */
html.v5 .as-rapide{ bottom: 32px; gap: 10px; width: min(600px, calc(100vw - 48px)); height: 52px; padding: 0 12px 0 10px; border-radius: var(--v5-r-fenetre); background: var(--v5-surface-elevee); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur), var(--v5-ombre-popover); }
html.v5 .as-rapide:focus-within{ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3), var(--v5-ombre-popover); }
html.v5 .as-rapide input{ font-size: var(--v5-t-15); line-height: 22px; }
html.v5 .as-rapide kbd{ height: 20px; padding: 0 6px; border-radius: var(--v5-r-petit); background: var(--v5-rempli-2); font: var(--v5-g-moyen) var(--v5-t-11)/20px var(--v5-police); color: var(--v5-texte-2); }

/* photo jointe (11/10, 2e passe) : vignette plus grande ; la croix est un vrai symbole, centré dans sa pastille (le caractère « × » était décalé) */
html.v5 .as-jointe{ width: 96px; height: 96px; }
html.v5 .as-jointe button{ top: -8px; right: -8px; width: 22px; height: 22px; padding: 0; font-size: 0; }
html.v5 .as-jointe button svg{ display: block; width: 11px; height: 11px; stroke-width: 2.6; }

/* menu « ⋮ » d'une discussion : les trois points remplacent la croix ; « Archivées (n) » replie les discussions archivées */
.as-disc-suppr svg{ width: 14px; height: 14px; }
.as-disc-suppr[aria-expanded="true"]{ opacity: 1; background: var(--v5-rempli-2); color: var(--v5-texte); }
.as-disc-archives{ margin-top: 6px; color: var(--v5-texte-3); font-weight: var(--v5-g-normal); }
.v5-app[data-lateral="reduite"] .as-disc-archives{ display: none; }
.as-disc-suite{ justify-content: flex-start; height: 26px; margin-top: 2px; padding-left: 34px; color: var(--v5-texte-3); font-size: var(--v5-t-12); }
.as-disc-suite:hover, .as-disc-suite:focus-visible{ color: var(--v5-texte-2); }
.v5-app[data-lateral="reduite"] .as-disc-suite{ display: none; }
/* espacements de la liste (11/10) : chaque titre de section respire comme un groupe de navigation (14 px au-dessus, 4 dessous) */
.as-discussions .v5-nav-titre{ margin: 14px 0 4px; }
.as-discussions .as-disc + .as-disc{ margin-top: 1px; }
.v5-app[data-lateral="reduite"] .as-discussions .v5-nav-titre{ margin: 0; }

/* ---- beaucoup de photos jointes (11/10) : vignettes plus petites, puis une seule ligne qui défile avec le compte en tête */
html.v5 .as-jointes{ flex-direction: column; flex-wrap: nowrap; gap: 6px; padding: 0 0 4px; }
html.v5 .as-jointes-rang{ display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 8px 2px 0; }
html.v5 .as-jointes-tete{ display: flex; align-items: center; gap: 10px; font-size: var(--v5-t-12); color: var(--v5-texte-2); }
html.v5 .as-jointes-tete b{ font-weight: var(--v5-g-moyen); color: var(--v5-texte); }
html.v5 .as-jointes-tete button{ padding: 0; border: 0; background: none; font: inherit; color: var(--v5-texte-2); cursor: default; }
html.v5 .as-jointes-tete button:hover{ color: var(--v5-texte); text-decoration: underline; }
html.v5 .as-jointes[data-taille="moyen"] .as-jointe{ width: 64px; height: 64px; }
html.v5 .as-jointes[data-taille="moyen"] .as-jointes-rang{ gap: 8px; }
html.v5 .as-jointes[data-taille="petit"] .as-jointe{ flex: none; width: 44px; height: 44px; }
html.v5 .as-jointes[data-taille="petit"] .as-jointe img{ border-radius: var(--v5-r-surface); }
html.v5 .as-jointes[data-taille="petit"] .as-jointes-rang{ flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 8px 8px 6px 0; }
html.v5 .as-jointes[data-taille="petit"] .as-jointe button{ top: -6px; right: -6px; width: 16px; height: 16px; }
html.v5 .as-jointes[data-taille="petit"] .as-jointe button svg{ width: 8px; height: 8px; }
html.v5 .as-jointes[data-taille="moyen"] .as-jointe button{ top: -7px; right: -7px; width: 18px; height: 18px; }
html.v5 .as-jointes[data-taille="moyen"] .as-jointe button svg{ width: 9px; height: 9px; }

/* ---- micro en marche (11/10) : le bouton devient une capsule violette avec quatre barres qui dansent (une onde), entourée
   d'un halo qui pulse ; le contour du champ passe au violet et le chevron du choix de micro se retire le temps de l'écoute.
   Pendant la transcription : même capsule, en gris violet, barres au repos. */
html.v5 .as-micro[aria-pressed="true"], html.v5 .as-micro.as-transcrit{ display: inline-flex; align-items: center; gap: 7px; width: auto; padding: 0 11px 0 8px; border-radius: var(--v5-r-capsule); transform: none; }
html.v5 .as-micro[aria-pressed="true"]{ background: var(--v5-violet); color: var(--v5-sur-violet); animation: as-anneau 1.4s ease-out infinite; }
html.v5 .as-micro.as-transcrit{ background: var(--v5-violet-doux); color: var(--v5-violet-texte); animation: none; }
html.v5 .as-micro[aria-pressed="true"]::after, html.v5 .as-micro.as-transcrit::after{
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor 0 0) 0 50% / 2px 35% no-repeat, linear-gradient(currentColor 0 0) 4px 50% / 2px 80% no-repeat,
    linear-gradient(currentColor 0 0) 8px 50% / 2px 55% no-repeat, linear-gradient(currentColor 0 0) 12px 50% / 2px 100% no-repeat;
}
html.v5 .as-micro[aria-pressed="true"]::after{ animation: as-ondes .9s ease-in-out infinite; }
@keyframes as-ondes{
  0%, 100%{ background-size: 2px 35%, 2px 80%, 2px 55%, 2px 100%; }
  33%{ background-size: 2px 90%, 2px 40%, 2px 100%, 2px 45%; }
  66%{ background-size: 2px 50%, 2px 100%, 2px 30%, 2px 75%; }
}
html.v5 .as-micro-groupe:has(.as-micro[aria-pressed="true"], .as-micro.as-transcrit) .as-micro-choix{ display: none; }
html.v5 .as-saisie:has(.as-micro[aria-pressed="true"]){ box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-violet), 0 0 0 3px var(--v5-violet-doux), var(--v5-ombre-capsule); }
@media (prefers-reduced-motion: reduce){ html.v5 .as-micro[aria-pressed="true"], html.v5 .as-micro[aria-pressed="true"]::after{ animation: none; } }

/* 17/10 : la fin du fil ne passe plus sous Pixy (posé au-dessus du champ, ~64 px) : marge du bas à sa hauteur */
html.v5 #view-assistant:not(:has(.as-accueil)) .as-fil{ padding-bottom: 84px; scroll-padding-bottom: 84px; }
/* 17/10 (Lucas : « réduis un tout petit peu la taille de Pixy ») : compagnon et animation à 7/8 de leur taille, même ligne de sol */
html.v5 .as-compagnon{ top: -52px; width: 56px; height: 56px; }
html.v5 .as-sprite{ top: -79px; width: 110px; height: 79px; }
/* 18/10 (Lucas : « laisse qu'un des deux pour parler ») : seule la dictée (micro) reste dans le champ ; le mode vocal n'est plus proposé */
html.v5 #view-assistant #as-vocal:not(#_){ display: none; }
/* 18/10 (Lucas : « le carré dedans doit être plus grand ») : carré d'arrêt d'environ 13 px dans le bouton rond de 34 px */
html.v5 .as-occupe .as-ic-stop svg:not(#_){ width: 28px; height: 28px; }

/* 19/10 (Lucas : « améliore la page de Pixy dans le style qu'on a défini ») : le même mouvement discret que la page d'accueil du site.
   À l'ouverture, la salutation, la phrase et les suggestions arrivent l'une après l'autre (montée de 8 px, fondu) ; chaque nouveau
   message monte doucement en place. Ni couleur ni effet en plus ; rien si le système demande de réduire les animations. */
html.v5 #view-assistant .as-accueil > :is(h2, .as-sous){ animation: as-apparait 460ms var(--v5-courbe) both; }
html.v5 #view-assistant .as-accueil > h2{ animation-delay: 140ms; }
html.v5 #view-assistant .as-accueil > .as-sous{ animation-delay: 220ms; }
html.v5 #view-assistant .as-exemples > .as-exemple{ animation: as-apparait 420ms var(--v5-courbe) both; animation-delay: 300ms; }
html.v5 #view-assistant .as-exemples > .as-exemple:nth-child(2){ animation-delay: 350ms; }
html.v5 #view-assistant .as-exemples > .as-exemple:nth-child(3){ animation-delay: 400ms; }
html.v5 #view-assistant .as-exemples > .as-exemple:nth-child(4){ animation-delay: 450ms; }
html.v5 #view-assistant .as-exemples > .as-exemple:nth-child(n+5){ animation-delay: 500ms; }
html.v5 #view-assistant .as-fil > .as-msg{ animation: as-bulle 280ms var(--v5-courbe) both; }
@keyframes as-apparait{ from{ opacity: 0; transform: translateY(8px); } }
@keyframes as-bulle{ from{ opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce){
  html.v5 #view-assistant .as-accueil > :is(h2, .as-sous), html.v5 #view-assistant .as-exemples > .as-exemple, html.v5 #view-assistant .as-fil > .as-msg{ animation: none; }
}

/* 19/10 : réponses de Pixy mises en forme (gras, listes, paragraphes ; js/v5/pages/assistant.js, formater) */
html.v5 .as-msg.as-formate{ white-space: normal; }
html.v5 .as-formate > :is(p, ul, ol){ margin: 0; }
html.v5 .as-formate > * + *{ margin-top: 8px; }
html.v5 .as-formate :is(ul, ol){ padding-left: 20px; }
html.v5 .as-formate li + li{ margin-top: 3px; }
html.v5 .as-formate li::marker{ color: var(--v5-texte-3); }
html.v5 .as-formate b{ font-weight: var(--v5-g-fort); color: var(--v5-texte); }
/* 19/10 : flèche ronde « revenir en bas », juste au-dessus de la barre de saisie, quand on a remonté dans la discussion */
html.v5 .as-vers-bas{ position: absolute; left: 50%; top: -46px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 0 0 -16px; padding: 0; border: 0; border-radius: 50%; background: var(--v5-surface-elevee); color: var(--v5-texte-2); box-shadow: var(--v5-ombre-capsule); cursor: pointer; animation: as-bulle 200ms var(--v5-courbe) both; }
html.v5 .as-vers-bas[hidden]{ display: none; }
html.v5 .as-vers-bas:hover{ color: var(--v5-texte); }
html.v5 .as-vers-bas svg{ width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce){ html.v5 .as-vers-bas{ animation: none; } }
