:root{--afson-accent:#1f7a34;--afson-soft:#eff9f1;--afson-text:#173b22;--afson-border:#cfdfd3;--afson-button-start:#1784e8;--afson-button-end:#0864c9;--afson-card-radius:18px;--afson-total-radius:22px;--afson-button-radius:20px;--afson-offer-font-size:var(--afson-offer-font-size);--afson-amount-font-size:var(--afson-amount-font-size);--afson-mobile-offer-font-size:14px;--afson-mobile-amount-font-size:30px}
.afson-ui--fondre-graisse{--afson-accent:#2f701f;--afson-soft:#f1f8ed;--afson-text:#1d3d0f;--afson-border:#d2e2ca}
.afson-ui--kalamani{--afson-accent:#1f5fa8;--afson-soft:#eef5ff;--afson-text:#133b66;--afson-border:#c8dcef}
.afson-ui-offers [data-row-radio]{position:relative;margin-bottom:14px;border:2px solid var(--afson-border);border-radius:var(--afson-card-radius);background:#fff;box-shadow:0 8px 22px rgba(0,0,0,.06);transition:.2s;overflow:visible;cursor:pointer}
.afson-ui-offers [data-row-radio] label{display:block;min-height:92px;padding:19px 17px 19px 62px;margin:0;box-sizing:border-box;cursor:pointer;font-weight:800;line-height:1.5;color:#293229}
.afson-ui-offers [data-row-radio] input[type=radio]{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.afson-ui-offers [data-row-radio].is-selected{border-color:var(--afson-accent);box-shadow:0 17px 34px rgba(31,122,52,.18),0 0 0 4px rgba(31,122,52,.07);transform:translateY(-3px) scale(1.012);background:linear-gradient(180deg,var(--afson-soft) 0%,#fff 92%)}
.afson-ui-offers .afson-ui-offer--featured{margin-top:25px;border:3px solid var(--afson-accent);background:linear-gradient(180deg,var(--afson-soft) 0%,#fff 100%)}
.afson-ui-offer--featured:before{content:attr(data-afson-badge);position:absolute;top:-16px;left:50%;z-index:5;transform:translateX(-50%);padding:8px 14px;border-radius:999px;background:var(--afson-accent);color:#fff;font-size:11px;line-height:1;font-weight:900;white-space:nowrap;box-shadow:0 7px 17px rgba(0,0,0,.16)}

/* Le wrapper reste sous le contrôle des conditions WS Form. */
.afson-ui-total-wrapper{margin-top:18px}
.afson-ui-total-wrapper[aria-hidden="true"],.afson-ui-total-wrapper[style*="display: none"]{display:none!important}

/* Le champ natif reste dans le DOM pour les calculs, mais devient invisible. */
.afson-ui-total-native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}

.afson-ui-total-card{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-areas:'icon amount' 'icon label';gap:5px 13px;align-items:center;width:100%;min-height:104px;box-sizing:border-box;padding:20px 22px;border:2px solid var(--afson-accent);border-radius:20px;background:linear-gradient(145deg,var(--afson-soft) 0%,#fff 78%);box-shadow:0 13px 30px rgba(0,0,0,.10);overflow:hidden;transition:transform .24s ease,box-shadow .24s ease}
.afson-ui-total-card__icon{grid-area:icon;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.75);font-size:32px;line-height:1;box-shadow:0 6px 16px rgba(0,0,0,.08)}
.afson-ui-total-card__label{grid-area:label;color:var(--afson-text);font-size:12px;line-height:1.25;font-weight:800;letter-spacing:.35px;opacity:.78;text-transform:uppercase}
.afson-ui-total-card__amount{grid-area:amount;color:var(--afson-text);font-size:31px;line-height:1.05;font-weight:950;letter-spacing:.15px}

.afson-ui-alert .wsf-alert{border:2px solid #d6a000!important;border-radius:16px!important;background:#fff8df!important;color:#4c3900!important;box-shadow:0 8px 20px rgba(153,110,0,.10)}
.afson-ui-accept{padding:13px 14px!important;border:1px solid #dfcc79!important;border-radius:13px!important;background:#fffdf4!important}
.afson-ui-accept label{font-weight:750!important}
@media(max-width:480px){.afson-ui-offers [data-row-radio] label{min-height:82px;padding:15px 13px 15px 50px;font-size:14px}.afson-ui-total-card{min-height:100px;padding:17px 18px;grid-template-columns:38px minmax(0,1fr)}.afson-ui-total-card__icon{width:38px;height:38px;font-size:29px}.afson-ui-total-card__amount{font-size:28px}.afson-ui-submit{min-height:62px!important;border-radius:18px!important}}


/* V1.2 — Animation douce du total */
@keyframes afsonTotalPolish {
    0% { transform: scale(.985); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
    55% { transform: scale(1.018); box-shadow: 0 17px 36px rgba(0,0,0,.13); }
    100% { transform: scale(1); box-shadow: 0 13px 30px rgba(0,0,0,.10); }
}
.afson-ui-total-card.is-updating{
    animation:afsonTotalPolish .42s ease both;
}

/* V1.2 — Bouton Premium */
.afson-ui-submit-wrapper{
    margin-top:18px;
}
.afson-ui-submit{
    position:relative;
    width:100%!important;
    min-height:64px;
    padding:17px 22px!important;
    border:0!important;
    border-radius:var(--afson-button-radius)!important;
    background:linear-gradient(135deg,var(--afson-button-start) 0%,var(--afson-button-end) 100%)!important;
    color:#fff!important;
    font-weight:850!important;
    letter-spacing:.25px;
    box-shadow:0 13px 27px rgba(7,101,202,.26),inset 0 1px 0 rgba(255,255,255,.20)!important;
    transition:transform .18s ease,box-shadow .18s ease,filter .18s ease!important;
    overflow:hidden;
    -webkit-tap-highlight-color:transparent;
}
.afson-ui-submit:before{
    content:"";
    position:absolute;
    top:-80%;
    left:-35%;
    width:34%;
    height:260%;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.20),transparent);
    transform:rotate(18deg);
    transition:left .5s ease;
    pointer-events:none;
}
.afson-ui-submit:hover:before{
    left:112%;
}
.afson-ui-submit:hover{
    transform:translateY(-2px);
    filter:brightness(1.035);
    box-shadow:0 17px 33px rgba(7,101,202,.31),inset 0 1px 0 rgba(255,255,255,.22)!important;
}
.afson-ui-submit.is-pressed,
.afson-ui-submit:active{
    transform:translateY(1px) scale(.992);
    box-shadow:0 7px 16px rgba(7,101,202,.22),inset 0 2px 5px rgba(0,0,0,.12)!important;
}

@media (prefers-reduced-motion: reduce){
    .afson-ui-total-card.is-updating{animation:none}
    .afson-ui-submit,.afson-ui-submit:before{transition:none!important}
}


/* =========================================================
   AFSON UI v1.3 — ELITE UI
   ========================================================= */

/* Indicateur de sélection premium */
.afson-ui-offer__indicator{
    position:absolute;
    left:17px;
    top:50%;
    z-index:3;
    display:flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    box-sizing:border-box;
    border:2px solid #829087;
    border-radius:50%;
    background:#fff;
    color:#fff;
    transform:translateY(-50%);
    box-shadow:0 4px 12px rgba(0,0,0,.07);
    transition:background .22s ease,border-color .22s ease,transform .22s ease,box-shadow .22s ease;
    pointer-events:none;
}
.afson-ui-offer__check{
    display:block;
    opacity:0;
    transform:scale(.35) rotate(-12deg);
    font-size:18px;
    line-height:1;
    font-weight:950;
    transition:opacity .2s ease,transform .2s ease;
}
.afson-ui-offers [data-row-radio].is-selected .afson-ui-offer__indicator{
    border-color:var(--afson-accent);
    background:var(--afson-accent);
    transform:translateY(-50%) scale(1.08);
    box-shadow:0 0 0 5px rgba(31,122,52,.10),0 7px 16px rgba(31,122,52,.22);
}
.afson-ui-offers [data-row-radio].is-selected .afson-ui-offer__check{
    opacity:1;
    transform:scale(1) rotate(0);
}

/* Halo animé au changement d'offre */
@keyframes afsonEliteSelect{
    0%{transform:translateY(-1px) scale(.995)}
    58%{transform:translateY(-4px) scale(1.022)}
    100%{transform:translateY(-3px) scale(1.012)}
}
.afson-ui-offers [data-row-radio].is-selected{
    animation:afsonEliteSelect .34s ease both;
}

/* Badge Elite plus fin et vivant */
.afson-ui-offer--featured:before{
    top:-14px;
    padding:7px 13px;
    font-size:10px;
    letter-spacing:.35px;
    box-shadow:0 8px 18px rgba(0,0,0,.18);
    animation:afsonEliteBadge 4.6s ease-in-out infinite;
}
@keyframes afsonEliteBadge{
    0%,84%,100%{transform:translateX(-50%) translateY(0) scale(1)}
    89%{transform:translateX(-50%) translateY(-2px) scale(1.035)}
    94%{transform:translateX(-50%) translateY(0) scale(1)}
}

/* Total Elite : montant héros + séparateur */
.afson-ui-total-card{
    grid-template-columns:48px minmax(0,1fr);
    grid-template-areas:
        "icon amount"
        "icon divider"
        "icon label";
    gap:5px 15px;
    min-height:118px;
    padding:21px 24px;
    border-radius:var(--afson-total-radius);
    background:
        radial-gradient(circle at 12% 18%,rgba(255,255,255,.92) 0,rgba(255,255,255,0) 30%),
        linear-gradient(145deg,var(--afson-soft) 0%,#fff 80%);
}
.afson-ui-total-card__icon{
    width:48px;
    height:48px;
    font-size:34px;
}
.afson-ui-total-card__amount{
    font-size:33px;
}
.afson-ui-total-card__divider{
    grid-area:divider;
    display:block;
    width:74px;
    height:2px;
    border-radius:999px;
    background:linear-gradient(90deg,var(--afson-accent),rgba(31,122,52,.16));
}
.afson-ui-total-card__label{
    font-size:11px;
    letter-spacing:.55px;
}

/* Bouton Elite avec icône */
.afson-ui-submit{
    display:flex!important;
    align-items:center;
    justify-content:center;
    gap:10px;
}
.afson-ui-submit__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:25px;
    height:25px;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    font-size:15px;
    line-height:1;
    font-weight:950;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
    transition:transform .2s ease,background .2s ease;
}
.afson-ui-submit:hover .afson-ui-submit__icon{
    transform:translateX(2px) scale(1.04);
    background:rgba(255,255,255,.24);
}
.afson-ui-submit__label{
    display:inline-block;
}

/* Clavier et accessibilité */
.afson-ui-offers [data-row-radio]:focus-within{
    outline:3px solid rgba(31,122,52,.18);
    outline-offset:3px;
}

@media(max-width:480px){
    .afson-ui-offers [data-row-radio] label{
        min-height:86px;
        padding:16px 14px 16px 58px;
        font-size:14px;
    }
    .afson-ui-offer__indicator{
        left:15px;
        width:28px;
        height:28px;
    }
    .afson-ui-total-card{
        min-height:108px;
        padding:18px 19px;
        grid-template-columns:42px minmax(0,1fr);
    }
    .afson-ui-total-card__icon{
        width:42px;
        height:42px;
        font-size:31px;
    }
    .afson-ui-total-card__amount{
        font-size:30px;
    }
    .afson-ui-submit{
        gap:8px;
    }
}

@media(prefers-reduced-motion:reduce){
    .afson-ui-offers [data-row-radio].is-selected,
    .afson-ui-offer--featured:before{
        animation:none!important;
    }
    .afson-ui-offer__indicator,
    .afson-ui-offer__check,
    .afson-ui-submit__icon{
        transition:none!important;
    }
}


/* AFSON UI 2.0 — options globales */
.afson-ui--no-shadows .afson-ui-offers [data-row-radio],
.afson-ui--no-shadows .afson-ui-total-card,
.afson-ui--no-shadows .afson-ui-submit,
.afson-ui--no-shadows .afson-ui-alert .wsf-alert{
    box-shadow:none!important;
}
.afson-ui--no-animations *,
.afson-ui--no-animations *:before,
.afson-ui--no-animations *:after{
    animation:none!important;
    transition:none!important;
}
.afson-ui--no-badges .afson-ui-offer--featured:before{
    display:none!important;
}
@media(max-width:480px){
    .afson-ui-offers [data-row-radio] label{
        font-size:var(--afson-mobile-offer-font-size)!important;
    }
    .afson-ui-total-card__amount{
        font-size:var(--afson-mobile-amount-font-size)!important;
    }
}
