/*
 * Campy Yallaa — Overrides CSS
 * Basé sur la config Redux exportée le 07-07-2026
 *
 * Charte :
 *   #54af48  → vert principal (wp_estate_main_color)
 *   #293d1c  → vert foncé    (wp_estate_link_color / headings)
 *   #000000  → fond footer   (wp_estate_footer_back_color)
 *   #ffffff  → texte footer  (wp_estate_footer_font_color)
 *   Montserrat → police principale
 *   border-radius 33px → cohérent avec Elementor
 */

/* ================================================
   FOOTER SOCIAL ICONS
   (wp_estate_custom_css du backup)
   ================================================ */
#colophon .social_sidebar_internal a {
    background-color: #f5f4f4;
}
#colophon .social_sidebar_internal i {
    color: #39364e;
}

/* ================================================
   PRIX : remplacer "/nuit" et "par invité" par "/jour" / "par unité"
   ================================================ */
.pernight {
    visibility: hidden;
    font-size: 0;
    display: inline;
}
.pernight::after {
    content: " /jour";
    visibility: visible;
    font-size: 14px;
    color: #54af48;
}

/* Sidebar prix principal : "45 DT par invité" → "45 DT / nuit" */
.pernight_label {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
}
.pernight_label::after {
    content: " / nuit";
    display: inline-block;
    max-width: 100px;
    overflow: visible;
    white-space: normal;
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.85);
    vertical-align: bottom;
}

/* Dans les cartes listing (fond blanc) : label vert */
.price_unit .pernight_label::after,
.listing_unit_price_wrapper .pernight_label::after,
.idx-price .pernight_label::after,
.compare_item_head .pernight_label::after {
    color: #54af48;
}

/* Dans le récap WPRentals (fond blanc) */
.booking_details_price_line .pernight_label::after,
.total_booking_section .pernight_label::after {
    content: " /nuit";
    color: #293d1c;
    font-size: 13px;
}

/* ================================================
   ARRONDI DES CARTES
   ================================================ */
.property_listing,
.property_unit_wrap,
.blog_unit_back,
.places_wrapper {
    border-radius: 33px;
    overflow: hidden;
}

.listing-unit-img-wrapper {
    border-radius: 33px 33px 0 0;
    overflow: hidden;
}

/* ================================================
   BOUTONS — Gradient vert Campy Yallaa
   ================================================ */
#submit_booking_front,
#submit_booking_front_instant,
.wpestate_booking_button,
.check_avalability,
.advanced_search_submit_button,
#advanced_submit_2,
#advanced_submit_3,
#advanced_submit_widget,
#form_submit_1,
#submit_mess_front,
#book_dates {
    background: linear-gradient(90deg, #54af48 50%, #54af48 100%) !important;
    border-radius: 33px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    border-color: #54af48 !important;
}

#submit_booking_front:hover,
#submit_booking_front_instant:hover,
.wpestate_booking_button:hover,
.check_avalability:hover,
.advanced_search_submit_button:hover {
    background: linear-gradient(90deg, #293d1c 50%, #293d1c 100%) !important;
    border-color: #293d1c !important;
}

/* ================================================
   FORMULAIRE DE RÉSERVATION — Date labels
   ================================================ */
.wpestate_booking_checkin_label::after  { content: " (départ)"; font-size: 11px; color: #888; }
.wpestate_booking_checkout_label::after { content: " (retour)"; font-size: 11px; color: #888; }

/* ================================================
   PRIX / CARTES LISTING
   ================================================ */
.price_unit,
.listing_unit_price_wrapper,
.idx-price {
    color: #54af48 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* ================================================
   BADGE "Vérifié"
   ================================================ */
.status_verifie {
    background-color: #54af48 !important;
    color: #fff !important;
    border-radius: 4px;
    padding: 2px 8px;
}

/* ================================================
   MENU
   ================================================ */
#access ul.menu > li > a {
    color: #293d1c;
    font-size: 15px;
}
#access .menu li:hover > a,
#access .current-menu-item > a,
#access .current-menu-ancestor > a {
    color: #54af48 !important;
}

/* ================================================
   HEADER — uniquement desktop (≥ 992px)
   ================================================ */
@media (min-width: 992px) {
    .header_wrapper_inside {
        height: 90px;
    }
    .header_type1 .menu > li {
        height: 90px;
        line-height: 44px;
    }
}

/* ================================================
   FOOTER
   ================================================ */
#colophon {
    background-color: #000000;
    color: #ffffff;
}
#colophon a {
    color: #ffffff;
}
#colophon a:hover {
    color: #54af48;
}
.sub_footer {
    background-color: #000000;
    color: #ffffff !important;
}
.subfooter_menu a,
.subfooter_menu li a {
    color: #ffffff !important;
}
.subfooter_menu a:hover {
    color: #54af48 !important;
}

/* ================================================
   BACKTOP
   ================================================ */
.backtop {
    background-color: #54af48 !important;
    color: #ffffff !important;
    border-radius: 50%;
}

/* ================================================
   CHAMPS IMMOBILIERS INUTILES — masqués
   ================================================ */
.property_year_wrapper,
.property_pool_wrapper,
.property_garage_wrapper {
    display: none !important;
}

/* ================================================
   TYPO GÉNÉRALE — Montserrat
   ================================================ */
body,
h1, h2, h3, h4, h5, h6,
.info_details,
.price_unit,
.property_price {
    font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: #293d1c;
}

a {
    color: #293d1c;
}
a:hover,
a:focus {
    color: #54af48;
}

/* ================================================
   QUANTITÉ — Renommer "Invités" en "Quantité"
   ================================================ */

.wpestate_guest_no_buttons_title_labels,
label[for="guest_no"],
.guest_no_label {
    font-size: 0 !important;
}
.wpestate_guest_no_buttons_title_labels::before,
label[for="guest_no"]::before {
    content: "Quantité souhaitée";
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #293d1c;
}

.booking_details_price_line .pernight,
.total_booking_section .pernight {
    font-size: 0 !important;
}
.booking_details_price_line .pernight::after,
.total_booking_section .pernight::after {
    content: " /jour";
    font-size: 13px;
}

/* ================================================
   DEVISE DT
   ================================================ */
.woocommerce-Price-currencySymbol {
    font-weight: normal;
}

/* ================================================
   PANIER — Améliorations Campy Yallaa
   ================================================ */

.campy-cart-qty {
    display: inline-block;
    background: #f0faf0;
    border: 1px solid #54af48;
    color: #293d1c;
    border-radius: 20px;
    padding: 4px 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

small.campy-unit-label {
    display: block;
    color: #888;
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    font-family: 'Montserrat', sans-serif;
}

small.campy-deposit-label {
    display: block;
    color: #e76f51;
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
    font-family: 'Montserrat', sans-serif;
}

.campy-btn-more {
    background: #ffffff !important;
    color: #293d1c !important;
    border: 2px solid #54af48 !important;
    border-radius: 33px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 10px 22px !important;
    margin-right: 10px !important;
    transition: background 0.2s, color 0.2s !important;
    text-decoration: none !important;
}
.campy-btn-more:hover {
    background: #f0faf0 !important;
    color: #54af48 !important;
}

.campy-incart-info {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    margin-top: 3px;
}

/* ================================================
   COUNTDOWN PANIER (30 minutes)
   ================================================ */
#campy-cart-countdown {
    background: linear-gradient(90deg, #293d1c, #3d5a2a);
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 22px;
    margin: 0 0 20px;
    font-family: 'Montserrat', sans-serif;
}
.campy-countdown-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.campy-countdown-icon { font-size: 20px; }
.campy-countdown-inner strong {
    font-size: 20px;
    color: #54af48;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.campy-countdown-sub {
    display: block;
    width: 100%;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 3px;
}

/* ================================================
   STOCK BADGE — animation pulse
   ================================================ */
@keyframes campyPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}
.campy-stock-badge.low-stock {
    animation: campyPulse 1.5s infinite;
}

/* ================================================
   RÉCAP — Transitions dynamiques
   ================================================ */

@keyframes campyFlash {
    0%   { background-color: transparent; }
    30%  { background-color: rgba(84,175,72,.15); }
    100% { background-color: transparent; }
}
@keyframes campySlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.campy-recap-row {
    animation: campySlideIn 0.18s ease-out;
    transition: background-color 0.25s ease;
}

.campy-recap-total .rt-val {
    display: inline-block;
    transition: transform 0.15s ease, color 0.2s ease;
}
.campy-recap-total .rt-val.campy-bump {
    transform: scale(1.12);
    color: #54af48;
}

.campy-recap-row[style*="color:#54af48"] {
    animation: campyFlash 0.4s ease;
}

.campy-recap.updating .campy-recap-total .rt-val {
    opacity: 0.6;
}

.cost_row_extra input[type="checkbox"] {
    cursor: pointer;
    transition: box-shadow 0.15s;
    accent-color: #54af48;
}
.cost_row_extra input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(84,175,72,.35);
    outline: none;
}
.cost_row_extra {
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding: 2px 4px;
}
.cost_row_extra:has(input:checked) {
    background-color: rgba(84,175,72,.08);
}

/* ================================================
   MOBILE BOOKING
   ================================================ */
@media (max-width: 767px) {

    .campy-date-summary {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 10px 12px;
    }
    .campy-date-summary .cds-nights {
        align-self: center;
    }

    .campy-recap { margin: 8px 0 10px; }
    .campy-recap-header { padding: 7px 12px; font-size: 10px; }
    .campy-recap-body { padding: 2px 0; }
    .campy-recap-row { padding: 7px 12px; font-size: 12px; }
    .campy-recap-total { padding: 11px 12px; }
    .campy-recap-total .rt-label { font-size: 12px; }
    .campy-recap-total .rt-val { font-size: 18px; }

    .campy-qty-stepper { border-radius: 12px; }
    .campy-qty-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .campy-qty-value { font-size: 14px; }
    .campy-qty-stepper label { font-size: 11px; padding: 0 8px; }

    #submit_booking_front_instant,
    #submit_booking_front {
        font-size: 13px !important;
        padding: 14px 16px !important;
    }

    .campy-stock-badge {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

    #instant_booking_modal .modal-dialog {
        margin: 8px auto;
        max-width: calc(100vw - 16px);
    }
    .campy-booking-card { padding: 14px 16px; }
    .campy-popup-actions { flex-direction: column; }
    .campy-btn-continue,
    .campy-btn-checkout {
        min-width: unset;
        padding: 13px 12px;
        font-size: 13px;
    }
    .cbc-recap-total .rt-val { font-size: 18px; }

    #campy-cart-toast {
        bottom: auto;
        top: 16px;
        font-size: 13px;
        padding: 12px 20px;
        white-space: normal;
        text-align: center;
        max-width: 90vw;
    }
    #campy-cart-toast.show {
        transform: translateX(-50%) translateY(0) !important;
    }

    #campy-cart-countdown { padding: 10px 14px; }
    .campy-countdown-inner { gap: 6px; }
    .campy-countdown-inner strong { font-size: 16px; }
}

@media (max-width: 380px) {
    .campy-qty-stepper { gap: 0; }
    .campy-recap-total .rt-val { font-size: 16px; }
}

/* ================================================
   FILTRES CATALOGUE — Barre de disponibilité
   ================================================ */
.campy-filter-bar {
    background: #293d1c;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.campy-filter-bar .cfb-label {
    color: rgba(255,255,255,.8);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.campy-filter-bar input[type="text"] {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    padding: 8px 12px;
    flex: 1;
    min-width: 130px;
    cursor: pointer;
}
.campy-filter-bar input::placeholder { color: rgba(255,255,255,.5); }
.campy-filter-btn {
    background: #54af48;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 20px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.campy-filter-btn:hover { background: #3d8c33; }
.campy-filter-reset {
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}
.campy-filter-reset:hover { border-color: rgba(255,255,255,.6); color: #fff; }
.campy-filter-count {
    color: rgba(255,255,255,.6);
    font-size: 11px;
    font-style: italic;
    margin-left: auto;
}
.listing_wrapper.campy-hidden { display: none !important; }
.campy-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-family: 'Montserrat', sans-serif;
    display: none;
}
.campy-no-results .cnr-icon { font-size: 48px; margin-bottom: 10px; }
.campy-no-results .cnr-title { font-size: 16px; font-weight: 700; color: #293d1c; }

@media (max-width: 767px) {
    .campy-filter-bar { padding: 12px 14px; gap: 8px; }
    .campy-filter-bar input { min-width: 110px; }
    .campy-filter-count { display: none; }
}

/* ================================================
   ANNULATION CLIENT — Badge et bouton
   ================================================ */
.campy-cancel-btn {
    background: #fff;
    border: 1px solid #e63946;
    color: #e63946;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.campy-cancel-btn:hover { background: #e63946; color: #fff; }
.campy-deposit-badge {
    display: inline-block;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}
.campy-deposit-badge.returned { background: #e8f5e5; color: #54af48; border: 1px solid #54af48; }
.campy-deposit-badge.pending  { background: #fff8f0; color: #e76f51; border: 1px solid #e76f51; }

/* ================================================
   WAITLIST — Formulaire liste d'attente
   ================================================ */
.campy-waitlist-box {
    background: linear-gradient(135deg, #fff8f0, #fff);
    border: 2px solid #e76f51;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 12px 0;
    font-family: 'Montserrat', sans-serif;
}
.campy-waitlist-box .cwb-title {
    color: #e76f51;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
}
.campy-waitlist-box input[type="email"] {
    width: 100%;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.campy-waitlist-submit {
    width: 100%;
    background: #e76f51;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 10px;
    cursor: pointer;
    transition: background .15s;
}
.campy-waitlist-submit:hover { background: #c05a40; }
.campy-waitlist-success { color: #54af48; font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
