body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

header {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  text-align: center;
}

nav {
  background-color: #34495e;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}

nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

.container {
  padding: 2rem;
  max-width: 600px;
  margin: auto;
  background-color: white;
  margin-top: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.file-input-container {
  margin-bottom: 1.5rem;
  text-align: center;
}

.add-files-btn {
  background-color: #3498db;
  color: white;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.add-files-btn:hover {
  background-color: #2980b9;
}

.file-list {
  margin: 1rem 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 0.5rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  flex-grow: 1;
  margin-right: 1rem;
}

.remove-file {
  color: #e74c3c;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.remove-file:hover {
  color: #c0392b;
}

.progress-container {
  margin: 1rem 0;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: #2ecc71;
  width: 0%;
  transition: width 0.3s ease;
}

#progress-text {
  text-align: center;
  margin-top: 0.5rem;
  color: #7f8c8d;
}

.merge-button {
  background-color: #27ae60;
  color: white;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
}

.merge-button:hover {
  background-color: #2ecc71;
}

.merge-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.console-container {
  margin-top: 2rem;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.console-container h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.console {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 1rem;
  border-radius: 5px;
  font-family: monospace;
  height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.log-entry {
  margin: 0.2rem 0;
  padding: 0.2rem 0;
  border-bottom: 1px solid #34495e;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-info {
  color: #3498db;
}

.log-error {
  color: #e74c3c;
}

.log-success {
  color: #2ecc71;
}

.description {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e9ecef;
}

.description p {
  margin: 0 0 1rem 0;
  color: #495057;
  line-height: 1.5;
}

.description ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.description li {
  margin-bottom: 0.5rem;
  color: #495057;
  line-height: 1.5;
}

.description .note {
  font-style: italic;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.language-selector {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  border: 1px solid #34495e;
  border-radius: 4px;
  background-color: white;
  color: #2c3e50;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 120px;
}

.language-selector:hover {
  border-color: #2c3e50;
}

.ad-container {
  width: 100%;
  min-height: 90px;
  margin: 1rem 0;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ad-container:empty::before {
  content: "Ad Space";
  color: #6c757d;
  font-style: italic;
}

.ad-top {
  margin-bottom: 0.5rem;
}

.ad-bottom {
  margin-top: 0.5rem;
}

.merge-ad {
  margin: 1rem 0;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.merge-ad:empty::before {
  content: "Merge Ad Space";
  color: #856404;
}

/* Styles pour le footer de langue */
.language-footer {
  background-color: #f8f9fa;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #dee2e6;
}

.language-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

.language-footer h3 {
  color: #495057;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.language-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem;
}

.language-links a {
  color: #fff;
  background-color: #0d6efd;
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #0b5ed7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0.3rem;
}

.language-links a:hover {
  background-color: #0b5ed7;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.language-links a:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style spécifique pour les langues RTL */
.language-links a[lang="ar"] {
  font-family: 'Arial', sans-serif;
  direction: rtl;
}

/* Responsive design */
@media (max-width: 768px) {
  .language-links {
    gap: 0.5rem;
  }
  
  .language-links a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Styles pour le popup interstitiel */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-ad {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  width: 600px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.overlay.active .popup-ad {
  transform: scale(1);
}

.popup-ad .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 5px;
  line-height: 1;
}

.popup-ad .close-button:hover {
  color: #333;
} 