/* Bulle de discussion de mskconseil.com — couleurs du site (habillage-v3.css) :
   vert du cabinet, fond crème, texte presque noir. La police est celle de la page
   (Inter, servie par le site) : la bulle ne charge aucune police. */
.msk-chat {
  --msk-vert: #0F6E56;
  --msk-vert-f: #0B5743;
  --msk-nuit: #0D1E18;
  --msk-vert-clair: #E9F2ED;
  --msk-noir: #15211C;
  --msk-gris: #5E6E67;
  --msk-ligne: #E7E3D9;
  --msk-fond: #FAF8F2;
  --msk-creme: #F3EFE6;
  --msk-erreur: #8A2B2B;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45; /* sous le simulateur plein écran (50) et la vidéo de présentation (60) */
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: var(--msk-noir);
}
.msk-chat *, .msk-chat *::before, .msk-chat *::after { box-sizing: border-box; }
.msk-chat__embleme {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.msk-chat__embleme circle { fill: currentColor; stroke: none; }
.msk-chat__embleme--entete { width: 24px; height: 24px; }
.msk-chat__lanceur {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--msk-vert);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(13, 30, 24, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.msk-chat__lanceur:hover { background: var(--msk-vert-f); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(13, 30, 24, 0.3); }
.msk-chat__lanceur:focus-visible { outline: 3px solid #9FE1CB; outline-offset: 2px; }
.msk-chat__panneau {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(380px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  background: var(--msk-fond);
  border: 1px solid var(--msk-ligne);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(13, 30, 24, 0.22);
  overflow: hidden;
}
.msk-chat__panneau[hidden] { display: none; }
.msk-chat__entete {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--msk-nuit);
  color: #fff;
}
.msk-chat__titre { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.msk-chat__titre strong { font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: 0.01em; white-space: nowrap; }
.msk-chat__mention { font-size: 12px; color: #9FE1CB; white-space: nowrap; }
.msk-chat__nouveau, .msk-chat__fermer {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.msk-chat__nouveau:hover, .msk-chat__fermer:hover { background: rgba(255, 255, 255, 0.12); }
.msk-chat__fermer { font-size: 18px; line-height: 1; padding: 2px 9px; flex: none; }
.msk-chat__nouveau { flex: none; white-space: nowrap; font-size: 12px; padding: 4px 7px; }
/* « Nouveau » partout : le libellé long (« Nouvelle conversation ») ne tient pas
   à côté du titre ; il reste lu par les lecteurs d'écran (aria-label). */
.msk-chat__nouveau-long { display: none; }
.msk-chat__fil {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--msk-creme);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msk-chat__msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--msk-ligne); }
.msk-chat__msg p { margin: 0; overflow-wrap: anywhere; }
.msk-chat__msg p + p { margin-top: 8px; }
.msk-chat__msg a { color: var(--msk-vert); text-decoration: underline; }
.msk-chat__msg--visiteur { align-self: flex-end; background: var(--msk-vert-clair); border-color: #CFE3D9; }
.msk-chat__msg--assistant { align-self: flex-start; }
.msk-chat__msg--attente { color: var(--msk-gris); font-style: italic; }
.msk-chat__msg--note { color: var(--msk-gris); font-size: 13px; border-style: dashed; background: transparent; }
.msk-chat__msg--erreur { color: var(--msk-erreur); }
.msk-chat__msg a.msk-chat__lien {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--msk-vert);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.msk-chat__msg a.msk-chat__lien:hover { background: var(--msk-vert-f); }
.msk-chat__formulaire { display: flex; gap: 8px; padding: 10px 10px 6px; border-top: 1px solid var(--msk-ligne); background: #fff; }
.msk-chat__saisie {
  flex: 1;
  resize: none;
  border: 1px solid var(--msk-ligne);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  color: inherit;
  min-height: 40px;
  max-height: 120px;
  background: var(--msk-fond);
}
.msk-chat__saisie:focus { outline: 2px solid #9FE1CB; outline-offset: 1px; }
.msk-chat__envoyer {
  background: var(--msk-vert);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.msk-chat__envoyer:hover { background: var(--msk-vert-f); }
.msk-chat__envoyer:disabled, .msk-chat__saisie:disabled { opacity: 0.6; cursor: default; }
.msk-chat__pied { margin: 0; padding: 0 12px 9px; background: #fff; color: var(--msk-gris); font-size: 11.5px; line-height: 1.35; }
.msk-chat__pied a { color: var(--msk-gris); text-decoration: underline; }
.msk-chat__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Téléphone : la fenêtre prend tout l'écran, comme une application de messagerie
   (repris de la bulle MonBpFacile) ; la saisie est en 16 px pour éviter le zoom. */
@media (max-width: 480px) {
  .msk-chat { right: 12px; bottom: 12px; }
  .msk-chat__lanceur { padding: 11px 16px 11px 14px; }
  .msk-chat[data-state="open"] { z-index: 2147483000; }
  .msk-chat[data-state="open"] .msk-chat__lanceur { display: none; }
  .msk-chat__panneau {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .msk-chat__entete { padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .msk-chat__nouveau-long { display: none; }
  .msk-chat__nouveau-court { display: inline; }
  .msk-chat__fermer { font-size: 22px; padding: 2px 12px; }
  .msk-chat__fil { padding: 12px; }
  .msk-chat__msg { max-width: 92%; }
  .msk-chat__pied { padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px)); }
  .msk-chat__saisie { font-size: 16px; }
  body.msk-chat-ouverte { overflow: hidden; }
}
