/* ==========================================================================
   Veyron Dynamics — design system partagé (toutes les pages)
   Thème sombre "deep tech", cohérent avec l'app VD HarborWatch (mêmes tons
   marine/cyan). Aucune dépendance de build : pur CSS, pensé pour un site
   statique servi tel quel (Cloudflare Pages, sans étape de build).
   ========================================================================== */

:root {
  --bg: #080c14;
  --bg-soft: #0a0f1a;
  --surface: #0f1626;
  --surface-2: #141d33;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf5;
  --text-dim: #93a0b8;
  --text-faint: #5d6a84;
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  --ok: #34d399;
  --warn: #fbbf24;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Fond "radar" réutilisé en arrière-plan de plusieurs sections : un
   dégradé conique tournant lentement + une grille fine, pour rappeler la
   détection/l'observation sans être une simple bannière décorative. */
.radar-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.radar-field::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 1400px; height: 1400px;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(34, 211, 238, 0.14), transparent 25%, transparent 75%, rgba(59, 130, 246, 0.14));
  border-radius: 50%;
  animation: radar-spin 22s linear infinite;
}
.radar-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}
@keyframes radar-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar-field::before { animation: none; } }

/* -------------------------------- Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Pas de backdrop-filter ici : un filtre/flou sur cet ancêtre changerait le
     "containing block" du menu mobile (position: fixed, plus bas) — Chrome
     le rattache alors à cette barre de ~70px de haut au lieu du viewport,
     ce qui casse l'affichage plein écran du menu ouvert sur téléphone. */
  background: rgba(8, 12, 20, 0.94);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 17px; letter-spacing: 0.01em; flex-shrink: 0; }
.brand .logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand .word { color: var(--text); white-space: nowrap; }
.brand .tag { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.14em; color: var(--text-faint); margin-top: 1px; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--text-dim); transition: color 0.15s ease; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { position: relative; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -26px; height: 2px; background: var(--accent-gradient);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent-gradient); color: #061018; }
.btn-primary:hover { box-shadow: 0 8px 24px -6px rgba(59, 130, 246, 0.55); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--accent-cyan); background: rgba(34, 211, 238, 0.06); }
/* ".nav-links a" (plus spécifique qu'on ne le pense : classe + élément)
   écrasait sinon la couleur du bouton CTA placé dans le menu. */
.nav-links a.btn-primary { color: #061018; }
.nav-links a.btn-primary:hover { color: #061018; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
}

/* -------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  padding: 96px 0 84px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); max-width: 820px; }
.hero .lead { font-size: 18.5px; max-width: 620px; color: var(--text-dim); margin-top: 18px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* ------------------------------- Sections -------------------------------- */
section { position: relative; }
.section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); }
.section-head p { font-size: 16.5px; margin-top: 12px; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--border-strong); }
.card .icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  margin-bottom: 16px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; margin-bottom: 0; }

/* Pipeline / étapes numérotées reliées (utilisé pour "de la caméra à la
   décision" et les architectures en modules) */
.pipeline { display: flex; flex-wrap: wrap; gap: 0; counter-reset: step; }
.pipeline .step {
  flex: 1 1 160px;
  position: relative;
  padding: 0 18px 0 0;
  counter-increment: step;
}
.pipeline .step::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--accent-cyan);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 14px;
}
.pipeline .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px; left: 34px; right: -10px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.pipeline .step h4 { font-size: 14.5px; margin-bottom: 6px; }
.pipeline .step p { font-size: 13.5px; margin-bottom: 0; }

/* Badges de statut produit */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; letter-spacing: 0.02em; }
.badge-live { background: rgba(52, 211, 153, 0.12); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-vision { background: rgba(251, 191, 36, 0.12); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-live::before { content: "●"; font-size: 8px; }

/* Bandeau CTA de fin de page */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); max-width: 640px; margin: 0 auto 14px; }
.cta-band p { max-width: 520px; margin: 0 auto 28px; }
.cta-band .cta-row { justify-content: center; }

/* -------------------------------- Footer ---------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-top .brand { margin-bottom: 14px; }
.footer-top p { font-size: 13.5px; max-width: 280px; }
.footer-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-dim); padding: 5px 0; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-faint); flex-wrap: wrap; gap: 10px; }

/* -------------------------------- Utilities -------------------------------- */
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* -------------------------------- Contenu légal -------------------------------- */
.legal { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.legal h1 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 8px; }
.legal .updated { color: var(--text-faint); font-size: 13.5px; margin-bottom: 40px; }
.legal h2 { font-size: 19px; margin-top: 40px; }
.legal p, .legal li { color: var(--text-dim); font-size: 15px; }
.legal ul { padding-left: 20px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal .notice { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 14px; color: var(--text); margin: 20px 0; }

/* -------------------------------- Formulaire de contact -------------------------------- */
.form-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 14.5px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent-cyan); }
.field textarea { resize: vertical; min-height: 120px; }
.contact-info-card { display: flex; flex-direction: column; gap: 18px; }
.contact-info-card .row { display: flex; gap: 12px; align-items: flex-start; }
.contact-info-card .row .icon { margin-bottom: 0; flex-shrink: 0; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } }

/* -------------------------------- Responsive -------------------------------- */
@media (max-width: 920px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 4px; border-top: 1px solid var(--border); transform: translateX(100%); transition: transform 0.22s ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 12px 0; font-size: 16px; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links .btn { margin-top: 14px; width: 100%; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipeline .step::after { display: none; }
  .cta-band { padding: 40px 24px; }
  .hero { padding: 64px 0 56px; }
}

/* Logo radar-bateau animé (remplace l'ancien monogramme VD) */
.logo-mark .radar-sweep {
  transform-box: view-box;
  transform-origin: 20px 20px;
  animation: radar-sweep-spin 4s linear infinite;
}
.logo-mark .radar-blip {
  animation: radar-blip-pulse 2.2s ease-in-out infinite;
}
@keyframes radar-sweep-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes radar-blip-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-mark .radar-sweep, .logo-mark .radar-blip { animation: none; }
}
