:root {
  --orange: #e8742c;
  --orange-dark: #c45e1a;
  --ink: #1a1a1a;
  --muted: #666;
  --border: #e8e8e8;
  --bg: #f7f7f7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.hidden { display: none !important; }

.sondage-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.sondage-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.sondage-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.sondage-brand {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sondage-header h1 {
  font-size: 1.1rem;
  font-weight: 800;
}

.sondage-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fff0e8;
  color: var(--orange-dark);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.sondage-intro h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.sondage-intro p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.sondage-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sondage-card {
  display: block;
  background: white;
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sondage-card input { display: none; }

.sondage-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #fafafa;
  padding: 8px;
}

.sondage-card-label {
  display: block;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
}

.sondage-card.selected,
.sondage-card:has(input:checked) {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 116, 44, 0.2);
}

.sondage-submit {
  margin-top: 8px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: var(--orange);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.sondage-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sondage-thanks {
  text-align: center;
  padding: 48px 20px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.thanks-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
}

.sondage-thanks h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.sondage-thanks p { color: var(--muted); }

.thanks-sub {
  margin-top: 16px !important;
  font-size: 0.85rem !important;
  color: var(--orange) !important;
}

.sondage-error {
  margin-top: 16px;
  padding: 12px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.admin-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.admin-login {
  max-width: 360px;
  margin: 80px auto;
  background: white;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.admin-login h1 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.admin-login p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.admin-login input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  margin-bottom: 12px;
}

.admin-login button {
  width: 100%;
  padding: 12px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.admin-head h1 { font-size: 1.35rem; }

.admin-refresh {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

.admin-machine {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.admin-machine h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.admin-machine .loc {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.admin-total {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 20px;
}

.admin-total span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.stat-row { margin-bottom: 16px; }

.stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
  gap: 8px;
}

.stat-bar {
  height: 10px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.admin-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--orange);
}

.admin-logout {
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
