/* QG+ — Carte « Question pour vous » + message ciblé depuis Tâches (08/10/2026). Fichier séparé.
   Retour arrière : retirer qg-questions.css et qg-questions.js d'index.html. */
#hermes-signature#hermes-signature {
  --qq-a: 179 92 0; --qq-fond: rgba(255, 159, 10, .08); --qq-bord: rgba(255, 159, 10, .32); --qq-txt: #1c1c1e; --qq-doux: rgba(60, 60, 67, .62);
}
#hermes-signature#hermes-signature:not([data-theme="light"]) {
  --qq-a: 255 201 119; --qq-fond: rgba(255, 201, 119, .06); --qq-bord: rgba(255, 201, 119, .30); --qq-txt: #fff6e6; --qq-doux: #c9b48f;
}
#hermes-signature .qq {
  margin: 10px 0 2px; padding: 12px 12px 12px; border-radius: 14px; border: 1px solid var(--qq-bord); background: var(--qq-fond);
  color: var(--qq-txt); font-family: inherit; white-space: normal;
}
#hermes-signature .qq-tete { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: rgb(var(--qq-a)); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
#hermes-signature:not([data-theme="light"]) .qq-tete { font-family: var(--nx-mono, ui-monospace, monospace); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
#hermes-signature .qq-ico svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#hermes-signature .qq-texte { margin: 0 0 10px; font-size: 15.5px; line-height: 1.4; font-weight: 600; }
#hermes-signature .qq-choix { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
#hermes-signature .qq-b {
  min-height: 36px; padding: 6px 14px; border-radius: 18px; border: 1px solid rgb(var(--qq-a) / .55); background: rgb(var(--qq-a) / .12);
  color: inherit; font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent; transition: background .2s, transform .15s, opacity .2s;
}
#hermes-signature .qq-b:hover:not(:disabled) { background: rgb(var(--qq-a) / .22); }
#hermes-signature .qq-b:active:not(:disabled) { transform: scale(.97); }
#hermes-signature .qq-libre {
  padding: 4px 2px; border: 0; background: none; color: var(--qq-doux); font: inherit; font-size: 13px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
#hermes-signature .qq.qq-repondu { border-style: dashed; opacity: .78; }
#hermes-signature .qq.qq-repondu .qq-tete { color: var(--qq-doux); }
#hermes-signature .qq.qq-repondu .qq-b { cursor: default; opacity: .55; }
#hermes-signature .qq.qq-repondu .qq-b.qq-choisi { opacity: 1; background: rgb(var(--qq-a) / .24); }
#hermes-signature .qq-b.qq-choisi::before { content: "✓ "; }

/* Action programmée : même carte, en plus discret. */
#hermes-signature .qq.qq-prog { --qq-a: 0 168 142; border-style: solid; }
#hermes-signature:not([data-theme="light"]) .qq.qq-prog { --qq-a: 77 255 216; }
#hermes-signature .qq.qq-prog .qq-texte { margin-bottom: 2px; }
#hermes-signature .qq-quoi { margin: 0; font-size: 14px; line-height: 1.35; color: var(--qq-doux); }

/* Message qui a lancé la tâche (clic dans Tâches) : halo lumineux qui clignote 3 fois + étiquette. */
#hermes-signature#hermes-signature { --qq-halo: 0 168 142; }
#hermes-signature#hermes-signature:not([data-theme="light"]) { --qq-halo: 77 255 216; }
#hermes-signature .hs-message.qq-cible { position: relative; }
#hermes-signature .hs-message.qq-cible .hs-bubble {
  outline: 2px solid rgb(var(--qq-halo)) !important; outline-offset: 3px;
  animation: qq-clignote 1s ease-in-out 3 both !important;
}
@keyframes qq-clignote {
  0%, 100% { outline-color: rgb(var(--qq-halo) / .25); box-shadow: 0 0 0 0 rgb(var(--qq-halo) / 0); }
  50% { outline-color: rgb(var(--qq-halo) / 1); box-shadow: 0 0 26px 6px rgb(var(--qq-halo) / .55), inset 0 0 0 999px rgb(var(--qq-halo) / .10); }
}
#hermes-signature .qq-etiquette {
  position: absolute; z-index: 3; top: -12px; right: 6px; padding: 3px 9px; border-radius: 10px; white-space: nowrap; pointer-events: none;
  background: rgb(var(--qq-halo)); color: #ffffff; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 4px 14px rgb(var(--qq-halo) / .45); animation: qq-etiquette 3.6s ease forwards;
}
#hermes-signature:not([data-theme="light"]) .qq-etiquette { color: #001a14; font-family: var(--nx-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
#hermes-signature .hs-message:not(.mine) .qq-etiquette { right: auto; left: 6px; }
@keyframes qq-etiquette { 0% { opacity: 0; transform: translateY(4px); } 8%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
#hermes-signature .qq-toast { z-index: 60; }
@media (prefers-reduced-motion: reduce) {
  #hermes-signature .hs-message.qq-cible .hs-bubble { animation: none !important; outline-color: rgb(var(--qq-halo)); }
  #hermes-signature .qq-etiquette { animation: none; }
}

/* 13/10/2026 : une fois répondu, les autres choix se replient ; il reste la réponse choisie (ou la réponse écrite). */
#hermes-signature .qq.qq-repondu .qq-b:not(.qq-choisi) { display: none; }
#hermes-signature .qq.qq-repondu .qq-b.qq-choisi { animation: qq-pose .35s cubic-bezier(.2,.8,.2,1); }
#hermes-signature .qq-sa-reponse { margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--qq-doux); font-style: italic; animation: qq-pose .35s ease-out; }
@keyframes qq-pose { from { opacity: .4; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #hermes-signature .qq-b.qq-choisi, #hermes-signature .qq-sa-reponse { animation: none; } }

/* 13/10 (Dali) : « Répondre autrement » → champ dans la carte, juste sous la question. */
#hermes-signature#hermes-signature { --qq-champ: rgba(255, 255, 255, .92); --qq-fleche: #fff; }
#hermes-signature#hermes-signature:not([data-theme="light"]) { --qq-champ: rgba(0, 0, 0, .3); --qq-fleche: #1a1206; }
#hermes-signature .qq-libre[aria-expanded="true"] { color: rgb(var(--qq-a)); text-decoration-thickness: 2px; }
#hermes-signature .qq-champ { position: relative; margin-top: 8px; }
#hermes-signature .qq-saisie {
  display: block; width: 100%; box-sizing: border-box; min-height: 46px; max-height: 150px; margin: 0; resize: none; overflow-y: auto;
  padding: 12px 52px 12px 14px; border-radius: 14px; border: 1px solid rgb(var(--qq-a) / .45); background: var(--qq-champ);
  color: var(--qq-txt); font: inherit; font-size: 16px; font-weight: 400; line-height: 1.4; letter-spacing: normal; text-transform: none;
  outline: none; -webkit-appearance: none; appearance: none; box-shadow: none; transition: border-color .2s, box-shadow .2s;
}
#hermes-signature .qq-saisie::placeholder { color: var(--qq-doux); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hermes-signature .qq-saisie:focus, #hermes-signature .qq-saisie:focus-visible { outline: none; border-color: rgb(var(--qq-a) / .85); box-shadow: 0 0 0 3px rgb(var(--qq-a) / .16); }
#hermes-signature .qq-envoi {
  position: absolute; right: 7px; bottom: 7px; width: 32px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgb(var(--qq-a)); color: var(--qq-fleche); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity .2s, transform .15s, background .2s;
}
#hermes-signature .qq-envoi:disabled { opacity: .3; cursor: default; }
#hermes-signature .qq-envoi:active:not(:disabled) { transform: scale(.9); }
#hermes-signature .qq-envoi svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* 13/10 (Dali) : une fois répondu, plus aucun bouton — même celui choisi (on le croyait encore à presser) ; la réponse est rappelée en texte. */
#hermes-signature .qq.qq-repondu .qq-choix { display: none; }
#hermes-signature .qq.qq-repondu .qq-texte { margin-bottom: 6px; }
#hermes-signature .qq-sa-reponse { display: flex; align-items: baseline; gap: 6px; margin: 0; font-style: normal; font-weight: 600; color: var(--qq-txt); opacity: .82; }
#hermes-signature .qq-sa-reponse::before { content: "✓"; color: rgb(var(--qq-a)); font-weight: 800; }
@media (max-width: 600px) {
  #hermes-signature .qq-saisie { padding-right: 46px; padding-left: 12px; }
  #hermes-signature .qq-saisie::placeholder { font-size: 15px; }
  #hermes-signature .qq-envoi { right: 6px; bottom: 7px; }
}
/* 26/10/2026 : croix « écarter sans répondre » et carte repliée */
#hermes-signature .qq .qq-tete { position: relative; }
#hermes-signature .qq .qq-x { margin-left: auto; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .55; cursor: pointer; }
#hermes-signature .qq .qq-x:hover { opacity: 1; background: rgba(127, 127, 127, .15); }
#hermes-signature .qq .qq-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
#hermes-signature .qq .qq-ecart { display: none; margin: 0; font-size: 13px; opacity: .7; }
#hermes-signature .qq .qq-retablir { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
#hermes-signature .qq.qq-ecartee > :not(.qq-ecart) { display: none !important; }
#hermes-signature .qq.qq-ecartee { padding-top: 10px !important; padding-bottom: 10px !important; }
#hermes-signature .qq.qq-ecartee .qq-ecart { display: block; }
