/* QG+ — zone de saisie et dictée vocale (07/10/2026).
   1. Sur téléphone, la zone de saisie s'écarte des bords et de la courbe du bas de l'iPhone
      (retour du Général : barre rognée à gauche et à droite, contrairement à Telegram).
   2. Le micro prend la place du bouton d'envoi tant que le champ est vide. */
@media (max-width: 600px) {
  #hermes-signature#hermes-signature .hs-composerwrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    padding-bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 6px)) !important;
  }
}
#hermes-signature .hs-composer .qg-micro {
  grid-area: input; justify-self: end; align-self: end; position: relative; z-index: 3;
  width: 34px; height: 34px; margin: 0 5px 5px 0; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  color: #e9fff9; background: rgba(255, 255, 255, .10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  transition: transform .15s ease;
}
#hermes-signature .hs-composer .qg-micro:active { transform: scale(.92); }
#hermes-signature .hs-composer .qg-micro svg { width: 19px; height: 19px; }
#hermes-signature .hs-composer .qg-micro:focus-visible { outline: 2px solid #4dffd8; outline-offset: 2px; }
#hermes-signature .hs-composer[data-vide="1"] .hs-send { display: none !important; }
#hermes-signature .hs-composer:not([data-vide="1"]) .qg-micro { display: none !important; }

/* Bandeau d'enregistrement : il recouvre la ligne de saisie pendant la dictée */
#hermes-signature .hs-composer[data-dictee="1"] > :not(.qg-dictee):not(#hs-attachment) { visibility: hidden; }
#hermes-signature .hs-composer .qg-dictee {
  grid-column: tools-start / input-end; grid-row: input; align-self: stretch; z-index: 6;
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 5px 0 16px;
  border-radius: 22px; background: rgba(18, 22, 26, .94); color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 24px rgba(0, 0, 0, .35);
  font: 600 15px/1.2 "Hellix", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
#hermes-signature .qg-dictee-point { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: qg-dictee-pouls 1.1s ease-in-out infinite; }
#hermes-signature .qg-dictee-temps { font-variant-numeric: tabular-nums; min-width: 2.6em; }
#hermes-signature .qg-dictee-aide { flex: 1; min-width: 0; opacity: .72; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hermes-signature .qg-dictee-annuler { background: none; border: 0; color: inherit; font: inherit; opacity: .85; padding: 8px 6px; cursor: pointer; }
#hermes-signature .qg-dictee-envoyer {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(135deg, #ff453a, #ff2d55); color: #ffffff; box-shadow: 0 4px 12px rgba(255, 59, 48, .4);
}
#hermes-signature .qg-dictee-envoyer svg { width: 18px; height: 18px; }
#hermes-signature .qg-dictee-attente .qg-dictee-point { background: #ffcc00; animation-duration: .6s; }
#hermes-signature .qg-dictee-attente :is(.qg-dictee-annuler, .qg-dictee-envoyer) { opacity: .4; pointer-events: none; }
@keyframes qg-dictee-pouls { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.65); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { #hermes-signature .qg-dictee-point { animation: none; } }

/* Messages envoyés pendant que l'agent travaille (07/10) */
#hermes-signature .hs-time .qg-msg-attente { color: #ff9f0a; font-weight: 700; }
#hermes-signature .hs-time .qg-msg-pris { color: #30d158; font-weight: 700; }
#hermes-signature#hermes-signature[data-theme="light"] .hs-time .qg-msg-attente { color: #b25000; }
#hermes-signature#hermes-signature[data-theme="light"] .hs-time .qg-msg-pris { color: #1e7d3a; }
