/* =====================================================
   Page de don — tunnel isolé (spec 03)
   ===================================================== */
.don {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    background: var(--paper);
}

.don__tagline {
    text-align: center;
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 32px;
}

.don__logo {
    display: block;
    width: clamp(180px, 26vw, 320px);
    height: auto;
    margin: 0 auto 40px;
}

.don__step { margin-bottom: 56px; }
.don__step[hidden] { display: none; }

.don__target {
    display: inline-block;
    background: var(--yellow);
    font-family: var(--mono);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    margin: 0 0 16px;
}

/* Étape 1 — champ montant gigantesque, habillage .field--amount */
.don__amount-wrap {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--ink);
    margin-bottom: 20px;
}
/* input.* : prime sur la règle globale input[type="text"] (même spécificité,
   déclaré après) sans toucher aux formulaires du reste du site. */
input.don__amount-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    outline: none;
    font-family: var(--display);
    font-size: clamp(48px, 10vw, 80px);
    text-align: center;
    padding: 8px 12px;
    background: var(--paper);
    color: var(--ink);
}
input.don__amount-input:focus { border: none; background: var(--paper); box-shadow: none; outline: none; }
.don__amount-wrap:focus-within { outline: 3px solid var(--yellow); outline-offset: 0; }
.don__amount-euro {
    display: flex;
    align-items: center;
    font-family: var(--display);
    font-size: clamp(40px, 8vw, 64px);
    padding: 0 20px;
    background: var(--ink);
    color: var(--paper);
}

/* Étape 2 — blocs de paiement */
.don__block { margin-bottom: 16px; }
.don__checkout { margin-bottom: 24px; }
.don__block-label {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 8px;
}
/* Moyens de paiement sur 3 colonnes, une rangée par famille : Stripe
   (Apple Pay, CB), plateformes (HelloAsso, Pot Commun, PayPal), manuel
   (virement, chèque). La première carte d'une rangée force le retour. */
.don__block--split {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.don__card--row-start {
    grid-column-start: 1;
}
.don__card {
    display: block;
    font-family: var(--body);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    padding: 16px 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.don__card:hover { background: var(--ink); color: var(--paper); }
.don__card-logo {
    display: block;
    margin: 0 auto 8px;
    height: 22px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.45;
    filter: grayscale(100%);
    transition: opacity 140ms ease, filter 140ms ease;
}
.don__card:hover .don__card-logo {
    opacity: 0.85;
    filter: grayscale(100%) invert(1);
}
.don__card--selected,
.don__card--selected:hover {
    background: var(--yellow);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.don__card--selected .don__card-logo,
.don__card--selected:hover .don__card-logo {
    opacity: 0.85;
    filter: grayscale(100%);
}
.don__card-logo--emoji {
    height: auto;
    font-size: 22px;
    line-height: 1;
}
.don__block--split .don__card--wallet,
.don__block--split .don__card--wallet:hover {
    display: flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}
.don__card--wallet > div {
    width: 100%;
}
.don__card[hidden] {
    display: none;
}
.don__card-newtab {
    font-size: 0.8em;
    margin-left: 0.4em;
}

/* Aide au fonctionnement national */
.don__support {
    border: 2px solid var(--ink);
    padding: 20px;
    margin-bottom: 16px;
}
.don__support-text { margin: 0 0 16px; font-size: 15px; line-height: 1.6; }
.don__support-label {
    display: block;
    margin: 0 auto 12px;
    max-width: 320px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
input.don__support-input {
    display: block;
    width: 140px;
    margin: 0 auto;
    border: 2px solid var(--ink);
    border-radius: 0;
    font-family: var(--display);
    font-size: 28px;
    text-align: center;
    padding: 8px;
    background: var(--paper);
}
input.don__support-input:focus { border-color: var(--ink); background: var(--paper); box-shadow: none; outline: 3px solid var(--yellow); outline-offset: 2px; }
input.don__support-input[aria-invalid="true"] { border-color: var(--red); }

/* Carte bancaire — Stripe Checkout embarqué */
.don__stripe {
    border: 2px solid var(--ink);
    padding: 20px;
    margin-top: 16px;
}
.don__stripe[hidden] { display: none; }
.don__stripe-freq {
    border: none;
    margin: 0 0 20px;
    padding: 0;
}
.don__stripe-freq-legend {
    display: block;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0;
    margin-bottom: 10px;
}
.don__stripe-freq-opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 24px;
    font-weight: 600;
    cursor: pointer;
}
.don__stripe-mount { min-height: 60px; }

/* Étape 3 — formulaire d'intention */
.don__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.don__field { display: flex; flex-direction: column; gap: 6px; }
.don__field--full { grid-column: 1 / -1; }
.don__field-label {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.don__field input,
.don__field select {
    border: 2px solid var(--ink);
    border-radius: 0;
    min-height: 52px;
    padding: 12px;
    font-family: var(--body);
    font-size: 16px;
    background: var(--paper);
    color: var(--ink);
}
.don__field input:focus,
.don__field select:focus { border-color: var(--ink); background: var(--paper); box-shadow: none; outline: 3px solid var(--yellow); outline-offset: 2px; }
/* Native select chevron drops the brutalist look on most browsers; replace it
   with an inline SVG that inherits the ink color. */
.don__field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23111111' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Tooltip next to the "Adresse postale" label — same idiom as the homepage
   `info-pop`, sized down to sit inline with the 12px uppercase label. */
.info-pop--inline {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
}
.info-pop--inline .info-pop__trigger {
    width: 18px;
    height: 18px;
    font-size: 11px;
    border-width: 1.5px;
}
.info-pop--inline .info-pop__panel {
    left: 0;
    right: auto;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    font-family: var(--body);
    font-size: 13px;
    color: var(--ink);
    text-align: left;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
}

.don__pledge { font-size: 18px; margin: 0 0 20px; }

.don__bank-recap {
    margin-top: 24px;
    border: 2px solid var(--ink);
    padding: 16px 20px;
    font-family: var(--mono);
    font-size: 14px;
}
.don__bank-recap-title { font-weight: 700; margin: 0 0 10px; }
.don__bank-recap ul { margin: 0; padding-left: 20px; }
.don__bank-recap-note { margin: 10px 0 0; color: var(--ink-soft); }

/* Étape 4 — remerciements. .don__thanks reste comme ancre (stylé par .h2 .text-red). */
.don__thanks-sub { margin: 0 0 32px; color: var(--ink-soft); }

.don__message { margin-bottom: 32px; }
input.don__message-name,
textarea.don__message-input {
    display: block;
    width: 100%;
    border: 2px solid var(--ink);
    border-radius: 0;
    padding: 14px;
    font-family: var(--body);
    font-size: 16px;
    margin-bottom: 12px;
    box-sizing: border-box;
    background: var(--paper);
    color: var(--ink);
}
textarea.don__message-input { resize: vertical; }
input.don__message-name:focus,
textarea.don__message-input:focus { border-color: var(--ink); background: var(--paper); box-shadow: none; outline: 3px solid var(--yellow); outline-offset: 2px; }
.don__message-success { font-weight: 700; }

.don__official {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.don__official[hidden] { display: none; }
.don__official-block {
    border: 2px solid var(--ink);
    padding: 20px;
}
.don__official-block h3 {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: 20px;
    margin: 0 0 14px;
}
.don__official-block dl { margin: 0; font-size: 14px; }
.don__official-block dt {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 10px;
}
.don__official-block dd { margin: 2px 0 0; font-family: var(--mono); }
.don__official-warning { font-size: 13px; margin: 14px 0 0; }

.don__copy {
    font-family: var(--body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: transparent;
    border: 2px solid var(--ink);
    padding: 2px 8px;
    margin-left: 8px;
    cursor: pointer;
}
.don__copy:hover { background: var(--ink); color: var(--paper); }

.don__survey {
    background: var(--yellow);
    padding: 24px;
}
.don__survey h3 {
    font-family: var(--display);
    text-transform: uppercase;
    font-size: 22px;
    margin: 0 0 10px;
}
.don__survey p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; }

@media (max-width: 768px) {
    .don__card--selected,
    .don__card--selected:hover { box-shadow: var(--shadow-mobile); }
}

/* Mobile (DS CS 8, M4) : les moyens de paiement s'empilent en lignes de 52 px,
   logo du prestataire à gauche, libellé aligné. */
@media (max-width: 767px) {
    .don__block--split {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .don__card {
        display: flex;
        align-items: center;
        min-height: 52px;
        padding: 0 16px;
        text-align: left;
    }
    .don__card-logo {
        flex: 0 0 60px;
        width: 60px;
        height: 20px;
        margin: 0 12px 0 0;
    }
    .don__card-logo--emoji {
        height: auto;
        text-align: center;
    }
    .don__fields,
    .don__official { grid-template-columns: 1fr; }
}

.don__consents {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.don__consent {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    cursor: pointer;
}
.don__consent strong { color: var(--ink); }
.don__consent input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    cursor: pointer;
}
.don__consent input[type="checkbox"]:checked {
    background: var(--yellow);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='11' viewBox='0 0 14 11' fill='none'%3E%3Cpath d='M1 5L5 9L13 1' stroke='%23111111' stroke-width='2.5' stroke-linecap='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.don__consent input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
