:root {
    --brand: #f8602a;
    --brand-soft: #fde7df;
    --brand-ink: #ffffff;
    --surface: #ffffff;
    --page-bg: #f4f6fa;
    --ink: #1a2233;
    --ink-soft: #4a5468;
    --muted: #8892a6;
    --line: #e6eaf2;
    --success: #1f7a4d;
    --success-soft: #e6f4ec;
    --danger: #b3261e;
    --danger-soft: #fdecea;
    --warning-soft: #fdf6e3;
    --warning-ink: #6b4f00;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .08);
}

body[data-societe="SEIREN"] {
    --brand: #629c46;
    --brand-soft: #e7f0e3;
}

html, body {
    background: var(--page-bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pay-shell {
    max-width: 640px;
    margin: 32px auto;
    padding: 0 16px;
}

/* Sur un écran d'ordinateur, 640 px laissent la page filer en hauteur alors que la
   place ne manque pas. La carte s'élargit — sans plus, au-delà le texte devient
   pénible à suivre d'une ligne à l'autre. Le mobile n'est pas concerné. */
@media (min-width: 900px) {
    .pay-shell {
        max-width: 880px;
    }
}

/* Au-delà, la place sert au document : en deux colonnes, 880 px n'en laissaient que
   430 à la lecture, soit un PV plus étroit qu'une feuille. Les colonnes de texte
   restent raisonnables parce que la page de signature seule s'élargit à ce point. */
@media (min-width: 1280px) {
    .pay-shell--large {
        max-width: 1180px;
    }
}

.pay-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Le bandeau porte la teinte pastel de la société, pas sa couleur pleine : en
   aplat sur toute la largeur, celle-ci écrasait le contenu. L'identité reste
   portée par le logo, et la couleur pleine est gardée pour les boutons, où elle
   désigne l'action à faire. Le liseré sépare le bandeau du corps, que le pastel
   seul ne suffit plus à distinguer du blanc. */
.pay-card__header {
    background: var(--brand-soft);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pay-card__logo {
    display: inline-flex;
    align-items: center;
}

    .pay-card__logo img {
        display: block;
        max-height: 36px;
        width: auto;
        /* Le fichier est un disque posé sur un fond blanc OPAQUE, sans canal de
           transparence : sur le bandeau pastel, le supprimer sans découpe
           laisserait un carré blanc. Le disque occupe 95 % du carré, un rognage
           circulaire ne retire donc que du blanc. */
        border-radius: 50%;
    }

.pay-card__societe {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .85;
    margin: 0;
}

.pay-card__brand-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.pay-card__body {
    padding: 28px;
}

.pay-card__title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    text-align: center;
    color: var(--ink);
}

.pay-card__subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 24px;
}

/* Stepper */
.pay-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 28px;
    max-width: 420px;
    padding: 0;
    list-style: none;
}

.pay-stepper__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.pay-stepper__bullet {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pay-stepper__connector {
    flex: 1 1 auto;
    height: 2px;
    background: var(--line);
    margin: 0 6px;
    align-self: center;
    margin-bottom: 18px;
}

.pay-stepper__item--active .pay-stepper__bullet {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
}

.pay-stepper__item--active {
    color: var(--ink);
}

.pay-stepper__item--done .pay-stepper__bullet {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand);
}

/* Summary line */
.pay-summary {
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 18px;
}

    .pay-summary strong {
        color: var(--ink);
        font-weight: 600;
    }

.pay-summary__type {
    /* La pastille coiffe le numéro de dossier, sur sa propre ligne. « block » seul
       lui ferait prendre toute la largeur — et donc un fond qui traverse la carte ;
       fit-content la ramène à son texte, et les marges auto la recentrent. Même
       technique que .sig-bouton--centre. */
    display: block;
    width: fit-content;
    margin: 0 auto 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pay-summary__link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--brand);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

    .pay-summary__link:hover {
        border-bottom-color: var(--brand);
    }

/* Amount block */
.pay-amount {
    background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 22px 16px;
    text-align: center;
    margin: 0 0 28px;
}

.pay-amount__value {
    font-size: 40px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
    line-height: 1;
    margin: 0 0 6px;
}

.pay-amount__label {
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0;
}

/* Stripe sub-card */
.pay-stripe {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 22px;
    background: #fff;
    margin: 0 0 18px;
}

#payment-form {
    width: 100%;
    min-width: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    align-self: auto;
}

#link-authentication-element {
    margin-bottom: 14px;
}

#payment-element {
    margin-bottom: 22px;
}

#submit {
    background: var(--brand);
    color: var(--brand-ink);
    font-family: inherit;
    border-radius: 8px;
    border: 0;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter .15s ease, transform .05s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
    width: 100%;
}

    #submit:hover:not(:disabled) {
        filter: brightness(1.06);
    }

    #submit:active:not(:disabled) {
        transform: translateY(1px);
    }

    #submit:disabled {
        opacity: .6;
        cursor: default;
    }

#payment-message {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.4;
    padding-top: 12px;
    text-align: center;
}

/* Trust footer */
.pay-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0 0;
}

.pay-trust__lock {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

/* Status panels (success / error / warning) */
.pay-status {
    border-radius: var(--radius-sm);
    padding: 22px;
    margin: 0 0 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pay-status__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.pay-status__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--ink);
}

.pay-status__body {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0;
    line-height: 1.5;
}

.pay-status--success {
    background: var(--success-soft);
    border: 1px solid #cfe7da;
}

    .pay-status--success .pay-status__icon {
        background: var(--success);
        color: #fff;
    }

.pay-status--error {
    background: var(--danger-soft);
    border: 1px solid #f4c7c3;
}

    .pay-status--error .pay-status__icon {
        background: var(--danger);
        color: #fff;
    }

.pay-status--warning {
    background: var(--warning-soft);
    border: 1px solid #f0e2b3;
}

    .pay-status--warning .pay-status__icon {
        background: var(--warning-ink);
        color: #fff;
    }

/* App footer (under the card) */
.pay-app-footer {
    text-align: center;
    margin: 18px auto 24px;
    color: var(--muted);
    font-size: 12px;
}

.hidden {
    display: none;
}

/* ---------- accueil et page introuvable ---------- */

.accueil-intro {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    margin: 0 0 20px;
}

.accueil-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 22px;
}

.accueil-point {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
}

    .accueil-point strong {
        display: block;
        margin-bottom: 3px;
        color: var(--ink);
        font-weight: 600;
    }

/* ---------- conditions d'utilisation ---------- */

.cgu {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-top: 24px;
}

    .cgu p {
        margin: 0 0 12px;
    }

    .cgu strong {
        color: var(--ink);
        font-weight: 600;
    }

    .cgu a {
        color: var(--brand);
    }

.cgu__chapeau {
    background: var(--brand-soft);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

/* Le filet supérieur porte la séparation entre articles : sur un texte long,
   la seule taille du titre ne suffit pas à donner le rythme. */
.cgu__titre {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 26px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.cgu__sous-titre {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin: 18px 0 8px;
}

.cgu__liste {
    margin: 0 0 12px;
    padding-left: 20px;
}

    .cgu__liste li {
        margin-bottom: 6px;
    }

.cgu__pied {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 600px) {
    .pay-shell {
        margin: 16px auto;
        padding: 0 12px;
    }

    .pay-card__header {
        padding: 16px 18px;
    }

    .pay-card__body {
        padding: 22px 18px;
    }

    .pay-amount__value {
        font-size: 34px;
    }

    .pay-stripe {
        padding: 16px;
    }

    .pay-stepper__item {
        font-size: 11px;
    }

    .accueil-point {
        padding: 12px 14px;
        font-size: 13px;
    }

    .accueil-intro {
        font-size: 14px;
    }
}
