/* EuroConstat site — design tokens, reset, typography, buttons, header,
   footer. Shared by every page; page-specific styles live in home.css and
   legal.css. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #0241b1;
  --brand-700: #01338c;
  --brand-50: #eef3ff;
  --brand-100: #dce6fd;
  --navy: #051538;
  --navy-2: #0a2763;
  --accent: #ffcc00;
  --ink: #0b1530;
  --ink-2: #2c3a57;
  --muted: #5a6782;
  --line: #e2e8f2;
  --soft: #f5f7fc;
  --white: #ffffff;
  --success: #0f8a5f;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(11, 21, 48, .06), 0 1px 3px rgba(11, 21, 48, .08);
  --shadow: 0 4px 12px rgba(11, 21, 48, .06), 0 12px 32px rgba(11, 21, 48, .08);
  --shadow-lg: 0 24px 60px rgba(5, 21, 56, .18), 0 8px 20px rgba(5, 21, 56, .10);

  --header-h: 72px;
  --gutter: 24px;
  --max: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}

/* While a non-French translation loads, keep the French page from
   flashing (see the inline script in each page's <head>). */
html.i18n-loading body { opacity: 0; }

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.022em;
  line-height: 1.12;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: 12px; box-shadow: var(--shadow); }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--brand-700); }
.btn--light { background: var(--white); color: var(--brand); }
.btn--light:hover { background: var(--brand-50); }

/* App Store / Google Play buttons, styled like the official badges. */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.store-btn svg { width: 26px; height: 26px; fill: currentColor; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn small { font-size: 11px; font-weight: 500; letter-spacing: .02em; opacity: .9; }
.store-btn strong { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
/* On the home page the header starts transparent over the dark hero. */
.site-header--overlay:not(.is-solid):not(.is-open) {
  color: var(--white);
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }

.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: inherit;
  font-size: 15px;
  font-weight: 550;
  white-space: nowrap;
  opacity: .82;
}
.main-nav a:hover { opacity: 1; text-decoration: none; background: color-mix(in srgb, currentColor 8%, transparent); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}
.lang-picker .icon { width: 18px; height: 18px; opacity: .8; }
.lang-picker select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding-right: 4px;
  cursor: pointer;
}
.lang-picker select option { color: var(--ink); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.site-header.is-open .menu-toggle .icon-open { display: none; }
.site-header.is-open .menu-toggle .icon-close { display: block; }

@media (max-width: 1100px) {
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 17px; opacity: 1; }
  .site-header.is-open .main-nav { display: flex; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .site-header .container { gap: 8px; }
  .header-download { display: none; }
  .brand { font-size: 17px; }
  .brand img { width: 32px; height: 32px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 72px 0 32px;
  background: var(--navy);
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
}
.site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}
.footer-brand .brand { color: var(--white); }
.footer-brand p { max-width: 300px; margin-top: 14px; }
.footer-col h3 {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .02em;
}
.footer-col li + li { margin-top: 10px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px;
}
.footer-bottom .lang-picker { color: var(--white); }
.footer-note { color: rgba(255, 255, 255, .55); }
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
