/*
 * Liste de séjours
 */

/*
 * Conteneur de la liste
 */
.censjr-list {
    width: 100%;
}


/*
 * Moteur de recherche des séjours
 */
.censjr-search {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    margin-bottom: 32px;
}

.censjr-search__field {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 6px;
}

.censjr-search__field label {
    font-weight: 700;
}

.censjr-search__field select,
.censjr-search__field input[type="date"] {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 8px 12px;
    line-height: 1.2;
}

.censjr-search__submit {
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid #315d80;
    border-radius: 3px;
    color: #fff;
    background: #315d80;
    cursor: pointer;
}

.censjr-search-summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 24px 0;
    padding: 14px 18px;
    border-left: 4px solid #315d80;
    color: #315d80;
    background: #f2f5f7;
    font-size: 0.9em;
  font-style: italic;
}

.censjr-search-summary__title {
    white-space: nowrap;
}

.censjr-search-summary__criteria {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #111;
}

.censjr-search-summary__separator {
    color: #315d80;
    font-weight: 700;
}


/*
 * Panneau de recherche ouvert depuis la loupe du header
 */
.censjr-search-panel[hidden] {
    display: none;
}

.censjr-search-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.censjr-search-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.censjr-search-panel__dialog {
    position: relative;
    padding: 28px clamp(22px, 5vw, 80px) 34px;
    color: #111;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    animation: censjr-search-panel-in 180ms ease-out both;
}

.censjr-search-panel.is-closing .censjr-search-panel__dialog {
    animation: censjr-search-panel-out 180ms ease-in both;
}

.censjr-search-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 22px;
}

.censjr-search-panel__header h2 {
    margin: 0;
    color: #315d80;
    font-size: clamp(25px, 3vw, 38px);
}

.censjr-search-panel .censjr-search {
    max-width: 1200px;
    margin: 0 auto;
}

.censjr-search-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #315d80;
    border-radius: 50%;
    color: #315d80;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

body.censjr-search-is-open {
    overflow: hidden;
}

@keyframes censjr-search-panel-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes censjr-search-panel-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

@media (max-width: 700px) {
    .censjr-search-panel__dialog {
        min-height: 100%;
        padding: 24px 20px;
    }

    .censjr-search-panel .censjr-search {
        align-items: stretch;
        flex-direction: column;
    }

    .censjr-search__submit {
        width: 100%;
    }
}


/*
 * Grille des séjours
 */
.censjr-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 0.33fr));
    gap: 32px 24px;
    width: 100%;
}

/*
 * Mobile
 */
@media (max-width: 700px) {

    .censjr-cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

}


/*
 * Aucun résultat
 */
.censjr-list__empty {
    padding: 30px;
    text-align: center;
}


/*
 * Card séjour
 */

.censjr-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    background: #fff;

    border-radius: 5px;

    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.16),
        0 1px 2px rgba(0, 0, 0, 0.08);
}




.container-sejours-carousel {
    --cometnet-carousel-min-item-width: 280px;
    --cometnet-carousel-max-item-width: 500px;
    --cometnet-carousel-gap: 15px;
    --cometnet-carousel-peek-size: 0px;
}

/*
 * Slider de séjours
 */
.censjr-list--slider {
    width: 100%;
}

.censjr-slider {
    --cometnet-carousel-min-item-width: 100%;
    --cometnet-carousel-max-item-width: 100%;
    --cometnet-carousel-gap: 0px;
    --cometnet-carousel-peek-size: 0px;

    padding: 0;
}

.censjr-slider .cometnet-carousel__viewport {
    margin: 0;
    padding: 0;
}

.censjr-slider .cometnet-carousel__track > * {
    flex-basis: 100%;
}

.censjr-slider__slide {
    position: relative;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;

    min-height: clamp(360px, 48vw, 600px);
    padding: 70px 110px;

    overflow: hidden;

    color: #fff;
    text-align: center;
    text-decoration: none;

    background-color: #315d80;
    background-position: center;
    background-size: cover;
}

.censjr-slider__slide::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.1) 45%,
            rgba(0, 0, 0, 0.58) 100%
        );
}

.censjr-slider__slide:hover,
.censjr-slider__slide:focus {
    color: #fff;
    text-decoration: none;
}

.censjr-slider__region,
.censjr-slider__title,
.censjr-slider__cta {
    position: relative;
    z-index: 2;
}

.censjr-slider__region {
    font-size: 18px;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
}

.censjr-slider__title {
    max-width: 980px;

    font-family: var(
        --wp--preset--font-family--heading,
        Georgia,
        serif
    );
    font-size: clamp(34px, 4vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.censjr-slider__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 8px 16px;

    color: #fff;
    background: #77aa85;
    border: 1px solid #77aa85;
    border-radius: 3px;

    font-size: 17px;
    line-height: 1.2;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.censjr-slider__slide:hover .censjr-slider__cta,
.censjr-slider__slide:focus .censjr-slider__cta {
    background: rgba(119, 170, 133, 0.82);
    border-color: rgba(119, 170, 133, 0.82);
}

.censjr-slider .cometnet-carousel__arrow {
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
}

.censjr-slider .cometnet-carousel__prev {
    left: 18px;
}

.censjr-slider .cometnet-carousel__next {
    right: 18px;
}

.censjr-slider .cometnet-carousel__pagination {
    bottom: 18px;
}

.censjr-slider .cometnet-carousel__dot {
    background: #fff;
}




/*
 * Zone image
 */

.censjr-card__image {
    position: relative;

    aspect-ratio: 1 / 1.06;

    overflow: hidden;

    background: #eee;
}


.censjr-card__image-link {
    display: block;

    width: 100%;
    height: 100%;
}


.censjr-card__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.35s ease;
}


.censjr-card:hover .censjr-card__image img {
    transform: scale(1.025);
}


/*
 * Dégradé bleu sur le bas de l'image
 */

.censjr-card__image::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(32, 83, 121, 0) 45%,
            rgba(32, 83, 121, 0.15) 60%,
            rgba(32, 83, 121, 0.9) 100%
        );
}


/*
 * Badges
 */

.censjr-card__badges {
    position: absolute;
    z-index: 2;

    left: 18px;
    right: 18px;
    bottom: 16px;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.censjr-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /*min-width: 118px;*/

    padding: 4px 14px;

    font-size: 15px;
    line-height: 1.1;

    color: #315d80;
    background: rgba(240, 244, 247, 0.92);

    border-radius: 3px;
}


/*
 * Partie blanche
 */

.censjr-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 24px 22px 18px;
}


/*
 * Titre
 */

.censjr-card__title {
    margin: 0 0 18px;

    font-family: var(
        --wp--preset--font-family--heading,
        Georgia,
        serif
    );

    font-size: clamp(25px, 1.25vw, 32px);
    font-weight: 400;
    line-height: 1.15;
} 


.censjr-card__title a {
    color: #315d80;
    text-decoration: none;
}


.censjr-card__title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}


/*
 * Infos
 */

.censjr-card__infos {
    margin-bottom: 28px;

    font-size: 17px;
    line-height: 1.45;

    color: #111;
}


.censjr-card__info {
    margin: 0;
}


.censjr-card__info strong {
    font-weight: 700;
}


/*
 * Prix + flèche
 */

.censjr-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-top: auto;
}


.censjr-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;

    font-size: 17px;
    line-height: 1.2;
}


.censjr-card__price strong {
    font-size: 27px;
    font-weight: 700;
}


.censjr-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    color: #315d80;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


.censjr-card__arrow:hover {
    transform: translateX(4px);
    text-decoration:none;
}


/*
 * Responsive tablette
 */

@media (max-width: 1100px) {

    .conteneur-liste-sejour .sejours {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/*
 * Responsive mobile
 */

@media (max-width: 700px) {

    .conteneur-liste-sejour .sejours {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .censjr-card__image {
        aspect-ratio: 16 / 11;
    }

    .censjr-card__content {
        padding: 20px;
    }

    .censjr-card__title {
        font-size: 27px;
    }

}
