/* CitéVotechain — site public statique. Aucune ressource de tiers : polices servies d'ici (OFL), aucun style en ligne
   (la CSP l'interdit : style-src 'self'). Couleurs reprises de l'application (bleu #0b3d91, or #f1b500). */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
}

:root {
  --ink: #16203a;
  --muted: #4a5470;
  --paper: #f8f6f1;
  --card: #ffffff;
  --line: #e2ddd0;
  --navy: #0b3d91;
  --navy-deep: #082a66;
  --navy-night: #061d47;
  --sky: #e6eefa;
  --gold: #f1b500;
  --gold-soft: #fff4d1;
  --ok: #17663a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(6, 29, 71, 0.08), 0 12px 32px rgba(6, 29, 71, 0.12);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-deep); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--gold); color: var(--navy-night); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; }

/* ---------- En-tête ---------- */
.top {
  background: var(--navy-night);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.005em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #dbe4f6; text-decoration: none; font-size: 0.95rem; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav .nav-cta { background: var(--gold); color: var(--navy-night); font-weight: 600; margin-left: 8px; white-space: nowrap; }
.nav .nav-cta:hover { background: #ffc61f; color: var(--navy-night); }
@media (max-width: 760px) { .nav a:not(.nav-cta) { display: none; } }

/* ---------- Héros ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(241, 181, 0, 0.16), transparent 60%),
    radial-gradient(700px 520px at 0% 100%, rgba(77, 132, 230, 0.28), transparent 60%),
    linear-gradient(180deg, var(--navy-night) 0%, var(--navy-deep) 100%);
}
.hero::after {
  /* trame discrète : des lignes de registre */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 36px);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr); gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 88px;
}
@media (max-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 56px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
.hero h1 { font-size: clamp(2.35rem, 4.6vw, 3.45rem); font-weight: 700; margin: 18px 0 22px; }
.hero h1 em { display: block; font-style: normal; color: var(--gold); text-wrap: balance; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: #dbe4f6; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 14px 22px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy-night); }
.btn-gold:hover { background: #ffc61f; color: var(--navy-night); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-navy { background: var(--navy); color: #fff; width: 100%; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-line { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-line:hover { border-color: var(--navy); color: var(--navy-deep); }
.note { margin-top: 22px; font-size: 0.92rem; color: #b9c7e4; }

/* ---------- Le bulletin d'exemple ---------- */
.ballot {
  background: var(--card); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden; scroll-margin-top: 24px;
}
.ballot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; background: var(--sky); border-bottom: 1px solid #d3dff3;
  font-size: 0.85rem; font-weight: 600; color: var(--navy-deep); letter-spacing: 0.02em;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: #6b4d00; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ballot-body { padding: 26px 24px 22px; }
.ballot-q { font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 700; }
.ballot-ctx { margin-top: 12px; color: var(--muted); font-size: 0.97rem; }
.ballot-src { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.ballot-src a { color: var(--muted); }
.ballot-src a:hover { color: var(--navy); }

.choices { border: 0; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  font-weight: 600; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.choice span::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #8c96ad; background: #fff; transition: all 0.15s ease;
}
.choice:hover span { border-color: #b9c4dc; }
.choice input:checked + span { border-color: var(--navy); background: #f3f7fe; }
.choice input:checked + span::before { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 4px #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.ballot-actions { margin-top: 20px; }
.msg { min-height: 1.5em; margin-top: 10px; font-size: 0.92rem; color: #9a2b1f; }

.ballot-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-top: 1px dashed var(--line); background: #fbfaf7;
  font-size: 0.9rem; color: var(--muted);
}
.ballot-foot svg { width: 18px; height: 18px; flex: none; color: var(--navy); }

/* dépôt : le bulletin glisse dans l'urne */
.drop { display: none; padding: 26px 24px 10px; }
.drop .slot { position: relative; height: 112px; margin: 0 auto; width: 180px; }
.drop .paper {
  position: absolute; left: 50%; top: 0; width: 64px; height: 80px; margin-left: -32px;
  background: #fff; border: 2px solid var(--navy); border-radius: 6px;
  display: grid; place-items: center; color: var(--gold);
}
.drop .paper svg { width: 30px; height: 30px; }
.drop .box {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
  background: var(--navy); border-radius: 10px;
}
.drop .box::before {
  content: ""; position: absolute; left: 50%; top: -4px; width: 84px; height: 8px; margin-left: -42px;
  background: var(--navy-night); border-radius: 4px;
}
.ballot.is-dropping .drop { display: block; }
.ballot.is-dropping .paper { animation: slide 0.9s cubic-bezier(0.5, 0, 0.75, 0.2) forwards; }
@keyframes slide { 0% { transform: translateY(0); } 100% { transform: translateY(70px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ballot.is-dropping .paper { animation: none; opacity: 0; } }

.ballot.is-dropping .vote,
.ballot.is-done .vote { display: none; }

.receipt { display: none; padding: 26px 24px 22px; }
.ballot.is-done .receipt { display: block; }
.ok {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ok);
}
.ok svg { width: 28px; height: 28px; }
.receipt-label { margin-top: 18px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.code {
  margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--sky); color: var(--navy-night);
  font-family: var(--mono); font-size: 0.92rem; line-height: 1.5; overflow-wrap: anywhere;
}
.code-hash { background: #f1efe9; color: var(--ink); font-size: 0.85rem; }
.receipt p:not([class]) { margin-top: 12px; color: var(--muted); font-size: 0.97rem; }
.receipt p:not([class]) strong { color: var(--ink); }
.receipt .demo { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); color: #5c4200; font-size: 0.9rem; }
.receipt .btn { margin-top: 18px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 44px; }
.kicker { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }
@media (max-width: 760px) { .section { padding: 60px 0; } .section-head { margin-bottom: 32px; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li {
  position: relative; padding: 26px 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--navy); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin-bottom: 18px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.98rem; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.card .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: var(--gold); display: grid; place-items: center; }
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }

.status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .status { grid-template-columns: minmax(0, 1fr); } }
.status-col { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.status-col h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.status-col h3 .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); }
.status-col.next h3 .dot { background: var(--gold); }
.status-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.status-col li { position: relative; padding-left: 30px; color: var(--ink); }
.status-col li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 6px;
  background: #e3f1e8; border: 2px solid var(--ok);
}
.status-col.next li::before { background: var(--gold-soft); border-color: #c99700; }
.status-note { margin-top: 24px; color: var(--muted); font-size: 0.95rem; }

/* ---------- Pied de page ---------- */
.foot { background: var(--navy-night); color: #c3cfe8; padding: 44px 0; font-size: 0.95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.foot .brand-name { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: #e3eaf8; }
.foot a:hover { color: #fff; }
.foot-tag { margin-top: 6px; }

/* ---------- Pages de texte (confidentialité, 404) ---------- */
.page { padding: 64px 0 88px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin-bottom: 20px; }
.page h2 { font-size: 1.45rem; margin: 36px 0 10px; }
.page p, .page li { color: var(--ink); }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 1.2em; margin: 10px 0 0; }
.page li + li { margin-top: 6px; }
.page .updated { margin-top: 36px; color: var(--muted); font-size: 0.92rem; }
.big404 { font-family: var(--serif); font-weight: 700; font-size: clamp(4rem, 14vw, 7rem); line-height: 1; color: var(--navy); }

/* Petits téléphones : l'en-tête doit tenir sur 375 px (bouton sur une ligne, logo et nom compris). */
@media (max-width: 420px) {
  .top .wrap { gap: 10px; }
  .brand { gap: 9px; }
  .brand svg { width: 32px; height: 32px; }
  .brand-name { font-size: 1.12rem; }
  .nav .nav-cta { margin-left: 0; padding: 8px 11px; font-size: 0.9rem; }
}
