/*
 * Charte du site civique-go.app : celle de l'app (src/styles/tokens.css : bleu nuit, bronze,
 * ivoire, bleu ; police Outfit), en plus spectaculaire pour la vitrine. Partagée par la vitrine
 * (index.html) et les pages « question + réponse » (scripts/build-seo.ts).
 * Garde-fous : aucun drapeau, aucun bleu-blanc-rouge, jamais Marianne (docs/DECISIONS.md).
 */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/outfit/outfit-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/outfit/outfit-latin-800-normal.woff2') format('woff2');
}

:root {
  --encre: #121b2f;
  --encre-2: #1b2742;
  --bronze: #b7873d;
  --bronze-clair: #d9a861;
  --ivoire: #f3f1ea;
  --bleu: #3f669d;
  --bg: var(--ivoire);
  --surface: #ffffff;
  --raised: #e9e4d6;
  --ink: var(--encre);
  --muted: #3f4a5c;
  --line: rgba(18, 27, 47, 0.14);
  --link: #8a6327;
  --shadow: 0 24px 60px rgba(18, 27, 47, 0.18);
  --f-display:
    'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-ui:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto,
    sans-serif;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1522;
    --surface: #161f30;
    --raised: #1d2840;
    --ink: #eef1f3;
    --muted: #a7b0bc;
    --line: rgba(238, 241, 243, 0.12);
    --link: var(--bronze-clair);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: var(--link);
}
:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 3px;
}
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

/* Barre du haut */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 27, 47, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  color: var(--ivoire);
  border-bottom: 1px solid rgba(243, 241, 234, 0.08);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  margin-inline-end: auto;
}
.navlinks {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.navlinks a {
  color: rgba(243, 241, 234, 0.8);
  text-decoration: none;
}
.navlinks a:hover {
  color: var(--ivoire);
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--bronze);
  color: #241404;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .navlinks {
    display: none;
  }
}

/* Boutons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  background: var(--bronze);
  color: #241404;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(183, 135, 61, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(183, 135, 61, 0.45);
}
.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1.5px solid rgba(243, 241, 234, 0.35);
  color: var(--ivoire);
  font-weight: 600;
}
.store-soon svg {
  flex: none;
}

/* Pages « question + réponse » et pages de document */
body.doc main {
  padding-block: 32px 64px;
  max-width: 780px;
}
.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.crumbs a {
  color: var(--muted);
}
body.doc h1 {
  font-size: clamp(26px, 5vw, 38px);
  margin: 8px 0 20px;
}
body.doc h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 6px;
}
.lede {
  color: var(--muted);
  font-size: 18px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag.official {
  background: rgba(63, 102, 157, 0.16);
  border-color: transparent;
  color: var(--ink);
}
.qa section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0;
}
.qa .answer {
  border: 2px solid var(--bleu);
}
.qa .answer p {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.qa section p {
  margin: 0;
}
.qa .source,
.credit,
.rights {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px !important;
}
.cta-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin: 28px 0;
  padding: 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(
      120% 140% at 100% 0%,
      rgba(183, 135, 61, 0.28),
      transparent 55%
    ),
    var(--encre);
  color: var(--ivoire);
}
.cta-box b {
  font-family: var(--f-display);
  font-size: 24px;
}
.cta-box span,
.cta-box small {
  color: rgba(243, 241, 234, 0.82);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
}
.qlist {
  padding-inline-start: 22px;
}
.qlist li {
  margin: 8px 0;
}
.themes {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.themes a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.themes span {
  color: var(--muted);
  white-space: nowrap;
}

/* Pied de page */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  font-size: 14px;
  color: var(--muted);
}
.foot p {
  margin: 6px 0;
}
.foot a {
  color: var(--muted);
}

/* Apparitions au défilement (désactivées si moins de mouvement est demandé) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
