/* Assistant GK : fenetre de discussion. Couleurs et polices du theme GK (gktheme), repli si absentes. */
#gka-racine, .gka-contact {
  --gka-rouge: var(--gk-red, #B3362F);
  --gka-rouge-fonce: var(--gk-red-dark, #922a24);
  --gka-fonce: var(--gk-dark, #242424);
  --gka-clair: var(--gk-light, #F7F7F7);
  --gka-bord: var(--gk-border, #E5E5E5);
  font-family: 'Lato', Arial, sans-serif;
}
.gka-bouton {
  position: fixed; right: 20px; bottom: 20px; z-index: 100010;
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  border: 0; border-radius: 24px; background: var(--gka-rouge); color: #fff;
  font: 600 15px/1 'Poppins', Arial, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
}
.gka-bouton:hover { background: var(--gka-rouge-fonce); }
.gka-bouton:focus-visible, .gka-fenetre button:focus-visible, .gka-fenetre a:focus-visible {
  outline: 3px solid var(--gka-fonce); outline-offset: 2px;
}
.gka-bouton-icone {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; color: var(--gka-rouge); font-weight: 800;
}
.gka-bouton[hidden], .gka-fenetre[hidden] { display: none; }
.gka-fenetre {
  position: fixed; right: 20px; bottom: 84px; z-index: 100011;
  width: 380px; max-width: calc(100vw - 40px); height: 600px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; color: var(--gka-fonce); border: 1px solid var(--gka-bord); border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.gka-entete { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--gka-fonce); color: #fff; }
.gka-entete strong { display: block; font: 700 16px 'Poppins', Arial, sans-serif; }
.gka-entete span { font-size: 12px; opacity: .8; }
.gka-fermer { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.gka-mention { margin: 0; padding: 6px 16px; font-size: 11px; color: #666; background: var(--gka-clair); border-bottom: 1px solid var(--gka-bord); }
.gka-mention a { color: var(--gka-rouge); }
.gka-fil { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.gka-bulle { max-width: 85%; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.gka-bulle a { color: var(--gka-rouge); text-decoration: underline; }
.gka-client { align-self: flex-end; background: var(--gka-rouge); color: #fff; }
.gka-assistant { align-self: flex-start; background: var(--gka-clair); }
.gka-systeme { align-self: center; max-width: 95%; font-size: 12px; color: #666; text-align: center; }
.gka-statut { min-height: 18px; padding: 0 16px 6px; font-size: 12px; font-style: italic; color: #666; }
.gka-cartes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gka-carte {
  flex: 0 0 140px; display: flex; flex-direction: column; gap: 4px; padding: 8px;
  border: 1px solid var(--gka-bord); border-radius: 8px; background: #fff; color: var(--gka-fonce);
  font-size: 12px; text-decoration: none;
}
.gka-carte:hover { border-color: var(--gka-rouge); }
.gka-carte img { width: 100%; height: 100px; object-fit: contain; }
.gka-carte-nom { font-weight: 700; line-height: 1.3; }
.gka-carte-prix { color: var(--gka-rouge); font-weight: 700; }
.gka-carte-stock { color: #666; }
.gka-action { padding: 10px; border: 1px solid var(--gka-rouge); border-radius: 8px; background: #fff; font-size: 13px; }
.gka-action p { margin: 0 0 8px; }
.gka-action .gka-detail { color: #666; }
.gka-action-faite { border-color: var(--gka-bord); background: var(--gka-clair); }
.gka-action-faite p { margin: 0; }
.gka-action input, .gka-action select, .gka-action textarea {
  display: block; width: 100%; margin: 0 0 8px; padding: 7px 9px; box-sizing: border-box;
  border: 1px solid var(--gka-bord); border-radius: 6px; font: 14px 'Lato', Arial, sans-serif;
}
.gka-boutons { display: flex; gap: 8px; }
.gka-boutons button, .gka-saisie button {
  padding: 8px 14px; border: 0; border-radius: 6px; font: 600 13px 'Poppins', Arial, sans-serif; cursor: pointer;
}
.gka-oui { background: var(--gka-rouge); color: #fff; }
.gka-non { background: var(--gka-clair); color: var(--gka-fonce); }
.gka-boutons button:disabled, .gka-saisie button:disabled { opacity: .5; cursor: default; }
.gka-rapides { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.gka-rapides button {
  padding: 5px 10px; border: 1px solid var(--gka-rouge); border-radius: 14px;
  background: #fff; color: var(--gka-rouge); font-size: 12px; cursor: pointer;
}
.gka-saisie { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--gka-bord); }
.gka-saisie textarea {
  flex: 1; max-height: 120px; padding: 8px 10px; resize: none;
  border: 1px solid var(--gka-bord); border-radius: 6px; font: 14px 'Lato', Arial, sans-serif;
}
.gka-saisie button { background: var(--gka-rouge); color: #fff; }
.gka-saisie .gka-joindre { padding: 8px 9px; background: var(--gka-clair); color: var(--gka-fonce); line-height: 0; }
.gka-pieces { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.gka-pieces:not(:empty) { padding-top: 8px; }
.gka-piece {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 9px;
  border: 1px solid var(--gka-bord); border-radius: 12px; font-size: 12px; overflow-wrap: anywhere;
}
.gka-piece button { padding: 0 5px; border: 0; background: none; font-size: 15px; line-height: 1; cursor: pointer; }
.gka-piece-envoyee { display: block; margin-top: 4px; font-size: 12px; opacity: .85; }
.gka-contact { margin: 0 0 24px; }
.gka-contact > p { max-width: 640px; }
.gka-fenetre.gka-integree {
  position: static; z-index: auto; width: 100%; max-width: none; height: calc(100vh - 370px); min-height: 420px; max-height: 700px;
  margin-top: 16px; border-radius: 8px; box-shadow: none; animation: none;
}
.gka-integree .gka-fermer { display: none; }
@media (max-width: 575px) {
  .gka-bouton { right: 12px; bottom: 12px; padding: 11px 14px; }
  .gka-fenetre { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
  .gka-fenetre.gka-integree { width: 100%; height: 80vh; max-height: none; border-radius: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .gka-fenetre { animation: gka-entree .18s ease-out; }
  @keyframes gka-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
