body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
}

header {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  position: relative;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #007bff;
  text-align: center;
  margin: 10px 0;
}

.menu {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
}

.menu a {
  margin: 0 15px;
  text-decoration: none;
  color: #333;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.menu a:hover,
.menu a.active {
  background-color: #007bff;
  color: white;
}

.logout-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  padding: 8px 15px;
  background-color: #dc3545;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.logout-btn:hover {
  background-color: #c82333;
}

footer {
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  color: #666;
}

form {
  margin-bottom: 20px;
}

input[type="file"] {
  margin-bottom: 10px;
}

label {
  margin-right: 10px;
}

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

#result {
  margin-top: 20px;
}

/* Image comparison styles */
.image-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.image-comparison section {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
}

.image-comparison img {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}

.download-button {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #28a745;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.download-button:hover {
  background-color: #218838;
}

.download-all {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.download-all:hover {
  background: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu {
    flex-direction: column;
    align-items: center;
  }

  .menu a {
    margin: 5px 0;
  }

  .logout-btn {
    position: relative;
    display: block;
    margin: 10px auto;
    text-align: center;
    top: auto;
    right: auto;
  }
}

/* Styles pour les barres de progression */
.progress-container {
  margin: 20px 0;
}

.progress {
  height: 25px;
  background-color: #f4f4f4;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

.progress-bar {
  height: 100%;
  color: white;
  text-align: center;
  background-color: #007bff;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.error {
  color: #dc3545;
  padding: 10px;
  background-color: #f8d7da;
  border-radius: 4px;
  margin: 15px 0;
  border: 1px solid #f5c6cb;
  text-align: center;
}

/* Animation pour les barres de progression */
@keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}

.progress-bar.active {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-bar-stripes 2s linear infinite;
}

/* Styles pour history */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.file-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: #fff;
  transition: transform 0.2s;
  position: relative; /* Pour positionner le bouton de suppression */
}
.file-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.file-preview {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  margin-bottom: 10px;
  border-radius: 4px;
  overflow: hidden;
}
.file-preview img,
.file-preview video {
  max-width: 100%;
  max-height: 100%;
}
.file-info {
  font-size: 14px;
  color: #666;
}
.file-name {
  font-weight: bold;
  margin-bottom: 5px;
  word-break: break-all;
}
.file-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.file-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 5px;
}
.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #007bff;
}
.pagination a:hover {
  background-color: #f9f9f9;
}
.pagination .active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.filter-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}
.filter-tabs a {
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  text-decoration: none;
  color: #666;
}
.filter-tabs a.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.file-icon {
  font-size: 48px;
  color: #007bff;
}
.zip-icon {
  color: #28a745;
}
.no-files {
  text-align: center;
  padding: 30px;
  color: #666;
}
.btn-small {
  display: inline-block;
  padding: 5px 10px;
  margin: 2px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-small:hover {
  background-color: #0056b3;
}
.btn-delete {
  background-color: #dc3545;
}
.btn-delete:hover {
  background-color: #c82333;
}
/* Style pour le bouton supprimer en haut à droite */
.delete-btn-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #dc3545;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 2;
}
.delete-btn-corner:hover {
  opacity: 1;
}
.delete-icon {
  font-size: 14px;
  font-weight: bold;
}
.confirm-delete-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  max-width: 80%;
  text-align: center;
}
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.modal-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.modal-btn-confirm {
  background-color: #dc3545;
  color: white;
}
.modal-btn-cancel {
  background-color: #6c757d;
  color: white;
}
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 5;
}
