/* =====================================================================
   Notre-Dame de Lourdes — ajouts : partage social, galerie, visionneuse
   ===================================================================== */

/* ---------- Partage sur les réseaux sociaux ---------- */

.nddl-share {
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid #e8e8e8;
}

.nddl-share__label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #192f59;
}

.nddl-share__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nddl-share .nddl-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.nddl-share .nddl-share__btn:hover,
.nddl-share .nddl-share__btn:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(17, 42, 73, 0.18);
}

.nddl-share .nddl-share__btn[hidden] {
    display: none;
}

.nddl-share__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nddl-share__btn--facebook { background: #1877f2; }
.nddl-share__btn--whatsapp { background: #25d366; }
.nddl-share__btn--x { background: #111; }
.nddl-share__btn--linkedin { background: #0a66c2; }
.nddl-share__btn--email { background: #192f59; }
.nddl-share__btn--copy,
.nddl-share__btn--native { background: #C6982D; }
.nddl-share__btn--copy.is-done { background: #2d7a4a; }

@media (max-width: 600px) {
    .nddl-share .nddl-share__btn {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .nddl-share .nddl-share__btn span {
        display: none;
    }

    .nddl-share .nddl-share__btn--native {
        width: auto;
        padding: 0 16px;
    }

    .nddl-share .nddl-share__btn--native span {
        display: inline;
    }
}

/* ---------- Galerie : page ---------- */

.nddl-gallery-page {
    background: #f7f7f7;
    padding: 70px 0 80px;
}

.nddl-gallery-intro {
    max-width: 760px;
    margin-bottom: 36px;
}

.nddl-gallery-intro p {
    margin: 0 0 10px;
    color: #6b6b6b;
}

.nddl-gallery-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    color: #192f59;
}

.nddl-gallery-meta {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #C6982D !important;
}

.nddl-gallery-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #C6982D;
}

.nddl-gallery-back:hover {
    color: #192f59;
}

.nddl-gallery-footer {
    margin-top: 40px;
}

.nddl-gallery-empty {
    padding: 40px;
    background: #fff;
    border-radius: 3px;
    text-align: center;
    color: #6b6b6b;
}

/* Albums */

.nddl-albums {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.nddl-album {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nddl-album:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(17, 42, 73, 0.14);
}

.nddl-album__cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9ecf2;
}

.nddl-album__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.6s ease;
}

.nddl-album:hover .nddl-album__cover img {
    transform: scale(1.06);
}

.nddl-album__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 3px;
    background: rgba(25, 47, 89, 0.85);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.nddl-album__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 22px 24px;
}

.nddl-album__date {
    font-size: 13px;
    color: #959595;
}

.nddl-album__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #192f59;
}

.nddl-album__more {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #C6982D;
}

/* Vignettes */

.nddl-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.nddl-photo {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 3px;
    background: #e9ecf2;
}

.nddl-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.5s ease;
}

.nddl-photo__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 47, 89, 0.45);
    color: #fff;
    font-size: 26px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nddl-photo:hover img,
.nddl-photo:focus-visible img {
    transform: scale(1.07);
}

.nddl-photo:hover .nddl-photo__zoom,
.nddl-photo:focus-visible .nddl-photo__zoom {
    opacity: 1;
}

@media (max-width: 999px) {
    .nddl-albums {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 600px) {
    .nddl-gallery-page {
        padding: 40px 0 50px;
    }

    .nddl-gallery-title {
        font-size: 26px;
    }

    .nddl-albums {
        grid-template-columns: 1fr;
    }

    .nddl-photos {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (max-width: 400px) {
    .nddl-photos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Visionneuse (lightbox) ---------- */

html.nddl-lightbox-open,
html.nddl-lightbox-open body {
    overflow: hidden;
}

.nddl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.25s ease;
    font-family: "Poppins", sans-serif;
}

.nddl-lightbox[hidden] {
    display: none;
}

.nddl-lightbox.is-open {
    opacity: 1;
}

.nddl-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 28, 0.97);
}

.nddl-lightbox__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}

.nddl-lightbox__counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.nddl-lightbox__stage {
    position: absolute;
    inset: 64px 90px 70px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nddl-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.nddl-lightbox__img.from-right {
    transform: translateX(40px);
}

.nddl-lightbox__img.from-left {
    transform: translateX(-40px);
}

.nddl-lightbox__img.is-visible {
    opacity: 1;
    transform: none;
}

.nddl-lightbox__spinner {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #C6982D;
    border-radius: 50%;
    opacity: 0;
    animation: nddl-spin 0.8s linear infinite;
    transition: opacity 0.2s ease;
}

.nddl-lightbox__stage.is-loading .nddl-lightbox__spinner {
    opacity: 1;
}

@keyframes nddl-spin {
    to { transform: rotate(360deg); }
}

.nddl-lightbox .nddl-lightbox__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nddl-lightbox .nddl-lightbox__btn:hover,
.nddl-lightbox .nddl-lightbox__btn:focus-visible {
    background: #C6982D;
    outline: none;
}

.nddl-lightbox__btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nddl-lightbox .nddl-lightbox__close {
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

.nddl-lightbox .nddl-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    height: 52px;
    padding: 0 14px;
    border-radius: 26px;
    transform: translateY(-50%);
}

.nddl-lightbox__nav[hidden] {
    display: none !important;
}

.nddl-lightbox .nddl-lightbox__prev {
    left: 18px;
}

.nddl-lightbox .nddl-lightbox__next {
    right: 18px;
}

.nddl-lightbox__nav span {
    display: none;
}

.nddl-lightbox__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 18px 24px 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.5;
}

@media (min-width: 1200px) {
    .nddl-lightbox__stage {
        inset: 64px 170px 70px;
    }

    .nddl-lightbox .nddl-lightbox__nav {
        padding: 0 20px;
    }

    .nddl-lightbox__nav span {
        display: inline;
    }
}

@media (max-width: 767px) {
    .nddl-lightbox__stage {
        inset: 64px 0 90px;
    }

    .nddl-lightbox .nddl-lightbox__nav {
        top: auto;
        bottom: 18px;
        transform: none;
        height: 46px;
        width: 46px;
        padding: 0;
    }

    .nddl-lightbox__caption {
        bottom: 64px;
        padding: 10px 70px;
        font-size: 14px;
    }

    .nddl-lightbox__img {
        box-shadow: none;
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nddl-lightbox,
    .nddl-lightbox__img,
    .nddl-album,
    .nddl-album__cover img,
    .nddl-photo img {
        transition: none;
    }
}

/* ---------- Mini galerie en bas des actualités ---------- */
/* Rangées justifiées : chaque vignette garde sa proportion (paysage ou portrait). */

.nddl-news-gallery {
    margin: 34px 0 6px;
    padding-top: 26px;
    border-top: 1px solid #e5e8ee;
}

.nddl-news-gallery__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 21px;
    font-weight: 700;
    color: #192f59;
}

.nddl-news-gallery__count {
    font-size: 13px;
    font-weight: 500;
    color: #8a94a6;
}

.nddl-news-gallery__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Empêche la dernière rangée de s'étirer exagérément */
.nddl-news-gallery__grid::after {
    content: "";
    flex-grow: 999;
}

.nddl-news-gallery .nddl-news-gallery__item {
    --r: 1.5;
    --h: 180px;
    aspect-ratio: auto;
    height: var(--h);
    flex-grow: var(--r);
    flex-basis: calc(var(--h) * var(--r));
    max-width: 100%;
}

.nddl-news-gallery .nddl-news-gallery__item img {
    object-position: center;
}

.nddl-news-gallery .nddl-news-gallery__item.is-portrait img {
    object-position: center 25%;
}

@media (max-width: 767px) {
    .nddl-news-gallery .nddl-news-gallery__item {
        --h: 130px;
    }
}

@media (max-width: 400px) {
    .nddl-news-gallery__grid {
        gap: 6px;
    }

    .nddl-news-gallery .nddl-news-gallery__item {
        --h: 105px;
    }
}
