/*
 * site.css — VoteScope styles partagés
 * Inclus par toutes les pages publiques pour le chrome partagé.
 * Les classes sont namespacées en `vs-` pour éviter les collisions
 * avec les styles historiques intégrés à certaines pages.
 */

/* ─── Variables ─── */
:root {
  --bg:      #09111d;
  --surface: #111b2a;
  --surface2:#182539;
  --border:  #2a3850;
  --text:    #ecf1f9;
  --muted:   #9ea8bb;
  --gold:    #e8c96d;
  --blue:    #5e89ff;
  --red:     #ef6767;
  --green:   #54c596;
  --cyan:    #42d0f5;
  --shadow:  0 24px 60px rgba(0,0,0,.32);
  --max:     1200px;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left,   rgba(94,137,255,.16),  transparent 28%),
    radial-gradient(circle at top right,  rgba(239,103,103,.12), transparent 22%),
    radial-gradient(circle at bottom center, rgba(84,197,150,.10), transparent 28%),
    linear-gradient(180deg, #09111d 0%, #0b1320 100%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
.shell { max-width: var(--max); margin: 0 auto; padding: 28px 24px 80px; }

/* ─── Topbar ─── */
.vs-topbar-shell {
  width: 100%;
}

.vs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.vs-topbar-shell-projection {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13,15,20,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  margin-bottom: 24px;
}

.vs-topbar-projection {
  max-width: 1400px;
  margin: 0 auto;
}
.vs-brand { display: flex; align-items: center; gap: 14px; }
.vs-brand-mark {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #121926, #1f2940);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  flex-shrink: 0;
}
.vs-brand-mark svg { width: 28px; height: 28px; display: block; }
.vs-brand-copy strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--gold);
}
.vs-brand-copy span { color: var(--muted); font-size: 13px; }
.vs-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ─── Navigation topbar ─── */
.vs-topnav { display: flex; flex-wrap: wrap; gap: 8px; }
.vs-topnav a {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s;
  font-size: 12.5px;
}
.vs-topnav a:hover,
.vs-topnav a.active {
  color: var(--text);
  border-color: rgba(94,137,255,.42);
}

/* ─── Sélecteur de langue ─── */
.vs-lang-switch {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .05em;
  transition: background .15s, color .15s;
}
.lang-btn.active { background: var(--gold); color: #101522; }

/* ─── Pied de page ─── */
.vs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  color: var(--muted);
  font-size: .9rem;
}
.vs-footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.vs-footer-links a:hover { color: var(--text); }

/* ─── Réactif ─── */
@media (max-width: 720px) {
  .shell { padding: 18px 16px 56px; }
  .vs-topbar { align-items: flex-start; }
  .vs-topnav { gap: 6px; }
  .vs-topnav a { padding: 7px 11px; font-size: 12px; }
  .vs-footer { margin-top: 0; }
  .vs-topbar-shell-projection { padding: 10px 14px; }
}

/* ═══════════════════════════════════════════════
   Share / Embed
   ═══════════════════════════════════════════════ */
.vs-shareable { position: relative; }

.vs-share-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
  transition: color .15s, border-color .15s, background .15s;
  z-index: 10;
  padding: 0;
}
.vs-share-btn:hover {
  color: var(--text);
  border-color: rgba(94,137,255,.4);
  background: var(--surface2);
}
.vs-share-btn svg { width: 15px; height: 15px; }

.vs-share-panel {
  position: absolute;
  top: 46px; right: 12px;
  width: 268px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  z-index: 200;
}
.vs-share-panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 10px;
}
.vs-share-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.vs-share-action {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.vs-share-action:hover { border-color: rgba(94,137,255,.4); background: rgba(94,137,255,.08); }
.vs-share-action.vs-copied { color: var(--green); border-color: rgba(84,197,150,.4); }

.vs-embed-code { display: none; margin-top: 8px; }
.vs-embed-code.open { display: block; }
.vs-embed-code textarea {
  width: 100%;
  height: 78px;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-family: monospace;
  padding: 7px 8px;
  resize: none;
  margin-bottom: 6px;
  line-height: 1.5;
}
.vs-embed-copy-btn {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.vs-embed-copy-btn:hover { border-color: rgba(94,137,255,.4); }
.vs-embed-copy-btn.vs-copied { color: var(--green); }

/* ─── Mode embed (iframe) ─── */
body.vs-embed .vs-topbar,
body.vs-embed .vs-footer,
body.vs-embed header { display: none !important; }
body.vs-embed { background: var(--bg); }
body.vs-embed .shell { padding: 0; max-width: 100%; }
body.vs-embed .vs-shareable { display: none !important; }
body.vs-embed .vs-embed-active { display: block !important; border-radius: 0 !important; margin: 0 !important; }
body.vs-embed .vs-share-btn { display: none !important; }

.vs-embed-watermark {
  position: fixed;
  bottom: 8px; right: 10px;
  font-size: 10.5px;
  color: rgba(255,255,255,.28);
  z-index: 999;
  pointer-events: none;
}
.vs-embed-watermark a {
  color: rgba(255,255,255,.28);
  pointer-events: auto;
}
.vs-embed-watermark a:hover { color: rgba(255,255,255,.6); }

@media (max-width: 480px) {
  .vs-share-panel { width: calc(100vw - 24px); right: 0; }
}
