/* ==========================================================
   PLANChic - BOOKING DATE RANGE PICKER
   ========================================================== */


/* ==========================================================
   CHAMP DE SÉLECTION DES DATES
   ========================================================== */

.booking-dates {
    position: relative;
    width: 100%;
}


/*
 * Le formulaire global du starter utilise :
 *
 * .form-grid > div > div {
 *     flex-direction: column;
 * }
 *
 * On surcharge explicitement cette règle ici.
 */
.form-grid > .booking-dates > .booking-dates__field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;

    width: 100%;
    min-height: 72px;

    padding: 0 1.15rem;

    background: #ffffff;

    border: 1px solid rgba(48, 61, 51, 0.16);
    border-radius: 16px;

    box-shadow:
        0 1px 2px rgba(28, 38, 30, 0.02),
        0 8px 24px rgba(28, 38, 30, 0.04);

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.form-grid > .booking-dates > .booking-dates__field:hover {
    border-color: rgba(65, 89, 74, 0.42);

    box-shadow:
        0 1px 2px rgba(28, 38, 30, 0.03),
        0 10px 28px rgba(28, 38, 30, 0.07);
}


.form-grid > .booking-dates > .booking-dates__field:focus-within {
    border-color: #526b59;

    box-shadow:
        0 0 0 4px rgba(82, 107, 89, 0.09),
        0 10px 28px rgba(28, 38, 30, 0.06);
}


/* ----------------------------------------------------------
   LABEL
   ---------------------------------------------------------- */

.booking-dates__label {
    display: block;

    margin-bottom: 0.55rem;

    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;

    color: #836c55;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* ----------------------------------------------------------
   ICÔNE
   ---------------------------------------------------------- */

.booking-dates__icon {
    display: grid;
    place-items: center;

    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    color: #496252;

    background: #f1f4f1;

    border-radius: 12px;
}


.booking-dates__icon svg {
    display: block;
}


/* ----------------------------------------------------------
   CONTENU
   ---------------------------------------------------------- */

.booking-dates__content {
    display: block;

    flex: 1;

    min-width: 0;
}


.booking-dates__hint {
    display: block;

    margin-bottom: 0.18rem;

    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;

    color: #99938a;
}


/*
 * On neutralise ici le style input global de l'application.
 */
.booking-dates__input {
    display: block !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    font-family: inherit !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;

    color: #28322b !important;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    outline: 0 !important;
    box-shadow: none !important;

    cursor: pointer;
}


.booking-dates__input::placeholder {
    font-weight: 400;

    color: #99958e;

    opacity: 1;
}


.booking-dates__input:focus,
.booking-dates__input:hover {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}


.booking-dates__input:disabled {
    color: #aaa7a0 !important;

    cursor: wait;
}


/* ----------------------------------------------------------
   FLÈCHE À DROITE
   ---------------------------------------------------------- */

.booking-dates__arrow {
    display: grid;
    place-items: center;

    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    font-size: 0.95rem;

    color: #667168;

    background: transparent;

    border-radius: 50%;

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


.booking-dates__field:hover .booking-dates__arrow {
    background: #f2f3f0;

    transform: translateY(1px);
}


/* ----------------------------------------------------------
   LÉGENDE
   ---------------------------------------------------------- */

.booking-dates__legend {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 1.25rem;

    margin-top: 0.65rem;

    font-size: 0.76rem;

    color: #858078;
}


.booking-dates__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}


.booking-dates__dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;
}


.booking-dates__dot--available {
    background: #5e8068;
}


.booking-dates__dot--unavailable {
    background: #cac7c1;
}


/* ----------------------------------------------------------
   INPUTS SYMFONY CACHÉS
   ---------------------------------------------------------- */

.booking-dates__hidden {
    display: none !important;
}



/* ==========================================================
   HOTEL DATEPICKER
   ========================================================== */

.datepicker {
    z-index: 1000 !important;

    width: min(740px, calc(100vw - 32px)) !important;

    font-family: inherit !important;

    color: #303a33;
}


/* ----------------------------------------------------------
   CONTENEUR PRINCIPAL
   ---------------------------------------------------------- */

.datepicker__inner {
    position: relative;

    padding: 24px !important;

    background: #ffffff !important;

    border: 1px solid rgba(38, 50, 41, 0.10) !important;
    border-radius: 20px !important;

    box-shadow:
        0 30px 80px rgba(25, 34, 28, 0.14),
        0 8px 30px rgba(25, 34, 28, 0.07) !important;
}



/* ==========================================================
   EXTRA
   ========================================================== */

/* ==========================================================
   BOOKING - SERVICES SUPPLÉMENTAIRES
   ========================================================== */

.booking-extras {
    width: 100%;

    margin-top: 1.5rem;
}


/* ----------------------------------------------------------
   EN-TÊTE
   ---------------------------------------------------------- */

.booking-extras__header {
    margin-bottom: 1.1rem;
}

.booking-extras__header .eyebrow {
    margin: 0 0 0.35rem;

    font-size: 0.72rem;
    font-weight: 700;

    color: #836c55;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.booking-extras__header h2 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.25;

    color: #29342d;
}


/* ----------------------------------------------------------
   LISTE
   ---------------------------------------------------------- */

.booking-extras__list {
    display: grid;

    gap: 0.8rem;

    width: 100%;
}


/* ==========================================================
   CARTE SERVICE
   ========================================================== */

.booking-extra {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 1rem;

    width: 100%;

    padding: 1.15rem 1.2rem;

    background: #ffffff;

    border: 1px solid rgba(48, 61, 51, 0.14);
    border-radius: 16px;

    box-shadow:
        0 1px 2px rgba(28, 38, 30, 0.02),
        0 6px 20px rgba(28, 38, 30, 0.035);

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}


.booking-extra:hover {
    border-color: rgba(65, 89, 74, 0.34);

    background: #fdfdfb;

    box-shadow:
        0 1px 2px rgba(28, 38, 30, 0.03),
        0 10px 28px rgba(28, 38, 30, 0.06);

    transform: translateY(-1px);
}


/* ==========================================================
   CHECKBOX
   ========================================================== */

.booking-extra__check {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 24px;

    width: 24px;

    padding-top: 2px;
}


/*
 * On neutralise les styles généraux des inputs.
 */
.booking-extra__check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    display: grid;
    place-content: center;

    width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #ffffff;

    border: 1.5px solid #bbbdb8 !important;
    border-radius: 7px !important;

    box-shadow: none !important;
    outline: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.booking-extra__check input[type="checkbox"]::before {
    content: "";

    width: 10px;
    height: 6px;

    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;

    transform:
        rotate(-45deg)
        scale(0);

    transform-origin: center;

    transition: transform 0.12s ease;
}


.booking-extra__check input[type="checkbox"]:checked {
    background: #41594a;

    border-color: #41594a !important;

    box-shadow:
        0 0 0 3px rgba(65, 89, 74, 0.09) !important;
}


.booking-extra__check input[type="checkbox"]:checked::before {
    transform:
        translateY(-1px)
        rotate(-45deg)
        scale(1);
}


.booking-extra__check input[type="checkbox"]:focus-visible {
    box-shadow:
        0 0 0 4px rgba(65, 89, 74, 0.12) !important;
}


/* ==========================================================
   CONTENU
   ========================================================== */

.booking-extra__content {
    display: block !important;

    flex: 1;

    min-width: 0;
}


/* ----------------------------------------------------------
   NOM + PRIX
   ---------------------------------------------------------- */

.booking-extra__title {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;

    width: 100%;

    margin: 0;
}


.booking-extra__title strong {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;

    color: #29342d;
}


.booking-extra__title span {
    flex-shrink: 0;

    font-size: 0.88rem;
    font-weight: 700;

    color: #536c5a;

    white-space: nowrap;
}


/* ----------------------------------------------------------
   DESCRIPTION
   ---------------------------------------------------------- */

.booking-extra__content p {
    max-width: 720px;

    margin: 0.5rem 0 0;

    font-size: 0.82rem;
    line-height: 1.55;

    color: #77756f;
}


/* ----------------------------------------------------------
   MODE DE TARIFICATION
   ---------------------------------------------------------- */

.booking-extra__content small {
    display: inline-block;

    margin-top: 0.55rem;

    padding: 0.25rem 0.55rem;

    font-size: 0.67rem;
    font-weight: 650;
    line-height: 1;

    color: #69766d;

    background: #f1f4f1;

    border-radius: 999px;
}


/* ==========================================================
   CARTE SÉLECTIONNÉE
   ========================================================== */

/*
 * :has() est maintenant supporté par les navigateurs modernes.
 * Ça permet de modifier toute la carte quand la checkbox est cochée.
 */

.booking-extra:has(
    .booking-extra__check input[type="checkbox"]:checked
) {
    background: #f5f8f5;

    border-color: rgba(65, 89, 74, 0.55);

    box-shadow:
        0 0 0 1px rgba(65, 89, 74, 0.04),
        0 10px 28px rgba(28, 38, 30, 0.06);
}


.booking-extra:has(
    .booking-extra__check input[type="checkbox"]:checked
) .booking-extra__title strong {
    color: #354d3e;
}


.booking-extra:has(
    .booking-extra__check input[type="checkbox"]:checked
) .booking-extra__title span {
    color: #354d3e;
}


.booking-extra:has(
    .booking-extra__check input[type="checkbox"]:checked
) .booking-extra__content small {
    color: #405848;

    background: #e5ede7;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 650px) {

    .booking-extra {
        gap: 0.8rem;

        padding: 1rem;
    }


    .booking-extra__title {
        align-items: flex-start;

        gap: 0.5rem;
    }


    .booking-extra__title strong {
        font-size: 0.9rem;
    }


    .booking-extra__title span {
        font-size: 0.8rem;
    }


    .booking-extra__content p {
        font-size: 0.78rem;
    }

}


@media (max-width: 420px) {

    .booking-extra__title {
        flex-direction: column !important;
        gap: 0.25rem;
    }


    .booking-extra__title span {
        white-space: normal;
    }

}


/* ==========================================================
   TOPBAR
   ========================================================== */

.datepicker__topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    float: none !important;

    width: 100% !important;
    min-height: 42px;

    margin: 0 0 20px !important;
    padding: 0 0 18px !important;

    border-bottom: 1px solid #ece9e4 !important;

    background: transparent !important;
}


.datepicker__info {
    flex: 1;

    margin: 0 !important;
}


.datepicker__info--feedback,
.datepicker__info--help,
.datepicker__info--error {
    margin: 0 !important;

    font-family: inherit !important;
    font-size: 0.8rem !important;
    font-style: normal !important;
    line-height: 1.4 !important;
}


.datepicker__info--help {
    color: #74776f !important;
}


.datepicker__info--feedback {
    color: #48584d !important;
}


.datepicker__info--error {
    color: #a65348 !important;
}


.datepicker__info--selected-label {
    color: #969087 !important;
}


.datepicker__info-text {
    font-weight: 600 !important;

    color: #344138 !important;
}



/* ==========================================================
   BOUTONS TOPBAR
   ========================================================== */

.datepicker__close-button,
.datepicker__clear-button,
.datepicker__submit-button {
    float: none !important;

    margin: 0 !important;
    padding: 8px 14px !important;

    font-family: inherit !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    color: #ffffff !important;

    background: #41594a !important;

    border: 0 !important;
    border-radius: 999px !important;

    box-shadow: none !important;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.datepicker__close-button:hover,
.datepicker__clear-button:hover,
.datepicker__submit-button:hover {
    color: #ffffff !important;

    background: #314438 !important;

    transform: translateY(-1px);
}



/* ==========================================================
   LES DEUX MOIS
   ========================================================== */

.datepicker__months {
    position: relative;

    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;

    width: 100% !important;

    overflow: visible !important;
}


/*
 * Hotel Datepicker utilise historiquement des floats.
 * On les supprime complètement.
 */
.datepicker__month {
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
}


.datepicker__month--month1,
.datepicker__month--month2 {
    float: none !important;

    width: 100% !important;
}


/*
 * Suppression du séparateur vertical d'origine.
 */
.datepicker__months::before {
    display: none !important;

    content: none !important;
}



/* ==========================================================
   EN-TÊTE DU MOIS
   ========================================================== */

.datepicker__month-caption {
    position: relative;

    height: 44px !important;

    margin: 0 !important;

    border-bottom: 1px solid #e8e5df !important;
}


.datepicker__month-name {
    height: 44px !important;

    padding: 0 !important;

    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;

    color: #2e3931 !important;

    letter-spacing: 0.015em;
    text-transform: uppercase;

    vertical-align: middle !important;
    display: table-cell !important;
}



/* ==========================================================
   BOUTONS MOIS PRÉCÉDENT / SUIVANT
   ========================================================== */

.datepicker__month-button {
    display: grid !important;
    place-items: center;

    width: 34px !important;
    height: 34px !important;

    margin: 5px 0 !important;
    padding: 0 !important;

    color: #53645a !important;

    background: #f3f4f1 !important;

    border: 0 !important;
    border-radius: 50% !important;

    box-shadow: none !important;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.datepicker__month-button:hover {
    background: #e8ece8 !important;

    transform: scale(1.05);
}



/* ==========================================================
   JOURS DE LA SEMAINE
   ========================================================== */

.datepicker__week-days {
    height: 36px !important;
}


.datepicker__week-name {
    height: 36px !important;

    padding: 0 !important;

    font-size: 0.65rem !important;
    font-weight: 700 !important;

    color: #a4a098 !important;

    letter-spacing: 0.05em;
    text-transform: uppercase;

    vertical-align: middle !important;
}



/* ==========================================================
   JOURS DU CALENDRIER
   ========================================================== */

.datepicker__month-day {
    position: relative;

    height: 40px !important;

    padding: 0 !important;

    font-family: inherit !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;

    color: #3c463f;

    background: transparent;

    border: 0 !important;
    border-radius: 9px;

    vertical-align: middle !important;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}



/* ==========================================================
   JOUR DISPONIBLE
   ========================================================== */

.datepicker__month-day--valid {
    color: #364139 !important;

    cursor: pointer;
}


.datepicker__month-day--valid:hover {
    z-index: 2;

    color: #ffffff !important;

    background: #607766 !important;

    border-radius: 9px !important;

    transform: scale(1.04);
}



/* ==========================================================
   AUJOURD'HUI
   ========================================================== */

.datepicker__month-day--today {
    font-weight: 800 !important;

    color: #3f5648 !important;

    background: #eef2ee !important;

    border-radius: 9px !important;
}


.datepicker__month-day--today::before {
    content: "";

    position: absolute;
    bottom: 4px;
    left: 50%;

    width: 4px;
    height: 4px;

    background: #607766;

    border-radius: 50%;

    transform: translateX(-50%);
}



/* ==========================================================
   JOURS INDISPONIBLES
   ========================================================== */

.datepicker__month-day--invalid,
.datepicker__month-day--disabled {
    color: #c9c6c0 !important;

    background: transparent !important;

    text-decoration: none !important;

    cursor: not-allowed !important;

    opacity: 1 !important;
}


/*
 * Hotel Datepicker ajoute une croix sur les dates bloquées.
 * On la supprime : visuellement c'est beaucoup plus calme.
 */
.datepicker__month-day--invalid::after,
.datepicker__month-day--disabled::after {
    display: none !important;

    content: none !important;
}



/* ==========================================================
   CHECKOUT AUTORISÉ SUR UNE DATE BLOQUÉE
   ========================================================== */

.datepicker__month-day--checkout-enabled {
    color: #777d77 !important;

    background: #f5f5f2 !important;

    text-decoration: none !important;

    cursor: pointer !important;
}



/* ==========================================================
   PLAGE SURVOLÉE
   ========================================================== */

.datepicker__month-day--hovering {
    color: #35443a !important;

    background: #edf1ed !important;

    border-radius: 0 !important;
}



/* ==========================================================
   PLAGE SÉLECTIONNÉE
   ========================================================== */

.datepicker__month-day--selected {
    color: #35443a !important;

    background: #e5ece6 !important;

    border-radius: 0 !important;
}



/* ==========================================================
   DATE D'ARRIVÉE
   ========================================================== */

.datepicker__month-day--first-day-selected {
    z-index: 2;

    color: #ffffff !important;

    background: #41594a !important;

    border-radius: 9px 0 0 9px !important;
}



/* ==========================================================
   DATE DE DÉPART
   ========================================================== */

.datepicker__month-day--last-day-selected {
    z-index: 2;

    color: #ffffff !important;

    background: #41594a !important;

    border-radius: 0 9px 9px 0 !important;
}


/*
 * Sécurité si une date reçoit les deux classes.
 */
.datepicker__month-day--first-day-selected.datepicker__month-day--last-day-selected {
    border-radius: 9px !important;
}



/* ==========================================================
   TOOLTIP NOMBRE DE NUITS
   ========================================================== */

.datepicker__tooltip {
    z-index: 5;

    padding: 6px 10px !important;

    font-family: inherit !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;

    color: #ffffff !important;

    background: #35443a !important;

    border: 0 !important;
    border-radius: 7px !important;

    box-shadow:
        0 8px 20px rgba(25, 34, 28, 0.14) !important;
}



/* ==========================================================
   TABLES INTERNES
   ========================================================== */

.datepicker__month {
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;

    table-layout: fixed !important;

    border-collapse: separate !important;
    border-spacing: 2px !important;
}

.datepicker__week-name,
.datepicker__month-day {
    width: 14.285714% !important;
    min-width: 0 !important;
    max-width: 14.285714% !important;
}



/* ==========================================================
   RESPONSIVE - TABLETTE
   ========================================================== */

@media (max-width: 900px) {

    .datepicker {
        width: min(680px, calc(100vw - 24px)) !important;
    }

    .datepicker__months {
        gap: 22px;
    }

    .datepicker__inner {
        padding: 20px !important;
    }

}



/* ==========================================================
   RESPONSIVE - MOBILE
   ========================================================== */

@media (max-width: 767px) {

    /* ------------------------------------------------------
       CHAMP
       ------------------------------------------------------ */

    .form-grid > .booking-dates > .booking-dates__field {
        gap: 0.75rem;

        min-height: 66px;

        padding: 0 0.9rem;
    }


    .booking-dates__icon {
        flex-basis: 38px;

        width: 38px;
        height: 38px;

        border-radius: 10px;
    }


    .booking-dates__icon svg {
        width: 19px;
        height: 19px;
    }


    .booking-dates__input {
        font-size: 0.88rem !important;
    }


    .booking-dates__hint {
        font-size: 0.66rem;
    }


    .booking-dates__arrow {
        flex-basis: 30px;

        width: 30px;
        height: 30px;
    }


    .booking-dates__legend {
        gap: 1rem;

        font-size: 0.7rem;
    }



    /* ------------------------------------------------------
       CALENDRIER
       ------------------------------------------------------ */

    .datepicker {
        left: 12px !important;
        right: 12px !important;

        width: calc(100vw - 24px) !important;
        max-width: none !important;
    }


    .datepicker__inner {
        padding: 16px !important;

        border-radius: 17px !important;
    }


    .datepicker__topbar {
        align-items: flex-start;
        gap: 0.75rem;

        margin-bottom: 14px !important;
        padding-bottom: 14px !important;
    }


    .datepicker__info--feedback,
    .datepicker__info--help,
    .datepicker__info--error {
        font-size: 0.74rem !important;
    }


    .datepicker__close-button,
    .datepicker__clear-button,
    .datepicker__submit-button {
        flex-shrink: 0;

        padding: 8px 11px !important;

        font-size: 0.62rem !important;
    }


    /*
     * Sur téléphone on n'affiche qu'un mois.
     * Deux mois côte à côte ici seraient une punition.
     */
    .datepicker__months {
        display: block !important;

        width: 100% !important;
    }


    .datepicker__month {
        float: none !important;

        width: 100% !important;
    }


    .datepicker__month--month2 {
        display: none !important;
    }


    .datepicker__month-caption {
        height: 42px !important;
    }


    .datepicker__month-name {
        height: 42px !important;

        font-size: 0.95rem !important;
    }


    .datepicker__month-day {
        height: 39px !important;

        font-size: 0.8rem !important;
    }


    .datepicker__week-name {
        font-size: 0.62rem !important;
    }

}



/* ==========================================================
   TRÈS PETITS ÉCRANS
   ========================================================== */

@media (max-width: 420px) {

    .booking-dates__legend {
        flex-wrap: wrap;
    }


    .datepicker__inner {
        padding: 13px !important;
    }


    .datepicker__month-day {
        height: 37px !important;

        font-size: 0.77rem !important;
    }


    .datepicker__week-name {
        height: 32px !important;
    }

}
