/* ===== COUPON STYLES ===== */

/* Section coupon principale */
.coupon-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.coupon-section:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.coupon-input-group .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-input-group .form-label i {
    color: #28a745;
}

/* Animation pour le coupon appliqué */
.applied-coupon {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Styles pour les groupes d'input */
.input-group .btn {
    border-left: none;
    transition: all 0.3s ease;
}

.input-group .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.input-group .form-control:focus + .btn {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* États de validation */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.8-.77-.8-.77-.8.77.8.77zm1.48-4.97L6.06 4.04l-.8.77-2.28-2.28-.8-.77zm0 0'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4m0-2.4L5.8 7'/%3e%3c/svg%3e");
}

/* ===== PRICE SUMMARY STYLES ===== */

.price-summary-with-coupon {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.price-breakdown .price-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 8px 0;
}

.price-item .label {
    font-weight: 500;
    color: #6c757d;
    flex: 1;
}

.price-item .value {
    text-align: right;
    flex: 0 0 auto;
}

/* Style spécial pour les réductions */
.price-item.discount {
    background: rgba(40, 167, 69, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 4px solid #28a745;
}

.price-item.discount .label {
    color: #28a745;
    font-weight: 600;
}

.price-item.discount .value {
    color: #28a745;
    font-weight: 600;
}

/* Style pour le total */
.price-item.total {
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
    margin-top: 15px;
    font-size: 1.1em;
}

.price-item.total .label {
    font-size: 1.1em;
    font-weight: 600;
    color: #495057;
}

.price-item.total .value {
    font-weight: 700;
}

/* Badge d'économies */
.savings-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 15px;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.savings-badge i {
    margin-right: 8px;
}

/* ===== BOOKING DETAILS STYLES ===== */

/* Informations d'économies dans les détails */
.savings-info {
    margin-top: 15px;
}

.savings-info .alert {
    border: none;
    border-radius: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left: 4px solid #28a745;
}

.savings-info .alert i {
    font-size: 1.2em;
    margin-right: 10px;
    color: #155724;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .coupon-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .price-breakdown .price-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .price-item .value {
        text-align: left;
    }
    
    .savings-badge {
        padding: 8px 12px;
        font-size: 0.8em;
    }
}

/* ===== ANIMATION UTILITIES ===== */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* ===== LOADING STATES ===== */

.coupon-loading {
    position: relative;
    overflow: hidden;
}

.coupon-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== ACCESSIBILITY ===== */

.coupon-section:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.price-item.discount {
    position: relative;
}

.price-item.discount::before {
    content: '💰';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .coupon-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .price-summary-with-coupon {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .price-item .label {
        color: #a0aec0;
    }
    
    .savings-info .alert {
        background: linear-gradient(135deg, #2f855a, #38a169);
        color: #f0fff4;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    .coupon-section {
        background: white !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .savings-badge {
        background: #28a745 !important;
        color: white !important;
    }
    
    .price-item.discount {
        background: #f8f9fa !important;
        border-left: 2px solid #28a745 !important;
    }
}