body { font-family: 'Segoe UI', Arial, sans-serif; background:#f0f2f5; }

.sv-poll, .sv-results-only {
  max-width: 650px;
  margin: 40px auto;
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: fadeIn 0.5s ease-in-out;
}

.sv-poll h3, .sv-results-only h3 {
  text-align: center;
  font-size: 1.6em;
  margin-bottom: 20px;
  color: #2c3e50;
}

.sv-form input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.sv-form label {
  display: block;
  margin: 10px 0;
  font-size: 1.1em;
  color: #c4dcf3;
}

.sv-form button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.sv-form button:hover { transform: scale(1.02); background: linear-gradient(135deg, #2980b9, #27ae60); }

.sv-message { margin-top: 12px; font-weight: bold; text-align: center; }

.sv-live-results, .sv-results-only { margin-top: 25px; padding: 20px; background: #fafafa; border-radius: 10px; }

canvas { max-width: 100% !important; height: auto !important; }

@keyframes fadeIn { from {opacity:0; transform:translateY(20px);} to {opacity:1; transform:translateY(0);} }

/* Dark mode auto */
@media (prefers-color-scheme: dark) {
  body { background: #111; color: #eaeaea; }
  .sv-poll, .sv-results-only { background:#1c1c1c; box-shadow: 0 4px 12px rgba(0,0,0,0.6); }
  .sv-poll h3, .sv-results-only h3 { color: #fff; }
  .sv-form input[type="text"] { background:#2a2a2a; border-color:#444; color:#fff; }
  .sv-live-results, .sv-results-only { background:#151515; }
}


/* Style du compte à rebours */
.sv-countdown {
  font-size: 1.2em;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 5px;
  min-width: 160px;
  text-align: center;
}

/* Vert avant le début */
.sv-countdown.start {
  background-color: #e8f8f0;
  color: #1e7e34;
  border: 1px solid #1e7e34;
}

/* Orange pendant le vote */
.sv-countdown.end {
  background-color: #fff4e5;
  color: #e67e22;
  border: 1px solid #e67e22;
}

/* Rouge après la fin */
.sv-countdown.closed {
  background-color: #fdecea;
  color: #c0392b;
  border: 1px solid #c0392b;
}
