/**
 * Styles pour le calculateur de prix Hotel Mandji
 */

.price-calculator {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(28, 61, 51, 0.1);
    padding: 30px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

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

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-title {
    color: #1c3d33;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.calculator-subtitle {
    color: #666;
    font-size: 16px;
}

/* Formulaire */
.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1c3d33;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group .required::after {
    content: ' *';
    color: #dc3545;
}

.calculator-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.calculator-field:focus {
    outline: none;
    border-color: #1c3d33;
    box-shadow: 0 0 0 3px rgba(28, 61, 51, 0.1);
}

.calculator-field:invalid {
    border-color: #dc3545;
}

/* Sélecteurs spéciaux */
.room-type-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Boutons */
.calculator-actions {
    text-align: center;
    margin: 30px 0;
}

.calculate-btn {
    background: linear-gradient(135deg, #1c3d33, #2d5a47);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.calculate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2d5a47, #1c3d33);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(28, 61, 51, 0.3);
}

.calculate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.calculate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.calculate-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Loader */
.calculator-loader {
    display: none;
    text-align: center;
    padding: 20px;
}

.loader-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1c3d33;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Résultats */
.calculation-results {
    display: none;
    background: linear-gradient(135deg, #f8fffe, #f0f7f4);
    border: 2px solid #e5ba7c;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    position: relative;
}

.calculation-results.fade-in {
    animation: fadeInUp 0.5s ease;
}

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

.calculation-summary h4 {
    color: #1c3d33;
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: bold;
}

.calculation-details {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total {
    border-top: 2px solid #1c3d33;
    margin-top: 15px;
    padding-top: 15px;
    font-size: 18px;
}

.detail-row.promotion {
    color: #28a745;
}

.detail-row.promotion .discount {
    color: #28a745;
    font-weight: 600;
}

.detail-row.additional {
    color: #007bff;
}

.detail-row.included {
    color: #6c757d;
    font-style: italic;
}

.detail-row.conversion {
    color: #6c757d;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
    padding-top: 10px;
}

.final-price {
    color: #1c3d33;
    font-size: 20px;
    font-weight: bold;
}

.savings-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
}

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

.disclaimer {
    text-align: center;
    margin-top: 15px;
    font-style: italic;
    color: #6c757d;
}

/* Erreurs */
.calculation-error {
    display: none;
    margin-top: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .price-calculator {
        padding: 20px;
        margin: 10px;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calculator-title {
        font-size: 24px;
    }
    
    .calculate-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .calculation-details {
        padding: 15px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-row span:last-child {
        align-self: flex-end;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .price-calculator {
        padding: 15px;
        border-radius: 8px;
    }
    
    .calculator-title {
        font-size: 20px;
    }
    
    .calculator-subtitle {
        font-size: 14px;
    }
}

/* Effets supplémentaires */
.form-group:focus-within label {
    color: #1c3d33;
}

.calculator-field:focus + .field-icon {
    color: #1c3d33;
}

/* Animation pour les champs obligatoires */
.form-group.error .calculator-field {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Styles pour les dates */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.number-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Checkbox personnalisée */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #1c3d33;
    border-color: #1c3d33;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}