@charset "UTF-8";
:root {
  --gap: 1.5rem;
  --speed: 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --closed: 7rem;
  --open: 38rem;
  --accent: #cfb17b;
  --accent-strong: #dcc396;
  --brand-bg: #594748;
  --brand-bg-dark: #33292a;
  --brand-text: #f1dfd9;
  --ig-gap: 0.6rem;
}

@media (max-width: 767px) {
  :root {
    --closed: 100%;
    --open: 100%;
    --gap: 0.8rem;
  }
}
/* régler des petits détails globaux sans surcharger Tailwind */
html,
body {
  height: 100%;
  font-family: minion-pro, serif;
  background-color: black;
}

/* améliorer l'apparence de la sélection de texte (complément à Tailwind) */
::selection {
  background: rgba(249, 249, 249, 0.25);
}

body.gallery {
  background: #000;
}

#gallery {
  margin-top: 0;
}
@media (min-width: 768px) {
  #gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 767px) {
  #gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 41, 42, 0.6);
  background: linear-gradient(
    180deg,
    rgba(12, 9, 10, 0.02),
    rgba(12, 8, 9, 0.3)
  );
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.card:hover img {
  transform: scale(1.05);
}
.card .caption {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  color: var(--brand-text);
  font-size: 0.85rem;
  border: 1px solid rgba(207, 177, 123, 0.15);
}
@media (max-width: 767px) {
  .card .caption {
    bottom: auto;
    top: 0.6rem;
  }
}
.card .ig-meta {
  padding: 0.5rem 0.75rem 0.9rem;
  font-size: 0.85rem;
  color: rgba(244, 234, 230, 0.85);
}
@media (max-width: 767px) {
  .card .ig-meta {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    background: transparent;
    padding: 0.75rem;
    z-index: auto;
  }
}
.card .ig-meta .title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.card .ig-meta .desc {
  opacity: 0.7;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-figure {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#gallery-empty {
  display: none;
}

.filter-btn {
  transition: all 0.3s ease;
}
.filter-btn.active {
  background: rgba(207, 177, 123, 0.85);
  color: #130e0f;
  border-color: rgba(207, 177, 123, 0.9);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfb17b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: opacity 0.3s;
}
.back-link:hover {
  opacity: 0.7;
}

.back-button-fixed {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 60;
}

.gallery-main {
  margin-top: 4.5rem;
}

@media (max-width: 768px) {
  .gallery-main {
    margin-top: 4rem;
  }
}
