/* Styles pour le formulaire de recherche sur la page d'accueil */
.booking-search-widget {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.booking-search-title {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 700;
}

.booking-search-form {
    display: grid;
    gap: 15px;
}

.booking-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.booking-form-group {
    display: flex;
    flex-direction: column;
}

.booking-form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.booking-form-group label i {
    color: var(--primary, #d62828);
}

.booking-form-group input,
.booking-form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.booking-form-group input:focus,
.booking-form-group select:focus {
    outline: none;
    border-color: var(--primary, #d62828);
    box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.1);
}

.booking-search-btn {
    padding: 15px 40px;
    background: var(--primary, #d62828);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-search-btn:hover {
    background: #b52020;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 40, 40, 0.3);
}

.booking-search-btn:active {
    transform: translateY(0);
}

/* Badge de disponibilité sur les cartes de véhicules */
.availability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.availability-badge.available {
    background: #28a745;
    color: #fff;
}

.availability-badge.unavailable {
    background: #dc3545;
    color: #fff;
}

/* Message de filtre de dates actif */
.date-filter-active {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.date-filter-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-filter-info i {
    color: #2196f3;
    font-size: 20px;
}

.date-filter-text {
    color: #1976d2;
    font-weight: 600;
}

.date-filter-dates {
    color: #555;
    font-size: 14px;
}

.clear-dates-btn {
    padding: 8px 16px;
    background: #fff;
    color: #2196f3;
    border: 2px solid #2196f3;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-dates-btn:hover {
    background: #2196f3;
    color: #fff;
}

/* Amélioration du modal de réservation */
#modalBackdrop {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-box {
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message de confirmation de réservation */
.booking-confirmation {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #155724;
    text-align: center;
}

.booking-confirmation h3 {
    margin: 0 0 10px 0;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.booking-confirmation p {
    margin: 10px 0;
    line-height: 1.6;
}

.booking-confirmation .booking-id {
    font-weight: 700;
    font-size: 18px;
    color: #0d3e10;
}

/* Message d'erreur */
.booking-error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #721c24;
    text-align: center;
}

.booking-error h3 {
    margin: 0 0 10px 0;
    color: #721c24;
}

/* Loading spinner */
.booking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.booking-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary, #d62828);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .booking-search-widget {
        padding: 20px;
    }
    
    .booking-form-row {
        grid-template-columns: 1fr;
    }
    
    .date-filter-active {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .clear-dates-btn {
        width: 100%;
    }
}

/* Amélioration visuelle des dates dans le formulaire */
input[type="date"] {
    position: relative;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

input[type="date"]:focus::-webkit-calendar-picker-indicator {
    filter: invert(0.3);
}

/* Style pour les véhicules non disponibles (grisés) */
.vehicle-card.unavailable {
    opacity: 0.6;
    position: relative;
}

.vehicle-card.unavailable::after {
    content: 'Non disponible';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    z-index: 100;
}

.vehicle-card.unavailable .reserve-btn {
    background: #ccc;
    cursor: not-allowed;
}

.vehicle-card.unavailable .reserve-btn:hover {
    background: #ccc;
    transform: none;
}
