body {
  background-color: #f6f1e8;
  margin: 0;
  padding: 40px 20px 0 20px;
  font-family: Andale Mono, monospace;
  color: #444;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}
.content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.footer {
  margin-top: auto;
}

.titre {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 40px;
  font-weight: normal;
  letter-spacing: 0.05em;
}

.content {
  padding: 20px;
  max-width: 900px;
  width: 100%;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px;
  background-color: #f6f1e8; 
  z-index: 2000;
  box-sizing: border-box;
}
.navbar a {
  text-decoration: none;
  color: #3a6cff;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.navbar a:hover,
.navbar a.actif {
  color: #3a6cff;
  border-bottom-color: #3a6cff;
}

.galerie {
  column-count: 3;
  column-gap: 20px;
  max-width: 900px;
  width: 100%;
}

.item {
  break-inside: avoid;
  margin-bottom: 20px;
  cursor: pointer;
}

.item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

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

.item figcaption {
  display: none;
  font-size: 0.85rem;
  opacity: 0.9;
}

.item.active img {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 70vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  z-index: 1000;
}

.item.active figcaption {
  display: block;
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.9);
  padding: 6px 10px;
  border-radius: 4px;
  max-width: 70vw;
  text-align: center;
  z-index: 1001;
}

.galerie.active .item:not(.active) img {
  opacity: 0;
  pointer-events: none;
}

.nav-buttons {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  display: none;
  justify-content: space-between;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  z-index: 1100;
}

.nav-buttons button {
  pointer-events: auto;
  background: rgba(58, 108, 255, 0.7);
  border: none;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
  margin: 0 40px;
}

.nav-buttons button:hover {
  background: rgba(58, 108, 255, 1);
  transform: scale(1.1);
}

.footer {
  margin-top: auto;
  padding: 40px 0 20px 0;
  font-size: 0.75rem;
  color: #8a8a8a;
  text-align: center;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .galerie { column-count: 2; }
}
@media (max-width: 500px) {
  .galerie { column-count: 1; }
}