/* Assistant KimiaPrint (chatbot à boutons) — voir assets/kp-bot.js */
.kp-bot {
  display: none;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
  pointer-events: auto;
  font-size: 14px;
  color: var(--black, #111);
}
.wa-float.kp-bot-open .kp-bot { display: flex; animation: kpBotIn .18s ease-out; }
@keyframes kpBotIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kp-bot-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 14px;
  background: var(--black, #111); color: #fff;
}
.kp-bot-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red, #E30613); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex-shrink: 0;
}
.kp-bot-ttl { flex: 1; min-width: 0; line-height: 1.25; }
.kp-bot-ttl strong { display: block; font-size: 14px; }
.kp-bot-ttl span { font-size: 11.5px; color: rgba(255,255,255,.65); }
.kp-bot-x {
  background: none; border: 0; color: #fff; font-size: 26px; line-height: 1;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
}
.kp-bot-x:hover { background: rgba(255,255,255,.12); }

.kp-bot-log {
  flex: 1; overflow-y: auto; padding: 14px 12px 6px;
  display: flex; flex-direction: column; gap: 8px;
  background: #f6f6f7;
}
.kp-bot-msg {
  max-width: 86%; padding: 9px 12px; border-radius: 14px;
  line-height: 1.45; overflow-wrap: anywhere;
}
.kp-bot-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border, #e5e5e5); border-bottom-left-radius: 4px; }
.kp-bot-msg.me  { align-self: flex-end; background: var(--red, #E30613); color: #fff; border-bottom-right-radius: 4px; }
.kp-bot-sub { font-size: 12.5px; color: #666; }

.kp-bot-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 12px; max-height: 38%; overflow-y: auto;
  background: #f6f6f7; border-top: 1px solid var(--border, #e5e5e5);
}
.kp-bot-chip {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  background: #fff; color: var(--black, #111);
  border: 1.5px solid var(--border, #e5e5e5);
  text-decoration: none; white-space: nowrap;
}
.kp-bot-chip:hover { border-color: var(--red, #E30613); color: var(--red, #E30613); }
.kp-bot-chip.wa { background: #25D366; border-color: #25D366; color: #fff; }
.kp-bot-chip.wa:hover { background: #1ebe5b; color: #fff; }

.kp-bot-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border, #e5e5e5); background: #fff; }
.kp-bot-in {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; /* 16px : pas de zoom auto iOS */
  padding: 9px 12px; border: 1.5px solid var(--border, #e5e5e5); border-radius: 99px; outline: none;
}
.kp-bot-in:focus { border-color: var(--red, #E30613); }
.kp-bot-send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--red, #E30613); color: #fff; font-size: 16px; flex-shrink: 0;
}

/* Téléphone : fenêtre compacte (~60 % de l'écran), la page reste visible au-dessus */
@media (max-width: 480px) {
  .kp-bot { height: min(440px, 62vh); height: min(440px, 62dvh); border-radius: 16px; font-size: 13.5px; }
  .kp-bot-head { padding: 8px 8px 8px 12px; }
  .kp-bot-av { width: 28px; height: 28px; font-size: 13px; }
  .kp-bot-ttl span { display: none; }
  .kp-bot-log { padding: 10px 10px 4px; gap: 6px; }
  .kp-bot-msg { padding: 7px 10px; }
  .kp-bot-chips { padding: 6px 10px; gap: 5px; max-height: 34%; }
  .kp-bot-chip { font-size: 12.5px; padding: 6px 10px; }
  .kp-bot-form { padding: 7px 8px; }
  .kp-bot-in { padding: 7px 12px; }
  .kp-bot-send { width: 38px; height: 38px; }
}
