/* ====================== ASSISTANT MATIERE (guide des matieres) ====================== */
/* Assistant en trois etapes : usage -> contrainte -> conseil. Memes rayons et courbes que le reste du site. */

.ab-wiz {
    max-width: 920px;
    border: 1px solid #dde6f1;
    border-radius: 6px;
    background: #ffffff;
}

.ab-wiz-bar {
    display: grid;
    gap: 12px;
    padding: 18px 28px 0;
}

.ab-wiz-count {
    margin: 0;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #66758a;
}

.ab-wiz-count b { color: #245cff; }
.ab-wiz-count span { color: #0759b5; }
.ab-wiz-count span::before { content: "·"; margin: 0 8px; color: #9aa8bb; }

.ab-wiz-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.ab-wiz-segs i {
    position: relative;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: #e6edf6;
}

.ab-wiz-segs i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #245cff;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ab-wiz-segs i.is-done::after,
.ab-wiz-segs i.is-current::after { transform: scaleX(1); }
.ab-wiz-segs i.is-current::after { background: #3ab8ff; }

.ab-wiz-stage {
    position: relative;
    padding: 28px 28px 32px;
    min-height: 380px;
    overflow: hidden;
}

.ab-wiz-stage.is-out > * { opacity: 0; transform: translateX(-24px); transition: opacity 0.18s ease, transform 0.18s ease; }
.ab-wiz-stage.is-in-back > * { animation: abWizBack 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ab-wiz-stage > * { animation: abWizIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes abWizIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes abWizBack { from { opacity: 0; transform: translateX(-28px); } }

.ab-wiz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.ab-wiz-chips span {
    padding: 4px 10px;
    border: 1px solid #dde6f1;
    border-radius: 4px;
    background: #f4f7fb;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: #4f6177;
}

.ab-wiz-q {
    margin: 0 0 6px;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0b1220;
}

.ab-wiz-sub { margin: 0 0 24px; color: #66758a; font-size: 0.96rem; }

.ab-wiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.ab-wiz-opt {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid #dde6f1;
    border-radius: 6px;
    background: #ffffff;
    color: #0b1220;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.ab-wiz-opt:hover,
.ab-wiz-opt:focus-visible {
    border-color: rgba(36, 92, 255, 0.5);
    background: #f5f8ff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(36, 92, 255, 0.1);
}

.ab-wiz-opt:focus-visible { outline: 2px solid #245cff; outline-offset: 2px; }

.ab-wiz-opt.is-picked { border-color: #245cff; background: #eef3ff; }

.ab-wiz-ico {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(36, 92, 255, 0.22);
    border-radius: 6px;
    background: rgba(36, 92, 255, 0.07);
    color: #245cff;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ab-wiz-opt:hover .ab-wiz-ico,
.ab-wiz-opt.is-picked .ab-wiz-ico { background: #245cff; color: #ffffff; }

.ab-wiz-ico svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ab-wiz-opt b { font-size: 1rem; line-height: 1.25; }
.ab-wiz-opt small { color: #66758a; font-size: 0.84rem; line-height: 1.35; }
.ab-wiz-opt.no-ico { grid-template-columns: 1fr; }

.ab-wiz-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: #0759b5;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.ab-wiz-back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* resultat */
.ab-res { display: grid; gap: 0; }

.ab-res-badge { width: 54px; height: 54px; margin: 0 0 16px; color: #16a34a; }

.ab-res-badge svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.ab-res-badge .ring {
    fill: rgba(22, 163, 74, 0.1);
    stroke-dasharray: 145;
    stroke-dashoffset: 145;
    animation: abWizDraw 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.1s forwards;
}

.ab-res-badge .tick {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: abWizDraw 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.65s forwards;
}

@keyframes abWizDraw { to { stroke-dashoffset: 0; } }

.ab-res-kicker {
    margin: 0 0 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0759b5;
}

.ab-res-title { margin: 0 0 18px; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; }

.ab-res-list { margin: 0 0 18px; padding: 0; list-style: none; border: 1px solid #dde6f1; border-radius: 6px; }

.ab-res-list li {
    display: grid;
    grid-template-columns: minmax(110px, 0.3fr) 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 14px 18px;
    border-top: 1px solid #edf2f8;
    animation: abWizRow 0.55s cubic-bezier(0.22, 1, 0.36, 1) calc(0.55s + var(--i, 0) * 0.12s) both;
}

.ab-res-list li:first-child { border-top: 0; }

.ab-res-list b { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.9rem; color: #0b1220; }
.ab-res-list span { color: #4f6177; font-size: 0.94rem; line-height: 1.5; }

@keyframes abWizRow { from { opacity: 0; transform: translateY(8px); } }

.ab-res-lib { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #dde6f1; border-left: 3px solid #245cff; border-radius: 6px; background: #f9fbfe; }
.ab-res-lib-head { margin: 0 0 10px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #66758a; }
.ab-res-lib-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.ab-res-lib-list li { display: grid; grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr); gap: 4px 14px; align-items: baseline; }
.ab-res-lib-name { font-weight: 650; color: #0b1220; }
.ab-res-lib-facts { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.78rem; color: #4f6177; }
.ab-res-lib-go { padding: 0; border: 0; background: none; font: inherit; font-weight: 650; color: #245cff; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ab-res-lib-go:hover { color: #0b3edc; }

.ab-res-note {
    margin: 0 0 24px;
    padding: 12px 16px;
    border-left: 3px solid #245cff;
    background: #f4f7fb;
    color: #4f6177;
    font-size: 0.94rem;
    line-height: 1.55;
}

.ab-res-note b { display: block; margin-bottom: 2px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: #66758a; }

.ab-res-actions { display: flex; flex-wrap: wrap; gap: 10px; }


@media (max-width: 560px) {
    .ab-wiz-bar { padding: 16px 18px 0; }
    .ab-wiz-stage { padding: 22px 18px 26px; min-height: 0; }
    .ab-res-list li { grid-template-columns: 1fr; gap: 3px; }
    .ab-res-lib-list li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ab-wiz-stage > *,
    .ab-wiz-segs i::after,
    .ab-res-badge .ring,
    .ab-res-badge .tick,
    .ab-res-list li { animation: none; transition: none; }
    .ab-res-badge .ring, .ab-res-badge .tick { stroke-dashoffset: 0; }
}

/* ---------- assistant en un seul ecran ---------- */
.ab-wiz-stage { min-height: 0; padding: 28px; }
.ab-wiz-stage > * { animation: none; }
.ab-wiz-group { display: grid; gap: 12px; margin-bottom: 26px; }
.ab-wiz-group[hidden] { display: none; }
.ab-wiz-label { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #4f6177; }
.ab-wiz-group:not([hidden]) { animation: abWizIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ab-wiz-opt.is-picked { border-color: #245cff; background: #f2f6ff; box-shadow: 0 0 0 3px rgba(36, 92, 255, 0.14); }
.ab-wiz-live[hidden] { display: none; }
.ab-wiz-live { margin-top: 4px; padding-top: 26px; border-top: 1px solid #dde6f1; }
.ab-wiz-live.is-fresh { animation: abWizIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@media (max-width: 760px) { .ab-wiz-stage { padding: 20px 16px; } }

.ab-res-more { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #dde6f1; border-radius: 6px; background: #ffffff; }
.ab-res-more-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-res-more-list li { display: grid; gap: 2px; padding-top: 10px; border-top: 1px dashed #dde6f1; }
.ab-res-more-list li:first-child { padding-top: 0; border-top: 0; }
.ab-res-more-head { display: flex; justify-content: space-between; gap: 12px; }
.ab-res-more-head b { color: #0b1220; }
.ab-res-more-head .fdm-num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86rem; color: #245cff; }
.ab-res-more-cost { font-size: 0.82rem; line-height: 1.45; color: #66758a; }

/* ---------- invitation a descendre vers la bibliotheque ---------- */
.ab-res-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; margin: 0 0 18px; padding: 20px 22px; border: 1px solid #0b1220; border-radius: 6px; background: linear-gradient(135deg, #0b1220 0%, #0f2147 100%); color: #ffffff; }
.ab-res-next-title { margin: 0 0 4px; font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; color: #ffffff; }
.ab-res-next-sub { margin: 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.68); }
.ab-res-peek { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.ab-res-peek li { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.8rem; }
.ab-res-peek-name { font-weight: 650; color: #ffffff; }
.ab-res-peek-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.ab-res-peek-bar i { display: block; height: 100%; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, #245cff, #3ab8ff); transform-origin: left; animation: abPeek 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) backwards; }
@keyframes abPeek { from { transform: scaleX(0); } }
.ab-res-peek-val { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.74rem; color: #bfe6ff; }
.ab-res-next-go { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 4px; background: #245cff; font: inherit; font-weight: 700; color: #ffffff; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(36, 92, 255, 0.8); transition: background-color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.ab-res-next-go:hover { background: #0b3edc; transform: translateY(-2px); }
.ab-res-next-go:focus-visible { outline: 3px solid rgba(58, 184, 255, 0.6); outline-offset: 3px; }
.ab-res-next-arrow { display: inline-block; font-size: 1.2rem; line-height: 1; animation: abNudge 1.1s ease-in-out 3; }
@keyframes abNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (max-width: 760px) {
    .ab-res-next { grid-template-columns: 1fr; padding: 18px; }
    .ab-res-next-go { justify-content: center; }
    .ab-res-peek li { grid-template-columns: 70px minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) { .ab-res-peek-bar i, .ab-res-next-arrow { animation: none; } }

/* ---------- assistant : choix a gauche, conseil en direct a droite ---------- */
.ab-wiz { max-width: 1216px; }
.ab-wiz-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px; }
.ab-wiz-pick { display: grid; gap: 0; min-width: 0; }
.ab-wiz-pick .ab-wiz-options { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ab-wiz-live { min-width: 0; margin-top: 0; padding-top: 0; border-top: 0; }
.ab-wiz-live.is-empty { border: 1px dashed #b9c7da; border-radius: 6px; background: #f9fbfe; }
.ab-res-empty { display: grid; justify-items: center; gap: 12px; padding: 36px 24px; text-align: center; }
.ab-res-empty-art svg { width: 74px; height: 74px; fill: rgba(36, 92, 255, 0.08); stroke: #245cff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ab-res-empty-art .e-edge { fill: none; stroke-dasharray: 3 4; opacity: 0.6; }
.ab-res-empty-art .e-cube { animation: abEmptyDraw 1.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; stroke-dasharray: 160; }
@keyframes abEmptyDraw { from { stroke-dashoffset: 160; fill-opacity: 0; } }
.ab-res-empty-title { margin: 0; font-size: 1.1rem; font-weight: 650; color: #0b1220; }
.ab-res-empty-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; text-align: left; color: #4f6177; font-size: 0.9rem; }
.ab-res-empty-list li { position: relative; padding-left: 20px; }
.ab-res-empty-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: #3ab8ff; }
.ab-res-more > summary { cursor: pointer; font-weight: 650; color: #0759b5; list-style: none; }
.ab-res-more > summary::-webkit-details-marker { display: none; }
.ab-res-more > summary::after { content: " ↓"; }
.ab-res-more[open] > summary { margin-bottom: 12px; }
.ab-res-more[open] > summary::after { content: " ↑"; }

@media (min-width: 1081px) {
    .ab-wiz-stage { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 36px; }
    .ab-wiz-pick .ab-wiz-options { grid-template-columns: 1fr 1fr; }
    .ab-wiz-live { position: sticky; top: calc(var(--header-h, 74px) + 20px); max-height: calc(100vh - var(--header-h, 74px) - 40px); overflow: auto; }
}

@media (prefers-reduced-motion: reduce) { .ab-res-empty-art .e-cube { animation: none; } }

/* ---------- alignement : cartes de meme hauteur, icones centrees, pas de carte orpheline, panneau aligne ---------- */
.ab-wiz-pick .ab-wiz-options { grid-auto-rows: 1fr; align-items: stretch; }
.ab-wiz-pick .ab-wiz-opt { grid-template-columns: 42px minmax(0, 1fr); align-content: center; align-items: center; min-height: 92px; }
.ab-wiz-pick .ab-wiz-opt.no-ico { grid-template-columns: minmax(0, 1fr); }
.ab-wiz-pick .ab-wiz-ico { align-self: center; }
.ab-wiz-pick .ab-wiz-opt b { align-self: end; line-height: 1.25; }
.ab-wiz-pick .ab-wiz-opt small { align-self: start; line-height: 1.35; }
.ab-wiz-pick .ab-wiz-options > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.ab-wiz-label { min-height: 1.2em; }

@media (min-width: 1081px) {
    .ab-wiz-stage { align-items: stretch; }
    .ab-wiz-live { align-self: start; }
    .ab-wiz-live.is-empty { align-self: stretch; display: grid; align-content: center; }
}

/* l'assistant occupe toute la largeur du conteneur, comme les autres sections (il restait cale a gauche) */
.ab-wiz { max-width: none; width: 100%; margin-inline: auto; }

/* ---------- hierarchie du resultat : un nom, un pourquoi, trois chiffres, une action ---------- */
.ab-rec { display: grid; gap: 18px; padding: 24px 24px 22px; border: 1px solid #245cff; border-radius: 6px; background: #ffffff; box-shadow: 0 24px 40px -28px rgba(36, 92, 255, 0.45); }
.ab-rec .ab-res-kicker { margin: 0; }
.ab-rec-item { display: grid; gap: 12px; }
.ab-rec-item + .ab-rec-item { padding-top: 18px; border-top: 1px dashed #dde6f1; }
.ab-rec-name { margin: 0; font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: #0b1220; }
h4.ab-rec-name { font-size: 1.35rem; }
.ab-rec-why { margin: 0; max-width: 52ch; font-size: 1rem; line-height: 1.55; color: #4f6177; }
.ab-rec-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-rec-stats li { display: grid; align-content: start; gap: 2px; padding: 12px 14px; border: 1px solid #dde6f1; border-radius: 6px; background: #f9fbfe; }
.ab-rec-stats li.is-key { border-color: #245cff; background: #f2f6ff; box-shadow: 0 0 0 3px rgba(36, 92, 255, 0.1); }
.ab-rec-stat-label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #66758a; }
.ab-rec-stats b { font-size: 1.5rem; line-height: 1.1; color: #0b1220; }
.ab-rec-stats small { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.7rem; color: #66758a; }
.ab-rec-stats em { margin-top: 4px; font-style: normal; font-size: 0.74rem; font-weight: 650; color: #0759b5; }
.ab-rec-also { margin: 0; font-size: 0.82rem; color: #66758a; }
.ab-rec-tip { margin: 0; padding: 10px 14px; border-left: 3px solid #3ab8ff; border-radius: 0 6px 6px 0; background: #f4f9ff; font-size: 0.9rem; line-height: 1.5; color: #0b3edc; }

.ab-wiz-live .ab-res-more { margin-top: 14px; margin-bottom: 0; }
.ab-wiz-live .ab-res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.ab-res-again { padding: 6px 4px; border: 0; background: none; font: inherit; font-weight: 650; color: #66758a; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ab-res-again:hover { color: #245cff; }
.ab-res-see .ab-res-next-arrow { margin-left: 4px; color: #245cff; }

@media (max-width: 560px) {
    .ab-rec { padding: 20px 16px; }
    .ab-rec-stats { grid-template-columns: 1fr; }
    .ab-rec-stats li { grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; }
    .ab-rec-stats em { margin: 0; justify-self: end; }
    .ab-wiz-live .ab-res-actions .hero-btn { width: 100%; justify-content: center; text-align: center; }
}

/* ---------- chiffres en couleur : meme code que les definitions (traction bleu, chaleur rouge, choc ambre) ---------- */
.ab-rec-stats li { --tone: #245cff; --tone-soft: rgba(36, 92, 255, 0.1); gap: 6px; padding: 14px 14px 12px; overflow: hidden; position: relative; }
.ab-rec-stats li.tone-heat { --tone: #e5483b; --tone-soft: rgba(229, 72, 59, 0.1); }
.ab-rec-stats li.tone-shock { --tone: #d9970f; --tone-soft: rgba(224, 162, 27, 0.16); }
.ab-rec-stats li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tone); }
.ab-rec-stats li { background: linear-gradient(180deg, var(--tone-soft) 0%, #ffffff 70%); border-color: color-mix(in srgb, var(--tone) 30%, #dde6f1); }
.ab-rec-stats li.is-key { border-color: var(--tone); box-shadow: 0 0 0 3px var(--tone-soft), 0 18px 28px -20px var(--tone); background: linear-gradient(180deg, var(--tone-soft) 0%, #ffffff 80%); }
.ab-rec-stat-label { display: flex; align-items: center; gap: 7px; color: #4f6177; }
.ab-rec-stat-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.ab-rec-stat-value { display: flex; align-items: baseline; gap: 6px; }
.ab-rec-stats b { font-size: 1.75rem; color: var(--tone); }
.ab-rec-stats li.tone-shock b { color: #b87a06; }
.ab-rec-gauge { position: relative; display: block; height: 6px; border-radius: 3px; background: rgba(15, 23, 42, 0.07); overflow: hidden; }
.ab-rec-gauge i { position: absolute; inset: 0; width: var(--w, 0%); border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 45%, #ffffff), var(--tone)); transform-origin: left center; animation: abGauge 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards; }
@keyframes abGauge { from { transform: scaleX(0); } }
.ab-rec-stat-foot { display: block; font-size: 0.74rem; color: #66758a; }
.ab-rec-level { font-weight: 650; color: var(--tone); }
.ab-rec-stats li.tone-shock .ab-rec-level { color: #b87a06; }
.ab-rec-stats em { color: var(--tone); }
@media (prefers-reduced-motion: reduce) { .ab-rec-gauge i { animation: none; } }

/* ====================== MOTION : l'arrivee du conseil se joue en sequence ====================== */

.ab-rec { position: relative; overflow: hidden; }
/* un trait de lumiere balaie le haut de la carte une fois */
.ab-rec::after { content: ""; position: absolute; top: 0; left: -45%; width: 45%; height: 3px; background: linear-gradient(90deg, transparent, #3ab8ff, #245cff, transparent); filter: drop-shadow(0 0 8px rgba(58, 184, 255, 0.9)); animation: abSweep 1.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both; pointer-events: none; }
@keyframes abSweep { from { left: -45%; opacity: 1; } to { left: 105%; opacity: 0; } }

/* la carte monte en pivotant legerement */
.ab-wiz-live.is-fresh .ab-rec { animation: abRecIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; transform-origin: 50% 0; }
@keyframes abRecIn { from { opacity: 0; transform: perspective(900px) translateY(26px) rotateX(8deg) scale(0.98); } }

/* le nom : lettre apres lettre */
.ab-rec-name .l { display: inline-block; animation: abLetter 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(0.12s + var(--k, 0) * 38ms); }
@keyframes abLetter { from { opacity: 0; transform: translateY(0.55em) rotate(6deg); filter: blur(4px); } }

/* le pourquoi apparait ensuite */
.ab-rec-why, .ab-rec-also { animation: abFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.45s backwards; }
@keyframes abFadeUp { from { opacity: 0; transform: translateY(10px); } }

/* les tuiles tombent une a une, leur jauge se remplit apres, le critere cle pulse */
.ab-rec-stats li { animation: abTileIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) calc(0.5s + var(--n, 0) * 0.17s) backwards; }
@keyframes abTileIn { from { opacity: 0; transform: translateY(-18px) scale(0.94); } }
.ab-rec-gauge i { animation-delay: calc(0.75s + var(--n, 0) * 0.17s); animation-duration: 1.2s; }
.ab-rec-stats li.is-key { animation: abTileIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) calc(0.5s + var(--n, 0) * 0.17s) backwards, abKeyPulse 1.2s ease-out calc(1.5s + var(--n, 0) * 0.17s) 1; }
@keyframes abKeyPulse { 0% { box-shadow: 0 0 0 0 var(--tone-soft), 0 18px 28px -20px var(--tone); } 55% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 18px 28px -20px var(--tone); } 100% { box-shadow: 0 0 0 3px var(--tone-soft), 0 18px 28px -20px var(--tone); } }
.ab-rec-level { animation: abFadeUp 0.5s ease calc(1.1s + var(--n, 0) * 0.17s) backwards; }
.ab-rec-stats em { animation: abPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(1.35s + var(--n, 0) * 0.17s) backwards; display: inline-block; transform-origin: left center; }
@keyframes abPop { from { opacity: 0; transform: scale(0.4); } }
.ab-rec-tip { animation: abFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.2s backwards; }

/* les actions arrivent en dernier */
.ab-wiz-live .ab-res-actions > * { animation: abFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.ab-wiz-live .ab-res-actions > :nth-child(1) { animation-delay: 1.3s; }
.ab-wiz-live .ab-res-actions > :nth-child(2) { animation-delay: 1.45s; }
.ab-wiz-live .ab-res-actions > :nth-child(3) { animation-delay: 1.6s; }
.ab-wiz-live .ab-res-more { animation: abFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.15s backwards; }

/* choix : une onde part de la carte cliquee */
.ab-wiz-pick .ab-wiz-opt { position: relative; overflow: hidden; }
.ab-wiz-opt.is-burst::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: rgba(36, 92, 255, 0.28); pointer-events: none; transform: translate(-50%, -50%) scale(0); animation: abRipple 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes abRipple { to { transform: translate(-50%, -50%) scale(26); opacity: 0; } }
.ab-wiz-opt.is-picked .ab-wiz-ico svg { animation: abIcoPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes abIcoPop { from { transform: scale(0.5) rotate(-18deg); } }

@media (prefers-reduced-motion: reduce) {
    .ab-rec::after { display: none; }
    .ab-wiz-live.is-fresh .ab-rec, .ab-rec-name .l, .ab-rec-why, .ab-rec-also, .ab-rec-stats li, .ab-rec-stats li.is-key, .ab-rec-level, .ab-rec-stats em, .ab-rec-tip,
    .ab-wiz-live .ab-res-actions > *, .ab-wiz-live .ab-res-more, .ab-wiz-opt.is-picked .ab-wiz-ico svg { animation: none; }
}

/* ---------- affinage facultatif ---------- */
.ab-wiz-refine { margin-top: 4px; border: 1px dashed #b9c7da; border-radius: 6px; background: #fafcff; }
.ab-wiz-refine[hidden] { display: none; }
.ab-wiz-refine > summary { padding: 12px 16px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #4f6177; cursor: pointer; list-style: none; }
.ab-wiz-refine > summary::-webkit-details-marker { display: none; }
.ab-wiz-refine > summary::after { content: "+"; float: right; font-size: 1.1rem; line-height: 1; color: #245cff; }
.ab-wiz-refine[open] > summary::after { content: "–"; }
.ab-wiz-refine-body { display: grid; gap: 16px; padding: 4px 16px 18px; }
.ab-wiz-refine-title { margin: 0 0 8px; font-size: 0.86rem; font-weight: 650; color: #0b1220; }
.ab-wiz-chips2 { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-wiz-chip { min-height: 38px; padding: 7px 14px; border: 1px solid #dde6f1; border-radius: 4px; background: #ffffff; font: inherit; font-size: 0.86rem; font-weight: 650; color: #0b1220; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.ab-wiz-chip:hover { border-color: rgba(36, 92, 255, 0.5); transform: translateY(-1px); }
.ab-wiz-chip.is-on { border-color: #245cff; background: #245cff; color: #ffffff; }
.ab-wiz-chip:focus-visible { outline: 3px solid rgba(36, 92, 255, 0.35); outline-offset: 2px; }
.ab-rec-warn { margin: 0; padding: 10px 14px; border-left: 3px solid #e0a21b; border-radius: 0 6px 6px 0; background: #fffaf0; font-size: 0.9rem; line-height: 1.5; color: #6b4a0c; }

/* pas de barre de defilement dans le panneau pendant l'animation : le panneau suit le flux de la page */
.ab-wiz-stage { overflow: visible; }
@media (min-width: 1081px) {
    .ab-wiz-live { position: static; max-height: none; overflow: visible; }
}
.ab-wiz-live, .ab-rec, .ab-wiz-live .ab-res-more { overflow-anchor: none; }

/* ====================== MOBILE : assistant et bibliotheque plus compacts ====================== */
.ab-wiz-group.is-collapsed .ab-wiz-options > :not(.is-picked) { display: none; }
.ab-wiz-group.is-collapsed .ab-wiz-options { grid-template-columns: 1fr; }
.ab-wiz-group.is-collapsed .ab-wiz-options > .is-picked::after { content: "Changer"; position: static; display: block; width: auto; height: auto; margin: 0; border-radius: 0; background: none; transform: none; animation: none; grid-column: 2; font-size: 0.78rem; font-weight: 650; color: #245cff; text-decoration: underline; }
.ab-wiz-group.is-collapsed .ab-wiz-options > .is-picked.is-burst::after { animation: none; }
@media (min-width: 1081px) { .ab-wiz-group.is-collapsed .ab-wiz-options > :not(.is-picked) { display: grid; } .ab-wiz-group.is-collapsed .ab-wiz-options { grid-template-columns: 1fr 1fr; } .ab-wiz-group.is-collapsed .ab-wiz-options > .is-picked::after { content: none; } }

@media (max-width: 760px) {
    .ab-wiz-pick .ab-wiz-opt { min-height: 68px; padding: 12px 14px; }
    .ab-wiz-pick .ab-wiz-opt small { font-size: 0.8rem; }
    .ab-wiz-pick .ab-wiz-options { gap: 10px; }
    .ab-wiz-group { margin-bottom: 20px; }
}

