/* Assistant IA */
.chat-open {
  position: fixed; right: 16px; bottom: 16px; z-index: 95;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--or, #ffb454);
  background: var(--papier, #16122e); color: var(--ivoire, #f7f3ec);
  font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.chat-open:hover { background: #211a42; }
.chat-open.chat-masque { display: none; }
.chat-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 96;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--papier, #16122e); color: var(--ivoire, #f7f3ec);
  border: 1px solid var(--ligne, rgba(255,255,255,.09)); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--ligne, rgba(255,255,255,.09)); }
.chat-head strong { display: block; }
.chat-head small { color: var(--gris, #a99fc4); }
.chat-close { background: none; border: 0; color: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; line-height: 1.45; font-size: .96rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bot { align-self: flex-start; background: rgba(255,255,255,.07); }
.chat-user { align-self: flex-end; background: var(--or, #ffb454); color: #1e1838; }
.chat-bot a { color: var(--or-2, #ffc87d); text-decoration: underline; }
.chat-wait { opacity: .7; font-style: italic; }
.chat-cta { align-self: flex-start; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 8px; }
.chat-chips:empty { display: none; }
.chat-chip { border: 1px solid var(--ligne, rgba(255,255,255,.2)); background: transparent; color: inherit; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.chat-chip:hover { border-color: var(--or, #ffb454); }
.chat-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--ligne, rgba(255,255,255,.09)); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ligne, rgba(255,255,255,.2)); background: rgba(255,255,255,.05); color: inherit; font: inherit; }
.chat-note { padding: 0 14px 12px; font-size: .74rem; line-height: 1.35; color: var(--gris, #a99fc4); }
.chat-note a { color: inherit; text-decoration: underline; }
@media (max-width: 700px) {
  /* Pastille ronde a droite, alignee avec le bouton fixe du bas ; le texte reste lu par les lecteurs d'ecran */
  .chat-open { right: 12px; bottom: 12px; width: 48px; height: 48px; padding: 0; justify-content: center; gap: 0; }
  .chat-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(78vh, 600px); }
}
html.cookie-open .chat-open { display: none; }
@media print { .chat-open, .chat-panel { display: none !important; } }
