/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --line: rgba(255, 255, 255, .1);
  --text: #f3f0ea;
  --muted: #9a978f;
  --accent: #d4ff3f;
  --accent-ink: #0a0a0b;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
body.menu-open { overflow: hidden; }

/* ---------- Décor ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(110px); opacity: .32;
  translate: calc(var(--px, 0) * var(--d, 30px)) calc(var(--py, 0) * var(--d, 30px));
}
.b1 { --d: 60px; width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: var(--accent); opacity: .16; animation: drift 22s ease-in-out infinite alternate; }
.b2 { --d: -40px; width: 38vw; height: 38vw; right: -10vw; top: 22vh; background: #5b4bff; animation: drift 28s ease-in-out infinite alternate-reverse; }
.b3 { --d: 30px; width: 30vw; height: 30vw; left: 30vw; bottom: -16vw; background: #ff5b3a; opacity: .14; animation: drift 34s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(6vw, 8vh) scale(1.15); } }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Curseur ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }

/* ---------- Écran d'intro ---------- */
.loader {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad); font: 700 clamp(3rem, 12vw, 9rem)/.9 var(--display);
  transition: transform .9s cubic-bezier(.76, 0, .24, 1);
}
.loader small { font: 500 .85rem/1 var(--body); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; align-self: flex-start; }
.loader.done { transform: translateY(-100%); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem var(--pad);
  transition: transform .5s var(--ease), background .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(10, 10, 11, .7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav.hidden { transform: translateY(-100%); }
.logo { font: 800 1.25rem/1 var(--display); letter-spacing: -.02em; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; font-size: .9rem; color: var(--muted); }
.nav-links a { position: relative; transition: color .25s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; z-index: 2; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span { top: 21px; }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 1.05rem 1.9rem; border-radius: 999px; overflow: hidden; isolation: isolate;
  background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1 var(--body); will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--text); transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn-sm { padding: .75rem 1.25rem; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { color: var(--accent-ink); }
.link-arrow { position: relative; font-weight: 500; padding-right: 1.4em; }
.link-arrow::after { content: "↗"; position: absolute; right: 0; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translate(3px, -3px); }
.link-arrow:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 7rem var(--pad) 5.5rem;
}
.hero-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: .6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 255, 63, .6); } 100% { box-shadow: 0 0 0 12px rgba(212, 255, 63, 0); } }
.hero-name {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .16em;
  font: 800 clamp(4rem, 19vw, 19rem)/.84 var(--display);
  letter-spacing: -.045em; text-transform: uppercase;
}
.hero-name .line { display: block; overflow: hidden; padding-block: .06em; }
.hero-name .line:nth-child(2) { font: 400 1.02em/.9 var(--serif); font-style: italic; letter-spacing: -.02em; text-transform: none; color: var(--accent); padding-inline: .04em; margin-left: -.04em; }
.hero-name .char { display: inline-block; }
.js .hero-name .char { transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 35ms); }
.js.ready .hero-name .char { transform: none; }
.js .hero-fade { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease) .5s, transform .9s var(--ease) .5s; }
.js.ready .hero-fade { opacity: 1; transform: none; }
.hero-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem 3rem; }
.hero-role { font: 400 clamp(1.6rem, 3vw, 2.6rem)/1.1 var(--serif); font-style: italic; color: var(--accent); margin-bottom: .9rem; }
.hero-pitch { max-width: 52ch; color: var(--muted); font-size: 1.05rem; }
.hero-cta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.scroll-hint { position: absolute; left: 50%; bottom: 1rem; width: 1px; height: 44px; overflow: hidden; }
.scroll-hint span { display: block; width: 100%; height: 100%; background: var(--text); animation: hint 2s var(--ease) infinite; }
@keyframes hint { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- Bandeau ---------- */
.marquee { display: flex; overflow: hidden; border-block: 1px solid var(--line); padding: 1.4rem 0; }
.marquee ul { display: flex; flex: none; align-items: center; animation: marquee 30s linear infinite; }
.marquee:hover ul { animation-play-state: paused; }
.marquee li { display: flex; align-items: center; white-space: nowrap; font: 600 clamp(1.3rem, 2.6vw, 2.2rem)/1 var(--display); letter-spacing: -.02em; }
.marquee li::after { content: "✦"; margin: 0 2.2rem; color: var(--accent); font-size: .6em; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Sections ---------- */
main { counter-reset: section; }
.section { padding: clamp(5rem, 11vw, 10rem) var(--pad); counter-increment: section; }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.eyebrow { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: counter(section, decimal-leading-zero); color: var(--accent); }
h2 { font: 700 clamp(2.4rem, 7vw, 6rem)/.95 var(--display); letter-spacing: -.035em; }
h2 em { font: 400 1.05em/1 var(--serif); font-style: italic; letter-spacing: -.01em; color: var(--accent); }

.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- À propos ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-grid.no-photo { grid-template-columns: 1fr; max-width: 62rem; }
.portrait { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease), transform .9s var(--ease); }
.portrait:hover img { filter: none; transform: scale(1.04); }
.about-text p { font: 500 clamp(1.2rem, 2vw, 1.7rem)/1.35 var(--display); letter-spacing: -.015em; }
.about-text p + p { margin-top: 1.4em; color: var(--muted); font: 400 1.05rem/1.7 var(--body); letter-spacing: 0; max-width: 60ch; }
.sectors { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-top: 2rem; }
.sectors span { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem 3rem; margin-top: clamp(3rem, 6vw, 5rem); padding: 2.2rem 0; border-block: 1px solid var(--line); }
.stats:empty { display: none; }
.stat b { display: block; margin-bottom: .5rem; font: 700 clamp(2rem, 4vw, 3.25rem)/1 var(--display); letter-spacing: -.04em; white-space: nowrap; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card {
  position: relative; overflow: hidden; padding: 2rem; min-height: 320px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1rem;
  transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 255, 63, .14), transparent 60%);
}
.card:hover { border-color: rgba(212, 255, 63, .35); }
.card:hover::before { opacity: 1; }
.card-num { font: 400 1.1rem/1 var(--serif); font-style: italic; color: var(--accent); }
.card h3 { font: 700 1.6rem/1.1 var(--display); letter-spacing: -.02em; margin-top: 2.5rem; }
.card p { color: var(--muted); }
.card .tags { margin-top: auto; padding-top: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .75rem; color: var(--muted); }

/* ---------- Projets ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
.project:nth-child(even) { margin-top: clamp(0rem, 6vw, 6rem); }
.project { display: block; perspective: 1200px; }
.project-cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 60% 22%), hsl(calc(var(--h) + 50) 55% 9%));
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease);
  font: 800 clamp(5rem, 12vw, 10rem)/1 var(--display); color: rgba(255, 255, 255, .1);
}
.project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.project:hover .project-cover img { transform: scale(1.06); }
.project-cover .pill {
  position: absolute; right: 1rem; bottom: 1rem; padding: .6rem 1rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 600 .8rem/1 var(--body);
  opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s var(--ease);
}
.project:hover .pill, .project:focus-visible .pill { opacity: 1; transform: none; }
.project-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.project h3 { font: 700 clamp(1.5rem, 2.6vw, 2.2rem)/1.1 var(--display); letter-spacing: -.025em; margin: .4rem 0 .5rem; }
.project p { color: var(--muted); max-width: 50ch; margin-bottom: 1rem; }

/* ---------- Parcours ---------- */
.timeline { position: relative; padding-left: clamp(1.5rem, 4vw, 3rem); border-left: 1px solid var(--line); }
.timeline-fill { position: absolute; left: -1px; top: 0; width: 1px; height: 100%; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.step { position: relative; display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 1rem 3rem; padding: 2.2rem 0; border-bottom: 1px solid var(--line); }
.step::before {
  content: ""; position: absolute; left: calc(clamp(1.5rem, 4vw, 3rem) * -1 - 5px); top: 2.7rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent);
}
.step-period { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: .35rem; }
.step-period span { display: block; margin-top: .3rem; letter-spacing: 0; text-transform: none; opacity: .75; }
.step h3 { font: 700 clamp(1.3rem, 2.4vw, 1.9rem)/1.15 var(--display); letter-spacing: -.02em; }
.step h3 span { font: 400 1em/1 var(--serif); font-style: italic; color: var(--accent); }
.step p { color: var(--muted); margin-top: .6rem; max-width: 62ch; }
.step .tags { margin-top: 1rem; }
.sub { margin-bottom: 1rem; font: 500 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.timeline + .sub { margin-top: clamp(3rem, 6vw, 5rem); }

/* ---------- Avis ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.quote { padding: 2rem; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.quote blockquote { margin: 0 0 1.5rem; font: 400 1.35rem/1.35 var(--serif); }
.quote blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--accent); margin-bottom: .5rem; }
.quote b { display: block; font-weight: 600; }
.quote small { color: var(--muted); font-size: .85rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact-title { font-size: clamp(3rem, 12vw, 11rem); line-height: .9; }
.contact-text { max-width: 44ch; margin: 2rem auto 2.5rem; color: var(--muted); font-size: 1.1rem; }
.contact-cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.contact-cta .btn { padding: 1.4rem 2.6rem; font-size: 1.05rem; }
.socials { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 3.5rem; }
.socials:empty { display: none; }

.footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem var(--pad); border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { gap: .75rem; }
  .nav .btn-sm { margin-left: auto; }
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; margin: 0; padding: 6rem var(--pad) 3rem;
    flex-direction: column; justify-content: center; gap: 1rem;
    background: var(--bg); color: var(--text);
    font: 700 clamp(2.2rem, 10vw, 3.5rem)/1.1 var(--display); letter-spacing: -.03em;
    height: 100dvh; clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .6s cubic-bezier(.76, 0, .24, 1), visibility 0s .6s;
  }
  .menu-open .nav-links { clip-path: inset(0); visibility: visible; transition-delay: 0s; }
  .nav-links a::after { display: none; }
  .menu-open .nav { background: none; backdrop-filter: none; border-color: transparent; transform: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 260px; }
  .projects { grid-template-columns: 1fr; }
  .project:nth-child(even) { margin-top: 0; }
  .step { grid-template-columns: 1fr; gap: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero-fade, .js .hero-name .char { opacity: 1; transform: none; }
}
