/* Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #22c55e;
    --error: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.purchase-page {
    padding: 200px 0 180px;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.purchase-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.purchase-header {
    text-align: center;
    margin-bottom: 3rem;
}

.purchase-header h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 700;
}

.purchase-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Info Bubble améliorée */
.info-bubble {
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.info-bubble p {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.info-bubble p:last-child {
    margin-bottom: 0;
}

.info-bubble i {
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Conteneur principal */
.purchase-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    padding: 3rem;
    margin-bottom: 3rem;
}

/* Plan Selector */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.plan-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.plan-card.selected {
    border-color: var(--primary);
}

.plan-card.selected::before {
    opacity: 1;
}

.plan-card input[type="radio"] {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    opacity: 0;
}

.radio-circle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: white;
    pointer-events: none;
    transition: all 0.2s ease;
}

.plan-card.selected .radio-circle {
    border-color: var(--primary);
}

.plan-card.selected .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary);
    border-radius: 50%;
}

.plan-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.plan-price {
    margin: 1.5rem 0;
    position: relative;
}

.plan-price .price {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
}

.plan-price .period {
    color: var(--text-light);
}

.monthly {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-features p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 1rem;
}

.plan-features i {
    color: var(--success);
}

/* Form Container */
.purchase-form-container {
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label.error {
    color: var(--error);
}

.form-group label .error-icon {
    color: var(--error);
    font-size: 1rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.error {
    border-color: var(--error);
    background-color: #FEF2F2;
}

.form-group .error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--text);
    font-size: 0.95rem;
}

.checkbox-container input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
}

.checkbox-container a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

.purchase-options {
    text-align: center;
}

.purchase-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.purchase-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(59, 130, 246, 0.25);
}

.purchase-button i {
    font-size: 1.25rem;
}

.purchase-button .loader {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.purchase-button.loading .loader {
    display: block;
}

.purchase-button.loading .btn-text,
.purchase-button.loading i {
    display: none;
}

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

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.security-info img {
    height: 24px;
    width: auto;
}

.security-info p {
    color: var(--text);
    font-size: 0.95rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.security-info i {
    color: var(--success);
    font-size: 1.125rem;
}

.trial-notice {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
}

.order-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.order-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.price-details .price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price-details .price-row.total {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 10px;
    font-weight: bold;
}

.price-details .plan-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 500;
}

.trial-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

@media (max-width: 768px) {
    .purchase-page {
        padding-top: 160px;
    }

    .purchase-header h1 {
        font-size: 2rem;
    }

    .plan-selector {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .purchase-content {
        padding: 2rem;
    }

    .security-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}