/* QG+ · Récap global : une tuile à part — 26/10/2026 (le Général : « la tuile récap global doit être différente : on doit
   comprendre que c'est une tuile spéciale ») ; 27/10/2026 (« une animation qui tourne autour, très fine, et surtout moins fort
   le halo lumineux : il s'étale trop et risque de saccader le GPU »).
   Liseré fixe et halos SVG adaptatifs : lumière superposée sans filtre, vitesse constante,
   animation suspendue hors écran. Ruban « Récap global » au-dessus.
   Mouvement réduit : rien ne bouge. Retour arrière : retirer qg-recap-special.css/.js d'index.html. */
@property --qrs-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

#hermes-signature {
  --qrs-c1: #4dffd8; --qrs-c2: #ffd166; --qrs-c3: #c79bff; --qrs-c4: #5ec8ff;
  --qrs-fond: rgba(5, 21, 18, .95); --qrs-texte: #e9fff8; --qrs-doux: rgba(214, 255, 241, .66);
}
#hermes-signature[data-theme="light"] {
  --qrs-c1: #00b894; --qrs-c2: #f2a516; --qrs-c3: #8e6cf0; --qrs-c4: #2f9bff;
  --qrs-fond: rgba(255, 255, 255, .985); --qrs-texte: #1d2b27; --qrs-doux: rgba(60, 60, 67, .64);
}

/* la tuile : liseré d'aurore fixe (1 px) et halo discret, collé à la tuile */
#hermes-signature#hermes-signature#hermes-signature#hermes-signature#hermes-signature article.hs-message.qr-tuile > .hs-bubble {
  position: relative; isolation: isolate; overflow: visible !important;
  border: 1px solid transparent !important;
  background:
    linear-gradient(var(--qrs-fond), var(--qrs-fond)) padding-box,
    linear-gradient(125deg, color-mix(in srgb, var(--qrs-c1) 70%, transparent), color-mix(in srgb, var(--qrs-c3) 55%, transparent) 45%,
                    color-mix(in srgb, var(--qrs-c4) 55%, transparent) 72%, color-mix(in srgb, var(--qrs-c2) 60%, transparent)) border-box !important;
  box-shadow: 0 10px 24px -20px color-mix(in srgb, var(--qrs-c1) 55%, transparent) !important;
}
#hermes-signature#hermes-signature#hermes-signature#hermes-signature#hermes-signature[data-theme="light"] article.hs-message.qr-tuile > .hs-bubble {
  box-shadow: 0 8px 20px -18px color-mix(in srgb, var(--qrs-c4) 45%, transparent) !important;
}

/* à l'arrivée : la tuile s'éclaire à peine, une fois */
#hermes-signature article.hs-message.qr-tuile.qrs-neuf > .hs-bubble::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: -1;
  animation: qrs-allume 1.4s ease-out 1 both;
}

/* le ruban, au-dessus de la tuile */
#hermes-signature .qrs-ruban {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; margin: 3px 0 8px; min-height: 24px;
  color: var(--qrs-texte); font: 600 10.5px/1.1 var(--hs-mono, ui-monospace, 'SF Mono', Menlo, monospace); letter-spacing: .2em; text-transform: uppercase;
}
#hermes-signature article.hs-message.qr-tuile.qrs-neuf .qrs-ruban { animation: qrs-ruban .6s cubic-bezier(.2, .8, .2, 1) both; }
#hermes-signature .qrs-ico {
  position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; flex: none; color: #06231d;
  background: conic-gradient(from var(--qrs-a), var(--qrs-c1), var(--qrs-c2) 25%, var(--qrs-c3) 50%, var(--qrs-c4) 75%, var(--qrs-c1));
  box-shadow: 0 0 10px -5px color-mix(in srgb, var(--qrs-c1) 70%, transparent); animation: qrs-tour 24s linear infinite;
}
#hermes-signature .qrs-ico svg { width: 14px; height: 14px; }
#hermes-signature .qrs-t {
  background: linear-gradient(90deg, var(--qrs-c1), var(--qrs-c2), var(--qrs-c3), var(--qrs-c4), var(--qrs-c1)) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: qrs-texte 18s linear infinite;
}
#hermes-signature .qrs-portee { color: var(--qrs-doux); letter-spacing: .08em; text-transform: none; font-weight: 500; font-size: 11px; }
#hermes-signature .qrs-av { display: inline-flex; align-items: center; padding-left: 4px; }
#hermes-signature .qrs-av img {
  width: 19px; height: 19px; border-radius: 50%; object-fit: cover; margin-left: -6px; flex: none;
  box-shadow: 0 0 0 1.5px var(--qrs-fond), 0 0 0 2.5px color-mix(in srgb, var(--qrs-c1) 45%, transparent);
}
#hermes-signature .qrs-n {
  padding: 4px 8px; border-radius: 10px; letter-spacing: .08em; text-transform: none; font-weight: 600; font-size: 10.5px; color: var(--qrs-texte);
  background: color-mix(in srgb, var(--qrs-c1) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--qrs-c1) 30%, transparent);
}

@keyframes qrs-tour { to { --qrs-a: 360deg; } }
@keyframes qrs-comete { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes qrs-allume {
  0% { box-shadow: 0 0 0 0 transparent; }
  35% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--qrs-c1) 20%, transparent), 0 0 16px -6px color-mix(in srgb, var(--qrs-c1) 40%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes qrs-ruban { from { opacity: 0; transform: translateY(5px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qrs-texte { to { background-position: 220% 0; } }

@media (prefers-reduced-motion: reduce) {
  #hermes-signature .qrs-ico, #hermes-signature .qrs-t, #hermes-signature article.hs-message.qr-tuile .qrs-ruban { animation: none !important; }
  #hermes-signature article.hs-message.qr-tuile > .hs-bubble::after, #hermes-signature article.hs-message.qr-tuile > .hs-bubble::before { display: none; }
}
@media (max-width: 520px) {
  #hermes-signature .qrs-ruban { letter-spacing: .16em; gap: 6px 8px; }
  #hermes-signature .qrs-portee { flex-basis: 100%; order: 5; }
}

/* 28/10/2026 : la comète suit l'arrondi (SVG posé par qg-recap-special.js) — l'ancien trait droit est retiré */
#hermes-signature article.hs-message.qr-tuile > .hs-bubble::after { content: none !important; animation: none !important; }
#hermes-signature article.hs-message.qr-tuile > .hs-bubble > svg.qrs-comete {
  position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 1;
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important;   /* les icônes des bulles sont réduites à 18 px ailleurs */
}
/* Plusieurs halos avec une traîne douce, toujours tangente au contour arrondi. */
#hermes-signature svg.qrs-comete { --qrs-lumiere: var(--qrs-c1); }
#hermes-signature svg.qrs-comete path {
  fill: none; stroke: var(--qrs-lumiere); stroke-linecap: round;
  animation: qrs-comete-svg var(--qrs-duree, 24s) linear infinite;
  animation-play-state: var(--qrs-lecture, paused);
}
#hermes-signature svg.qrs-comete .qrs-c-brume { stroke-width: 9px; stroke-opacity: .045; }
#hermes-signature svg.qrs-comete .qrs-c-aura { stroke-width: 5px; stroke-opacity: .11; }
#hermes-signature svg.qrs-comete .qrs-c-t { stroke-width: 1.2px; stroke-opacity: .12; }
#hermes-signature svg.qrs-comete .qrs-c-t2 { stroke-width: 1.35px; stroke-opacity: .18; }
#hermes-signature svg.qrs-comete .qrs-c-m { stroke-width: 1.5px; stroke-opacity: .3; }
#hermes-signature svg.qrs-comete .qrs-c-m2 { stroke-width: 1.65px; stroke-opacity: .5; }
#hermes-signature svg.qrs-comete .qrs-c-h { stroke: color-mix(in srgb, var(--qrs-lumiere) 35%, white); stroke-width: 1.8px; stroke-opacity: .95; }
#hermes-signature[data-theme="light"] svg.qrs-comete { --qrs-lumiere: var(--qrs-c4); }
#hermes-signature[data-theme="light"] svg.qrs-comete .qrs-c-h { stroke: color-mix(in srgb, var(--qrs-c1) 65%, var(--qrs-c4)); }
@keyframes qrs-comete-svg {
  from { stroke-dashoffset: var(--qrs-depart, 0px); }
  to { stroke-dashoffset: var(--qrs-arrivee, -1000px); }
}
@media (prefers-reduced-motion: reduce) {
  #hermes-signature svg.qrs-comete { display: none; }
  #hermes-signature svg.qrs-comete path { animation: none; }
}

/* 03/11/2026 (le Général : « le halo lumineux qui est censé être magnifique et tourner autour de la tuile est complètement
   raté, fais ce que fait l'application Glass CRM ») : un anneau de lumière tourne autour de la tuile, comme le halo de Glass CRM
   (Alligator CRM : conic-gradient sur un angle animé, anneau découpé par un masque, lueur serrée). Il remplace la comète SVG.
   Un seul élément peint, rien d'autre ne bouge ; mouvement réduit : l'anneau reste immobile.
   Retour arrière : retirer ce bloc (la comète SVG revient). */
@property --qrs-halo { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#hermes-signature article.hs-message.qr-tuile > .hs-bubble > svg.qrs-comete { display: none !important; }
#hermes-signature#hermes-signature article.hs-message.qr-tuile > .hs-bubble::after {
  content: '' !important; position: absolute; inset: -2px; padding: 2px; border-radius: inherit; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--qrs-halo),
    transparent 0deg,
    color-mix(in srgb, var(--qrs-c1) 15%, transparent) 30deg,
    color-mix(in srgb, var(--qrs-c1) 40%, transparent) 60deg,
    color-mix(in srgb, var(--qrs-c1) 70%, transparent) 90deg,
    color-mix(in srgb, var(--qrs-c1) 92%, white) 120deg,
    color-mix(in srgb, var(--qrs-c1) 80%, white) 150deg,
    color-mix(in srgb, var(--qrs-c1) 90%, transparent) 180deg,
    color-mix(in srgb, var(--qrs-c1) 70%, transparent) 210deg,
    color-mix(in srgb, var(--qrs-c1) 40%, transparent) 240deg,
    color-mix(in srgb, var(--qrs-c1) 15%, transparent) 280deg,
    transparent 320deg, transparent 360deg);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--qrs-c1) 55%, transparent));
  animation: qrs-halo 3s linear infinite !important;
}
#hermes-signature#hermes-signature[data-theme="light"] article.hs-message.qr-tuile > .hs-bubble::after {
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--qrs-c1) 45%, transparent));
}
@keyframes qrs-halo { to { --qrs-halo: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  #hermes-signature#hermes-signature article.hs-message.qr-tuile > .hs-bubble::after { animation: none !important; --qrs-halo: 140deg; }
}
