.payment-page {
    background: var(--background, #211724);
    color: #ffffff;
}

.payment-main {
    position: relative;
    isolation: isolate;
    min-height: 80vh;
    padding: 170px 24px 90px;
}

.payment-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(
            ellipse at 20% 35%,
            rgba(143, 82, 195, 0.18),
            transparent 55%
        ),
        radial-gradient(
            ellipse at 85% 70%,
            rgba(109, 64, 153, 0.12),
            transparent 50%
        );
    pointer-events: none;
}

.payment-heading {
    max-width: 750px;
    margin: 0 auto 50px;
    text-align: center;
}

.payment-heading h1 {
    margin: 0 0 24px;
    font-size: clamp(42px, 7vw, 85px);
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.payment-heading h1 span {
    color: var(--lilac, #e6c7fa);
}

.payment-heading > p {
    max-width: 520px;
    margin: 0 auto;
    color: #cfc3d6;
    font-size: 14px;
    line-height: 1.9;
}

/* STRUCTURE */

.payment-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    width: min(100%, 1150px);
    margin-inline: auto;
}

.payment-navigation,
.payment-panels {
    min-width: 0;
}

.payment-navigation-label {
    margin: 0 0 14px;
    color: #cfc3d6;
    font-size: 12px;
    line-height: 1.7;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.payment-methods a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 14px 17px;
    border: 1px solid rgba(230, 199, 250, 0.17);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #ddd2e5;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition:
        background 200ms ease,
        border-color 200ms ease;
}

.payment-methods a:hover {
    background: rgba(230, 199, 250, 0.12);
    border-color: rgba(230, 199, 250, 0.45);
}

.payment-methods a[aria-selected="true"] {
    background: var(--lilac, #e6c7fa);
    border-color: var(--lilac, #e6c7fa);
    color: #211724;
}

.payment-swipe-hint {
    margin: 8px 0 0;
    color: #bcaac8;
    font-size: 11px;
    line-height: 1.7;
}

.payment-swipe-hint[hidden] {
    display: none;
}

/* PLAQUES EN VERRE */

.payment-panel {
    min-width: 0;
    margin-bottom: 24px;
    padding: clamp(22px, 3.5vw, 40px);
    border: 1px solid rgba(230, 199, 250, 0.23);
    border-radius: 25px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(230, 199, 250, 0.025)
    );
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 20px 55px rgba(0, 0, 0, 0.15);
    scroll-margin-top: 25px;
}

.payment-panel[hidden] {
    display: none;
}

.payment-label {
    margin: 0 0 12px;
    color: var(--lilac, #e6c7fa);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.8;
    text-transform: uppercase;
}

.payment-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(25px, 3vw, 38px);
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.payment-description {
    margin: 0 0 26px;
    color: #cfc3d6;
    font-size: 14px;
    line-height: 1.9;
}

/* FORMULAIRE */

.payment-form {
    display: grid;
    gap: 22px;
}

.payment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.payment-amount {
    grid-template-columns: minmax(0, 1fr) 120px;
}

.payment-form label {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
}

.payment-form input,
.payment-form select {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid rgba(230, 199, 250, 0.25);
    border-radius: 12px;
    background: rgba(20, 12, 26, 0.5);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    color-scheme: dark;
}

.payment-form input::placeholder {
    color: #ab99b7;
}

.payment-form small {
    color: #bcaac8;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
}

.payment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    max-width: 100%;
    padding: 15px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--lilac, #e6c7fa);
    color: #211724;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.payment-button:hover:not(:disabled) {
    background: #f0ddff;
}

.payment-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.payment-notice {
    margin: 0;
    color: #bcaac8;
    font-size: 12px;
    line-height: 1.8;
}

.payment-panel > .payment-button {
    margin: 10px 0 18px;
}

.payment-info {
    padding: 20px;
    margin-bottom: 18px;
    border: 1px solid rgba(230, 199, 250, 0.16);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.035);
    color: #d7cadf;
    font-size: 13px;
    line-height: 1.9;
}

/* LOGOS SÉPARÉS, SANS RECADRAGE D’AFFICHE */

.payment-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 110px;
    height: 64px;
    margin-bottom: 24px;
    padding: 10px;
    overflow: hidden;
    border-radius: 11px;
    background: #ffffff;
}

.payment-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.payment-brand-name {
    color: #211724;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.payment-logo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* COORDONNÉES */

.payment-details {
    display: grid;
    gap: 12px;
    margin: 25px 0;
}

.payment-details > div {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(230, 199, 250, 0.17);
    border-radius: 14px;
    background: rgba(230, 199, 250, 0.045);
}

.payment-details dt {
    margin-bottom: 8px;
    color: #bcaac8;
    font-size: 11px;
    line-height: 1.7;
}

.payment-details dd {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.payment-details .payment-number {
    color: var(--lilac, #e6c7fa);
    font-size: clamp(17px, 2.5vw, 24px);
    font-variant-numeric: tabular-nums;
}

.payment-details a:hover,
.direct-money-number a:hover {
    color: var(--lilac, #e6c7fa);
}

/* MOBILE MONEY DIRECT */

.direct-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.direct-money-card {
    min-width: 0;
    padding: 20px 12px;
    border: 1px solid rgba(230, 199, 250, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
}

.direct-money-card .payment-brand {
    width: 96px;
    height: 56px;
    margin: 0 auto 18px;
}

.direct-money-card h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
}

.direct-money-number {
    margin: 0 0 20px;
    color: var(--lilac, #e6c7fa);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.direct-money-caption {
    margin: 0 0 6px;
    color: #bcaac8;
    font-size: 10px;
}

.direct-money-name {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* FOCUS AU CLAVIER */

.payment-main a:focus-visible,
.payment-main button:focus-visible,
.payment-main input:focus-visible,
.payment-main select:focus-visible,
.payment-panel:focus-visible {
    outline: 2px solid var(--lilac, #e6c7fa);
    outline-offset: 4px;
}

/* NAVIGATION MOBILE SUR UNE SEULE LIGNE */

@media (max-width: 850px) {
    .payment-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .payment-methods {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        padding: 5px 3px 13px;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 3px;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: #e6c7fa rgba(255, 255, 255, 0.06);
    }

    .payment-methods a {
        flex: 0 0 auto;
        min-height: 46px;
        padding: 12px 18px;
        border-radius: 999px;
        font-size: 12px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .payment-methods::-webkit-scrollbar {
        height: 4px;
    }

    .payment-methods::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.06);
    }

    .payment-methods::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #e6c7fa;
    }
}

@media (min-width: 851px) and (max-width: 1100px) {
    .direct-money-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .payment-main {
        padding: 145px 16px 60px;
    }

    .payment-heading {
        margin-bottom: 35px;
    }

    .payment-panel {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .payment-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-amount {
        grid-template-columns: minmax(0, 1fr) 95px;
        gap: 12px;
    }

    .direct-money-grid {
        grid-template-columns: 1fr;
    }

    .direct-money-number {
        font-size: 23px;
    }

    .payment-brand {
        width: 96px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .payment-methods a {
        transition: none;
    }
}

/* PHOTO D’OUVERTURE, COMME SUR L’ACCUEIL */

.payment-main {
    padding-top: 0;
}

.payment-heading {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: calc(100% + 48px);
    max-width: none;
    min-height: 520px;
    margin: 0 -24px 35px;
    padding: 160px 24px 100px;
    overflow: hidden;
    text-align: center;
}

.payment-heading-photo {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        url("../images/fond-offrandes.png")
        center / cover no-repeat;
}

/* Voile prune et lumière violette. */

.payment-heading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(
            ellipse at center,
            rgba(103, 61, 147, 0.45),
            rgba(33, 23, 36, 0.8) 85%
        ),
        linear-gradient(
            to bottom,
            rgba(33, 23, 36, 0.4),
            rgba(33, 23, 36, 0.65)
        );
    pointer-events: none;
}

/* Fondu vers les rubriques, sans ligne de séparation. */

.payment-heading::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 180px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--background, #211724)
    );
    pointer-events: none;
}

.payment-heading-content {
    width: min(100%, 750px);
}

.payment-heading-content p {
    max-width: 520px;
    margin: 24px auto 0;
    color: #ddd2e5;
    font-size: 14px;
    line-height: 1.9;
}

@media (max-width: 600px) {
    .payment-heading {
        width: calc(100% + 32px);
        min-height: 440px;
        margin: 0 -16px 25px;
        padding: 145px 20px 80px;
    }
}

/* MENU SUPERPOSÉ À LA PHOTO */

.payment-page {
    background: #211724;
}

.payment-page .site-header {
    position: absolute;
    top: 0;
    z-index: 20;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* RETIRER LES ESPACES QUI CRÉENT UNE COUPURE */

.payment-page .payment-main {
    padding-top: 0;
    background: transparent;
}

/* Le halo général pouvait modifier la couleur sous le fondu. */
.payment-page .payment-main::before {
    display: none;
}

.payment-page .payment-heading {
    width: calc(100% + 48px);
    max-width: none;
    min-height: 560px;
    margin: 0 -24px;
    padding: 170px 24px 130px;
    border: 0;
    border-radius: 0;
    background: #211724;
    box-shadow: none;
}

/* PHOTO CONTINUE DERRIÈRE LE MENU ET LE TITRE */

.payment-heading-photo {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        url("../images/fond-offrandes.png")
        center / cover no-repeat;
}

/* VOILE VIOLET */

.payment-page .payment-heading::before {
    background:
        radial-gradient(
            ellipse at 50% 35%,
            rgba(103, 61, 147, 0.25),
            rgba(33, 23, 36, 0.55) 85%
        );
}

/* FONDU LONG VERS LA ZONE DES PAIEMENTS */

.payment-page .payment-heading::after {
    height: 260px;
    background: linear-gradient(
        to bottom,
        rgba(33, 23, 36, 0) 0%,
        rgba(33, 23, 36, 0.55) 45%,
        #211724 100%
    );
}

.payment-layout {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-top: 15px;
    background: transparent;
}

@media (max-width: 600px) {
    .payment-page .payment-heading {
        width: calc(100% + 32px);
        min-height: 470px;
        margin: 0 -16px;
        padding: 145px 20px 110px;
    }

    .payment-page .payment-heading::after {
        height: 200px;
    }
}

/* SÉLECTION DES OFFRANDES */

.offering-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 500;
}

.offering-open {
    width: 100%;
    min-height: 50px;
    padding: 14px 18px;
    border: 1px solid rgba(230, 199, 250, 0.4);
    border-radius: 12px;
    background: rgba(230, 199, 250, 0.09);
    color: var(--lilac, #e6c7fa);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.offering-selection {
    margin: 10px 0 0;
    color: #cfc3d6;
    font-size: 12px;
    line-height: 1.8;
}

.offering-dialog {
    width: min(850px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    padding: 30px;
    overflow-y: auto;
    border: 1px solid rgba(230, 199, 250, 0.35);
    border-radius: 24px;
    background: #291d32;
    color: #ffffff;
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.5);
}

.offering-dialog::backdrop {
    background: rgba(12, 7, 16, 0.75);
    backdrop-filter: blur(7px);
}

body.offering-modal-open {
    overflow: hidden;
}

.offering-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.offering-dialog-header h3 {
    margin: 0;
    font-size: clamp(23px, 3vw, 32px);
    font-style: italic;
    font-weight: 800;
    line-height: 1.3;
}

.offering-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(230, 199, 250, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
}

.offering-categories,
.offering-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.offering-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 23px;
    border: 1px solid rgba(230, 199, 250, 0.23);
    border-radius: 17px;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0.08),
        rgba(230, 199, 250, 0.025)
    );
    color: #ffffff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.offering-choice:hover {
    border-color: var(--lilac, #e6c7fa);
    background: rgba(230, 199, 250, 0.12);
}

.offering-choice strong {
    color: var(--lilac, #e6c7fa);
    font-size: 18px;
    font-weight: 600;
}

.offering-choice > span {
    font-size: 12px;
    line-height: 1.85;
}

.offering-choice .offering-verse {
    color: #bcaac8;
    font-size: 11px;
    font-style: italic;
}

.offering-back {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--lilac, #e6c7fa);
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.offering-cgo-heading {
    margin: 18px 0 20px;
    font-size: 14px;
    font-weight: 600;
}

.offering-categories[hidden],
.offering-cgo-panel[hidden] {
    display: none;
}

.offering-dialog button:focus-visible {
    outline: 2px solid var(--lilac, #e6c7fa);
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .offering-dialog {
        padding: 22px 18px;
    }

    .offering-categories,
    .offering-types {
        grid-template-columns: minmax(0, 1fr);
    }
}

.payment-feedback {
    margin: 0;
    color: var(--lilac, #e6c7fa);
    font-size: 13px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.payment-feedback:empty {
    display: none;
}

.payment-feedback-error {
    color: #ffb9c5;
}

/* CONFIRMATION CENTRÉE */

.don-dialog {
    width: min(530px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 45px 30px;
    overflow-y: auto;
    border: 1px solid rgba(230, 199, 250, 0.35);
    border-radius: 28px;
    background: linear-gradient(145deg, #392640, #211724);
    color: #ffffff;
    text-align: center;
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.5);
}

.don-dialog::backdrop {
    background: rgba(12, 7, 16, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.don-confirmation-open {
    overflow: hidden;
}

.don-spinner {
    width: 65px;
    height: 65px;
    margin: 0 auto 30px;
    border: 4px solid rgba(230, 199, 250, 0.15);
    border-top-color: var(--lilac, #e6c7fa);
    border-radius: 50%;
    animation: don-spin 900ms linear infinite;
}

.don-success-icon {
    display: block;
    margin: 0 auto 25px;
    color: var(--lilac, #e6c7fa);
}

.don-dialog h2 {
    margin: 0 0 20px;
    font-size: clamp(28px, 5vw, 40px);
    font-style: italic;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

#don-confirmation-description {
    margin: 0;
    color: #ddd2e5;
    font-size: 16px;
    line-height: 1.9;
}

.don-reference {
    margin: 25px 0 0;
    padding: 16px;
    border-radius: 13px;
    background: rgba(230, 199, 250, 0.06);
    color: #bcaac8;
    font-size: 11px;
    line-height: 1.8;
}

.don-reference strong {
    display: block;
    margin-top: 6px;
    color: var(--lilac, #e6c7fa);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.don-close-button {
    min-height: 48px;
    margin-top: 28px;
    padding: 13px 30px;
    border: 0;
    border-radius: 999px;
    background: var(--lilac, #e6c7fa);
    color: #211724;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.don-dialog [hidden] {
    display: none;
}

@keyframes don-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .don-spinner {
        animation: none;
    }
}