/* Thème inspiré de moncube.eu */
:root {
  --bg-dark: #0e0e10;
  --bg-card: #1b1b1e;
  --bg-header: #121214;
  --accent: #2ecc71;
  --accent-hover: #44d87f;
  --text: #eaeaea;
  --muted: #aaaaaa;
  --border: #2a2a2d;
}

body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

header {
  background: var(--bg-header);
  color: var(--accent);
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

h1 {
  margin: 0;
  font-size: 1.9em;
  letter-spacing: 1px;
}

main {
  margin-top: 30px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

h2 {
  color: var(--accent);
  text-align: center;
  margin-bottom: 25px;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

form {
  text-align: center;
  margin-top: 25px;
}

input[type=text] {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  width: 260px;
  background: #111;
  color: var(--text);
  transition: border-color 0.3s;
}

input[type=text]:focus {
  border-color: var(--accent);
  outline: none;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: var(--bg-header);
  border-left: 5px solid var(--accent);
  margin: 12px 0;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, border-color 0.3s;
}

li:hover {
  transform: translateY(-2px);
  border-color: var(--accent-hover);
}

.vote-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loader */
.loader {
  border: 6px solid #333;
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

a {
  text-decoration: none;
  color: var(--accent);
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-hover);
}

/* --- Footer --- */
footer {
  margin-top: 50px;
  padding: 30px;
  background: var(--bg-header);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  text-align: center;
}

footer h3 {
  color: var(--accent);
  margin-bottom: 20px;
}

footer table {
  margin: 0 auto;
  border-collapse: collapse;
  color: var(--text);
  width: 80%;
  max-width: 600px;
}

footer th {
  padding: 10px;
  background: var(--bg-card);
  color: var(--muted);
}

footer td {
  padding: 10px;
  background: #161616;
  border-bottom: 1px solid var(--border);
}

footer img {
  border-radius: 6px;
}

footer tr:hover td {
  background: #1f1f1f;
}

/* Fenêtre de confirmation de vote */
.vote-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #2a2a2d;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  padding: 25px 35px;
  z-index: 9999;
  text-align: center;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 400px;
}

.vote-confirm.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vote-confirm h3 {
  margin: 0 0 10px;
  color: var(--green);
}

.vote-confirm p {
  margin: 0;
  font-size: 1.1em;
  color: var(--text);
}

.vote-confirm button {
  margin-top: 20px;
  /*background: var(--green);*/
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.vote-confirm button:hover {
  background: var(--light-green);
}

.vote-confirm-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vote-confirm-backdrop.show {
  opacity: 1;
}



/* ------------------------------------------------------------------ */
/* 📱 RESPONSIVE DESIGN */
/* ------------------------------------------------------------------ */

/* Tablettes et petits écrans */
@media (max-width: 900px) {
  body {
    max-width: 100%;
    margin: 20px auto;
    padding: 0 15px;
  }

  main {
    padding: 20px;
  }

  h1 {
    font-size: 1.6em;
  }

  h2 {
    font-size: 1.3em;
  }

  li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95em;
  }

  li span {
    margin-bottom: 5px;
  }

  .vote-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 1em;
  }

  input[type=text] {
    width: 90%;
    font-size: 1em;
  }

  button {
    width: 100%;
    font-size: 1.05em;
    padding: 12px;
  }

  footer {
    padding: 20px 15px;
  }

  footer table {
    width: 100%;
    font-size: 0.9em;
  }
}

/* Téléphones */
@media (max-width: 600px) {
  body {
    margin: 10px auto;
    padding: 0 10px;
  }

  header {
    padding: 15px;
    font-size: 0.95em;
  }

  main {
    padding: 15px;
  }

  li {
    font-size: 0.9em;
    padding: 12px 15px;
  }

  .vote-btn {
    font-size: 1em;
    padding: 12px;
  }

  h1, h2 {
    text-align: center;
    line-height: 1.3;
  }

  .vote-confirm {
    width: 90%;
    padding: 20px;
  }

  .vote-confirm p {
    font-size: 1em;
  }
}
