/* RESET */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* VARIABLES */

:root {
  --padding: 1.5rem;

  --color-black: #000;
  --color-white: #fff;
  --color-grey: #777;
  --color-light: #efefef;

  --color-text: var(--color-black);
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);

  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #f0c674;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;

  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}


/* BASE */

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-background);
}

body {
  padding: var(--padding);
  max-width: 70rem;
  margin: 0 auto;
}

img {
  display: block;
  width: 100%;
}

li {
  list-style: none;
}

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

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: inherit;
  color: var(--color-text-grey);
}


/* UTILITAIRES */

.bg-light {
  background-color: var(--color-light);
}

.color-grey {
  color: var(--color-text-grey);
}

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

.margin-s {
  margin-bottom: .75rem;
}

.margin-m {
  margin-bottom: 1.5rem;
}

.margin-l {
  margin-bottom: 3rem;
}

.margin-xl {
  margin-bottom: 4.5rem;
}

.margin-xxl {
  margin-bottom: 6rem;
}


/* HEADER */

.header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-right: -1rem;
  margin-left: -1rem;
  margin-bottom: 6rem;
}

.logo {
  padding: 1rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.menu {
  display: flex;
}

.menu a {
  padding: 1rem;
  display: block;
}

.menu a[aria-current] {
  text-decoration: underline;
}

.social {
  display: flex;
  padding: 0 .5rem;
}

.social a {
  padding: 1rem .5rem;
}


/* STRUCTURE */

.main {
  min-height: 60vh;
}

.section {
  padding: 3rem 0;
}

.grid {
  --columns: 12;
  --gutter: 3rem;

  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}

.grid > .column {
  margin-bottom: var(--gutter);
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;

  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}


/* TYPOGRAPHIE GÉNÉRIQUE */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
}

.text a {
  text-decoration: underline;
}

.text :first-child {
  margin-top: 0;
}

.text :last-child {
  margin-bottom: 0;
}

.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}

.text ul,
.text ol {
  margin-left: 1rem;
}

.text ul p,
.text ol p {
  margin-bottom: 0;
}

.text ul > li {
  list-style: disc;
}

.text ol > li {
  list-style: decimal;
}

.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

.text h1,
.h1,
.intro {
  font-size: 2rem;
  margin-bottom: 3rem;
  line-height: 1.25em;
}

.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.text h3,
.h3 {
  font-weight: 600;
}

.text .codeblock {
  display: grid;
}

.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}

.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}

.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.text hr {
  margin: 6rem 0;
}

.text dt {
  font-weight: 600;
}

.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}

.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}

.text figure {
  margin: 3rem 0;
}

.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}

.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.intro {
  max-width: 40rem;
}

/* TITRES DE FICHES PROJET
   Le reset global remet les h1/h2 en graisse héritée.
   On réaffirme ici le titre projet en gras, sans modifier le sous-titre. */
.project-page .intro h1,
.project-page h1,
.intro h1 {
  font-weight: 700;
}

.project-page .intro h2,
.project-page h2,
.intro h2 {
  font-weight: 400;
}

.intro *:not(:last-child) {
  margin-bottom: 1em;
}


/* COMPOSANTS */

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-light);
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}

.img img,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.img[data-contain] img {
  object-fit: contain;
}

.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.map {
  --w: 2;
  --h: 1;

  position: relative;
  overflow: hidden;
  background: var(--color-black);
  padding-bottom: calc(100% / var(--w) * var(--h));
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* FOOTER */

.footer {
  margin-top: 6rem;
  padding: 4rem 0;
  border-top: 1px solid #e5e5e5;
  line-height: 1.5em;
}

.footer__inner {
  max-width: 42rem;
}

.footer__name {
  margin: 0 0 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.footer__name span {
  font-weight: 400;
}

.footer__baseline {
  margin: 0 0 1.5rem;
  color: #777;
  line-height: 1.45;
}

.footer__contact {
  margin: 0;
}

.footer__contact a {
  color: #777;
  text-decoration: none;
}

.footer__contact a:hover {
  color: #000;
  text-decoration: underline;
}


/* PAGINATION */

.pagination {
  display: flex;
  padding-top: 6rem;
}

.pagination > span {
  color: var(--color-text-grey);
}

.pagination > * {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}

.pagination > a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}


/* NOTES */

.note-excerpt {
  line-height: 1.5em;
}

.note-excerpt header {
  margin-bottom: 1.5rem;
}

.note-excerpt figure {
  margin-bottom: .5rem;
}

.note-excerpt-title {
  font-weight: 600;
}

.note-excerpt-date {
  color: var(--color-text-grey);
}


/* HOME */

.home-hero {
  display: grid;
  grid-template-columns: minmax(28rem, 1.15fr) minmax(26rem, 1fr);
  align-items: center;
  gap: 4rem;
  padding: 2rem 0 5rem;
}

.home-hero__image a {
  display: block;
  cursor: pointer;
}

.home-hero__image a img {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.home-hero__image a:hover img {
  transform: translateX(0.35rem);
  opacity: 0.92;
}

.home-hero__eyebrow {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.3;
  color: #777;
  font-weight: 700;
}

.home-hero__text h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.home-hero__subtitle {
  margin: 1.5rem 0 0;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #777;
  font-weight: 700;
}

.home-hero__description {
  max-width: 44rem;
  margin: 2rem 0 0;
  color: #777;
  font-size: 1.15rem;
  line-height: 1.5;
}

.home-hero__link {
  margin: 2rem 0 0;
}

.home-hero__link a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}


/* FICHE PROJET */

.project-layout {
  align-items: start;
}

.project-sidebar {
  font-size: .95rem;
  line-height: 1.35;
}

.project-infos {
  margin: 0 0 2rem;
  padding: 0;
}

.project-info {
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.project-info dt,
.project-info dd {
  display: inline;
}

.project-info dt {
  margin: 0;
  color: rgba(0, 0, 0, 0.75);
  font-weight: 400;
}

.project-info dt::after {
  content: " : ";
}

.project-info dd {
  margin: 0;
  color: rgba(0, 0, 0, 1);
  font-weight: 700;
}


/* GALERIE PROJET */

.project-gallery__button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
}

.project-gallery__button figure {
  margin: 0;
}


/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 10000;
  border: 0;
  background: none;
  color: white;
  font-family: inherit;
  font-size: 3.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
}

.lightbox__close {
  top: 1rem;
  right: 1.5rem;
}

.lightbox__prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}


/* PAGE À PROPOS */

.about-page {
  padding-top: 1rem;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(28rem, 1.25fr);
  gap: 5rem;
  padding: 3rem 0 6rem;
  border-bottom: 1px solid #e5e5e5;
}

.about-hero h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 700;
}

.about-hero__text {
  max-width: 38rem;
  color: #666;
  font-size: clamp(1.45rem, 2.05vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.about-hero__text p + p {
  margin-top: 1.75rem;
}

.about-section {
  padding: 5rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.about-section--grid {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(28rem, 1.25fr);
  gap: 5rem;
}

.about-section h2 {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
}

.about-section__content {
  max-width: 48rem;
  color: #666;
  font-size: 1.2rem;
  line-height: 1.5;
}

.about-section__content p + p {
  margin-top: 1.5rem;
}

.about-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(14rem, 1fr));
  gap: 1.25rem 3rem;
  margin-top: 3rem;
  color: #666;
  font-size: clamp(1.35rem, 2.15vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.about-list li {
  max-width: 14rem;
}

.about-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
  gap: 0.75rem 2rem;
  margin-top: 2rem;
  color: #000;
  font-size: 1rem;
  line-height: 1.35;
}

.about-contact {
  padding: 4rem 0 1rem;
  max-width: 52rem;
}

.about-contact p {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: clamp(1.35rem, 2.15vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.about-contact a {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.about-contact a:hover {
  color: #666;
}


/* PAGE CONTACT */

.contact-page {
  padding-top: 1rem;
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(28rem, 1.25fr);
  gap: 5rem;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.contact-hero h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 700;
}

.contact-hero__text {
  max-width: 40rem;
  color: #666;
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.contact-hero__text p + p {
  margin-top: 1.75rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(28rem, 1.25fr);
  gap: 5rem;
  padding: 3rem 0 2rem;
}

.contact-section h2 {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
}

.contact-details {
  max-width: 48rem;
  color: #666;
  font-size: clamp(1.35rem, 2.15vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.contact-details p + p {
  margin-top: 1.25rem;
}

.contact-details a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-details a:hover {
  color: #666;
}


/* RESPONSIVE DESKTOP */

@media screen and (min-width: 60rem) {
  body {
    --padding: 3rem;
  }

  .grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .grid > .column {
    grid-column: span var(--columns);
  }
}


/* RESPONSIVE TABLETTE / MOBILE */

@media screen and (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 0;
  }

  .home-hero__image {
    justify-content: flex-start;
  }

  .home-hero__image img {
    max-width: 18rem;
  }

  .home-hero__text h1 {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }

  .about-page,
  .contact-page {
    padding-top: 0;
  }

  .about-hero,
  .about-section--grid,
  .contact-hero,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-hero,
  .contact-hero {
    padding: 2rem 0 4rem;
  }

  .about-hero__text,
  .contact-hero__text {
    max-width: none;
  }

  .about-section {
    padding: 4rem 0;
  }

  .contact-section {
    padding: 3rem 0 1rem;
  }

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

  .about-list li {
    max-width: none;
  }
}

@media screen and (max-width: 700px) {
  .header {
    margin-bottom: 1.5rem;
  }

  .logo {
    display: block;
    margin-bottom: 2rem;
  }

  .menu {
    display: flex;
    gap: 2rem;
    flex-wrap: nowrap;
  }

  .menu a {
    white-space: nowrap;
  }

  .menu .social {
    display: none;
  }

  .lightbox__image {
    max-width: 88vw;
    max-height: 82vh;
  }

  .lightbox__close,
  .lightbox__prev,
  .lightbox__next {
    font-size: 2.8rem;
  }
}


/* Actions accueil : lien projets + lien portfolio */

.home-actions {
  margin-top: 1.5rem;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  gap: 0.3rem;
}

.home-actions a {
  display: block !important;
  width: fit-content;
  margin: 0;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Lien principal */
.home-actions a:first-child {
  font-size: 1rem;
  color: #000;
}

/* Lien portfolio plus discret */
.home-actions a.portfolio-download {
  font-size: 0.78rem;
  color: #777;
}

.home-actions a.portfolio-download:hover {
  color: #000;
}

/* Lien portfolio sur les pages À propos et Contact */

.page-download-link {
  margin-top: 2rem;
  color: #666;
  font-size: 1rem;
  line-height: 1.4;
}

.page-download-link p {
  margin-bottom: 0.4rem;
}

.page-download-link .portfolio-download {
  display: inline-block;
  color: #000;
  font-size: 0.95rem;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page-download-link .portfolio-download:hover {
  color: #666;
}