/**
 * Styles pour le calendrier de réservation WooCommerce
 */
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.selected, .flatpickr-day.endRange {
    background-color: #a17d44 !important;
}

/* Style pour les dates réservées (barrées) */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #ccc;
    background-color: #f8f8f8;
    border-color: #e6e6e6;
    cursor: not-allowed;
    position: relative;
}

/* Ligne barrant les dates réservées */
/*
.flatpickr-day.flatpickr-disabled:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: #ff5252;
    transform: rotate(0deg);
    z-index: 1;
}
*/
/* Ajouter un fond légèrement rouge pour indiquer l'indisponibilité */
.flatpickr-day.flatpickr-disabled {
    background-color: rgba(255, 82, 82, 0.1);
    border-color: #e6e6e6;
}

/* Style pour la légende "Réservé" */
.legend-color.reserved {
    background-color: rgba(255, 82, 82, 0.1);
    position: relative;
    border: 1px solid #e6e6e6;
}

.legend-color.reserved:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 1px;
    background-color: #ff5252;
    transform: rotate(0deg);
}

/* Style pour le message de durée minimale de séjour */
.minimum-stay-notice {
    background-color: #f8f4e5;
    border-left: 3px solid #a17d44;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    border-radius: 3px;
}
.wc-reservation-calendar {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* En-tête */
.reservation-header {
    text-align: center;
    margin-bottom: 20px;
}

.reservation-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Champs de date */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.date-field {
    position: relative;
}

.date-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.date-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #f9f9f9;
    cursor: pointer;
    box-sizing: border-box;
}

.date-field input:focus {
    outline: none;
    border-color: #a17d44;
    box-shadow: 0 0 0 2px rgba(161, 125, 68, 0.2);
}

/* Calendrier */
.calendar-container {
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.calendar-nav button {
    background: #a17d44;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.calendar-nav button:hover {
    background: #8b6835;
}

.calendar-nav button:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

#current-month {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 5px;
}

.weekday {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    border: 1px solid #eee;
}

.day {
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day.empty {
    cursor: default;
    background: #fafafa;
}

.day.available {
    background: white;
    color: #333;
}

.day.available:hover {
    background: #f0f8ff;
}

.day.unavailable {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    position: relative;
}

.day.unavailable::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: #ccc;
}

.day.past {
    background: #f9f9f9;
    color: #bbb;
}

.day.selected {
    background: #a17d44 !important;
    color: white !important;
    font-weight: bold;
}

.day.in-range {
    background: rgba(161, 125, 68, 0.2) !important;
    color: #333 !important;
}

/* Section invités */
.guests-section {
    margin-bottom: 20px;
}

.guest-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-controls button {
    background: #f5f5f5;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    transition: background-color 0.2s;
}

.quantity-controls button:hover {
    background: #e0e0e0;
}

.quantity-controls input {
    border: none;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    width: 60px;
    background: white;
}

.quantity-controls input:focus {
    outline: none;
}

/* Styles pour le résumé de réservation */
.reservation-summary {
    margin-top: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
}

/* Styles pour la notification de réservation existante */
.booking-notification {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.booking-notification.has-bookings {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.booking-notification.no-bookings {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.summary-dates {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.summary-guests {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.summary-price {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.price-breakdown {
    margin-bottom: 10px;
}

.price-breakdown > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.total-price {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* Bouton de réservation */
.reserve-button {
    width: 100%;
    padding: 15px;
    background: #a17d44;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 15px;
}

.reserve-button:hover {
    background: #8b6835;
}

.reserve-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-reservation-calendar {
        margin: 15px 0;
        padding: 15px;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .guests-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .day {
        padding: 8px 4px;
        font-size: 12px;
        min-height: 35px;
    }
    
    .calendar-nav {
        padding: 0;
    }
    
    #current-month {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wc-reservation-calendar {
        margin: 10px 0;
        padding: 10px;
    }
    
    .day {
        padding: 6px 2px;
        font-size: 11px;
        min-height: 30px;
    }
    
    .weekday {
        padding: 6px;
        font-size: 11px;
    }
}

/* États de chargement */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #a17d44;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Masquer le bouton add to cart standard */
.single_add_to_cart_button {
    display: none !important;
}

/* Amélioration de l'accessibilité */
.day:focus {
    outline: 2px solid #a17d44;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #a17d44;
    outline-offset: 2px;
}