/* ==========================================================================
   ASSISTANT GPE · design sobre (2026-12-07)
   Palette du site : bleu nuit #1B2A41, or doux #B89B5E, ivoire #F5F2EB.
   Angles droits, pas d'animation insistante.
   ========================================================================== */

/* ---------- Bouton d'ouverture ---------- */
.gpe-chat-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 2500; display: flex; align-items: center; }
.gpe-chat-bubble-hint { display: none !important; }
.gpe-chat-launcher .gpe-chat-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  width: auto; height: 54px; padding: 0 22px 0 18px;
  border: 0; border-radius: 0 !important; cursor: pointer;
  background: #1B2A41; color: #fff;
  font: 500 15px Lexend, system-ui, sans-serif; letter-spacing: .01em;
  box-shadow: 0 12px 30px rgba(27,42,65,.25);
  transition: background .25s ease, transform .25s ease;
  animation: none !important;
}
.gpe-chat-launcher .gpe-chat-trigger::before,
.gpe-chat-launcher .gpe-chat-trigger::after { display: none !important; }
.gpe-chat-launcher .gpe-chat-trigger i { font-size: 18px; color: #B89B5E; }
.gpe-chat-launcher .gpe-chat-trigger:hover { background: #1B2A41; transform: translateY(-2px); }
.gpe-chat-launcher .gpe-chat-trigger.is-open i::before { content: "\f00d"; }
.gpe-chat-launcher .gpe-robot-dot { display: none !important; }

/* ---------- Fenêtre ---------- */
.gpe-chat-window {
  position: fixed; right: 24px; bottom: 92px; z-index: 2600;
  width: 380px; height: 580px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #E6E1D6; border-radius: 0;
  box-shadow: 0 24px 60px rgba(27,42,65,.22);
  font-family: Lexend, system-ui, sans-serif; color: #1B2A41;
  transform-origin: 100% 100%;
  transition: opacity .25s ease, transform .3s ease;
}
.gpe-chat-window.hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* En-tête */
.gpe-chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 16px 16px 18px; background: #1B2A41; color: #fff; border: 0;
}
.gpe-chat-header::before { display: none; }
.gpe-chat-title-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gpe-chat-avatar.gpe-avatar-robot {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; box-shadow: none; padding: 3px;
}
.gpe-chat-avatar.gpe-avatar-robot svg { display: none; }
.gpe-chat-avatar .gpe-chat-logo { width: 100%; height: 100%; object-fit: contain; }
.gpe-chat-avatar .dot-status { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: #B89B5E; border: 2px solid #1B2A41; animation: none; }
.gpe-chat-title { font-size: 16px; font-weight: 500; color: #fff; line-height: 1.2; }
.gpe-chat-subtitle { margin-top: 3px; font-size: 12px; font-weight: 300; color: rgba(255,255,255,.7); }
.gpe-chat-header-actions { display: flex; align-items: center; gap: 6px; }
.chat-lang-btn { display: inline-flex; padding: 0; border: 1px solid rgba(255,255,255,.25); background: transparent; border-radius: 0; cursor: pointer; font: inherit; }
.chat-lang-btn span { padding: 5px 8px; font-size: 11.5px; font-weight: 500; letter-spacing: .05em; color: rgba(255,255,255,.65); }
.chat-lang-btn span.on { background: #fff; color: #1B2A41; }
.chat-close-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.chat-close-btn:hover { background: #fff; color: #1B2A41; transform: none; }

/* Corps */
.gpe-chat-body {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  padding: 20px 18px; background: #F5F2EB; background-image: none;
  scrollbar-width: thin; scrollbar-color: rgba(27,42,65,.2) transparent;
}
.chat-bubble-wrapper { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; animation: chatIn .3s ease both; }
.chat-bot-av { display: none !important; }
.chat-bubble { max-width: 88%; padding: 12px 15px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; border-radius: 0; }
.chat-bubble-bot { background: #fff; color: #1B2A41; border: 1px solid #E6E1D6; border-left: 0; box-shadow: none; }
.chat-bubble-bot a { color: #1B2A41; font-weight: 500; text-decoration: none; border-bottom: 0; }
.chat-bubble-user { align-self: flex-end; background: #1B2A41; color: #fff; box-shadow: none; animation: chatIn .25s ease both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Suggestions : étiquettes compactes */
.chat-actions-pills { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.chat-actions-label { width: 100%; margin-bottom: 2px; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #8C7444; }
.chat-action-pill {
  display: inline-flex; align-items: center; width: auto; padding: 7px 12px;
  font: inherit; font-size: 13px; font-weight: 400; color: #1B2A41; text-align: left;
  background: #fff; border: 1px solid #E6E1D6; border-radius: 0; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chat-action-pill::after { display: none; }
.chat-action-pill:hover { background: #1B2A41; border-color: #1B2A41; color: #fff; padding-left: 12px; }
.chat-action-pill:focus-visible { outline: 2px solid #B89B5E; outline-offset: 2px; }

/* Indicateur de frappe */
.chat-typing { align-self: flex-start; display: inline-flex; gap: 5px; margin: 0; padding: 12px 15px; background: #fff; border: 1px solid #E6E1D6; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: #1B2A41; opacity: .3; animation: chatDot 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 100% { opacity: .25; } 40% { opacity: .9; } }

/* Pied : saisie */
.gpe-chat-footer { padding: 12px 14px 10px; background: #fff; border-top: 1px solid #E6E1D6; }
.gpe-chat-input-form { display: flex; align-items: center; gap: 0; border: 1px solid #E6E1D6; background: #fff; box-shadow: none; transition: border-color .2s ease; }
.gpe-chat-input-form:focus-within { border-color: #1B2A41; box-shadow: none; background: #fff; }
.chat-input-ic { display: none; }
.gpe-chat-input-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 0 !important; border-radius: 0 !important; background: transparent; font: inherit; font-size: 14px; color: #1B2A41; outline: none; }
.gpe-chat-input-form input::placeholder { color: #8A8F98; }
.gpe-chat-input-form button { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0 !important; background: #1B2A41; color: #fff; cursor: pointer; transition: background .2s ease; }
.gpe-chat-input-form button:hover { background: #B89B5E; color: #1B2A41; }
.gpe-chat-input-form button svg { width: 17px; height: 17px; transform: none; }
.gpe-chat-disclaimer { display: block; margin-top: 8px; text-align: center; color: #8A8F98; }
.gpe-chat-disclaimer i { display: none; }
.gpe-chat-disclaimer small { font-size: 11px; line-height: 1.4; }

/* Mobile : panneau plein écran */
@media (max-width: 720px) {
  .gpe-chat-launcher { right: 14px; bottom: 14px; }
  .gpe-chat-launcher .gpe-chat-trigger { height: 50px; padding: 0 16px; }
  .gpe-chat-launcher .gpe-chat-trigger span { display: none; }
  .gpe-chat-window { left: 0; right: 0; top: 0; bottom: 0; width: auto; height: auto; max-height: none; border: 0; }
  .gpe-chat-window.hidden { transform: translateY(24px); }
  body.gpe-chat-open .gpe-chat-launcher { display: none; }
}
.gpe-chat-launcher .gpe-chat-trigger.is-open i { font-weight: 900; }
.gpe-chat-disclaimer { line-height: 1.4; }
.chat-action-pill { border-color: #E6E1D6; }
