:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1b2430;
  --muted: #5b6675;
  --border: #e3e7ee;
  --accent: #2f6fed;
  --accent-dark: #2255c7;
  --radius: 12px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --bg-alt: #171d25;
    --text: #e8ecf2;
    --muted: #9aa5b4;
    --border: #2a323d;
    --accent: #6398ff;
    --accent-dark: #4f83e8;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}
.brand img { display: block; width: 32px; height: 32px; }
.nav {
  display: flex;
  gap: 24px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}
.nav a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 72px 0 64px;
  background: radial-gradient(1200px 400px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 44px;
  align-items: center;
}
.hero-figure { margin: 0; }
.hero-figure img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { max-width: none; }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 16ch;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 28px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-dark {
  background: #1c1636;
  color: #fff;
  border-radius: 0;
}
.btn-dark:hover { background: #0f0b21; }

/* Trial / "Essai gratuit" block */
.trial {
  background:
    linear-gradient(160deg, rgba(75, 31, 184, .92) 0%, rgba(55, 18, 160, .94) 55%, rgba(43, 13, 134, .96) 100%),
    #2b0d86 url('assets/reseau.jpg') center / cover no-repeat;
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.trial-inner { max-width: 760px; }
.trial-logo {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
}
.trial h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 28px;
}
.trial-form { display: block; }
.trial-consent {
  display: flex;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto 14px;
}
.trial-consent input { margin-top: 3px; flex: 0 0 auto; }
.trial-terms {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 auto 20px;
  max-width: 620px;
}
.trial a { color: #fff; text-decoration: underline; }
.trial-field {
  display: flex;
  max-width: 620px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.trial-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  padding: 16px 18px;
  font-size: 16px;
  color: #1b2430;
  background: #fff;
}
.trial-field input:focus { outline: 2px solid #b9a7ff; outline-offset: -2px; }
.trial-field .btn-dark {
  flex: 0 0 auto;
  padding: 16px 24px;
  border: none;
}
.trial-region {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 0;
}
.trial-msg {
  max-width: 620px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}
.trial-msg.ok { background: rgba(31, 157, 87, .95); color: #fff; }
.trial-msg.err { background: rgba(255, 255, 255, .95); color: #b4232b; }

@media (max-width: 560px) {
  .trial-field { flex-direction: column; border-radius: 10px; }
  .btn-dark { border-radius: 0; }
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 0 0 32px;
}

/* Grid + cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
}
.card img {
  display: block;
  width: calc(100% + 48px);
  margin: -24px -24px 16px;
  height: 168px;
  object-fit: cover;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

/* Image band */
.band { padding: 64px 0; }
.band .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.band-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.band-media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}
.band-copy h2 { margin: 0 0 12px; }
.band-copy p { margin: 0; color: var(--muted); font-size: 17px; }
@media (max-width: 820px) {
  .band .container { grid-template-columns: 1fr; gap: 24px; }
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.steps li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); }

/* Client logo marquee — rides on the "Essayez gratuitement" block */
.trial .marquee {
  position: relative;
  width: 100%;
  margin-top: 44px;
  overflow: hidden;
  /* logos are white on transparent PNG; screen also flattens any residual
     dark matte on the antialiased edges against the purple block */
  mix-blend-mode: screen;
}
.marquee-fade {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 72s linear infinite;
}
.trial .marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 0 32px;
  flex: none;
}
.marquee-group img {
  display: block;
  height: 62px;
  width: auto;
  object-fit: contain;
  opacity: .85;
  transition: opacity .2s ease;
}
/* wordmark-heavy logos read small at the base height — bump them up */
.marquee-group img[src*="client-bnpp"],
.marquee-group img[src*="client-pernod"],
.marquee-group img[src*="client-macif"],
.marquee-group img[src*="client-covea"],
.marquee-group img[src*="client-ca-white"] {
  height: 86px;
}
.marquee-group img:hover { opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-fade { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; }
  .marquee-group { flex-wrap: wrap; justify-content: center; }
  .marquee-group[aria-hidden="true"] { display: none; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.footer-brand img { display: block; width: 24px; height: 24px; }
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-mail svg { flex: none; }

/* Responsive */
@media (max-width: 720px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav-toggle { display: inline-flex; }
}
