/*
  Site développé par phomsay pour zaki.
  Contact Discord : @phomsay671.
  Dev web : phomsay. Admin : sauci.
  Recherche et édition : Zaki & B.
*/

:root {
  --gallery-bg: #050509;
  --gallery-panel: rgba(12, 11, 17, 0.86);
  --gallery-line: rgba(232, 200, 121, 0.34);
  --gallery-gold: #e8c879;
  --gallery-cream: #fff8e8;
  --gallery-muted: rgba(255, 248, 232, 0.72);
  --gallery-red: #8f2635;
}

body.gallery-page {
  min-height: 100vh;
  color: var(--gallery-cream);
  background:
    radial-gradient(circle at 24% 8%, rgba(143, 38, 53, 0.22), transparent 34rem),
    linear-gradient(180deg, #08070b 0%, var(--gallery-bg) 48%, #030305 100%);
}

.gallery-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 112px 0 96px;
}

.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 32px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--gallery-line);
}

.gallery-kicker,
.gallery-count {
  margin: 0;
  color: var(--gallery-gold);
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.gallery-hero h1 {
  margin: 10px 0 14px;
  color: var(--gallery-cream);
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-hero-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--gallery-muted);
  font-family: "Crimson Text", serif;
  font-size: 1.25rem;
  line-height: 1.55;
}

.gallery-tools {
  display: grid;
  gap: 12px;
}

.gallery-search-label {
  color: var(--gallery-gold);
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-search {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gallery-line);
  border-radius: 0;
  padding: 0 16px;
  color: var(--gallery-cream);
  background: rgba(2, 2, 6, 0.72);
  font: 600 0.95rem "Cinzel", serif;
  outline: none;
}

.gallery-search:focus {
  border-color: rgba(232, 200, 121, 0.9);
  box-shadow: 0 0 0 3px rgba(232, 200, 121, 0.13);
}

.gallery-section {
  padding-top: 32px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 200, 121, 0.28);
  background: var(--gallery-panel);
}

.gallery-card[hidden] {
  display: none;
}

.gallery-card-media {
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #09080d;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-within img {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.025);
}

.gallery-card-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.gallery-card-title {
  min-width: 0;
  margin: 0;
  color: var(--gallery-cream);
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gallery-icon-link {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(232, 200, 121, 0.38);
  color: var(--gallery-gold);
  background: rgba(2, 2, 6, 0.62);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.gallery-icon-link:hover,
.gallery-icon-link:focus-visible {
  border-color: rgba(232, 200, 121, 0.9);
  color: #050509;
  background: var(--gallery-gold);
  outline: none;
}

.gallery-icon-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.gallery-empty {
  margin: 34px 0 0;
  color: var(--gallery-muted);
  font-family: "Crimson Text", serif;
  font-size: 1.25rem;
  text-align: center;
}

@media (max-width: 780px) {
  .gallery-main {
    width: min(100% - 24px, 1180px);
    padding-top: 92px;
  }

  .gallery-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
