/*
* FooGallery Custom CSS
* This file is created by adding custom CSS on FooGallery Settings page in wp-admin
* Created : 20 Oct 2026, 5:00 pm
*/

/* ===== FooGallery : légende en surimpression sur la photo ===== */

/* Le cadre de l'image sert de repère (le rognage de l'image reste intact) */
.foogallery .fg-item-inner {
  position: relative;
}

/* La légende est posée sur le bas de l'image, hors du flux : rien ne se décale */
.foogallery .fg-caption {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto !important;
  height: auto !important;
  max-height: 100%;
  z-index: 20;
  box-sizing: border-box;
}

.foogallery .fg-caption-inner {
  position: static !important;
  box-sizing: border-box;
  max-height: 100%;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.45));
  color: #fff;
}

.foogallery .fg-caption-title,
.foogallery .fg-caption-desc {
  color: #fff;
}

/* Au repos : titre et description sur une seule ligne */
.foogallery .fg-caption-title,
.foogallery .fg-caption-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  white-space: normal;
  min-width: 0;
  max-width: 100%;
}

.foogallery .fg-caption-title br,
.foogallery .fg-caption-desc br {
  display: none;
}

/* Au survol : texte complet, retours à la ligne respectés, la légende monte sur l'image */
.foogallery .fg-item:hover .fg-caption-inner {
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
}

.foogallery .fg-item:hover .fg-caption-title,
.foogallery .fg-item:hover .fg-caption-desc {
  -webkit-line-clamp: unset;
  display: block;
  white-space: pre-line;
  overflow: visible;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.foogallery .fg-item:hover .fg-caption-title br,
.foogallery .fg-item:hover .fg-caption-desc br {
  display: inline;
}