@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:       #4F46E5;
  --primary-dark:  #3730A3;
  --primary-light: #EEF2FF;
  --primary-glow:  rgba(79,70,229,0.22);
  --option1:       #059669;
  --option1-dark:  #047857;
  --option1-light: #ECFDF5;
  --option2:       #E11D48;
  --option2-dark:  #BE123C;
  --option2-light: #FFF1F2;
  --bg:            #F1F5F9;
  --card:          #FFFFFF;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --border:        #E2E8F0;
  --radius:        20px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.05);
  --shadow:        0 2px 6px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.07);
  --shadow-lg:     0 4px 12px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.10);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, #C0171A 0%, #E02020 100%);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(192,23,26,0.35);
}

.logo {
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.flag-ch {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  border-radius: 5px;
}

.logo-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: white;
}

.logo-admin {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.2);
  padding: 2px 7px;
  border-radius: 99px;
}

.admin-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 99px;
  transition: all 0.2s;
  letter-spacing: 0.1px;
}

.admin-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
}

/* ── Main ──────────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── States ────────────────────────────────────────────────── */
.state {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hidden { display: none !important; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(226,232,240,0.8);
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ── Question ──────────────────────────────────────────────── */
.question-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  opacity: 0.85;
}

.question {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* ── Vote choices ──────────────────────────────────────────── */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  color: white;
  transition: transform 0.14s, box-shadow 0.14s, filter 0.14s;
  text-align: left;
  width: 100%;
  letter-spacing: -0.2px;
  min-height: 68px;
}

.choice-btn:hover  { filter: brightness(1.06); transform: translateY(-1px); }
.choice-btn:active { transform: scale(0.97) translateY(0); }

.choice-btn--1 {
  background: linear-gradient(135deg, #059669, #10B981);
  box-shadow: 0 4px 16px rgba(5,150,105,0.35);
}

.choice-btn--2 {
  background: linear-gradient(135deg, #E11D48, #F43F5E);
  box-shadow: 0 4px 16px rgba(225,29,72,0.35);
}

.choice-icon  { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; }
.choice-icon svg { width: 32px; height: 32px; }
.choice-label { font-size: 19px; }

/* ── Results ───────────────────────────────────────────────── */
.results {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 2px;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.1px;
}

.result-pct {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.result-bar-bg {
  height: 13px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.result-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.result-bar--1 { background: linear-gradient(90deg, #059669, #34D399); }
.result-bar--2 { background: linear-gradient(90deg, #E11D48, #FB7185); }

.result-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.total-votes {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 17px 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: filter 0.2s, transform 0.14s, box-shadow 0.2s;
  box-shadow: 0 3px 12px var(--primary-glow);
  letter-spacing: -0.1px;
  min-height: 56px;
}

.btn-primary:hover  { filter: brightness(1.07); box-shadow: 0 5px 18px var(--primary-glow); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.14s;
  letter-spacing: -0.1px;
  min-height: 54px;
}

.btn-secondary:hover  { background: #E0E7FF; }
.btn-secondary:active { transform: scale(0.98); }

/* ── Feedback admin ──────────────────────────────────────────── */
.feedback-admin-badge {
  background: #E11D48;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.feedback-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.feedback-item--unread {
  border-color: var(--primary);
  background: var(--primary-light);
}

.feedback-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feedback-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.feedback-pseudo {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.feedback-pseudo.anon { color: var(--text-muted); font-weight: 500; }

.feedback-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.feedback-msg {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.btn-mark-read {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
}
.btn-mark-read:hover { background: var(--primary-light); }

.btn-danger {
  background: var(--option2-light);
  color: var(--option2);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover { background: #FFE4E6; }

.btn-activate {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-activate:hover { filter: brightness(1.08); }

.btn-deactivate {
  background: var(--option1-light);
  color: var(--option1-dark);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit:hover { background: #E0E7FF; }

/* ── Edit modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: var(--bg);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--border); }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-reset {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset:hover { border-color: var(--text-muted); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.input {
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  background: #FAFCFF;
}

.input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ── Poll items (admin) ────────────────────────────────────── */
.poll-item {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.poll-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}

.poll-item-question {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.1px;
}

.poll-item-options {
  display: flex;
  gap: 8px;
}

.poll-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.poll-badge--1 { background: var(--option1-light); color: var(--option1-dark); }
.poll-badge--2 { background: var(--option2-light); color: var(--option2-dark); }

.active-badge {
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
  letter-spacing: 0.2px;
}

.lang-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Admin form language tabs ────────────────────────────────── */
.form-lang-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.form-lang-tab {
  background: var(--bg);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.form-lang-tab:hover  { border-color: var(--primary); color: var(--primary); }

.form-lang-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.field-required { color: var(--option2); font-size: 13px; }
.field-optional { color: var(--text-muted); font-size: 11px; font-weight: 400; }

.poll-stats {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.poll-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.poll-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Empty / error / blocked ───────────────────────────────── */
.state--center {
  align-items: center;
  text-align: center;
  padding: 44px 16px;
  gap: 10px;
}

.big-icon {
  font-size: 58px;
  line-height: 1;
}

.state--center h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.state--center p {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 280px;
}

.muted { color: var(--text-muted); }

.error-msg {
  color: var(--option2-dark);
  font-size: 14px;
  font-weight: 500;
  background: var(--option2-light);
  border-radius: 10px;
  padding: 10px 14px;
}

.no-polls {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 14px;
  font-weight: 500;
}

/* ── Swiss map ─────────────────────────────────────────────── */
.map-container {
  position: relative;
  width: 100%;
  background: linear-gradient(160deg, #EEF2FF 0%, #F0FDF4 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.swiss-map {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.canton {
  fill: #C7D7F5;
  stroke: #ffffff;
  stroke-width: 1.2;
  stroke-linejoin: round;
  transition: fill 0.12s, filter 0.12s;
  cursor: pointer;
}

.canton:hover {
  fill: #818CF8;
  filter: brightness(1.05);
}

.canton-selected {
  fill: var(--primary) !important;
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(79,70,229,0.5));
}

.canton-label {
  font-size: 22px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 900;
  fill: #1e2a5e;
  text-anchor: middle;
  user-select: none;
  letter-spacing: -0.5px;
}

.map-tooltip {
  display: none;
  position: absolute;
  background: rgba(15,23,42,0.9);
  color: white;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  backdrop-filter: blur(4px);
  letter-spacing: 0.1px;
}

/* ── Canton selection ──────────────────────────────────────── */
.canton-hint {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin: -4px 0 2px;
  line-height: 1.4;
}

.canton-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1.5px solid rgba(79,70,229,0.3);
  border-radius: 12px;
  padding: 10px 14px;
}

.canton-confirm-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.canton-confirm-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--primary);
  letter-spacing: -0.2px;
}

.canton-details {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.canton-details summary {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-family: inherit;
}

.canton-details summary::before { content: '▸ '; font-size: 11px; }
.canton-details[open] summary::before { content: '▾ '; }

.canton-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 10px;
  max-height: 240px;
  overflow-y: auto;
  border-top: 1.5px solid var(--border);
}

.canton-list-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: all 0.14s;
}

.canton-list-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.canton-list-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #6366F1);
  color: white;
}

.canton-list-code {
  font-weight: 900;
  font-size: 11px;
  min-width: 22px;
  opacity: 0.65;
}

.canton-list-btn.selected .canton-list-code { opacity: 0.85; }

/* ── Header actions ────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Hamburger button ──────────────────────────────────────── */
.hamburger-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  min-width: 46px;
  min-height: 46px;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.28); }
.hamburger-btn svg { width: 24px; height: 24px; display: block; }

/* ── Dropdown menu ─────────────────────────────────────────── */
.app-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 14px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  min-width: 210px;
  z-index: 200;
  overflow: hidden;
  animation: menuIn 0.18s ease;
}
.app-menu.hidden { display: none; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s;
  min-height: 56px;
}
.menu-item:hover { background: #F1F5F9; }
.menu-item svg { width: 22px; height: 22px; flex-shrink: 0; color: #64748B; }
.menu-item--link { color: #0F172A; }

.menu-divider {
  height: 1px;
  background: #F1F5F9;
  margin: 2px 0;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
}
.menu-backdrop.hidden { display: none; }

/* ── Language selector ─────────────────────────────────────── */
.lang-btn {
  background: transparent;
  color: rgba(255,255,255,0.65);
  border: none;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.6px;
}

.lang-btn:hover { color: white; }

.lang-btn.active {
  background: rgba(255,255,255,0.22);
  color: white;
}

.menu-lang-row {
  display: flex;
  gap: 6px;
  padding: 8px 14px 12px;
}
.menu-lang-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.menu-lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.menu-lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.header-lang-row { display: flex; gap: 4px; align-items: center; }
.header-lang-btn {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.header-lang-btn:hover { color: white; border-color: white; }
.header-lang-btn.active { background: rgba(255,255,255,0.25); color: white; border-color: white; }

/* ── History ───────────────────────────────────────────────── */
.history-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.btn-back {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn-back:hover { border-color: var(--primary); color: var(--primary); }

.history-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

.history-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(226,232,240,0.8);
}

.history-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-index {
  font-size: 11px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--primary), #6366F1);
  border-radius: 7px;
  padding: 3px 8px;
  letter-spacing: 0.2px;
}

.history-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  flex: 1;
}

.actif-badge {
  background: var(--option1-light);
  color: var(--option1-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  letter-spacing: 0.2px;
}

.history-question {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.2px;
}

.history-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-opt {
  font-size: 12px;
  font-weight: 700;
  min-width: 56px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.history-pct {
  font-size: 13px;
  font-weight: 900;
  color: var(--primary);
  min-width: 36px;
  text-align: right;
  letter-spacing: -0.3px;
}

.history-bar { transition: width 0.75s cubic-bezier(0.4,0,0.2,1); }

.history-total {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.history-heatmap-wrap {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.history-map {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Heatmap ───────────────────────────────────────────────── */
.heatmap-details {
  border-top: 1.5px solid var(--border);
}
.heatmap-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  user-select: none;
}
.heatmap-summary::-webkit-details-marker { display: none; }
.heatmap-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.heatmap-details[open] .heatmap-chevron { transform: rotate(180deg); }
.heatmap-details[open] .heatmap-summary { color: var(--text); }
.heatmap-details > :not(summary) { padding-bottom: 8px; }

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-vote-again {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
  font-family: inherit;
}
.btn-vote-again:hover { color: var(--text); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot--green { background: hsl(122, 75%, 40%); }
.legend-dot--red   { background: hsl(4,   80%, 52%); }
.legend-dot--grey  { background: #C7D7F5; border: 1px solid #a0b4d8; }

.heatmap-container {
  background: linear-gradient(160deg, #EEF2FF 0%, #F0FDF4 100%);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Profile screen ────────────────────────────────────────── */
.profile-notice {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-chip {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-chip.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

.profile-chip.active::before {
  content: '✓';
  font-size: 12px;
  font-weight: 800;
}

.btn-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.btn-skip:hover { color: var(--text); }

.profile-year-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.profile-year-input::-webkit-outer-spin-button,
.profile-year-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.profile-year-input:focus { border-color: var(--primary); background: #fff; }

.pseudo-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pseudo-status {
  font-size: 12px;
  font-weight: 500;
  min-height: 16px;
}
.pseudo-available { color: #059669; }
.pseudo-taken     { color: #E11D48; }
.pseudo-invalid   { color: var(--text-muted); }
.pseudo-checking  { color: var(--text-muted); }

/* ── Leaderboard ───────────────────────────────────────────── */
.leaderboard-wrap {
  background: linear-gradient(135deg, #FEF9C3 0%, #FFF7ED 100%);
  border: 1.5px solid #FDE68A;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.leaderboard-title {
  font-size: 15px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 12px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.leaderboard-row:last-child { border-bottom: none; }

.leaderboard-medal { font-size: 18px; flex-shrink: 0; }

.leaderboard-pseudo {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.leaderboard-pred {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.leaderboard-diff {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Rapport d'analyse ──────────────────────────────────────── */
.btn-rapport-toggle {
  width: 100%;
  background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s, transform 0.14s;
  letter-spacing: -0.1px;
}
.btn-rapport-toggle:hover  { filter: brightness(1.1); }
.btn-rapport-toggle:active { transform: scale(0.98); }

.rapport-content {
  background: #F8FAFF;
  border: 1.5px solid #C7D2FE;
  border-radius: 14px;
  padding: 20px 18px;
  margin-top: 8px;
  animation: fadeInUp 0.3s ease;
}

.rapport-title {
  font-size: 16px;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rapport-sentence {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid #E0E7FF;
}
.rapport-sentence:last-child { border-bottom: none; padding-bottom: 0; }
.rapport-sentence strong { color: #1E3A5F; }
.rapport-sentence em     { font-style: normal; color: var(--primary); }

/* ── Demographic stats ──────────────────────────────────────── */
.demo-stats-details {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.demo-stats-details summary {
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-icon {
  width: 16px;
  height: 12px;
  color: var(--primary);
  flex-shrink: 0;
}

.demo-stats-details summary::after {
  content: ' ▸';
  font-size: 11px;
  color: var(--text-muted);
}

.demo-stats-details[open] summary::after { content: ' ▾'; }

.demo-section {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
}

.demo-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.demo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.demo-dot--1 { background: var(--option1); }
.demo-dot--2 { background: var(--option2); }

.demo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-label {
  font-size: 13px;
  font-weight: 600;
  min-width: 90px;
  flex-shrink: 0;
}

.demo-n {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
}

.demo-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.demo-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 8px;
}

.demo-bar {
  height: 100%;
  border-radius: 99px;
  min-width: 2px;
  transition: width 0.6s ease;
}

.demo-bar--1 { background: var(--option1); }
.demo-bar--2 { background: var(--option2); }

.demo-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
}

/* ── Already voted badge ───────────────────────────────────── */
.already-voted-badge {
  background: var(--option1-light);
  color: var(--option1-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(5,150,105,0.2);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#state-results .card {
  animation: fadeInUp 0.35s ease;
}

/* ── Welcome screen ────────────────────────────────────────── */
.welcome-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px 32px;
  gap: 20px;
  animation: fadeInUp 0.4s ease;
}

.welcome-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.welcome-appname {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
}

.welcome-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.welcome-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
}

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.welcome-feat {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1.5px solid var(--border);
  padding: 13px 16px;
  border-radius: 14px;
  text-align: left;
}

.welcome-feat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.welcome-feat-icon svg { width: 20px; height: 20px; }

.welcome-feat-icon--vote   { background: #EEF2FF; color: #4F46E5; }
.welcome-feat-icon--map    { background: #ECFDF5; color: #059669; }
.welcome-feat-icon--shield { background: #FFF1F2; color: #E11D48; }

.welcome-feat-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.welcome-scope-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 16px;
  text-align: left;
}
.welcome-feat-icon--swiss { background: #FFF1F2; color: #DC143C; }
.welcome-scope-badge-text {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.welcome-privacy {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 12px;
}

.welcome-btn {
  margin-top: 8px;
  width: 100%;
  max-width: 300px;
  font-size: 17px;
  padding: 16px;
}

/* ── Notifications button ───────────────────────────────────── */
.btn-notif {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  margin-top: 4px;
}
.btn-notif:hover { border-color: var(--primary); color: var(--primary); }
.btn-notif.active { border-color: var(--option1); color: var(--option1); background: var(--option1-light); }

/* ── Feedback button & modal ─────────────────────────────────── */
.btn-feedback {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.btn-feedback:hover { border-color: var(--primary); color: var(--primary); }

.feedback-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.feedback-textarea:focus { border-color: var(--primary); }

.feedback-status {
  font-size: 13px;
  font-weight: 500;
  min-height: 18px;
  margin-top: 4px;
}
.feedback-status.success { color: #059669; }
.feedback-status.error   { color: #E11D48; }

/* ── Share button ────────────────────────────────────────────── */
.btn-share {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-share:hover  { opacity: 0.9; }
.btn-share:active { transform: scale(0.98); }

/* ── Install prompt ──────────────────────────────────────────── */
.install-prompt {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border: 1.5px solid #FDE68A;
  border-radius: 16px;
  padding: 18px 16px;
  animation: fadeInUp 0.35s ease;
}

.install-prompt-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-prompt-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.install-prompt-h {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.install-prompt-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.install-prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.install-ios-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.install-ios-step:last-of-type { border-bottom: none; }

.install-ios-num {
  width: 22px;
  height: 22px;
  background: #F59E0B;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Notification prompt ─────────────────────────────────────── */
.notif-prompt {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, #EEF2FF, #F0FDF4);
  border: 1.5px solid #C7D2FE;
  border-radius: 16px;
  padding: 18px 16px;
  animation: fadeInUp 0.35s ease;
}

.notif-prompt-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.notif-prompt-icon svg { width: 22px; height: 22px; }

.notif-prompt-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.notif-prompt-h {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.notif-prompt-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.notif-prompt-yes {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s;
}
.notif-prompt-yes:hover { filter: brightness(1.1); }

.notif-prompt-no {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.notif-prompt-no:hover { background: var(--border); }

.notif-prompt-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Gamification ────────────────────────────────────────────── */
.streak-badge {
  background: linear-gradient(135deg, #F97316, #EF4444);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  animation: fadeInUp 0.4s ease;
}

.prediction-panel {
  background: var(--primary-light);
  border: 1.5px solid rgba(79,70,229,0.2);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.35s ease;
}

.prediction-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
}

.prediction-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.prediction-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prediction-slider-wrap input[type=range] {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.prediction-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  min-width: 52px;
  text-align: right;
}

.btn-predict-teaser {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--primary);
  border: 1.5px dashed var(--primary);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
  margin-bottom: 4px;
}
.btn-predict-teaser:hover {
  background: var(--primary-light);
  border-style: solid;
}

.prediction-expanded {
  background: var(--primary-light);
  border: 1.5px solid rgba(79,70,229,0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 4px;
}

.btn-predict {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.btn-predict:hover    { opacity: 0.9; }
.btn-predict:disabled { opacity: 0.6; cursor: default; }

.prediction-result {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: white;
}
.prediction-result.perfect { color: #059669; background: var(--option1-light); }
.prediction-result.close   { color: #D97706; background: #FFFBEB; }

/* ── Cantonal not-concerned screen ──────────────────────────── */
.not-concerned-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.not-concerned-h {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}
.not-concerned-p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}
.not-concerned-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Cantonal profile notice (vote screen) ───────────────────── */
.cantonal-profile-notice {
  background: #EFF6FF;
  border: 1.5px solid #93C5FD;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  animation: fadeInUp 0.25s ease;
}
.cantonal-profile-notice p {
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
  margin: 0 0 10px 0;
}
.cantonal-notice-btn {
  background: #1d4ed8;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

/* ── Profile canton select ───────────────────────────────────── */
.profile-canton-select {
  width: 100%;
  margin-top: 4px;
}
/* ── Profile nudge (résultats) ───────────────────────────────── */
.profile-nudge {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  animation: fadeInUp 0.3s ease;
}
.profile-nudge p {
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
  margin: 0 0 10px 0;
}
.profile-nudge-btn {
  background: #1d4ed8;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.profile-nudge-btn:active { opacity: 0.85; }

/* ── Profile canton tip (dans le profil) ─────────────────────── */
.profile-canton-tip {
  font-size: 13px;
  color: #1d4ed8;
  background: #EFF6FF;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Poll counter + next poll ────────────────────────────────── */
.vote-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 4px;
}
.poll-counter {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-next-poll {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #b91c1c);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  animation: fadeInUp 0.35s ease;
  transition: opacity 0.15s;
}
.btn-next-poll:active { opacity: 0.85; }

/* ── Écussons cantonaux ──────────────────────────────────────── */
.swiss-cross, .canton-shield {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.18));
}
.canton-shield--badge { margin-right: 6px; }
.canton-shield--admin { width: 16px; height: 16px; margin-right: 4px; vertical-align: middle; }

/* ── Scope badge (écran de vote) ─────────────────────────────── */
.vote-scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
  animation: fadeInUp 0.3s ease;
}
.vote-scope-badge--federal {
  background: rgba(220, 20, 60, 0.10);
  color: var(--primary);
}
.vote-scope-badge--cantonal {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

/* ── Votation badge ──────────────────────────────────────────── */
.votation-badge {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  color: white;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 14px;
  text-align: center;
  letter-spacing: 0.1px;
  animation: fadeInUp 0.35s ease;
}
.votation-badge--cantonal {
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

/* ── Scope badges (admin list) ───────────────────────────────── */
.scope-admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}
.scope-admin-badge--federal {
  background: rgba(220, 20, 60, 0.10);
  color: var(--primary);
}
.scope-admin-badge--cantonal {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

/* ── Scope radio group (admin form) ──────────────────────────── */
.scope-radio-group {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.scope-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  transition: border-color 0.15s, background 0.15s;
}
.scope-radio-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(220, 20, 60, 0.05);
}
.scope-radio-label input { display: none; }

/* ── Official result comparison ──────────────────────────────── */
.official-result-wrap {
  background: linear-gradient(135deg, #F0FDF4, #ECFDF5);
  border: 1.5px solid #6EE7B7;
  border-radius: 14px;
  padding: 16px 18px;
  animation: fadeInUp 0.35s ease;
}
.official-result-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #059669;
  margin-bottom: 8px;
}
.official-result-compare {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.official-result-compare strong { color: #047857; }
.official-result-verdict {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #059669;
}

/* ── Countdown ───────────────────────────────────────────────── */
.countdown-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #1E1B4B, #3730A3);
  color: white;
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  animation: fadeInUp 0.4s ease;
}

.countdown-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.countdown-timer {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
}

/* ── Poll dates in admin ─────────────────────────────────────── */
.poll-dates {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}
.poll-dates:empty { display: none; }

/* ── Responsive desktop ──────────────────────────────────────── */
@media (min-width: 768px) {
  .app {
    max-width: 680px;
  }
  .main {
    padding: 28px 24px;
  }
  .card {
    padding: 28px 32px;
  }
  .vote-btn {
    font-size: 18px;
    padding: 18px 24px;
  }
  .header {
    padding: 16px 28px;
  }
  .welcome-card {
    padding: 56px 40px 48px;
  }
  .welcome-appname {
    font-size: 42px;
  }
  .welcome-title {
    font-size: 26px;
  }
  .welcome-sub {
    max-width: 420px;
    font-size: 16px;
  }
}

@media (min-width: 1100px) {
  .app {
    max-width: 800px;
  }
  .card {
    padding: 36px 44px;
  }
  #question-text {
    font-size: 22px;
  }
}
