/* Le Gîte */
#booking-form-511 {

    .mphb-required-fields-tip,
    .mphb-check-in-date-wrapper,
    .mphb-check-out-date-wrapper,
    .mphb-reserve-btn-wrapper {
        display: none;
    }
}

/* Calendar */
.elementor-element-3ca508c, 
.elementor-element-3ca508c .elementor-widget-container, 
.elementor-element-3ca508c .elementor-widget-container .mphb_sc_availability_calendar-wrapper,
.mphb-calendar.mphb-datepick,
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal {
    width: 100% !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .mphb-available-date {
    background-color: var(--bg-input);
    color: var(--dark-green);
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .mphb-available-date:hover {
    background-color: var(--dark-green) !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .mphb-available-date:not(.datepick-selected) .mphb-price {
    color: var(--gray-500) !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .mphb-available-date.datepick-selected {
    background-color: var(--dark-green) !important;
    color: var(--white) !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .mphb-available-date.datepick-selected .mphb-price {
    color: var(--white) !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .datepick-month td span {
    border-radius: 10px;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .datepick-month td a {
    border-radius: 10px;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .datepick-month td a .mphb-price {
    color: var(--white) !important;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .datepick-month td a.datepick-selected {
    border-radius: 10px;
}
.mphb-calendar.mphb-datepick .mphb-datepicker-minimal .datepick-month td a.mphb-selected-date {
    background-color: var(--gray-500) !important;
}

.bg-secondary .mphb-reserve-room-section {
    color: var(--white);

    p {
        font-size: 1.1rem;
    }

    .mphb-confirm-reservation {
        margin-top: 1.5rem;
    }
}

.mphb-calendar td .mphb-date-check-out.mphb-mark-as-unavailable--check-out {
    background-color: #cc0000 !important;
    position: relative;
    z-index: 1;
    border-radius: 0;
    color: var(--white) !important;
}
.mphb-calendar td .mphb-date-check-out.mphb-mark-as-unavailable--check-out::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #cc0000 !important;
}
.mphb-calendar td .mphb-date-check-out.mphb-mark-as-unavailable--check-out::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 4px;
    bottom: 0px;
    left: -1px;
    right: 0px;
    border-right: 16px solid #1e6324 !important;
    border-bottom: 16px solid #1e6324 !important;
    border-left: 16px solid transparent !important;
    border-top: 16px solid transparent !important;
}

/* Checkout */
.mphb-price-breakdown-accommodation-taxes,
.mphb-price-breakdown-rate,
.mphb-price-breakdown-booking .mphb-table-price-column .mphb-price,
.mphb-room-number,
.mphb-room-type-title,
.mphb-price-breakdown-title,
.mphb-text-control br,
.mphb-textarea-control br,
.mphb-country-control br,
.mphb-email-control br,
.mphb-phone-control br {
    display: none !important;
}

.mphb-errors-wrapper:not(.firstError) {
    opacity: 0 !important;
}

.mphb_sc_checkout-form #mphb-booking-details,
.mphb_sc_checkout-form #mphb-customer-details,
.mphb_sc_checkout-form #mphb-billing-details,
.mphb-checkout-terms-wrapper {
    margin-top: 0 !important;
}

.mphb_sc_checkout-form,
.mphb_sc_booking_confirmation {
    max-width: 1340px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .mphb_sc_checkout-form {
        grid-template-columns: 1fr 400px;
        align-items: start;
    }
}

/* Sections communes */
.mphb-checkout-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.mphb-checkout-section h3,
.mphb-checkout-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mphb-checkout-section h3::before,
.mphb-checkout-section h4::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--primary);
    border-radius: 2px;
}

/* Messages d'erreur */
.mphb-errors-wrapper {
    background: var(--error-bg);
    color: var(--error);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--error);
    font-weight: 500;
}

.mphb-errors-wrapper:last-child {
    display: none;
}

/* Section détails de réservation */
#mphb-booking-details {
    grid-column: 1;
}

.mphb-check-in-date,
.mphb-check-out-date {
    display: inline-block;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.mphb-check-in-date strong,
.mphb-check-out-date strong {
    font-size: 1.125rem;
    color: var(--text);
}

.mphb-check-in-date time,
.mphb-check-out-date time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Détails des chambres */
.mphb-room-details {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: #f9fafb;
    margin-top: 1rem;
}

.mphb-room-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1rem !important;
}

.mphb-room-number::before {
    display: none !important;
}

.mphb-room-type-title {
    margin-bottom: 1rem;
}

.mphb-room-type-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.mphb-room-type-title a:hover {
    color: var(--primary);
}

/* Inputs et selects */
.mphb-adults-chooser,
.mphb-guest-name-wrapper {
    margin-bottom: 1rem;
}

.mphb-adults-chooser label,
.mphb-guest-name-wrapper label,
.mphb-customer-details label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9375rem;
}

abbr {
    color: var(--error);
    text-decoration: none;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
}

/* Services */
#mphb-services-details-0 {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

#mphb-services-details-0 h4 {
    font-size: 1rem !important;
    margin-bottom: 1rem;
}

#mphb-services-details-0 h4::before {
    display: none;
}

.mphb_checkout-services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mphb_checkout-services-list li {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

.mphb_checkout-services-list li:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.mphb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400 !important;
}

.mphb-checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    margin: 0;
}

.mphb-checkbox-label em {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 0.25rem;
}

/* Section prix - Sidebar sur desktop */
#mphb-price-details {
    grid-column: 1;
    position: relative;
    margin-top: 0 !important;
}

@media (min-width: 1024px) {
    #mphb-price-details {
        grid-column: 2;
        grid-row: -3 / -1;
        position: sticky;
        top: 4rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
}

/* Sur mobile : masquer le tableau par défaut, afficher seulement le résumé */
@media (max-width: 1023px) {

    /*AJOUT*/
    #mphb-price-details {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        margin: 0 !important;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        max-height: 70vh;
        overflow-y: auto;
        background-color: var(--white);
    }

    /* Ajouter un padding en bas du formulaire pour éviter que le contenu soit caché */
    .mphb_sc_checkout-form {
        padding-bottom: 200px;
    }

    /* Masquer le tableau par défaut, afficher seulement le résumé */
    #mphb-price-details .mphb-price-breakdown-title {
        position: relative;
        cursor: pointer;
        user-select: none;
        padding-right: 2rem;
    }

    #mphb-price-details .mphb-price-breakdown-title::after {
        content: '▼';
        position: absolute;
        right: 0;
        transition: transform 0.3s ease;
    }

    /* Afficher le tableau quand on clique sur le titre */
    #mphb-price-details.expanded .mphb-price-breakdown {
        display: table;
    }

    #mphb-price-details.expanded .mphb-price-breakdown-title::after {
        transform: rotate(180deg);
    }

    /* Afficher seulement le total et l'acompte de manière prominente */
    #mphb-price-details .mphb-price-breakdown tfoot {
        display: table-footer-group;
    }

    /* Style pour le résumé visible */
    .mphb-price-breakdown-total,
    .mphb-price-breakdown-deposit {
        font-size: 1.125rem;
    }

    /*AJOUT*/

    #mphb-price-details .mphb-price-breakdown-title {
        position: relative;
        cursor: pointer;
        user-select: none;
        padding-right: 2rem;
    }

    #mphb-price-details .mphb-price-breakdown-title::after {
        content: '▼';
        position: absolute;
        right: 0;
        transition: transform 0.3s ease;
    }

    /* #mphb-price-details .mphb-price-breakdown {
        display: none;
        margin-top: 1rem;
    } */

    #mphb-price-details:focus-within .mphb-price-breakdown,
    #mphb-price-details:active .mphb-price-breakdown {
        display: table;
    }

    /* Afficher seulement le total et l'acompte de manière prominente */
    #mphb-price-details .mphb-price-breakdown tfoot {
        display: table-footer-group;
    }

    /* Style pour le résumé visible */
    .mphb-price-breakdown-total,
    .mphb-price-breakdown-deposit {
        font-size: 1.125rem;
    }

    /* Créer un résumé visuel au-dessus */
    #mphb-price-details::before {
        content: '';
        display: none;
        background: linear-gradient(135deg, var(--secondary) 0%, var(--dark-green) 100%);
        color: white;
        padding: 1.5rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
}

/* Informations client */
#mphb-customer-details {
    grid-column: 1;
}

.mphb-required-fields-tip {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.mphb-customer-details p {
    margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
    #mphb-customer-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 1rem;
    }

    #mphb-customer-details h3,
    #mphb-customer-details .mphb-required-fields-tip,
    .mphb-customer-address1,
    .mphb-customer-note {
        grid-column: 1 / -1;
    }
}

/* Paiement */
#mphb-billing-details {
    grid-column: 1;
}

.mphb-gateway-title {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-top: 1rem;
    cursor: pointer;
}

/* Prix total affiché */
.mphb-total-price {
    grid-column: 1;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark-green) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.125rem;
}

@media (min-width: 1024px) {
    .mphb-total-price {
        display: none;
    }
}

.mphb-total-price-field {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.mphb-deposit-amount {
    grid-column: 1;
    background-color: var(--light-green);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 1024px) {
    .mphb-deposit-amount {
        display: none;
    }
}

.mphb-deposit-amount-field {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* Conditions */
.mphb-checkout-terms-wrapper {
    grid-column: 1;
}

.mphb-terms-and-conditions-accept {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.mphb-terms-and-conditions-accept label {
    margin: 0 !important;
    font-weight: 400 !important;
}

.mphb-terms-and-conditions-accept input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.mphb-terms-and-conditions-link {
    color: var(--primary);
    text-decoration: none;
}

.mphb-terms-and-conditions-link:hover {
    text-decoration: underline;
}

/* Bouton de soumission */
.mphb_sc_checkout-submit-wrapper {
    grid-column: 1;
    margin: 0 !important;
}

.mphb_sc_checkout-submit-wrapper input[type="submit"],
.mphb_sc_checkout-submit-wrapper .button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.mphb_sc_checkout-submit-wrapper input[type="submit"]:hover,
.mphb_sc_checkout-submit-wrapper .button:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.mphb_sc_checkout-submit-wrapper input[type="submit"]:active,
.mphb_sc_checkout-submit-wrapper .button:active {
    transform: translateY(0);
}

/* Preloader */
.mphb-preloader {
    display: none;
}

/* Responsive mobile */
@media (max-width: 640px) {
    /* body {
        padding: 0.5rem;
    } */

    .mphb-checkout-section {
        padding: 1rem;
    }

    .mphb-checkout-section h3,
    .mphb-checkout-section h4 {
        font-size: 1.125rem;
    }

    .mphb-total-price-field {
        font-size: 1.75rem;
    }
}


/* Tableau */
/* En-têtes et cellules */
.mphb-price-breakdown th,
.mphb-price-breakdown td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.mphb-price-breakdown th {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.mphb-price-breakdown td {
    color: #4a4a4a;
    font-size: 0.9rem;
}

/* Colonne des prix alignée à droite */
.mphb-table-price-column {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
}

/* Ligne principale de l'hébergement */
.mphb-price-breakdown-booking {
    background-color: var(--white);
}

.mphb-price-breakdown-booking td {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: none;
}

.mphb-price-breakdown-booking .mphb-price {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Lien d'expansion */
a.mphb-price-breakdown-accommodation {
    color: var(--text-light) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

.mphb-price-breakdown-accommodation:hover {
    opacity: 0.9;
}

.mphb_sc_checkout-form .mphb-price-breakdown .mphb-price-breakdown-expand>.mphb-inner-icon:not(.mphb-hide) {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1;
    margin-right: 3.5rem;
}

.mphb_sc_checkout-form .mphb-price-breakdown .mphb-price-breakdown-expand>.mphb-inner-icon::before {
    content: '+détails';
    position: absolute;
    top: 50%;
    left: -2px;
    transform: translateY(-50%);
    background-color: var(--primary);
    color: var(--white);
    padding: 5px;
    border-radius: 8px !important;
}

/* Lignes de détails */
.mphb-price-breakdown-guests td,
.mphb-price-breakdown-nights td {
    background: #fafafa;
    font-weight: 500;
}

/* Section des dates */

/* hide table useless */
.mphb-price-breakdown-dates,
.mphb-price-breakdown-date,
/* .mphb-price-breakdown-accommodation-total, */
.mphb-price-breakdown-accommodation-tax,
.mphb-price-breakdown-accommodation-taxes-total,
tbody .mphb-price-breakdown-subtotal {
    display: none;
}

.mphb-price-breakdown-dates th {
    background: #f5f5f5;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 0.75rem 1.25rem;
}

.mphb-price-breakdown-date td {
    background: #fcfcfc;
}

/* Totaux des sections */
.mphb-price-breakdown-accommodation-total th,
.mphb-price-breakdown-accommodation-taxes-total th,
.mphb-price-breakdown-services-total th {
    background: #f8f9fa;
    color: #2c3e50;
    border-top: 2px solid #e9ecef;
    border-bottom: 2px solid #e9ecef;
}

/* Section services */
.mphb-price-breakdown-services th {
    background: #f5f5f5;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mphb-price-breakdown-service td {
    background: #fcfcfc;
}

.mphb-price-breakdown-service-name {
    font-weight: 500;
    color: #2c3e50;
}

/* Footer du tableau */
.mphb-price-breakdown tfoot tr {
    border-top: 2px solid #e9ecef;
}

.mphb-price-breakdown-subtotal td,
.mphb-tax-info-total td {
    padding: 1rem 1.25rem;
    font-weight: 500;
    background: #fafafa;
}

/* Total final */
.mphb-price-breakdown-total {
    background-color: var(--dark-green);
}

.mphb-price-breakdown-total th {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.25rem;
    border: none;
}

.mphb-price-breakdown-total .mphb-price {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Acompte */
.mphb-price-breakdown-deposit {
    background: #e8f5e9;
}

.mphb-price-breakdown-deposit th {
    color: #2e7d32;
    font-weight: 600;
    border: none;
}

.mphb-price-breakdown-deposit .mphb-price {
    color: #1b5e20;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Mise en forme des prix */
.mphb-price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.15rem;
}

.mphb-currency {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Animation d'apparition pour les lignes dépliées */
.mphb-price-breakdown tr {
    transition: background-color 0.2s ease;
}

.mphb-price-breakdown tr:hover:not(.mphb-price-breakdown-booking):not(.mphb-price-breakdown-total) {
    background-color: #f9f9f9;
}

/* Responsive */
@media (max-width: 640px) {

    .mphb-price-breakdown th,
    .mphb-price-breakdown td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .mphb-price-breakdown-booking .mphb-price {
        font-size: 1.1rem;
    }

    .mphb-price-breakdown-total .mphb-price {
        font-size: 1.3rem;
    }
}


/* Détails réservation */
.mphb_sc_booking_confirmation {
    margin-top: 50px;
}

.mphb-payment-messages {
    margin: 32px 0;
    background: var(--light-green) !important;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--dark-green);
    font-size: 1.2rem;
}

.mphb-booking-details-section {
    background: white;
    padding: 2rem !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Vélos */
/* Améliorer le label du nombre de vélos */
label[for="mphb_room_details-0-service-1649-adults"] {
    display: flex;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    margin-top: 8px !important;
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.5 !important;
}

/* Style du select pour qu'il soit plus compact et élégant */
#mphb_room_details-0-service-1649-adults {
    flex-shrink: 0 !important;
    min-width: 60px !important;
    max-width: 80px !important;
    padding: 6px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
}

#mphb_room_details-0-service-1649-adults:hover {
    border-color: #999 !important;
}

#mphb_room_details-0-service-1649-adults:focus {
    outline: none !important;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.2) !important;
}

/* Espacement du texte autour du select */
label[for="mphb_room_details-0-service-1649-adults"]>* {
    margin: 0 !important;
}

/* Version responsive pour petits écrans */
@media (max-width: 600px) {
    label[for="mphb_room_details-0-service-1649-adults"] {
        gap: 6px !important;
        font-size: 13px !important;
    }

    #mphb_room_details-0-service-1649-adults {
        min-width: 55px !important;
        max-width: 70px !important;
        padding: 5px 8px !important;
        font-size: 13px !important;
    }
}

/* Très petits écrans : empiler si nécessaire */
@media (max-width: 400px) {
    label[for="mphb_room_details-0-service-1649-adults"] {
        flex-direction: row !important;
        gap: 5px !important;
    }
}