/* =====================================================================
   NANO-LINK — Style system (Apple-like, premium, dark)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #000000;
  --bg-soft: #0a0a0c;
  --surface: rgba(255,255,255,0.04);
  --surface-strong: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.10);
  --text: #f5f5f7;
  --text-dim: #98989d;
  --text-faint: #6e6e73;
  --accent-red: #ff3b30;
  --accent-blue: #0a84ff;
  --accent-glow: #5e5ce6;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.16,1,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-blue); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------------
   Bulles flottantes (fond animé)
   --------------------------------------------------------------------- */
#bubble-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  background: radial-gradient(circle at 30% 30%, rgba(94,92,230,0.6), rgba(10,132,255,0.15) 60%, transparent 70%);
  will-change: transform;
}
.bubble.red {
  background: radial-gradient(circle at 30% 30%, rgba(255,59,48,0.55), rgba(255,59,48,0.1) 60%, transparent 70%);
}

/* ---------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------- */
nav.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, 4vw);
  height: 52px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .3s var(--ease);
}
.nav-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-toggle { display: none; }

@media (max-width: 780px) {
  .nav-links { display: none; }
}

/* ---------------------------------------------------------------------
   Layout génériques
   --------------------------------------------------------------------- */
main { position: relative; z-index: 1; }

.section {
  padding: 140px max(24px, 6vw);
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}
.section-tight { padding-top: 80px; padding-bottom: 80px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 18px;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }

.hero-title {
  font-size: clamp(44px, 9vw, 108px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 40%, #a1a1a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2.headline {
  font-size: clamp(32px, 5vw, 58px);
  margin-bottom: 20px;
}

.sub {
  font-size: clamp(17px, 2vw, 24px);
  color: var(--text-dim);
  font-weight: 400;
  max-width: 640px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Effet "glitch" texte au scroll
   --------------------------------------------------------------------- */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch.is-glitching::before,
.glitch.is-glitching::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  background: transparent;
}
.glitch.is-glitching::before {
  color: var(--accent-red);
  clip-path: inset(0 0 60% 0);
  animation: glitchTop .35s steps(2, end) 1;
  transform: translate(-3px, -2px);
}
.glitch.is-glitching::after {
  color: var(--accent-blue);
  clip-path: inset(40% 0 0 0);
  animation: glitchBottom .35s steps(2, end) 1;
  transform: translate(3px, 2px);
}
@keyframes glitchTop {
  0%   { clip-path: inset(0 0 70% 0); transform: translate(-4px,-2px); }
  30%  { clip-path: inset(10% 0 55% 0); transform: translate(3px,1px); }
  60%  { clip-path: inset(0 0 80% 0); transform: translate(-2px,-1px); }
  100% { clip-path: inset(0 0 60% 0); transform: translate(0,0); opacity: 0; }
}
@keyframes glitchBottom {
  0%   { clip-path: inset(70% 0 0 0); transform: translate(4px,2px); }
  30%  { clip-path: inset(55% 0 10% 0); transform: translate(-3px,-1px); }
  60%  { clip-path: inset(80% 0 0 0); transform: translate(2px,1px); }
  100% { clip-path: inset(40% 0 0 0); transform: translate(0,0); opacity: 0; }
}

/* ---------------------------------------------------------------------
   Reveal au scroll
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(.92); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal-scale.in-view { opacity: 1; transform: scale(1); }

.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------------------------------------------------------------------
   Cartes / grilles
   --------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(10px);
}
.card:hover { background: var(--surface-strong); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   Device mock (bracelet stylisé en CSS)
   --------------------------------------------------------------------- */
.device-mock {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #1c1c1e, #2c2c2e, #1c1c1e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 40px 100px -20px rgba(94,92,230,0.35);
}
.device-mock::before {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: #050506;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}
.device-mock .screen {
  position: relative;
  z-index: 2;
  width: 46%;
  aspect-ratio: 1.3;
  border-radius: 10px;
  background: #000;
  border: 2px solid #2c2c2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #4ade80;
  font-family: 'SF Mono', Menlo, monospace;
  letter-spacing: 1px;
  box-shadow: 0 0 18px rgba(74,222,128,0.35);
}

/* ---------------------------------------------------------------------
   Boutons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { background: #2b95ff; }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 50px max(24px, 6vw) 70px;
  color: var(--text-faint);
  font-size: 12px;
  position: relative;
  z-index: 1;
}
footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 18px;
}
footer .foot-links a { color: var(--text-dim); }
footer .foot-links a:hover { color: var(--text); }

/* ---------------------------------------------------------------------
   Specs table
   --------------------------------------------------------------------- */
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-dim); font-size: 14px; flex: 1; }
.spec-value { font-size: 15px; font-weight: 500; text-align: right; flex: 1.3; }

/* ---------------------------------------------------------------------
   Hero section spécifique
   --------------------------------------------------------------------- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 60px;
  position: relative;
}
.hero .badge-line {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--text-dim);
  max-width: 620px;
}
.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: .6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* Page hero plus compact pour sous-pages */
.page-hero {
  padding: 150px max(24px, 6vw) 60px;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Progress bar de scroll
   --------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-blue));
  z-index: 200;
  transition: width .1s linear;
}

/* ---------------------------------------------------------------------
   Curseur lumineux qui suit la souris (desktop uniquement)
   --------------------------------------------------------------------- */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10,132,255,0.10), rgba(94,92,230,0.05) 45%, transparent 70%);
  transform: translate(-50%,-50%);
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}
@media (max-width: 780px) { #cursor-glow { display: none; } }

/* ---------------------------------------------------------------------
   Boutons magnétiques
   --------------------------------------------------------------------- */
.magnetic { transition: transform .15s var(--ease); }

/* ---------------------------------------------------------------------
   Cartes en tilt 3D au survol
   --------------------------------------------------------------------- */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .25s var(--ease); }

/* ---------------------------------------------------------------------
   Compteurs animés
   --------------------------------------------------------------------- */
.counter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  justify-content: center;
}
.counter-item { text-align: center; }
.counter-num {
  font-size: clamp(40px, 6vw, 74px);
  font-weight: 800;
  background: linear-gradient(180deg, #fff, #a1a1a6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.02em;
}
.counter-label { color: var(--text-dim); font-size: 13px; margin-top: 8px; letter-spacing: .3px; }

/* ---------------------------------------------------------------------
   Marquee défilant horizontal (bandeau de mots-clés)
   --------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  position: relative;
  z-index: 1;
}
.marquee-track {
  display: inline-block;
  animation: marqueeScroll 26s linear infinite;
}
.marquee-track span {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-faint);
  margin: 0 34px;
  display: inline-block;
}
.marquee-track span.accent { color: var(--accent-blue); }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------
   Section "steps" épinglée (scrollytelling)
   --------------------------------------------------------------------- */
.pin-wrap {
  position: relative;
}
.pin-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: block;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}
.pin-sticky > .eyebrow { display: none; }
.pin-step {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(680px, 90vw);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 24px)) scale(.97);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.pin-step.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.pin-step .eyebrow { display: inline-block; }
.pin-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.pin-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border);
  transition: background .3s, transform .3s;
}
.pin-dot.active { background: var(--accent-blue); transform: scale(1.4); }

/* ---------------------------------------------------------------------
   Page "Caractéristiques" — style tableau technique dense (Apple tech specs)
   --------------------------------------------------------------------- */
.specs-block { margin-bottom: 56px; }
.specs-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td {
  padding: 16px 0;
  font-size: 14px;
  vertical-align: top;
}
.specs-table td:first-child {
  color: var(--text-dim);
  width: 34%;
  padding-right: 20px;
}
.specs-table td:last-child { color: var(--text); font-weight: 500; }
.specs-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 10px;
}
.specs-jump a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}
.specs-jump a:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.specs-disclaimer {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
