.scripts-container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.scripts-container h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1e3c72;
}

.script-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.script-card:hover {
  background-color: #f0f4f8;
}

.script-card h2 {
  font-size: 1.3rem;
  color: #2a5298;
  margin-bottom: 0.5rem;
}

.script-description {
  font-style: italic;
  color: #555;
  margin-bottom: 1rem;
}

.script-code {
  background: #1e1e1e;
  color: #dcdcdc;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  display: none;
  white-space: pre-wrap;
  margin-top: 1rem;
}

.script-code.visible {
  display: block;
}


.copy-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #2a5298;
  color: white;
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.copy-btn:hover {
  opacity: 1;
}

.script-card {
  position: relative;
}

.copied-tooltip {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #4caf50;
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  display: none;
  z-index: 11;
}

.copied-tooltip.show {
  display: block;
  animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.action-buttons {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.4rem;
  z-index: 10;
}

.download-btn {
  position: absolute;
  top: 1.5rem;
  right: 7.5rem; /* ajusté pour être à gauche du bord droit, à côté du bouton copier */
  background: #2a5298;
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.download-btn:hover {
  opacity: 1;
}

.script-footer {
  background-color: #f2f2f2;
  border-top: 1px solid #ccc;
  font-size: 0.8rem;
  color: #444;
  text-align: center;
  padding: 0.4rem 0.6rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: -1.5rem;
  margin-top: 1rem;
  cursor: default;
}
