:root {
  --blanc: #fcfcfc;
  --noir: #08080a;
  --gris: #737885;
  --ardoise: #292b33;
  --nuage: #d1d6e0;
  --brume: #edf0f5;
  --azur: #1c8afa;
  --corail: #e34d45;
  --turquoise: #1c998f;
  --prune: #6b309e;
  --emeraude: #38993d;
  --encre: #171717;

  --edge: 60px; /* marge extérieure (header, hero, accueil) */
  --pad: 100px; /* marge des sections de contenu */
  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Manrope", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.366;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--azur);
  outline-offset: 4px;
  border-radius: 4px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-title);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.2;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Accueil ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 100px 0 var(--edge);
  font-weight: 800;
}

.topbar__logo {
  font-size: 16px;
}

.topbar__cv {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.intro {
  padding: 72px var(--edge) 0;
  text-align: center;
}

.intro__avatar {
  width: 449px;
  margin: 0 auto 88px;
}

.intro__name {
  font-size: clamp(40px, 9vw, 72px);
  font-weight: 800;
}

.intro__role {
  margin-top: 14px;
  font-size: 20px;
  color: var(--gris);
}

.intro__cv {
  display: inline-block;
  margin-top: 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--azur);
}

.intro__cv span {
  font-weight: 700;
}

.intro__cv:hover,
.topbar__cv:hover,
.back:hover,
.contact__links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rule {
  height: 1px;
  margin: 141px var(--edge) 0;
  border: 0;
  background: var(--nuage);
}

.logos {
  padding: 82px var(--edge) 200px;
}

.logos__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-bottom: 69px;
}

.pill {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--corail);
  color: var(--brume);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.logos__title {
  font-size: 38px;
  font-weight: 800;
}

.masonry {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.masonry__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  border-radius: 21px;
  background: var(--bg);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.card:hover {
  transform: scale(0.985);
}

.card img {
  transform: translate(var(--dx, 0), var(--dy, 0));
  transition: transform 0.25s ease;
}

.card:hover img {
  transform: translate(var(--dx, 0), var(--dy, 0)) scale(1.05);
}

.contact {
  padding: 30px var(--edge) 115px;
  background: var(--brume);
  text-align: center;
}

.contact__avatar {
  width: 70px;
  margin: -5px auto 0;
}

.contact__title {
  margin-top: 11px;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 800;
}

.contact__links {
  margin-top: 27px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ardoise);
}

.contact__links span {
  margin: 0 0.45em;
}

/* ---------- Pages projet ---------- */

.project {
  background: #fff;
  overflow-x: clip; /* 100vw inclut la barre de défilement */
}

.back {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gris);
}

.project-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 0;
  text-align: center;
}

.project-head .back {
  align-self: flex-start;
  margin-left: var(--edge);
}

.project-head__kicker {
  padding: 0 var(--edge);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--turquoise);
}

.project-head__title {
  padding: 0 var(--edge);
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 800;
}

.hero {
  padding: 0 var(--edge);
}

.meta {
  display: flex;
  gap: 48px;
  margin: 0;
  padding: 40px var(--pad) 0;
}

.meta > div {
  flex: 0 0 auto;
}

.meta > div:nth-child(1) {
  width: 300px;
}

.meta > div:nth-child(2) {
  width: 200px;
}

.meta > div:nth-child(3) {
  flex: 1;
  max-width: 450px;
}

.meta dt {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gris);
}

.meta dd {
  margin: 0;
}

.section {
  padding: 100px var(--pad) 0;
}

.text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--c, var(--turquoise));
}

.text h2 {
  max-width: var(--h2-w, none);
  font-size: 32px;
  font-weight: 700;
}

.text p:not(.kicker) {
  max-width: var(--p-w, none);
  color: var(--ardoise);
}

.section--contexte .text {
  --p-w: 850px;
}

.section--contexte .text + img {
  margin-top: 80px;
}

.split {
  display: flex;
  align-items: center;
  gap: 80px;
}

.split > img {
  flex: 0 1 auto;
  min-width: 0;
}

.split > .text {
  flex: 1;
  min-width: 0;
}

.logo-box {
  flex: 0 0 297px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 298px;
}

.split--center {
  justify-content: center;
}

.split--center > .text {
  flex: 0 1 var(--text-w, 460px);
}

.text--right {
  align-items: flex-end;
  text-align: right;
}

.text--center {
  align-items: center;
  text-align: center;
}

.stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}

/* Résultat */

.result > * + * {
  margin-top: 80px;
}

.result .text {
  max-width: var(--text-w, 728px);
  margin: 0 auto;
}

.result .text + .bleed {
  margin-top: 13px;
}

/* pleine largeur de la fenêtre, au-delà du gabarit 1280 */
.bleed {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.block-dark {
  aspect-ratio: 1280 / 726;
  background: var(--encre);
}

.mosaic {
  display: grid;
  grid-template-columns: 330fr 330fr 340fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 3.7037%; /* 40 / 1080 */
  row-gap: 5.5556%; /* 40 / 720 */
  aspect-ratio: 1080 / 720;
}

.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic .wide {
  grid-column: 1 / 3;
}

.mosaic .tall {
  grid-column: 3;
  grid-row: 1 / 3;
}

.mosaic--mirror {
  grid-template-columns: 340fr 330fr 330fr;
}

.mosaic--mirror .wide {
  grid-column: 2 / 4;
}

.mosaic--mirror .tall {
  grid-column: 1;
}

.project-foot {
  padding: 60px var(--edge);
  font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root {
    --pad: 60px;
  }

  .split {
    gap: 48px;
  }

  .split > img {
    max-width: 42%;
  }
}

@media (max-width: 760px) {
  :root {
    --edge: 20px;
    --pad: 20px;
  }

  .topbar {
    padding: 24px var(--edge) 0;
  }

  .intro {
    padding-top: 40px;
  }

  .intro__avatar {
    width: min(70%, 320px);
    margin-bottom: 40px;
  }

  .intro__role {
    font-size: 17px;
  }

  .rule {
    margin-top: 72px;
  }

  .logos {
    padding: 56px var(--edge) 80px;
  }

  .logos__head {
    margin-bottom: 40px;
  }

  .logos__title {
    font-size: 30px;
  }

  .masonry {
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    height: 260px;
  }

  .contact {
    padding-bottom: 72px;
  }

  .contact__links {
    font-size: 16px;
  }

  .contact__links a {
    display: block;
  }

  .contact__links span {
    display: none;
  }

  .project-head {
    padding: 24px 0 32px;
  }

  .meta {
    flex-direction: column;
    gap: 20px;
    padding-top: 32px;
  }

  .meta > div:nth-child(n) {
    width: auto;
    max-width: none;
  }

  .section {
    padding-top: 64px;
  }

  .text h2 {
    font-size: 26px;
  }

  .section--contexte .text + img {
    margin-top: 40px;
  }

  .split,
  .stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .split > img {
    max-width: 100%;
    align-self: center;
  }

  .logo-box {
    flex: none;
    align-self: center;
    height: 200px;
  }

  .split > .text,
  .split--center > .text {
    flex: none;
    width: 100%;
  }

  .text--right {
    order: -1;
    align-items: flex-start;
    text-align: left;
  }

  .text {
    --h2-w: none;
    --p-w: none;
  }

  .result > * + * {
    margin-top: 40px;
  }

  .project-foot {
    padding: 40px var(--edge);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card img {
    transition: none;
  }
}
