:root {
  --color-noir: #1d2327;
  --color-blanc: #ffffff;
  --color-gris: #e3e3e3;
  --color-gris-2: #b3b3b3;
  /* --info-fonce: #277dc4; */
  /* --info-clair: #31a0fa; */
  /* --success-fonce: rgb(61, 153, 123); */
  /* --success-clair: rgb(70, 172, 138); */
  --warn-fonce: #f9631e;
  --warn-clair: #fc7130;
  --error-fonce: #d53434;
  --error-clair: #fa3d3d;
}

/** Afficher les selections avec une couleur */
::selection {
  background-color: var(--info-fonce);
  color: var(--color-blanc);
}

.plugins-ocade-chatbot {
  position: fixed;
  z-index: 999999;
  display: flex;
  width: 3rem;
  height: 3rem;
  bottom: 5.5rem;
  right: 2.2rem;
  background-size: 100% 100%;
  background-position: center;
  background-position: cover;
}

@media (max-width: 600px) {
  .plugins-ocade-chatbot {
    display: none;
    position: unset;
  }

  .wp-block-ocade-blocks-footer-menu .plugins-ocade-chatbot {
    display: flex;
  }
}

.plugins-ocade-chatbot.open {
  position: fixed;
}

.plugins-ocade-chatbot.open .avatar-principal {
  display: none;
}


.plugins-ocade-chatbot .avatar-principal {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 3rem;
  height: 3rem;
  border: 4px inset gray;
  border-radius: 100%;
  cursor: pointer;
}

.plugins-ocade-chatbot .avatar-principal:hover {
  border: 4px outset var(--info-fonce);
}
.plugins-ocade-chatbot .avatar-principal:hover::before {
  background-color: var(--info-fonce);
}

.plugins-ocade-chatbot .avatar-principal::before {
  --size: 1.4rem;
  content: "";
  width: var(--size);
  height: var(--size);
  mask-image: var(--background-image);
  mask-size: var(--size);
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: gray;
}

.plugins-ocade-chatbot:not(.open) .close,
.plugins-ocade-chatbot:not(.open) .agrandir,
.plugins-ocade-chatbot:not(.open) .reduire,
.plugins-ocade-chatbot:not(.open) h1,
.plugins-ocade-chatbot:not(.open) .wrapper-messages,
.plugins-ocade-chatbot:not(.open) .no-is-begin,
.plugins-ocade-chatbot:not(.open) .ombre,
.plugins-ocade-chatbot:not(.open) .wrapper-footer {
  display: none;
}

.plugins-ocade-chatbot img.avatar-principal:hover {
  border: 4px outset var(--info-fonce);
}

/** OPEN **/
.plugins-ocade-chatbot.open {
  z-index: 99999999;
  flex-direction: column;
  width: min(500px, 100%);
  height: 90vh;
  padding: 1rem;
  background-color: white;
  background-image: var(--background-image-fond-url);
  background-size: 290px;
  background-repeat: repeat;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.plugins-ocade-chatbot.open {
  @media (max-width: 600px) {
    left: 2.5vw;
    width: min(500px, 95vw);
    height: 550px;
    overflow: auto;
  }
}

.plugins-ocade-chatbot.open.full-screen {
  @media (max-width: 600px) {
    left: 0;
  }
}

/* .plugins-ocade-chatbot.open::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 4rem;
  left: 0;
  right: 0;
  display: flex;
  width: 100%;
  height: 2.5rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.8) 10%,
    rgba(255, 255, 255, 0.6) 20%,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(255, 255, 255, 0) 50%
  );
} */

.plugins-ocade-chatbot.open.full-screen {
  width: 100vw;
  height: 100vh;
  bottom: 0;
  right: 0;
  border: 4px solid var(--color-noir);
  border-radius: 0;
}

.plugins-ocade-chatbot.open .ombre {
  position: absolute;
}

.plugins-ocade-chatbot.open .ombre::before {
  content: "";
  position: absolute;
  inset: 0;
}

.plugins-ocade-chatbot.open .ombre.no-is-begin {
  position: absolute;
  z-index: 99999999;
  top: 4rem;
  bottom: 4rem;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-bottom: 2rem;
  background: rgba(33, 33, 33, 0.85);
}

.plugins-ocade-chatbot.open .ombre.no-is-begin .questions-frequentes {
  z-index: 1;
  min-width: min(450px, 90%);
  max-width: 90%;
  width: max-content;
  padding: 0;
  padding-left: 0.5rem;
  margin: 0 auto;
  color: white;
  cursor: pointer;
}

.plugins-ocade-chatbot.open .ombre.no-is-begin button {
  min-width: min(450px, 90%);
  max-width: 90%;
  width: max-content;
  padding: 1rem;
  margin: 0 auto;
  cursor: pointer;
  z-index: 1;
}

.plugins-ocade-chatbot.open .ombre.no-is-begin button.close-propositions {
  margin-top: 2rem;
  font-weight: 500;
}

.plugins-ocade-chatbot.open .ombre.no-is-begin button.close-propositions:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.plugins-ocade-chatbot.open .close,
.plugins-ocade-chatbot.open .agrandir,
.plugins-ocade-chatbot.open .reduire {
  position: relative;
  margin-left: auto;
}

.plugins-ocade-chatbot.open .wrapper-icones {
  position: absolute;
  right: 1rem;
  z-index: 11;
  display: flex;
  align-items: center;
  column-gap: 0.3rem;
  margin-left: auto;
}

.plugins-ocade-chatbot.open .wrapper-icones .message-text-copied {
  max-height: 2rem;
  padding: 0.5rem;
  opacity: 1;
  cursor: default;
}

.plugins-ocade-chatbot.open .wrapper-icones .message-text-copied:hover {
  background-color: var(--success-fonce) !important;
  border-left-color: transparent !important;
  opacity: 1;
}
.plugins-ocade-chatbot.open .wrapper-icones .message-text-copied:focus {
  outline: none;
}

.plugins-ocade-chatbot.open .close span,
.plugins-ocade-chatbot.open .agrandir span,
.plugins-ocade-chatbot.open .reduire span {
  background: white !important;
}

/** OPEN - IMAGE **/
.plugins-ocade-chatbot.open img.avatar-principal {
  display: none;
}

/** OPEN H1 **/
.plugins-ocade-chatbot.open h1 {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: white;
  background-color: rgba(33, 38, 45, 1);
  font-size: 1rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  min-height: 4rem;
}

.plugins-ocade-chatbot.open h1 {
  @media (max-width: 600px) {
    font-size: .9rem;
  }
}

.plugins-ocade-chatbot.open h1::before {
  content: "";
  width: 2.4rem;
  height: 2.4rem;
  margin-right: 0.5rem;
  background-color: var(--color-blanc);
  mask-image: var(--background-image);
  mask-repeat: no-repeat;
  mask-size: 100%;
  mask-position: center;
  transform: scaleX(-1);
  margin-right: 0.75rem;
}

/** OPEN MESSAGES **/
.plugins-ocade-chatbot.open .wrapper-messages {
  position: relative;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  padding: 3rem 1rem;
  overflow-y: auto;
}

.plugins-ocade-chatbot.open .wrapper-messages {
  @media (max-width: 600px) {
    height: 100%;
  }
}

.plugins-ocade-chatbot.open .wrapper-messages .message {
  display: flex;
}

.plugins-ocade-chatbot.open .wrapper-messages .message span.icon {
  display: inline-flex;
  column-gap: 0.5rem;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  margin-top: 0.5rem;
  mask-image: var(--background-image);
  mask-repeat: no-repeat;
  mask-size: 2.5rem;
  mask-position: center;
  background-color: black;
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-system .icon {
  margin-left: auto;
  background-color: var(--success-fonce);
  transform: scaleX(-1) translateX(-17px) translateY(-25px);
  z-index: 3;
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-system .copy {
  position: absolute;
  right: 1rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-user {
  position: relative;
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-user .icon {
  background-color: var(--info-fonce);
  transform: translateX(-18px) translateY(-23px);
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-user .copy {
  position: absolute;
  left: 1rem;
  top: 1.3rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .message.message-user .nom {
  margin-right: 0;
  margin-left: auto;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message.message-system
  .wrapper-message {
  align-items: flex-start;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 90%;
  min-width: 14rem;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 10px;
  background-color: rgba(33, 38, 45, 1);
  color: white;
  line-height: 1.5rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message .nom {
  width: max-content;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px dotted;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message
  .wrapper-message
  p::first-letter,
.plugins-ocade-chatbot.open
  .wrapper-messages
  .message
  .wrapper-message
  span::first-letter {
  text-transform: uppercase;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message * {
  font-size: 14px;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message p {
  margin: 0;
  margin-bottom: 1rem;
  color: white;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message.message-system
  .wrapper-message
  p {
  color: #fafafa;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message {
  padding: 0.75rem 1.5rem 1.5rem 1.5rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message p {
  margin: 0.5rem auto 0.5rem 0;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message ul,
.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message ol {
  padding-left: 1.5rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message ul li,
.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message ol li {
  margin-top: 0.5rem;
  color: white;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message
  .wrapper-message
  li::marker {
  color: #e7e7e7;
}

.plugins-ocade-chatbot.open .wrapper-messages .message .wrapper-message span {
  color: var(--color-gris);
}

.plugins-ocade-chatbot.open .wrapper-messages .scroll-to-bottom {
  position: fixed;
  right: 3rem;
  bottom: 6rem;
}

.plugins-ocade-chatbot.open .wrapper-messages .scroll-to-bottom span {
  mask-size: 0.9rem;
}

/** OPEN FOOTER */
.plugins-ocade-chatbot.open .wrapper-footer {
  position: absolute;
  z-index: 999999999;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  column-gap: 0.1rem;
  height: 4rem;
  padding: 0.5rem 0.5rem 0.5rem 0.3rem;
  background-color: var(--color-blanc);
  border-top: 2px solid #d9d9d9;
  box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 25px;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group {
  position: relative;
  width: 100%;
  max-width: initial;
  margin: 0;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group span {
  display: none;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group.input-message::before {
  content: var(--content);
  position: absolute;
  top: -10px;
  right: 0.5rem;
  font-size: 0.6rem;
  font-style: italic;
  font-weight: 500;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group.input-message::after {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 0.5rem;
  background-color: black;
  mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI3IiBoZWlnaHQ9IjcuMDAxIj48cGF0aCBkPSJNLjcxMyA2LjcwNCAyLjU0OCA1LjAzYy44NjIuODI2IDIuMTQuOTI2IDMuMTA4LjI0NiAxLjE2OS0uODIyIDEuNDg4LTIuNDk2LjcxMi0zLjczNUM1LjU5My4zIDQuMDE3LS4wNCAyLjg0Ny43ODNjLTEuMTcuODIzLTEuNDg5IDIuNDk3LS43MTMgMy43MzZMLjMgNi4xOTJhLjM1NC4zNTQgMCAwIDAtLjAzMy40MzhjLjEwNC4xNDkuMzAyLjE4My40NDUuMDc0em0xLjY0LTMuODI3Yy4wNzgtMS4xMTMuOTkyLTEuOTUgMi4wNDItMS44NjYgMS4wNDguMDg0IDEuODM2IDEuMDU0IDEuNzU4IDIuMTY5LS4wNzkgMS4xMTQtLjk5NCAxLjk0OC0yLjA0MyAxLjg2NUMzLjA2IDQuOTYgMi4yNzQgMy45OSAyLjM1MiAyLjg3N1oiIHN0eWxlPSJzdHJva2Utd2lkdGg6Ljk5OTk5MyIvPjx0ZXh0IHk9IjI1IiBmb250LWZhbWlseT0iJ0hlbHZldGljYSBOZXVlJywgSGVsdmV0aWNhLCBBcmlhbC1Vbmljb2RlLCBBcmlhbCwgU2Fucy1zZXJpZiIgZm9udC1zaXplPSI1IiBmb250LXdlaWdodD0iYm9sZCI+Q3JlYXRlZCBieSB2ZXJyeSBwb2Vybm9tbzwvdGV4dD48dGV4dCB5PSIzMCIgZm9udC1mYW1pbHk9IidIZWx2ZXRpY2EgTmV1ZScsIEhlbHZldGljYSwgQXJpYWwtVW5pY29kZSwgQXJpYWwsIFNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iNSIgZm9udC13ZWlnaHQ9ImJvbGQiPmZyb20gdGhlIE5vdW4gUHJvamVjdDwvdGV4dD48L3N2Zz4=');
  mask-size: 1.5rem;
  mask-repeat: no-repeat;
  mask-position: center;
  width: 1.5rem;
  height: 1.5rem;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group textarea {
  width: calc(100% - 1rem);
  height: 2.6rem;
  margin: 0.5rem .5rem 0 .5rem;
  padding: 0 0 0 2.5rem;
  font-style: italic !important;
}

.plugins-ocade-chatbot.open .wrapper-footer .form-group textarea::placeholder {
  opacity: 0.5 !important;
}

.plugins-ocade-chatbot.open .wrapper-footer button {
  min-width: 90px;
  padding-left: 0;
  padding-right: 4px;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message.message-system
  .wrapper-message
  .reponse {
  position: relative;
  left: 50%;
  padding-bottom: 0.5rem;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message.message-system
  .wrapper-message
  .reponse::before {
  position: absolute;
  left: 50%;
  width: 2.4rem;
  content: "."; /* Trois points pour l'animation */
  opacity: 0.6;
  color: rgb(0, 0, 0);
  font-size: 2.7rem; /* Taille identique au conteneur */
  transform: translate3d(-50%, -50%, 0);
  animation: loadingDots 2s infinite;
}

.plugins-ocade-chatbot.open
  .wrapper-messages
  .message.message-system
  .wrapper-message
  .reponse::before {
  color: white;
}

@keyframes loadingDots {
  0%,
  20% {
    content: ".";
    opacity: 0.7;
  } /* Un point */
  40% {
    content: "..";
    opacity: 0.8;
  } /* Deux points */
  60% {
    content: "...";
    opacity: 0.9;
  } /* Trois points */
  80%,
  100% {
    content: "";
    opacity: 1;
  } /* Retour à zéro point */
}
