:root {
  --bg: #161616; --fg: #F2F2F0; --muted: #8E8E89; --soft: #A3A39D; --line: #2A2A28; --edge: #3A3A37;
  --accent: #E1AD01; --accent-hi: #F5C93A; --glow: rgba(225, 173, 1, .35);
  --gutter: clamp(16px, 4vw, 40px); --header: 72px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 Inter, system-ui, sans-serif; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--accent); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 12px; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.nav { min-height: var(--header); display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.logo { font-size: 28px; letter-spacing: -.01em; text-decoration: none; }
.logo span span { color: var(--accent); font-weight: 600; }
.nav-right { display: flex; gap: 32px; align-items: center; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { color: var(--soft); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: color .2s; }
.nav-links a::after { content: ""; width: 4px; height: 3px; background: var(--accent); transition: width .25s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 18px; }
.btn { white-space: nowrap; background: #fff; color: #111; border: 0; padding: 12px 18px; border-radius: 2px; font: 500 17px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: background .2s, transform .1s; }
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: translateY(1px); }
.lang { display: flex; border: 1px solid var(--edge); border-radius: 2px; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.lang > * { padding: 10px 11px; text-decoration: none; color: var(--muted); }
.lang a:hover { color: var(--fg); }
.lang [aria-current] { background: var(--accent); color: var(--bg); }

/* Accueil : la scène reste fixe pendant que les icônes montent */
.hero { height: calc(100svh + 45vh); position: relative; }
.hero-stage { position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow: clip; }
.float { position: absolute; color: #4F4F4A; }
.float svg { width: var(--s); height: var(--s); }
.hero-inner { position: relative; height: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; text-align: center; }
.portrait { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 36px rgba(225, 173, 1, .5); }
h1 { margin: 0; font-weight: 400; font-size: clamp(40px, 6.4vw, 88px); line-height: 1.18; letter-spacing: -.02em; text-wrap: balance; }
.u { border-bottom: 5px solid var(--accent); }
.scroll { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--muted); text-decoration: none; }
.arrow { color: var(--accent); animation: bob 1.6s ease-in-out infinite; }

/* Bandeau des technologies */
.stack { padding: 0 0 120px; }
.marquee-label { margin: 0 0 48px; text-align: center; font-size: 16px; font-weight: 400; color: var(--muted); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track-row { display: flex; }
.track-row li { display: flex; align-items: center; gap: 14px; padding: 0 44px; color: #6E6E69; font-size: 24px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.track-row li:hover { color: var(--accent); }

/* Titres de section */
.block { padding-bottom: 160px; }
.h2 { margin: 0 0 20px; font-weight: 400; font-size: clamp(36px, 5vw, 64px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.sub { margin: 0 0 64px; font-size: 18px; color: var(--muted); }

/* Grille des technos */
.skills { padding-top: 80px; padding-bottom: 160px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 64px; align-items: center; }
.skills .sub { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 12px; border-bottom: 2px solid var(--accent); text-align: center; }
.grid-name { display: flex; align-items: center; gap: 14px; color: var(--accent); font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; }
.grid-use { font-size: 15px; color: var(--muted); }

/* Projets */
.glow { border: 1.5px solid var(--accent); box-shadow: 0 0 14px var(--glow), inset 0 0 14px rgba(225, 173, 1, .06); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; background: var(--bg); }
.lift { transition: transform .25s ease, box-shadow .25s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: 0 0 22px rgba(225, 173, 1, .5), inset 0 0 14px rgba(225, 173, 1, .08); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #2A2A28; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1); transition: filter .4s, transform .4s; }
.lift:hover .card-media img { filter: none; transform: scale(1.03); }
.map { display: flex; align-items: center; justify-content: center; color: var(--accent); background: radial-gradient(circle, #3A3A37 1px, transparent 1.5px) 0 0 / 18px 18px, #1E1E1C; }
.card-body { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.card h3 { margin: 0; font-weight: 400; font-size: 26px; }
.card p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--accent); color: var(--bg); font-size: 14px; font-weight: 500; padding: 4px 9px; border-radius: 3px; }
.more { margin-top: auto; text-decoration: none; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.more span { transition: transform .2s; }
.more:hover span { transform: translateX(4px); }
.dim { opacity: .75; }
.status { margin-top: auto; color: var(--accent); font-size: 15px; }
.next { text-decoration: none; transition: border-color .2s, color .2s; align-items: center; justify-content: center; gap: 12px; min-height: 420px; border: 1.5px dashed #4A4130; color: #6E6E69; font-size: 18px; }
.next:hover { border-color: var(--accent); color: var(--accent); }
.plus { font-size: 40px; font-weight: 300; color: var(--accent); }

/* Recommandations */
.recos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 32px; align-items: start; }
.reco { margin: 0; position: relative; padding: 44px 40px; display: flex; flex-direction: column; gap: 36px; border: 2px solid var(--accent); border-top: 0; box-shadow: 0 6px 14px -6px rgba(225, 173, 1, .45); }
.reco::before { content: ""; position: absolute; top: 0; left: 0; width: 34%; height: 2px; background: var(--accent); }
.quote-mark { font-size: 72px; line-height: .6; color: var(--accent); font-weight: 600; }
.reco blockquote { margin: 0; font-size: 18px; line-height: 1.55; color: #C9C9C4; }
.reco blockquote p { margin: 0 0 16px; }
.more-reco summary { cursor: pointer; color: var(--accent); font-size: 16px; list-style: none; width: fit-content; }
.more-reco summary::-webkit-details-marker { display: none; }
.more-reco summary:hover { color: var(--accent-hi); }
.more-reco[open] summary { display: none; }
.who { font-size: 17px; }
.reco figcaption { display: flex; flex-direction: column; gap: 4px; }
.role { font-size: 15px; color: var(--muted); }

/* FAQ : <details> natifs, un seul ouvert à la fois (attribut name) */
.faq details { border-top: 2px solid var(--line); position: relative; }
.faq details::before { content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: 0; background: var(--accent); transition: width .4s ease; }
.faq details[open]::before { width: 220px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 0; font-size: clamp(19px, 2vw, 24px); }
.faq summary::-webkit-details-marker { display: none; }
.chev { flex: none; color: #C9C9C4; transition: transform .25s ease; }
.faq details[open] .chev { transform: rotate(180deg); }
.faq p { margin: 0 0 32px; max-width: 820px; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* Contact */
.contact { padding-bottom: 140px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 64px; }
.contact .sub { margin-bottom: 28px; }
.coords { display: flex; flex-direction: column; gap: 18px; font-size: 17px; }
.coords li, .coords a { display: flex; gap: 16px; align-items: center; text-decoration: none; overflow-wrap: anywhere; }
.coords a:hover { color: var(--accent); }
.coords svg { flex: none; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 22px; }
.form label { display: flex; flex-direction: column; gap: 10px; }
.field { width: 100%; background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; padding: 14px 16px; border-radius: 2px; }
.field:focus { outline: none; box-shadow: 0 0 22px rgba(225, 173, 1, .55); }
.form .btn { align-self: flex-start; font-size: 18px; font-weight: 600; padding: 14px 22px; }
.honey { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.5em; color: var(--accent); }
.form .btn:disabled { opacity: .6; cursor: wait; }

/* Pied de page */
.foot { padding-bottom: 48px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--edge); }
.foot-links { display: flex; gap: 28px; }
.foot-links a { color: var(--soft); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.copy { margin: 32px 0 0; text-align: center; font-size: 15px; color: var(--muted); }

/* Étude de cas */
.case-hero { padding-top: 72px; padding-bottom: 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 64px; align-items: center; }
.eyebrow { margin: 0 0 20px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.case-title { font-size: clamp(64px, 9vw, 120px); line-height: 1; letter-spacing: -.03em; }
.lead { margin: 28px 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: #C9C9C4; max-width: 560px; }
.pill { display: inline-block; margin: 0 0 28px; background: var(--accent); color: var(--bg); font-weight: 600; padding: 8px 14px; border-radius: 2px; }
.facts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; color: var(--soft); }
.facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 12px; background: var(--accent); vertical-align: middle; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--edge); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); background: transparent; }
.browser { margin: 0; background: #1E1E1C; overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--edge); font-size: 13px; color: var(--muted); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--edge); }
.browser-bar span { margin-left: 12px; }
.stats-wrap { padding-bottom: 140px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.stats li { display: flex; flex-direction: column; gap: 6px; padding: 24px 4px; border-bottom: 2px solid var(--accent); }
.stats strong { font-size: clamp(40px, 4.4vw, 56px); font-weight: 400; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats span { color: var(--muted); }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 32px; }
.role-list li { border-top: 2px solid var(--line); padding-top: 24px; }
.num { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .1em; }
.role-list h3, .phones h3, .hood-list h3, .work h3 { margin: 12px 0 10px; font-weight: 500; font-size: 22px; }
.role-list p, .phones p, .hood-list p { margin: 0; color: var(--muted); }
.phones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 48px 32px; }
.phone { max-width: 300px; border-radius: 34px; overflow: hidden; border: 1.5px solid var(--edge); box-shadow: 0 0 30px rgba(225, 173, 1, .12); margin-bottom: 24px; }
.step { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--bg); font-weight: 600; font-size: 14px; }
.hood { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 64px; }
.hood-list { display: flex; flex-direction: column; }
.hood-list > li { padding: 22px 0; border-top: 1px solid var(--line); }
.hood-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 4px; }
.hood-head h3 { margin: 0; }
.h3-title { margin: 0 0 32px; font-weight: 400; font-size: clamp(28px, 3vw, 40px); }
.cycle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: c; }
.cycle li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1.5px solid var(--edge); position: relative; }
.cycle li:nth-child(4) { border-color: var(--accent); box-shadow: 0 0 14px var(--glow); }
.cycle li + li::before { content: "↓"; position: absolute; top: -16px; left: 22px; color: var(--accent); font-size: 14px; line-height: 1; }
.cycle span { color: var(--muted); }
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.work { padding: 28px 26px; display: flex; flex-direction: column; gap: 6px; }
.work h3 { margin-top: 0; }
.work > ul:first-of-type { display: flex; flex-direction: column; gap: 10px; color: var(--muted); padding-left: 18px; list-style: square; flex: 1; }
.work > ul:first-of-type li::marker { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.chips li { font-size: 13px; padding: 4px 9px; border: 1px solid var(--edge); color: var(--soft); border-radius: 2px; }
.case-end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.case-end .more { margin: 0; }

/* Animations */
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes bob { 50% { transform: translateY(8px); } }
@keyframes floatUp { to { transform: translateY(var(--dist)); color: var(--accent); filter: drop-shadow(0 0 10px rgba(225, 173, 1, .55)); } }
@keyframes heroOut { to { opacity: .25; transform: translateY(-30px) scale(.97); } }
@keyframes blurIn { from { opacity: 0; filter: blur(10px); transform: translateY(24px); } }
/* Sans scroll-timeline (Firefox) : la page reste statique, rien ne manque */
@supports (animation-timeline: scroll()) {
  .float { animation: floatUp linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
  .hero-inner { animation: heroOut linear both; animation-timeline: scroll(root); animation-range: 15vh 50vh; }
  .reveal { animation: blurIn linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
}
@keyframes enter { from { opacity: 0; transform: translateY(22px); } }
@keyframes enterNav { from { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Entrée au chargement : en-tête, puis portrait, titre, flèche en cascade */
  .nav { animation: enterNav .7s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero-inner > * { animation: enter .9s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero-inner > :nth-child(1) { animation-delay: .15s; }
  .hero-inner > :nth-child(2) { animation-delay: .3s; }
  .hero-inner > :nth-child(3) { animation-delay: .5s; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .arrow, .float, .hero-inner, .reveal { animation: none !important; }
}

/* Mobile */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-right { gap: 12px; }
  .logo { font-size: 22px; }
  .btn { padding: 11px 14px; font-size: 15px; }
  .float svg { width: calc(var(--s) * .6); height: calc(var(--s) * .6); }
  .portrait { width: 150px; height: 150px; }
  .hero-inner { gap: 36px; }
  .block, .skills { padding-bottom: 112px; }
  .sub { margin-bottom: 44px; }
  .track-row li { font-size: 20px; padding: 0 28px; }
  .reco { padding: 32px 24px; gap: 28px; }
  .case-hero { padding-top: 40px; gap: 44px; }
  .stats-wrap { padding-bottom: 96px; }
  .phone { max-width: 260px; margin-inline: auto; }
}
@media (max-width: 420px) {
  .logo { font-size: 19px; }
  .nav .btn { font-size: 14px; padding: 10px 12px; }
  .lang > * { padding: 8px; }
  .grid { grid-template-columns: 1fr; }
}
