#chat-icon {
    z-index: 999;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    padding: 0.4rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid transparent;
    transition: opacity .7s ease, transform .7s ease;
}
#chat-icon .position-relative {
  flex-shrink: 0;
}
#chat-icon img {
  width: 40px;
  height: 40px;
}
#chat-icon > span.ms-2 {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
}
#chat-icon .badge {
  margin-left: 0.5rem;
  font-size: 0.75rem;
}
#chat-icon {
  width: auto;
  height: auto;
}
#chat-input, #txt_message {
  padding-right:35px;
  width: stretch;
  border-radius: 20px;
  resize: none;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #acacac;
}
#chat-input:focus, #txt_message:focus {
  outline: none;
  box-shadow: none;
}
#chat-send-btn, #btn_envoyer_message {
    top: 45%;
    border: none;
}
#chat-send-btn i, #btn_envoyer_message i {
  font-size: 1.5rem;
  color: #385f91;
  transition: color .2s;
}
#chat-send-btn:disabled {
  color: grey;
}
#chat-send-btn:disabled i {
  color: grey;
}
#chat-send-btn:hover i, #btn_envoyer_message:hover i {
  color: #507cb3;
}
#chat-badge {
  padding-top: 3px !important;
  z-index: 1000;
  position: fixed;
  bottom: 3.6rem;
  right: 0.6rem;
  background-color: #f52828;
  color: #ffffff;
  font-size: 0.75rem;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1.1rem;
  border-radius: 50%;
  border: 1px solid #c3c3c3;
  display: none;
}

/* Popup chat */
#chat-popup {
    position: fixed;
    bottom: 3.5rem;
    right: 1rem;
    width: 350px;
    max-width: 90vw;
    display: block;
    z-index: 1050;

    /* Transition douce */
    transition: opacity .3s ease, transform .3s ease;
    transform: translateY(10px);
}
#chat-popup.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#chat-popup.close {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.msg-body ul {
  list-style: none;
  padding-left: 0 !important;
  margin: 0;
}

.msg-body ul li {
  margin-bottom: 2px;
  display: flex;
  width: 100%;
}

/* Alignements */
.msg-body ul li.sender { justify-content: flex-start; }
.msg-body ul li.reply  { justify-content: flex-end; }

/* Style commun des p */
.msg-body ul li p {
  max-width: 70%;
  padding: 8px 12px;
  line-height: 1.4;
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  cursor: default;
}

/* Couleurs */
.msg-body ul li.sender p { background: #f5f5f5; color: #000; }
.msg-body ul li.reply  p { background: #385f91; color: #fff; }

/* Bulle isolée */
.msg-body ul li.sender.single    p { border-radius: 16px; }

/* Premier d’un groupe */
.msg-body ul li.sender.first     p { border-radius: 16px 16px 16px 4px; }
/* Milieu de groupe */
.msg-body ul li.sender.middle    p { border-radius: 4px 16px 16px 4px; }
/* Dernier d’un groupe */
.msg-body ul li.sender.last      p { border-radius: 4px 16px 16px 16px; }

/* Bulle isolée */
.msg-body ul li.reply.single     p { border-radius: 16px; }

/* Premier d’un groupe */
.msg-body ul li.reply.first      p { border-radius: 16px 16px 4px 16px; }
/* Milieu de groupe */
.msg-body ul li.reply.middle     p { border-radius: 16px 4px 4px 16px; }
/* Dernier d’un groupe */
.msg-body ul li.reply.last       p { border-radius: 16px 4px 16px 16px; }

.msg-body ul li.single,
.msg-body ul li.first:last-child,
.msg-body ul li.sender.last,
.msg-body ul li.reply.last {
  margin-bottom: 8px !important;
}

#btn_admin_presence_status .btn {
  border: none;
}
#btn_admin_presence_status .btn.active {
  border: 2px solid #818181;
}

/* LIBRAIRIE */

.message-area {
  /* height: 100vh; */
  overflow: hidden;
  /* padding: 30px 0;
  background: #f5f5f5; */
}

.chat-area {
  position: relative;
  width: 100%;
  background-color: #fff;
  border-radius: 0.3rem;
  height: 80vh;
  overflow: hidden;
  min-height: calc(100% - 1rem);
}

.chat_list_interlocuteur {
  cursor:pointer;
}

.chatlist {
  outline: 0;
  height: 100%;
  overflow: hidden;
  width: 350px;
  float: left;
  /* padding: 15px; */
}

.chat-area .modal-content {
  border: none;
  border-radius: 0;
  outline: 0;
  height: 100%;
}

.chat-area .modal-dialog-scrollable {
  height: 100% !important;
}

.chatbox {
  width: auto;
  overflow: hidden;
  height: 100%;
  border-left: 1px solid #ccc;
}

.chatbox .modal-dialog,
.chatlist .modal-dialog {
  max-width: 100%;
  margin: 0;
}

.msg-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-area .form-control {
  display: block;
  width: 80%;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #222;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ccc;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0.25rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.chat-area .form-control:focus {
  outline: 0;
  box-shadow: inherit;
}

a.add img {
  height: 36px;
}

.chat-area .nav-tabs {
  border-bottom: 1px solid #dee2e6;
  align-items: center;
  justify-content: space-between;
  flex-wrap: inherit;
}

.chat-area .nav-tabs .nav-item {
  width: 100%;
}

.chat-area .nav-tabs .nav-link {
  width: 100%;
  color: #180660;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-transform: capitalize;
  margin-top: 5px;
  margin-bottom: -1px;
  background: 0 0;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.chat-area .nav-tabs .nav-item.show .nav-link,
.chat-area .nav-tabs .nav-link.active {
  color: #222;
  background-color: #fff;
  border-color: transparent transparent #000;
}

.chat-area .nav-tabs .nav-link:focus,
.chat-area .nav-tabs .nav-link:hover {
  border-color: transparent transparent #000;
  isolation: isolate;
}

.chat-list h3 {
  color: #222;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0;
}

.chat-list p {
  color: #343434;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0;
}

.chat-list a.d-flex {
  padding: 10px;
  position: relative;
  text-decoration: none;
}

.chat-list .active {
  display: block;
  content: '';
  clear: both;
  position: absolute;
  bottom: 3px;
  left: 34px;
  height: 12px;
  width: 12px;
  background: #00DB75;
  border-radius: 50%;
  border: 2px solid #fff;
}

.msg-head h3 {
  color: #222;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0;
}

.msg-head p {
  color: #343434;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: capitalize;
  margin-bottom: 0;
}

.msg-head {
  padding: 15px;
  border-bottom: 1px solid #ccc;
}

.divider {
  position: relative;
  z-index: 1;
  text-align: center;
}

.divider:after {
  display: block;
  content: '';
  clear: both;
  position: absolute;
  top: 11px;
  left: 0;
  border-top: 1px solid #EBEBEB;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.send-btns .button-wrapper {
  position: relative;
  width: 125px;
  height: auto;
  text-align: left;
  margin: 0 auto;
  display: block;
  background: #F6F7FA;
  border-radius: 3px;
  padding: 5px 15px;
  float: left;
  margin-right: 5px;
  margin-bottom: 5px;
  overflow: hidden;
}

.send-btns .button-wrapper span.label {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  cursor: pointer;
  color: #343945;
  font-weight: 400;
  text-transform: capitalize;
  font-size: 13px;
}

#upload {
  display: inline-block;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.send-btns .attach .form-control {
  display: inline-block;
  width: 120px;
  height: auto;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #343945;
  background-color: #F6F7FA;
  background-clip: padding-box;
  border: 1px solid #F6F7FA;
  border-radius: 3px;
  margin-bottom: 5px;
}

.send-btns .button-wrapper span.label img {
  margin-right: 5px;
}

.button-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  text-align: center;
  margin: 0 auto;
}

button:focus {
  outline: 0;
}

.add-apoint {
  display: inline-block;
  margin-left: 5px;
}

.add-apoint a {
  text-decoration: none;
  background: #F6F7FA;
  border-radius: 8px;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: #343945;
}

.add-apoint a svg {
  margin-right: 5px;
}

.chat-icon {
  display: none;
}

.closess i {
  display: none;
}

@media (max-width: 1000px) {
  .chat-icon {
      display: block;
      margin-right: 5px;
  }
  .chatlist {
      width: 100%;
  }
  .chatbox {
      width: 100%;
      position: absolute;
      left: 1000px;
      right: 0;
      background: #fff;
      transition: all 1s ease;
      border-left: none;
  }
  .showbox {
      left: 0 !important;
      transition: all 1s ease;
  }
  .msg-head h3 {
      font-size: 14px;
  }
  .msg-head p {
      font-size: 12px;
  }
  .msg-head .flex-shrink-0 img {
      height: 30px;
      width: 30px;
  }
  .chat-list h3 {
      font-size: 14px;
  }
  .chat-list p {
      font-size: 12px;
  }
  .msg-body ul li.sender p {
      font-size: 13px;
      padding: 8px;
      border-bottom-left-radius: 6px;
      border-top-right-radius: 6px;
      border-bottom-right-radius: 6px;
  }
  .msg-body ul li.reply p {
      font-size: 13px;
      padding: 8px;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
      border-bottom-left-radius: 6px;
  }
}