/* Structure générale */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.main-title {
  font-size: 2rem;
  margin: 0;
  color: #333;
}

/* Cards et sections */
.card {
  background: white;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.description-card {
  margin-bottom: 2rem;
}

.form-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Grille de formulaire */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

/* Labels et inputs */
label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.form-select, 
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: white;
  transition: all 0.3s ease;
}

.form-select:hover,
.form-control:hover {
  border-color: #adb5bd;
}

.form-select:focus,
.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  outline: none;
}

/* Sliders */
.sliders-container {
  margin-top: 1.5rem;
}

.slider-group {
  margin-bottom: 1.5rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slider-value {
  font-weight: 600;
  color: #007bff;
}

/* Zone de prévisualisation */
.preview-section {
  margin-top: 2rem;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Monaco', 'Consolas', monospace;
  white-space: pre-wrap;
}

/* Boutons d'action */
.action-buttons {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .header {
      flex-direction: column;
      text-align: center;
      gap: 1rem;
  }

  .form-grid {
      grid-template-columns: 1fr;
  }

  .card {
      padding: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-section {
  animation: fadeIn 0.3s ease-out;
}

/* Style du sélecteur de langue */
.language-selector {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.language-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.language-btn:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#languageFlag {
  font-size: 1.2rem; /* Taille un peu plus grande pour l'émoji */
  line-height: 1;
}

#languageText {
  margin-left: 0.25rem;
}

/* États du bouton d'optimisation */
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Animations pour les alertes */
.alert {
  z-index: 1050;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
      transform: translateY(100%);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

/* Styles pour le spinner */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

/* Message d'erreur */
.text-danger {
  color: #dc3545;
}
.copy-message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #28a745;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* Style des boutons de copie */
.btn-copy {
  transition: all 0.2s ease;
  padding: 4px 12px;
  font-size: 0.875rem;
}

.btn-copy:hover {
  background-color: #e9ecef;
}

.btn-copy:active {
  transform: scale(0.95);
}

/* Style du conteneur de prévisualisation */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  white-space: pre-wrap;
  font-family: monospace;
}