/**
 * Widget de réservation intégré pour Hotel Mandji
 */

/* Widget principal */
.booking-widget {
    background: linear-gradient(135deg, #1c3d33, #2d5a47);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(28, 61, 51, 0.3);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.booking-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e5ba7c, #f4d03f);
}

.booking-widget-title {
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.booking-widget-subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Formulaire */
.booking-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.booking-field {
    position: relative;
}

.booking-field label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.booking-input:focus {
    outline: none;
    border-color: #e5ba7c;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(229, 186, 124, 0.2);
}

.booking-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Select custom */
.booking-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3e%3cpath d='M8 11L3 6h10l-5 5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
}

/* Date inputs */
.booking-input[type="date"] {
    color-scheme: dark;
}

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

/* Number inputs */
.booking-input[type="number"] {
    text-align: center;
}

/* Bouton de recherche */
.booking-submit {
    background: linear-gradient(135deg, #e5ba7c, #f4d03f);
    color: #1c3d33;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.booking-submit:hover {
    background: linear-gradient(135deg, #f4d03f, #e5ba7c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 186, 124, 0.4);
}

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

.booking-submit i {
    font-size: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .booking-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .booking-widget {
        padding: 20px;
        margin: 15px 0;
    }
    
    .booking-widget-title {
        font-size: 20px;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .booking-form {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .booking-field:nth-child(n+3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .booking-widget {
        padding: 15px;
        border-radius: 8px;
    }
    
    .booking-input {
        padding: 10px 12px;
    }
    
    .booking-submit {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* États de chargement */
.booking-submit.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.booking-submit .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(28, 61, 51, 0.3);
    border-radius: 50%;
    border-top-color: #1c3d33;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Validation des champs */
.booking-input.error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.booking-field .error-message {
    color: #ff6b6b;
    font-size: 11px;
    margin-top: 4px;
    display: none;
}

.booking-field.has-error .error-message {
    display: block;
}

/* Suggestions de dates */
.date-suggestions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.date-suggestion {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.date-suggestion:hover {
    background: rgba(229, 186, 124, 0.2);
    color: white;
    border-color: #e5ba7c;
}

/* Animation d'apparition */
.booking-widget {
    animation: slideInUp 0.5s ease-out;
}

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

/* Variantes de couleur */
.booking-widget.compact {
    padding: 15px 20px;
}

.booking-widget.compact .booking-widget-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.booking-widget.light {
    background: rgba(255, 255, 255, 0.95);
    color: #1c3d33;
    backdrop-filter: blur(10px);
}

.booking-widget.light .booking-input {
    background: rgba(28, 61, 51, 0.05);
    border-color: rgba(28, 61, 51, 0.2);
    color: #1c3d33;
}

.booking-widget.light .booking-input::placeholder {
    color: rgba(28, 61, 51, 0.6);
}

.booking-widget.light .booking-input:focus {
    border-color: #1c3d33;
    background: rgba(28, 61, 51, 0.1);
}

.booking-widget.light .booking-field label {
    color: #1c3d33;
}

.booking-widget.light .booking-widget-title {
    color: #1c3d33;
}

.booking-widget.light .booking-widget-subtitle {
    color: rgba(28, 61, 51, 0.8);
}

.booking-widget.light .booking-info {
    background: rgba(28, 61, 51, 0.1);
    border-color: rgba(28, 61, 51, 0.3);
    color: #1c3d33;
}

/* Intégration dans les pages existantes */
.hero-booking-widget {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 10;
}

.section-booking-widget {
    margin: 40px 0;
    padding: 0 15px;
}

/* Messages d'information */
.booking-info {
    background: rgba(229, 186, 124, 0.1);
    border: 1px solid rgba(229, 186, 124, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 13px;
    text-align: center;
}

.booking-info i {
    margin-right: 6px;
    color: #e5ba7c;
}