:root {
  --ink: #111111;
  --paper: #f6f6fa;
  --check: #ececf4;
  --shadow: 9px;
  --gap: 34px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  line-height: 1.55;
  background-color: var(--paper);
  /* damier discret */

  border-top: 6px solid var(--ink);
  min-height: 100vh;
}
a { color: inherit; }

.wrap { padding: 0 clamp(20px, 3vw, 40px); }

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  padding: 28px 0 8px;
}
header h1 {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
}
nav { display: flex; gap: 22px; font-size: 15px; font-weight: 700; }
nav a { text-decoration: none; border-bottom: 3px solid transparent; }
nav a:hover { border-bottom-color: var(--ink); }

.lead { font-size: 15px; margin: 6px 0 30px; max-width: 520px; }

/* Galerie : colonnes = chaque photo garde son vrai format */
.gallery {
  columns: 4 300px;
  column-gap: var(--gap);
  padding-right: var(--shadow);   /* place pour l'ombre */
  padding-bottom: var(--shadow);
}
.item {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  cursor: zoom-in;
  display: block;
}
.frame {
  border: 4px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  line-height: 0;
}
.item:hover .frame {
  transform: translate(-3px, -3px);
  box-shadow: calc(var(--shadow) + 3px) calc(var(--shadow) + 3px) 0 var(--ink);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;           /* ← respecte le format réel de la photo */
  opacity: 0;
  transition: opacity .4s ease;
}
.frame img.loaded { opacity: 1; }
.item figcaption {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

/* Sections */
section { margin-top: clamp(48px, 8vw, 100px); max-width: 760px; }
.label {
  display: inline-block;
  font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 3px 10px; margin-bottom: 18px;
}
.about p { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.contact a.mail {
  font-size: clamp(18px, 2.6vw, 26px); font-weight: 700;
  text-decoration: none; border-bottom: 4px solid var(--ink);
}
.contact a.mail:hover { background: var(--ink); color: var(--paper); }
.contact .social { margin-top: 20px; display: flex; gap: 22px; font-weight: 700; }

footer { padding: 80px 0 36px; font-size: 13px; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(246,246,250,.97);
  display: none; align-items: center; justify-content: center;
}
.lb.open { display: flex; }
.lb img {
  max-width: 88vw; max-height: 78vh; display: block;
  border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink);
  background: var(--ink);
}
.lb .count { position: absolute; top: 22px; left: 26px; font-weight: 700; font-size: 14px; }
.lb .title { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 15px; }
.lb button {
  position: absolute; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); font: inherit; font-weight: 700; font-size: 22px;
  cursor: pointer; width: 46px; height: 46px; line-height: 1;
  box-shadow: 4px 4px 0 var(--ink);
}
.lb button:hover { background: var(--ink); color: var(--paper); }
.lb .close { top: 16px; right: 18px; }
.lb .prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 560px) {
  :root { --shadow: 7px; --gap: 28px; }
  .gallery { columns: 1; }
  nav { gap: 16px; }
}

/* Page contact */
.page-contact section { margin-top: clamp(32px, 6vw, 70px); }
.page-contact .intro { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; max-width: 560px; margin-bottom: 34px; }
nav a.current { border-bottom-color: var(--ink); }

/* Multi-galeries */
nav { flex-wrap: wrap; justify-content: flex-end; }
.contact .intro { font-size: clamp(16px, 2vw, 19px); line-height: 1.7; max-width: 560px; margin-bottom: 34px; }
.lead { margin-top: 6px; }

main { padding-top: 26px; }


/* Mobile : lightbox plus lisible */
.lb {
    background: var(--paper);
}

@media (max-width: 560px) {
    .lb img {
        max-width: 86vw;
        max-height: 66vh;
    }

    .lb .prev, .lb .next {
        top: auto;
        bottom: 70px;
        transform: none;
    }

    .lb .prev {
        left: 20px;
    }

    .lb .next {
        right: 24px;
    }
}