

/* ── Barre titre + pagination ────────────────────────────────────────── */
.page-title-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--blue-light);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-title-bar--bottom {
  position: static;
  box-shadow: none;
  border-top: 2px solid var(--blue-light);
  border-bottom: none;
  margin-top: 2rem;
  margin-bottom: 0;
}

.page-title-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gallery-pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-per-select {
  height: 28px;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 0.65rem;
  background: var(--white);
  cursor: pointer;
  outline: none;
}

.gallery-per-select:hover { border-color: var(--blue); color: var(--blue); }

.gallery-pager-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  background: var(--white);
  transition: all 0.15s;
}

.pager-btn:hover  { border-color: var(--blue); color: var(--blue); }
.pager-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.pager-ellipsis {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 0.15rem;
}

.page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue-light);
}

.process-log {
  background: var(--blue-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.process-log strong { color: var(--blue); }

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.gallery-item:hover {
  box-shadow: 0 6px 20px rgba(24,85,163,0.12);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* ── GLightbox : forcer dark sur desktop ET mobile ───────────────── */
.gslide-description {
  background: rgba(0,0,0,0.82) !important;
}
.gslide-title {
  color: #fff !important;
  font-size: 0.9rem !important;
}
.gslide-desc,
.gdesc-inner {
  color: rgba(255,255,255,0.8) !important;
}

/* ── Zone titre GLightbox : titre + bouton côte à côte ───────────── */
.gdesc-inner {
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
}

/* ── Bouton téléchargement inline (à côté du titre) ──────────────── */
.lb-dl-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff !important;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lb-dl-btn:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  gap: 0.5rem;
}

.gallery-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-download {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1;
  transition: color 0.15s;
}

.gallery-download:hover {
  color: var(--blue);
}

/* ── Bouton retour dans le titre ─────────────────────────────────────── */
.gallery-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
}
.gallery-back:hover { background: var(--blue); color: #fff; }

/* ── Carte galerie (index) ───────────────────────────────────────────── */
.gallery-cover {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
  aspect-ratio: 4/3;
}

.gallery-cover:hover {
  box-shadow: 0 8px 24px rgba(24,85,163,0.15);
  transform: translateY(-3px);
}

.gallery-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.gallery-cover:hover img { transform: scale(1.04); }

.gallery-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue-mid);
  font-size: 3rem;
}

.gallery-cover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

.gallery-cover-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.gallery-cover-count {
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── Placeholders PDF / Vidéo ────────────────────────────────────────── */
.gallery-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--blue-light);
}

.gallery-placeholder img,
.gallery-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gallery-placeholder-video {
  background: #111;
}

.gallery-placeholder-pdf {
  background: #f5f5f7 center top / cover no-repeat;
}

.gallery-pdf-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.45);
}

.gallery-pdf-overlay .bi-file-pdf {
  font-size: 4.5rem;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.gallery-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24,85,163,0.3);
  font-size: 2rem;
  color: #fff;
  transition: background 0.2s;
}

.gallery-item:hover .gallery-play-btn {
  background: rgba(24,85,163,0.55);
}

.gallery-type-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 575px) {
  .gallery-cover-title { font-size: 0.78rem; }
  .gallery-cover-count { display: none; }
  .gallery-cover-info  { padding: 1.25rem 0.6rem 0.6rem; }
  .gallery-item img    { aspect-ratio: 4/3; }
}

