html {
  scroll-behavior: smooth;
}

@font-face {
  font-family: "Poppins";
  src: url("../font/Poppins-Regular.ttf") format("truetype");
}

* {
  font-family: "Poppins", sans-serif;
  color: #2f2921;
}

.hidden {
  display: none;
  list-style-type: none;
}

#offlineIcon {
  width: 20px;
}

#messageOffline {
  align-items: center;
}

body {
  background: #edebe7;
  padding-left: 15%;
  padding-right: 15%;
}

nav {
  background-color: #ffffff;
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step {
  display: none;
}

.step.active {
  display: block !important;
}

.btn-round {
  width: 30px;
  height: 30px;
  background-color: #ffffff;
  color: grey;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  margin: auto;
}

.logo-round {
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn-normal {
  color: black;
  border: none;
  border-radius: 24px;
  padding: 12px;
  text-decoration: none;
  /* font-weight: 600; */
  font-size: 14px;
}

.btn-normal:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.m-signature-pad--body canvas {
  position: relative;
  left: 0;
  top: 0;
  width: 100%;
  height: 300px;
}

#signature-pad {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
}

.navActiveLink {
  border-radius: 32px;
  background-color: #fe971c;
  color: white !important;
}

@media screen and (max-width: 992px) {
  .navActiveLink {
    padding: 6px;
  }
}

#tableInventory thead tr th {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

.carousel-item img {
  max-height: 200px;
  object-fit: cover;
  display: block;
}

@media (min-width: 1440px) {
  #main-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
  }

  #title-homepage {
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    padding: 10px;
  }

  #search-box {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border: 1px solid #faf8f4;
    border-radius: 999px;
    padding: 14px 18px;
    width: fit-content;
    font-family: sans-serif;
  }

  #search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    font-weight: 600;
  }

  #search-box svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  #sectionHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* width: 100%; */
    flex: 1;
    margin-top: 0 !important;
  }

  #button-save-cloud {
    background-color: #faf9f6;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
  }

  #sidebar {
    width: 150px;
    height: 511px;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 15%;
    flex: 0.3;
  }

  #sidebar-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0 auto 20px;
  }

  .sidebar-item {
    text-align: center;
    padding: 8px 16px 8px 16px;
    width: 120px;
    height: 73px;
    gap: 4px;
    /* background-color: #edebe7; */
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0px 0px 4px 0px #0000000D inset; */
    margin-top: 10px;
  }

  .sidebar-item:hover {
    text-align: center;
    padding: 8px 16px 8px 16px;
    width: 120px;
    height: 73px;
    gap: 4px;
    background-color: #edebe7 !important;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 4px 0px #0000000d inset;
    margin-top: 10px;
  }

  .sidebar-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .sidebar-item-title {
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
  }

  .hover-underline {
    content: "";
    position: absolute;
    bottom: -2px; /* Ajuste selon l’espacement souhaité */
    width: 40px;
    height: 3px;
    background-color: orange;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }

  .sidebar-item-content {
    position: relative;
  }

  .sidebar-item:hover .hover-underline {
    transform: scaleX(1);
  }

  #logout-button {
    margin-top: 20px;
    background-color: transparent;
    border: none;
  }

  #side-content {
    flex: 4.7;
    width: 100%;
    padding: 20px;
  }
}

@media (max-width: 1439px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }
  #main-container {
    width: 100%;
    margin-bottom: 100px;
  }

  #title-homepage {
    display: none;
  }

  #search-box {
    display: flex;
    align-items: center;
    background-color: #e5e1dc;
    border: 1px solid #faf8f4;
    border-radius: 999px;
    padding: 14px 18px;
    width: fit-content;
    font-family: sans-serif;
    flex: 3;
    margin: auto;
  }

  #search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    font-weight: 600;
  }

  #search-box svg {
    width: 18px;
    height: 18px;
    background-color: #faf8f4;
  }

  #sectionHeader {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
    margin-top: 30px;
  }

  #header-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
  }

  #button-save-cloud {
    background-color: #faf9f6;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 36px;
  }

  #header-logo-container {
    margin-bottom: 10px;
  }

  #header-logo {
    width: 52px;
    height: 48px;
    flex: 1;
  }

  #sidebar {
    height: 84px;
    width: 100%;
    background-color: #ffffff;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 40px 40px 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    bottom: 0;
    left: 0;
    right: 0;
    position: fixed;
    margin: auto;
    gap: 5px;
    z-index: 1000;
    box-shadow: 0px 4px 34px 0px #0000000d;
  }

  #sidebar-logo {
    display: none;
  }

  #sidebar-logo-container {
    display: none;
  }

  .sidebar-item {
    text-align: center;
    width: 72.25px;
    height: 58px;
    /* background-color: #edebe7; */
    border-radius: 24px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0px 0px 4px 0px #0000000D inset; */
  }

  .sidebar-item:hover {
    text-align: center;
    padding: 5px 0;
    width: 72.25px;
    height: 68px;
    background-color: #edebe7 !important;
    border-radius: 60px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 4px 0px #0000000d inset;
  }

  .sidebar-item.sidebar-item-active {
    text-align: center;
    padding: 5px 0;
    width: 72.25px;
    height: 68px;
    background-color: #edebe7 !important;
    border-radius: 60px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 4px 0px #0000000d inset;
  }

  .sidebar-item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .sidebar-item-title {
    margin-top: 8px;
    font-weight: 600;
    font-size: 10px;
  }

  .hover-underline {
    content: "";
    position: absolute;
    bottom: -15px;
    width: 30px;
    height: 3px;
    background-color: orange;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }

  .sidebar-item-content {
    position: relative;
  }

  .sidebar-item:hover .hover-underline {
    transform: scaleX(1);
  }
  .sidebar-item.sidebar-item-active .hover-underline {
    transform: scaleX(1);
  }

  #logout-button {
    display: none;
  }

  .modal.modal-slide-up .modal-dialog {
    transform: translateY(100px);
    transition: transform 0.6s ease-out;
  }

  .modal.modal-slide-up.show .modal-dialog {
    transform: translateY(0);
  }
}

#homepage-container {
  margin-top: 20px;
  margin-bottom: 100px;
}

#accordion-homepage {
  max-width: 100%;
  margin: auto;
  padding: 0;
  margin-bottom: 70px;
}

.accordion-homepage-header {
  padding: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.accordion-homepage-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  text-align: center;
}

.accordion-homepage-content.open {
  max-height: 500px; /* valeur suffisante pour contenu moyen */
}

.accordion-homepage-header i {
  transition: transform 0.3s ease;
}

.accordion-homepage-header i.rotate {
  transform: rotate(180deg);
}

.logo-accordion {
  margin-right: 8px;
  font-size: 20px;
}

.text-homepage-accordion {
  font-size: 14px;
  font-weight: 600;
}

.card-homepage-accordion {
  border: 1px solid #ddd;
  border-radius: 12px;
  height: 56px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 4px;
  gap: 8px;
  margin-top: 5px;
  background-color: #faf8f4;
}

.card-homepage-accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-homepage-accordion-action {
  width: 56px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #f5b041;
}

.card-homepage-accordion-icon {
  width: 66px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #edebe7;
  color: white;
}

.card-homepage-accordion-text {
  display: flex;
  flex-direction: column;
}

.card-homepage-accordion-category {
  font-weight: 500;
  font-style: medium;
  font-size: 16px;
  color: #2f2921;
  text-align: start;
}

.card-homepage-accordion-subcategory {
  font-weight: 600;
  font-size: 18px;
  text-align: start;
}

#property-list-container {
  margin-top: 40px;
  margin-bottom: 100px;
}

.btn-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #faf8f4;
  color: #2f2921;
  border: none;
  cursor: pointer;
}

.input-style {
  border-radius: 12px;
  border: 1px solid #2f292180;
  background-color: white;
  width: 100%;
  height: 48px;
  padding: 12px;
}

.input-style:hover {
  border: 1px solid #2f2921;
}

.form-check-input:checked {
  background-color: #f5b041;
  border-color: #f5b041;
}

#tableReference th,
#tableReference td {
  background-color: #edebe7 !important;
}

#tableReference th:first-child {
  border-top-left-radius: 8px;
}

#tableReference th:last-child {
  border-top-right-radius: 8px;
}

#tableReference tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

#tableReference tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.file-upload {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 250px;
  padding: 20px;
  background-color: #f5f3f0;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-family: sans-serif;
  color: #2b2b2b;
  border: 1px solid #2f292180;
}

.file-upload:hover {
  background-color: #eceae7;
}

.file-upload input[type="file"] {
  display: none;
  /* on cache l'input */
}

.file-upload .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload .icon img {
  width: 20px;
  height: 20px;
}

.modalIframe {
  bottom: 0;
  position: fixed;
  margin: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 24px 24px 0 0;
  height: 80%;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 24px 24px 0 0;
}

#chatButton {
  bottom: 10%;
  z-index: 1000;
}

#messages {
  height: 300px;
  overflow-y: auto;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 10px;
}

.message-wrapper {
  display: flex;
  align-items: flex-start;
  margin: 5px 0;
}

.message {
  padding: 8px 12px;
  border-radius: 15px;
  max-width: 75%;
  word-wrap: break-word;
}

.bot .message {
  background-color: #ffe6b3;
  color: #333;
}

.user .message {
  background-color: #0d6efd;
  color: white;
  margin-left: auto;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 6px;
}

.bot .avatar {
  background: #ff9900;
  color: white;
}

.user .avatar {
  background: #0d6efd;
  color: white;
  margin-left: 6px;
  margin-right: 0;
}

.btn-feedback {
  flex: 1;
  font-size: 12px;
  padding: 4px;
  margin-right: 2px;
}

#header-title {
  font-size: 28px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.modalIframe {
  width: 100%;
}

@media screen and (min-width: 992px) {
  .modalIframe div {
    width: 50%;
    margin: auto;
  }
}
