/* Charte : graphite, jaune signal, acier ; Fraunces (titres), Inter (texte), JetBrains Mono (étiquettes) */
:root {
  --bg: #0F1012; --surface: #1A1C20; --line: #2B2E34; --steel: #5A6273; --dot: #2B2F36;
  --fg: #F4F4F6; --muted: #8C8F96; --accent: #FFC72C; --cream: #FFF3C4;
  --serif: Fraunces, Georgia, serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px); --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, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1200px; 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; }

/* Grille de points « blueprint » et bandes pleine largeur */
.dots { background: radial-gradient(circle, var(--dot) 1px, transparent 1.5px) 0 0 / 24px 24px, var(--bg); }
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Monogramme [AB] */
.mark { display: block; flex: none; overflow: visible; }
.mk-l, .mk-r { fill: var(--accent); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.mk-a, .mk-b { fill: var(--fg); }
.mk-bowl { fill: none; stroke: var(--fg); stroke-width: 24; }
.logo:hover .mk-l { transform: translateX(-14px); }
.logo:hover .mk-r { transform: translateX(14px); }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { min-height: var(--header); display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 14px; font-size: 17px; font-weight: 500; text-decoration: none; }
.nav-right { display: flex; gap: 28px; align-items: center; }
.nav-links { display: flex; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; background: var(--accent); color: var(--bg); border: 0; padding: 0 20px; font: 600 15px/1.2 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: background .2s, transform .1s; }
.btn:hover { background: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px var(--steel); font-weight: 500; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.lang { display: flex; border: 1px solid var(--steel); font: 500 13px var(--mono); }
.lang > * { padding: 13px 11px; text-decoration: none; color: var(--muted); }
.lang a:hover { color: var(--fg); }
.lang [aria-current] { background: var(--accent); color: var(--bg); }

/* Typographie commune */
.eyebrow { margin: 0; font: 500 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--accent); }
h1, .h2, .h3-title, .end-title, .card h3, .work h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.h2 { margin: 0 0 16px; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; text-wrap: balance; }
.sub { margin: 0 0 48px; font-size: 17px; color: var(--muted); }
.block { padding-block: clamp(72px, 9vw, 112px); }
.num { font: 500 12px var(--mono); color: var(--accent); }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Accueil */
.hero { border-bottom: 1px solid var(--line); }
.hero { height: calc(100svh + 45vh); position: relative; border-bottom: 0; }
.hero-stage { position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow: clip; }
.float { position: absolute; color: var(--steel); animation: floatUp linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
.float svg { width: var(--s); height: var(--s); }
.hero-inner { position: relative; height: 100%; padding-block: clamp(64px, 10vw, 128px); display: flex; flex-wrap: wrap-reverse; align-items: center; gap: 48px 64px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
h1 { margin: 0; font-size: clamp(46px, 7.4vw, 96px); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
h1 em { color: var(--accent); }
.u { border-bottom: 6px solid var(--accent); }
.portrait { flex: none; width: clamp(160px, 22vw, 260px); aspect-ratio: 1; height: auto; margin: 16px; border-radius: 50%; object-fit: cover; outline: 1px dashed var(--steel); outline-offset: 14px; }

/* Bandeau des technologies */
.stack { padding-block: 40px; border-top: 0; border-bottom: 1px solid var(--line); }
.label { margin: 0 auto 24px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; 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: 12px; padding: 0 32px; color: var(--muted); font: 400 20px var(--mono); white-space: nowrap; transition: color .2s; }
.track-row li svg { width: 26px; height: 26px; }
.track-row li:hover { color: var(--accent); }

/* Grille des technos */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid li { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s; }
.grid li:hover { background: var(--surface); }
.grid-name { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; }
.grid-name svg { color: var(--muted); }
.grid-use { color: var(--muted); }

/* Projets */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, transform .25s; }
.card:not(.next):hover { border-color: var(--steel); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1); transition: filter .4s, transform .4s; }
.card:hover .card-media img { filter: none; transform: scale(1.03); }
.card-body { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 30px; }
.meta { font: 400 12px var(--mono); color: var(--muted); }
.card p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 13px var(--mono); padding: 4px 9px; border: 1px solid var(--steel); }
.more { margin-top: auto; min-height: 44px; text-decoration: none; font-size: 17px; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.more span { transition: transform .2s; }
.more:hover span { transform: translateX(4px); }
.next { min-height: 280px; align-items: center; justify-content: center; gap: 8px; background: var(--bg); border: 1px dashed var(--steel); color: var(--muted); text-decoration: none; transition: border-color .2s, color .2s; }
.next:hover { border-color: var(--accent); color: var(--fg); }
.plus { font-size: 32px; line-height: 1; color: var(--accent); }

/* Recommandations */
.recos { display: grid; gap: 32px; max-width: 880px; }
.reco { margin: 0; display: flex; flex-direction: column; gap: 20px; }
.quote-mark { font: 600 72px/.6 var(--serif); color: var(--accent); }
.reco blockquote { margin: 0; font-weight: 300; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.55; }
.reco blockquote p { margin: 0 0 16px; }
.more-reco p { font-size: 18px; }
.more-reco summary { cursor: pointer; color: var(--accent); font-size: 16px; font-weight: 400; list-style: none; width: fit-content; min-height: 44px; display: flex; align-items: center; }
.more-reco summary::-webkit-details-marker { display: none; }
.more-reco[open] summary { display: none; }
.reco figcaption { padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 14px var(--mono); }
.role { color: var(--muted); }

/* FAQ : <details> natifs, un seul ouvert à la fois (attribut name) */
.faq-wrap { display: flex; flex-wrap: wrap; gap: 0 64px; }
.faq-wrap > div:first-child { flex: 1 1 280px; }
.faq { flex: 999 1 520px; min-width: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-size: 19px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.chev { flex: none; color: var(--accent); transition: transform .25s ease; }
.faq details[open] .chev { transform: rotate(180deg); }
.faq p { margin: 0 0 22px; max-width: 760px; line-height: 1.6; color: var(--muted); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.contact > .reveal { flex: 1 1 320px; }
.coords { display: flex; flex-direction: column; gap: 10px; font: 400 15px var(--mono); }
.coords li, .coords a { display: flex; gap: 14px; align-items: center; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.coords a:hover { color: var(--accent); }
.coords svg { flex: none; color: var(--accent); width: 20px; height: 20px; }
.coords li:last-child svg { color: var(--steel); }
.coords li:last-child { color: var(--muted); }
.form { flex: 999 1 480px; min-width: 0; background: var(--surface); border: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 8px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--steel); font: 400 16px/1.5 Inter, system-ui, sans-serif; padding: 12px 14px; text-transform: none; letter-spacing: 0; }
.field:focus { outline: none; border-color: var(--accent); }
textarea.field { resize: vertical; }
.form .btn { align-self: flex-start; min-height: 48px; padding: 0 26px; font-size: 16px; }
.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 { position: relative; padding-block: 32px; }
.foot::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; height: 1px; translate: -50%; background: var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-links { display: flex; gap: 24px; margin-left: auto; font: 400 14px var(--mono); }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.copy { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* Étude de cas */
.case-hero { padding-block: clamp(56px, 8vw, 112px); display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px; }
.case-intro { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.case-title { font-size: clamp(56px, 8vw, 104px); line-height: 1; letter-spacing: -.03em; }
.lead { margin: 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; max-width: 560px; }
.role-line { margin: 0; font: 400 14px var(--mono); color: var(--muted); }
.facts { display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.facts li { display: flex; align-items: center; gap: 12px; }
.facts li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); }
.browser { flex: 1 1 460px; min-width: 0; margin: 0; background: var(--surface); border: 1px solid var(--steel); }
.browser-bar, .term-bar { display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 40px; border-bottom: 1px solid var(--line); font: 400 13px var(--mono); color: var(--muted); }
.browser-bar i, .term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.browser-bar span, .term-bar span { margin-left: 12px; }

.terminal-block { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 56px; }
.terminal-block > div:first-child { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.terminal-block .h2, .terminal-block .sub { margin: 0; }
.term { flex: 999 1 520px; min-width: 0; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); }
.term-body { padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 20px; overflow-x: auto; }
.term-body li { display: flex; flex-direction: column; gap: 4px; }
.term-body code { font: 400 15px var(--mono); color: var(--muted); white-space: nowrap; }
.term-body b { color: var(--accent); font-weight: 400; }
.term-body strong { font-size: clamp(28px, 4vw, 40px); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.term-body strong span { font-size: 15px; font-weight: 400; color: var(--muted); }

/* Frise de feuille de route */
.frise { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; }
.frise::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--steel); }
.frise::after { content: ""; position: absolute; left: 0; width: 80%; top: 10px; height: 4px; background: var(--accent); }
.frise li { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.frise li::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); }
.frise li:last-child::before { background: var(--bg); box-shadow: inset 0 0 0 4px var(--accent); }
.when { font: 500 12px var(--mono); text-transform: uppercase; color: var(--muted); }
.frise li:first-child .when { color: var(--accent); }
.frise h3, .phones h3, .hood-list h3, .work h3 { margin: 0; font-size: 19px; font-weight: 500; }
.frise p, .phones p, .hood-list p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 32px; }
.phones li { display: flex; flex-direction: column; gap: 14px; }
.phone { padding: 28px; border: 1px solid var(--line); background: radial-gradient(circle, var(--dot) 1px, transparent 1.5px) 0 0 / 16px 16px, var(--surface); }
.phone img { width: 62%; margin-inline: auto; border: 1px solid var(--steel); border-radius: 18px; }

.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 56px; }
.cells li { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.hood-list h3 { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.stack-line { margin-top: auto; font: 400 13px var(--mono); }
.h3-title { margin: 0 0 20px; font-size: 26px; }
.cycle { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 20px; }
.cycle::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--accent); }
.cycle li { position: relative; display: flex; flex-direction: column; gap: 8px; }
.cycle li::before { content: ""; width: 16px; height: 16px; background: var(--accent); }
.cycle li:last-child::before { background: var(--bg); box-shadow: inset 0 0 0 3px var(--accent); }
.cycle strong { font-weight: 500; }
.cycle span { font: 400 13px var(--mono); color: var(--muted); }

.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.work { background: var(--surface); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.work h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.work > ul:first-of-type { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: square; color: var(--muted); font-size: 15px; line-height: 1.55; flex: 1; }
.work > ul:first-of-type li::marker { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 400 12px var(--mono); padding: 3px 8px; border: 1px solid var(--steel); }
.case-end { padding-block: 72px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.end-title { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }

/* Animations */
@keyframes floatUp { to { transform: translateY(var(--dist)); color: var(--accent); filter: drop-shadow(0 0 10px rgba(255, 199, 44, .45)); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes blurIn { from { opacity: 0; filter: blur(10px); transform: translateY(24px); } }
@keyframes enter { from { opacity: 0; transform: translateY(22px); } }
/* Logo : les crochets s'écartent depuis les lettres, A puis B montent en fondu */
@keyframes mkL { from { opacity: 0; transform: translateX(70px); } }
@keyframes mkR { from { opacity: 0; transform: translateX(-70px); } }
@keyframes mkT { from { opacity: 0; transform: translateY(46px); } }
@supports (animation-timeline: view()) {
  .reveal { animation: blurIn linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .top .mk-l { animation: mkL .9s cubic-bezier(.2, .7, .2, 1) .1s backwards; }
  .top .mk-r { animation: mkR .9s cubic-bezier(.2, .7, .2, 1) .1s backwards; }
  .top .mk-a { animation: mkT .7s cubic-bezier(.2, .7, .2, 1) .45s backwards; }
  .top .mk-b { animation: mkT .7s cubic-bezier(.2, .7, .2, 1) .55s backwards; }
  .hero-text > *, .portrait, .case-intro > *, .browser { animation: enter .9s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero-text > :nth-child(1), .case-intro > :nth-child(1) { animation-delay: .2s; }
  .hero-text > :nth-child(2), .case-intro > :nth-child(2) { animation-delay: .32s; }
  .hero-text > :nth-child(3), .case-intro > :nth-child(3) { animation-delay: .44s; }
  .portrait, .browser, .case-intro > :nth-child(n+4) { animation-delay: .56s; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .reveal, .float { animation: none !important; }
  .mk-l, .mk-r { transition: none; }
}

/* Mobile */
@media (max-width: 900px) {
  .float svg { width: calc(var(--s) * .65); height: calc(var(--s) * .65); }
  .nav-links { display: none; }
  .nav-right { gap: 12px; }
}
@media (max-width: 560px) {
  .logo span { display: none; }
  .nav .btn { padding: 0 14px; font-size: 14px; }
  .lang > * { padding: 13px 9px; }
  .track-row li { font-size: 17px; padding: 0 22px; }
}
