/* ═══════════════════════════════════════════════════════════════════════════
   Formulaires publics et pages de retour
   ═══════════════════════════════════════════════════════════════════════════ */

.fcm-formulaire {
    display: grid;
    gap: var(--e-3, 24px);
    max-width: 720px;
}
.fcm-formulaire--large { max-width: none; }

.fcm-champ { display: flex; flex-direction: column; gap: 7px; }
.fcm-champ--moitie { }

.fcm-rangee {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--e-3, 24px);
}

.fcm-formulaire label,
.fcm-legende {
    font-size: .875rem;
    font-weight: 700;
    color: var(--fcm-encre, #0F141B);
    letter-spacing: -.005em;
}
.fcm-formulaire label .fcm-facultatif {
    font-weight: 500;
    color: var(--fcm-texte-doux, #6B7683);
}

.fcm-formulaire input[type="text"],
.fcm-formulaire input[type="email"],
.fcm-formulaire input[type="tel"],
.fcm-formulaire input[type="number"],
.fcm-formulaire input[type="search"],
.fcm-formulaire select,
.fcm-formulaire textarea {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    font: inherit;
    font-size: 1rem;
    color: var(--fcm-encre, #0F141B);
    background: var(--fcm-surface, #fff);
    border: 1.5px solid var(--fcm-bord, #E2E6EC);
    border-radius: 10px;
    transition: border-color .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.fcm-formulaire textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.fcm-formulaire select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236B7683' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

.fcm-formulaire input:focus,
.fcm-formulaire select:focus,
.fcm-formulaire textarea:focus {
    outline: none;
    border-color: var(--fcm-rouge, #D0121B);
    box-shadow: 0 0 0 4px rgba(208, 18, 27, .12);
}
.fcm-formulaire input::placeholder,
.fcm-formulaire textarea::placeholder { color: #9AA3AE; }

.fcm-aide {
    font-size: .82rem;
    color: var(--fcm-texte-doux, #6B7683);
    margin: 0;
}

/* Champ-piège : invisible pour l'internaute, rempli par les robots.
   Masqué par découpe plutôt que par un décalage hors écran, qui élargirait
   la page et fausserait les contrôles de mise en page. */
.fcm-piege {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Cases et boutons radio ── */
.fcm-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.fcm-choix label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border: 1.5px solid var(--fcm-bord, #E2E6EC);
    border-radius: 999px;
    background: var(--fcm-surface, #fff);
    font-weight: 500;
    font-size: .92rem;
    cursor: pointer;
    transition: border-color .16s, background .16s, color .16s;
}
.fcm-choix input { accent-color: var(--fcm-rouge, #D0121B); width: 17px; height: 17px; }
.fcm-choix label:hover { border-color: var(--fcm-rouge, #D0121B); }
.fcm-choix input:checked + span { color: var(--fcm-rouge, #D0121B); font-weight: 700; }
.fcm-choix label:has(input:checked) {
    border-color: var(--fcm-rouge, #D0121B);
    background: var(--fcm-rouge-clair, #FDECEE);
}

.fcm-case {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.5;
}
.fcm-case input { margin-top: 3px; accent-color: var(--fcm-rouge, #D0121B); width: 17px; height: 17px; }

/* ── Bouton d'envoi ── */
.fcm-envoyer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 34px;
    border: 0;
    border-radius: 999px;
    background: var(--fcm-rouge, #D0121B);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .18s, box-shadow .18s;
}
.fcm-envoyer:hover {
    background: var(--fcm-rouge-fonce, #A50E15);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(208, 18, 27, .28);
}
.fcm-envoyer:disabled { opacity: .6; cursor: wait; transform: none; }

/* ═══ Montants suggérés (page de don) ═══ */
.fcm-montants {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 10px;
}
.fcm-montants label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border: 1.5px solid var(--fcm-bord, #E2E6EC);
    border-radius: 12px;
    background: var(--fcm-surface, #fff);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .16s;
}
.fcm-montants input { position: absolute; opacity: 0; pointer-events: none; }
.fcm-montants label:hover { border-color: var(--fcm-rouge, #D0121B); }
.fcm-montants label:has(input:checked) {
    border-color: var(--fcm-rouge, #D0121B);
    background: var(--fcm-rouge, #D0121B);
    color: #fff;
}

/* ═══ Moyens de paiement ═══ */
.fcm-moyens { display: grid; gap: 12px; }
.fcm-moyen {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--fcm-bord, #E2E6EC);
    border-radius: 12px;
    background: var(--fcm-surface, #fff);
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s;
}
.fcm-moyen:hover { border-color: var(--fcm-rouge, #D0121B); }
.fcm-moyen:has(input:checked) {
    border-color: var(--fcm-rouge, #D0121B);
    box-shadow: 0 0 0 3px rgba(208, 18, 27, .1);
}
.fcm-moyen input { accent-color: var(--fcm-rouge, #D0121B); width: 19px; height: 19px; }
.fcm-moyen__nom { font-weight: 700; font-size: .98rem; display: block; }
.fcm-moyen__detail { font-size: .84rem; color: var(--fcm-texte-doux, #6B7683); }
.fcm-moyen__zone {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--fcm-fond, #F6F8FA);
    color: var(--fcm-texte-doux, #6B7683);
    white-space: nowrap;
}
.fcm-moyen--bientot .fcm-moyen__zone {
    background: #FFF4E0;
    color: #8A5A10;
}

/* ═══ Pages de retour ═══ */
.fcm-page-retour {
    padding: clamp(56px, 8vw, 110px) 0;
    background: var(--fcm-fond, #F6F8FA);
}
.fcm-retour {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(32px, 4vw, 52px);
    background: var(--fcm-surface, #fff);
    border: 1px solid var(--fcm-bord, #E2E6EC);
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(15,20,27,.05), 0 24px 50px rgba(15,20,27,.08);
}
.fcm-retour__icone {
    width: 74px;
    height: 74px;
    margin: 0 auto var(--e-3, 24px);
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.fcm-retour__icone svg { width: 36px; height: 36px; }
.fcm-retour--succes .fcm-retour__icone { background: #E7F6ED; color: #0F6B41; }
.fcm-retour--erreur .fcm-retour__icone { background: #FDECEE; color: #A50E15; }

.fcm-retour h1 {
    font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem) !important;
    color: var(--fcm-encre, #0F141B) !important;
    margin: 0 0 12px !important;
}
.fcm-retour__texte {
    color: var(--fcm-texte, #46505C);
    font-size: 1.05rem;
    margin: 0 auto;
    max-width: 46ch;
}
.fcm-retour__erreurs {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 46ch;
    text-align: left;
}
.fcm-retour__erreurs li {
    padding: 11px 16px;
    margin-bottom: 8px;
    background: #FDECEE;
    border-left: 3px solid var(--fcm-rouge, #D0121B);
    border-radius: 0 8px 8px 0;
    color: #7A0B11;
    font-size: .94rem;
}

.fcm-recap {
    margin: var(--e-4, 32px) 0 0;
    padding: var(--e-3, 24px);
    background: var(--fcm-fond, #F6F8FA);
    border-radius: 12px;
    text-align: left;
}
.fcm-recap__titre {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--fcm-texte-doux, #6B7683);
    margin: 0 0 6px;
}
.fcm-recap__reference {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fcm-rouge, #D0121B);
    margin: 0 0 4px;
    letter-spacing: .02em;
}
.fcm-recap__montant {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--fcm-encre, #0F141B);
    margin: 0 0 16px;
}
.fcm-recap__consignes,
.fcm-recap__note {
    font-size: .9rem;
    color: var(--fcm-texte, #46505C);
    margin: 0 0 10px;
}
.fcm-recap__note { font-size: .84rem; margin: 14px 0 0; }

.fcm-coordonnees {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin: 14px 0 0;
    font-size: .9rem;
}
.fcm-coordonnees dt { font-weight: 700; color: var(--fcm-texte-doux, #6B7683); }
.fcm-coordonnees dd {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--fcm-encre, #0F141B);
}

.fcm-retour__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin: var(--e-4, 32px) 0 0;
}
.fcm-bouton-retour {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--fcm-rouge, #D0121B);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}
.fcm-bouton-retour:hover { background: var(--fcm-rouge-fonce, #A50E15); text-decoration: none; }
.fcm-lien-retour {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1.5px solid var(--fcm-bord, #E2E6EC);
    color: var(--fcm-encre, #0F141B) !important;
    font-weight: 600;
    text-decoration: none;
}
.fcm-lien-retour:hover { border-color: var(--fcm-rouge, #D0121B); text-decoration: none; }

/* ═══ Bandeau d'inscription à la lettre d'information ═══ */
.fcm-lettre {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.fcm-lettre input[type="email"] {
    flex: 1;
    min-width: 190px;
    min-height: 46px;
    padding: 11px 15px;
    border: 1.5px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: inherit;
    font-size: .94rem;
}
.fcm-lettre input[type="email"]::placeholder { color: rgba(255, 255, 255, .55); }
.fcm-lettre input[type="email"]:focus {
    outline: none;
    border-color: var(--fcm-rouge, #D0121B);
    background: rgba(255, 255, 255, .12);
}
.fcm-lettre button {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--fcm-rouge, #D0121B);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .18s;
}
.fcm-lettre button:hover { background: var(--fcm-rouge-fonce, #A50E15); }

/* ═══ Mise en page des pages don et bénévolat ═══ */

.fcm-page-don,
.fcm-page-benevole,
.fcm-bloc-formulaire {
    padding: clamp(48px, 6vw, 88px) 0;
    background: var(--fcm-fond, #F6F8FA);
}
.fcm-bloc-formulaire { background: var(--fcm-surface, #fff); }

.fcm-intro-don,
.fcm-entete-formulaire {
    max-width: 720px;
    margin: 0 auto clamp(36px, 4.5vw, 56px);
    text-align: center;
}
.fcm-intro-don h1,
.fcm-entete-formulaire h2 {
    font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem) !important;
    line-height: 1.16;
    color: var(--fcm-encre, #0F141B) !important;
    margin: 0 0 var(--e-3, 24px) !important;
    text-wrap: balance;
}
.fcm-entete-formulaire h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem) !important; }
.fcm-intro-don__texte,
.fcm-entete-formulaire p {
    font-size: 1.05rem;
    color: var(--fcm-texte, #46505C);
    margin: 0 auto;
    max-width: 62ch;
}

/* ── Ce que finance un don ── */
.fcm-impact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: clamp(36px, 4.5vw, 56px);
}
.fcm-impact__carte {
    padding: 24px 22px;
    background: var(--fcm-surface, #fff);
    border: 1px solid var(--fcm-bord, #E2E6EC);
    border-radius: 14px;
    border-top: 3px solid var(--fcm-rouge, #D0121B);
}
.fcm-impact__montant {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--fcm-rouge, #D0121B);
    margin: 0 0 6px;
    line-height: 1;
}
.fcm-impact__texte {
    font-size: .93rem;
    color: var(--fcm-texte, #46505C);
    margin: 0;
    line-height: 1.5;
}

/* ── Formulaire de don et encadré de confiance ── */
.fcm-bloc-don {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr);
    gap: clamp(22px, 3vw, 40px);
    align-items: start;
}
.fcm-bloc-don > form {
    padding: clamp(26px, 3vw, 40px);
    background: var(--fcm-surface, #fff);
    border: 1px solid var(--fcm-bord, #E2E6EC);
    border-radius: 16px;
}

.fcm-section-don {
    border: 0;
    border-top: 1px solid var(--fcm-bord, #E2E6EC);
    padding: var(--e-4, 32px) 0 0;
    margin: 0;
    display: grid;
    gap: var(--e-3, 24px);
}
.fcm-section-don:first-of-type { border-top: 0; padding-top: 0; }
.fcm-section-don .fcm-legende {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--fcm-encre, #0F141B);
    padding: 0;
    margin-bottom: 4px;
}

.fcm-rassurance {
    padding: clamp(24px, 2.6vw, 32px);
    background: linear-gradient(160deg, #0A1244 0%, #101C7A 100%);
    border-radius: 16px;
    color: #fff;
    position: sticky;
    top: 96px;
}
.fcm-rassurance h2 {
    color: #fff !important;
    font-size: 1.12rem !important;
    margin: 0 0 16px !important;
}
.fcm-rassurance ul { margin: 0; padding-left: 18px; display: grid; gap: 11px; }
.fcm-rassurance li { color: rgba(255, 255, 255, .88); font-size: .92rem; line-height: 1.5; }
.fcm-rassurance li strong { color: #fff; }
.fcm-rassurance__contact {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    font-size: .9rem;
    color: rgba(255, 255, 255, .82);
}
.fcm-rassurance__contact a { color: #fff !important; font-weight: 700; }

/* Champ signalé en erreur */
.fcm-champ--faute {
    border-color: var(--fcm-rouge, #D0121B) !important;
    background: #FFF8F8 !important;
}

@media (max-width: 900px) {
    .fcm-bloc-don { grid-template-columns: 1fr; }
    .fcm-rassurance { position: static; }
}

@media (max-width: 600px) {
    .fcm-rangee { grid-template-columns: 1fr; }
    .fcm-envoyer { width: 100%; }
    .fcm-impact { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .fcm-impact__carte { padding: 18px 16px; }
    .fcm-impact__montant { font-size: 1.5rem; }
    .fcm-montants { grid-template-columns: repeat(3, 1fr); }
    .fcm-moyen { grid-template-columns: auto 1fr; }
    .fcm-moyen__zone { grid-column: 2; justify-self: start; }
    .fcm-retour__actions { flex-direction: column; }
    .fcm-bouton-retour, .fcm-lien-retour { width: 100%; justify-content: center; }
    .fcm-coordonnees { grid-template-columns: 1fr; gap: 2px 0; }
    .fcm-coordonnees dd { margin-bottom: 10px; }
}
