/* SD Booking - Styles Frontend */

.sd-booking-form-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.sd-booking-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.sd-booking-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #22364B;
}

/* Styles Flatpickr personnalisés */
.flatpickr-day {
    color: #333333 !important;
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.flatpickr-day.flatpickr-available {
    background: #28a745 !important;
    color: #333333 !important;
    border-color: #28a745 !important;
    cursor: pointer !important;
}

.flatpickr-day.flatpickr-available:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
    transform: scale(1.05) !important;
}

.flatpickr-day.flatpickr-booked {
    background: #dc3545 !important;
    color: #333333 !important;
    border-color: #dc3545 !important;
    cursor: not-allowed !important;
}

.flatpickr-day.flatpickr-unavailable {
    background: #ffffff !important;
    color: #cccccc !important;
    border-color: #e1e8ed !important;
    cursor: not-allowed !important;
}

.flatpickr-day.flatpickr-disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.flatpickr-price {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    margin-top: 2px;
    color: #333333 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #22364B !important;
    border-color: #22364B !important;
    color: #ffffff !important;
}

.flatpickr-day.selected .flatpickr-price {
    color: #ffffff !important;
}

/* Animation fluide */
.flatpickr-calendar {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulaire */
.sd-booking-form {
    width: 100%;
}

.booking-dates-section {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.single-field {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #22364B;
    margin-bottom: 8px;
}

.help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.label-icon {
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    cursor: pointer;
}

.form-control:focus {
    outline: none;
    border-color: #22364B;
    box-shadow: 0 0 0 3px rgba(34, 54, 75, 0.1);
}

/* Calendrier hebdomadaire */
.weekly-calendar {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e1e8ed;
}

.weekly-calendar h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #22364B;
    text-align: center;
}

.calendar-instruction {
    text-align: center;
    margin: 0 0 20px 0;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #22364B;
}

#calendar-weeks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #e1e8ed;
    background: #ffffff;
    color: #333333;
    position: relative;
    padding: 8px 4px;
}

.calendar-day.available {
    background: #28a745;
    color: #333333;
    border-color: #28a745;
    cursor: pointer;
}

.calendar-day.available:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    background: #218838;
}

.calendar-day.unavailable {
    background: #ffffff;
    color: #999999;
    border-color: #e1e8ed;
    cursor: not-allowed;
}

.calendar-day.booked {
    background: #dc3545;
    color: #333333;
    border-color: #dc3545;
    cursor: not-allowed;
}

.calendar-day.selected-checkin,
.calendar-day.selected-checkout {
    background: #22364B !important;
    color: #ffffff !important;
    border-color: #22364B !important;
    box-shadow: 0 0 0 3px rgba(34, 54, 75, 0.3);
}

.calendar-day.selected-range {
    background: #bbd6f3 !important;
    border-color: #22364B !important;
}

.calendar-day.selected-checkin .day-number,
.calendar-day.selected-checkout .day-number,
.calendar-day.selected-checkin .day-price,
.calendar-day.selected-checkout .day-price {
    color: #ffffff !important;
}

.day-number {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.day-price {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    margin-top: 4px;
    color: #333333;
}

.day-month {
    font-size: 9px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.7;
    line-height: 1;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.legend-square {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.legend-square.available {
    background: #28a745;
}

.legend-square.unavailable {
    background: #ffffff;
    border: 2px solid #e1e8ed;
}

.legend-square.booked {
    background: #dc3545;
}

.legend-square.selected {
    background: #22364B;
}

/* Récapitulatif */
.booking-summary {
    margin: 30px 0;
    padding: 25px;
    background: #22364B;
    border-radius: 12px;
    color: #ffffff;
}

.booking-summary h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    text-align: center;
    color: #ffffff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-label {
    font-size: 15px;
    font-weight: 500;
}

.summary-value {
    font-size: 16px;
    font-weight: 600;
}

.summary-value.price {
    font-size: 20px;
    font-weight: 700;
}

.summary-row.deposit {
    background: rgba(255, 255, 255, 0.1);
    margin: 10px -10px;
    padding: 15px 10px;
    border-radius: 8px;
}

.summary-row.remaining {
    margin-top: 5px;
    opacity: 0.9;
}

.deposit-notice {
    margin: 20px 0 0 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.deposit-notice strong {
    font-size: 16px;
}

/* Bouton de réservation */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.button-reserve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    background: #22364B;
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 54, 75, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

.button-reserve:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 54, 75, 0.6);
    background: #2d4a63;
    color: #ffffff !important;
}

.button-reserve:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-icon {
    font-size: 22px;
    color: #ffffff !important;
}

.button-icon {
    font-size: 22px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .sd-booking-form-container {
        padding: 25px 20px;
    }
    
    .sd-booking-title {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calendar-week {
        gap: 4px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .day-month {
        font-size: 9px;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .booking-summary {
        padding: 20px;
    }
    
    .booking-summary h3 {
        font-size: 18px;
    }
    
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .button-reserve {
        width: 100%;
        padding: 16px 30px;
        font-size: 16px;
    }
}

/* Animation d'entrée */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weekly-calendar,
.booking-summary {
    animation: slideIn 0.4s ease-out;
}

