/* CHECKOUT PAGE STYLES */

.checkout-page {
    padding: 40px 0 80px;
    min-height: 80vh;
    background: radial-gradient(circle at 80% 20%, rgba(1, 97, 187, 0.03), transparent),
        radial-gradient(circle at 20% 80%, rgba(1, 97, 187, 0.03), transparent);
    background-color: #fff;
    position: relative;
    overflow: hidden;
    animation: bgPulse 15s ease-in-out infinite alternate;
}

/* Fix gap before footer */
.checkout-page+footer,
footer {
    margin-top: 0 !important;
}

@keyframes bgPulse {
    0% {
        background-position: 0% 0%, 0% 0%;
    }

    100% {
        background-position: 10% 10%, -10% -10%;
    }
}

/* Override Global Header Effects for Checkout */
.is-client-app header:hover~* {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.is-client-app header::after {
    display: none !important;
}

.checkout-header {
    text-align: center;
    margin-bottom: 50px;
}

.checkout-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.checkout-header h1 .material-symbols-outlined {
    font-size: 3rem;
    color: #0161bb;
}

/* Steps Indicator */
.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.checkout-steps .step {
    background: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    border: 2px solid #e5e7eb;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.checkout-steps .step.active {
    color: #0161bb;
    border-color: #0161bb;
    box-shadow: 0 4px 12px rgba(1, 97, 187, 0.15);
}

/* Split Auth Layout */
.checkout-auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.auth-box {
    background: #fff;
    border-radius: 24px;
    border: 1px solid #eee;
    padding: 25px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.login-box-card {
    border-top: 2px solid #0161bb;
    border-bottom: 2px solid #0161bb;
}

.guest-box-card {
    background-color: #fdfdfe;
    border-top: 2px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
}

.auth-box h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #111;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Guest Form specific layout */
#checkoutGuestForm {
    max-width: 650px;
    margin: 40px auto;
    background: #fff;
    padding: 35px 45px;
    border-radius: 24px;
    border: 1px solid #eee;
    border-top: 2px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

#checkoutGuestForm h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.guest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.guest-form-header {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    justify-content: center;
}

.btn-back {
    position: absolute;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back .material-symbols-outlined {
    font-size: 16px;
}

.btn-back:hover {
    background: #fff;
    color: #0161bb;
    border-color: #0161bb;
    transform: translateX(-3px);
}

/* Login Box */
/* Login Box Balance */
.checkout-form {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auth-inner-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.auth-footer-actions {
    margin-top: 15px;
}

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

.checkout-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #9ca3af;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.checkout-form label .material-symbols-outlined {
    font-size: 16px !important;
}

.checkout-form input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #f9fafb;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.checkout-form input:focus {
    outline: none;
    border-color: #0161bb;
    background: #fff;
    box-shadow: 0 4px 15px rgba(1, 97, 187, 0.05);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
}

.btn-checkout-submit,
.btn-create-account,
.btn-guest-continue {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    display: block;
    box-sizing: border-box;
}

.btn-checkout-submit {
    background: #0161bb;
    color: #fff;
    padding: 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-checkout-submit:hover {
    background: #014a8e;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(1, 97, 187, 0.2);
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #6b7280;
    text-decoration: none;
}

/* Guest Box */
.perks-list {
    margin-bottom: 5px;
    text-align: center;
}

.perks-list p {
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    font-size: 15px;
}

.perks-list ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.perks-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.4;
    font-weight: 400;
}

.perks-list li .material-symbols-outlined {
    font-size: 1.3rem;
    color: #0161bb;
    flex-shrink: 0;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-create-account {
    background: #1a1a1a;
    color: #fff;
}

.btn-create-account:hover {
    opacity: 0.9;
}

.separator-or {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 700;
}

.separator-or::before,
.separator-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-guest-continue {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1a1a1a;
}

.btn-guest-continue:hover {
    background: #f9fafb;
}

/* ÉTAPE 2 : RÉCAPITULATIF */
.order-summary-box {
    margin-top: 40px;
}

.summary-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.summary-items {
    background: #fff;
    padding: 35px 45px;
    border-radius: 24px;
    border: 1px solid #eee;
    border-top: 2px solid #0161bb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.summary-items h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #111;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
}

.summary-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-qty {
    font-weight: 800;
    color: #0161bb;
}

.item-title {
    font-weight: 600;
    color: #1a1a1a;
}

.item-price {
    font-weight: 600;
    color: #1a1a1a;
}

/* Sidebar Total Card */
.total-card {
    background: #1a1a1a;
    color: #fff;
    padding: 35px;
    border-radius: 24px;
    position: sticky;
    top: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.95rem;
    opacity: 0.7;
}

.total-row.main {
    font-size: 1.4rem;
    font-weight: 800;
    opacity: 1;
    display: flex;
    justify-content: center;
    text-align: center;
}

.vat-notice {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 30px;
    font-style: italic;
    opacity: 0.8;
}

.btn-confirm-final {
    width: 100%;
    padding: 18px;
    background: #0161bb;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    font-family: 'Sora', sans-serif;
}

.btn-confirm-final:hover {
    background: #014a8e;
    transform: translateY(-2px);
}

.btn-confirm-final:active {
    transform: translateY(0);
}

.btn-confirm-final:focus {
    outline: none;
}

.loading-state {
    text-align: center;
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success State - Premium Glassmorphism */
.success-state-box {
    text-align: center;
    padding: 0;
    background: transparent;
    border-radius: 32px;
}

.success-glass-panel {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 60px 40px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 
        0 20px 40px -4px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(1, 97, 187, 0.05); /* Lueur bleue interne subtile */
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.success-icon-wrapper {
    margin-bottom: 25px;
}

.success-icon-wrapper .material-symbols-outlined {
    font-size: 84px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
}

.icon-pulse {
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.6)); }
}

.success-state-box h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.success-intro {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Badge Commande Signature RE-LAB */
.order-badge-container {
    background: rgba(1, 97, 187, 0.1);
    border: 1px solid rgba(1, 97, 187, 0.2);
    padding: 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 40px;
}

.order-badge-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #0161bb;
    font-weight: 800;
    margin-bottom: 8px;
}

.order-badge-value {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.order-badge-value strong {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.accolade-left, .accolade-right {
    color: #0161bb;
    font-weight: 400;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.8;
}

.success-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.success-actions .btn-main-contact {
    min-width: 200px;
}

.success-actions .btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-actions .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 900px) {

    .checkout-auth-split,
    .summary-layout {
        grid-template-columns: 1fr;
    }

    .summary-sidebar {
        order: -1;
    }

    .auth-box {
        padding: 25px;
    }

    #headline {
        font-size: 2.5rem;
    }
}