@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Figtree:wght@300;400;500&display=swap');

:root {
  --ivoire: #FAF8F4;
  --encre: #23262B;
  --granit: #8C8F94;
  --embrun: #E4E6E3;
  --goemon: #3E4B42;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivoire);
  color: var(--encre);
  font-family: 'Figtree', sans-serif;
  font-weight: 300;
  line-height: 1.6;
}

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

.serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

.caption {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--granit);
}

/* --- Nav --- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--embrun);
}

.logo {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
}

nav.main-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

nav.main-nav a:hover { color: var(--goemon); }

nav.main-nav a.active {
  border-bottom-color: var(--goemon);
}

main { margin: 0 auto; }

/* --- Buttons --- */

.btn {
  display: inline-block;
  background: var(--encre);
  color: var(--ivoire);
  text-decoration: none;
  padding: 16px 40px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--encre);
  color: var(--encre);
  padding: 14px 32px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-outline:hover { background: var(--encre); color: var(--ivoire); }

/* --- Hero --- */

.hero { padding: 60px 48px 80px; text-align: center; }

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 1.05;
  margin: 0;
}

.hero h1 em { font-style: italic; }

.hero p {
  margin-top: 24px;
  font-size: 16px;
  color: var(--granit);
}

.hero-img {
  margin-top: 48px;
  height: 540px;
  position: relative;
  overflow: hidden;
}

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

.hero-img .annot {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}

/* --- Manifeste --- */

.manifeste {
  max-width: 760px;
  margin: 0 auto;
  padding: 110px 24px;
  text-align: center;
}

.manifeste h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 34px;
  line-height: 1.3;
  margin: 24px 0;
}

.manifeste p { color: #4d5156; font-size: 17px; }

/* --- Portfolio (accueil) --- */

.portfolio { padding: 0 48px 110px; }

.portfolio .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.portfolio h2 { font-family: 'Instrument Serif', serif; font-size: 40px; margin: 0; }

.portfolio .see-all {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre);
  border-bottom: 1px solid var(--encre);
  padding-bottom: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card .ph {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

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

.card .meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.card .meta .t { font-family: 'Instrument Serif', serif; font-size: 20px; }

/* --- Approche --- */

.approche { background: var(--goemon); color: var(--ivoire); padding: 110px 48px; }

.approche .inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.approche h2 { font-family: 'Instrument Serif', serif; font-size: 40px; margin-bottom: 24px; }

.approche p { color: rgba(250, 248, 244, .78); margin-bottom: 16px; }

.approche ul { list-style: none; margin-top: 8px; padding: 0; }

.approche li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(250, 248, 244, .18);
  display: flex;
  justify-content: space-between;
}

/* --- Témoignage --- */

.temoignage { max-width: 820px; margin: 0 auto; padding: 110px 24px; text-align: center; }

.temoignage blockquote {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  font-style: italic;
  line-height: 1.4;
  margin: 0;
}

.temoignage cite {
  display: block;
  margin-top: 24px;
  font-style: normal;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--granit);
}

/* --- Contact --- */

.contact { background: var(--encre); color: var(--ivoire); padding: 110px 48px; text-align: center; }

.contact h2 { font-family: 'Instrument Serif', serif; font-size: clamp(40px, 6vw, 72px); margin-bottom: 24px; }

.contact p { color: rgba(250, 248, 244, .7); margin-bottom: 36px; }

.contact .btn { background: var(--ivoire); color: var(--encre); }

/* --- Footer --- */

footer.site-footer {
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--granit);
}

/* --- Page galerie (grille unique) --- */

.gallery-header { padding: 64px 48px 32px; text-align: center; }

.gallery-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 6vw, 64px);
  margin: 0 0 12px;
}

.gallery-header p { color: var(--granit); margin: 0; }

.gallery-empty, .gallery-error {
  color: var(--granit);
  padding: 40px 48px 110px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 0 48px 110px;
}

.gallery-item {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.03); }

/* --- Lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--embrun);
  font-size: 14px;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--ivoire);
  font-size: 28px;
  cursor: pointer;
  padding: 8px 14px;
  line-height: 1;
}

.lightbox-close { top: 16px; right: 20px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* --- Responsive --- */

@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .approche .inner { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  header.site-header { padding: 20px 24px; }
  .hero { padding: 40px 24px 56px; }
  .portfolio, .category-grid, .gallery-grid, .gallery-header, .approche, .contact { padding-left: 24px; padding-right: 24px; }
  .category-grid { grid-template-columns: 1fr; }
  footer.site-footer { padding: 24px; flex-direction: column; gap: 6px; }
}
