.link-preview a {
  text-decoration: none;
  background-color: black;
}

.link-preview a:hover {
  text-decoration: underline;
}

.link-preview small {
  display: block;
  margin-top: 5px;
  color: #666;
  background-color: black;
}

html,
body {
  font-family: Arial, sans-serif;
  cursor: default;
}

.chat-box {
  max-height: 96vh;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-direction: column;
  border-radius: 20px;
  width: 100%;
  width: 900px;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 60px;
  padding-bottom: 60px;
  overflow: hidden;
}

h2 {
  color: black;
  margin-top: 0;
  font-size: 28px;
  text-align: center;
}

.msg-container {
  max-height: 50vh;
  min-height: 60vh;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  box-shadow: #005c00 0px 0px 10px 0px;
  border-radius: 12px;
  overflow-y: auto;
}


.message {
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 95%;
  word-wrap: break-word;
  font-size: 20px;
}

.sent {
  background: rgb(0, 173, 9);
  align-self: flex-end;
}

.received {
  background: rgb(0, 0, 0);
  align-self: flex-start;
  color: white;
}

form {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

textarea {
  width: 100%;
  font-size: 18px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: none;
  height: 60px;
  transition: all 0.3s ease;
}

textarea:focus {
  outline: none;
  text-transform: unset;
  border-color: rgb(0, 173, 9);
  -webkit-box-shadow: 0px 0px 40px 0px rgba(4, 74, 0, 1);
  -moz-box-shadow: 0px 0px 40px 0px rgba(4, 74, 0, 1);
  box-shadow: 0px 0px 40px 0px rgba(4, 74, 0, 1);
}

/*chat général*/
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f0f4f8;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#chat {
  width: 100%;
  max-width: 1000px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  margin-top: 10px;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

#messages {
  flex: 1;
  overflow-y: auto;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin: 0 6px 0 6px;
  font-size: 20px;
  scroll-behavior: smooth;
  color: #000;
}

.form-box {
  width: 100%;
  max-width: 950px;
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  font-size: 20px;
}

h2 {
  margin-top: 0;
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

input {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  font-size: 20px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

input,
textarea,
select {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ccc;
}

button {
  width: 100%;
  padding: 12px;
  background-color: rgb(0, 173, 9);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

button:hover {
  transition: all 0.3s ease;
  background-color: rgb(0, 228, 11);
}

p {
  margin-top: 10px;
}

li {
  list-style: none;
  margin: 10px 0;
}

a {
  color: rgb(255, 255, 255);
  margin: 1px;
  background-color: #005c00;
  border-radius: 10px;
  text-decoration: none;
}

a:hover {
  text-decoration: none
}

.error {
  color: red;
  text-align: center;
  margin-bottom: 10px;
}

.checkbox-list {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 10px;
  column-gap: 10px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 10px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.checkbox-list input[type="checkbox"] {
  transform: scale(1.2);
  margin: 0;
  accent-color: rgb(0, 173, 9);
}


.checkbox-list .username {
  font-size: 16px;
}

.action-button {
  margin: 5px;
  padding: 5px;
  background-color: rgb(0, 173, 9);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  transition: background 0.2s ease;
}

.action-button:hover {
  background-color: rgb(0, 228, 11);
}

@media (prefers-color-scheme: dark) {
  .action-button {
    color: #000000;
  }

  .checkbox-list {
    background: #2a2a2a;
    border-color: rgb(0, 173, 9);
  }

  .checkbox-list .username {
    color: #eee;
  }

  body {
    background: #121212;
    color: #eee;
  }

  .form-box,
  #chat {
    background: #1e1e1e;
    color: #eee;
  }

  input,
  textarea {
    background: #2a2a2a;
    color: #eee;
    border-color: #444;
  }

  #messages {
    border-color: #444;
    color: #eee;
    background: #000000;
  }

  .chat-box {
    background: #1e1e1e;
    color: #eee;
  }

  .msg-container {
    background: #181818;
  }

  .message.sent {
    background: #005c00;
    color: #eee;
  }

  .message.received {
    background: #2a2a2a;
    color: #eee;
  }

  h2 {
    color: white;
  }

  button {
    background-color: rgb(0, 173, 9);
    color: #000;
  }
}

::-webkit-scrollbar {
  width: 10px;
  /* Largeur de la barre de défilement */
  border-radius: 10px;
  background-color: #f0f4f8;
  /* Couleur de fond de la barre de défilement */
}

::-webkit-scrollbar-track {
  background-color: #f0f4f8;
  /* Couleur de fond de la piste de défilement */
  border-radius: 10px;
  /* Coins arrondis de la piste */
}

::-webkit-scrollbar-thumb {
  background-color: rgb(0, 173, 9);
  /* Couleur de la barre de défilement */
  border-radius: 10px;
  /* Coins arrondis de la barre de défilement */
}

::-webkit-scrollbar-corner {
  background-color: #f0f4f8;
  /* Couleur de fond du coin de la barre de défilement */
  border-radius: 10px;
  /* Coins arrondis du coin de la barre de défilement */
}

#delete-button {
  border: none;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
}

li {
  margin: 30px;
}

@media screen and (max-width: 1000px) {
  .chat-box {
    width: 100%;
    padding: 10px;
  }

  .msg-container {
    max-height: 50vh;
    min-height: 60vh;
    padding: 5px;
  }

  .message {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  textarea {
    font-size: 20px;
  }

  .action-button {
    margin: 5px;
    padding: 10px;
    font-size: 25px;
  }
  #messages {
    font-size: 20px;
  }
}

label {
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 10px;
}
.settings-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 26px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  padding: 7px;
  text-decoration: none;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 999;
  transition: transform 0.2s;
}
.settings-button:hover {
  transform: scale(1.1);
}

