* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background: #F0F0F0;
  color: #1A1A1A;
  min-height: 100vh;
}

/* HEADER */
header {
  background: #1A1A1A;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo-title { display: flex; align-items: center; gap: 12px; }
.app-name { font-size: 16px; font-weight: bold; }
.app-sub  { font-size: 11px; color: #999; }

.status-idle    { background: #444; color: #ccc; padding: 5px 12px; border-radius: 20px; font-size: 12px; }
.status-loading { background: #604000; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 12px; }
.status-ok      { background: #2A5000; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 12px; }
.status-error   { background: #4A0000; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 12px; }

/* MAIN */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* CARDS */
.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card h2 {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #1A1A1A;
}
.hint {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
}
.opt { font-size: 11px; font-weight: normal; color: #888; }

/* DROPZONE */
.dropzone {
  border: 2px dashed #CCC;
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFAFA;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: #1A1A1A;
  background: #F5F5F5;
}
.drop-icon { font-size: 32px; margin-bottom: 8px; }
.drop-text { font-size: 14px; font-weight: bold; color: #333; }
.drop-sub  { font-size: 11px; color: #999; margin-top: 4px; }

/* FILE LIST */
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8F8F8;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
}
.file-item-icon { font-size: 16px; flex-shrink: 0; }
.file-item-name { flex: 1; font-weight: bold; color: #1A1A1A; word-break: break-all; }
.file-item-size { color: #888; flex-shrink: 0; }
.file-item-del {
  background: none; border: none; cursor: pointer;
  color: #999; font-size: 16px; padding: 0 4px;
}
.file-item-del:hover { color: #333; }

/* PARAMS */
.param-section-title {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  background: #1A1A1A;
  padding: 5px 10px;
  border-radius: 4px;
  margin: 16px 0 8px;
  display: inline-block;
}
.params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.param-group { display: flex; flex-direction: column; gap: 4px; }
.param-group.full { grid-column: 1 / -1; }
.param-group label { font-size: 11px; color: #555; font-weight: bold; }
.param-group input, .param-group textarea {
  border: 1px solid #DDD;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  width: 100%;
  background: #FAFAFA;
}
.param-group input:focus, .param-group textarea:focus {
  outline: none;
  border-color: #1A1A1A;
  background: white;
}
.param-group textarea { resize: vertical; }

/* BOUTON GÉNÉRER */
.generate-card { text-align: center; }
.btn-generate {
  width: 100%;
  background: #1A1A1A;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s;
}
.btn-generate:hover { background: #333; }
.btn-generate:disabled { background: #888; cursor: default; }

/* PROGRESS */
.progress-bar {
  margin-top: 14px;
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #1A1A1A;
  border-radius: 2px;
  transition: width 0.4s;
  width: 0%;
}
.progress-msg {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  text-align: center;
  min-height: 16px;
}

/* RÉSULTAT */
.result-zone, .error-zone {
  background: white;
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.result-icon, .error-icon { font-size: 36px; margin-bottom: 10px; }
.result-title { font-size: 17px; font-weight: bold; margin-bottom: 6px; }
.result-sub { font-size: 12px; color: #666; margin-bottom: 20px; }
.btn-download {
  display: inline-block;
  background: #1A1A1A;
  color: white;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
}
.btn-download:hover { background: #333; }
.error-msg { font-size: 13px; color: #800; margin-top: 6px; }

/* MOBILE */
@media (max-width: 520px) {
  .params-grid { grid-template-columns: 1fr; }
  main { padding: 12px 10px 40px; }
  .card { padding: 14px; }
  .card h2 { font-size: 14px; }
  .btn-generate { font-size: 14px; padding: 14px 16px; }
  header { padding: 10px 14px; }
  .app-name { font-size: 14px; }
}
