body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
  padding: 30px;
  color: #333;
}

h2 {
  margin-top: 0;
  font-size: 28px;
}

button {
  padding: 10px 16px;
  margin: 5px 10px 5px 0;
  background-color: #0078d4;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

button:hover {
  background-color: #005fa3;
}

select {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 8px;
}

iframe {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: white;
}

.flex-container {
  display: flex;
  gap: 20px; /* spacing between the cards */
  align-items: flex-start; /* optional: align them at the top */
}

.card {
  flex: 1;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#status, #download-info {
  margin-top: 10px;
  font-style: italic;
  color: #555;
}


.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/*#output-file-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 20px;
}*/

.folder {
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.folder h4 {
  font-size: 18px;
  color: #333;
  margin: 0;
  padding: 5px;
  font-weight: bold;
}


.file-list {
  padding-left: 20px;
}

.file-item {
  display:flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 2rem;
  font-size: 14px;
  color: #666;
  margin: 5px 0;
  cursor: pointer;
  transition: color 0.3s ease;
}



.file-item button,
.folder button {
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 6px;  
  line-height: 1.2; 
}

/* Hover effect for file items */
.file-item:hover {
  color: #007bff;
}


textarea {
  max-height: 600px;
  overflow-y: auto;
  resize: none; /* optionnel : empêche l'utilisateur de le redimensionner manuellement */
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    /*display: inline-block;
    vertical-align: middle;
    margin-right: 10px;*/
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
  border: 5px solid #f3f3f3; /* Light grey */
  border-top: 5px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 17px;
  height: 17px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.remove_button {
  /* Base button styles */
  display: inline-flex; /* Use flexbox to center content */
  align-items: center;
  justify-content: center;
  width: 1.5em; /* Make it square for a typical close/remove button */
  height: 1.5em;
  padding: 0; /* No padding needed as content is just the cross */
  font-size: 1rem; /* Base font size for em units */
  line-height: 1; /* Ensure no extra line height affects centering */
  border-radius: 0.25rem; /* Bootstrap-like rounded corners */
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */

  /* Bootstrap danger colors */
  color: #fff; /* Text/icon color (for the cross) */
  background-color: #dc3545; /* Bootstrap danger red */
  border: 1px solid #dc3545; /* Matching border */

  /* Positioning context for the cross pseudo-elements */
  position: relative;
  overflow: hidden; /* Ensures the cross doesn't spill out if slightly misaligned */
}

/* Cross drawing using pseudo-elements */
.remove_button::before,
.remove_button::after {
  content: '';
  position: absolute;
  width: 60%; /* Width of the cross lines relative to button size */
  height: 2px; /* Thickness of the cross lines */
  background-color: #fff; /* White color for the cross */
  top: 50%;
  left: 50%;
  /* Center the element, then rotate for the first line */
  transform: translate(-50%, -50%) rotate(45deg);
}

.remove_button::after {
  /* Center the element, then rotate for the second line */
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Hover state */
.remove_button:hover {
  background-color: #c82333; /* Darker red on hover */
  border-color: #bd2130; /* Darker border on hover */
}

/* Focus state for accessibility */
.remove_button:focus {
  outline: 0; /* Remove default outline */
  /* Bootstrap-like focus ring */
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5);
}


/* Basic styling to mimic Bootstrap's form-select */
.form-select-like {
  display: block; /* Often used in Bootstrap forms */
  width: 100%; /* Often used in Bootstrap forms, adjust if needed */
  padding: 0.375rem 2.25rem 0.375rem 0.75rem; /* Top/bottom, Right (for arrow), Bottom, Left */
  font-family: inherit; /* Inherit font from body */
  font-size: 1rem; /* Base font size */
  font-weight: 400; /* Normal weight */
  line-height: 1.5; /* Standard line height */
  color: #212529; /* Dark text color */
  background-color: #fff; /* White background */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); /* Custom SVG arrow */
  background-repeat: no-repeat;
  background-position: right 0.75rem center; /* Position arrow on the right */
  background-size: 16px 12px; /* Size of the arrow */
  border: 1px solid #ced4da; /* Light gray border */
  border-radius: 0.25rem; /* Slightly rounded corners */
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; /* Smooth transition for focus */
  -webkit-appearance: none; /* Remove native arrow in Chrome/Safari */
  -moz-appearance: none; /* Remove native arrow in Firefox */
  appearance: none; /* Remove native arrow */
}

/* Focus state */
.form-select-like:focus {
  border-color: #86b7fe; /* Bootstrap blue focus border */
  outline: 0; /* Remove default outline */
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap blue focus shadow */
}

/* Disabled state */
.form-select-like:disabled {
  background-color: #e9ecef; /* Light gray background for disabled */
  cursor: not-allowed;
  /* You might also want to change border-color and color if needed */
}

/* Optional: Style for the options within the select */
/* Note: Styling options is very limited and inconsistent across browsers */
.form-select-like option {
  /* Basic styling, but complex styling is not reliable */
  padding: 0.375rem 0.75rem;
}


#markdown-preview {
    font-family: 'Segoe UI', sans-serif;
    margin: 2em;
    background-color: #f9f9f9;
    color: #333;
  }

  #markdown-preview h1, 
  #markdown-preview h2, 
  #markdown-preview h3 {
    color: #2c3e50;
  }

  #markdown-preview table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }

  #markdown-preview th, 
  #markdown-preview td {
    border: 1px solid #ddd;
    padding: 0.75em;
    text-align: left;
  }

  #markdown-preview th {
    background-color: #f0f0f0;
    font-weight: bold;
  }

  #markdown-preview tr:nth-child(even) {
    background-color: #fafafa;
  }

  #markdown-preview p {
    margin: 0.5em 0;
  }

  #markdown-preview strong {
    color: #000;
  }

  #markdown-preview hr {
    margin: 2em 0;
    border: none;
    border-top: 1px solid #ccc;
  }


.download_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75em;
  height: 1.75em;
  font-size: 1rem;
  line-height: 1;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #fff;
  background-color: #6c757d; /* Bootstrap secondary grey */
  border: 1px solid #6c757d;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.download_button:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.download_button:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
}


.download_all_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5em 1em;               /* More space around text */
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 0.25rem;
  cursor: pointer;
  color: #fff;
  background-color: #6c757d;       /* Bootstrap secondary grey */
  border: 1px solid #6c757d;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.download_all_button:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.download_all_button:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
}


#feedbackContainer {
  position: absolute;
  top: 30px;
  right: 30px;
  text-align: right;
  z-index: 1000; /* Keeps it above other elements */
}

#feedbackForm {
  max-width: 100%;
}