/* =====================
   POPUP RÉSERVATION
   ===================== */

/* Overlay */
.vbs-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height:  100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* État ouvert */
.vbs-popup-overlay.vbs-popup-open {
    opacity: 1;
    visibility: visible;
}

/* Animation du container */
.vbs-popup-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    
    /* Animation d'entrée */
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.vbs-popup-overlay.vbs-popup-open . vbs-popup-container {
    transform: translateY(0);
}

@keyframes vbsPopupSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform:  translateY(0);
        opacity: 1;
    }
}

/* Header */
.vbs-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom:  2px solid #f0f0f0;
    background: #383F37;
    
    /* Fixé en haut de la popup */
    position: sticky;
    top: 0;
    z-index: 1000;
    
    /* Éviter que le contenu passe derrière */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.vbs-popup-header h2 {
    font-size:  24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

button.vbs-popup-close {
    background: transparent;
    border: 2px solid #383F37 !important;
    color: #fff !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.vbs-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Steps indicator */
.vbs-popup-steps {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 30px;
    background: #EFEBE2;
    border-bottom: 1px solid #e0e0e0;
}

.vbs-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #e1dbcd;
    border-radius: 8px;
    transition: all 0.3s;
}

.vbs-step.active {
    background: #A77432;
}

.vbs-step.completed {
    background: #383F37;
}

.vbs-step-number {
    width: 30px;
    height: 30px;
    border-radius:  50%;
    background: #383F37;
    color: #EFEBE2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.vbs-step.active .vbs-step-number {
    background: #fff;
    color: #D69643;
}

.vbs-step.completed .vbs-step-number {
    background: #fff;
    color: #28a745;
}

.vbs-step-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.vbs-step.active .vbs-step-label {
    color: #fff;
}

.vbs-step.completed .vbs-step-label {
    color: #fff;
}

/* Content */
.vbs-popup-content {
    padding: 30px;
}

.vbs-popup-step-content {
    display: none;
}

.vbs-popup-step-content h3 {
    margin:  0 0 10px;
    font-size: 13px;
    color: #333;
}

.vbs-instruction {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom:  20px;
}

/* =====================
   CALENDRIER
   ===================== */

.vbs-popup-calendar-wrapper {
    position: relative;
    margin: 20px 0;
}

.vbs-popup-calendar-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: -38px;
}

.vbs-popup-calendar-nav button {
    background: #f0f0f0;
    border: none;
    width: 44px;
    height: 44px;
    border-radius:  50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.vbs-popup-calendar-nav button svg {
    width: 24px;
    height: 24px;
}

.vbs-popup-calendar-nav button: hover: not(:disabled) {
    background: #D69643;
    color: white;
}

.vbs-popup-calendar-nav button:hover:not(:disabled) svg {
    color: white;
}

.vbs-popup-calendar-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.vbs-popup-calendar-header {
    text-align: center;
    margin-bottom: 20px;
}

.vbs-popup-calendar-header h4 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

/* Calendar grid */
.vbs-calendar-weekdays {
    display: grid;
    grid-template-columns:  repeat(7, 1fr);
    gap: 5px;
    margin-bottom:  10px;
}

.vbs-weekday {
    text-align:  center;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    padding: 10px 5px;
    text-transform: uppercase;
}

.vbs-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.vbs-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.vbs-calendar-day.vbs-empty {
    visibility: hidden;
}

.vbs-calendar-day.vbs-past {
    color: #ccc;
    cursor: not-allowed;
    background: #fafafa;
}

.vbs-calendar-day.vbs-occupied {
    background: #ffebee;
    color: #c62828;
    cursor:  not-allowed;
    text-decoration: line-through;
}

.vbs-calendar-day.vbs-available {
    background: #e8f5e9;
    color: #2e7d32;
}

.vbs-calendar-day.vbs-available:hover {
    background: #D69643;
    color: white;
    transform: scale(1.1);
}

.vbs-calendar-day.vbs-checkin,
.vbs-calendar-day.vbs-checkout {
    background: #383F37;
    color: white;
    font-weight: 700;
}

.vbs-calendar-day.vbs-in-range {
    background: #EFEBE2;
    color: #383F37;
}

.vbs-calendar-day.vbs-checkin::before {
    content: 'IN';
    position: absolute;
    top:  2px;
    right:  2px;
    font-size: 8px;
    font-weight: 700;
}

.vbs-calendar-day.vbs-checkout::before {
    content: 'OUT';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    font-weight: 700;
}

/* =====================
   RÉSUMÉ DES DATES
   ===================== */

.vbs-popup-dates-summary {
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin:  30px 0 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.vbs-date-box {
    text-align:  center;
}

.vbs-date-box label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.vbs-date-box span {
    display:  block;
    font-size:  16px;
    color:  #333;
    font-weight: 700;
}

/* =====================
   GUESTS SELECTOR
   ===================== */

.vbs-popup-guests-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 20px 0 30px;
}

.vbs-guests-btn {
    width: 50px;
    height: 50px;
    border-radius:  50%;
    border: 2px solid #383F37;
    background: white;
    color: #383F37;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition:  all 0.3s;
}

.vbs-guests-btn:hover {
    background:  #D69643;
    border-color: #D69643;
    color: white;
}

.vbs-guests-count {
    font-size: 36px;
    font-weight:  700;
    color: #333;
    min-width: 80px;
    text-align: center;
}

.vbs-guests-note {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* =====================
   SUMMARY
   ===================== */

.vbs-popup-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.vbs-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.vbs-summary-row:last-child {
    border-bottom: none;
}

.vbs-summary-row span {
    color: #666;
    font-size: 16px;
}

.vbs-summary-row strong {
    color: #333;
    font-size: 18px;
}

/* =====================
   BUTTONS
   ===================== */

.vbs-popup-btn {
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight:  700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.vbs-btn-next,
.vbs-btn-confirm {
    background: #383F37;
    color: #fff;
}

.vbs-btn-next:hover: not(:disabled),
.vbs-btn-confirm:hover {
    background: #D69643;
}

.vbs-btn-next:disabled {
    background: #fff;
    border: 2px solid #383F37;
    color: #383F37;
    cursor: not-allowed;
}

.vbs-btn-back {
    background: #f0f0f0;
    color: #333;
}

.vbs-btn-back:hover {
    background: #e0e0e0;
}

.vbs-popup-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 768px) {
    .vbs-popup-overlay {
        padding: 0 !important;
    }
    
    .vbs-popup-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .vbs-popup-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .vbs-step-label {
        font-size:  12px;
    }
    
    .vbs-popup-dates-summary {
        /* grid-template-columns: 1fr; */
    }
    
    .vbs-popup-buttons {grid-template-columns: 1fr;}
    .vbs-popup-header {padding: 20px;}
    .vbs-popup-content {padding: 30px;padding-top: 4px;}
    .vbs-date-box span {font-size: 14px;}
    .vbs-popup-step-content h3 {display:none;}
    .vbs-popup-guests-wrapper {display:flex;padding:20px;}
    .vbs-popup-guests-wrapper label {line-height:20px;padding-top: 6px;}
    .vbs-guests-count {min-width: 60px;}
    .vbs-popup-guests-selector {margin: 0; margin-left: 20px;}
    .vbs-calendar-weekdays {margin-bottom: 0;}
    .vbs-popup-dates-summary {margin: 20px 0 20px;}
}

/* Empêcher le scroll du body */
body.vbs-popup-open {
    overflow: hidden ! important;
}

/* =====================
   VILLA CARDS (ÉTAPE 2)
   ===================== */

.vbs-popup-villas-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.vbs-popup-villa-card {
    background:  white;
    border:  2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vbs-popup-villa-card:hover {
    border-color: #383F37;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.vbs-popup-villa-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:  #f0f0f0;
}

.vbs-popup-villa-image img {
    width:  100%;
    height: 100%;
    object-fit:  cover;
    transition: transform 0.5s ease;
}

.vbs-popup-villa-card: hover .vbs-popup-villa-image img {
    transform: scale(1.1);
}

.vbs-card-sticker {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #383F37;
    padding: 8px 16px;
    border-radius:  20px;
    font-size:  12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.vbs-popup-villa-info {
    padding: 20px;
}

.vbs-popup-villa-title {
    font-size: 18px;
    font-weight:  700;
    margin:  0 0 8px;
    color: #333;
    line-height: 1.3;
}

.vbs-popup-villa-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

.vbs-popup-villa-location svg {
    flex-shrink: 0;
    color: #D69643;
}

.vbs-popup-villa-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.vbs-popup-villa-features span {
    font-size: 13px;
    color: #666;
    padding: 5px 10px;
    background: #EFEBE2;
    border-radius: 5px;
}

.vbs-popup-villa-price {
    font-size: 22px;
    font-weight:  700;
    color: #383F37;
    margin-top: 10px;
}

.vbs-popup-villa-price span {
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

/* Loading */
.vbs-popup-loading {
    text-align: center;
    padding: 60px 20px;
}

.vbs-popup-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #D69643;
    border-radius: 50%;
    animation:  vbsSpin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes vbsSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vbs-popup-loading p {
    color: #666;
    font-size: 16px;
}

/* No results */
.vbs-popup-no-results {
    text-align: center;
    padding:  60px 20px;
}

.vbs-popup-no-results h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.vbs-popup-no-results p {
    color: #666;
    margin-bottom: 20px;
}

/* =====================
   VILLA DETAIL (ÉTAPE 3)
   ===================== */

.vbs-popup-villa-detail {
    max-width: 100%;
}

.vbs-popup-detail-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    background: #f0f0f0;
}

.vbs-popup-detail-image img {
    width: 100%;
    height:  100%;
    object-fit: cover;
}

.vbs-popup-detail-header {
    margin-bottom: 20px;
}

.vbs-popup-detail-title {
    font-size: 28px;
    font-weight:  700;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.2;
}

.vbs-popup-detail-location {
    display: flex;
    align-items: center;
    gap:  6px;
    color: #666;
    font-size: 15px;
}

.vbs-popup-detail-location svg {
    color: #D69643;
}

.vbs-popup-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding:  20px 0;
    border-top: 2px solid #EFEBE2;
    border-bottom: 2px solid #EFEBE2;
    margin-bottom: 25px;
}

.vbs-popup-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.vbs-popup-detail-meta-item svg {
    color: #D69643;
    flex-shrink: 0;
}

.vbs-popup-detail-meta-item strong {
    color: #383F37;
    font-size: 18px;
    font-weight: 700;
}

.vbs-popup-detail-description {
    margin-bottom: 25px;
}

.vbs-popup-detail-description h4 {
    font-size: 18px;
    margin: 0 0 12px;
    color: #333;
    font-weight: 700;
}

.vbs-popup-detail-description p {
    color:  #666;
    line-height: 1.7;
    font-size: 15px;
}

.vbs-popup-detail-dates {
    background: #EFEBE2;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom:  25px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

.vbs-popup-detail-dates strong {
    color: #383F37;
    font-weight: 700;
}

.vbs-popup-detail-price {
    background: linear-gradient(135deg, #383F37 0%, #4a5248 100%);
    padding: 25px;
    border-radius:  12px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(56, 63, 55, 0.2);
}

.vbs-popup-detail-price-amount {
    font-size: 42px;
    font-weight:  700;
    color: #D69643;
    margin-bottom: 5px;
}

.vbs-popup-detail-price-label {
    font-size: 14px;
    color: #EFEBE2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .vbs-popup-villas-grid {
        grid-template-columns: 1fr;
    }
    
    .vbs-popup-villa-title {
        font-size: 16px;
    }
    
    .vbs-popup-villa-price {
        font-size: 18px;
    }
    
    .vbs-popup-detail-title {
        font-size: 22px;
    }
    
    .vbs-popup-detail-price-amount {
        font-size:  32px;
    }
    
    .vbs-popup-detail-meta {
        flex-direction: column;
        gap: 15px;
    }
}

#vbs-confirm-booking{
    width:100%;
    background: #383F37;
    color: #fff !important;
    padding: 20px;
    border-radius: 16px !important;
    
}

.vbs-popup-back-to-search, .vbs-btn-back {
        background: #fff !important;
    color: #333 !important;
    border-radius: 10px !important;
    border-color: #383F37 !important;
    padding: 10px !important;
    width: 100% !important;
    margin-bottom: 20px;
    font-weight: normal !important;
}