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

a,
a:link,
a:visited,
a:active {
  color: rgb(60, 60, 60);
  text-decoration: none !important;
  -webkit-text-decoration: none;
}

/* BASE */
body {
  font-family: "Zalando Sans", sans-serif;
  color: rgb(60, 60, 60);
  margin: 16px;
  font-size: 15px;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* WRAPPER (FOOTER PUSH FIX) */
.wrapper {
  flex: 1;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  padding: 12px 0;

  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  background: white;
}

.nav-right a {
  margin-left: 16px;
}

nav a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

/* HOVER GLOBAL */
nav a:hover,
.galerie a:hover,
a:hover {
  color: #cfcfcf;
}

/* ACTIVE PAGE */
nav a.active {
  background: #f0f0f0;
  display: inline;
  padding: 0 2px;
}

/* EMAIL */
.email {
  color: #aaa;
  font-weight: 400;
}


/* TITRES */
h2 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  background: #f0f0f0;
  display: inline;
  padding: 0 2px;
}

/* GALERIE */
.galerie {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 16px;
  align-items: start;
 
}

.galerie.js-masonry {
  position: relative;
}

.galerie.js-masonry a {
  position: absolute;
  width: calc((100% - 32px) / 3);
}

/* IMAGE */
.images {
  display: block;
}

.visuel {
  width: 100%;
  display: block;
  margin-bottom: 6px;
}

/* TEXTE PROJET */
figcaption {
  font-size: inherit;
  line-height: 1.3;
}

.texte-projet p + p {
  margin-top: 0.8em;
}

.projet .visuel {
  max-height: calc(100vh - 80px);
  object-fit: contain;
  object-position: left top;
}

/* LINKS */
.galerie a {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 20px;
}


/* NAV PROJETS */
.nav-projets {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 20px;
}

.nav-projets a {
  text-decoration: none;
  color: inherit;
}

.nav-projets a:hover {
  color: #cfcfcf;
}

/* FOOTER */
footer {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  font-size: 0.85em;
  color: #888;
}

footer a,
footer a:visited,
footer a:active,
footer a:link {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  color: #cfcfcf;
}

/* PROJET */
.projet {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.texte-projet h2 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin-bottom: 4px;
  background: #f0f0f0;
  display: inline;
  padding: 0 2px;
}

.meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 12px;
}

.texte-projet p {
  font-size: inherit;
  line-height: 1.4;
}

/* BIO */
.bio-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  min-height: 80vh;
}

/* SECTIONS BIO - espacement entre blocs */
.col-right section {
  margin-bottom: 3em;
}

/* TITRE h2 reste à gauche, contenu indenté */
.col-right section p {
  padding-left: 2em;
  margin-top: 0.1em;
  margin-bottom: 0.6em;
}

.entries {
  padding-left: 2em;
  margin-top: 0.2em;
}

.entry {
  display: grid;
  grid-template-columns: 5em 1fr;
  margin-bottom: 1em;
}

.annee {
  color: inherit;
}

.titre {
  color: inherit;
}

.portrait {
  width: 100%;
  display: block;
  margin-top: 1.5em;
}

.carousel-bar {
  position: relative;
}
.carousel-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.carousel-nav button:hover {
  color: #bbb;
  transform: scale(1.1);
}

/* GRILLE IMAGES PROJET */
.images-grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

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

/* ─── RESPONSIVE ──────────────────────────────────────────── */

/* Galerie : 3 → 2 colonnes à 900px */
@media (max-width: 900px) {
  .galerie {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .galerie.js-masonry a {
    width: calc((100% - 16px) / 2);
  }
}

/* Pages projet et grille images : 1 colonne à 780px */
@media (max-width: 780px) {
  .projet {
    grid-template-columns: 1fr !important;
  }

  .images-grille {
    grid-template-columns: 1fr !important;
  }
}

/* Galerie : 2 → 1 colonne à 600px */
@media (max-width: 600px) {
  .galerie {
    grid-template-columns: 1fr !important;
  }

  .galerie.js-masonry a {
    width: 100%;
  }
}

/* Bio : 2 → 1 colonne à 700px */
@media (max-width: 700px) {
  .bio-page {
    grid-template-columns: 1fr !important;
  }
}

/* Nav, footer, email : petits écrans seulement */
@media (max-width: 600px) {
  .email {
    display: none !important;
  }

  nav {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    white-space: nowrap !important;
  }

  nav a {
    white-space: nowrap !important;
  }

  .nav-right {
    display: flex !important;
    gap: 12px !important;
  }

  .nav-right a {
    margin: 0 !important;
  }

  footer {
    flex-direction: column !important;
    gap: 4px !important;
    margin-top: 40px !important;
  }
}

/* TÉLÉPHONE AUTO-DÉTECTÉ PAR SAFARI */
a[href^="tel"],
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
}

/* LARGE SCREENS TYPO */
@media (min-width: 1600px) {
  body {
    font-size: 22px !important;
  }

  nav {
    font-size: 22px !important;
  }

  h2 {
    font-size: 22px !important;
  }

  footer {
    font-size: 16px !important;
  }
}
