/* VigiRobotics — feuille de style principale */

:root {
  --bg: #0b0f14;
  --bg-alt: #0f1620;
  --surface: #131b24;
  --surface-border: #223040;
  --text: #e7edf3;
  --text-dim: #9fb0c0;
  --accent: #0080ff;
  --accent-dim: #0066cc;
  --accent-contrast: #ffffff;
  --radius: 14px;
  --max-width: 1120px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: #fff;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 1.4em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; color: var(--text-dim); }
.prose strong, .prose em, .prose a { color: var(--text); }
.prose a { color: var(--accent); }
.prose ul { color: var(--text-dim); padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(11, 15, 20, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  text-decoration: none;
}
.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 6rem 0 4.5rem;
  background: linear-gradient(160deg, #0a2647, var(--bg) 65%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-small { padding: 3.6rem 0 3rem; }

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(480px circle at 15% 20%, rgba(0, 128, 255, 0.25), transparent 60%),
    radial-gradient(360px circle at 85% 70%, rgba(0, 128, 255, 0.16), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, 3%) scale(1.08); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,15,20,0.55) 0%, rgba(11,15,20,0.92) 100%);
}

.hero-content {
  position: relative;
  max-width: 680px;
  animation: rise 0.7s ease both;
}
.hero-content h1 { margin-bottom: 0.4em; }
.hero-content p { color: var(--text-dim); font-size: 1.1rem; margin: 0; }
.hero-small .hero-content p { font-size: 0.95rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Layout sections ---------- */

.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); border-radius: var(--radius); }

.prose { max-width: 720px; }

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 1.6em 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface-border);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.device-frame {
  margin: 1.6em 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow-x: auto;
  display: flex;
  justify-content: center;
}
.device-frame iframe { border: 0; border-radius: 8px; max-width: 100%; }

.post-figure {
  margin: 1.6em 0;
}
.post-figure img { border-radius: var(--radius); border: 1px solid var(--surface-border); }
.post-figure figcaption {
  margin-top: 0.6em;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}
.cta-band h2 { margin-top: 0; }
.cta-band p { max-width: 480px; margin: 0 auto 1.6em; }

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 10px 24px rgba(0, 128, 255, 0.35); }
.btn-outline {
  border: 1px solid var(--surface-border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 10px 24px rgba(0, 128, 255, 0.15); }

/* ---------- Contact page ---------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 640px;
  margin-top: 2rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 128, 255, 0.15);
}
.contact-card-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.contact-card-value { font-family: var(--font-head); font-size: 1.15rem; color: #fff; }

/* ---------- Blog ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 128, 255, 0.15);
}
.post-card-date { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.post-card h3 { margin: 0.2em 0 0.4em; font-size: 1.1rem; }
.post-card p { font-size: 0.92rem; margin: 0 0 0.8em; flex-grow: 1; }
.post-card-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
  transition: transform 0.25s ease;
}
.post-card:hover .post-card-more { transform: translateX(4px); }

.post-article .post-meta { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }
.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-border);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--surface-border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 24px;
}
.footer-brand p { max-width: 320px; font-size: 0.9rem; }
.footer-contact h3, .footer-social h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.8em;
}
.footer-contact p, .footer-social p { margin: 0 0 0.5em; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid var(--surface-border);
  padding: 1.2rem 24px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 400px; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 24px 1rem; }
  .site-nav a { display: block; padding: 0.8em 0; border-bottom: 1px solid var(--surface-border); }
  .footer-inner { grid-template-columns: 1fr; }
}
