/* Vif — design system */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/bricolage-grotesque-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-700.woff2') format('woff2');
}

:root {
  --ink: #141312;
  --ivoire: #F4F1EA;
  --accent: #E8421C;
  /* Variantes accent garanties AA (contraste ≥ 4.5:1) : accent-text pour du texte
     directement sur le fond de page, accent-contrast pour le texte posé sur --accent. */
  --accent-text: #C93614;
  --accent-contrast: #ffffff;
  --bg: var(--ivoire);
  --fg: var(--ink);
  --fg-muted: #5b5852;
  --surface: #ffffff;
  --surface-2: #eae5d9;
  --border: #ddd6c6;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 26px;
  --container: 1080px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--ivoire);
  --fg-muted: #b9b3a6;
  --accent: #FF5A2E;
  --accent-text: #FF5A2E;
  --accent-contrast: var(--ink);
  --surface: #1c1b19;
  --surface-2: #232220;
  --border: #34322e;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --fg: var(--ivoire);
    --fg-muted: #b9b3a6;
    --accent: #FF5A2E;
    --accent-text: #FF5A2E;
    --accent-contrast: var(--ink);
    --surface: #1c1b19;
    --surface-2: #232220;
    --border: #34322e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--fg-muted); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
}
.brand img { height: 24px; width: auto; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--fg-muted);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--fg); }

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn, .lang-switch button {
  font-family: var(--font-body);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 8px 12px;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero .symbol {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  color: var(--fg);
}
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 { max-width: 780px; margin-inline: auto; }
.hero-lede {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: 1.1rem;
}
.hero-date {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 20px;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 34px 0 10px;
}
.countdown .unit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 84px;
}
.countdown .unit strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}
.countdown .unit span {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.local-tz {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-top: 8px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Sections */
section { padding: 64px 0; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-alt { background: var(--surface-2); }

/* Live section */
.live-card {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.live-status .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--fg-muted);
}
.live-status[data-state="live"] .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-frame img.thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.play-btn {
  position: relative;
  z-index: 1;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.video-empty {
  color: var(--ivoire);
  text-align: center;
  padding: 20px;
}
.video-empty p { color: #cfc9bd; }
.live-footer {
  padding: 18px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* Primitives */
.primitives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.primitive-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 26px;
}
.primitive-card .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  background: var(--ink);
  color: var(--ivoire);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
:root[data-theme="dark"] .primitive-card .tag,
@media (prefers-color-scheme: dark) { }
.primitive-card pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.5;
}
.primitive-card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.robotics-example {
  margin-top: 28px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Why grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.why-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Available list */
.available-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.available-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.badge-soon {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  border: 1px solid var(--accent-text);
  border-radius: 999px;
  padding: 3px 9px;
  margin-top: 2px;
}

/* Not-intended-use callout */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 26px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.footer-links a { text-decoration: none; color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); }
.footer-meta {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

/* Legal pages */
.legal-page { padding: 56px 0 80px; }
.legal-page .container { max-width: 760px; }
.legal-page h2 { margin-top: 1.6em; }

@media (max-width: 860px) {
  .primitives-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .countdown .unit { min-width: 70px; padding: 12px; }
  .countdown .unit strong { font-size: 1.5rem; }
}
