body {
  font-family: sans-serif;
  background: #f0f0f0;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

h1 {
  margin-bottom: 2rem;
}

.actions {
  margin-bottom: 2rem;
}

.actions button {
  margin: 0 15px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: #337ab7;
  color: white;
  cursor: pointer;
}

.actions button:hover {
  background: #23527c;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
}

.gallery-item {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}

.gallery-item img, .gallery-item video {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.gallery-item label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.gallery-item input[type="checkbox"] {
  margin: 6px auto 0;
}

.video-thumb {
  position: relative;
  display: block;
}

.video-thumb::after {
  content: "▶";
  font-size: 3rem;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  pointer-events: none;
}

footer {
  margin-top: 3rem;
  background: #eee;
  padding: 2rem;
  border-radius: 10px;
}

.refresh-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem; /* Espace entre chaque section (inputs, boutons, compteur) */
}

.refresh-inputs label {
  margin: 0 10px;
  font-weight: bold;
  font-size: 1.3rem;
}

.refresh-inputs input {
  width: 100px;
  padding: 10px;
  margin: 0 10px;
  font-size: 1.3rem;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.refresh-buttons button {
  margin: 0 15px;
  padding: 16px 32px;
  font-size: 1.3rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

#validateBtn {
  background: #28a745;
}

#pauseBtn {
  background: #007bff;
}

.refresh-buttons button:hover {
  opacity: 0.9;
}

.refresh-countdown {
  font-size: 1.6rem;
  color: #333;
  font-weight: bold;
}

@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item {
    padding: 4px;
  }
}