body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  color: rgba(0, 56, 66, 0.979);
}

* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}

.wrapper {
  width: 100%;
  height: 100%;
}

.navbar {
  background: #fff;
  width: 100%;
  height: 80px;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .navbar_left .logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.navbar .navbar_left .logo div {
  display: flex;
  align-items: center;
}

.navbar .navbar_left .logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .navbar_left .logo h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
}

.navbar .navbar_right {
  display: flex;
}

.navbar .navbar_right img {
  width: 35px;
}

.navbar .navbar_right .icon_wrap {
  cursor: pointer;
}

.navbar .navbar_right {
  margin-right: 25px;
}

.navbar .navbar_right .icon_wrap {
  font-size: 28px;
}

.navbar .navbar_right .profile,
.navbar .navbar_right {
  position: relative;
}

.navbar .profile .profile_dd {
  position: absolute;
  top: 70px;
  right: -15px;
  user-select: none;
  background: #fff;
  border: 1px solid #c7d8e2;
  width: 350px;
  height: auto;
  display: none;
  border-radius: 3px;
  box-shadow: 10px 10px 35px rgba(0, 0, 0, 0.125),
    -10px -10px 35px rgba(0, 0, 0, 0.125);
  z-index: 1001;
}

.navbar .profile .profile_dd:before {
  content: "";
  position: absolute;
  top: -20px;
  right: 15px;
  border: 10px solid;
  border-color: transparent transparent #fff transparent;
}

.navbar .navbar_right .profile .icon_wrap {
  display: flex;
  align-items: center;
}

.navbar .navbar_right .profile .name {
  display: inline-block;
  margin: 0 10px;
}

.name,
.fas,
.material-icons {
  font-size: medium;
}

.navbar .navbar_right .icon_wrap:hover,
.navbar .navbar_right .profile.active .icon_wrap {
  color: #3b80f9;
}

.navbar .profile .profile_dd {
  width: 225px;
}

.navbar .profile .profile_dd:before {
  right: 10px;
}

.navbar .profile .profile_dd ul li {
  border-bottom: 1px solid #f1f2f4;
}

.navbar .profile .profile_dd ul li a {
  display: block;
  padding: 15px 35px;
  position: relative;
}

.navbar .profile .profile_dd ul li a .picon {
  display: inline-block;
  width: 30px;
}

.navbar .profile .profile_dd ul li a:hover {
  color: #3b80f9;
  background: #f0f5ff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.navbar .profile .profile_dd ul li.profile_li a:hover {
  background: transparent;
  cursor: default;
  color: #7f8db0;
}

.navbar .profile .profile_dd ul li .btn {
  height: 32px;
  padding: 7px 10px;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  background: #3b80f9;
  width: 125px;
  margin: 5px auto 15px;
}

.navbar .profile .profile_dd ul li .btn:hover {
  background: #6593e4;
}

.navbar .profile.active .profile_dd {
  display: block;
}

.header-content-right {
  margin-right: 60px;
  align-content: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  font-weight: bold;
}

.header-content-right-item {
  display: flex;
  align-items: center;
}

.header-content-right-item-title {
  font-weight: bold;
  font-size: 10px;
}

.header-content-right-item-label {
  margin-left: 4px;
  background-color: rgb(255, 255, 255);
  border-radius: 4px;
  /* padding: 4px; */
  font-weight: bold;
}

.card-section {
  display: flex;
  justify-content: flex-start;
  margin-top: 100px;
  height: 170px;
  width: calc(50% - 88px);
  margin-left: 80px;
}

.card-info {
  display: flex;
  flex-direction: column;
  padding: 8px;
  justify-content: space-between;
  height: 150px;
  width: 100%;
  background-color: #ccc;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 24px;
  padding-top: 5px;
  padding-left: 80px;
  padding-right: 80px;
}

.grid {
  transition: all 0.3s ease;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-header p {
  font-size: 12px;
  font-weight: bold;
}

.card-header span {
  background-color: #f0f0f0;
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
}

.iframe-container {
  width: 100%;
  height: 400px;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.menu {
  position: relative;
  display: inline-block;
}

.menu button {
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  padding: 4px;
  padding-left: 8px;
  padding-right: 8px;
  cursor: pointer;
}

.menu-content {
  display: none;
  position: absolute;
  background-color: #fff;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1;
  min-width: 70px;
  border-radius: 4px;
  padding: 8px;
}

.menu:hover .menu-content {
  display: block;
}

.menu-item {
  font-size: 12px;
  padding: 8px;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #f0f0f0;
}

.subtitle {
  font-size: 15px;
  font-weight: bold;
  color: black;
  display: flex;
  padding: 10px 80px;
  margin-top: 24px;
  justify-content: space-between;
  align-items: center;
}

.date-range {
  font-size: 13.5px;
  color: gray;
  margin-left: 10px;
}

.icon {
  margin-right: 8px;
}

.dashboard-selector {
  margin-left: 10px;
  padding: 5px;
  border-radius: 4px;
  font-size: 14px;
}

.testButton {
  background-color: cadetblue;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 5px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.testButton:hover {
  background-color: rgba(95, 158, 160, 0.85);
}

/* Table */
.card-table-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
}

.table_container {
  background-color: rgb(26, 26, 26);
  padding: 0px 20px;
}

.table_tunnel_bas,
.table_tunnel_haut {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: rgb(167, 174, 179);
  margin-bottom: 16px;
}

.thead_tunnel_bas th:nth-child(1),
.thead_tunnel_haut th:nth-child(1) {
  width: 25%;
}

.thead_tunnel_bas th:nth-child(2),
.thead_tunnel_haut th:nth-child(2) {
  width: 40%;
}

.thead_tunnel_bas th:nth-child(3),
.thead_tunnel_haut th:nth-child(3) {
  width: 35%;
}

.thead_tunnel_bas th,
.thead_tunnel_haut th {
  border: 1px solid white;
}

caption {
  margin-top: 4px;
  margin-bottom: 10px;
}

caption p {
  padding: 0px;
  margin: 4px 0px;
}

caption p:last-child {
  font-weight: bold;
}

.table_tunnel_bas th,
.table_tunnel_bas td,
.table_tunnel_haut th,
.table_tunnel_haut td {
  padding: 6px;
}

.tbody_tunnel_bas td,
.tbody_tunnel_haut td {
  text-align: center;
}

.tbody_tunnel_bas {
  border: none;
}

.iso {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tbody_tunnel_bas tr:last-child {
  border-top: 1px dotted white;
}

.tbody_tunnel_bas tr:first-child {
  border-bottom: 1px dotted white;
}

.thead_tunnel_bas th:nth-child(2),
.tbody_tunnel_bas td:nth-child(2),
.thead_tunnel_haut th:nth-child(2),
.tbody_tunnel_haut td:nth-child(2) {
  border-right: 1px dotted white;
}

.tbody_tunnel_haut tr {
  border-top: 1px dotted white;
}

.tbody_tunnel_haut tr:first-child>td {
  border-top: none;
}

.container_table {
  width: 100%;
  display: flex;
  justify-content: center;
}

.my_body {
  width: 100%;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.my_body h2 {
  margin-bottom: 25px;
  color: #2c3e50;
  font-size: 24px;
}

.container_table_circuits {
  width: 90%;
  max-width: 1400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table_circuits {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table_circuits th,
.table_circuits td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.table_circuits td {
  height: calc(3 * 1.5em);
  line-height: 1.2em;
}

.table_circuits th:nth-child(1),
.table_circuits td:nth-child(1) {
  width: 100px;
}

.table_circuits th {
  background-color: #f2f2f2;
}

.table_circuits tr:nth-child(even) {
  background-color: #f9f9f9;
}

.table_circuits tr:hover {
  background-color: #eaeaea;
}

.table_circuits a {
  text-decoration: none;
}

.material-icons {
  color: rgb(167, 174, 179);
  font-size: 1.2em;
  transition: color 0.3s ease;
}

.material-icons:hover {
  color: rgb(167, 174, 179);
}

.container_table_circuits {
  transition: all 0.3s ease;
}

@media (min-width: 1824px) {
  .container_table_circuits {
    height: 700px;
  }

  .table_circuits td {
    height: calc(3 * 1em);
    line-height: 1.2em;
  }
}

/* create circuit */
.create-circuit-container {
  margin-top: 24px;
  margin-left: auto;
  margin-right: auto;
  max-width: 400px;
}

.create-circuit-form-container {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.create-circuit-form-group {
  margin-bottom: 24px;
}

.create-circuit-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: rgba(0, 56, 66, 0.979);
  font-size: 14px;
}

.create-circuit-form-group input[type="text"],
.create-circuit-form-group select,
.create-circuit-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: rgba(0, 56, 66, 0.979);
  box-sizing: border-box;
  background-color: #fff;
}

.create-circuit-form-group input[type="text"]:focus,
.create-circuit-form-group select:focus,
.create-circuit-form-group textarea:focus {
  outline: none;
  border-color: cadetblue;
  box-shadow: 0 0 0 2px rgba(95, 158, 160, 0.1);
}

.create-circuit-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.create-circuit-form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

.create-circuit-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.create-circuit-form-actions .btn-primary {
  background-color: cadetblue;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.create-circuit-form-actions .btn-primary:hover {
  background-color: rgba(95, 158, 160, 0.85);
}

/* Responsive */
@media (max-width: 768px) {
  .create-circuit-container {
    padding: 0 20px;
    margin-top: 80px;
  }

  .create-circuit-form-container {
    padding: 20px;
  }
}

/* Chat */

.chat-section {
  margin-top: 100px;
  margin-left: 60px;
  margin-right: 60px;
}

.chat-section-history {
  margin-left: 80px;
  margin-right: 80px;
  margin-bottom: 24px;
}

.card-chat {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  height: 560px;
  /* Hauteur fixe pour le conteneur chat */
}

.card-chat .card-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.card-chat .card-header h3 {
  margin: 0;
  font-size: 16px;
  color: rgba(0, 56, 66, 0.979);
  font-weight: 600;
}

#chat_container {
  flex: 1;
  height: 250px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  background: #fafafa;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Personnalisation de la scrollbar */
#chat_container::-webkit-scrollbar {
  width: 8px;
}

#chat_container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#chat_container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#chat_container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.message {
  padding: 10px 12px;
  border-radius: 8px;
  background-color: white;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  line-height: 1.4;
  max-width: 85%;
  align-self: flex-start;
}

.message strong {
  color: rgba(0, 56, 66, 0.979);
  font-size: 13px;
  margin-right: 6px;
  display: block;
  margin-bottom: 4px;
}

.message time {
  font-size: 11px;
  color: #666;
  margin-left: 8px;
  font-style: italic;
}

#chat_form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#chat_form input,
#chat_form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: rgba(0, 56, 66, 0.979);
  box-sizing: border-box;
  background-color: #fff;
}

#chat_form input:focus,
#chat_form textarea:focus {
  outline: none;
  border-color: cadetblue;
  box-shadow: 0 0 0 2px rgba(95, 158, 160, 0.1);
}

#sender_name {
  flex: 0 0 auto;
}

#message_text {
  resize: vertical;
  min-height: 80px;
  max-height: 120px;
  line-height: 1.5;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.message-header>.sender-name {
  background-color: cadetblue;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.message-header>.message-time {
  font-size: 11px;
  color: #666;
  font-style: italic;
}

.message-content>.message-text {
  font-size: 14px;
}

#chat_form button {
  align-self: flex-end;
  padding: 10px 24px;
  background-color: cadetblue;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Roboto", sans-serif;
}

#chat_form button:hover {
  background-color: rgba(95, 158, 160, 0.85);
}

/* Style pour les messages vides */
#chat_container:empty::before {
  content: "Aucun message pour le moment. Soyez le premier à commenter !";
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Responsive pour le chat */
@media (max-width: 1024px) {
  .card-chat {
    grid-column: span 1;
    height: 450px;
  }

  #chat_container {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .card-chat {
    height: 500px;
  }

  .message {
    max-width: 95%;
  }
}

/* create model */

/* Masquage du formulaire au départ */
.hidden-form {
  display: none;
}

/* Quand le formulaire est visible */
.hidden-form.visible {
  display: block;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.create-model-selector {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.create-model-container {
  margin-top: 100px;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 0 20px;
}

.create-model-selector {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.create-model-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: rgba(0, 56, 66, 0.979);
  font-size: 14px;
}

.create-model-selector select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: rgba(0, 56, 66, 0.979);
  box-sizing: border-box;
  background-color: #fff;
  margin-bottom: 32px;
}

.create-model-selector select:focus {
  outline: none;
  border-color: cadetblue;
  box-shadow: 0 0 0 2px rgba(95, 158, 160, 0.1);
}

.create-model-description {
  width: 100%;
}

.create-model-selector input[type="text"],
.create-model-selector input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  color: rgba(0, 56, 66, 0.979);
  box-sizing: border-box;
  background-color: #fff;
  margin-bottom: 12px;
}

.create-model-selector input[type="text"]:focus,
.create-model-selector input[type="number"]:focus {
  outline: none;
  border-color: cadetblue;
  box-shadow: 0 0 0 2px rgba(95, 158, 160, 0.1);
}

.create-model-selector #description_input {
  margin-bottom: 24px;
}

/* Styles pour les fieldsets et sections dynamiques */
#model_form_container {
  margin-top: 24px;
}

#model_form_container h3 {
  margin: 24px 0 12px 0;
  font-size: 16px;
  color: rgba(0, 56, 66, 0.979);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

#model_form_container fieldset {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  background-color: #f9f9f9;
}

#model_form_container legend {
  font-weight: 600;
  color: rgba(0, 56, 66, 0.979);
  padding: 0 8px;
  font-size: 14px;
}

.fieldset-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.fieldset-content>div {
  flex: 1;
  min-width: 120px;
}

.fieldset-content label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.fieldset-content input[type="number"] {
  width: 100%;
}

/* Styles pour time_window - before/after sur la même ligne */
.time-window-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.time-window-item {
  flex: 1;
  min-width: 150px;
}

.time-window-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.time-window-item input[type="number"] {
  width: 100%;
}

/* Styles pour tunnel - lower/upper sur la même ligne */
.tunnel-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.tunnel-item {
  flex: 1;
  min-width: 150px;
}

.tunnel-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.tunnel-item input[type="number"] {
  width: 100%;
}

/* Style pour critical_threshold */
.critical-threshold-container {
  width: 100%;
  max-width: 300px;
}

.critical-threshold-container label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.critical-threshold-container input[type="number"] {
  width: 100%;
}

/* Style pour les sections simple */
#model_form_container>input[type="number"] {
  margin-bottom: 16px;
}

/* Style pour le bouton de soumission */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.form-actions .btn-primary {
  background-color: cadetblue;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.form-actions .btn-primary:hover {
  background-color: rgba(95, 158, 160, 0.85);
}

/* Responsive pour create model */
@media (max-width: 768px) {
  .create-model-container {
    padding: 0 15px;
    margin-top: 80px;
  }

  .create-model-selector {
    padding: 20px;
  }

  .fieldset-content {
    flex-direction: column;
    gap: 12px;
  }

  .time-window-container,
  .tunnel-container {
    flex-direction: column;
    gap: 12px;
  }

  .fieldset-content>div,
  .time-window-item,
  .tunnel-item {
    min-width: 100%;
  }

  #model_form_container fieldset {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .form-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .create-model-selector h3 {
    font-size: 15px;
  }

  .create-model-selector input[type="text"],
  .create-model-selector input[type="number"],
  .create-model-selector select {
    padding: 8px 10px;
    font-size: 13px;
  }
}