@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300..800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: var(--fw-regular);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ── Grille 1px animée — fond global fixe ───────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(26,79,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,79,255,0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 72px 72px; }
}

/* Contenu toujours au-dessus de la grille */
header, main, footer, section,
.container, nav, .site-header,
.site-footer, [class*="section"],
.hero, .cta-banner, .stats-dark,
.diff-dark, .apps-section {
  position: relative;
  z-index: 1;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1 {
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

h2 {
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

h3 {
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h4, h5, h6 {
  font-weight: var(--fw-semi);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p { font-weight: var(--fw-light); }

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

/* ── Reveal on scroll ───────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.72s cubic-bezier(0.22,1,0.36,1),
              transform 0.72s cubic-bezier(0.22,1,0.36,1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transform: none; }
  [data-reveal].revealed { transition-duration: 0.15s; }
}

/* ── Back to top ────────────────────────────────────────────── */
#back-to-top {
  position: fixed !important;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d1526 0%, #111d35 100%);
  border: 1px solid rgba(91,143,255,0.35);
  box-shadow: 0 0 18px rgba(26,79,255,0.15), inset 0 1px 0 rgba(91,143,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--blue);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, border-color .2s, box-shadow .2s, transform .2s;
  z-index: 9999 !important;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
#back-to-top:hover {
  border-color: rgba(91,143,255,0.7);
  box-shadow: 0 0 28px rgba(26,79,255,0.3), 0 0 8px rgba(91,143,255,0.2), inset 0 1px 0 rgba(91,143,255,0.15);
  transform: translateY(-2px);
  color: #fff;
}


/* ── Hero shader filigrane (assets/js/hero-shader.js) ────── */
.bt-shader-host { position: relative; }
.bt-shader-host > *:not(.bt-hero-shader) { position: relative; z-index: 1; }

.bt-hero-shader {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 100vw; height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: .3;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}

/* ── Bannière consentement cookies (Loi 25) ──────────────── */
.bt-cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 9999;
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 20px 24px;
  background: rgba(8, 16, 30, 0.97);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px rgba(91,143,255,0.10), 0 0 50px rgba(26,79,255,0.18), 0 24px 60px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease;
}
.bt-cookie-banner--visible { opacity: 1; transform: translateY(0); }

.bt-cookie-banner__text strong {
  display: block; font-size: 13px; font-weight: var(--fw-semi);
  color: var(--text); margin-bottom: 4px;
}
.bt-cookie-banner__text p {
  font-size: 12px; font-weight: var(--fw-light);
  color: var(--text-dim); line-height: 1.6; margin: 0;
}
.bt-cookie-banner__text a { color: var(--blue); text-decoration: none; }
.bt-cookie-banner__text a:hover { text-decoration: underline; }

.bt-cookie-banner__actions {
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.bt-cookie-banner__btn {
  font-family: inherit; font-size: 12px; font-weight: var(--fw-semi);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; transition: .2s;
}
.bt-cookie-banner__btn--accept {
  background: linear-gradient(135deg, #1a4fff, #5b8fff);
  border: 1px solid transparent; color: #fff;
}
.bt-cookie-banner__btn--accept:hover { filter: brightness(1.15); }
.bt-cookie-banner__btn--essential {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim);
}
.bt-cookie-banner__btn--essential:hover { border-color: var(--blue-border); color: var(--text); }

@media (max-width: 600px) {
  .bt-cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .bt-cookie-banner__actions { flex-direction: row; }
  .bt-cookie-banner__btn { flex: 1; }
}
