/* ==========================================================
   AirCarto — refonte 2026
   Système design moderne, IoT / Smart City
   ========================================================== */

:root {
  /* Brand */
  --brand: #2f7fd1;          /* AirCarto bleu, légèrement modernisé */
  --brand-strong: #1d5fa8;
  --brand-soft: #e8f1fb;
  --brand-ink: #0b2545;

  /* Neutres (warm-cool mix) */
  --ink: #0a1626;
  --ink-2: #2a3954;
  --ink-3: #5a6a83;
  --ink-4: #8b97ad;
  --line: #e6ebf2;
  --line-2: #f0f3f8;
  --bg: #fbfcfd;
  --surface: #ffffff;
  --surface-2: #f5f7fa;

  /* Air Quality scale (utile partout) */
  --aq-good: #2bb673;
  --aq-mid:  #f3c64a;
  --aq-bad:  #e87b3a;
  --aq-vbad: #d94545;
  --aq-extr: #8a3aa8;

  /* Type */
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --maxw: 1280px;
  --gutter: 24px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;

  /* Density (tweakable) */
  --section-py: 96px;
  --card-pad: 28px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(11,37,69,.04), 0 1px 1px rgba(11,37,69,.03);
  --shadow-md: 0 4px 14px rgba(11,37,69,.06), 0 2px 4px rgba(11,37,69,.04);
  --shadow-lg: 0 18px 40px rgba(11,37,69,.10), 0 4px 10px rgba(11,37,69,.05);
}

[data-theme="dark"] {
  --ink: #f4f7fb;
  --ink-2: #c5d0e1;
  --ink-3: #8b97ad;
  --ink-4: #5a6a83;
  --line: #1e2a3d;
  --line-2: #15202f;
  --bg: #0a1220;
  --surface: #0f1a2c;
  --surface-2: #14223a;
  --brand-soft: #122948;
  --brand-ink: #e8f1fb;
}

[data-density="compact"] {
  --section-py: 64px;
  --card-pad: 22px;
}
[data-density="comfortable"] {
  --section-py: 120px;
  --card-pad: 36px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  position: relative;
}
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1100px;
  background-image: url("images/topo_big3.png");
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: top center;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}
body > * { position: relative; z-index: 1; }
[data-theme="dark"] body::before {
  opacity: 0.12;
  filter: invert(1);
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1) sepia(0.2) hue-rotate(180deg) saturate(2);
}

img { max-width: 100%; display: block; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout helpers */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-py) 0; }
.section-tight { padding: calc(var(--section-py) * .55) 0; }

/* Type */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.08; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--card-pad);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--line)); }

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.tag.brand { background: var(--brand-soft); color: var(--brand-strong); }
.tag.good { background: color-mix(in oklab, var(--aq-good) 14%, transparent); color: #1a8055; }
.tag.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Divider */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Grids */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Section header */
.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.sec-head h2 { max-width: 22ch; }
.sec-head p { max-width: 44ch; color: var(--ink-3); font-size: 15px; }

/* Utility motion */
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 6px transparent; opacity: .55; }
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--aq-good); color: var(--aq-good);
  animation: pulseDot 1.8s ease-in-out infinite;
  display: inline-block;
}

/* ====== NAV ====== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.nav-logo .mark {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
}
.nav-logo .mark::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  bottom: -4px; right: -2px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
}
.nav-links a {
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.lang-switch {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lang-switch .lang-opt {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink-3);
  letter-spacing: inherit;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 5px;
  transition: color .15s ease, background .15s ease;
}
.lang-switch .lang-opt:hover { color: var(--ink-1); }
.lang-switch .lang-opt.is-active {
  color: var(--brand);
  font-weight: 600;
}
.lang-switch .lang-sep { color: var(--line); }

/* ====== HERO ====== */
.hero {
  padding: 72px 0 32px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 .accent {
  background: linear-gradient(180deg, transparent 60%, color-mix(in oklab, var(--brand) 25%, transparent) 60%);
  padding: 0 4px;
}
.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2);
  max-width: 52ch;
  margin-top: 24px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  flex-wrap: wrap;
}
.hero-meta .stat .n {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-meta .stat .l {
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ====== HERO MAP / DASHBOARD ====== */
.hero-viz {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.viz-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  z-index: 3;
}
.viz-header .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aq-good);
  font-weight: 500;
}
.viz-map {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, color-mix(in oklab, var(--brand) 8%, transparent) 0, transparent 50%),
    radial-gradient(circle at 70% 60%, color-mix(in oklab, var(--brand) 6%, transparent) 0, transparent 50%),
    var(--surface);
}

/* SVG topo lines */
.viz-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.viz-pin {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
}
.viz-pin::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.4;
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
.viz-pin.good { background: var(--aq-good); color: var(--aq-good); }
.viz-pin.mid  { background: var(--aq-mid);  color: var(--aq-mid); }
.viz-pin.bad  { background: var(--aq-bad);  color: var(--aq-bad); }
.viz-pin.vbad { background: var(--aq-vbad); color: var(--aq-vbad); }

/* Live readout panel inside hero */
.viz-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: color-mix(in oklab, var(--surface) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  backdrop-filter: blur(8px);
  z-index: 3;
}
.viz-panel .metric .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.viz-panel .metric .val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}
.viz-panel .metric .val small {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.viz-panel .metric .bar {
  margin-top: 8px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.viz-panel .metric .bar > i {
  position: absolute;
  inset: 0;
  width: var(--w, 50%);
  background: var(--c, var(--aq-good));
  border-radius: 2px;
}

/* ====== HERO DASHBOARD ====== */
.hero-dash {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
}
.dash-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dash-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--aq-good);
  font-weight: 500;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.kpi {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
}
.kpi-lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kpi-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}
.kpi-u {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.kpi-trend {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.kpi-trend.up { color: var(--aq-bad); }
.kpi-trend.down { color: var(--aq-good); }
.kpi-trend.ok { color: var(--aq-good); }
.kpi-trend.warn { color: var(--aq-mid); }

.dash-chart, .dash-heatmap {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--line);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.chart-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chart-legend {
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chart-legend i {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.chart-svg {
  width: 100%;
  height: 110px;
  display: block;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-4);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.heat-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.heat-row {
  display: grid;
  grid-template-columns: 18px repeat(24, 1fr);
  gap: 3px;
  align-items: center;
}
.heat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
}
.heat-cell {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  display: block;
  opacity: 0.9;
}

/* ====== MARQUEE BAR (legacy / unused) ====== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 56px;
  align-items: center;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  width: fit-content;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}
.marquee-item .v {
  color: var(--ink);
  font-weight: 600;
}
.marquee-item .sep {
  width: 4px; height: 4px; background: var(--ink-4); border-radius: 50%;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ====== AUDIENCE ====== */
.audience {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 920px) {
  .audience { grid-template-columns: 1fr; }
}
.aud {
  padding: 36px 32px 32px;
  border-radius: calc(var(--radius-lg) - 6px);
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
}
.aud:hover { background: var(--surface-2); }
.aud .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.aud h3 { margin: 14px 0 10px; }
.aud p { font-size: 14.5px; color: var(--ink-3); }
.aud .arrow {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* ====== PRODUCT CARDS ====== */
.products {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.prod {
  grid-column: span 6;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.prod:hover {
  border-color: color-mix(in oklab, var(--brand) 35%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.prod.featured { grid-column: span 12; }
.prod.tri { grid-column: span 4; }

@media (max-width: 920px) {
  .prod, .prod.featured, .prod.tri { grid-column: span 12; }
}

.prod-media {
  aspect-ratio: 16 / 11;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.prod.featured .prod-media { aspect-ratio: 21 / 10; }
.prod.tri .prod-media { aspect-ratio: 4 / 3; }
.prod-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.prod:hover .prod-media img { transform: scale(1.03); }

.prod-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
}

.prod-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.prod.tri .prod-body { padding: 22px; }
.prod-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.prod.tri .prod-name { font-size: 22px; }
.prod-sub {
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-top: -8px;
}
.prod-desc {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.prod-specs {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.prod-specs .spec {
  flex: 1 1 auto;
  min-width: 100px;
}
.prod-specs .spec .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: block;
}
.prod-specs .spec .v {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 3px;
}
.prod-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Featured product spans full width with a side layout */
.prod.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}
.prod.featured .prod-media { aspect-ratio: auto; min-height: 460px; }
.prod.featured .prod-body { padding: 44px; gap: 18px; justify-content: center; }
.prod.featured .prod-name { font-size: clamp(28px, 2.6vw, 38px); }
@media (max-width: 920px) {
  .prod.featured { grid-template-columns: 1fr; }
  .prod.featured .prod-media { min-height: 280px; }
  .prod.featured .prod-body { padding: 28px; }
}

/* ====== HOW IT WORKS ====== */
.how {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 920px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .how-grid { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 24px 0;
}
.step .step-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.step h4 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 12px 0 8px;
  color: var(--ink);
}
.step p { font-size: 14px; color: var(--ink-3); }
.step-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ====== DATA / OPENAIRMAP ====== */
.openair-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--surface);
  position: relative;
}
.openair-bar {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.openair-bar .url { color: var(--ink); }
.openair-frame iframe {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}
.openair-stage {
  position: relative;
}
.openair-shield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  background: color-mix(in oklab, var(--brand-ink) 28%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  transition: background .2s ease, backdrop-filter .2s ease;
  z-index: 5;
}
.openair-shield:hover {
  background: color-mix(in oklab, var(--brand-ink) 18%, transparent);
}
.openair-shield-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.openair-shield-inner svg { color: var(--brand); }
.openair-shield-hint {
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.openair-frame.is-active { box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 60%, transparent), var(--shadow-md); border-color: var(--brand); }
.openair-release {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-right: 12px;
  transition: background .15s ease;
}
.openair-release:hover { background: var(--line); color: var(--ink); }

/* ====== PARTNERS ====== */
.partners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
@media (max-width: 760px) { .partners { grid-template-columns: repeat(2, 1fr); } }
.partner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  opacity: 0.7;
  transition: opacity .2s, filter .2s;
}
.partner:hover { filter: none; opacity: 1; }
.partner img { max-height: 100%; max-width: 80%; object-fit: contain; }

/* ====== CTA BAND ====== */
.cta-band {
  background: var(--brand-ink);
  border-radius: var(--radius-lg);
  padding: 56px 56px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, color-mix(in oklab, var(--brand) 50%, transparent) 0, transparent 40%),
    radial-gradient(circle at 10% 100%, color-mix(in oklab, var(--brand) 30%, transparent) 0, transparent 40%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.78); }
.cta-band .btn-primary { background: #fff; color: var(--brand-ink); }
.cta-band .btn-primary:hover { background: rgba(255,255,255,0.9); color: var(--brand-ink); }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.25); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 760px) { .cta-band { padding: 36px; grid-template-columns: 1fr; } }

/* ====== FOOTER ====== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 14px; }
.footer ul a:hover { color: var(--ink); text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 16px;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.socials a:hover { background: var(--brand); color: #fff; }

/* ==========================================================
   PARTNER SPOTLIGHT (AtmoSud + Re Lion Factory)
   ========================================================== */
.partner-spot { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .partner-spot { background: var(--surface); }

.partner-spot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 980px) { .partner-spot-grid { grid-template-columns: 1fr; } }

.pspot {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pspot:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-md); }

.pspot-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--brand-soft) 0%, color-mix(in oklab, var(--brand-soft) 60%, var(--surface-2)) 100%);
  overflow: hidden;
}
.pspot-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pspot-media--contain { background: #ffffff; }
.pspot-media--contain img { object-fit: contain; padding: 26px 32px; }
[data-theme="dark"] .pspot-media--contain { background: #f5f7fa; }

.pspot-media-cap {
  position: absolute;
  bottom: 14px; left: 14px;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pspot-body {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pspot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.pspot-logo {
  height: 38px;
  width: auto;
  display: block;
}
[data-theme="dark"] .pspot-logo {
  filter: brightness(0) invert(1) sepia(0.3) hue-rotate(180deg) saturate(2);
}
.pspot-wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.pspot-wordmark i {
  font-style: normal;
  color: #c8252e;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin: 0 -2px;
}
.pspot-wordmark small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  margin-left: 4px;
}
[data-theme="dark"] .pspot-wordmark i { color: #ff6b73; }

.pspot-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 34ch;
}
.pspot-lede {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}
.pspot-bullets {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.pspot-bullets li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
@media (max-width: 540px) {
  .pspot-bullets li { grid-template-columns: 1fr; gap: 2px; }
}
.pspot-bullet-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
}
.pspot-bullet-v {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.pspot-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ===== TIER 2 PARTNER CARDS ===== */
.pspot-mini-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 980px) { .pspot-mini-grid { grid-template-columns: 1fr; } }

.pspot-mini {
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pspot-mini:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-md); }
@media (max-width: 640px) { .pspot-mini { grid-template-columns: 1fr; } }

.pspot-mini-mark {
  background: linear-gradient(140deg, var(--brand-soft) 0%, color-mix(in oklab, var(--brand-soft) 50%, var(--surface-2)) 100%);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  border-right: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
@media (max-width: 640px) {
  .pspot-mini-mark { border-right: 0; border-bottom: 1px solid var(--line); }
}
.pspot-mini-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.18;
  display: block;
}
.pspot-mini-place {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Partner logos (tier 2) */
.pspot-mini-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 48px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 6px;
}
.pspot-mini-logo--square { max-height: 64px; max-width: 64px; }

.pspot-mini-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pspot-mini-title {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  max-width: 34ch;
  margin: 0;
}
.pspot-mini-body p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}
.pspot-mini-body p em {
  font-style: normal;
  color: var(--brand-strong);
  font-weight: 500;
}
.pspot-mini-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--brand);
  font-weight: 500;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pspot-mini-link:hover { text-decoration: none; color: var(--brand-strong); }

/* ==========================================================
   CLIENTS — Ils nous font confiance
   ========================================================== */
.clients-band {
  border-top: 1px solid var(--line);
}
.clients-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
}
.clients-head h2 {
  max-width: 22ch;
  margin-top: 14px;
  grid-column: 1 / 2;
}
.clients-head .eyebrow {
  grid-column: 1 / 2;
}
.clients-head p {
  color: var(--ink-3);
  font-size: 15px;
  max-width: 46ch;
  grid-column: 2 / 3;
}
@media (max-width: 760px) {
  .clients-head { grid-template-columns: 1fr; gap: 14px; }
  .clients-head .eyebrow, .clients-head h2, .clients-head p { grid-column: 1; }
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
@media (max-width: 920px) { .clients-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .clients-grid { grid-template-columns: 1fr; } }

.client-card {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background .2s ease;
  min-height: 108px;
  justify-content: center;
}
.client-card:hover { background: var(--surface-2); }
/* remove last-column right borders & last-row bottom borders */
.clients-grid > .client-card:nth-child(4n) { border-right: 0; }
.clients-grid > .client-card:nth-last-child(-n+4) { border-bottom: 0; }
@media (max-width: 920px) {
  .clients-grid > .client-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .clients-grid > .client-card:nth-child(4n) { border-right: 1px solid var(--line); }
  .clients-grid > .client-card:nth-child(2n) { border-right: 0; }
  .clients-grid > .client-card:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 480px) {
  .clients-grid > .client-card { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .clients-grid > .client-card:last-child { border-bottom: 0; }
}

.client-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.15;
}
.client-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.client-logo {
  max-height: 44px;
  max-width: 78%;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter .25s ease, opacity .25s ease;
}
/* couleur au survol de la carte */
.client-card:hover .client-logo { filter: grayscale(0); opacity: 1; }
/* Logos fournis en blanc (Atmo BFC, Qualit'Air Corse) : rendus en sombre */
.client-logo--invert { filter: invert(1) grayscale(1); }
.client-card:hover .client-logo--invert { filter: invert(1); }
/* Paliers de taille par logo (ratios hétérogènes) */
.client-logo--lg { max-height: 60px; max-width: 88%; }
.client-logo--md { max-height: 50px; max-width: 82%; }

.clients-footnote {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 14px;
}

/* ==========================================================
   Product image placeholder (noise sensor)
   ========================================================== */
.prod-media--placeholder {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #dde8f5 100%);
}
.prod-media--placeholder .noise-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
[data-theme="dark"] .prod-media--placeholder {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface-2) 100%);
}

/* ====== QUOTE MODAL ====== */
button.btn { -webkit-appearance: none; appearance: none; line-height: 1.2; }
.qm-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  background: color-mix(in oklab, var(--ink) 55%, transparent);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto;
  animation: qmFade .18s ease;
}
@keyframes qmFade { from { opacity: 0; } to { opacity: 1; } }
.qm-modal {
  width: 100%; max-width: 560px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  overflow: hidden; margin: auto;
  animation: qmRise .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes qmRise { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.qm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.qm-head h3 { margin: 0; font-size: 19px; }
.qm-close {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink-3);
  width: 32px; height: 32px; border-radius: 8px; transition: background .15s ease, color .15s ease;
}
.qm-close:hover { background: var(--surface-2); color: var(--ink); }
.qm-body { padding: 22px; }
.qm-intro { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }
.qm-form { display: flex; flex-direction: column; gap: 14px; }
.qm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.qm-field > span { color: var(--ink-2); font-weight: 500; }
.qm-field input, .qm-field select, .qm-field textarea {
  font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qm-field textarea { resize: vertical; min-height: 72px; }
.qm-field input:focus, .qm-field select:focus, .qm-field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 18%, transparent);
}
.qm-submit { width: 100%; justify-content: center; margin-top: 4px; }
.qm-submit[disabled] { opacity: .6; cursor: default; transform: none; }
.qm-error {
  background: color-mix(in oklab, #e23 12%, transparent);
  color: #b3261e; border: 1px solid color-mix(in oklab, #e23 30%, transparent);
  border-radius: 8px; padding: 10px 12px; font-size: 13.5px;
}
.qm-success { text-align: center; padding: 16px 6px 8px; }
.qm-success h4 { margin: 0 0 8px; font-size: 20px; color: #1a8055; }
.qm-success p { margin: 0 0 20px; color: var(--ink-2); }
/* Honeypot : hors écran, invisible pour les humains */
.qm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
  .qm-row { grid-template-columns: 1fr; }
}
