/* QG+ — Connexion : identifiant (adresse e-mail) + « Se connecter avec Apple » (qg-connexion.js, 29/10/2026).
   Le champ « Votre identifiant » reprend le style des champs de la page de connexion (classe hs-field).
   Retour arrière : retirer qg-connexion.css et qg-connexion.js d'index.html. */
#hermes-signature .qgcx-bloc { display: grid; gap: 16px; margin-top: 18px; animation: qgcx-entre .6s cubic-bezier(.2,.8,.2,1) both; }
#hermes-signature .qgcx-ou {
  display: flex; align-items: center; gap: 14px; font-size: 12px; line-height: 1; letter-spacing: .3px;
  color: var(--login-muted, #b7bcc2);
}
#hermes-signature .qgcx-ou::before, #hermes-signature .qgcx-ou::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .28; }

/* « Se connecter avec Apple » : blanc sur fond sombre, noir sur fond clair (comme les boutons d'Apple) */
#hermes-signature .qgcx-apple {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 54px; min-height: 54px;
  margin: 0; padding: 0 20px; border: 0; border-radius: 16px; background: #fff; color: #000;
  font: 600 16px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; letter-spacing: -.1px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: filter .2s, opacity .25s, transform .2s;
}
#hermes-signature .qgcx-apple:hover { filter: brightness(.95); }
#hermes-signature .qgcx-apple:active { transform: scale(.985); }
#hermes-signature .qgcx-apple:focus-visible { outline: 2px solid #d0dbea; outline-offset: 5px; }
#hermes-signature .qgcx-apple:disabled { opacity: .6; cursor: default; transform: none; }
#hermes-signature .qgcx-logo::before { content: "\F8FF"; position: relative; top: -1px; font: 400 19px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
#hermes-signature[data-theme="light"] .qgcx-apple { background: #000; color: #fff; }
#hermes-signature[data-theme="light"] .qgcx-apple:focus-visible { outline-color: #59738e; }

/* attente (app QG+ : Apple s'ouvre dans le navigateur) — compacte : le code à gauche, la consigne à droite */
#hermes-signature .qgcx-attente {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; row-gap: 3px;
  padding: 12px 14px; border: 1px solid #ffffff1a; border-radius: 16px; background: #ffffff0a; text-align: left;
  animation: qgcx-entre .55s cubic-bezier(.2,.8,.2,1) both;
}
#hermes-signature[data-theme="light"] .qgcx-attente { background: #25303c08; border-color: #34495e1f; }
#hermes-signature .qgcx-code {
  grid-row: span 2; font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em;
  color: var(--login-ink, #f5f6f7);
}
#hermes-signature .qgcx-etape { font-size: 12.5px; line-height: 1.4; color: var(--login-muted, #b7bcc2); }
#hermes-signature .qgcx-annuler {
  justify-self: start; margin: 0; padding: 2px 0; border: 0; background: none; cursor: pointer;
  font: 500 12.5px -apple-system, BlinkMacSystemFont, system-ui, sans-serif; color: var(--login-muted, #b7bcc2);
  text-decoration: underline; text-underline-offset: 3px;
}

/* avec l'identifiant et le bouton Apple, la carte grandit : sur un écran peu haut, elle se resserre pour tenir sans défiler */
@media (max-height: 940px) {
  #hermes-signature .qg-login:has(.qgcx-id) { padding-top: 26px; padding-bottom: 26px; }
  #hermes-signature .qg-login:has(.qgcx-id) .qg-login-card { padding-top: 28px; padding-bottom: 22px; }
  #hermes-signature .qg-login:has(.qgcx-id) form { gap: 15px; margin-top: 20px; }
  #hermes-signature .qg-login:has(.qgcx-id) .qgcx-bloc { margin-top: 14px; gap: 12px; }
}

@keyframes qgcx-entre { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { #hermes-signature .qgcx-bloc, #hermes-signature .qgcx-attente { animation: none; } }
