/* Layout primitives (mobile-first) */
html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  /* Sticky header offset for anchor navigation */
  scroll-padding-top: 88px;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  background: var(--color-bg);
}

.container {
  width: min(var(--container), calc(100% - (var(--space-4) * 2)));
  margin-inline: auto;
}

.section {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--color-line);
}

.section-muted {
  /* Subtle depth, still within the grey token */
  background: linear-gradient(180deg, var(--color-muted), #fafafa);
}

.section-head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.section-lead {
  max-width: 65ch;
  font-size: var(--text-lg);
  color: rgba(43, 43, 43, 0.9);
}

h1,
h2,
h3 {
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--h1);
  line-height: 1.15;
}

h2 {
  font-size: var(--h2);
  line-height: 1.2;
}

h3 {
  font-size: var(--h3);
  line-height: 1.25;
}

p {
  font-size: var(--text-base);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

/* Hero — éditorial, image star, hiérarchie métier → nom */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: flex-start;
  border-top: 0;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: clamp(64px, 9vh, 95px) 0 clamp(88px, 12vh, 160px);
  padding-inline-start: clamp(72px, 8vw, 140px);
  box-sizing: border-box;
}

.hero-copy {
  max-width: min(58ch, calc(100vw - clamp(72px, 8vw, 140px) - var(--space-4)));
  width: max-content;
  padding: var(--space-5) var(--space-5);
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.55em;
  white-space: nowrap;
}

.hero-name {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0;
  margin-bottom: 1.85em;
}

.hero-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0;
  margin-bottom: 2.25em;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-3);
}

.hero-actions .btn {
  white-space: nowrap;
}

.hero-actions .btn-primary {
  padding: 0 20px;
  height: 42px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(240, 90, 40, 0.18);
}

.hero-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 400;
  border-width: 1px;
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

/* Projet en cours — présentation + timeline */
.project-header {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.project-name {
  margin: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--space-2) 0 0;
  color: rgba(43, 43, 43, 0.85);
  font-size: var(--text-sm);
}

.project-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.7);
}

.project-desc {
  max-width: 70ch;
  margin: 0;
  color: rgba(43, 43, 43, 0.9);
}

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(43, 43, 43, 0) 0%,
    rgba(43, 43, 43, 0.10) 18%,
    rgba(43, 43, 43, 0.10) 82%,
    rgba(43, 43, 43, 0) 100%
  );
}

.timeline-item {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding: 0 0 calc(var(--space-6) + 12px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(240, 90, 40, 0.55);
  box-shadow: 0 0 0 3px rgba(240, 90, 40, 0.10);
}

.timeline-media {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(43, 43, 43, 0.06);
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.06);
}

.timeline-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.timeline-body {
  display: grid;
  gap: 8px;
  max-width: 52ch;
}

.timeline-step {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(43, 43, 43, 0.55);
}

.timeline-title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.timeline-text {
  margin: 0;
  color: rgba(43, 43, 43, 0.82);
}

/* Split layout (About) — cadre photo réduit, proportions préservées */
.split {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

.split-media {
  max-width: 100%;
}

.split-media img {
  width: 100%;
  height: auto;
  max-height: min(420px, 50vh);
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  background: #fff;
}

.split-content {
  display: grid;
  gap: var(--space-3);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-5);
}

/* Responsive */
@media (max-width: 520px) {
  .hero-copy h1 {
    white-space: normal;
  }

  .hero-inner {
    padding-inline-start: var(--space-4);
    padding-right: var(--space-4);
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (min-width: 760px) {
  .section {
    padding: var(--space-8) 0;
  }

  .project-header {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: var(--space-5);
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr);
    align-items: center;
    gap: var(--space-5);
    padding-bottom: calc(var(--space-7) + 14px);
  }

  .timeline-item::before {
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Pas d’alternance : image puis texte pour chaque étape */

  .timeline-media img {
    aspect-ratio: 21 / 9;
  }

  .split {
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: var(--space-6);
  }

  .split-media img {
    max-height: min(480px, 55vh);
  }

  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    padding: clamp(64px, 9vh, 95px) 0 var(--space-7);
    padding-inline-start: clamp(72px, 8vw, 140px);
  }
}
