/* ───────────────────────────────────────────────────────────
   Modal Checkout : compact, mobile-first, priorite bas-ecran
   ─────────────────────────────────────────────────────────── */

.checkout-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-end;
}

@media (min-width: 576px) {
    .checkout-modal .modal-dialog {
        margin: 1rem auto;
        max-width: 440px;
        align-items: center;
    }
}

.checkout-content {
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .12);
    overflow: hidden;
    width: 100%;
}

@media (min-width: 576px) {
    .checkout-content {
        border-radius: 18px;
    }
}

/* Header */
.checkout-header {
    padding: 1rem 1.1rem .5rem;
    text-align: center;
    border-bottom: 1px solid var(--border, #e9ecef);
}

.checkout-title {
    font-family: var(--font-display, inherit);
    font-weight: 800;
    font-size: 1.05rem;
    margin: 0;
    color: var(--dark, #1f2937);
    letter-spacing: -.02em;
}

.checkout-sub {
    color: var(--muted, #6b7280);
    font-size: .78rem;
    margin: .15rem 0 0;
}

/* Body */
.checkout-body {
    padding: .85rem 1.1rem .5rem;
    max-height: calc(85vh - 220px);
    overflow-y: auto;
}

/* Recap item */
.checkout-recap {
    display: flex;
    gap: .65rem;
    align-items: center;
    background: var(--bg-soft, #f7f7f9);
    border-radius: 12px;
    padding: .6rem .75rem;
    margin-bottom: .85rem;
}

.checkout-recap-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.checkout-recap-title {
    font-weight: 600;
    font-size: .82rem;
    color: var(--dark, #1f2937);
    line-height: 1.25;
}

.checkout-recap-meta {
    font-size: .72rem;
    color: var(--muted, #6b7280);
    margin-top: .1rem;
}

.checkout-recap-amount {
    font-weight: 800;
    font-size: .95rem;
    color: var(--brand, #e11d48);
    white-space: nowrap;
    letter-spacing: -.02em;
}

/* Sections */
.checkout-section {
    margin-bottom: .85rem;
}

.checkout-section-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted, #6b7280);
    margin-bottom: .45rem;
}

/* Inputs */
.checkout-input {
    border-radius: 10px;
    border: 1.4px solid var(--border, #e9ecef);
    background: #fff;
    padding: .55rem .85rem;
    font-size: .88rem;
    height: auto;
}

.checkout-input:focus {
    border-color: var(--brand, #e11d48);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #e11d48) 18%, transparent);
}

/* Methodes de paiement : grid compact */
.checkout-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
}

.checkout-methods-card {
    grid-template-columns: repeat(2, 1fr);
}

.checkout-method-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    padding: .45rem .25rem;
    border: 1.6px solid var(--border, #e9ecef);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    min-height: 58px;
}

.checkout-method-card:hover {
    border-color: color-mix(in srgb, var(--brand, #e11d48) 35%, var(--border, #e9ecef));
}

.checkout-method-card:active {
    transform: scale(.97);
}

.checkout-method-card img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    pointer-events: none;
}

.checkout-method-label {
    font-size: .62rem;
    font-weight: 600;
    color: var(--dark, #1f2937);
    line-height: 1;
    text-align: center;
}

.checkout-method-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: .6rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.checkout-method-card.is-selected {
    border-color: var(--brand, #e11d48);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #e11d48) 18%, transparent);
}

.checkout-method-card.is-selected .checkout-method-check {
    display: flex;
}

/* Telephone : indicatif + numero */
.checkout-phone-group {
    display: flex;
    gap: .4rem;
}

.checkout-dial {
    flex: 0 0 110px;
    border-radius: 10px;
    border: 1.4px solid var(--border, #e9ecef);
    font-size: .82rem;
    padding: .55rem .5rem;
    height: auto;
}

.checkout-dial:disabled {
    background: #f1f1f3;
    opacity: .6;
}

.checkout-phone {
    flex: 1 1 auto;
    border-radius: 10px;
    border: 1.4px solid var(--border, #e9ecef);
    font-size: .9rem;
    padding: .55rem .85rem;
    height: auto;
}

.checkout-phone:disabled {
    background: #f1f1f3;
    opacity: .6;
    cursor: not-allowed;
}

.checkout-phone:focus,
.checkout-dial:focus {
    border-color: var(--brand, #e11d48);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #e11d48) 18%, transparent);
    outline: none;
}

.checkout-phone-hint {
    display: flex;
    gap: .35rem;
    align-items: flex-start;
    margin-top: .4rem;
    font-size: .7rem;
    color: var(--muted, #6b7280);
}

.checkout-phone-hint i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Footer : CTA + lien close */
.checkout-footer {
    padding: .65rem 1.1rem 1rem;
    border-top: 1px solid var(--border, #e9ecef);
    background: #fff;
    text-align: center;
}

.checkout-cta {
    width: 100%;
    background: var(--brand, #e11d48);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: .75rem 1rem;
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: -.01em;
    transition: opacity .15s, transform .1s, background .15s;
}

.checkout-cta:hover:not(:disabled) {
    background: color-mix(in srgb, var(--brand, #e11d48) 90%, black);
}

.checkout-cta:active:not(:disabled) {
    transform: scale(.99);
}

.checkout-cta:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.checkout-close {
    display: inline-block;
    background: none;
    border: 0;
    color: var(--muted, #9ca3af);
    font-size: .78rem;
    padding: .55rem .5rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkout-close:hover {
    color: var(--dark, #1f2937);
}

/* Hide phone section if card method selected */
.checkout-modal.pm-is-card .js-phone-section {
    opacity: .4;
    pointer-events: none;
}
