/* VB LABS — design system calé sur vincent-blasini.framer.ai
   Monochrome, angles droits, Satoshi 500 en capitales, interlettrage serré, filets #1a1a1a. */
:root {
  --bg: #0f0f0f;
  --bg-2: #0f0f0f;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --line: #1a1a1a;
  --line-strong: #2e2e2e;
  --text: #ffffff;
  --muted: #7d7d7d;
  --muted-2: #a6a6a6;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --ok: #8fd19e;
  --bad: #ff7a7a;
  --radius: 0;
  --radius-lg: 0;
  --font: "Satoshi", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
  --gutter: 20px;
  --section-gap: clamp(64px, 7vw, 80px);
  color-scheme: dark;
}
/* Ressort Framer (bounce 0) : x(t) = 1 − (1 + ωt)·e^(−ωt), ω·d ≈ 9,23 */
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease: linear(0, 0.0003 0.3%, 0.0028 0.8%, 0.0097 1.6%, 0.0231 2.5%, 0.0442 3.6%, 0.0736 4.8%, 0.1114 6.1%, 0.1569 7.6%, 0.2089 9.2%, 0.2660 10.9%, 0.3266 12.7%, 0.3891 14.6%, 0.4518 16.6%, 0.5134 18.6%, 0.5725 20.8%, 0.6284 23.1%, 0.6802 25.4%, 0.7274 27.9%, 0.7699 30.4%, 0.8076 33.0%, 0.8406 35.7%, 0.8691 38.4%, 0.8934 41.3%, 0.9139 44.2%, 0.9311 47.1%, 0.9453 50.2%, 0.9569 53.3%, 0.9663 56.5%, 0.9739 59.8%, 0.9799 63.1%, 0.9846 66.5%, 0.9883 70.0%, 0.9912 73.5%, 0.9934 77.1%, 0.9951 80.8%, 0.9964 84.5%, 0.9974 88.3%, 0.9981 92.1%, 0.9986 96.0%, 1); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Lenis (défilement fluide) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--text); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1; text-transform: uppercase; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--gutter);
  transition: background 0.4s var(--ease);
}
.site-header.scrolled { background: rgba(15, 15, 15, 0.8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.logo { display: flex; align-items: center; }
.logo img { display: block; width: 44px; height: 29px; }
.nav { display: flex; gap: 24px; align-items: center; }
/* Liens : blancs, gris #999 au survol (ressort 0,4 s comme sur le portfolio) */
.nav a, .footer-links a { font-size: 15px; font-weight: 400; letter-spacing: -0.02em; text-transform: uppercase; color: var(--text); transition: color 0.4s var(--ease); }
.nav a:hover, .footer-links a:hover { color: #999999; }
.header-end { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.header-end .clock { font-size: 15px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.menu-btn { display: none; background: none; border: 0; padding: 0; font-size: 15px; letter-spacing: -0.02em; text-transform: uppercase; cursor: pointer; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 49; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: var(--gutter);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-size: clamp(40px, 12vw, 56px); font-weight: 500; text-transform: uppercase; letter-spacing: -0.06em; line-height: 1; color: var(--muted); }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); }

/* ---------- Mise en page ---------- */
main { min-height: 100vh; padding-top: var(--header-h); }
.container { width: 100%; max-width: 1920px; margin: 0 auto; padding: 0 var(--gutter); }
/* Sections séparées par un filet : chaque bloc est à la même distance du filet le plus proche */
.section { padding-block: var(--section-gap); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; color: var(--muted); }
.eyebrow .dot { display: none; }
.muted { color: var(--muted); }
.accent { color: var(--text); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Hero ---------- */
/* Hero collé en haut sur toute la hauteur ; le reste de la page glisse par-dessus (comme le portfolio) */
.hero { position: sticky; top: 0; z-index: 1; height: 100vh; height: 100svh; margin-top: calc(-1 * var(--header-h)); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-block: var(--header-h) 40px; }
.hero ~ *, .site-footer { position: relative; z-index: 2; background: var(--bg); }
.hero-title { font-size: clamp(30px, 10vw, 128px); font-weight: 500; letter-spacing: -0.06em; line-height: 1; text-transform: uppercase; }
.hero-title { white-space: nowrap; position: relative; }
/* « LABS » en exposant gris, calé sur le haut des capitales comme une marque déposée ;
   hors du flux pour que le nom reste parfaitement centré */
.hero-title .labs { position: absolute; left: 100%; top: 0.12em; margin-left: 0.08em; font-size: max(11px, 0.15em); line-height: 1; letter-spacing: 0; color: var(--muted); }
.hero-sub { margin-top: 20px; font-size: 15px; font-weight: 400; letter-spacing: -0.02em; text-transform: uppercase; color: var(--text); }
.hero-scroll { margin-top: 20px; font-size: 15px; color: var(--text); background: none; border: 0; padding: 4px 8px; cursor: pointer; }
.hero-scroll.in:hover { color: #999999; transition: color 0.4s var(--ease); }
.hero-glow { display: none; }

/* ---------- Apparition floue (signature du portfolio) ---------- */
/* Paramètres repris du portfolio : flou 10px, y 10px, échelle .95, ressort ~1,8 s, 0,1 s entre les mots */
.split .ch { display: inline-block; white-space: nowrap; opacity: 0.001; filter: blur(10px); transform: translateY(10px) scale(0.95); will-change: transform, opacity, filter; }
.split.in .ch { animation: chIn 1.8s var(--ease) forwards; animation-delay: calc(var(--start, 200ms) + var(--i) * 100ms); }
@keyframes chIn { to { opacity: 1; filter: blur(0); transform: none; } }

/* Blocs (« line » / « element » du portfolio) : sans flou, ressort 1,6 s */
.reveal { opacity: 0.001; transform: translateY(10px) scale(0.95); transition: opacity 1.6s var(--ease), transform 1.6s var(--ease); transition-delay: var(--d, 100ms); }
.reveal.in { opacity: 1; transform: none; }
/* Sous-titre et flèche du hero : même effet flouté que les mots, ressort 1,8 s */
.reveal.reveal-blur { filter: blur(10px); transition: opacity 1.8s var(--ease), filter 1.8s var(--ease), transform 1.8s var(--ease); transition-delay: var(--d, 100ms); }
.reveal.reveal-blur.in { filter: blur(0); }

/* Paragraphe révélé au scroll (gris → blanc) */
.scroll-lit { font-size: clamp(28px, 3.4vw, 48px); font-weight: 500; line-height: 1.2; letter-spacing: -0.06em; text-transform: uppercase; }
.scroll-lit .w { color: #2e2e2e; transition: color 0.35s var(--ease); }
.scroll-lit .w.on { color: var(--text); }

/* ---------- Titres de section ---------- */
.big-title { font-size: clamp(32px, 3.4vw, 48px); font-weight: 500; text-transform: uppercase; letter-spacing: -0.06em; line-height: 1.2; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }

/* ---------- Cartes outils ---------- */
.cat-block { margin-bottom: 64px; }
.cat-block:last-child { margin-bottom: 0; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.cat-head h2 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 500; letter-spacing: -0.02em; }
.cat-head .count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 20px; min-height: 200px;
  background: var(--surface); border: 1px solid var(--line);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.tool-card:hover { background: var(--surface-2); border-color: var(--line-strong); }
.tool-card .ic { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--text); margin-bottom: auto; transition: background .5s var(--ease), color .5s var(--ease); }
.tool-card:hover .ic { background: var(--text); color: var(--bg); }
.tool-card .ic svg { width: 20px; height: 20px; }
.tool-card h3 { margin-top: 32px; font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.2; }
.tool-card p { font-size: 15px; color: var(--muted); line-height: 1.3; }
.tool-card .arrow { position: absolute; top: 20px; right: 20px; color: var(--muted); transition: transform .5s var(--ease), color .5s var(--ease); }
.tool-card:hover .arrow { transform: translate(3px, -3px); color: var(--text); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 40px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-strong); padding: 0 2px; height: 44px; }
.search:focus-within { border-color: var(--text); }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 15px; text-transform: uppercase; }
.search input::placeholder { color: var(--muted); }
.chip { border: 1px solid var(--line-strong); background: transparent; padding: 10px 14px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; cursor: pointer; color: var(--muted); transition: all .3s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Bandeau défilant ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.marquee-track { display: flex; gap: clamp(40px, 5vw, 80px); width: max-content; animation: marq 40s linear infinite; }
.marquee-track span { font-size: clamp(28px, 3.4vw, 48px); font-weight: 500; text-transform: uppercase; letter-spacing: -0.06em; white-space: nowrap; color: var(--muted); }
.marquee-track span b { color: var(--text); font-weight: 500; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Pied de page (repris du portfolio) ---------- */
/* colonne, marge 20 px, 28 px entre « Let's create » et la ligne du bas */
.site-footer { display: flex; flex-direction: column; gap: 28px; padding: 20px var(--gutter); }
.footer-contact { display: flex; }
.lets-create { font-size: 40px; font-weight: 500; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; color: var(--text); transition: color .4s var(--ease); }
.lets-create:hover { color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.footer-links { display: flex; gap: 24px; }
.copyright { font-size: 15px; font-weight: 400; letter-spacing: -0.02em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.clock { font-variant-numeric: tabular-nums; }

/* ---------- Pages outil ---------- */
.tool-hero { padding-block: 64px 40px; }
.tool-title { font-size: clamp(36px, 7vw, 110px); font-weight: 500; text-transform: uppercase; letter-spacing: -0.06em; line-height: 1; overflow-wrap: anywhere; }
.tool-desc { margin-top: 20px; max-width: 640px; color: var(--muted); font-size: 16px; font-weight: 500; }
.tool-body { padding-bottom: 48px; }

/* ---------- Composants partagés (tous les outils) ---------- */
.tool-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-layout.wide-side { grid-template-columns: 400px minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.panel + .panel { margin-top: 20px; }
.panel-title { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sticky { position: sticky; top: calc(var(--header-h) + 20px); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.field > label output, .label output { color: var(--text); font-variant-numeric: tabular-nums; text-transform: none; }
.input, .select, .textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0;
  padding: 11px 12px; font-size: 15px; outline: none; transition: border-color .25s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 1px; background: var(--line-strong); border-radius: 0; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 0; background: var(--text); border: 0; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 0; background: var(--text); border: 0; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--text); width: 16px; height: 16px; border-radius: 0; }

.color-input { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line-strong); padding: 5px 5px 5px 12px; }
.color-input:focus-within { border-color: var(--text); }
.color-input input[type="text"] { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-family: var(--mono); font-size: 14px; text-transform: uppercase; }
.color-input input[type="color"] { width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-strong); border-radius: 0; }
input[type="color"]::-moz-color-swatch { border: 1px solid var(--line-strong); border-radius: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text);
  font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn-primary, .btn-accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover, .btn-accent:hover { background: transparent; color: var(--text); border-color: var(--text); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn svg { width: 16px; height: 16px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-strong); border-radius: 0; }
.seg button { border: 0; border-right: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--muted); padding: 9px 12px; font-size: 12px; font-weight: 500; text-transform: uppercase; cursor: pointer; transition: all .25s var(--ease); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }

.preview { background: var(--bg); border: 1px solid var(--line); padding: 20px; min-height: 360px; position: relative; overflow: hidden; }
.checker { background-color: #1c1c1c; background-image: linear-gradient(45deg, #262626 25%, transparent 25%), linear-gradient(-45deg, #262626 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #262626 75%), linear-gradient(-45deg, transparent 75%, #262626 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 180px; padding: 28px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: var(--bg); color: var(--muted);
  font-size: 15px; text-transform: uppercase;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--text); background: var(--accent-soft); color: var(--text); }
.dropzone strong { color: var(--text); font-size: 15px; font-weight: 500; }
.dropzone span { text-transform: none; font-size: 14px; }
.dropzone svg { width: 24px; height: 24px; }

.swatch { border-radius: 0; border: 1px solid var(--line); cursor: pointer; transition: transform .3s var(--ease); }
.swatch:hover { transform: translateY(-2px); }

.code { position: relative; background: var(--bg); border: 1px solid var(--line); padding: 16px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; line-height: 1.6; white-space: pre; overflow: auto; max-height: 360px; color: var(--muted-2); }
.code .copy-btn { position: absolute; top: 8px; right: 8px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 0; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; border: 1px solid currentColor; }
.badge.ok { color: var(--ok); }
.badge.bad { color: var(--bad); }
.badge.neutral { color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 40px; text-align: center; color: var(--muted); text-transform: uppercase; font-size: 15px; }

.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line-strong); color: var(--muted); }

/* Notification */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; font-size: 13px; font-weight: 500; text-transform: uppercase; animation: toastIn .5s var(--ease); }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; filter: blur(10px); transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; filter: blur(10px); transform: translateY(10px); } }

/* Transition de page : l'ancienne page, figée, part vers le haut sous la nouvelle */
#page { position: relative; z-index: 2; background: var(--bg); }
.page-exit { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: var(--bg); contain: strict; will-change: transform, opacity; }
.page-exit * { animation-play-state: paused !important; }
.page-exit main { padding-top: var(--header-h); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .tool-layout, .tool-layout.wide-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; --gutter: 16px; }
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 32px; }
  .footer-links { flex-direction: column; gap: 12px; }
  .footer-row .copyright { order: 1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .split .ch, .reveal { opacity: 1; filter: none; transform: none; }
}
