/* ═══════════════════════════════════════════════════
   FRAEB — chatbot.css : widget assistant FAQ
═══════════════════════════════════════════════════ */

#fraeb-chat-bouton {
  position: fixed; bottom: 22px; right: 22px; z-index: 9999;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--vert); color: var(--or-pale);
  border: 2px solid var(--or);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,.28);
  transition: transform .2s ease;
}
#fraeb-chat-bouton:hover { transform: scale(1.07); }
#fraeb-chat-bouton .badge-notif {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--or); border: 2px solid var(--blanc);
}

#fraeb-chat-panel {
  position: fixed; bottom: 90px; right: 22px; z-index: 9999;
  width: 340px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 130px);
  background: var(--blanc);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  display: none; flex-direction: column; overflow: hidden;
  font-family: "Source Sans 3", sans-serif;
}
#fraeb-chat-panel.ouvert { display: flex; }

#fraeb-chat-header {
  background: linear-gradient(135deg, var(--vert) 0%, var(--vert-fonce) 100%);
  color: #fff; padding: .9rem 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
#fraeb-chat-header img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--or); }
#fraeb-chat-header .titre { flex: 1; }
#fraeb-chat-header .titre strong { display: block; font-size: .92rem; font-family: "Playfair Display", serif; }
#fraeb-chat-header .titre span { display: block; font-size: .68rem; color: var(--or-pale); }
#fraeb-chat-fermer { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; opacity: .8; line-height: 1; }
#fraeb-chat-fermer:hover { opacity: 1; }

#fraeb-chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .7rem;
  background: var(--creme);
}
.fraeb-msg { max-width: 85%; padding: .6rem .85rem; border-radius: 10px; font-size: .86rem; line-height: 1.5; }
.fraeb-msg.bot  { align-self: flex-start; background: #fff; color: var(--texte); border: 1px solid var(--sable); border-bottom-left-radius: 2px; }
.fraeb-msg.user { align-self: flex-end; background: var(--vert); color: #fff; border-bottom-right-radius: 2px; }
.fraeb-msg a { color: var(--or); font-weight: 600; }
.fraeb-msg.bot a { color: var(--vert-clair); text-decoration: underline; }

#fraeb-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .8rem;
  background: var(--creme);
}
.fraeb-chip {
  background: #fff; border: 1px solid var(--or); color: var(--vert);
  font-size: .76rem; padding: .35rem .7rem; border-radius: 20px;
  cursor: pointer; transition: var(--trans);
}
.fraeb-chip:hover { background: var(--or); color: #fff; }

#fraeb-chat-form { display: flex; border-top: 1px solid var(--sable); }
#fraeb-chat-input {
  flex: 1; border: none; padding: .8rem 1rem; font-size: .86rem;
  font-family: inherit; outline: none;
}
#fraeb-chat-envoyer {
  background: var(--or); color: var(--vert-fonce); border: none;
  padding: 0 1.1rem; font-weight: 700; cursor: pointer; font-size: .9rem;
}
#fraeb-chat-envoyer:hover { background: var(--or-pale); }

@media (max-width: 480px) {
  #fraeb-chat-panel { right: 16px; left: 16px; width: auto; bottom: 86px; }
  #fraeb-chat-bouton { right: 16px; bottom: 16px; }
}
