/* QG+ — Effet terminal sur les messages (V32, 10/10/2026 ; v2) : voir qg-terminal.js.
   Retour arrière : retirer les lignes qg-terminal de index.html. */

/* Blocs pas encore atteints par l'écriture (la bulle grandit au fil du texte) ; bulle neuve cachée le temps d'une image */
#hermes-signature #hs-feed [data-qgt-att="b"] { display: none !important; }
#hermes-signature #hs-feed [data-qgt-att="i"] { visibility: hidden !important; }
/* Ouverture : invisibles le temps d'une image, puis cascade */
#hermes-signature #hs-feed[data-qgt-prep] > article.hs-message { opacity: 0 !important; }
/* L'ambiance Nexus balayait la bulle d'un coup : la frappe la remplace */
#hermes-signature[data-nexus] .hs-message.nx-arrive > .hs-bubble[data-qgt] { -webkit-mask-image: none !important; mask-image: none !important; animation: none !important; }

/* Le curseur ▋ : un seul, posé au-dessus du fil, juste après la dernière lettre écrite */
#hermes-signature .qgt-cur {
  position: fixed; left: 0; top: 0; z-index: 9000; width: .56em; height: 1.2em; border-radius: 2px; pointer-events: none;
  background: var(--qgt-encre, #1c1c1e); opacity: 0; will-change: transform, opacity; transition: opacity .16s ease;
}
#hermes-signature .qgt-cur.qgt-pose { opacity: .78; }
#hermes-signature .qgt-cur.qgt-dehors { opacity: 0 !important; }
/* La traînée : les dernières lettres écrites brillent un instant */
#hermes-signature .qgt-cur::before {
  content: ""; position: absolute; right: calc(100% + 1px); top: -1px; bottom: -1px; width: 2.8em; border-radius: 4px;
  background: linear-gradient(90deg, rgba(10, 132, 255, 0), rgba(10, 132, 255, .2)); transition: opacity .3s ease;
}
#hermes-signature .qgt-cur.qgt-fini { animation: qgt-clin 1.05s steps(1, end) 2, qgt-part .3s ease 2s forwards; }
#hermes-signature .qgt-cur.qgt-fini::before { opacity: 0; }
@keyframes qgt-clin { 50% { opacity: 0; } }
@keyframes qgt-part { to { opacity: 0; } }
/* Sombre : curseur cyan lumineux, traînée cyan, et la bulle qui s'écrit luit comme un écran à phosphore */
#hermes-signature[data-theme]:not([data-theme="light"]) .qgt-cur {
  background: rgb(var(--nx, 77 255 216)); box-shadow: 0 0 12px rgb(var(--nx, 77 255 216) / .85), 0 0 3px rgb(var(--nx, 77 255 216));
}
#hermes-signature[data-theme]:not([data-theme="light"]) .qgt-cur.qgt-pose { opacity: .92; }
#hermes-signature[data-theme]:not([data-theme="light"]) .qgt-cur::before {
  background: linear-gradient(90deg, rgb(var(--nx, 77 255 216) / 0), rgb(var(--nx, 77 255 216) / .26));
  box-shadow: 8px 0 16px -6px rgb(var(--nx, 77 255 216) / .55);
}
#hermes-signature[data-theme]:not([data-theme="light"]) #hs-feed .hs-bubble[data-qgt] { transition: text-shadow .9s ease; }
#hermes-signature[data-theme]:not([data-theme="light"]) #hs-feed .hs-bubble[data-qgt="on"] { text-shadow: 0 0 10px rgb(var(--nx, 77 255 216) / .22); }
@media (prefers-reduced-motion: reduce) { #hermes-signature .qgt-cur { display: none; } }

/* v6 (11/10/2026) — mode Apparition : chaque mot neuf passe du transparent au net, sans curseur (comme Claude) */
#hermes-signature .qgt-frais { animation: qgt-fondu .56s cubic-bezier(.2,.7,.2,1) both; }
@keyframes qgt-fondu { from { opacity: 0; } to { opacity: 1; } }
/* Paramètres → Écriture des réponses */
#hermes-signature #qgt-reglage .qgt-vitesses { display: grid; gap: 8px; margin-top: 14px; }
#hermes-signature #qgt-reglage .qgt-vitesses[hidden] { display: none; }
#hermes-signature #qgt-reglage .qgt-sous { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
#hermes-signature #qgt-reglage .qgt-apercu {
  margin: 14px 0 0; padding: 12px 14px; min-height: calc(1.45em * 3 + 24px); border-radius: 12px; border: 1px solid var(--hs-line);
  font: 600 15px/1.45 "Hellix", -apple-system, BlinkMacSystemFont, sans-serif; color: var(--hs-ink);
}
#hermes-signature #qgt-reglage .qgt-apercu-cur {
  display: inline-block; width: .5em; height: 1.05em; margin-left: 1px; vertical-align: -.15em; border-radius: 2px; background: currentColor; opacity: .75;
}
#hermes-signature #qgt-reglage .qgt-apercu-cur.qgt-apercu-fini { animation: qgt-clin 1.05s steps(1, end) 2, qgt-part .3s ease 2s forwards; }
#hermes-signature[data-theme]:not([data-theme="light"]) #qgt-reglage .qgt-apercu-cur { background: rgb(var(--nx, 77 255 216)); box-shadow: 0 0 10px rgb(var(--nx, 77 255 216) / .8); }
@media (prefers-reduced-motion: reduce) { #hermes-signature .qgt-frais { animation: none; } }

/* 13/10 (Dali) : 1er appui sur une bulle qui s'écrit → le curseur accélère (traînée plus longue) ; 2e appui → tout s'affiche. */
#hermes-signature .qgt-cur::before { transition: opacity .3s ease, width .35s cubic-bezier(.2,.8,.2,1); }
#hermes-signature .qgt-cur.qgt-turbo::before { width: 6.5em; background: linear-gradient(90deg, rgba(10, 132, 255, 0), rgba(10, 132, 255, .34)); }
#hermes-signature[data-theme]:not([data-theme="light"]) .qgt-cur.qgt-turbo::before { background: linear-gradient(90deg, rgb(var(--nx, 77 255 216) / 0), rgb(var(--nx, 77 255 216) / .44)); }
