/* Image compressor specific styles */

.drop-zone {
  cursor: pointer;
}

/* Fix pour le bouton "Choisir des fichiers" */
label.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: fit-content;
}

.drop-zone.drag-over {
  border-color: #137fec;
  background-color: #f0f7ff;
}

.file-item {
  background: #fff;
  border: 1px solid #dbe0e6;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-item-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #dbe0e6;
  flex-shrink: 0;
}

.file-item-info {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-weight: 600;
  color: #111418;
  font-size: 0.875rem;
  word-break: break-all;
}

.file-item-size {
  font-size: 0.75rem;
  color: #495163;
  margin-top: 0.25rem;
}

.file-item-compression {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.file-item-compression.before {
  color: #495163;
}

.file-item-compression.after {
  color: #10b981;
  font-weight: 600;
}

.file-item-compression.reduction {
  color: #137fec;
  font-weight: 600;
}

.file-item-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-block;
}

.file-item-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.file-item-status.processing {
  background: #dbeafe;
  color: #1e40af;
}

.file-item-status.success {
  background: #d1fae5;
  color: #065f46;
}

.file-item-status.error {
  background: #fee2e2;
  color: #991b1b;
}

.file-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.file-item-actions button {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.btn-download {
  background: #137fec;
  color: #fff;
}

.btn-download:hover {
  background: #0a5aa8;
}

.btn-download:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-remove {
  background: #ef4444;
  color: #fff;
}

.btn-remove:hover {
  background: #dc2626;
}

.message {
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #86efac;
}

.message.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.message.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Niveaux de compression */
.compression-level-btn {
  padding: 0.75rem 1rem;
  border: 2px solid #dbe0e6;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.compression-level-btn:hover {
  border-color: #137fec;
  background: #f0f7ff;
}

.compression-level-btn.active {
  border-color: #137fec;
  background: #137fec;
  color: #fff;
}

.compression-level-btn.active span {
  color: #fff;
}

/* FAQ Accordéon */
.faq-item {
  transition: all 0.3s ease;
}

.faq-question {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.faq-question:focus-visible {
  outline: 2px solid #137fec;
  outline-offset: -2px;
  border-radius: 0.5rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer:not(.hidden) {
  max-height: 2000px;
  padding: 0;
}

.faq-answer.hidden {
  display: none;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

@media (max-width: 640px) {
  .file-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-item-preview {
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .compression-level-btn {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
}
