.jdpg-gallery {
  --jdpg-gap: clamp(10px, 1.6vw, 18px);
  width: 100%;
  margin: 28px auto;
}
.jdpg-gallery--grid {
  display: grid;
  grid-template-columns: repeat(var(--jdpg-columns), minmax(0, 1fr));
  justify-content: center;
  justify-items: center;
  gap: var(--jdpg-gap);
}
.jdpg-gallery--masonry {
  columns: var(--jdpg-columns) 260px;
  column-gap: var(--jdpg-gap);
  text-align: center;
}
.jdpg-gallery--masonry .jdpg-item {
  display: block;
  margin: 0 auto var(--jdpg-gap);
  break-inside: avoid;
  text-align: left;
}
.jdpg-gallery--grid .jdpg-item {
  display: block;
  width: 100%;
  min-height: 100%;
}
.jdpg-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #15130f;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .08);
  text-decoration: none;
}
.jdpg-item::after {
  content: "Voir";
  position: absolute;
  inset: auto 14px 14px auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(247, 242, 233, .9);
  color: #0c0b09;
  font-size: .75rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.jdpg-item:hover::after { opacity: 1; transform: translateY(0); }
.jdpg-item img {
  width: 100%;
  height: auto;
  margin-inline: auto;
  object-position: center center;
  transition: transform .35s ease, filter .35s ease;
}
.jdpg-gallery--grid .jdpg-item img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  height: 100%;
}
.jdpg-item:hover img { transform: scale(1.035); filter: saturate(1.02) contrast(1.02); }
.jdpg-empty {
  margin: 28px 0;
  padding: 28px;
  border: 1px dashed rgba(33,31,27,.26);
  border-radius: 18px;
  background: rgba(255,255,255,.32);
  color: #6f6657;
}

.jdpg-slider {
  position: relative;
  margin: 28px 0;
  overflow: hidden;
  border-radius: 24px;
  background: #0c0b09;
}
.jdpg-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.jdpg-slider__track::-webkit-scrollbar { display: none; }
.jdpg-slider__slide {
  flex: 0 0 100%;
  position: relative;
  margin: 0;
  scroll-snap-align: start;
}
.jdpg-slider__slide img {
  width: 100%;
  height: min(72vh, 780px);
  object-fit: cover;
}
.jdpg-slider__slide figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12,11,9,.68);
  color: #f7f2e9;
  font-size: .9rem;
}
.jdpg-slider__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(247,242,233,.32);
  border-radius: 999px;
  background: rgba(12,11,9,.54);
  color: #f7f2e9;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.jdpg-slider__button--prev { left: 14px; }
.jdpg-slider__button--next { right: 14px; }

.jdpg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(5,5,5,.92);
}
.jdpg-lightbox.is-open { display: flex; }
.jdpg-lightbox__inner { max-width: min(1200px, 100%); max-height: 100%; }
.jdpg-lightbox__image { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 12px; }
.jdpg-lightbox__caption { margin: 12px 0 0; color: rgba(247,242,233,.75); text-align: center; }
.jdpg-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(247,242,233,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.jdpg-contact {
  margin: 32px 0;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 24px;
  background: #0c0b09;
  color: #f7f2e9;
}
.jdpg-contact label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(247,242,233,.8);
  font-weight: 700;
}
.jdpg-contact input,
.jdpg-contact textarea,
.jdpg-contact select {
  width: 100%;
  border: 1px solid rgba(247,242,233,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: #f7f2e9;
  padding: 13px 14px;
  outline: none;
}
.jdpg-contact select option { color: #0c0b09; }
.jdpg-contact input:focus,
.jdpg-contact textarea:focus,
.jdpg-contact select:focus { border-color: #c6a86b; box-shadow: 0 0 0 3px rgba(198,168,107,.18); }
.jdpg-contact__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.jdpg-contact__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.jdpg-contact__consent { grid-template-columns: auto 1fr !important; align-items: start; }
.jdpg-contact__consent input { width: auto; margin-top: 6px; }
.jdpg-contact__consent a { color: #f7f2e9; text-decoration-color: rgba(247,242,233,.45); }
.jdpg-contact__privacy-note {
  margin: -2px 0 18px;
  color: rgba(247,242,233,.62);
  font-size: .92rem;
}
.jdpg-contact__submit {
  border: 0;
  border-radius: 999px;
  background: #f7f2e9;
  color: #0c0b09;
  padding: 13px 24px;
  font-weight: 900;
  cursor: pointer;
}
.jdpg-contact-notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
}
.jdpg-contact-notice--success { background: #e7f6df; color: #1e5718; }
.jdpg-contact-notice--error { background: #fde8e8; color: #8a1f1f; }

@media (max-width: 720px) {
  .jdpg-gallery--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jdpg-gallery--masonry { columns: 2 160px; }
  .jdpg-contact__grid { grid-template-columns: 1fr; gap: 0; }
  .jdpg-slider__slide img { height: 62vh; }
}
@media (max-width: 440px) {
  .jdpg-gallery--grid { grid-template-columns: 1fr; }
  .jdpg-gallery--masonry { columns: 1; }
  .jdpg-slider__button { width: 40px; height: 40px; }
}

.jdpg-url-gallery-wrap {
  margin: 32px 0;
}
.jdpg-url-gallery__head {
  margin-bottom: 22px;
}
.jdpg-url-gallery__head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -.03em;
  color: #171411;
}
.jdpg-url-gallery__count {
  margin: 0 0 10px;
  color: #9d8768;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 800;
  font-size: .75rem;
}
.jdpg-gallery--url .jdpg-item {
  border: 1px solid rgba(28, 26, 23, .07);
}
.jdpg-gallery--url .jdpg-item img {
  background: #0c0b09;
}
.jdpg-gallery--url .jdpg-item.is-jdpg-hidden {
  display: none;
}
.jdpg-item__caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(12, 11, 9, .68);
  color: #f7f2e9;
  font-size: .78rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.jdpg-item:hover .jdpg-item__caption {
  opacity: 1;
  transform: translateY(0);
}
.jdpg-load-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px 0 0;
}
.jdpg-load-more__button {
  border: 1px solid rgba(12, 11, 9, .15);
  border-radius: 999px;
  background: #0c0b09;
  color: #f7f2e9;
  padding: 13px 24px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.jdpg-load-more__button:hover {
  transform: translateY(-2px);
  background: #171411;
}
.jdpg-load-more__count {
  margin: 0;
  color: #6f6657;
  font-size: .92rem;
}

.jdpg-gallery--url img[data-src] {
  min-height: 180px;
  background: linear-gradient(135deg, rgba(12, 11, 9, .92), rgba(32, 29, 23, .92));
}


/* V12.5 — dark gallery polish */
.jdpg-url-gallery-wrap,
.jdpg-gallery {
  color: rgba(247, 242, 233, .90);
}
.jdpg-item {
  background: #0b0907;
  border-color: rgba(247, 242, 233, .10);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}
.jdpg-gallery--url .jdpg-item {
  border-color: rgba(247, 242, 233, .10);
}
.jdpg-gallery--url .jdpg-item img {
  background: #090806;
}
.jdpg-url-gallery__head h2 { color: #f7f2e9; }
.jdpg-url-gallery__count { color: #d7bf8f; }
.jdpg-load-more__button {
  border-color: rgba(247, 242, 233, .22);
  background: #f7f2e9;
  color: #0c0b09;
}
.jdpg-load-more__button:hover { background: #ecd9b5; }
.jdpg-load-more__count { color: rgba(247, 242, 233, .56); }
.jdpg-empty {
  border-color: rgba(247, 242, 233, .18);
  background: rgba(255,255,255,.035);
  color: rgba(247, 242, 233, .68);
}

/* V12.7 — mode contenu rose pâle, compatible avec le thème JD Photo Clean. */
body .jdpc-main .jdpg-url-gallery-wrap,
body .jdpc-main .jdpg-gallery {
  color: #241f1b;
}
body .jdpc-main .jdpg-url-gallery__head h2 { color: #241f1b; }
body .jdpc-main .jdpg-url-gallery__count { color: #b8897c; }
body .jdpc-main .jdpg-item {
  background: rgba(255,255,255,.72);
  border-color: rgba(36,31,27,.075);
  box-shadow: 0 14px 38px rgba(92, 69, 62, .12);
}
body .jdpc-main .jdpg-gallery--url .jdpg-item { border-color: rgba(36,31,27,.075); }
body .jdpc-main .jdpg-gallery--url .jdpg-item img { background: rgba(255,255,255,.72); }
body .jdpc-main .jdpg-gallery--url img[data-src] {
  background: linear-gradient(135deg, rgba(255,255,255,.68), rgba(247,239,238,.92));
}
body .jdpc-main .jdpg-load-more__button {
  border-color: #171411;
  background: #171411;
  color: #f7f2e9;
}
body .jdpc-main .jdpg-load-more__button:hover { background: #2a241f; }
body .jdpc-main .jdpg-load-more__count { color: #5f564e; }
body .jdpc-main .jdpg-empty {
  border-color: rgba(36,31,27,.13);
  background: rgba(255,255,255,.62);
  color: #5f564e;
}
body .jdpc-main .jdpg-contact {
  background: rgba(255,255,255,.62);
  color: #241f1b;
  border: 1px solid rgba(36,31,27,.08);
  box-shadow: 0 18px 54px rgba(92,69,62,.10);
}
body .jdpc-main .jdpg-contact label,
body .jdpc-main .jdpg-contact__privacy-note { color: #5f564e; }
body .jdpc-main .jdpg-contact input,
body .jdpc-main .jdpg-contact textarea,
body .jdpc-main .jdpg-contact select {
  background: rgba(255,255,255,.82);
  color: #241f1b;
  border-color: rgba(36,31,27,.13);
}
body .jdpc-main .jdpg-contact select option { color: #241f1b; }
body .jdpc-main .jdpg-contact input:focus,
body .jdpc-main .jdpg-contact textarea:focus,
body .jdpc-main .jdpg-contact select:focus {
  border-color: #b8897c;
  box-shadow: 0 0 0 3px rgba(184,137,124,.18);
}
body .jdpc-main .jdpg-contact__submit {
  background: #171411;
  color: #f7f2e9;
}
body .jdpc-main .jdpg-contact__consent a { color: #8f665d; }


/* V13.0 — editorial wedding selection layout */
.jdpg-gallery--editorial {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 18px);
  align-items: stretch;
}

.jdpg-gallery--editorial .jdpg-item {
  display: block;
  min-height: 100%;
  border-radius: clamp(16px, 2vw, 26px);
  background: rgba(255,255,255,.58);
  box-shadow: 0 16px 42px rgba(92, 69, 62, .14);
}

.jdpg-gallery--editorial .jdpg-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
}

.jdpg-gallery--editorial .jdpg-item:nth-child(1) {
  grid-column: span 3;
  grid-row: span 2;
}
.jdpg-gallery--editorial .jdpg-item:nth-child(1) img { aspect-ratio: 4 / 5.6; }
.jdpg-gallery--editorial .jdpg-item:nth-child(2),
.jdpg-gallery--editorial .jdpg-item:nth-child(3) { grid-column: span 3; }
.jdpg-gallery--editorial .jdpg-item:nth-child(2) img,
.jdpg-gallery--editorial .jdpg-item:nth-child(3) img { aspect-ratio: 5 / 3.35; }
.jdpg-gallery--editorial .jdpg-item:nth-child(n+4) { grid-column: span 2; }
.jdpg-gallery--editorial .jdpg-item:nth-child(n+4) img { aspect-ratio: 4 / 5; }
.jdpg-gallery--editorial .jdpg-item:nth-child(7) img { aspect-ratio: 5 / 3.35; }

@media (max-width: 840px) {
  .jdpg-gallery--editorial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jdpg-gallery--editorial .jdpg-item,
  .jdpg-gallery--editorial .jdpg-item:nth-child(1),
  .jdpg-gallery--editorial .jdpg-item:nth-child(2),
  .jdpg-gallery--editorial .jdpg-item:nth-child(3),
  .jdpg-gallery--editorial .jdpg-item:nth-child(n+4) { grid-column: span 1; grid-row: auto; }
  .jdpg-gallery--editorial .jdpg-item img,
  .jdpg-gallery--editorial .jdpg-item:nth-child(1) img,
  .jdpg-gallery--editorial .jdpg-item:nth-child(2) img,
  .jdpg-gallery--editorial .jdpg-item:nth-child(3) img,
  .jdpg-gallery--editorial .jdpg-item:nth-child(n+4) img { aspect-ratio: 4 / 5; }
}

@media (max-width: 520px) {
  .jdpg-gallery--editorial { grid-template-columns: 1fr; }
}

/* V13.1 — hover galerie subtil sur fond rose premium */
body .jdpc-main .jdpg-item {
  border-color: rgba(143, 89, 103, .10);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
body .jdpc-main .jdpg-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(233,198,208,0), rgba(233,198,208,.15));
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
body .jdpc-main .jdpg-item:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 89, 103, .18);
  box-shadow: 0 20px 48px rgba(92, 69, 62, .14);
}
body .jdpc-main .jdpg-item:hover::before { opacity: 1; }
body .jdpc-main .jdpg-item:hover img { transform: scale(1.015); filter: saturate(1.015) contrast(1.01); }
body .jdpc-main .jdpg-item::after,
body .jdpc-main .jdpg-item__caption { z-index: 2; }
body .jdpc-main .jdpg-load-more__button,
body .jdpc-main .jdpg-contact__submit {
  background: linear-gradient(135deg, #171411 0%, #2A211F 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
body .jdpc-main .jdpg-load-more__button:hover,
body .jdpc-main .jdpg-contact__submit:hover {
  background: linear-gradient(135deg, #241B19 0%, #3A2A2D 100%);
  box-shadow: 0 14px 34px rgba(143, 89, 103, .18), inset 0 1px 0 rgba(255,255,255,.18);
}
