/* ============================================================
   Question « As-tu réservé un lot dans ce programme ? »
   (chantier suivi-qualification, docs/chantiers/suivi-qualification)
   Page de qualification (program_register.html), fragment de réponse
   (partials/follow_answer_result.html), choix sur place (follow_choice).
   Chargée globalement par base.html : le choix apparaît sur la fiche,
   les cartes et les listes. Couleurs via tokens.css uniquement.
   ============================================================ */

/* ---------- Page de qualification ---------- */
.follow-question { max-width: 560px; margin: 48px auto 64px; padding: 0 20px; }
.follow-question__card {
    background: var(--vefa-bg, #fff); border: 1px solid var(--vefa-border, #e2e8f0);
    border-radius: var(--vefa-radius-lg, 16px); padding: 32px 28px; box-shadow: var(--vefa-shadow-sm);
}
.follow-question__kicker { font-size: 13px; color: var(--vefa-text-muted, #475569); margin: 0 0 6px; }
.follow-question__title {
    font-family: var(--serif-heading, Charter, "Bitstream Charter", Georgia, serif);
    font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--vefa-text, #0f172a); margin: 0 0 12px;
}
.follow-question__lead { font-size: 15px; color: var(--vefa-text-muted, #475569); margin: 0 0 22px; }
.follow-question__choices { display: grid; gap: 12px; }
.follow-question__choice {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
    min-height: 56px; padding: 14px 18px; border-radius: 12px; cursor: pointer; text-align: left;
    font: inherit; border: 1px solid var(--vefa-border-strong, #cbd5e1);
    background: var(--vefa-bg, #fff); color: var(--vefa-text, #0f172a);
}
.follow-question__choice strong { font-size: 16px; }
.follow-question__choice span { font-size: 13px; color: var(--vefa-text-muted, #475569); }
.follow-question__choice:hover { border-color: var(--vefa-primary-darker, #1f6396); background: var(--vefa-bg-soft, #f8fafc); }
.follow-question__choice--owner {
    background: var(--vefa-accent-action, #d93600); border-color: var(--vefa-accent-action, #d93600);
    color: var(--vefa-text-on-primary, #fff);
}
.follow-question__choice--owner span { color: var(--vefa-text-on-primary-muted, rgba(255, 255, 255, .75)); }
.follow-question__choice--owner:hover {
    background: var(--vefa-accent-action-hover, #b82d00); border-color: var(--vefa-accent-action-hover, #b82d00);
    color: var(--vefa-text-on-primary, #fff);
}
.follow-question__choice:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 3px; }
.follow-question__note { font-size: 12px; color: var(--vefa-text-muted, #475569); margin: 16px 0 0; }
.follow-question__errors { background: var(--vefa-danger-soft, rgba(220, 38, 38, .1)); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.follow-question__back { display: inline-block; margin-top: 18px; font-size: 14px; }

/* ---------- Fragment de réponse ---------- */
.follow-answer { font-size: 14px; line-height: 1.5; color: var(--vefa-text, #0f172a); }
.follow-answer__msg { margin: 0 0 10px; }
.follow-answer__lot { display: grid; gap: 6px; margin: 8px 0 0; }
.follow-answer__lot label { font-size: 13px; font-weight: 600; }
.follow-answer__lot label span { font-weight: 400; color: var(--vefa-text-muted, #475569); }
.follow-answer__lot-row { display: flex; gap: 8px; }
.follow-answer__lot input {
    flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit;
    border: 1px solid var(--vefa-border-strong, #cbd5e1); border-radius: 8px; background: var(--vefa-bg, #fff);
}
.follow-answer__save {
    flex: none; min-height: 44px; padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600;
    border: 1px solid var(--vefa-primary-border, #b8d6ea); background: var(--vefa-bg, #fff); color: var(--vefa-primary-darker, #1f6396);
}

/* ---------- Choix sur place (partials/follow_choice.html, static/js/follow_choice.js) ----------
   Le conteneur ne crée pas de boîte : le lien d'origine garde sa place dans la mise en page
   de sa zone. Une fois ouvert, le panneau prend la place du lien. */
.follow-choice { display: contents; }
.follow-choice [data-follow-choice][hidden],
.follow-choice__panel[hidden] { display: none !important; }
.follow-choice__panel {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 14px; line-height: 1.3; color: var(--vefa-text, #0f172a);
}
.follow-choice__btn {
    min-height: 44px; padding: 8px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600;
    border: 1px solid var(--vefa-border-strong, #cbd5e1); background: var(--vefa-bg, #fff); color: var(--vefa-text, #0f172a);
}
.follow-choice__btn:hover { background: var(--vefa-bg-soft, #f8fafc); border-color: var(--vefa-primary-darker, #1f6396); }
.follow-choice__btn--owner {
    background: var(--vefa-accent-action, #d93600); border-color: var(--vefa-accent-action, #d93600);
    color: var(--vefa-text-on-primary, #fff);
}
.follow-choice__btn--owner:hover {
    background: var(--vefa-accent-action-hover, #b82d00); border-color: var(--vefa-accent-action-hover, #b82d00);
    color: var(--vefa-text-on-primary, #fff);
}
.follow-choice__cancel {
    min-height: 44px; padding: 8px 6px; border: 0; background: none; cursor: pointer; font: inherit;
    color: var(--vefa-text-muted, #475569); text-decoration: underline;
}
.follow-choice__cancel:hover { color: var(--vefa-text, #0f172a); }
.follow-choice__btn:focus-visible,
.follow-choice__cancel:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 2px; }

/* CTA collant de la fiche v1 : les choix prennent toute la largeur du bloc. */
.program_detail_sticky_cta .follow-choice__panel { display: grid; width: 100%; }
.program_detail_sticky_cta .follow-choice__cancel { justify-self: center; }
/* Barre de navigation de la fiche v1 : version compacte. */
.program_detail_pagenav_cta_wrap .follow-choice__panel { flex-wrap: nowrap; }
.program_detail_pagenav_cta_wrap .follow-choice__btn { min-height: 36px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.program_detail_pagenav_cta_wrap .follow-choice__cancel { min-height: 36px; font-size: 13px; }
/* Bandeau d'engagement du hero (fiche v1, texte sur fond sombre ou photo : on garde des boutons pleins lisibles). */
.program_detail_engagement_banner .follow-choice__panel { justify-content: center; }
/* Cartes de programme. */
.program-card__follow-wrapper .follow-choice__panel { gap: 6px; }
.program-card__follow-wrapper .follow-choice__btn { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.program-card__follow-wrapper .follow-choice__cancel { min-height: 36px; font-size: 13px; }

/* ---------- Question aux suiveurs « pas encore répondu » (partials/follow_qualification_prompt.html) ---------- */
.follow-qualification { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: var(--vefa-text, #0f172a); }
.follow-qualification__q { margin: 0 0 4px; font-weight: 600; }
.follow-qualification__actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.follow-qualification__link {
    min-height: 44px; padding: 8px 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600;
    color: var(--vefa-primary-darker, #1f6396); text-decoration: underline; text-underline-offset: 3px;
}
.follow-qualification__link:hover { color: var(--vefa-text, #0f172a); }
.follow-qualification__link:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 2px; }

/* État « suivi » posé par follow_choice.js sur les autres boutons du même programme */
.follow-choice__done { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--vefa-text, #0f172a); }

/* ---------- Feuille « Suis {{ programme }} » (chantier suivre-par-email, spec §2.2) ----------
   partials/follow_email_sheet.html + static/js/follow_email.js. <dialog> natif : feuille
   qui monte du bas sur mobile, fenêtre centrée de 440 px au plus au-delà de 768 px. */
.follow-email {
    padding: 0; border: 0; background: transparent; max-width: none; max-height: none;
    width: 100%; height: 100%; margin: 0; color: var(--vefa-text, #0f172a);
}
.follow-email[open] { display: flex; align-items: flex-end; justify-content: center; }
.follow-email::backdrop { background: var(--vefa-overlay, rgba(15, 23, 42, 0.5)); }
.follow-email__sheet {
    position: relative; width: 100%; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
    padding: 10px 22px 26px; border-radius: 20px 20px 0 0;
    background: var(--vefa-bg, #fff); box-shadow: var(--vefa-shadow-xl, 0 20px 35px -10px rgba(15, 23, 42, 0.15));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.follow-email__grip {
    display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px;
    background: var(--vefa-border-strong, #cbd5e1);
}
.follow-email__close {
    position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 22px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    background: var(--vefa-bg-muted, #f1f5f9); color: var(--vefa-text, #0f172a);
}
.follow-email__body { display: flex; flex-direction: column; gap: 12px; }
.follow-email__title {
    margin: 4px 56px 0 0; font-family: Charter, "Bitstream Charter", Georgia, serif;
    font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--vefa-text, #0f172a);
}
.follow-email__title:focus { outline: none; }
.follow-email__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--vefa-text-muted, #475569); }
.follow-email__answer {
    margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 600;
    padding: 10px 12px; border-radius: 10px; background: var(--vefa-primary-surface, #f2f8fc);
    color: var(--vefa-text, #0f172a);
}
.follow-email__answer [hidden] { display: none; }
.follow-email__form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.follow-email__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.follow-email__label { font-size: 13px; font-weight: 600; color: var(--vefa-text, #0f172a); }
.follow-email__input {
    height: 48px; box-sizing: border-box; width: 100%; padding: 0 14px; font: inherit; font-size: 16px;
    border: 1px solid var(--vefa-border-strong, #cbd5e1); border-radius: 10px;
    background: var(--vefa-bg, #fff); color: var(--vefa-text, #0f172a);
}
.follow-email__input:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 1px; }
.follow-email__input.is-invalid { border-color: var(--vefa-danger, #dc2626); }
.follow-email__error { margin: 0; font-size: 13px; color: var(--vefa-danger, #dc2626); }
.follow-email__submit {
    min-height: 48px; margin-top: 4px; border: 0; border-radius: 10px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 600;
    background: var(--vefa-accent-action, #d93600); color: var(--vefa-text-on-primary, #fff);
}
.follow-email__submit:hover { background: var(--vefa-accent-action-hover, #b82d00); color: var(--vefa-text-on-primary, #fff); }
.follow-email__hint { margin: 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--vefa-text-muted, #475569); }
.follow-email__divider {
    margin: 4px 0 0; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--vefa-text-muted, #475569);
}
.follow-email__divider::before,
.follow-email__divider::after { content: ""; flex: 1; height: 1px; background: var(--vefa-border, #e2e8f0); }
.follow-email__google {
    min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 1px solid var(--vefa-border, #e2e8f0); border-radius: 10px; text-decoration: none;
    font-size: 15px; font-weight: 600; background: var(--vefa-bg, #fff); color: var(--vefa-text, #0f172a);
}
.follow-email__google:hover { background: var(--vefa-bg-soft, #f8fafc); color: var(--vefa-text, #0f172a); }
.follow-email__login {
    min-height: 44px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; text-decoration: none; color: var(--vefa-primary-darker, #1f6396);
}
.follow-email__login:hover { color: var(--vefa-text, #0f172a); }
.follow-email__link {
    padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600;
    text-decoration: underline; color: var(--vefa-primary-darker, #1f6396);
}
.follow-email__link:hover { color: var(--vefa-text, #0f172a); }
.follow-email__close:focus-visible,
.follow-email__submit:focus-visible,
.follow-email__google:focus-visible,
.follow-email__login:focus-visible,
.follow-email__link:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 2px; }
.follow-email__done { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }
.follow-email__done-icon {
    width: 48px; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center;
    background: var(--vefa-success-soft, #dcfce7); color: var(--vefa-success-ink, #15803d);
}
@media (min-width: 768px) {
    .follow-email[open] { align-items: center; }
    .follow-email__sheet { max-width: 440px; border-radius: var(--vefa-radius-lg, 16px); padding: 22px 26px 26px; }
    .follow-email__grip { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    .follow-email[open] .follow-email__sheet { animation: follow-email-up var(--vefa-duration-base, 200ms) var(--vefa-ease-out, ease-out); }
}
@keyframes follow-email-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- « Me présenter » (page de confirmation du suivi, spec §4) ---------- */
.follow-introduce {
    margin: 20px 0 0; padding: 16px; text-align: left; border-radius: 16px;
    background: var(--vefa-accent-surface, #fff7f2); border: 1px solid var(--vefa-accent-border, #fbd5c2);
}
.follow-introduce__title { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--vefa-text, #0f172a); }
.follow-introduce__text { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--vefa-text-muted, #475569); }
.follow-introduce__form { display: flex; gap: 8px; margin: 0; }
.follow-introduce__input {
    flex: 1; min-width: 0; height: 46px; box-sizing: border-box; padding: 0 14px; font: inherit; font-size: 16px;
    border: 1px solid var(--vefa-border-strong, #cbd5e1); border-radius: 10px;
    background: var(--vefa-bg, #fff); color: var(--vefa-text, #0f172a);
}
.follow-introduce__submit {
    flex-shrink: 0; min-height: 46px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 600;
    background: var(--vefa-accent-action, #d93600); color: var(--vefa-text-on-primary, #fff);
}
.follow-introduce__submit:hover { background: var(--vefa-accent-action-hover, #b82d00); color: var(--vefa-text-on-primary, #fff); }
.follow-introduce__input:focus-visible,
.follow-introduce__submit:focus-visible { outline: 3px solid var(--vefa-primary, #3498db); outline-offset: 2px; }
.follow-introduce__error { margin: 8px 0 0; font-size: 13px; color: var(--vefa-danger, #dc2626); }
.follow-introduce__done { margin: 0; font-size: 14px; font-weight: 600; color: var(--vefa-success-ink, #15803d); }
