/* ============================================================
   HBSN DON v3
   Couleur : #119ED6  |  Police : Outfit
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --h-blue:       #119ED6;
    --h-blue-d:     #0d87b8;
    --h-blue-l:     #e3f4fb;
    --h-gray:       #58595B;
    --h-light:      #f5f7fa;
    --h-dark:       #0a1628;
    --h-white:      #ffffff;
    --h-green:      #22c55e;
    --h-orange:     #f97316;
    --h-red:        #ef4444;
    --h-r:          12px;
    --h-font:       'Outfit', sans-serif;
    --h-shadow:     0 4px 24px rgba(0,0,0,.08);
}

/* ============================================================
   GRILLE + CARTES
============================================================ */
.hbsn-grid { display: grid; gap: 24px; font-family: var(--h-font); }
.hbsn-cols-1 { grid-template-columns: 1fr; }
.hbsn-cols-2 { grid-template-columns: repeat(2, 1fr); }
.hbsn-cols-3 { grid-template-columns: repeat(3, 1fr); }
.hbsn-cols-4 { grid-template-columns: repeat(4, 1fr); }

.hbsn-card {
    background: var(--h-white);
    border-radius: var(--h-r);
    box-shadow: var(--h-shadow);
    overflow: hidden;
    border: 1.5px solid #eee;
    font-family: var(--h-font);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.hbsn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(17,158,214,.15);
    border-color: var(--h-blue);
}
.hbsn-card__img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--h-blue-l);
}
.hbsn-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.hbsn-card:hover .hbsn-card__img img { transform: scale(1.05); }
.hbsn-card__img-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: var(--h-blue); }

.hbsn-card__badge {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 12px; border-radius: 100px; font-size: .72rem; font-weight: 700;
    font-family: var(--h-font); display: inline-flex; align-items: center; gap: 5px;
}
.hbsn-card__badge--success { background: var(--h-green); color: #fff; }
.hbsn-card__badge--closed  { background: var(--h-gray);  color: #fff; }

.hbsn-card__body { padding: 20px; }
.hbsn-card__title { font-family: var(--h-font) !important; font-size: 1.1rem !important; font-weight: 700 !important; color: var(--h-dark) !important; margin: 0 0 10px !important; }
.hbsn-card__desc  { font-size: .87rem; color: var(--h-gray); line-height: 1.6; margin-bottom: 16px !important; }

.hbsn-progress-bar, .hbsn-hero__progress-bar {
    background: #e8e8e8; border-radius: 100px; height: 8px; overflow: hidden; margin-bottom: 8px;
}
.hbsn-progress-bar__fill, .hbsn-hero__progress-fill {
    height: 100%; background: var(--h-blue); border-radius: 100px; transition: width .8s cubic-bezier(.4,0,.2,1);
}
.hbsn-card__stats { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--h-gray); }
.hbsn-card__collecte, .hbsn-hero__collecte { font-weight: 700; color: var(--h-blue); }
.hbsn-card__pct, .hbsn-hero__pct { font-weight: 800; color: var(--h-dark); font-size: 1.05rem; }
.hbsn-card__progress, .hbsn-hero__progress { margin-bottom: 16px; }

.hbsn-card__btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; background: var(--h-blue); color: #fff !important;
    font-family: var(--h-font); font-weight: 700; font-size: .95rem;
    padding: 13px 20px; border-radius: 8px; border: none; cursor: pointer;
    margin-top: 14px; text-decoration: none !important;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.hbsn-card__btn:hover:not(.hbsn-card__btn--disabled) {
    background: var(--h-blue-d); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(17,158,214,.3);
}
.hbsn-card__btn--disabled { background: #ccc; cursor: default; color: #666 !important; }

/* ============================================================
   OVERLAY + POPUP
============================================================ */
.hbsn-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
    padding: 16px; box-sizing: border-box;
}
.hbsn-overlay.open { opacity: 1; visibility: visible; }

.hbsn-popup {
    background: var(--h-white); border-radius: 20px;
    width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto;
    padding: 28px 26px 24px; position: relative; font-family: var(--h-font);
    transform: translateY(28px); transition: transform .3s;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    scrollbar-width: thin; scrollbar-color: var(--h-blue-l) transparent;
}
.hbsn-overlay.open .hbsn-popup { transform: translateY(0); }

.hbsn-popup__close {
    position: absolute; top: 14px; right: 16px;
    background: var(--h-light); border: none; border-radius: 50%;
    width: 34px; height: 34px; font-size: .95rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--h-gray); transition: background .2s;
}
.hbsn-popup__close:hover { background: #e0e0e0; }

.hbsn-popup__header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1.5px solid #f0f0f0;
}
.hbsn-popup__icon { font-size: 2rem; color: var(--h-blue); flex-shrink: 0; }
.hbsn-popup__icon--sm { font-size: 1.5rem; }
.hbsn-popup__title { font-size: 1.2rem !important; font-weight: 800 !important; color: var(--h-dark) !important; margin: 0 0 3px !important; font-family: var(--h-font) !important; }
.hbsn-popup__sub { font-size: .82rem; color: var(--h-gray); margin: 0 !important; }

.hbsn-back-btn {
    background: var(--h-light); border: none; border-radius: 50%;
    width: 32px; height: 32px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--h-gray); transition: background .2s; font-size: .85rem;
}
.hbsn-back-btn:hover { background: #e0e0e0; color: var(--h-dark); }

/* ============================================================
   ECRAN 1 — METHODES
============================================================ */
.hbsn-methods { display: flex; flex-direction: column; gap: 10px; }
.hbsn-methods__loading {
    text-align: center; padding: 32px; color: var(--h-blue);
    display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .92rem;
}
.hbsn-methods__empty {
    text-align: center; padding: 28px; color: var(--h-gray);
    background: var(--h-light); border-radius: var(--h-r); font-size: .9rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.hbsn-method-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--h-white); border: 2px solid #e8e8e8; border-radius: 12px;
    padding: 16px 16px; cursor: pointer; font-family: var(--h-font);
    text-align: left; transition: border-color .2s, background .2s, transform .15s;
    width: 100%;
}
.hbsn-method-card:hover {
    border-color: var(--h-blue); background: var(--h-blue-l);
    transform: translateX(4px);
}
.hbsn-method-card__icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--h-blue-l); display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--h-blue); flex-shrink: 0;
    transition: background .2s, color .2s;
}
.hbsn-method-card:hover .hbsn-method-card__icon { background: var(--h-blue); color: #fff; }
.hbsn-method-card__body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hbsn-method-card__body strong { font-size: .97rem; color: var(--h-dark); font-weight: 700; }
.hbsn-method-card__body span   { font-size: .8rem; color: var(--h-gray); }
.hbsn-method-card__badge {
    background: var(--h-light); border-radius: 100px; padding: 4px 10px;
    font-size: .72rem; font-weight: 600; color: var(--h-gray);
    white-space: nowrap; border: 1px solid #e0e0e0;
}
.hbsn-method-card__arrow { color: #ccc; font-size: .85rem; transition: color .2s, transform .2s; }
.hbsn-method-card:hover .hbsn-method-card__arrow { color: var(--h-blue); transform: translateX(3px); }

/* ============================================================
   FORMULAIRE COMMUN
============================================================ */
.hbsn-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hbsn-amount-btn {
    background: var(--h-white); border: 2px solid #ddd; border-radius: 8px;
    padding: 7px 13px; font-family: var(--h-font); font-weight: 600; font-size: .84rem;
    cursor: pointer; color: var(--h-dark); transition: all .2s; white-space: nowrap;
}
.hbsn-amount-btn small { font-size: .65rem; font-weight: 400; }
.hbsn-amount-btn:hover, .hbsn-amount-btn.active { border-color: var(--h-blue); background: var(--h-blue); color: #fff; }

.hbsn-form { margin-top: 4px; }
.hbsn-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hbsn-form__field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.hbsn-form__field label {
    font-size: .73rem; font-weight: 700; letter-spacing: .7px;
    text-transform: uppercase; color: var(--h-gray); font-family: var(--h-font);
}
.hbsn-form__field input,
.hbsn-form__field textarea {
    background: var(--h-light) !important; border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important; padding: 10px 13px !important;
    font-family: var(--h-font) !important; font-size: .92rem !important;
    color: var(--h-dark) !important; width: 100% !important; box-sizing: border-box !important;
    outline: none !important; transition: border-color .2s !important;
}
.hbsn-form__field input:focus,
.hbsn-form__field textarea:focus { border-color: var(--h-blue) !important; background: #fff !important; }
.hbsn-form__field textarea { min-height: 68px; resize: vertical; }

.hbsn-submit-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; background: var(--h-blue); color: #fff !important;
    font-family: var(--h-font); font-weight: 700; font-size: .97rem;
    padding: 14px; border-radius: 10px; border: none; cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s; margin-top: 6px;
}
.hbsn-submit-btn:hover:not(:disabled) {
    background: var(--h-blue-d); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(17,158,214,.3);
}
.hbsn-submit-btn:disabled { opacity: .65; cursor: default; transform: none; }
.hbsn-submit-btn--confirm { background: #0f7a3c; }
.hbsn-submit-btn--confirm:hover:not(:disabled) { background: #0b6533; }
.hbsn-submit-btn--outline {
    background: transparent; color: var(--h-blue) !important;
    border: 2px solid var(--h-blue);
}
.hbsn-submit-btn--outline:hover { background: var(--h-blue-l); transform: none; box-shadow: none; }

.hbsn-loader {
    text-align: center; padding: 16px; color: var(--h-blue);
    display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .9rem;
}

/* ============================================================
   BLOC QR CODE
============================================================ */
.hbsn-qr-bloc { text-align: center; margin-bottom: 18px; }
.hbsn-qr-bloc__img {
    display: inline-block; background: var(--h-light);
    border: 2px dashed #ccc; border-radius: 12px; padding: 18px; margin-bottom: 14px;
}
.hbsn-qr-bloc__img img { display: block; max-width: 180px; height: auto; margin: 0 auto; }
.hbsn-qr-bloc__hint {
    background: var(--h-blue-l); border-radius: 8px; padding: 12px 14px;
    font-size: .85rem; color: var(--h-gray);
    display: flex; align-items: flex-start; gap: 8px; text-align: left;
}
.hbsn-qr-bloc__hint i { color: var(--h-blue); flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   BLOC CODE MARCHAND
============================================================ */
.hbsn-code-bloc {
    background: var(--h-light); border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.hbsn-code-bloc__label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .7px; color: var(--h-gray); margin-bottom: 10px;
}
.hbsn-code-bloc__row { display: flex; align-items: center; gap: 10px; }
.hbsn-code-bloc__val {
    font-family: 'Courier New', monospace; font-size: 1.5rem;
    font-weight: 700; color: var(--h-blue); letter-spacing: 1px; flex: 1;
}
.hbsn-copy-btn {
    display: flex; align-items: center; gap: 6px;
    background: var(--h-white); border: 1.5px solid var(--h-blue); border-radius: 8px;
    padding: 8px 13px; font-family: var(--h-font); font-size: .82rem; font-weight: 600;
    color: var(--h-blue); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.hbsn-copy-btn:hover { background: var(--h-blue); color: #fff; }
.hbsn-copy-btn.copied { background: var(--h-green); border-color: var(--h-green); color: #fff; }

.hbsn-instr {
    margin-bottom: 14px;
}
.hbsn-instr p {
    background: var(--h-blue-l); border-radius: 8px; padding: 12px 14px;
    font-size: .86rem; color: var(--h-gray); margin: 0 !important;
    display: flex; gap: 8px;
}
.hbsn-instr i { color: var(--h-blue); flex-shrink: 0; margin-top: 2px; }

/* Hint montant */
.hbsn-montant-hint {
    display: flex; align-items: center; gap: 8px;
    background: #fff7ed; border: 1.5px solid var(--h-orange);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
    font-size: .88rem; color: #92400e;
}
.hbsn-montant-hint i { color: var(--h-orange); }

/* ============================================================
   ECRAN SUCCES
============================================================ */
.hbsn-screen--success { text-align: center; padding: 20px 0; }
.hbsn-screen--success > i { font-size: 3.5rem; color: var(--h-green); display: block; margin-bottom: 16px; }
.hbsn-screen--success h2 { font-family: var(--h-font) !important; font-size: 1.4rem !important; font-weight: 800 !important; color: var(--h-dark) !important; margin: 0 0 12px !important; }
.hbsn-screen--success p { font-size: .9rem; color: var(--h-gray); margin: 0 0 8px !important; }
.hbsn-ref { font-size: .85rem !important; }
.hbsn-ref strong { color: var(--h-blue); font-family: monospace; }
.hbsn-screen--success .hbsn-submit-btn { margin-top: 20px; }

/* Barre d'erreur */
.hbsn-error-bar {
    display: flex; align-items: center; gap: 10px;
    background: #fff0f0; border: 1.5px solid var(--h-red); border-radius: 8px;
    padding: 11px 14px; margin-top: 14px; font-size: .86rem; color: #b91c1c;
    font-family: var(--h-font);
}
.hbsn-error-bar i { color: var(--h-red); flex-shrink: 0; }

/* ============================================================
   HERO CAMPAGNE
============================================================ */
.hbsn-hero { font-family: var(--h-font); }
.hbsn-hero--side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.hbsn-hero--stacked { display: flex; flex-direction: column; gap: 28px; }
.hbsn-hero__img img { width: 100%; border-radius: var(--h-r); box-shadow: var(--h-shadow); display: block; }
.hbsn-hero__title { font-family: var(--h-font) !important; font-size: clamp(1.6rem,3vw,2.2rem) !important; font-weight: 800 !important; color: var(--h-dark) !important; margin: 0 0 16px !important; }
.hbsn-hero__desc { color: var(--h-gray); font-size: .97rem; line-height: 1.75; margin-bottom: 24px !important; }
.hbsn-hero__stats { display: flex; justify-content: space-between; margin-top: 8px; }
.hbsn-hero__stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hbsn-hero__stats small { font-size: .72rem; color: var(--h-gray); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
    .hbsn-cols-4 { grid-template-columns: repeat(2,1fr); }
    .hbsn-cols-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
    .hbsn-cols-2, .hbsn-cols-3, .hbsn-cols-4 { grid-template-columns: 1fr; }
    .hbsn-hero--side-by-side { grid-template-columns: 1fr; }
    .hbsn-form__row { grid-template-columns: 1fr; }
    .hbsn-popup { padding: 22px 14px 18px; }
    .hbsn-method-card__badge { display: none; }
}
