/* QG+ · Récapitulatif global interactif — 26/10/2026 (le Général : « en dessous de chaque point, "cocher terminé" ou
   "répondre", et le gabarit s'ouvre et j'écris sur le global » ; bouton « récapitulatif global » dans chaque
   conversation). Voir qg-recap-global.js. Les libellés des petits boutons sont posés en CSS (data-l) : le texte du
   message reste celui de l'agent (copie, recherche, citations). Retour arrière : retirer ce fichier d'index.html. */
#hermes-signature#hermes-signature {
  --qr-a: 0 140 118; --qr-doux: rgba(60, 60, 67, .62); --qr-champ: rgba(255, 255, 255, .95); --qr-sur-a: #fff; --qr-ligne: rgba(0, 0, 0, .08);
}
#hermes-signature#hermes-signature:not([data-theme="light"]) {
  --qr-a: 77 255 216; --qr-doux: rgba(214, 255, 244, .58); --qr-champ: rgba(0, 0, 0, .32); --qr-sur-a: #00140f; --qr-ligne: rgba(77, 255, 216, .14);
}

/* ── Points ── */
#hermes-signature .qr-tuile .hs-bubble p.qr-titre { margin-bottom: 2px !important; }
#hermes-signature .qr-tuile .qr-pts { margin: 0 0 14px; }
#hermes-signature .qr-tuile .qr-pts:last-child { margin-bottom: 0; }
#hermes-signature .qr-pt { position: relative; padding: 3px 0 0; }
#hermes-signature .qr-pt + .qr-pt { margin-top: 2px; }
#hermes-signature .qr-l { transition: opacity .25s ease, color .25s ease; }
#hermes-signature .qr-pt.qr-fait > .qr-l { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: rgb(var(--qr-a) / .75); }
#hermes-signature .qr-pt.qr-fait > .qr-l::before {
  content: "✓"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 6px; border-radius: 50%;
  background: rgb(var(--qr-a)); color: var(--qr-sur-a); font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 1px; text-decoration: none;
}
#hermes-signature li.qr-pt > .qr-l { display: inline; }

/* ── Petites actions sous chaque point ── */
#hermes-signature .qr-act { display: flex; align-items: center; gap: 2px; height: 26px; margin: 0 0 1px -7px; transition: opacity .18s ease; }
#hermes-signature#hermes-signature .qr-b {
  display: inline-flex; align-items: center; gap: 4px; min-height: 0; height: 24px; padding: 0 8px; border: 0; border-radius: 12px; background: none;
  color: var(--qr-doux); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; box-shadow: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#hermes-signature .qr-b svg { width: 13px; height: 13px; stroke-width: 2.4; }
#hermes-signature .qr-b::after { content: attr(data-l); }
#hermes-signature#hermes-signature .qr-b:hover { color: rgb(var(--qr-a)); background: rgb(var(--qr-a) / .1); }
#hermes-signature .qr-b:focus-visible { outline: 2px solid rgb(var(--qr-a) / .7); outline-offset: 1px; }
#hermes-signature#hermes-signature .qr-b-fait[aria-pressed="true"] { color: rgb(var(--qr-a)); background: rgb(var(--qr-a) / .13); }
#hermes-signature#hermes-signature .qr-b-rep[aria-expanded="true"] { color: rgb(var(--qr-a)); }
#hermes-signature:not([data-theme="light"]) .qr-b { font-family: var(--nx-mono, ui-monospace, monospace); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; }
/* Ordinateur : visibles au survol (la place reste réservée : rien ne saute) ; iPhone : toujours là, petites. */
@media (hover: hover) and (pointer: fine) {
  #hermes-signature .qr-act { opacity: 0; height: 21px; margin-top: -1px; }
  #hermes-signature#hermes-signature .qr-b { height: 21px; }
  #hermes-signature .qr-pt:hover > .qr-act, #hermes-signature .qr-pt:focus-within > .qr-act, #hermes-signature .qr-pt.qr-fait > .qr-act,
  #hermes-signature .qr-pt:has(> .qr-champ) > .qr-act { opacity: 1; }
  #hermes-signature .qr-pt.qr-fait:not(:hover) > .qr-act .qr-b-rep { opacity: 0; }
}
@media (hover: none), (pointer: coarse) {
  #hermes-signature .qr-pt + .qr-pt { border-top: 1px solid var(--qr-ligne); padding-top: 5px; }
  #hermes-signature .qr-act { opacity: .82; height: 30px; }
  #hermes-signature#hermes-signature .qr-b { height: 28px; padding: 0 9px; }
}

/* ── Réponse gardée / envoyée, rappelée sous le point ── */
#hermes-signature#hermes-signature .qr-vue {
  display: flex; align-items: baseline; gap: 7px; width: 100%; margin: 4px 0 0; padding: 6px 10px; border: 0; border-left: 2px solid rgb(var(--qr-a));
  border-radius: 0 10px 10px 0; background: rgb(var(--qr-a) / .08); color: inherit; font: inherit; font-size: 13.5px; line-height: 1.4; text-align: left;
  text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
}
#hermes-signature#hermes-signature .qr-vue:hover { background: rgb(var(--qr-a) / .14); }
#hermes-signature .qr-vue-tag::after {
  content: attr(data-l); white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--qr-a));
}
#hermes-signature:not([data-theme="light"]) .qr-vue-tag::after { font-family: var(--nx-mono, ui-monospace, monospace); letter-spacing: .08em; }
#hermes-signature .qr-vue-t { font-weight: 500; }
#hermes-signature .qr-vue.qr-vue-envoye { border-left-style: dashed; background: transparent; opacity: .72; }
#hermes-signature .qr-vue.qr-vue-envoye .qr-vue-tag::after { color: var(--qr-doux); }

/* ── Gabarit d'écriture ── */
#hermes-signature .qr-champ { margin: 4px 0 8px; }
#hermes-signature#hermes-signature .qr-saisie {
  display: block; width: 100%; box-sizing: border-box; min-height: 64px; max-height: 200px; margin: 0; resize: none; overflow-y: auto;
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(var(--qr-a) / .45); background: var(--qr-champ); color: inherit;
  font: inherit; font-size: 15px; font-weight: 400; line-height: 1.45; 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 .qr-saisie::placeholder { color: var(--qr-doux); opacity: 1; }
#hermes-signature .qr-saisie:focus { border-color: rgb(var(--qr-a) / .85); box-shadow: 0 0 0 3px rgb(var(--qr-a) / .16); }
#hermes-signature .qr-champ-bas { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
#hermes-signature .qr-esp { flex: 1; }
#hermes-signature#hermes-signature :is(.qr-seul, .qr-annuler, .qr-ok) {
  min-height: 0; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid transparent; background: none; color: var(--qr-doux);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#hermes-signature :is(.qr-seul, .qr-annuler, .qr-ok)::after { content: attr(data-l); }
#hermes-signature .qr-seul { padding-left: 4px !important; text-decoration: underline; text-underline-offset: 3px; }
#hermes-signature#hermes-signature .qr-annuler:hover, #hermes-signature#hermes-signature .qr-seul:hover { color: rgb(var(--qr-a)); }
#hermes-signature#hermes-signature .qr-ok { background: rgb(var(--qr-a)); color: var(--qr-sur-a); border-color: rgb(var(--qr-a)); }
#hermes-signature .qr-ok:hover { filter: brightness(1.08); }
#hermes-signature:not([data-theme="light"]) :is(.qr-seul, .qr-annuler, .qr-ok) { font-family: var(--nx-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) {
  #hermes-signature .qr-seul::before { content: "⌘/Ctrl ↵ · "; opacity: .7; text-decoration: none; display: inline-block; margin-right: 3px; }
}

/* ── Pied de tuile : avancement + envoi groupé ── */
#hermes-signature .qr-pied {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgb(var(--qr-a) / .32);
  color: var(--qr-doux); font-size: 12.5px; line-height: 1.3;
}
#hermes-signature .qr-prog::after { content: attr(data-l); }
#hermes-signature:not([data-theme="light"]) .qr-prog { font-family: var(--nx-mono, ui-monospace, monospace); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
#hermes-signature#hermes-signature .qr-envoi {
  display: none; align-items: center; gap: 6px; margin-left: auto; min-height: 36px; padding: 0 16px 0 12px; border-radius: 18px;
  border: 1px solid rgb(var(--qr-a)); background: rgb(var(--qr-a)); color: var(--qr-sur-a); font: inherit; font-size: 13.5px; font-weight: 700;
  letter-spacing: 0; text-transform: none; line-height: 1; box-shadow: 0 4px 14px rgb(var(--qr-a) / .25); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#hermes-signature#hermes-signature .qr-pied.qr-pied-plein .qr-envoi { display: inline-flex; animation: qr-pose .3s cubic-bezier(.2, .8, .2, 1); }
#hermes-signature .qr-envoi::after { content: attr(data-l); }
#hermes-signature .qr-envoi svg { width: 15px; height: 15px; stroke-width: 2.5; }
#hermes-signature .qr-envoi:hover { filter: brightness(1.07); }
#hermes-signature .qr-envoi.qr-en-cours { opacity: .6; pointer-events: none; }
#hermes-signature:not([data-theme="light"]) .qr-envoi { font-family: var(--nx-mono, ui-monospace, monospace); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; }
@keyframes qr-pose { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  #hermes-signature#hermes-signature .qr-pied.qr-pied-plein .qr-envoi { margin-left: 0; width: 100%; justify-content: center; min-height: 42px; }
}

/* ── Votre demande : la consigne de forme (pour l'agent) ne s'affiche pas ── */
#hermes-signature .qr-consigne[hidden] { display: none !important; }

/* ── Bouton « Récap global » (en-tête, barre iPhone, feuille Option) ── */
#hermes-signature .qr-tete svg { width: 17px; height: 17px; }
#hermes-signature .qr-tete.qr-parti { color: rgb(var(--qr-a)); border-color: rgb(var(--qr-a) / .7); }
/* iPhone : groupé à droite avec le bouton mail (Secrétaire) et « Nouveau sujet » */
#hermes-signature#hermes-signature#hermes-signature .hs-mobile-chatnav > .qr-tete { margin-left: auto; }
#hermes-signature#hermes-signature#hermes-signature .hs-mobile-chatnav > .qr-tete + .qg-crr-env { margin-left: 4px; }
#hermes-signature .hs-mobile-chatnav .qr-tete svg { width: 22px; height: 22px; }
#hermes-signature .qr-option strong svg { width: 16px; height: 16px; vertical-align: -3px; }
#hermes-signature .qr-toast { z-index: 60; }
@media (prefers-reduced-motion: reduce) {
  #hermes-signature#hermes-signature .qr-pied.qr-pied-plein .qr-envoi { animation: none; }
  #hermes-signature .qr-l, #hermes-signature .qr-act { transition: none; }
}

/* 26/10/2026 (le Général : « un mini encadré très fin sur chaque sujet d'une même tuile ») */
#hermes-signature#hermes-signature .qr-tuile .qr-pt {
  border: 1px solid rgba(127, 127, 127, .22); border-radius: 10px; padding: 7px 10px 6px !important; margin: 0 0 6px !important;
}
#hermes-signature#hermes-signature[data-theme="light"] .qr-tuile .qr-pt { border-color: rgba(60, 60, 67, .14); }
#hermes-signature#hermes-signature:not([data-theme="light"]) .qr-tuile .qr-pt { border-color: rgb(var(--nx, 77 255 216) / .16); }
#hermes-signature#hermes-signature .qr-tuile .qr-pt + .qr-pt { border-top: 1px solid rgba(127, 127, 127, .22); margin-top: 0 !important; }
#hermes-signature#hermes-signature[data-theme="light"] .qr-tuile .qr-pt + .qr-pt { border-top-color: rgba(60, 60, 67, .14); }
#hermes-signature#hermes-signature:not([data-theme="light"]) .qr-tuile .qr-pt + .qr-pt { border-top-color: rgb(var(--nx, 77 255 216) / .16); }
#hermes-signature#hermes-signature .qr-tuile li.qr-pt { list-style: none; }
/* ordinateur : les deux actions se posent en bas à droite de l'encadré, au survol, sans réserver de ligne vide */
@media (hover: hover) and (pointer: fine) {
  #hermes-signature#hermes-signature .qr-tuile .qr-pt { padding-bottom: 7px !important; }
  #hermes-signature#hermes-signature .qr-tuile .qr-pt:not(:has(> .qr-champ)) > .qr-act { position: absolute; right: 6px; bottom: 4px; margin: 0; height: 21px; border-radius: 12px; background: var(--hs-paper, rgba(10, 20, 18, .92)); }
  #hermes-signature#hermes-signature:not([data-theme="light"]) .qr-tuile .qr-pt:not(:has(> .qr-champ)) > .qr-act { background: rgba(3, 14, 12, .92); }
  #hermes-signature#hermes-signature .qr-tuile .qr-pt.qr-fait:not(:hover) > .qr-act { opacity: 0; }
}
