@charset "utf-8";
/* CSS Document */

.mp-form {
    margin: 20px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-form-group {
    margin-bottom: 20px;
}

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

.mp-form-group input {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mp-form-group input:focus {
    border-color: #6772e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(103, 114, 229, 0.1);
}

.mp-form-row {
    display: flex;
    gap: 15px;
}
.mp-form-row .mp-form-group {
    flex: 1;
}
.mp-separator {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}
@media (max-width: 480px) {
    .mp-form-row { flex-direction: column; gap: 0; }
}

/* Gestion des erreurs */
.mp-form-group.has-error input {
    border-color: #eb1c26;
    background-color: #fff9f9;
}

.error-msg {
    display: none;
    color: #eb1c26;
    font-size: 12px;
    margin-top: 5px;
}

.has-error .error-msg {
    display: block;
}

#mp-submit-btn {
    width: 100%;
    background-color: #6772e5;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#mp-submit-btn:hover {
    background-color: #5469d4;
}

#mp-submit-btn:disabled {
    background-color: #aab7c4;
    cursor: not-allowed;
}

#mp-form-response {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

#mp-form-response.error {
    background-color: #fde8e8;
    color: #c81e1e;
}


/* Container principal */
.mp-payment-container {
    max-width: 900px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

/* Header */
.mp-payment-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.mp-payment-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.mp-payment-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Sections du formulaire */
.mp-form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.mp-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

/* Rows - système de grille responsive */
.mp-form-row {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.mp-form-row:last-child {
    margin-bottom: 0;
}

/* 2 colonnes sur desktop */
.mp-form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 colonnes pour code postal/ville/pays */
.mp-form-row-3 {
    grid-template-columns: 1fr 2fr 1.5fr;
}

/* Mobile : tout en 1 colonne */
@media (max-width: 768px) {
    .mp-form-row-2,
    .mp-form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .mp-payment-container {
        padding: 1.5rem;
    }
}

/* Groupes de champs */
.mp-form-group {
    display: flex;
    flex-direction: column;
}

.mp-form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
    display: block;
}

.mp-form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.mp-form-group input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.mp-form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.mp-form-group input:valid {
    border-color: #27ae60;
}

.mp-form-group input::placeholder {
    color: #bdc3c7;
}

/* Groupe montant avec mise en évidence */
.mp-form-group-highlight {
    position: relative;
}

.mp-amount-wrapper {
    position: relative;
}

.mp-amount-wrapper input {
    padding-right: 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.mp-currency {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: #FF6B35;
}

/* Message d'erreur */
.mp-error-message {
    background: #fee;
    border: 2px solid #e74c3c;
    color: #c0392b;
    padding: 1rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    font-weight: 500;
}

/* Actions du formulaire */
.mp-form-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Bouton principal */
.mp-submit-button {
    width: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C61 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.mp-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

.mp-submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mp-button-icon {
    font-size: 1.2rem;
}

.mp-button-loader {
    animation: spin 1s linear infinite;
}

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

/* Note de sécurité */
.mp-security-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mp-lock-icon {
    font-size: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mp-form-section {
    animation: fadeIn 0.5s ease-out;
}

.mp-form-section:nth-child(1) { animation-delay: 0.1s; }
.mp-form-section:nth-child(2) { animation-delay: 0.2s; }
.mp-form-section:nth-child(3) { animation-delay: 0.3s; }

/* Responsive supplémentaire */
@media (max-width: 480px) {
    .mp-payment-title {
        font-size: 1.4rem;
    }
    
    .mp-submit-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .mp-form-group input {
        padding: 0.75rem;
    }
}

/* États du formulaire */
.mp-form.submitting .mp-submit-button {
    pointer-events: none;
    opacity: 0.7;
}

.mp-form.submitting .mp-button-text {
    display: none;
}

.mp-form.submitting .mp-button-loader {
    display: inline !important;
}

/* Indicateurs de validation visuels */
.mp-form-group input:valid:not(:focus):not(:placeholder-shown) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2327ae60' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.mp-form-group input:invalid:not(:focus):not(:placeholder-shown) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e74c3c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}
