:root {
  font-family: system-ui, "Verdana", "Avenir", "Helvetica", "Arial", sans-serif;
  line-height: 1.5;
  font-weight: 300;
  font-size: 16px;
  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html {
  font-size: 16px;
}
body {
  font-family: system-ui, "Verdana", "Avenir", "Helvetica", "Arial", sans-serif;
  margin: 0;
  padding: 0.01rem 15px 15px;
  background-color: #f4f4f4;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
h1 {
  color: #505050;
  font-size: 1.9rem;
  margin: 20px 0;
  text-align: center;
  font-weight: 300;
}
h2 {
  margin: 0;
  color: #505050;
  font-size: 1.25rem;
}
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: auto;
  text-align: left;
}
/* Section des boutons de contrôle */
.controls {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
}
.system-block {
  grid-column: span 2;
}
.input-block {
  display: flex;
  flex-direction: column;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
label {
  font-size: 1.2rem;
  font-weight: bold;
  color: #525252;
  margin-bottom: 0.25rem;
  display: inline-block;
}
.inline-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.inline-label>label {
  margin-bottom: unset;
}
/* Textarea */
textarea {
  font-size: 1.2rem;
  border: 1px solid #b5b5b5;
  border-radius: 6px;
  padding: 10px;
  resize: vertical;
  color: #303030;
  font-family: system-ui, "Verdana", "Avenir", "Helvetica", "Arial", sans-serif;
}
/* Boutons en ligne */
#uploadImage, #removeImage, .delete_jsonl {
  border: none;
  margin-left: 10px;
  font-size: 0.95rem;
  padding: 8px 15px;
}
/* Nom de l'image en ligne */
.image-name {
  font-size: 1rem;
  color: #525252;
  font-weight: bold;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
/* rendu de l'image */
img.thumbnail {
  width: 75px;
}
/* Bouton pour supprimer l'image */
.remove-image {
  background: orange;
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}
.remove-image:hover {
  background: darkorange;
}
/* Boutons */
button {
  font-size: 1.1rem;
  background: #1A73E8;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover {
  background: #1669C1;
}
div.name_json {
  text-align: center;
}
input#name_jsonl {
  max-width: 30vw;
  margin-bottom: 0 !important;
}
/* Bouton ENREGISTRER */
#save {
  grid-column: span 2;
  background: #33bc7a;
  width: 100%;
}
#save:hover {
  background: #2a9a62;
}
/* Bouton Télécharger JSONL */
#downloadJsonl {
  grid-column: span 2;
  width: 100%;
}
/* Zone de sortie JSONL */
.output {
  grid-column: span 2;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: scroll;
  resize: vertical;
  min-height: 150px;
  height: 35vh;
}
pre {
  font-family: monospace;
  color: #000;
}
/* Bouton de téléchargement JSONL */
.download-container {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
/* render jsonLine for human reading */
#render_view_messages {
  max-width: 1200px;
  margin: 50px auto 0;
  text-align: left;
}
#render_view_messages h2 {
  margin-bottom: 30px;
}
.one_message {
  position: relative;
  color: #525252;
  border-top: 2px solid #b2b2b2;
  padding: 15px 10px 5px;
}
.one_message:last-child {
  border-bottom: 2px solid #d4d4d4;
}
button.delete_jsonl {
  position: absolute;
  right: 0px;
  top: 5px;
  margin-left: inherit;
}
.one_message h3 {
  font-size: 1.18rem;
  font-weight: bold;
  font-style: italic;
  margin: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.one_message span.render_text {
  font-size: 1.2rem;
  font-weight: 400;
}
.one_message span.render_text:not(.block_img_text > span) {
  display: inline-block;
  margin-bottom: 10px;
}
.one_message .block_img_text {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
}
.empty_view_messages {
  color: #525252;
  margin: 0;
  font-size: 1.2rem;
}
.system {
  color: darkcyan;
}
.user {
  color: steelblue;
}
.assistant {
  color: #d09600;
}
/* Footer */
footer {
  margin: 50px auto 0;
  text-align: center;
  font-size: 1.1rem;
  border-radius: 8px;
  max-width: 1200px;
  padding: 20px 10px;
  background-color: #dfdfdf;
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  text-wrap-style: balance;
}
footer p, footer a {
  margin: 0;
  color: #505050;
}
a:hover {
  text-decoration: none;
}
a {
  text-underline-offset: 3px;
}
#pop_img {
  display: none;
  position: fixed;
  background: #353535;
  width: calc(100vw - 15px);
  height: 100%;
  top: 0;
  left: 0;
  padding: 20px 0px 0px;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
#pop_img h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 400;
}
#pop_img label {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  display: inline-block;
}
#pop_img input#img_url, input#name_jsonl {
  min-width: 30vw;
  width: 100%;
  padding: 8px;
  font-size: 1.25rem;
  border-radius: 4px;
  border: 1px solid #292929;
  color: #303030;
  margin-bottom: 10px;
}
#pop_img button {
  display: block;
  margin: 10px auto 0;
}
@media screen and (max-width: 900px) {
  .container {
    display: flex;
    flex-direction: column;
  }
  .controls {
    flex-direction: column;
    gap: 20px;
  }
  .inline-label:nth-child(2) {
    flex-direction: column;
    overflow-x: scroll;
  }
  .image-name {
    width: -webkit-fill-available;
  }
  .remove-image {
    align-self: center;
    margin-left: 0 !important;
  }
}
