/* ==========================================================================
   2M/Digital — Home (mode sombre)
   ========================================================================== */

:root {
  --ink: #0d0d0c;
  --surface: #181816;
  --line: #333330;
  --muted: #9e9c94;
  --paper: #f2efe6;
  --paper-dim: #ccc9bf;
  --yellow: #ffe500;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: 48px;
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: normal;
}

.accent { color: var(--yellow); }

:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

/* Blocs pleine largeur, contenu limité à 1440 */
.meta-bar,
.nav,
.hero,
.manifesto,
.section,
.cta-final,
.footer {
  padding-inline: max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter));
}

/* ---------- Boutons & liens ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 30px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: normal;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn span { font-size: 18px; transition: transform .15s ease; }
.btn:hover span { transform: translateX(4px); }

.btn--primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--paper);
}
.btn--primary:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--paper); }
.btn--primary:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--paper); }

.btn--sm { padding: 14px 22px; font-size: 13px; }
.btn--sm span { font-size: 14px; }

.btn--dark { background: var(--ink); color: var(--yellow); }
.btn--dark:hover { box-shadow: 5px 5px 0 var(--paper); transform: translate(-2px, -2px); }

.link-underline {
  display: inline-block;
  padding-bottom: 6px;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
  background: linear-gradient(var(--paper), var(--paper)) left bottom / 100% 2px no-repeat;
  transition: background-size .25s ease, color .15s ease;
}
.link-underline:hover { color: var(--yellow); background-image: linear-gradient(var(--yellow), var(--yellow)); }

/* ---------- Meta bar ---------- */

.meta-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.meta-bar__status { display: flex; align-items: center; gap: 8px; color: var(--paper); }
.meta-bar__status img { animation: blink 2s ease-in-out infinite; }
.meta-bar__tagline { color: var(--muted); }

@keyframes blink { 50% { opacity: .35; } }

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.logo { display: inline-flex; flex-shrink: 0; }
/* Le PNG a un fond noir : « lighten » le fond dans celui de la page */
.logo img { width: auto; height: 41px; mix-blend-mode: lighten; }
.logo--sm img { height: 31px; }

.nav__links { display: flex; gap: 36px; }
.nav__links a {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  transition: color .15s ease;
}
.nav__links .mono { font-size: 10px; color: var(--muted); line-height: 13px; }
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--yellow); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 120px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  width: 840px;
  min-width: 0;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 11.67vw, 168px);
  line-height: .84;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.hero__title span { display: block; }

.hero__lead {
  max-width: 600px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}
.hero__lead strong { font-weight: 400; color: var(--paper); }

.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }

/* Établi : les fiches de production */
.workbench {
  position: relative;
  flex-shrink: 0;
  width: 472px;
  height: 650px;
}

.workbench__grid {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--line);
  background: repeating-linear-gradient(90deg, transparent 0 78px, rgba(51, 51, 48, .5) 78px 79px);
}

.ticket {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 360px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .3s ease;
}
.ticket__meta { display: flex; justify-content: space-between; color: var(--muted); }
.ticket__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: .95;
}
.ticket__progress { height: 6px; background: var(--line); }
.ticket__progress span { display: block; height: 100%; background: var(--yellow); }
.ticket__status { color: var(--muted); }

.ticket--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.ticket--light .ticket__meta,
.ticket--light .ticket__status { color: var(--ink); }
.ticket--light .ticket__progress { background: var(--paper-dim); }
.ticket--light .ticket__progress span { background: var(--ink); }

.ticket--1 { left: 126px; top: 7px;   --r: -4deg; transform: rotate(var(--r)); }
.ticket--2 { left: 5px;   top: 244px; --r: 3deg;  transform: rotate(var(--r)); }
.ticket--3 { left: 103px; top: 434px; --r: -2deg; transform: rotate(var(--r)); }
.ticket:hover { transform: rotate(0deg) translateY(-4px); z-index: 2; }

.stamp {
  position: absolute;
  padding: 8px 14px;
  border: 3px solid var(--yellow);
  color: var(--yellow);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.stamp--hero { left: 295px; top: 626px; transform: rotate(12deg); z-index: 3; }

/* ---------- Bande de balisage ---------- */

.tape-band {
  position: relative;
  z-index: 2;
  height: 150px;
  overflow-x: clip;
  pointer-events: none;
}

.tape {
  position: absolute;
  top: 74px;
  left: -5%;
  width: 110%;
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink);
  transform: rotate(2.5deg);
}

.tape__track {
  display: flex;
  width: max-content;
  animation: tape-scroll 40s linear infinite;
}

.tape__group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 14px;
  white-space: nowrap;
  line-height: normal;
}
.tape__group span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  letter-spacing: 0.02em;
}
.tape__group i {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
}

@keyframes tape-scroll { to { transform: translateX(-50%); } }

/* ---------- Manifeste ---------- */

.manifesto {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 100px;
  border-block: 1px solid var(--line);
}

.manifesto__text {
  max-width: 1180px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.45vw, 64px);
  line-height: 1;
}

.figures { display: grid; grid-template-columns: repeat(4, 1fr); }
.figures > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 24px 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.figures > div:first-child { padding-left: 0; border-left: 0; }
.figures dt {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 72px;
  line-height: normal;
}
.figures dd { color: var(--muted); }

/* ---------- Sections génériques ---------- */

.section { padding-block: 120px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 7.78vw, 112px);
  line-height: .86;
}
.section__title--md { font-size: clamp(52px, 6.67vw, 96px); }

.section__intro {
  width: 380px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.tag {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.signature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 17px;
  line-height: normal;
}
.signature::before {
  content: "";
  flex-shrink: 0;
  width: 40px;
  height: 2px;
  background: var(--yellow);
}

/* ---------- Services ---------- */

.services__list { margin-top: 56px; }

.bench-label {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0 12px;
  color: var(--muted);
  white-space: nowrap;
}
.bench-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.service {
  display: grid;
  grid-template-columns: 70px 520px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 32px;
  padding: 26px 24px;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s ease, color .2s ease;
}
.service__num {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--yellow);
}
.service__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  line-height: .9;
}
.service__desc { font-size: 17px; line-height: 1.45; color: var(--muted); }
.service__arrow {
  display: inline-block;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0;
  transition: transform .2s ease;
}

/* État survol (ligne 01 active par défaut, comme la maquette) */
.service:hover,
.service:focus-visible,
.service.is-active {
  background: var(--yellow);
  color: var(--ink);
}
.service:hover :is(.service__num, .service__desc, .tag),
.service:focus-visible :is(.service__num, .service__desc, .tag),
.service.is-active :is(.service__num, .service__desc, .tag) {
  color: var(--ink);
}
.service:hover .tag,
.service:focus-visible .tag,
.service.is-active .tag { border-color: var(--ink); }
.service:hover .service__arrow,
.service:focus-visible .service__arrow,
.service.is-active .service__arrow { transform: rotate(45deg); }

.services__list:hover .service.is-active:not(:hover) { background: none; color: var(--paper); }
.services__list:hover .service.is-active:not(:hover) .service__num { color: var(--yellow); }
.services__list:hover .service.is-active:not(:hover) :is(.service__desc, .tag) { color: var(--muted); }
.services__list:hover .service.is-active:not(:hover) .tag { border-color: var(--line); }
.services__list:hover .service.is-active:not(:hover) .service__arrow { transform: none; }

/* ---------- À propos ---------- */

.about {
  display: flex;
  align-items: flex-start;
  gap: 96px;
}

.about__portrait {
  position: relative;
  flex-shrink: 0;
  width: 460px;
  height: 620px;
}
.about__photo {
  position: relative;
  height: 580px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.about__photo img {
  position: absolute;
  top: 0;
  left: -4.05%;
  width: 108.11%;
  max-width: none;
  height: 108.11%;
  object-fit: cover;
}

.patch {
  position: absolute;
  left: 246px;
  top: 507px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px;
  background: var(--yellow);
  border: 2px dashed var(--ink);
  color: var(--ink);
  transform: rotate(4deg);
  white-space: nowrap;
}
.patch__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 44px;
  line-height: .9;
  letter-spacing: 0.02em;
}
.patch__role { font-weight: 700; letter-spacing: 0.06em; }

.about__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.about__lead { font-weight: 500; font-size: 24px; line-height: 1.45; }
.about__body { font-size: 18px; line-height: 1.6; color: var(--muted); }

.spec { border-top: 1px solid var(--line); }
.spec__row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.spec__row dt { flex-shrink: 0; width: 180px; color: var(--muted); }
.spec__row dd { flex: 1; min-width: 0; font-weight: 600; font-size: 18px; line-height: 1.4; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--paper);
  font-weight: 500;
  font-size: 15px;
  line-height: normal;
  white-space: nowrap;
}

/* ---------- Méthode ---------- */

.steps {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: 56px;
  counter-reset: none;
}

.step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 22px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .2s ease;
}
.step:nth-child(1) { padding-bottom: 148px; }
.step:nth-child(2) { padding-bottom: 108px; }
.step:nth-child(3) { padding-bottom: 68px; }

.step__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  line-height: normal;
}
.step__top .mono { color: var(--yellow); white-space: nowrap; }
.step__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 64px;
  color: var(--line);
  transition: color .2s ease;
}
.step--current .step__num,
.step:hover .step__num { color: var(--yellow); }
.step:hover { border-color: var(--muted); }

.step__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 36px;
  line-height: normal;
}
.step__desc { font-size: 16px; line-height: 1.5; color: var(--muted); }

/* ---------- Réalisations ---------- */

.works { padding-top: 40px; }

.works__list {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 48px;
}

.work {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.work--a { flex: 820 1 0; }
.work--b { flex: 472 1 0; margin-right: calc(100% * 28 / 1344); }

.work__visual {
  position: relative;
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--line);
}
.work__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(125deg, transparent 0 38.3px, var(--line) 38.3px 39.3px);
  -webkit-mask: linear-gradient(125deg, #000 var(--stripe-end), transparent var(--stripe-end));
          mask: linear-gradient(125deg, #000 var(--stripe-end), transparent var(--stripe-end));
  transition: opacity .3s ease;
}
.work--a .work__visual { aspect-ratio: 820 / 520; --stripe-end: 50.5%; }
.work--b .work__visual { aspect-ratio: 472 / 380; --stripe-end: 41.5%; }
.work:hover .work__visual { border-color: var(--muted); }

.work__label {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--paper);
}

.work__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px 16px;
  line-height: normal;
}
/* Comme la maquette : la légende du projet B déborde légèrement de son visuel */
@media (min-width: 1025px) {
  .work__caption { flex-wrap: nowrap; white-space: nowrap; }
  .work--b .work__caption { margin-right: -48px; }
}
.work__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
}
.work__metric { color: var(--yellow); white-space: nowrap; }

/* ---------- Hors atelier ---------- */

.off-limits { padding-top: 40px; }

.off-limits__box {
  overflow: hidden;
  border: 1px dashed var(--line);
}

.hazard {
  height: 18px;
  background: repeating-linear-gradient(130deg, var(--ink) 0 16px, var(--yellow) 16px 27.6px);
}

.off-limits__content {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding: 64px 56px;
}

.off-limits__intro {
  flex-shrink: 0;
  width: 430px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.off-limits__intro > p:not(.stamp) { font-size: 18px; line-height: 1.55; color: var(--muted); }

.off-limits__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 5.84vw, 84px);
  line-height: .86;
  white-space: nowrap;
}

.stamp--off {
  position: static;
  margin: 18px 0 0 12px;
  padding: 8px 16px;
  transform: rotate(8deg);
}

.off-limits__list { flex: 1; min-width: 0; border-top: 1px solid var(--line); }

.refusal {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.refusal__cross {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--muted);
  font-weight: 700;
  font-size: 18px;
}
.refusal__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.refusal__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: .95;
}
.refusal__name del { text-decoration-thickness: from-font; }
.refusal__body p { font-size: 15px; line-height: 1.45; }

.off-limits__list .signature { padding-top: 24px; }

/* ---------- CTA final ---------- */

.cta-final {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-block: 110px;
  background: var(--yellow);
  color: var(--ink);
}

.cta-final__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(60px, 10.42vw, 150px);
  line-height: .84;
  white-space: nowrap;
}

.cta-final__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 420px;
}
.cta-final__side > p:first-child { font-weight: 500; font-size: 19px; line-height: 1.5; }
.cta-final__mail { font-size: 14px; letter-spacing: 0; }
.cta-final__mail a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; transition: text-decoration-color .15s; }
.cta-final__mail a:hover { text-decoration-color: currentColor; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 32px;
}
.footer p { color: var(--muted); }
.footer p a:hover { color: var(--paper); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1300px) {
  .service { grid-template-columns: 70px minmax(0, 1fr) auto auto; row-gap: 12px; }
  .service__desc { grid-column: 2; grid-row: 2; }
  .about { gap: 56px; }
  .about__portrait { width: 380px; }
  .patch { left: 170px; }
  .off-limits__content { gap: 48px; }
  .off-limits__intro { width: 340px; }
}

@media (max-width: 1200px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 72px; }
  .hero__text { width: 100%; }
  .workbench { align-self: center; }
}

@media (max-width: 1024px) {
  :root { --gutter: 32px; }

  .nav__links { display: none; }

  .figures { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .figures > div:nth-child(3) { padding-left: 0; border-left: 0; }

  .section__head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .section__intro { width: auto; max-width: 480px; }

  .about { flex-direction: column; }
  .about__portrait { width: min(460px, 100%); }
  .patch { left: auto; right: 0; }

  .steps { display: grid; grid-template-columns: repeat(2, 1fr); align-items: stretch; }
  .step, .step:nth-child(n) { padding-bottom: 28px; }

  .works__list { flex-direction: column; align-items: stretch; gap: 48px; }
  .work--b { margin-right: 0; }

  .off-limits__content { flex-direction: column; padding: 48px 32px; }
  .off-limits__intro { width: 100%; max-width: 520px; }
  .off-limits__list { width: 100%; }

  .cta-final { flex-direction: column; align-items: flex-start; }

  .footer { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .meta-bar__tagline { display: none; }
  .logo img { height: 32px; }
  .btn--sm { padding: 12px 16px; font-size: 12px; }

  .hero { padding-top: 48px; padding-bottom: 80px; }
  .hero__lead { font-size: 18px; }
  .hero__title { font-size: 17vw; }
  .workbench { zoom: .68; }

  .manifesto { padding-block: 72px; }
  .figures dt { font-size: 56px; }
  .figures > div { padding-inline: 16px 0; }

  .section { padding-block: 80px; }

  .service { grid-template-columns: 1fr auto; gap: 12px; padding: 22px 16px; }
  .service__num { grid-column: 1; grid-row: 1; }
  .service__arrow { grid-column: 2; grid-row: 1; }
  .service__name { grid-column: 1 / -1; grid-row: 2; font-size: 40px; }
  .service__desc { grid-column: 1 / -1; grid-row: 3; font-size: 16px; }
  .service .tag { grid-column: 1; grid-row: 4; justify-self: start; }

  .about__lead { font-size: 20px; }
  .spec__row { flex-direction: column; gap: 10px; }
  .spec__row dt { width: auto; }
  .patch { zoom: .8; }

  .steps { grid-template-columns: 1fr; }

  .work__name { font-size: 32px; }

  .off-limits__content { padding: 40px 20px; }
  .off-limits__title { font-size: 15vw; white-space: normal; }
  .refusal { flex-wrap: wrap; gap: 16px; }
  .refusal__name { font-size: 28px; }
  .refusal .tag { margin-left: 60px; }
  .signature { align-items: flex-start; }
  .signature::before { margin-top: 10px; }

  .cta-final { padding-block: 72px; }
  .cta-final__title { font-size: 15.5vw; }
  .cta-final__side { width: 100%; }

  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
