/* ============================================================
   HISTOZON — Design system  ·  LIGHT fintech base
   Energetic · trustworthy · grand-public
   Per-page <style> overrides --brand / --paper / fonts.
   ============================================================ */

:root {
  /* brand color — overridden per direction (green or amber) */
  --brand:      oklch(0.60 0.15 158);
  --brand-bright: oklch(0.68 0.16 158);
  --brand-deep: oklch(0.50 0.14 158);
  --brand-tint: color-mix(in oklab, var(--brand) 12%, white);
  --brand-line: color-mix(in oklab, var(--brand) 28%, white);
  --brand-ink:  #06281a;            /* text on brand fills */

  /* savings green (always green, even if brand is amber) */
  --deal:       oklch(0.56 0.15 158);
  --deal-bg:    color-mix(in oklab, oklch(0.62 0.16 158) 13%, white);
  --deal-line:  color-mix(in oklab, oklch(0.62 0.16 158) 30%, white);

  /* amazon buy (functional CTA only) */
  --buy-1: #ffd514; --buy-2: #ffb200; --buy-ink: #2a1d00;

  /* paper / surfaces (light) — --paper overridden per page */
  --paper:     oklch(0.988 0.004 95);
  --surface:   #ffffff;
  --surface-2: oklch(0.972 0.004 95);
  --surface-3: oklch(0.952 0.005 95);
  --ink-card:  oklch(0.18 0.02 264);   /* dark panel for contrast blocks */

  /* ink */
  --ink:       oklch(0.22 0.022 264);
  --ink-soft:  oklch(0.36 0.02 264);
  --ink-mute:  oklch(0.50 0.018 264);
  --ink-faint: oklch(0.64 0.016 264);

  --border:        oklch(0.22 0.02 264 / 0.11);
  --border-strong: oklch(0.22 0.02 264 / 0.20);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 9px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-2xl: 36px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 60px);

  --shadow-sm: 0 1px 2px oklch(0.2 0.05 264 / 0.06), 0 2px 8px -2px oklch(0.2 0.05 264 / 0.07);
  --shadow:    0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 40px -22px oklch(0.2 0.08 264 / 0.30);
  --shadow-lg: 0 30px 70px -30px oklch(0.2 0.08 264 / 0.40);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.6; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 600; line-height: 1.03; letter-spacing: -0.025em;
  margin: 0; text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }

/* kicker */
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-mute);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint); }

/* buttons */
.btn {
  --pad-y: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  padding: var(--pad-y) 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .16s ease, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-brand {
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 10px 24px -12px var(--brand);
}
.btn-brand:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 16px 30px -12px var(--brand); }
.btn-dark { background: var(--ink-card); color: #fff; }
.btn-dark:hover { transform: translateY(-1px); background: oklch(0.26 0.02 264); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.btn-buy {
  background: linear-gradient(180deg, var(--buy-1), var(--buy-2));
  color: var(--buy-ink); font-weight: 700; box-shadow: 0 10px 24px -12px var(--buy-2);
}
.btn-buy:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px var(--buy-2); }
.btn-lg { font-size: 17px; --pad-y: 17px; padding-inline: 28px; }
.btn-sm { font-size: 14px; --pad-y: 9px; padding-inline: 15px; }

/* pills */
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.pill-deal { background: var(--deal-bg); border-color: var(--deal-line); color: var(--deal); box-shadow: none; }
.pill-brand { background: var(--brand-tint); border-color: var(--brand-line); color: var(--brand-deep); box-shadow: none; }
.badge-pct {
  font-family: var(--font-mono); font-weight: 700; font-size: 12.5px;
  padding: 3px 8px; border-radius: 7px; background: var(--deal-bg); color: var(--deal); border: 1px solid var(--deal-line);
}
.badge-best {
  font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: .03em;
  padding: 3px 6px; border-radius: 6px; background: var(--deal); color: #fff; white-space: nowrap;
}

/* flags */
.flag { display: inline-block; width: 22px; height: 15px; border-radius: 3px; flex: none;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.10) inset, var(--shadow-sm); background-size: cover; }
.flag.lg { width: 28px; height: 19px; }
.flag-de { background: linear-gradient(180deg,#111 0 33.3%,#d00 0 66.6%,#fc0 0); }
.flag-fr { background: linear-gradient(90deg,#1b4fa0 0 33.3%,#fff 0 66.6%,#e1334a 0); }
.flag-it { background: linear-gradient(90deg,#1a8a4b 0 33.3%,#fff 0 66.6%,#e1334a 0); }
.flag-es { background: linear-gradient(180deg,#c60b1e 0 25%,#ffc400 0 75%,#c60b1e 0); }
.flag-nl { background: linear-gradient(180deg,#ae1c28 0 33.3%,#fff 0 66.6%,#21468b 0); }
.flag-be { background: linear-gradient(90deg,#111 0 33.3%,#fae042 0 66.6%,#ed2939 0); }
.flag-pl { background: linear-gradient(180deg,#fff 0 50%,#dc143c 0 100%); }
.flag-se { background: #006aa7; position: relative; }
.flag-se::before { content:""; position:absolute; inset:0; background:
  linear-gradient(90deg, transparent 31%, #fecc00 31% 44%, transparent 44%),
  linear-gradient(180deg, transparent 40%, #fecc00 40% 60%, transparent 60%); }

/* sections */
.sec { padding-block: clamp(60px, 8.5vw, 116px); }
.sec-head { max-width: 680px; margin-bottom: 52px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-title { font-size: clamp(30px, 4.4vw, 50px); }
.sec-sub { margin-top: 18px; color: var(--ink-mute); font-size: clamp(17px, 1.6vw, 19px); }
.eyebrow-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---- comparator result card (shared product UI) ---- */
.cmp {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cmp-head .lhs { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.cmp-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; color: var(--brand-ink); font-family: var(--font-display); font-weight: 700; }
.cmp-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row .ctry { display: flex; align-items: center; gap: 11px; font-weight: 600; min-width: 0; }
.cmp-row .price { font-family: var(--font-mono); font-weight: 700; font-size: 16px; white-space: nowrap; }
.cmp-row.best { background: var(--deal-bg); }
.cmp-row.here { background: var(--surface-2); }
.cmp-buy { font-family: var(--font-body); font-weight: 700; font-size: 13px; padding: 7px 13px;
  border-radius: 8px; background: linear-gradient(180deg,var(--buy-1),var(--buy-2)); color: var(--buy-ink); }

/* comparison matrix (vs competitors) */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15.5px; }
.matrix th, .matrix td { padding: 16px 18px; text-align: center; border-bottom: 1px solid var(--border); }
.matrix thead th { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.matrix tbody th { text-align: left; font-family: var(--font-body); font-weight: 600; color: var(--ink-soft); }
.matrix .col-us { background: var(--brand-tint); }
.matrix thead .col-us { border-radius: var(--r) var(--r) 0 0; }
.matrix .yes { color: var(--deal); font-weight: 700; }
.matrix .no { color: var(--ink-faint); }
.matrix tbody tr:last-child td, .matrix tbody tr:last-child th { border-bottom: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2vw, 21px); color: var(--ink); }
.faq-q .chev { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong);
  display: grid; place-items: center; transition: transform .25s, background .2s; color: var(--ink-mute); }
.faq-item[open] .faq-q .chev { transform: rotate(45deg); background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.faq-a { padding: 0 0 26px; color: var(--ink-mute); max-width: 760px; font-size: 16.5px; }
details.faq-item summary { list-style: none; }
details.faq-item summary::-webkit-details-marker { display: none; }

/* footer */
.foot { background: var(--ink-card); color: oklch(0.78 0.02 264); }
.foot a { color: oklch(0.78 0.02 264); transition: color .15s; }
.foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px 28px; }
.foot h5 { font-family: var(--font-display); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  color: oklch(0.62 0.02 264); margin: 0 0 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14.5px; }

/* utilities */
.muted { color: var(--ink-mute); } .soft { color: var(--ink-soft); }
.brand-txt { color: var(--brand-deep); } .deal-txt { color: var(--deal); }
.center { text-align: center; } .nowrap { white-space: nowrap; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cmp-row { grid-template-columns: minmax(0,1fr) auto; }
  .cmp-row .pct-cell { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* --- Selecteur de langue (8 langues, aliment par les hreflang de la page) --- */
.flag-gb { background:
  linear-gradient(90deg, transparent 40%, #c8102e 40% 60%, transparent 60%),
  linear-gradient(180deg, transparent 36%, #c8102e 36% 64%, transparent 64%),
  linear-gradient(90deg, transparent 34%, #fff 34% 66%, transparent 66%),
  linear-gradient(180deg, transparent 28%, #fff 28% 72%, transparent 72%),
  #012169; }
.langsel { position: relative; display: inline-block; }
.langsel > button { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: .82rem; line-height: 1; color: var(--ink-soft);
  background: none; border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; }
.langsel > button:hover { color: var(--ink); border-color: var(--border-strong);
  background: color-mix(in oklab, var(--brand) 7%, transparent); }
.langsel > button::after { content: ""; width: 0; height: 0; margin-left: 1px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55; }
.langsel ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: 4px; list-style: none; min-width: 172px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 10px 28px oklch(0.22 0.02 264 / 0.16); }
.langsel ul[hidden] { display: none; }
.langsel li { list-style: none; }
.langsel li a { display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: 6px; font-size: .86rem; color: var(--ink); text-decoration: none; }
.langsel li a:hover { background: color-mix(in oklab, var(--brand) 10%, transparent); text-decoration: none; }
.langsel li a[aria-current="true"] { font-weight: 600;
  background: color-mix(in oklab, var(--brand) 6%, transparent); }
@media (max-width: 640px) { .langsel ul { min-width: 152px; } }
