.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--rs);
  color: var(--txt2); font-size: .83rem; font-weight: 500;
  transition: all var(--t); cursor: pointer; border: none; background: none; width: 100%;
  text-decoration: none;
}
.nav-item:hover { background: var(--glass2); color: var(--txt); }
.nav-item.active {
  background: rgba(124,58,237,.15);
  color: var(--violet-l); font-weight: 700;
  box-shadow: inset 3px 0 0 var(--violet);
}
.nav-item .icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .95rem;
  background: rgba(255,255,255,.05); transition: background var(--t);
}
.nav-item.active .icon { background: rgba(124,58,237,.22); }
.nav-item:hover .icon  { background: rgba(255,255,255,.09); }
.nav-item.nc-green  .icon { background: rgba(16,185,129,.15); }
.nav-item.nc-blue   .icon { background: rgba(37,99,235,.15); }
.nav-item.nc-orange .icon { background: rgba(245,158,11,.14); }
.nav-item.nc-red    .icon { background: rgba(239,68,68,.12); }
.nav-item.nc-purple .icon { background: rgba(124,58,237,.15); }
.nav-item.nc-cyan   .icon { background: rgba(34,211,238,.12); }
.nav-item .badge-nav { margin-left: auto; font-size: .62rem; padding: 2px 7px; border-radius: var(--rfull); background: var(--violet); color: #fff; font-weight: 800; }
.nav-section {
  font-size: .59rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .11em; color: var(--txt3); padding: 12px 10px 4px;
  display: flex; align-items: center; gap: 6px;
}
.nav-section::after { content: ''; flex: 1; height: 1px; background: var(--bord); }/* ================================================================
   AssemblyVote — Design System v4
   Audience : public mixte, lisibilité prioritaire
   Palette  : fond nuit #07050F, violet #7C3AED, bleu #2563EB, vert #10B981
   Typo     : Outfit 400/700/900 (UI) + Space Mono (codes)
================================================================ */

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

/* ── Variables ───────────────────────────────────────── */
:root {
  /* Couleurs primaires */
  --violet:   #7C3AED;
  --violet-l: #A78BFA;
  --violet-d: #5B21B6;
  --bleu:     #2563EB;
  --bleu-l:   #60A5FA;
  --cyan:     #22D3EE;
  --vert:     #10B981;
  --vert-l:   #34D399;
  --rouge:    #EF4444;
  --orange:   #F59E0B;
  --rose:     #EC4899;

  /* Fonds */
  --bg:        #07050F;
  --bg2:       #0D0B1A;
  --bg3:       #120F22;
  --surface:   #16132A;
  --surface2:  #1D1A35;
  --surface3:  #252240;
  --glass:     rgba(255,255,255,.04);
  --glass2:    rgba(255,255,255,.07);

  /* Bordures */
  --bord:      rgba(255,255,255,.08);
  --bord2:     rgba(255,255,255,.13);
  --bord-v:    rgba(124,58,237,.3);

  /* Texte */
  --txt:       #F0EEF8;
  --txt2:      #A09BB8;
  --txt3:      #6B6882;
  --muted:     #8B85A8;

  /* Gradients */
  --grad:      linear-gradient(135deg, #7C3AED 0%, #2563EB 60%, #22D3EE 100%);
  --grad-v:    linear-gradient(135deg, #7C3AED, #5B21B6);
  --grad-ok:   linear-gradient(135deg, #059669, #10B981);
  --grad-err:  linear-gradient(135deg, #DC2626, #EF4444);
  --gbtn:      linear-gradient(135deg, #7C3AED, #2563EB);

  /* Ombres */
  --shadow:    0 4px 20px rgba(0,0,0,.45);
  --shadow2:   0 8px 40px rgba(0,0,0,.55);
  --shadow3:   0 16px 60px rgba(0,0,0,.65);
  --glow-v:    0 0 30px rgba(124,58,237,.4);
  --glow-c:    0 0 20px rgba(34,211,238,.25);

  /* Rayons */
  --r:     20px;
  --rm:    14px;
  --rs:    10px;
  --rfull: 9999px;
  --t:     .22s ease;

  /* Inputs */
  --input: rgba(255,255,255,.055);
  --input-focus: rgba(124,58,237,.18);
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; transition: opacity var(--t); }
a:hover { opacity: .82; }
code, kbd, pre { font-family: 'Space Mono', monospace; }

/* ── Fond ambiant ─────────────────────────────────────── */
.bg-ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 5% 0%,   rgba(124,58,237,.14) 0, transparent 55%),
    radial-gradient(ellipse 75% 60% at 95% 100%, rgba(37,99,235,.11)  0, transparent 55%),
    radial-gradient(ellipse 55% 45% at 55% 15%,  rgba(34,211,238,.06) 0, transparent 45%);
}

/* ── Layout sidebar ──────────────────────────────────── */
.layout-admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--bord);
  display: flex; flex-direction: column;
  overflow-y: scroll; z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,.3);
  /* Scrollbar invisible mais fonctionnelle */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.sidebar::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.sidebar-logo {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--bord);
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.mbe-logo { display: flex; align-items: center; gap: 12px; }
.mbe-name { font-weight: 900; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.2; }
.mbe-name--sm { font-size: .9rem; }
.mbe-tagline { font-size: .72rem; color: var(--txt3); font-weight: 500; text-transform: uppercase; letter-spacing: .07em; }
.sidebar-nav { flex: 1; padding: 8px 8px; display: flex; flex-direction: column; gap: 1px; }
.nav-section { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--txt3); padding: 10px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--rs);
  color: var(--txt2); font-size: .84rem; font-weight: 500;
  transition: all var(--t); cursor: pointer; border: none; background: none; width: 100%;
}
.nav-item:hover { background: var(--glass2); color: var(--txt); }
.nav-item.active {
  background: rgba(124,58,237,.15);
  color: var(--violet-l);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--violet);
}
.nav-item .icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item .badge-nav { margin-left: auto; font-size: .65rem; padding: 2px 7px; border-radius: var(--rfull); background: var(--violet); color: #fff; font-weight: 700; }
.sidebar-footer { padding: 10px 14px; border-top: 1px solid var(--bord); flex-shrink: 0; }
.user-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gbtn); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; color: #fff; flex-shrink: 0; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 700; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .7rem; color: var(--txt3); }
.main-content { margin-left: 240px; padding: 28px 32px; min-height: 100vh; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first complet
   Breakpoints: 480px (xs), 640px (sm), 768px (md), 900px (lg)
   ════════════════════════════════════════════════════════════ */

/* ── Sidebar mobile : drawer depuis la gauche ─────────────── */
@media (max-width: 900px) {
  .layout-admin,
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 200; width: 260px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,.6); }
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 199; opacity: 0; pointer-events: none;
    transition: opacity .28s; backdrop-filter: blur(2px);
  }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }
  .main-content { margin-left: 0; padding: 16px 14px; }
  .burger { display: flex !important; }
}

/* ── Login layout ─────────────────────────────────────────── */
@media (max-width: 880px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { min-height: 100vh; padding: 32px 20px; }
  .login-card { max-width: 100%; }
}

/* ── Tables → scroll horizontal ──────────────────────────── */
@media (max-width: 768px) {
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 520px; }
  thead th, tbody td { padding: 9px 10px; font-size: .8rem; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .field-row { flex-direction: column; }
  .field-row > .field { min-width: 0; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h1 { font-size: 1.2rem; }
}

/* ── Smartphone ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .card { padding: 16px 14px; border-radius: var(--rm); }
  .card-top::before { border-radius: var(--rm) var(--rm) 0 0; }
  .auth-card { padding: 24px 18px; border-radius: var(--rm); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 14px 16px; }
  .stat-val { font-size: 1.6rem; }
  .btn { padding: 10px 14px; font-size: .84rem; }
  .btn-lg { padding: 13px 22px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select { font-size: 1rem; padding: 11px 12px; }
  .badge { font-size: .68rem; padding: 3px 8px; }
  .nav-section { display: none; } /* Masquer labels de section sur très petit */
  .nav-item { padding: 10px 10px; } /* Plus facile à tapper */
  .nav-item .icon { width: 32px; height: 32px; font-size: 1.1rem; }
}

/* ── XS — petit smartphone ────────────────────────────────── */
@media (max-width: 400px) {
  html { font-size: 15px; }
  .main-content { padding: 12px 10px; }
  .sidebar { width: 240px; }
  .stats-grid { grid-template-columns: 1fr; }
  .code-ag { font-size: 1.8rem; letter-spacing: .15em; }
  .login-right { padding: 24px 14px; }
}

/* ── Touch : targets min 44x44px ─────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .nav-item { min-height: 44px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { min-height: 44px; }
  .vote-option { padding: 16px 14px; min-height: 48px; }
  .asso-btn { min-height: 80px; }
}

/* ── Safe areas iOS (iPhone X et +) ─────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .sidebar-footer { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ── Mode sombre système (déjà dark, mais assurer cohérence) ─ */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

/* ── Mode paysage mobile ─────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .auth-wrap { padding: 12px; }
  .auth-card { padding: 20px 28px; }
  .auth-logo { margin-bottom: 12px; }
  .auth-logo img { width: 44px; height: 44px; }
  .auth-title { font-size: 1.1rem; margin-bottom: 4px; }
  .auth-sub { display: none; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .sidebar, .burger, nav, .btn, .page-header .btn { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ddd; box-shadow: none; background: #fff; color: #000; }
}


/* ── Page header ─────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Cartes ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r);
  padding: 24px 28px;
  position: relative;
  box-shadow: var(--shadow);
  transition: border-color var(--t);
}
.card:hover { border-color: var(--bord2); }
.card-top::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--grad); border-radius: var(--r) var(--r) 0 0;
}
.card-glass {
  background: rgba(22,19,42,.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bord2);
}

/* ── Stats grid ──────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all var(--t); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--grad); opacity: .5;
}
.stat-card:hover { border-color: var(--bord-v); transform: translateY(-2px); box-shadow: var(--glow-v); }
.stat-icon { font-size: 1.6rem; line-height: 1; }
.stat-val { font-size: 2rem; font-weight: 900; font-family: 'Space Mono', monospace; line-height: 1; letter-spacing: -.02em; }
.stat-lbl { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--txt2); }

/* ── Boutons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 20px; border-radius: var(--rs);
  font-family: 'Outfit', sans-serif; font-size: .9rem; font-weight: 700;
  border: none; cursor: pointer; transition: all var(--t);
  text-decoration: none; white-space: nowrap; line-height: 1;
  -webkit-user-select: none; user-select: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--gbtn); color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(124,58,237,.55); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--bord2); color: var(--txt2); }
.btn-outline:hover:not(:disabled) { border-color: var(--violet-l); color: var(--txt); background: rgba(124,58,237,.08); }
.btn-ghost { background: var(--glass); border: 1px solid var(--bord); color: var(--txt2); }
.btn-ghost:hover:not(:disabled) { background: var(--glass2); color: var(--txt); }
.btn-ok { background: var(--grad-ok); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,.3); }
.btn-err { background: var(--grad-err); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.25); }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: var(--rs); }
.btn-lg { padding: 15px 28px; font-size: 1rem; border-radius: var(--rm); }
.btn-icon { padding: 9px; border-radius: var(--rs); }

/* ── Formulaires ─────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: .84rem; font-weight: 700; color: var(--txt2);
  letter-spacing: .01em;
}
.field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.field-row > .field { flex: 1; min-width: 160px; margin-bottom: 0; }
/* v2.3.3 : CRITIQUE - exclure les checkbox/radio pour qu'elles restent natives et cliquables */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea, select {
  width: 100%; padding: 12px 14px;
  background: var(--input);
  border: 1.5px solid var(--bord2);
  border-radius: var(--rs);
  color: var(--txt); font-family: 'Outfit', sans-serif; font-size: .92rem;
  outline: none; transition: border-color var(--t), background var(--t), box-shadow var(--t);
  appearance: none; -webkit-appearance: none;
}
/* v2.4.31 : forcer le rendu sombre de la liste déroulante native, même si le système est en clair */
select { color-scheme: dark; }
select option, select optgroup {
  background: #1a1830;
  color: #EDEBFF;
}
select option:checked, select option:hover {
  background: #6C2BD9;
  color: #fff;
}
/* v2.3.3 : Style spécifique checkboxes/radios natives */
input[type="checkbox"], input[type="radio"] {
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus, select:focus {
  border-color: var(--violet-l);
  background: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
input::placeholder { color: var(--txt3); font-size: .88rem; }
textarea { resize: vertical; min-height: 90px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6882' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--rfull);
  font-size: .72rem; font-weight: 700; white-space: nowrap; line-height: 1;
}
.badge-violet { background: rgba(124,58,237,.18); color: var(--violet-l); border: 1px solid rgba(124,58,237,.3); }
.badge-ok     { background: rgba(16,185,129,.15);  color: var(--vert-l);   border: 1px solid rgba(16,185,129,.3); }
.badge-err    { background: rgba(239,68,68,.13);   color: #FCA5A5;         border: 1px solid rgba(239,68,68,.25); }
.badge-warn   { background: rgba(245,158,11,.13);  color: #FCD34D;         border: 1px solid rgba(245,158,11,.25); }
.badge-info   { background: rgba(34,211,238,.1);   color: var(--cyan);     border: 1px solid rgba(34,211,238,.25); }
.badge-blue   { background: rgba(37,99,235,.15);   color: var(--bleu-l);   border: 1px solid rgba(37,99,235,.3); }
.badge-pulse::before { content: '●'; margin-right: 4px; animation: pulse 1.4s infinite; }

/* ── Alertes ─────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--rm);
  font-size: .9rem; font-weight: 500; line-height: 1.5;
  margin-bottom: 18px;
}
.alert span:first-child { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-ok   { background: rgba(16,185,129,.1);  border: 1px solid rgba(16,185,129,.25);  color: var(--vert-l); }
.alert-err  { background: rgba(239,68,68,.09);  border: 1px solid rgba(239,68,68,.22);   color: #FCA5A5; }
.alert-warn { background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.22);  color: #FCD34D; }
.alert-info { background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.2);   color: var(--cyan); }

/* ── Tableaux ────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
  padding: 12px 16px; text-align: left;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--txt3); border-bottom: 1px solid var(--bord2); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--bord); transition: background var(--t); }
tbody tr:hover { background: var(--glass); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 13px 16px; vertical-align: middle; }

/* ── Auth / login ────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--bord2);
  border-radius: var(--r);
  padding: 40px 36px;
  box-shadow: var(--shadow3);
  position: relative; z-index: 1;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--grad); border-radius: var(--r) var(--r) 0 0;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: var(--rm); }
.auth-title { font-size: 1.45rem; font-weight: 900; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: .88rem; color: var(--txt2); text-align: center; margin-bottom: 28px; }

/* ── Profil ──────────────────────────────────────────── */
.profil-avatar-wrap {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--gbtn);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: #fff;
  border: 3px solid var(--bord-v); box-shadow: var(--glow-v);
  position: relative; overflow: hidden; cursor: pointer; flex-shrink: 0;
}
.profil-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profil-avatar-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--t);
  font-size: .75rem; font-weight: 700; color: #fff; flex-direction: column; gap: 4px;
}
.profil-avatar-wrap:hover .profil-avatar-overlay { opacity: 1; }

/* ── Code AG ─────────────────────────────────────────── */
.code-ag {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem; font-weight: 700; letter-spacing: .25em;
  color: var(--cyan); text-align: center;
  padding: 18px; background: rgba(34,211,238,.06);
  border: 2px solid rgba(34,211,238,.2); border-radius: var(--rm);
}

/* ── Vote card ───────────────────────────────────────── */
.vote-card {
  background: var(--surface2);
  border: 1.5px solid var(--bord2);
  border-radius: var(--r); padding: 22px 26px;
  transition: all var(--t);
}
.vote-card:hover { border-color: var(--bord-v); box-shadow: var(--glow-v); transform: translateY(-2px); }
.vote-card.active { border-color: var(--vert); box-shadow: 0 0 20px rgba(16,185,129,.2); }
.vote-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--rs);
  border: 1.5px solid var(--bord2); margin-bottom: 10px;
  cursor: pointer; transition: all var(--t); user-select: none;
}
.vote-option:hover { border-color: var(--violet-l); background: rgba(124,58,237,.08); }
.vote-option.selected { border-color: var(--violet); background: rgba(124,58,237,.15); }
.vote-option-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--bord2); flex-shrink: 0;
  transition: all var(--t); display: flex; align-items: center; justify-content: center;
}
.vote-option.selected .vote-option-dot { border-color: var(--violet); background: var(--violet); }

/* ── Animations ──────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.35} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideIn { from{opacity:0;transform:translateX(-12px)} to{opacity:1;transform:translateX(0)} }
@keyframes spin { to{transform:rotate(360deg)} }
@keyframes glow-pulse { 0%,100%{box-shadow:0 0 20px rgba(124,58,237,.3)} 50%{box-shadow:0 0 40px rgba(124,58,237,.6)} }

.fade-in { animation: fadeIn .25s ease forwards; }
.slide-in { animation: slideIn .22s ease forwards; }
.spin { animation: spin 1s linear infinite; }
.pulse-glow { animation: glow-pulse 2.5s infinite; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Toast ───────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: var(--rm);
  background: var(--surface2); border: 1px solid var(--bord2);
  box-shadow: var(--shadow2);
  font-size: .88rem; font-weight: 600;
  animation: fadeIn .25s ease forwards;
  min-width: 250px; max-width: 380px;
  pointer-events: all;
}
.toast-ok  { border-left: 4px solid var(--vert); }
.toast-err { border-left: 4px solid var(--rouge); }
.toast-info{ border-left: 4px solid var(--cyan); }

/* ── Responsive ──────────────────────────────────────── */

/* ── Utilitaires ─────────────────────────────────────── */
.soft     { color: var(--txt2); }
.muted    { color: var(--txt3); }
.mono     { font-family: 'Space Mono', monospace; }
.text-ok  { color: var(--vert-l); }
.text-err { color: #FCA5A5; }
.text-warn{ color: #FCD34D; }
.text-cyan{ color: var(--cyan); }
.text-v   { color: var(--violet-l); }
.fw-7     { font-weight: 700; }
.fw-9     { font-weight: 900; }
.mt-auto  { margin-top: auto; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden   { display: none !important; }
