/* Assistante Majorelle — fenêtre de clavardage du salon (styles du site).
   Thème du salon : crème, bleu profond, doré. Aucune ressource externe. */

.mjw-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid #efb623;
  background: linear-gradient(160deg, #0c2d6a, #081d47);
  color: #f6efdd; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(8, 29, 71, .35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.mjw-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(8, 29, 71, .42); }
.mjw-toggle svg { width: 27px; height: 27px; }
.mjw-toggle .mjw-ico-close { display: none; }
.mjw-toggle.mjw-open .mjw-ico-chat { display: none; }
.mjw-toggle.mjw-open .mjw-ico-close { display: block; }

.mjw-window {
  position: fixed; right: 20px; bottom: 90px; z-index: 9991;
  width: min(384px, calc(100vw - 24px));
  height: min(568px, var(--mjw-vh, calc(100dvh - 118px)));
  max-height: calc(100dvh - 110px);
  background: #fbf7ed;
  border: 1px solid rgba(12, 45, 106, .16);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(8, 29, 71, .35);
  display: none; flex-direction: column; overflow: hidden;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.mjw-window.mjw-open { display: flex; }

.mjw-header {
  background: linear-gradient(160deg, #0c2d6a, #081d47);
  color: #f6efdd; padding: 13px 16px;
  display: flex; align-items: center; gap: 11px; flex: none;
}
.mjw-logo {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid #efb623; background: #fbf7ed;
}
.mjw-headings { flex: 1; min-width: 0; }
.mjw-title {
  font-family: "Playfair Display", Georgia, serif; font-weight: 600;
  font-size: 1.12rem; line-height: 1.15; display: flex; align-items: center; gap: 8px;
}
.mjw-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; flex: none;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); animation: mjw-pulse 2.2s ease-out infinite;
}
@keyframes mjw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); }
  70% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
.mjw-subtitle { font-size: .76rem; color: #d9e2f2; margin-top: 1px; }
.mjw-close {
  background: transparent; border: 0; color: #f6efdd; cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 6px; flex: none; opacity: .9;
}
.mjw-close:hover { opacity: 1; }

.mjw-messages {
  flex: 1; overflow-y: auto; padding: 14px 13px 8px;
  display: flex; flex-direction: column; gap: 9px;
  -webkit-overflow-scrolling: touch;
}
.mjw-msg {
  max-width: 86%; padding: 10px 13px; border-radius: 16px;
  font-size: .92rem; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere;
}
.mjw-msg a { color: #0c2d6a; font-weight: 700; text-decoration: underline; }
.mjw-msg-bot {
  align-self: flex-start; background: #ffffff; color: #1c2733;
  border: 1px solid rgba(12, 45, 106, .12); border-bottom-left-radius: 5px;
}
.mjw-msg-user {
  align-self: flex-end; background: #0c2d6a; color: #f6efdd;
  border-bottom-right-radius: 5px;
}
.mjw-msg-user a { color: #f6cd6b; }

.mjw-options { display: flex; flex-direction: column; gap: 7px; align-self: stretch; padding: 1px 2px 3px; }
.mjw-option {
  appearance: none; text-align: left; cursor: pointer;
  background: #ffffff; color: #0c2d6a;
  border: 1.5px solid rgba(12, 45, 106, .35); border-radius: 999px;
  padding: 10px 16px; font: inherit; font-size: .92rem; font-weight: 600;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mjw-option:hover, .mjw-option:focus-visible { background: #0c2d6a; color: #f6efdd; border-color: #0c2d6a; outline: none; }
.mjw-options.mjw-done .mjw-option { opacity: .45; pointer-events: none; }
.mjw-options.mjw-done .mjw-option.mjw-chosen { opacity: 1; background: #0c2d6a; color: #f6efdd; }

.mjw-typing { display: inline-flex; gap: 5px; align-items: center; padding: 13px 15px; }
.mjw-typing i {
  width: 7px; height: 7px; border-radius: 50%; background: #93a7cc; display: block;
  animation: mjw-bounce 1.2s ease-in-out infinite;
}
.mjw-typing i:nth-child(2) { animation-delay: .15s; }
.mjw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mjw-bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.mjw-inputbar {
  flex: none; display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 11px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fbf7ed; border-top: 1px solid rgba(12, 45, 106, .12);
}
.mjw-input {
  flex: 1; resize: none; max-height: 96px; min-height: 42px;
  border: 1px solid rgba(12, 45, 106, .25); border-radius: 14px;
  padding: 10px 12px; font: inherit; font-size: .92rem; color: #1c2733;
  background: #ffffff; outline: none;
}
.mjw-input:focus { border-color: #0c2d6a; }
.mjw-send {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 0; cursor: pointer; background: #efb623; color: #231a02;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.mjw-send:hover { transform: translateY(-1px); }
.mjw-send svg { width: 19px; height: 19px; }
.mjw-send:disabled { opacity: .5; cursor: default; transform: none; }

@media (max-width: 560px) {
  .mjw-window { right: 12px; bottom: 86px; }
  .mjw-toggle { right: 14px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mjw-dot, .mjw-typing i { animation: none; }
}
