/* ============ CHECKOUT — PAIEMENT (step 4) ============
 * Lot 7 (2026-05-08) — feat/theme-v1
 * Step paiement : sélection moyen, info additionnelle, CGV, récap
 * final, place order.
 * Loaded at priority 69 (after shipping=68, before account=70).
 */

/* ---------- Liste options de paiement ---------- */
body#checkout .payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 24px 0;
}

body#checkout .payment-options > div {
    margin: 0 !important;
}

/* ---------- Card option paiement ---------- */
body#checkout .payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background-color: #ffffff;
    border: 1.5px solid var(--as-hairline);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease,
                box-shadow .15s ease;
    margin: 0 !important;
}

body#checkout .payment-option:hover {
    border-color: var(--as-grey-300);
    box-shadow: 0 2px 8px rgba(15, 15, 15, 0.04);
}

body#checkout .payment-option:has(input[type="radio"]:checked) {
    border: 2px solid var(--as-amaranth);
    background-color: rgba(230, 34, 73, 0.04);
    box-shadow: 0 0 0 1px var(--as-amaranth);
    padding: 17.5px 19.5px;
}

body#checkout .payment-option > .custom-radio {
    flex-shrink: 0;
    margin: 0;
}

body#checkout .payment-option > label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    cursor: pointer;
    color: var(--as-grey-900);
    font-family: var(--as-font-family);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

body#checkout .payment-option > label > span {
    color: inherit;
}

body#checkout .payment-option > label img {
    max-height: 32px;
    max-width: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---------- Information additionnelle (accordion) ---------- */
body#checkout .additional-information,
body#checkout .js-additional-information {
    margin: 4px 0 0 0;
    padding: 16px 20px;
    background-color: var(--as-grey-100);
    border-radius: 8px;
    font-size: 14px;
    color: var(--as-grey-700);
    line-height: 1.55;
}

body#checkout .additional-information.ps-hidden,
body#checkout .js-additional-information.ps-hidden,
body#checkout .js-payment-option-form.ps-hidden {
    display: none !important;
}

body#checkout .additional-information dl.definition-list,
body#checkout .additional-information dt,
body#checkout .additional-information dd {
    margin: 4px 0;
}

body#checkout .additional-information dt {
    font-weight: 600;
    color: var(--as-grey-900);
}

/* Form intégré paiement (ex. carte) */
body#checkout .js-payment-option-form {
    margin: 4px 0 0 0;
    padding: 16px 20px;
    background-color: var(--as-grey-050, #f7f7f7);
    border-radius: 8px;
}

/* ---------- Conditions à valider (CGV) ---------- */
body#checkout #conditions-to-approve,
body#checkout .js-conditions-to-approve {
    margin: 24px 0;
    padding: 20px 22px;
    background-color: var(--as-grey-100);
    border-radius: 8px;
}

body#checkout #conditions-to-approve ul,
body#checkout .js-conditions-to-approve ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

body#checkout #conditions-to-approve li,
body#checkout .js-conditions-to-approve li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 8px 0;
}

body#checkout #conditions-to-approve li > .float-xs-left {
    float: none !important;
    flex-shrink: 0;
    margin-top: 2px;
}

body#checkout #conditions-to-approve li .condition-label {
    flex: 1 1 auto;
}

body#checkout #conditions-to-approve label.js-terms,
body#checkout #conditions-to-approve .condition-label label {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    color: var(--as-grey-900);
    line-height: 1.5;
    cursor: pointer;
}

body#checkout #conditions-to-approve a {
    color: var(--as-grey-900);
    text-decoration: underline;
    text-decoration-color: var(--as-amaranth);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    font-weight: 500;
}

/* ---------- Final summary (récap commande avant paiement) ---------- */
body#checkout .order-confirmation-table,
body#checkout #order-final-summary,
body#checkout .js-order-final-summary {
    margin: 20px 0;
    padding: 20px 22px;
    background-color: var(--as-grey-100);
    border-radius: 8px;
}

body#checkout #order-final-summary h4,
body#checkout #order-final-summary .h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--as-grey-900);
    margin: 0 0 12px 0;
}

/* ---------- Place order container ---------- */
body#checkout #payment-confirmation,
body#checkout .js-payment-confirmation {
    margin-top: 28px;
}

body#checkout #payment-confirmation .keep-going-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

body#checkout #payment-confirmation .btn-primary {
    min-width: 280px;
    min-height: 54px;
    font-size: 17px;
    font-weight: 600;
    background-color: var(--as-amaranth);
}

body#checkout #payment-confirmation .btn-primary.disabled,
body#checkout #payment-confirmation .btn-primary:disabled {
    background-color: var(--as-grey-300);
    cursor: not-allowed;
}

/* Alert CGV / payment manquant */
body#checkout .js-alert-payment-conditions {
    max-width: 460px;
    margin: 12px auto 0 auto !important;
}

/* ---------- Cart-payment-step refresh info ---------- */
body#checkout .cart-payment-step-refreshed-info {
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background-color: rgba(15, 138, 58, 0.10);
    border-left: 4px solid var(--as-success);
    border-radius: 8px;
    color: var(--as-grey-900);
    font-size: 14px;
    font-weight: 500;
}

body#checkout .cart-payment-step-not-needed-info {
    text-align: center;
    margin: 24px 0;
    color: var(--as-grey-700);
    font-size: 16px;
}

/* ---------- Mobile (≤ 575px) ---------- */
@media (max-width: 575.98px) {
    body#checkout .payment-option {
        padding: 14px 16px;
        gap: 12px;
    }

    body#checkout .payment-option:has(input[type="radio"]:checked) {
        padding: 13.5px 15.5px;
    }

    body#checkout .payment-option > label {
        flex-wrap: wrap;
        gap: 10px;
    }

    body#checkout #conditions-to-approve {
        padding: 16px 18px;
    }

    body#checkout #payment-confirmation .btn-primary {
        width: 100%;
        min-width: 100%;
    }
}

/* ============ Lot I P1-b (2026-05-31) — alignement design Claude V1 ============
 * PayTile : icône mono par mode + nom + sous-titre (gauche), logo (droite).
 * CTA « Commander · {total} » avec cadenas. Trust row + mention +18.
 */

/* ---------- PayTile : icône + texte à gauche, logo à droite ---------- */
body#checkout .payment-option > label {
    justify-content: flex-start;
    gap: 14px;
    align-items: center;
}

body#checkout .payment-option-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--as-grey-100);
    border-radius: 8px;
    color: var(--as-grey-900);
}

body#checkout .payment-option-icon svg {
    width: 22px;
    height: 22px;
}

body#checkout .payment-option:has(input[type="radio"]:checked) .payment-option-icon {
    background-color: var(--as-amaranth-soft);
    color: var(--as-amaranth);
}

body#checkout .payment-option-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

body#checkout .payment-option-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--as-grey-900);
    line-height: 1.3;
}

body#checkout .payment-option-sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--as-grey-300);
    line-height: 1.4;
}

/* ---------- CTA : cadenas + montant ---------- */
body#checkout #payment-confirmation .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

body#checkout #payment-confirmation .btn-primary .po-lock {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- Trust row sous le CTA ---------- */
body#checkout .payment-trust-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--as-grey-300);
}

body#checkout .payment-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body#checkout .payment-trust-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

body#checkout .payment-trust-item--age {
    font-weight: 600;
    color: var(--as-grey-500);
}
