/* SERUM Chat Widget styles */
.serum-chat-root { position: fixed; right: 18px; bottom: 18px; z-index: 99999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.serum-chat-fab {
  width: 54px; height: 54px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  background: linear-gradient(90deg, #bf6759, #f2dc7e, #6497c3, #64b09d, #a67cc0);
  color: #0b1220; font-size: 22px;
}
.serum-chat-panel {
  position: absolute; right: 0; bottom: 68px;
  width: min(420px, calc(100vw - 36px));
  height: min(600px, calc(100vh - 120px));
  display: none; flex-direction: column;
  background: #0b1220; color: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  border: 2px solid rgba(255,255,255,.10);
  overflow: hidden;
}
.serum-chat-header {
  padding: 12px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.serum-chat-title { line-height: 1.1; }
.serum-chat-sub { font-size: 12px; opacity: .8; margin-top: 3px; }
.serum-chat-close { background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; opacity: .9; }
.serum-chat-body { flex: 1; padding: 12px; overflow: hidden; }
.serum-chat-messages { height: 100%; overflow-y: auto; padding-right: 6px; }
.serum-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 8px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid rgba(255,255,255,.10);
}
.serum-chat-bubble.user { margin-left: auto; background: rgba(100,151,195,.18); }
.serum-chat-bubble.assistant { margin-right: auto; background: rgba(255,255,255,.06); white-space: normal; }

/* Links */
.serum-chat-bubble.assistant a { color: #f2dc7e; text-decoration: underline; word-break: break-word; }
.serum-chat-bubble.assistant a:hover { opacity: .95; }

/* Titles: white + bold */
.serum-md-title{ margin: 10px 0 6px 0; line-height: 1.2; font-weight: 900; color:#ffffff; }
.serum-md-h1{ font-size: 18px; }
.serum-md-h2{ font-size: 16px; }
.serum-md-h3{ font-size: 14px; }
.serum-title{ color:#ffffff; }

/* Paragraph wrapper */
.serum-md-p{ margin: 8px 0; }

/* SERUM word + letters (SERUM must stay bold) */
.serum-serum-word { white-space: nowrap; font-weight: 900; }
.serum-letter { font-weight: 900; }
.serum-s { color: #bf6759; }
.serum-e { color: #f2dc7e; }
.serum-r { color: #6497c3; }
.serum-u { color: #64b09d; }
.serum-m { color: #a67cc0; }

/* Colored SERUM keywords: no bold */
.serum-word { font-weight: normal; }
.serum-c-sens { color: #bf6759; }
.serum-c-explo { color: #f2dc7e; }
.serum-c-ress { color: #6497c3; }
.serum-c-unite { color: #64b09d; }
.serum-c-mode { color: #a67cc0; }

.serum-chat-footer {
  display: flex; gap: 8px; padding: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.serum-chat-input {
  flex: 1; resize: none;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: #fff;
  padding: 10px 10px;
  outline: none;
}
.serum-chat-send {
  width: 92px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  color: #0b1220;
  background: #f2dc7e;
  font-weight: 700;
}

/* Sources card */
.serum-chat-sources { margin: 10px 0 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); }
.serum-chat-sources-title { font-size: 13px; opacity: .95; margin-bottom: 6px; }
.serum-chat-sources-list { margin: 0; padding-left: 18px; }
.serum-chat-sources-list a { color: #f2dc7e; text-decoration: none; }
.serum-chat-sources-list a:hover { text-decoration: underline; }


/* Input highlighter (mirror) */
.serum-input-wrap{ position: relative; width: 100%; flex: 1; }
.serum-input-mirror{
  font: inherit;
  line-height: inherit;
  position:absolute; inset:0;
  padding: 10px 10px;
  border-radius: 12px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
  pointer-events: none;
  color: #ffffff;
}
.serum-chat-input{
  position: relative;
  background: transparent !important;
  color: transparent !important;
  caret-color: #ffffff;
  -webkit-text-fill-color: transparent;
}


.serum-chat-input::placeholder{ color: rgba(255,255,255,.75); -webkit-text-fill-color: rgba(255,255,255,.75); }


/* === INPUT BORDER FULL WIDTH FIX === */
.serum-chat-footer{
  display:flex;
  gap:12px;
  align-items:stretch;
}

.serum-input-wrap{
  position:relative;
  flex:1 1 auto;
  width:100%;
}

.serum-input-mirror,
.serum-input-wrap .serum-chat-input{
  width:100%;
  height:100%;
  box-sizing:border-box;
}

/* ensure border belongs to visible layer */
.serum-input-wrap .serum-chat-input{
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:transparent;
}


/* ===== SERUM: Bouton flottant (FAB) avec logo ===== */
/* Le bouton du widget est .serum-chat-fab (et parfois .serum-chat-toggle selon versions) */
.serum-chat-fab,
.serum-chat-toggle{
  background: #304052 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Masque le contenu texte/emoji du bouton */
.serum-chat-fab,
.serum-chat-toggle{
  font-size: 0 !important;
  color: transparent !important;
}

/* Logo centré */
.serum-chat-fab::after,
.serum-chat-toggle::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://myserum.fr/media/image/logos/logo-fleur-carre.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
  pointer-events: none;
}



/* ===== SERUM: liens (SERUM non coloré, non gras) ===== */
a .serum-serum-word,
a .serum-serum-word .serum-letter,
a .serum-serum-word .serum-letter.serum-s,
a .serum-serum-word .serum-letter.serum-e,
a .serum-serum-word .serum-letter.serum-r,
a .serum-serum-word .serum-letter.serum-u,
a .serum-serum-word .serum-letter.serum-m{
  color: inherit !important;
  font-weight: normal !important;
}

/* Masque entièrement le chat sur mobile, bouton flottant compris */
@media screen and (max-width: 768px) {
  .serum-chat-root {
    display: none !important;
  }
}
