/* ============ INVIA DESIGN SYSTEM ============ */
:root {
  /* Palette */
  --ink: #0E1A2B;          /* deep navy ink */
  --ink-2: #1A2738;
  --ink-soft: #3A4A5E;
  --cream: #F4EFE6;        /* warm paper */
  --cream-2: #EBE4D6;
  --cream-3: #DDD3BF;
  --bone: #FAF7F1;
  --sage: #5A7A6E;         /* muted growth */
  --sage-2: #4A6A5E;
  --gold: #B8945C;         /* warm gold accent */
  --gold-2: #A07F4A;
  --line: rgba(14,26,43,0.12);
  --line-2: rgba(14,26,43,0.06);
  --on-ink-line: rgba(244,239,230,0.14);
  --on-ink-line-2: rgba(244,239,230,0.08);

  /* Type */
  --serif: "Newsreader", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1240px;
  --container-tight: 980px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  display: none !important;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; color: var(--ink); }
h1 { font-size: clamp(48px, 7vw, 104px); letter-spacing: -0.025em; line-height: 0.98; }
h2 { font-size: clamp(36px, 4.6vw, 64px); letter-spacing: -0.02em; line-height: 1.02; }

/* Hero H1 — tiered hierarchy + swappable display font */
.hero-h1 { font-family: var(--hero-font, var(--serif)); }
.hero-line { display: block; }
.hero-line-primary {
  font-size: clamp(56px, 8.4vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-line-secondary {
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  margin-top: 28px;
  font-family: var(--serif);
}
.hero-line-secondary:nth-of-type(3) { margin-top: 36px; }
.hero-line-secondary + .hero-line-secondary { margin-top: 6px; }

/* Hero font variants — éditorial premium / financial services */
[data-hero-font="newsreader"]   { --hero-font: "Newsreader", Georgia, serif; }
[data-hero-font="source-serif"] { --hero-font: "Source Serif 4", "Newsreader", Georgia, serif; }
[data-hero-font="fraunces"]     { --hero-font: "Fraunces", "Newsreader", Georgia, serif; }
[data-hero-font="playfair"]     { --hero-font: "Playfair Display", "Newsreader", Georgia, serif; }

@media (max-width: 720px) {
  .hero-line-primary { font-size: clamp(42px, 11vw, 64px); }
  .hero-line-secondary { font-size: clamp(20px, 5.6vw, 28px); margin-top: 20px; }
}
h3 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; }
h4 { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.25; font-family: var(--sans); font-weight: 500; letter-spacing: -0.01em; }

.italic-soft { font-style: italic; color: var(--ink-soft); font-weight: 300; }

p.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }
p { color: var(--ink-soft); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(244,239,230,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(244,239,230,0.92); }
.nav-inner { display: contents; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark {
  width: 28px; height: 28px;
}
.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  font-weight: 500;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 14px; color: var(--ink); cursor: pointer;
  position: relative; padding: 6px 0;
  transition: color .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--gold-2); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--ink);
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang-toggle {
  display: flex; gap: 4px; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 999px;
}
.lang-toggle button { color: var(--ink-soft); padding: 0 4px; }
.lang-toggle button.active { color: var(--ink); }
.lang-toggle .sep { color: var(--line); }

/* CTA buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn .arr { display: inline-block; transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: white; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); color: var(--cream); }
.btn-link { padding: 0; background: transparent; color: var(--ink); border-bottom: 1px solid var(--ink); border-radius: 0; padding-bottom: 2px; }

/* ============ SECTIONS ============ */
section { padding: clamp(56px, 6vw, 96px) var(--gutter); }
.container { max-width: var(--container); margin: 0 auto; width: 100%; }
.container-tight { max-width: var(--container-tight); margin: 0 auto; width: 100%; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 60px;
  max-width: 900px;
}
.section-head .label { display: contents; }
.section-head .eyebrow { display: none !important; }
.section-head h2 { margin-bottom: 0; }
.section-head p.lead { margin-top: 24px; }
@media (max-width: 760px) {
  .section-head { margin-bottom: 40px; }
  .section-head p.lead { margin-top: 18px; }
}

/* Hero stat grid: 4 columns desktop → 2x2 mobile */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) {
  .grid-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    margin-top: 60px !important;
  }
  .grid-stats > .kpi:nth-child(1),
  .grid-stats > .kpi:nth-child(2) {
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }
  .grid-stats > .kpi:nth-child(odd) {
    padding-left: 0 !important;
    border-right: 1px solid var(--line) !important;
  }
  .grid-stats > .kpi:nth-child(even) {
    border-right: none !important;
    padding-left: 18px !important;
  }
  .grid-stats > .kpi { padding-right: 18px !important; }
  .kpi-num { font-size: clamp(34px, 9vw, 48px) !important; }
}

/* Page KPI band: 3 cols → 1 col mobile */
.page-kpi-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
@media (max-width: 760px) {
  .page-kpi-band { grid-template-columns: 1fr !important; }
  .page-kpi-band > * { padding-left: 0 !important; border-right: none !important; border-bottom: 1px solid var(--line); }
  .page-kpi-band > *:last-child { border-bottom: none; }
}

/* Calculator result numbers — mobile cap */
@media (max-width: 760px) {
  .calc-result-num {
    font-size: 36px !important;
    letter-spacing: -0.02em;
  }
}

.divider {
  height: 1px; background: var(--line); width: 100%;
}
.divider-dark { background: var(--on-ink-line); }

/* Dark section */
.dark-section { background: var(--ink); color: var(--cream); }
.dark-section h1, .dark-section h2, .dark-section h3, .dark-section h4 { color: var(--cream); }
.dark-section p, .dark-section .eyebrow { color: rgba(244,239,230,0.7); }
.dark-section .btn-primary { background: var(--cream); color: var(--ink); }
.dark-section .btn-primary:hover { background: white; }
.dark-section .btn-ghost { border-color: var(--on-ink-line); color: var(--cream); }
.dark-section .btn-ghost:hover { border-color: var(--cream); }
.dark-section .divider { background: var(--on-ink-line); }
.dark-section .eyebrow .dot { background: var(--gold); }

/* ============ FADE / SCROLL ANIMS ============ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
}
.fade-up.in { opacity: 1; transform: translateY(0); }
.fade-in {
  opacity: 0;
  transition: opacity 1.1s ease;
  transition-delay: var(--d, 0ms);
}
.fade-in.in { opacity: 1; }

/* ============ CARD STYLES ============ */
.card {
  border: 1px solid var(--line);
  background: var(--bone);
  border-radius: 4px;
  padding: 32px;
  transition: border-color .2s, transform .25s ease;
}
.card:hover { border-color: var(--ink-soft); }

.kpi {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.kpi-num {
  font-family: var(--serif);
  font-size: clamp(42px, 5.5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
.kpi-num .unit { font-size: 0.5em; color: var(--ink-soft); margin-left: 6px; vertical-align: 0.4em; font-family: var(--sans); font-weight: 400; }
.kpi-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

/* ============ FORMS ============ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.input, .textarea, .select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 17px;
  font-family: var(--serif);
  color: var(--ink);
  transition: border-color .2s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-bottom-color: var(--ink); }

/* Accessibilité : focus clavier visible (skip pour clic souris) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn, a[href], a[role="button"], button, [role="button"], input[type="submit"], input[type="button"], label[for], summary, .nav-link, .btn-link, .footer-link {
  cursor: pointer;
}
button[disabled], .btn[disabled], [aria-disabled="true"] { cursor: not-allowed; }

.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.textarea { font-family: var(--sans); font-size: 15px; min-height: 120px; resize: vertical; line-height: 1.5; }

/* dark form variant */
.dark-section .input, .dark-section .textarea, .dark-section .select {
  border-bottom-color: var(--on-ink-line); color: var(--cream);
}
.dark-section .input:focus, .dark-section .textarea:focus { border-bottom-color: var(--cream); }
.dark-section .input::placeholder { color: rgba(244,239,230,0.4); }

/* ============ STRIPED PLACEHOLDER ============ */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      var(--cream-2) 0 12px,
      var(--cream-3) 12px 24px);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
}
.placeholder.dark {
  background:
    repeating-linear-gradient(135deg,
      var(--ink-2) 0 12px,
      #243246 12px 24px);
}
.placeholder-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--cream);
  padding: 6px 12px;
  color: var(--ink-soft);
  border-radius: 2px;
}
.placeholder.dark .placeholder-label { background: var(--ink); color: rgba(244,239,230,0.7); }

/* ============ TICKER ============ */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  display: flex; gap: 60px;
  white-space: nowrap;
}
.ticker-track {
  display: flex; gap: 60px;
  animation: ticker 40s linear infinite;
  flex-shrink: 0;
  padding-right: 60px;
}
.ticker-item {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px;
}
.ticker-item .sep { color: var(--gold); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ============ FOOTER ============ */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px var(--gutter) 32px;
}
footer a { color: rgba(244,239,230,0.7); }
footer a:hover { color: var(--cream); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 60px;
  max-width: var(--container); margin: 0 auto 60px;
}
.footer-col h5 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(244,239,230,0.5); margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col li { font-size: 14px; }
.footer-bottom {
  max-width: var(--container); margin: 0 auto;
  padding-top: 24px; border-top: 1px solid var(--on-ink-line);
  display: flex; justify-content: space-between; gap: 20px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: rgba(244,239,230,0.5); text-transform: uppercase;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; }
}

/* ============ STICKY MOBILE CTA ============ */
.sticky-cta {
  display: none;
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 40;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  align-items: center; justify-content: space-between;
  box-shadow: 0 12px 30px rgba(14,26,43,0.18);
  font-size: 14px;
}
@media (max-width: 760px) { .sticky-cta { display: flex; } }
.sticky-cta-label {
  animation: stickyFade .55s cubic-bezier(.2,.7,.2,1);
  display: inline-block;
}
@keyframes stickyFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ MOBILE NAV ============ */
.menu-btn { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.menu-btn span { width: 22px; height: 1px; background: var(--ink); display: block; }
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--cream);
  padding: 24px var(--gutter);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,.2,.2,1);
  display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-links { display: flex; flex-direction: column; gap: 6px; margin-top: 60px; }
.mobile-menu-links a {
  font-family: var(--serif); font-size: 38px; line-height: 1.2;
  border-bottom: 1px solid var(--line); padding: 14px 0;
}
.mobile-menu-foot { margin-top: auto; }

/* ============ HERO MARQUE / LOGO ============ */
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  transition: opacity .2s;
}
.brand:hover .brand-logo { opacity: 0.8; }

/* ============ PARTNER LOGOS ============ */
.partners-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 44px 28px;
  border-right: 1px solid var(--line);
  min-height: 230px;
  text-decoration: none;
  color: inherit;
  transition: background-color .25s;
}
.partner:hover { background: rgba(0,0,0,0.02); }
.partner:last-child { border-right: none; }
.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  width: 100%;
}
.partner-logo {
  max-height: 110px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  transition: transform .25s;
}
.partner:hover .partner-logo {
  transform: scale(1.03);
}
/* Per-logo tuning so optical weight matches across very different aspect
   ratios. ASCQ is intentionally held back — its stacked layout (wordmark
   + tagline + "DEPUIS 1976") already reads big at smaller heights. */
.partner-logo[src*="partner-sfl"]  { max-height: 100px; }
.partner-logo[src*="partner-amf"]  { max-height: 90px; }
.partner-logo[src*="partner-rgcq"] { max-height: 104px; }
.partner-logo[src*="partner-ascq"] { max-height: 88px; }

.partner-url {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--ink-soft);
  transition: color .2s;
}
.partner:hover .partner-url {
  color: var(--ink);
}
@media (max-width: 900px) {
  .partners-row { grid-template-columns: repeat(2, 1fr); }
  .partner:nth-child(2) { border-right: none; }
  .partner:nth-child(1), .partner:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .partners-row { grid-template-columns: 1fr; }
  .partner { border-right: none; border-bottom: 1px solid var(--line); }
  .partner:last-child { border-bottom: none; }
}

/* ============ TEAM GRID ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.team-photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cream-2);
}
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85) contrast(1.02);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.team-card:hover .team-photo { transform: scale(1.03); }
@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .team-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; } }

/* Bulletin section (Pro page) */
.bulletin-grid { display: grid; }
@media (max-width: 900px) {
  .bulletin-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
}

/* tables */
.compare {
  width: 100%; border-collapse: collapse;
}
.compare th, .compare td {
  text-align: left; padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: top;
}
.compare th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); font-weight: 500;
  border-bottom: 1px solid var(--ink);
}
.compare td.win { color: var(--ink); font-weight: 500; }
.compare td.lose { color: var(--ink-soft); }
.compare .check { color: var(--sage); }
.compare .cross { color: var(--ink-soft); opacity: 0.5; }

/* utility */
.row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.spacer-sm { height: 20px; } .spacer-md { height: 40px; } .spacer-lg { height: 80px; }
.muted { color: var(--ink-soft); }
.text-right { text-align: right; }

/* page transition */
.page { animation: pagein .5s ease; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
