/*
 * Largeurs en flex (global.min.css répartit via flex-grow). Les sélecteurs reprennent le préfixe 'html body main' de global.min.css pour garder la priorité.
 * Barre de réservation : champs adultes / enfants, calendrier en dernier,
 * prix D-EDGE dans le calendrier (daterangepicker). Chargé après global.min.css.
 */

/* Desktop : 5 champs (ville, hôtel, adultes, enfants, dates) */
@media (min-width: 768px) {
    html body main .reservation .reservation-field-container .reservation-field {
        width: 16%;
        flex: 16 1 0;
    }

    html body main .reservation .reservation-field-container .reservation-field:nth-of-type(2) {
        width: 20%;
        flex: 20 1 0;
    }

    html body main .reservation .reservation-field-container .reservation-field:nth-of-type(3),
    html body main .reservation .reservation-field-container .reservation-field:nth-of-type(4) {
        width: 12%;
        flex: 12 1 0;
    }

    html body main .reservation .reservation-field-container .reservation-field:nth-of-type(5) {
        width: 30%;
        flex: 30 1 0;
    }
}

/* Mobile : lignes simples adultes / enfants (sans accordéon) */
@media (max-width: 767px) {
    html body main .reservation .reservation-field-container .resa-row--plain {
        margin: 0 0 20px;
    }

    html body main .reservation .reservation-field-container .resa-row--plain select {
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        padding: 0 60px 0 20px;
        background-color: transparent;
        background-position: right 35px center;
        border: 0;
        border-bottom: 1px solid #ebe6e4;
        border-radius: 0;
        color: #ebe6e4;
        font-family: "Circular-Std";
        font-size: 18px;
        font-style: normal;
        font-weight: 700;
        text-transform: uppercase;
    }

    html body main .reservation .reservation-field-container .resa-row--plain select option {
        color: #000;
    }
}

/* Prix D-EDGE dans le calendrier (le design existant est conservé) */
html body .daterangepicker.nh-prices-on td[data-date]:not(.off) {
    box-sizing: border-box;
    height: 46px;
    padding: 8px 0 0; /* le td est en display:block : on centre le contenu (jour + prix) avec le padding */
    line-height: 1;
}

/* Dernière ligne vide du mois : on la masque pour ne pas laisser de noir inutile */
html body .daterangepicker .drp-calendar .calendar-table tr.nh-empty-row {
    display: none !important; /* global.min.css force display:flex sur les lignes */
}

/* La hauteur du calendrier est fixée dans global.min.css : on la laisse suivre le contenu. */
html body .daterangepicker.nh-prices-on .drp-calendar,
html body .daterangepicker.nh-prices-on .drp-calendar .calendar-table,
html body .daterangepicker.nh-prices-on .drp-calendar .calendar-table table {
    height: auto;
}

/* Le clic doit cibler la cellule (td) : le sélecteur lit e.target pour retrouver la date. */
html body .daterangepicker td .nh-day,
html body .daterangepicker td .nh-price {
    pointer-events: none;
}

html body .daterangepicker td .nh-day {
    display: block;
    line-height: 1;
}

html body .daterangepicker td .nh-price {
    display: block;
    min-height: 9px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.55);
    font-family: "Circular-Std-book", "Circular-Std", sans-serif;
    font-size: 9px;
    font-style: normal;
    line-height: 1;
    white-space: nowrap;
}

html body .daterangepicker td.nh-loading .nh-price:empty::after {
    content: "";
    display: block;
    width: 16px;
    height: 3px;
    margin: 3px auto 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
}

html body .daterangepicker td.nh-lowest .nh-price {
    color: #b0a06c;
    font-weight: 700;
}

html body .daterangepicker td.active .nh-price,
html body .daterangepicker td.start-date .nh-price,
html body .daterangepicker td.end-date .nh-price {
    color: #fff;
}

html body .daterangepicker td.nh-soldout .nh-day {
    opacity: 0.35;
    text-decoration: line-through;
}

html body .daterangepicker.nh-prices-on {
    flex-wrap: wrap;
    row-gap: 0; /* global.min.css met gap: 27px : on le retire entre le calendrier et la mention */
}

html body .daterangepicker .nh-legend {
    display: none;
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 2px 16px 0;
    color: rgba(255, 255, 255, 0.55);
    font-family: "Circular-Std-book", "Circular-Std", sans-serif;
    font-size: 11px;
    font-style: italic;
    text-align: right;
}

html body .daterangepicker.nh-prices-on .nh-legend {
    display: block;
}

/* ---- Mobile : calendrier a defilement vertical (.resa-cal) ---- */
/* Cases carrees (au lieu de rectangles) : le numero du jour et le prix sont centres dans la case. */
html body main .reservation .reservation-field-container .resa-cal-scroll .resa-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    font-size: 17px;
    line-height: 1;
}

html body main .reservation .reservation-field-container .resa-cal-scroll .resa-cal-grid {
    row-gap: 4px;
}

html body main .reservation .reservation-field-container .resa-cal-day .nh-day {
    display: block;
    font-size: 17px;
    line-height: 1;
}

html body main .reservation .reservation-field-container .resa-cal-day .nh-price {
    display: block;
    min-height: 12px;
    margin-top: 5px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-style: normal;
    line-height: 1;
}

html body main .reservation .reservation-field-container .resa-cal-day.nh-lowest .nh-price {
    color: #b0a06c;
    font-weight: 700;
}

html body main .reservation .reservation-field-container .resa-cal-day.is-start .nh-price,
html body main .reservation .reservation-field-container .resa-cal-day.is-end .nh-price {
    color: #fff;
}

html body main .reservation .reservation-field-container .resa-cal-day.nh-soldout .nh-day {
    opacity: .35;
    text-decoration: line-through;
}

html body main .reservation .reservation-field-container .resa-cal-day.nh-loading .nh-price:empty::after {
    content: '';
    display: block;
    width: 22px;
    height: 6px;
    margin: 3px auto 0;
    background: rgba(255, 255, 255, .12);
}

/* Mention sous le titre du calendrier, seulement quand les prix sont affiches. */
html body main .reservation .reservation-field-container .resa-cal .nh-legend-mobile {
    display: none;
    margin: 0;
    padding: 0 0 8px;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-style: italic;
    text-align: right;
}

html body main .reservation .reservation-field-container .resa-cal.nh-prices-on .nh-legend-mobile {
    display: block;
}
html body main .reservation .reservation-field-container .resa-cal-days span {
    font-size: 14px;
}
