/* QG+ — Mail (07/10/2026, demande du Général : remplacer « Activité » par un outil mail complet et simple).
   Boîtes JAD (Gmail) + Perso (iCloud) : liste, recherche, lecture, actions, rédaction, envoi direct.
   Fichier séparé : app.css et les autres feuilles ne sont pas modifiés. Retour arrière : voir RETOUR-ARRIERE.txt. */

#hermes-signature#hermes-signature {
  --mel-fond: #ffffff; --mel-fond2: #f4f4f6; --mel-texte: #1c1c1e; --mel-titre: #0b0d0e; --mel-doux: rgba(60, 60, 67, .62);
  --mel-tres-doux: rgba(60, 60, 67, .38); --mel-sep: rgba(60, 60, 67, .12); --mel-accent: #00a88e; --mel-accent-fond: rgba(0, 201, 173, .12);
  --mel-puce: rgba(118, 118, 128, .10); --mel-puce-bord: transparent; --mel-puce-txt: #1c1c1e;
  --mel-puce-on: #0b0d0e; --mel-puce-on-bord: #0b0d0e; --mel-puce-on-txt: #ffffff;
  --mel-champ: rgba(118, 118, 128, .10); --mel-carte: #ffffff; --mel-ombre: 0 10px 30px rgba(0, 0, 0, .12);
  --mel-voile: rgba(20, 20, 24, .32); --mel-rouge: #d70015; --mel-ambre: #b35c00; --mel-choisi: rgba(0, 168, 142, .10);
  --mel-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --mel-sans: "Hellix", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
#hermes-signature#hermes-signature:not([data-theme="light"]) {
  --mel-fond: #010506; --mel-fond2: #03100e; --mel-texte: #eafff9; --mel-titre: #f0fffb; --mel-doux: #8cb9ac; --mel-tres-doux: #5f8a7f;
  --mel-sep: rgba(77, 255, 216, .10); --mel-accent: #4dffd8; --mel-accent-fond: rgba(77, 255, 216, .12);
  --mel-puce: rgba(255, 255, 255, .04); --mel-puce-bord: rgba(77, 255, 216, .14); --mel-puce-txt: #cfeee5;
  --mel-puce-on: rgba(77, 255, 216, .14); --mel-puce-on-bord: rgba(77, 255, 216, .55); --mel-puce-on-txt: #9fffe9;
  --mel-champ: rgba(4, 22, 20, .9); --mel-carte: #03100e; --mel-ombre: 0 14px 40px rgba(0, 0, 0, .55);
  --mel-voile: rgba(0, 3, 3, .66); --mel-rouge: #ff6b6b; --mel-ambre: #ffc977; --mel-choisi: rgba(77, 255, 216, .08);
  --mel-mono: var(--nx-mono, "JetBrains Mono", ui-monospace, monospace);
}

/* ── Page ─────────────────────────────────────────────────────────────────────────────────────── */
#hermes-signature#hermes-signature .hs-page.qg-mel-page { padding: 0 0 calc(110px + env(safe-area-inset-bottom, 0px)) !important; min-height: 100%; }
#hermes-signature .mel { font-family: var(--mel-sans); color: var(--mel-texte); max-width: 860px; margin: 0 auto; }
#hermes-signature .mel svg { display: block; flex: none; }
#hermes-signature :where(.mel, .mel-couche) button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
#hermes-signature .mel-tete { display: flex; align-items: center; gap: 10px; padding: 18px 16px 8px; }
#hermes-signature .mel-tete h1 { flex: 1; margin: 0; font: 700 30px/1.1 var(--mel-sans); letter-spacing: -.01em; color: var(--mel-titre); }
#hermes-signature:not([data-theme="light"]) .mel-tete h1 { font-family: var(--nx-display, var(--mel-sans)); letter-spacing: .04em; font-size: 26px; text-transform: uppercase; }
#hermes-signature .mel-icone {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--mel-puce-bord); background: var(--mel-puce); color: var(--mel-texte);
}
#hermes-signature .mel-icone svg { width: 20px; height: 20px; }
#hermes-signature .mel-ecrire {
  height: 42px; padding: 0 16px 0 13px; display: inline-flex; align-items: center; gap: 7px; border-radius: 21px; cursor: pointer;
  border: 1px solid var(--mel-puce-on-bord); background: var(--mel-puce-on); color: var(--mel-puce-on-txt); font-weight: 600 !important; font-size: 15px !important;
}
#hermes-signature .mel-ecrire svg { width: 18px; height: 18px; }

#hermes-signature .mel-recherche { position: relative; margin: 4px 16px 10px; }
#hermes-signature .mel-recherche svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--mel-doux); pointer-events: none; }
#hermes-signature .mel-recherche input {
  width: 100%; height: 40px; box-sizing: border-box; padding: 0 36px 0 38px; border-radius: 12px; border: 1px solid var(--mel-puce-bord);
  background: var(--mel-champ); color: var(--mel-texte); font: 16px/1 var(--mel-sans); outline: none; -webkit-appearance: none; appearance: none;
}
#hermes-signature .mel-recherche input::placeholder { color: var(--mel-doux); }
#hermes-signature .mel-recherche input:focus { border-color: var(--mel-accent); }
#hermes-signature .mel-recherche .mel-effacer { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border: 0; background: none; color: var(--mel-doux); cursor: pointer; display: grid; place-items: center; }
#hermes-signature .mel-recherche .mel-effacer svg { position: static; translate: none; width: 16px; height: 16px; }

#hermes-signature .mel-puces { display: flex; gap: 7px; overflow-x: auto; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#hermes-signature .mel-puces::-webkit-scrollbar { display: none; }
#hermes-signature .mel-puce {
  flex: none; height: 34px; padding: 0 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: 17px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--mel-puce-bord); background: var(--mel-puce); color: var(--mel-puce-txt); font-size: 14px !important; font-weight: 500 !important;
}
#hermes-signature .mel-puce svg { width: 15px; height: 15px; }
#hermes-signature .mel-puce[aria-pressed="true"] { background: var(--mel-puce-on); border-color: var(--mel-puce-on-bord); color: var(--mel-puce-on-txt); }
#hermes-signature .mel-puce b { font: 700 11px/1 var(--mel-mono); padding: 3px 6px; border-radius: 9px; background: var(--mel-accent-fond); color: var(--mel-accent); }
#hermes-signature .mel-puce[aria-pressed="true"] b { background: rgba(255, 255, 255, .2); color: inherit; }
#hermes-signature:not([data-theme="light"]) .mel-puce[aria-pressed="true"] b { background: rgba(77, 255, 216, .2); }
#hermes-signature .mel-boites .mel-puce { height: 36px; font-weight: 600 !important; }

/* ── Liste ────────────────────────────────────────────────────────────────────────────────────── */
#hermes-signature .mel-etat { padding: 50px 24px; text-align: center; color: var(--mel-doux); font-size: 15px; }
#hermes-signature .mel-etat strong { display: block; color: var(--mel-texte); font-size: 17px; margin-bottom: 6px; }
#hermes-signature .mel-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--mel-sep); }
#hermes-signature .mel-ligne { position: relative; overflow: hidden; border-bottom: 1px solid var(--mel-sep); background: var(--mel-fond); }
#hermes-signature[data-theme="light"] .mel-ligne { background: #ffffff; }
#hermes-signature .mel-fond-geste { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: #fff; font-weight: 600; font-size: 14px; }
#hermes-signature .mel-fond-geste span { display: inline-flex; align-items: center; gap: 7px; }
#hermes-signature .mel-fond-geste svg { width: 20px; height: 20px; }
#hermes-signature .mel-fond-geste[data-sens="gauche"] { background: #00a88e; justify-content: flex-end; }
#hermes-signature .mel-fond-geste[data-sens="droite"] { background: #0a84ff; }
#hermes-signature .mel-carte-ligne {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 12px; padding: 12px 16px 12px 14px; cursor: pointer;
  background: var(--mel-fond); transition: background .15s; touch-action: pan-y;
}
#hermes-signature .mel-carte-ligne > div { min-width: 0; }
#hermes-signature[data-theme="light"] .mel-carte-ligne { background: #ffffff; }
#hermes-signature .mel-carte-ligne:active { background: var(--mel-fond2); }
#hermes-signature .mel-ligne[data-choisi] .mel-carte-ligne { background: var(--mel-choisi); }
#hermes-signature .mel-av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; align-self: start; margin-top: 2px; cursor: pointer;
  font: 700 14px/1 var(--mel-sans); color: #fff; background: hsl(var(--h, 170) 45% 42%); border: 0; padding: 0; position: relative;
}
#hermes-signature:not([data-theme="light"]) .mel-av { background: hsl(var(--h, 170) 55% 24%); color: hsl(var(--h, 170) 90% 82%); box-shadow: inset 0 0 0 1px hsl(var(--h, 170) 70% 45% / .5); }
#hermes-signature .mel-ligne[data-choisi] .mel-av { background: var(--mel-accent) !important; color: #fff !important; }
#hermes-signature .mel-ligne[data-choisi] .mel-av::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mel-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/20px no-repeat; }
#hermes-signature .mel-l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#hermes-signature .mel-qui { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15.5px; font-weight: 500; color: var(--mel-texte); }
#hermes-signature .mel-quand { flex: none; font-size: 13px; color: var(--mel-doux); font-variant-numeric: tabular-nums; }
#hermes-signature .mel-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 1px; }
#hermes-signature .mel-objet { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14.5px; color: var(--mel-texte); }
#hermes-signature .mel-marques { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--mel-doux); }
#hermes-signature .mel-marques svg { width: 14px; height: 14px; }
#hermes-signature .mel-marques .mel-etoile { color: #f5a623; }
#hermes-signature .mel-apercu { grid-column: 2; margin-top: 2px; min-height: 2.7em; font-size: 14px; line-height: 1.35; color: var(--mel-doux); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#hermes-signature .mel-apercu[data-attente] {
  margin-right: 18%; border-radius: 6px; background: linear-gradient(90deg, var(--mel-puce) 0, var(--mel-sep) 50%, var(--mel-puce) 100%) 0 0/200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) top/100% 1.05em no-repeat, linear-gradient(#000 0 0) 0 1.4em/72% 1.05em no-repeat;
  mask: linear-gradient(#000 0 0) top/100% 1.05em no-repeat, linear-gradient(#000 0 0) 0 1.4em/72% 1.05em no-repeat;
  animation: mel-reflet 1.4s linear infinite;
}
#hermes-signature .mel-cpt { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; font: 700 10px/1.5 var(--mel-mono); letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; background: var(--mel-puce); color: var(--mel-doux); border: 1px solid var(--mel-puce-bord); }
#hermes-signature .mel-cpt[data-c="perso"] { color: #8e5bd8; }
#hermes-signature:not([data-theme="light"]) .mel-cpt[data-c="perso"] { color: #c6a6ff; }
#hermes-signature .mel-ligne[data-nl] .mel-qui, #hermes-signature .mel-ligne[data-nl] .mel-objet { font-weight: 700; color: var(--mel-titre); }
#hermes-signature .mel-ligne[data-nl] .mel-carte-ligne::before { content: ""; position: absolute; left: 4px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--mel-accent); }
#hermes-signature .mel-plus { display: block; margin: 16px auto 0; height: 40px; padding: 0 20px; border-radius: 20px; border: 1px solid var(--mel-puce-bord); background: var(--mel-puce); color: var(--mel-texte); cursor: pointer; font-size: 14px; }
#hermes-signature .mel-squelette { height: 76px; border-bottom: 1px solid var(--mel-sep); background: linear-gradient(90deg, transparent 0, var(--mel-puce) 40%, transparent 80%) 0 0/200% 100%; animation: mel-reflet 1.4s linear infinite; }
@keyframes mel-reflet { to { background-position: -200% 0; } }

/* Barre de sélection */
#hermes-signature .mel-selection {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px;
  background: var(--mel-fond); border-bottom: 1px solid var(--mel-sep); box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}
#hermes-signature .mel-selection strong { flex: 1; font-size: 15px; }
#hermes-signature .mel-selection button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--mel-texte); cursor: pointer; }
#hermes-signature .mel-selection button svg { width: 20px; height: 20px; }

/* ── Couches (lecture, rédaction, feuilles) ───────────────────────────────────────────────────── */
#hermes-signature .mel-couche { position: fixed; inset: 0; z-index: 90; font-family: var(--mel-sans); color: var(--mel-texte); }
#hermes-signature .mel-panneau {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--mel-fond);
  padding-top: env(safe-area-inset-top, 0px); height: var(--qg-vh, 100dvh);
}
@media (min-width: 900px) {
  #hermes-signature .mel-panneau { left: auto; width: min(760px, 62vw); box-shadow: var(--mel-ombre); border-left: 1px solid var(--mel-sep); }
  #hermes-signature .mel-couche[data-type="lecteur"]::before, #hermes-signature .mel-couche[data-type="redaction"]::before { content: ""; position: absolute; inset: 0; background: var(--mel-voile); }
}
#hermes-signature .mel-barre { flex: none; display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--mel-sep); min-height: 52px; }
#hermes-signature .mel-barre .mel-espace { flex: 1; }
#hermes-signature .mel-bouton {
  height: 40px; min-width: 40px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px;
  border: 0; background: transparent; color: var(--mel-texte); cursor: pointer; font-size: 15px !important;
}
#hermes-signature .mel-bouton svg { width: 21px; height: 21px; }
#hermes-signature .mel-bouton:disabled { opacity: .4; }
#hermes-signature .mel-bouton.est-retour { color: var(--mel-accent); font-weight: 600; padding-left: 4px; }
#hermes-signature .mel-bouton.est-etoile[aria-pressed="true"] { color: #f5a623; }
#hermes-signature .mel-defile { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* Lecture */
#hermes-signature .mel-lec-tete { padding: 16px 18px 6px; }
#hermes-signature .mel-lec-tete h2 { margin: 0 0 12px; font: 700 21px/1.25 var(--mel-sans); color: var(--mel-titre); overflow-wrap: anywhere; }
#hermes-signature .mel-exp { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0 11px; align-items: center; }
#hermes-signature .mel-exp .mel-av { cursor: default; }
#hermes-signature .mel-exp-nom { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hermes-signature .mel-exp-adr { font-size: 13px; color: var(--mel-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hermes-signature .mel-exp-date { font-size: 13px; color: var(--mel-doux); text-align: right; }
#hermes-signature .mel-dest { margin: 8px 0 0 51px; font-size: 13px; color: var(--mel-doux); line-height: 1.45; overflow-wrap: anywhere; }
#hermes-signature .mel-dest button { border: 0; background: none; padding: 0; color: var(--mel-accent); cursor: pointer; font-size: 13px !important; }
#hermes-signature .mel-dest .mel-dest-nom { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; font: inherit; overflow-wrap: anywhere; text-align: left; }
#hermes-signature .mel-dest .mel-dest-nom.est-ouvert { color: var(--mel-accent); text-decoration: none; user-select: text; -webkit-user-select: text; }
#hermes-signature .mel-pjs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px 2px; scrollbar-width: none; }
#hermes-signature .mel-pjs::-webkit-scrollbar { display: none; }
#hermes-signature .mel-pj {
  flex: none; max-width: 230px; display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid var(--mel-sep); background: var(--mel-puce); color: var(--mel-texte);
}
#hermes-signature .mel-pj svg { width: 22px; height: 22px; color: var(--mel-accent); }
#hermes-signature .mel-pj span { min-width: 0; display: flex; flex-direction: column; }
#hermes-signature .mel-pj b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hermes-signature .mel-pj small { font-size: 12px; color: var(--mel-doux); }
#hermes-signature .mel-avis {
  display: flex; align-items: center; gap: 10px; margin: 12px 18px 0; padding: 9px 12px; border-radius: 12px; font-size: 13.5px;
  background: var(--mel-accent-fond); color: var(--mel-texte);
}
#hermes-signature .mel-avis svg { width: 18px; height: 18px; color: var(--mel-accent); }
#hermes-signature .mel-avis span { flex: 1; }
#hermes-signature .mel-avis button { border: 0; background: none; color: var(--mel-accent); font-weight: 700 !important; cursor: pointer; padding: 4px 2px; font-size: 13.5px !important; }
#hermes-signature .mel-resume { margin: 12px 18px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--mel-accent); background: var(--mel-accent-fond); font-size: 14.5px; line-height: 1.45; }
#hermes-signature .mel-resume small { display: block; margin-bottom: 4px; font: 700 10.5px/1.2 var(--mel-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mel-accent); }
#hermes-signature .mel-corps { padding: 12px 0 30px; }
#hermes-signature .mel-cadre { display: block; width: calc(100% - 24px); margin: 0 12px; height: 160px; border: 0; border-radius: 14px; background: #fff; }
#hermes-signature:not([data-theme="light"]) .mel-cadre { box-shadow: 0 0 0 1px rgba(77, 255, 216, .12); }
#hermes-signature .mel-texte { margin: 0; padding: 4px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: 15.5px/1.5 var(--mel-sans); color: var(--mel-texte); }
#hermes-signature .mel-texte a { color: var(--mel-accent); }
#hermes-signature .mel-texte .mel-cite { color: var(--mel-doux); }
#hermes-signature .mel-pied {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--mel-sep); background: var(--mel-fond);
}
#hermes-signature .mel-pied button {
  height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; border: 0;
  background: transparent; color: var(--mel-texte); cursor: pointer; font-size: 11.5px !important; font-weight: 500 !important;
}
#hermes-signature .mel-pied button svg { width: 21px; height: 21px; color: var(--mel-accent); }
#hermes-signature .mel-pied button:active { background: var(--mel-puce); }

/* Rédaction */
#hermes-signature .mel-red-titre { flex: 1; text-align: center; font-weight: 700; font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#hermes-signature .mel-envoyer {
  height: 38px; padding: 0 15px; display: inline-flex; align-items: center; gap: 7px; border-radius: 19px; border: 0; cursor: pointer;
  background: var(--mel-accent); color: #fff; font-weight: 700 !important; font-size: 15px !important;
}
#hermes-signature:not([data-theme="light"]) .mel-envoyer { color: #02221c; }
#hermes-signature .mel-envoyer svg { width: 17px; height: 17px; }
#hermes-signature .mel-envoyer:disabled { opacity: .45; }
#hermes-signature .mel-champ-ligne { display: flex; align-items: flex-start; gap: 8px; min-height: 48px; padding: 6px 16px; border-bottom: 1px solid var(--mel-sep); position: relative; }
#hermes-signature .mel-champ-ligne > label { flex: none; width: 52px; padding-top: 9px; font-size: 15px; color: var(--mel-doux); }
#hermes-signature .mel-champ-ligne input, #hermes-signature .mel-champ-ligne select {
  flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; color: var(--mel-texte); font: 16px/1 var(--mel-sans); outline: none; padding: 0;
}
#hermes-signature .mel-champ-ligne select { -webkit-appearance: none; appearance: none; font-weight: 600; }
#hermes-signature .mel-destinataires { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
#hermes-signature .mel-destinataires input { flex: 1 1 120px; }
#hermes-signature .mel-jeton {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 30px; padding: 0 4px 0 11px; border-radius: 15px;
  background: var(--mel-accent-fond); color: var(--mel-texte); font-size: 14.5px;
}
#hermes-signature .mel-jeton span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hermes-signature .mel-jeton button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--mel-doux); cursor: pointer; border-radius: 50%; }
#hermes-signature .mel-jeton button svg { width: 13px; height: 13px; }
#hermes-signature .mel-jeton[data-faux] { background: rgba(215, 0, 21, .12); color: var(--mel-rouge); }
#hermes-signature .mel-cc-btn { flex: none; border: 0; background: none; color: var(--mel-doux); padding: 9px 0 0; cursor: pointer; font-size: 14px !important; }
#hermes-signature .mel-suggestions {
  position: absolute; left: 12px; right: 12px; top: calc(100% - 2px); z-index: 5; list-style: none; margin: 0; padding: 6px; border-radius: 14px;
  background: var(--mel-carte); box-shadow: var(--mel-ombre); border: 1px solid var(--mel-sep);
}
#hermes-signature .mel-suggestions button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--mel-texte); text-align: left; cursor: pointer; }
#hermes-signature .mel-suggestions button:hover, #hermes-signature .mel-suggestions button:focus { background: var(--mel-puce); outline: none; }
#hermes-signature .mel-suggestions b { font-size: 14.5px; }
#hermes-signature .mel-suggestions small { font-size: 12.5px; color: var(--mel-doux); }
#hermes-signature .mel-ia { display: flex; gap: 8px; align-items: center; margin: 12px 16px 0; padding: 6px 6px 6px 12px; border-radius: 14px; border: 1px dashed var(--mel-accent); background: var(--mel-accent-fond); }
#hermes-signature .mel-ia svg { width: 18px; height: 18px; color: var(--mel-accent); }
#hermes-signature .mel-ia input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; color: var(--mel-texte); font: 15px/1 var(--mel-sans); outline: none; }
#hermes-signature .mel-ia button { flex: none; height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--mel-accent); color: #fff; font-weight: 700 !important; font-size: 14px !important; cursor: pointer; }
#hermes-signature:not([data-theme="light"]) .mel-ia button { color: #02221c; }
#hermes-signature .mel-ia button:disabled { opacity: .5; }
#hermes-signature .mel-zone {
  display: block; width: 100%; box-sizing: border-box; min-height: 220px; padding: 14px 16px; border: 0; resize: none; outline: none;
  background: transparent; color: var(--mel-texte); font: 16px/1.5 var(--mel-sans);
}
#hermes-signature .mel-red-pjs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
#hermes-signature .mel-red-pj { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 10px; border-radius: 10px; background: var(--mel-puce); border: 1px solid var(--mel-sep); font-size: 13.5px; max-width: 100%; }
#hermes-signature .mel-red-pj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hermes-signature .mel-red-pj svg { width: 15px; height: 15px; }
#hermes-signature .mel-red-pj button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--mel-doux); cursor: pointer; }
#hermes-signature .mel-red-pj[data-envoi] { opacity: .6; }
#hermes-signature .mel-origine { margin: 0 16px 20px; border-left: 3px solid var(--mel-sep); padding: 2px 0 2px 12px; color: var(--mel-doux); font-size: 14px; }
#hermes-signature .mel-origine summary { cursor: pointer; padding: 6px 0; font-size: 13.5px; }
#hermes-signature .mel-origine pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.45 var(--mel-sans); max-height: 320px; overflow: auto; }
#hermes-signature .mel-red-outils { flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--mel-sep); }
#hermes-signature .mel-red-outils .mel-espace { flex: 1; }
#hermes-signature .mel-red-outils small { color: var(--mel-doux); font-size: 12.5px; }

/* Feuilles (déplacer, tâche, brouillon, menu) */
#hermes-signature .mel-couche[data-type="feuille"] { z-index: 95; }
#hermes-signature .mel-voile { position: absolute; inset: 0; background: var(--mel-voile); }
#hermes-signature .mel-feuille {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 50px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--mel-carte); border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--mel-ombre);
}
@media (min-width: 700px) {
  #hermes-signature .mel-feuille { left: 50%; right: auto; bottom: auto; top: 50%; translate: -50% -50%; width: 440px; border-radius: 20px; padding-bottom: 18px; }
}
#hermes-signature .mel-poignee { width: 38px; height: 5px; border-radius: 3px; background: var(--mel-sep); margin: 2px auto 10px; }
#hermes-signature .mel-feuille h3 { margin: 4px 0 12px; font-size: 18px; font-weight: 700; }
#hermes-signature .mel-feuille p { margin: -6px 0 12px; color: var(--mel-doux); font-size: 14px; }
#hermes-signature .mel-choix { display: flex; flex-direction: column; gap: 4px; }
#hermes-signature .mel-choix button {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--mel-puce);
  color: var(--mel-texte); cursor: pointer; text-align: left; font-size: 15.5px !important;
}
#hermes-signature .mel-choix button svg { width: 20px; height: 20px; color: var(--mel-accent); }
#hermes-signature .mel-choix button.est-rouge { color: var(--mel-rouge); }
#hermes-signature .mel-choix button.est-rouge svg { color: var(--mel-rouge); }
#hermes-signature .mel-choix h4 { margin: 10px 4px 2px; font: 700 10.5px/1.2 var(--mel-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mel-doux); }
#hermes-signature .mel-feuille .mel-libelle { display: block; margin: 12px 0 6px; font: 700 10.5px/1.2 var(--mel-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mel-doux); }
#hermes-signature .mel-feuille input[type="text"] { width: 100%; box-sizing: border-box; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--mel-sep); background: var(--mel-champ); color: var(--mel-texte); font: 16px/1 var(--mel-sans); outline: none; }
#hermes-signature .mel-feuille .mel-puces { padding: 0; flex-wrap: wrap; overflow: visible; }
#hermes-signature .mel-feuille .mel-valider { width: 100%; height: 50px; margin-top: 16px; border-radius: 14px; border: 0; background: var(--mel-accent); color: #fff; font-weight: 700 !important; font-size: 16px !important; cursor: pointer; }
#hermes-signature:not([data-theme="light"]) .mel-feuille .mel-valider { color: #02221c; }
#hermes-signature .mel-feuille .mel-date { position: relative; }
#hermes-signature .mel-feuille .mel-date input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }

/* Bandeau d'annulation */
#hermes-signature .mel-bandeau {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 120; max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px; background: #1c1c1e; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font: 500 14.5px/1.3 var(--mel-sans);
}
#hermes-signature:not([data-theme="light"]) .mel-bandeau { background: #062a24; border: 1px solid rgba(77, 255, 216, .4); color: #dffff6; }
#hermes-signature .mel-bandeau button { border: 0; background: none; color: #4dffd8; font-weight: 700; font-size: 14.5px; padding: 6px 8px; cursor: pointer; }
#hermes-signature .mel-bandeau[data-erreur] { background: #8a0011; color: #fff; }

@media (prefers-reduced-motion: reduce) { #hermes-signature .mel-squelette, #hermes-signature .mel-apercu[data-attente] { animation: none; } }
#hermes-signature .mel-carte-ligne > .mel-av { grid-row: 1 / span 2; }

/* 27/10/2026 (le Général, iPhone : « je n'arrive pas à télécharger les pièces jointes ») : la pièce s'enregistre (feuille de
   partage sur iPhone, boîte d'enregistrement sur ordinateur) ; flèche à droite, qui descend doucement pendant la lecture. */
#hermes-signature .mel-pj { max-width: 272px; }
#hermes-signature .mel-pj .mel-pj-dl {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-left: 2px; border-radius: 50%; font-style: normal;
  color: var(--mel-accent); background: color-mix(in srgb, var(--mel-accent) 13%, transparent);
}
#hermes-signature .mel-pj .mel-pj-dl svg { width: 16px; height: 16px; color: inherit; }
#hermes-signature .mel-pj.est-attente { cursor: progress; }
#hermes-signature .mel-pj.est-attente .mel-pj-dl svg { animation: mel-pj-descend .9s ease-in-out infinite; }
@keyframes mel-pj-descend { 0%, 100% { transform: translateY(-2px); opacity: .55; } 50% { transform: translateY(2px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #hermes-signature .mel-pj.est-attente .mel-pj-dl svg { animation: none; } }
