/* ===== Font brand (H1) ===== */
@font-face {
  font-family: "Rizado Script";
  src: url("typo/Colatin.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== Tokens ===== */
:root {
  --bg: #342620;
  --fg: #fde9c8;
  --muted: #9cc3fb;
  --accent: #e25e86;
  --panel-w: 100vw;
  --panel-h: 100vh;
  --g: clamp(20px, 4vw, 48px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%; /* Assure que le contenu occupe toute la hauteur */
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  cursor: url("img/aero_arrow__pink.cur"), auto;
}

.topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
}
.back {
  display: inline-block;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 28px;
  padding: 8px 18px;
  transition: all 0.25s ease;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif; /* ★ identique à Contact */
}

.back:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.header {
  padding: 1.5rem 0;
  background: transparent;
  z-index: 100;
  position: relative;
  text-align: center;
  z-index: 1;
}

.header-link {
  text-decoration: none;
  font-size: 8.5vw;
  font-family: "Nighty DEMO", cursive;
  font-weight: 300;
  color: #be0822;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

/* ===== Titre type "Contact" / "En Bref" ===== */
.galerie-wrap {
  position: relative;
  z-index: 1;
  height: 100dvh;
  margin: 0 auto;

  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2vh;
}

/* Titre aligné comme Contact / En Bref */
h1 {
  text-align: left;
}

.galerie-wrap h1 {
  margin: 0;
  text-align: left;
  font-size: clamp(40px, 7vw, 96px);
  padding: 12vh 4vw 6vh;
  font-weight: 900;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
}

/* ===== Animation du titre, même style que Contact ===== */
.gallery-title {
  opacity: 0;
  transform: translateY(-12px);
  animation: galleryTitleIn 600ms ease forwards 120ms;
}

@keyframes galleryTitleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery {
  position: relative;
  column-count: 5;
  column-gap: 10px;
  padding: 10px;
  z-index: 1;
}

.gallery img {
  width: 100%; /* adapte à la colonne */
  height: auto;
  margin-bottom: 10px;
  display: block;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay.open {
  display: flex;
}

.overlay img {
  max-width: 90vw;
  max-height: 90vh;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .gallery {
    column-count: 2;
  }
}

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

.texture-bg {
  position: fixed; /* fixe, ne défile pas */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("img/back2.jpeg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0.07;
  z-index: 0; /* Derrière tout */
  pointer-events: none;
}
