:root {
    --primary: #2563eb;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative; /* Important pour le placement du bouton */
}

body.light {
    background: #f1f5f9;
    color: #1e293b;
}

body.dark {
    background: #121212;
    color: #eeeeee;
}

/* Positionnement en haut à gauche de l'écran */
.back-link-side {
    position: fixed; /* Reste fixe en haut à gauche même si on scroll */
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    z-index: 100;
}

body.dark .back-link-side {
    color: #9ecfff;
}

.payment-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

body.dark .payment-card {
    background: #1e1e1e;
    color: #eeeeee;
}

.order-summary h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #64748b;
    text-transform: uppercase;
}

body.dark .order-summary h3 {
    color: #94a3b8;
}

.product-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-security {
    font-size: 0.8rem;
    color: #94a3b8;
}

.product-name {
    font-weight: 500;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

body.dark hr {
    border-top: 1px solid #334155;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #475569;
}

body.dark label {
    color: #cbd5e1;
}

input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    box-sizing: border-box;
}

body.dark input {
    background: #2d2d2d;
    border: 1px solid #444;
    color: white;
}

.btn-pay {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: 0.4rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.success { background: var(--success-bg); color: var(--success-text); }
.error { background: var(--error-bg); color: var(--error-text); }