/* =========================================================
   TALENT D'OR FC — Page Galerie
   Hero · filtres rubriques · grille masonry · lightbox · reel mobile
   ========================================================= */

.gal-hero {
  position: relative;
  background: linear-gradient(120deg, var(--navy-dark), var(--navy-light));
  color: #fff;
  padding: 84px 0 90px;
  text-align: center;
  overflow: hidden;
}
.gal-hero::before,
.gal-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,196,48,.28), transparent 70%);
  animation: galFloat 9s ease-in-out infinite;
}
.gal-hero::before { width: 320px; height: 320px; top: -120px; left: -60px; }
.gal-hero::after  { width: 260px; height: 260px; bottom: -110px; right: -40px; animation-delay: -4s; }
@keyframes galFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(24px)} }
.gal-hero__inner { position: relative; z-index: 1; }
.gal-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 11px; justify-content: center;
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  letter-spacing: .18em; font-size: .92rem; color: var(--gold-soft); margin-bottom: 4px;
}
.gal-hero .eyebrow::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor;
  background: radial-gradient(circle at 34% 32%, rgba(255,255,255,.35), transparent 58%);
}
.gal-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); text-transform: uppercase; margin: 10px 0 12px; }
.gal-hero h1 .accent { color: var(--gold); }
.gal-hero p { max-width: 620px; margin: 0 auto; color: #d7deec; }

/* Filtres */
.gal-filters {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246,243,236,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.gal-filters .container { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* Mêmes pastilles que les filtres de l'académie (voir .clst-chip) : un seul
   vocabulaire de filtre sur tout le site. */
.gal-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--cond); font-weight: 700; font-size: .78rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.gal-chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.gal-chip.is-active {
  background: var(--navy); color: var(--gold); border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(8,18,38,.18);
}
.gal-chip .n {
  font-size: .68rem; line-height: 1; opacity: 1;
  padding: 3px 7px; border-radius: 999px;
  background: rgba(20,32,58,.07); color: var(--muted);
}
.gal-chip.is-active .n { background: rgba(255,255,255,.16); color: var(--gold); opacity: 1; }

/* Grille masonry */
.gal-wrap { padding: 44px 0 70px; }
.gal-grid { columns: 4; column-gap: 16px; }
.gal-item {
  break-inside: avoid; margin: 0 0 16px; position: relative; border-radius: 6px;
  overflow: hidden; cursor: pointer; display: block; background: var(--bg-soft);
  box-shadow: 0 10px 26px rgba(8,18,38,.08);
  opacity: 0; transform: translateY(26px) scale(.98);
  transition: opacity .55s ease, transform .55s ease, box-shadow .3s ease;
}
.gal-item.in { opacity: 1; transform: none; }
.gal-item.is-hidden { display: none; }
.gal-item img { width: 100%; display: block; transition: transform .5s ease; }
.gal-item:hover { box-shadow: 0 14px 32px rgba(8,18,38,.22); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item__ov {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; color: #fff; opacity: 0; transition: opacity .3s ease;
  background: linear-gradient(to top, rgba(8,18,38,.86), rgba(8,18,38,.1) 55%, transparent);
}
.gal-item:hover .gal-item__ov { opacity: 1; }
.gal-item__cat {
  align-self: flex-start; background: var(--gold); color: var(--navy-dark);
  font-family: var(--cond); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 3px; margin-bottom: 8px;
  transform: translateY(8px); transition: transform .3s ease;
}
.gal-item:hover .gal-item__cat { transform: none; }
.gal-item__title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.gal-item__zoom {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--navy-dark); display: grid; place-items: center;
  font-size: 1rem; opacity: 0; transform: scale(.6); transition: all .3s ease;
}
.gal-item:hover .gal-item__zoom { opacity: 1; transform: none; }
.gal-empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }
.gal-more { text-align: center; color: var(--muted); padding: 24px 0 8px; font-size: .9rem; }
.gal-more[hidden] { display: none; }

@media (max-width: 1080px) { .gal-grid { columns: 3; } }
@media (max-width: 760px)  { .gal-grid { columns: 2; } .gal-wrap { padding: 30px 0 50px; } }
@media (max-width: 460px)  { .gal-grid { columns: 1; } }

/* =========================================================
   CTA BAND (bas de page galerie)
   ========================================================= */
.cta-band { background: var(--navy); color: #fff; position: relative; overflow: hidden; padding: 88px 0; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--stripes); background-size: 30px 100%; opacity: .08; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(245,197,24,.26), transparent 70%); }
.cta-band .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: .98; text-transform: uppercase; }
.cta-band h2 span { color: var(--gold); }
.cta-band p { color: #cdd6e8; margin-top: 12px; max-width: 520px; }
@media (max-width: 760px) {
  .cta-band { padding: 60px 0; }
  .cta-band .container { flex-direction: column; text-align: center; align-items: flex-start; }
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 999; background: rgba(6,14,30,.95); display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox__stage { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.lightbox__stage img { max-width: 90vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: lbFade .25s ease; }
@keyframes lbFade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.lightbox__stage figcaption { color: #dbe4f4; font-size: .95rem; text-align: center; max-width: 640px; }
.lightbox__close { position: absolute; top: 18px; right: 24px; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.22); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lightbox__nav:hover { background: var(--gold); color: var(--navy-dark); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; font-weight: 600; background: rgba(255,255,255,.1); padding: 6px 16px; border-radius: 999px; }
.lightbox__meta { text-align: center; color: #dbe4f4; max-width: 680px; }
.lightbox__meta .lb-cat {
  display: inline-block; background: var(--gold); color: var(--navy-dark);
  font-family: var(--cond); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 12px; border-radius: 3px; margin-bottom: 10px;
}
.lightbox__meta h3 { font-family: var(--display); text-transform: uppercase; color: #fff; font-size: 1.35rem; margin: 0 0 6px; }
.lightbox__meta .lb-credit { font-size: .82rem; color: #9fb0cc; }
@media (max-width: 560px) {
  .lightbox { padding: 16px; }
  .lightbox__nav { width: 46px; height: 46px; font-size: 1.2rem; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox__stage img { max-height: 74vh; }
  .lightbox__close { top: 14px; right: 18px; }
}

/* =========================================================
   MODE "REEL" MOBILE — swipe vertical plein écran
   ========================================================= */
.reel {
  position: fixed; inset: 0; z-index: 120;
  background: #000; display: none;
  height: 100vh; height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.reel.open { display: block; }
.reel__slide {
  position: relative;
  height: 100vh; height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.reel__slide::before {
  content: ""; position: absolute; inset: 0;
  background: var(--bg-img) center/cover no-repeat;
  filter: blur(28px) brightness(.45); transform: scale(1.2);
}
.reel__media {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
  animation: reelIn .5s ease;
}
@keyframes reelIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.reel__info {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.25) 60%, transparent);
  color: #fff;
}
.reel__cat {
  display: inline-block; background: var(--gold); color: var(--navy-dark);
  font-family: var(--cond); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 12px; border-radius: 3px; margin-bottom: 10px;
}
.reel__title { font-size: 1.15rem; font-weight: 600; margin: 0 0 5px; line-height: 1.3; }
.reel__credit { font-size: .82rem; color: #c9d3e4; }
.reel__top {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.reel__top button, .reel__counter { pointer-events: auto; }
.reel__close {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; backdrop-filter: blur(4px);
}
.reel__counter {
  background: rgba(0,0,0,.4); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(4px);
}
.reel__hint {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 96px;
  text-align: center; color: rgba(255,255,255,.9); font-size: .85rem;
  animation: reelHint 1.6s ease-in-out infinite; pointer-events: none;
}
.reel__hint span { display: block; font-size: 1.4rem; }
@keyframes reelHint { 0%,100%{transform:translateY(0);opacity:.6} 50%{transform:translateY(-8px);opacity:1} }
.reel.scrolled .reel__hint { display: none; }
