/* Symbiose-IA — système visuel partagé */
:root {
  --bg: #0a0b0d;
  --bg-2: #111216;
  --bg-3: #16181d;
  --ink: #ecebe6;
  --ink-dim: #9a978f;
  --ink-mute: #5e5c57;
  --line: rgba(236, 235, 230, 0.09);
  --line-strong: rgba(236, 235, 230, 0.18);
  --accent: #6ea8ff;       /* bleu clair, "symbiose" */
  --accent-2: #c8d8ff;     /* bleu pâle secondaire */
  --warm: #f3ead2;
  --serif: "Sora", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sans: "Sora", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1440px;
  --pad: clamp(20px, 3vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
img, svg, video { display: block; max-width: 100%; }

/* ===================== LAYOUT ===================== */
.shell { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  mix-blend-mode: difference;
  color: #fff;
}
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; }
.nav__logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav__links { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: currentColor; transition: width 0.4s cubic-bezier(.2,.7,.2,1); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }
.nav__cta { font-family: var(--serif); font-style: italic; font-size: 16px; }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ===================== CUSTOM CURSOR ===================== */
/* Native cursor stays visible. Custom ring follows as a soft accent only. */
html, body { cursor: auto; }
a, button, .btn, .work-card, .svc-card, .service-card, .nav__cta, .tweak-chip, .neural-toggle { cursor: pointer; }
input, textarea { cursor: text; }

.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.3s, width 0.3s cubic-bezier(.2,.7,.2,1), height 0.3s cubic-bezier(.2,.7,.2,1);
}
.cursor--ring {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(110, 168, 255, 0.45);
  background: transparent;
  z-index: 9998;
  transition: opacity 0.3s, width 0.5s cubic-bezier(.2,.7,.2,1), height 0.5s cubic-bezier(.2,.7,.2,1), border-color 0.4s, background 0.4s;
}
body.cursor-ready .cursor { opacity: 0.9; }
body.cursor-ready .cursor--ring { opacity: 0.6; }
body.is-hover .cursor { width: 4px; height: 4px; }
body.is-hover .cursor--ring { width: 56px; height: 56px; border-color: var(--accent); background: rgba(110,168,255,0.05); }
@media (pointer: coarse), (hover: none) { .cursor, .cursor--ring { display: none !important; } }

/* ===================== HERO / TYPE ===================== */
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }

.h-display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 10vw, 176px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.h-display em { font-style: normal; color: var(--ink-dim); font-weight: 200; }
.h-display .accent { color: var(--accent); font-style: normal; font-weight: 300; }

.h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6vw, 88px); line-height: 1; letter-spacing: -0.03em; }
.h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -0.025em; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -0.02em; }

.lead { font-size: clamp(17px, 1.4vw, 22px); line-height: 1.45; color: var(--ink); max-width: 58ch; }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 28px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
  position: relative;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary { background: var(--accent); color: #0a0b0d; border-color: var(--accent); }
.btn--primary:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn .arrow { display: inline-block; transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
.btn:hover .arrow { transform: translateX(4px); }

/* ===================== REVEAL ON SCROLL ===================== */
/* Default-visible. JS can opt elements into a delayed reveal by adding .reveal--off */
.reveal { opacity: 1; transform: none; }
.reveal--off { opacity: 0; transform: translateY(24px); }
.reveal--off.is-in { animation: revealIn 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes revealIn { to { opacity: 1; transform: none; } }
.reveal--lines.reveal--off > * { opacity: 0; transform: translateY(24px); }
.reveal--lines.reveal--off.is-in > * { animation: revealIn 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal--lines.reveal--off.is-in > *:nth-child(2) { animation-delay: 0.08s; }
.reveal--lines.reveal--off.is-in > *:nth-child(3) { animation-delay: 0.16s; }
.reveal--lines.reveal--off.is-in > *:nth-child(4) { animation-delay: 0.24s; }
.reveal--lines.reveal--off.is-in > *:nth-child(5) { animation-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal--off { opacity: 1; transform: none; animation: none; }
  .reveal--lines.reveal--off > * { opacity: 1; transform: none; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--lines > * { opacity: 1; transform: none; animation: none; }
}

/* ===================== NEURAL CANVAS ===================== */
.neural {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.neural canvas { width: 100%; height: 100%; display: block; }

/* ===================== FOOTER ===================== */
.footer { border-top: 1px solid var(--line); padding: 80px var(--pad) 40px; margin-top: 120px; position: relative; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; max-width: var(--max); margin: 0 auto; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__big { font-family: var(--serif); font-size: clamp(40px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.025em; font-style: italic; font-weight: 300; }
.footer__bottom { max-width: var(--max); margin: 60px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ===================== UTILS ===================== */
.divider { height: 1px; background: var(--line); width: 100%; margin: 0; }
.grain::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: 0.04; mix-blend-mode: overlay;
}

/* focus states for a11y */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* page entry */
.page-enter { animation: pageEnter 0.9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
