/* === GLOBAL STYLES === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  color: #495057;
}

/* === HEADER === */
.header {
  text-align: center;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.header h1 {
  margin: 0;
  color: #343a40;
  font-size: 2.5em;
}

.header p {
  margin: 10px 0 0 0;
  color: #6c757d;
  font-size: 1.1em;
}

/* === API INFO SECTION === */
.api-info {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.api-endpoints {
  margin-top: 15px;
}

.endpoint {
  margin-bottom: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.endpoint-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.endpoint-list div {
  padding: 8px 12px;
  background: #e9ecef;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 0.9em;
}

code {
  background: #495057;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', monospace;
}

/* === WORKFLOW SECTIONS === */
.workflows {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workflow-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.workflow-section h3 {
  margin-top: 0;
  color: #343a40;
  font-size: 1.5em;
  border-bottom: 3px solid #6c757d;
  padding-bottom: 10px;
}

.workflow-description {
  color: #6c757d;
  font-style: italic;
  margin-bottom: 20px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
}

/* === TEST EXAMPLES === */
.test-examples {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #6c757d;
}

.test-examples h4 {
  margin-top: 0;
  color: #343a40;
}

.example-urls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.example-urls button, .srt-example button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

.example-urls button:hover, .srt-example button:hover {
  background: #495057;
}

/* === FORMS === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 8px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ced4da;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #6c757d;
}

.form-group small {
  display: block;
  color: #6c757d;
  margin-top: 5px;
  font-size: 0.85em;
}

/* === BUTTONS === */
.btn-primary {
  background: #495057;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #343a40;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #495057;
  transform: translateY(-1px);
}

/* === QUICK TESTS === */
.quick-tests {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.quick-test-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-test {
  background: #868e96;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-test:hover {
  background: #6c757d;
}

/* === JOBS SECTION === */
.jobs-section {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.jobs-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-refresh {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.btn-clear {
  background: #868e96;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.auto-refresh {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6c757d;
}

/* === RESULTS === */
.result-section {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  min-height: 20px;
}

.result-section:empty::before {
  content: "Aucun résultat pour le moment...";
  color: #868e96;
  font-style: italic;
}

/* === TABLES === */
.jobs-list {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  background: white;
}

th, td {
  border: 1px solid #dee2e6;
  padding: 12px 8px;
  text-align: left;
}

th {
  background: #495057;
  color: white;
  font-weight: 600;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:nth-child(even) {
  background: #f8f9fa;
}

tr:hover {
  background: #e9ecef;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .header h1 {
    font-size: 2em;
  }

  .example-urls, .quick-test-buttons, .jobs-controls {
    flex-direction: column;
  }

  .form-group input, .form-group select {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* === STATUS INDICATORS === */
.translation-ready {
  border-left: 4px solid #6c757d;
  background: linear-gradient(to right, #f8f9fa 0%, white 20%);
}

#serverStatus {
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
}

/* === WORKFLOW TOGGLE === */
input[name="workflow"] {
  margin-right: 8px;
}

label {
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}
