/* ==========================================================================
   WiseBled — fenêtre « Télécharger l'application » (préfixe .wbx-)
   Desktop : carte centrée, 2 colonnes (visuel produit | contenu).
   Mobile  : bottom sheet avec poignée, safe-area.
   Les animations d'entrée/sortie/stagger/parallax sont pilotées par
   assets/js/download-modal.js (Web Animations API, transform/opacity).
   Couleurs/rayons/polices alignés sur les tokens de ws-site.css (--ws-*, --brand-*,
   --night-*, --mint-*) avec valeurs de repli.
   ========================================================================== */

#wb-download-modal.wbx {
    --wbx-primary: var(--ws-primary, #5641e8);
    --wbx-primary-700: var(--ws-primary-700, #35279a);
    --wbx-primary-50: var(--ws-primary-50, #f2f0ff);
    --wbx-primary-100: var(--ws-primary-100, #e5e1ff);
    --wbx-violet: var(--ws-violet, #8b5cf6);
    --wbx-grad: var(--ws-grad, linear-gradient(135deg, #6b57fa 0%, #8b5cf6 48%, #c056f0 100%));
    --wbx-ink: var(--ws-ink, #0b0d1a);
    --wbx-text: var(--ws-text, #3a3f5c);
    --wbx-muted: var(--ws-muted, #5f647f);
    --wbx-line: var(--ws-line, #e4e5ee);
    --wbx-bg: var(--ws-bg, #fff);
    --wbx-bg-alt: var(--ws-bg-alt, #f6f6fa);
    --wbx-success: var(--ws-success, #059669);
    --wbx-dark: var(--ws-dark, #0e1124);
    --wbx-r-sm: var(--ws-r-sm, 12px);
    --wbx-r-md: var(--ws-r-md, 16px);
    --wbx-r-lg: var(--ws-radius-lg, 28px);
    --wbx-ease: var(--ws-ease, cubic-bezier(.16, 1, .3, 1));
    --wbx-ring: var(--ws-ring, rgba(107, 87, 250, .55));
    --wbx-font: var(--ws-font, 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif);
    --wbx-font-display: var(--ws-font-display, var(--wbx-font));

    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--wbx-text);
    font-family: var(--wbx-font);
    overflow: hidden;
    overflow: clip;
    -webkit-font-smoothing: antialiased;
}
#wb-download-modal.wbx:not([open]) { display: none; }
#wb-download-modal.wbx[open] {
    display: grid;
    place-items: center;
    padding: 24px;
}
#wb-download-modal.wbx::backdrop { background: transparent; }

#wb-download-modal *,
#wb-download-modal *::before,
#wb-download-modal *::after { box-sizing: border-box; }

#wb-download-modal :focus-visible {
    outline: 3px solid var(--wbx-ring);
    outline-offset: 2px;
}

/* ---------- Fond ---------- */
.wbx-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 30% 30%, rgba(107, 87, 250, .28), transparent 70%),
        radial-gradient(50% 50% at 75% 75%, rgba(192, 86, 240, .18), transparent 70%),
        rgba(4, 5, 11, .58);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    will-change: opacity;
}

/* ---------- Carte ---------- */
.wbx-card {
    position: relative;
    display: flex; /* flex (et non grid) : la hauteur max est bien répercutée, la colonne de droite défile */
    align-items: stretch;
    width: min(760px, 100%);
    min-height: 0;
    max-height: min(820px, calc(100vh - 48px));
    max-height: min(820px, calc(100dvh - 48px));
    border-radius: var(--wbx-r-lg);
    background: var(--wbx-bg);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .5),
        0 40px 100px -30px rgba(8, 10, 40, .65),
        0 18px 40px -20px rgba(86, 65, 232, .45),
        0 0 80px -10px rgba(139, 92, 246, .28);
    overflow: hidden;
    overflow: clip; /* empêche le défilement programmatique (focus) de la carte */
    will-change: transform, opacity;
    transform-origin: 50% 60%;
}

.wbx-grab { display: none; }

.wbx-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--wbx-ink);
    cursor: pointer;
    transition: transform .25s var(--wbx-ease), background-color .2s, box-shadow .2s;
    box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .25);
}
.wbx-close:hover { background: #fff; transform: rotate(90deg); }
.wbx-close .ws-i { width: 20px; height: 20px; }

/* ---------- Visuel produit ---------- */
.wbx-visual {
    position: relative;
    display: flex;
    flex: 0 0 45%;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
    background:
        radial-gradient(90% 60% at 20% 0%, rgba(107, 87, 250, .55), transparent 60%),
        radial-gradient(70% 50% at 100% 100%, rgba(192, 86, 240, .38), transparent 65%),
        linear-gradient(165deg, var(--night-3, #161a33) 0%, var(--brand-900, #231a6a) 55%, #3a1f86 100%);
    perspective: 900px;
}
.wbx-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .7;
    z-index: -1;
    pointer-events: none;
}
.wbx-orb--a { width: 220px; height: 220px; left: -60px; top: 18%; background: var(--brand-500, #6b57fa); animation: wbx-drift 14s ease-in-out infinite alternate; }
.wbx-orb--b { width: 180px; height: 180px; right: -40px; bottom: 6%; background: var(--violet-500, #8b5cf6); animation: wbx-drift 18s ease-in-out infinite alternate-reverse; }
.wbx-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.wbx-scene {
    position: relative;
    flex: 1 1 auto;
    min-height: 0; /* la hauteur de la carte est dictée par la colonne de droite */
}
.wbx-stage {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    will-change: transform;
}
.wbx-laptop,
.wbx-phone,
.wbx-chip { position: absolute; will-change: transform; }

/* Ordinateur portable : entièrement dans la colonne (il débordait du bord gauche de la carte) */
.wbx-laptop { left: 9%; top: 17%; width: 82%; }
.wbx-laptop__lid {
    position: relative;
    padding: 2.6% 2.6% 3.2%;
    border-radius: 14px 14px 4px 4px;
    background: linear-gradient(160deg, #2b3045, #10131f);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .14),
        0 30px 60px -20px rgba(0, 0, 0, .6);
}
.wbx-laptop__cam {
    position: absolute;
    top: 1%;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: #3b4258;
}
.wbx-laptop__screen {
    aspect-ratio: 2048 / 1408;
    border-radius: 4px;
    overflow: hidden;
    background: #f1f5f9;
}
.wbx-laptop__base {
    position: relative;
    height: 10px;
    margin: 0 -5%;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #d4d8e3, #8b91a3);
    box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .55);
}
.wbx-laptop__base::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 16%;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 0 0 6px 6px;
    background: #9aa0b2;
}

/* Téléphone */
.wbx-phone { right: 6%; bottom: 3%; width: 38%; max-width: 140px; }
.wbx-phone__body {
    position: relative;
    padding: 5.5%;
    border-radius: 26px;
    background: linear-gradient(145deg, #2a3048, #0b1020 60%);
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, .16),
        0 34px 60px -18px rgba(0, 0, 0, .7),
        0 0 40px -6px rgba(139, 92, 246, .55); /* --violet-500 */
}
.wbx-phone__island {
    position: absolute;
    top: 3.6%;
    left: 50%;
    z-index: 2;
    width: 30%;
    height: 3.2%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #05070f;
}
.wbx-phone__screen {
    aspect-ratio: 1206 / 2622;
    border-radius: 20px;
    overflow: hidden;
    background: #f1f5f9;
}
.wbx-visual img,
.wbx-grab {
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}
.wbx-visual img { pointer-events: none; }
.wbx-shot,
.wbx-shot__img,
.wbx-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Puces flottantes */
.wbx-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.wbx-chip--offline { left: 8%; top: 6%; }
.wbx-chip--sync { left: 8%; bottom: 8%; }
.wbx-chip__dot {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--wbx-primary);
}
.wbx-chip__dot--ok { color: var(--wbx-success); }
.wbx-chip__dot .ws-i { width: 14px; height: 14px; }

/* Lévitation douce (CSS, transform uniquement) */
.wbx-float { animation: wbx-float 6s ease-in-out infinite; }
.wbx-float--slow { animation-duration: 8s; animation-delay: -2s; }
#wb-download-modal:not(.is-open) .wbx-float,
#wb-download-modal:not(.is-open) .wbx-orb { animation-play-state: paused; }

/* ---------- Contenu ---------- */
.wbx-body {
    display: flex;
    flex: 1 1 55%;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 34px 30px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.wbx-eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin: 0 52px 14px 0;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    background: var(--wbx-primary-50);
    color: var(--wbx-primary-700);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .01em;
}
.wbx-eyebrow img { width: 20px; height: 20px; border-radius: 6px; }

.wbx-title {
    margin: 0 0 10px;
    font-family: var(--wbx-font-display);
    font-size: clamp(1.45rem, 1.1rem + 1vw, 1.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.022em;
    color: var(--wbx-ink);
    outline: none;
    text-wrap: balance;
}
#wb-download-modal .wbx-title:focus,
#wb-download-modal .wbx-title:focus-visible { outline: none; }
.wbx-lead {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--wbx-muted);
    text-wrap: pretty;
}

/* Bénéfices — version visuel (desktop, sur fond indigo) */
.wbx-benefits.wbx-benefits--body { display: none; }
.wbx-benefits.wbx-benefits--visual {
    position: relative;
    z-index: 2;
    flex: none;
    margin: 0;
    padding: 6px 26px 28px;
}
.wbx-benefits--visual .wbx-benefit__icon {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.wbx-benefits--visual .wbx-benefit__text strong { color: #fff; }
.wbx-benefits--visual .wbx-benefit__text span { color: rgba(237, 233, 254, .82); }

/* Bénéfices */
.wbx-benefits {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}
.wbx-benefit { display: flex; align-items: flex-start; gap: 12px; }
.wbx-benefit__icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--wbx-primary-50), var(--wbx-primary-100));
    color: var(--wbx-primary);
    box-shadow: inset 0 0 0 1px rgba(86, 65, 232, .12);
}
.wbx-benefit__icon .ws-i { width: 18px; height: 18px; }
.wbx-benefit__text { display: grid; gap: 1px; min-width: 0; }
.wbx-benefit__text strong { font-size: 14px; font-weight: 700; color: var(--wbx-ink); line-height: 1.35; }
.wbx-benefit__text span { font-size: 13px; line-height: 1.45; color: var(--wbx-muted); }

/* Plateforme détectée */
.wbx-primary {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
    padding: 16px;
    border-radius: var(--wbx-r-md);
    border: 1px solid transparent;
    background:
        linear-gradient(135deg, #f8f7ff, var(--wbx-primary-50)) padding-box,
        linear-gradient(135deg, rgba(107, 87, 250, .55), rgba(192, 86, 240, .4), rgba(107, 87, 250, .15)) border-box;
    box-shadow: 0 16px 40px -24px rgba(86, 65, 232, .55);
}
.wbx-primary__head { display: flex; align-items: center; gap: 12px; }
.wbx-primary__icon {
    flex: none;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--wbx-ink);
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(11, 16, 32, .8);
}
.wbx-primary[data-primary="android"] .wbx-primary__icon { background: #fff; box-shadow: inset 0 0 0 1px var(--wbx-line), 0 10px 22px -14px rgba(11, 16, 32, .6); }
.wbx-primary[data-primary="windows"] .wbx-primary__icon { background: #0067c0; }
.wbx-primary[data-primary="web"] .wbx-primary__icon { background: var(--wbx-grad); }
.wbx-primary__icon .ws-i { width: 22px; height: 22px; }
.wbx-primary__copy { display: grid; gap: 2px; min-width: 0; }
.wbx-primary__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--wbx-primary-700);
}
.wbx-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint-500, #10b981);
}
.wbx-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--mint-500, #10b981);
    animation: wbx-pulse 2s var(--wbx-ease) infinite;
}
.wbx-primary__title { font-family: var(--wbx-font-display); font-size: 17px; font-weight: 800; color: var(--wbx-ink); line-height: 1.25; }
.wbx-primary__meta { font-size: 13px; color: var(--wbx-muted); line-height: 1.4; }

.wbx-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--wbx-grad);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 14px 30px -12px rgba(86, 65, 232, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .3s var(--wbx-ease), box-shadow .3s var(--wbx-ease);
}
.wbx-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(86, 65, 232, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
.wbx-cta:active { transform: translateY(0) scale(.985); }
.wbx-cta .ws-i { width: 18px; height: 18px; flex: none; }
.wbx-cta__shine {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
    transform: translateX(-110%);
    transition: transform .8s var(--wbx-ease);
}
.wbx-cta:hover .wbx-cta__shine { transform: translateX(110%); }

/* Autres plateformes */
.wbx-others-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--wbx-muted);
}
.wbx-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.wbx-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    height: 100%;
    padding: 8px 12px;
    border-radius: var(--wbx-r-sm);
    border: 1px solid var(--wbx-line);
    background: var(--wbx-bg);
    color: var(--wbx-ink);
    text-decoration: none;
    transition: transform .25s var(--wbx-ease), border-color .2s, box-shadow .25s var(--wbx-ease), background-color .2s;
}
.wbx-platform:hover {
    color: var(--wbx-ink);
    transform: translateY(-2px);
    border-color: rgba(86, 65, 232, .35);
    box-shadow: 0 12px 24px -16px rgba(86, 65, 232, .55);
}
.wbx-platform__icon {
    flex: none;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--wbx-bg-alt);
    color: var(--wbx-ink);
}
.wbx-platform--ios .wbx-platform__icon { background: var(--wbx-ink); color: #fff; }
.wbx-platform--windows .wbx-platform__icon { color: #0067c0; }
.wbx-platform--web .wbx-platform__icon { color: var(--wbx-primary); }
.wbx-platform__icon .ws-i { width: 18px; height: 18px; }
.wbx-platform--android .wbx-platform__icon .ws-i { width: 20px; height: 20px; }
.wbx-platform__text { display: grid; min-width: 0; line-height: 1.2; }
.wbx-platform__text small { font-size: 11px; font-weight: 600; color: var(--wbx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbx-platform__text span { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pied */
.wbx-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--wbx-line);
}
.wbx-installed,
.wbx-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, transform .25s var(--wbx-ease);
}
.wbx-installed {
    border: 1px solid var(--wbx-line);
    background: var(--wbx-bg);
    color: var(--wbx-text);
}
.wbx-installed:hover { background: var(--wbx-bg-alt); color: var(--wbx-ink); }
.wbx-installed .ws-i { width: 18px; height: 18px; color: var(--wbx-success); }
.wbx-all { margin-right: -10px; border: 0; background: transparent; color: var(--wbx-primary-700); }
.wbx-all:hover { color: var(--wbx-primary-700); background: var(--wbx-primary-50); }
.wbx-all .ws-i { width: 16px; height: 16px; transition: transform .25s var(--wbx-ease); }
.wbx-all:hover .ws-i { transform: translateX(3px); }

.wbx-fineprint {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wbx-muted);
}
.wbx-desk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    color: var(--wbx-muted);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(95, 100, 127, .4);
    text-underline-offset: 3px;
}
.wbx-desk:hover { color: var(--wbx-primary-700); }
.wbx-desk .ws-i { width: 14px; height: 14px; flex: none; }

/* Verrou de défilement */
html.wb-dl-modal-open { overflow: hidden; scrollbar-gutter: stable; }

/* ---------- Mobile : bottom sheet ---------- */
@media (max-width: 767px) {
    #wb-download-modal.wbx[open] {
        place-items: end stretch;
        padding: 0;
        padding-top: max(16px, env(safe-area-inset-top));
    }
    .wbx-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 0;
        max-height: calc(100vh - max(16px, env(safe-area-inset-top)));
        max-height: calc(100dvh - max(16px, env(safe-area-inset-top)));
        border-radius: 28px 28px 0 0;
        transform-origin: 50% 100%;
        box-shadow: 0 -20px 60px -20px rgba(8, 10, 40, .6);
    }
    .wbx-grab {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 4;
        display: flex;
        justify-content: center;
        height: 28px;
        padding-top: 9px;
        touch-action: none;
        cursor: grab;
    }
    .wbx-grab__bar {
        width: 44px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .55);
    }
    .wbx-close { top: 16px; right: 14px; }
    .wbx-visual {
        flex: none;
        height: 188px;
        min-height: 0;
        touch-action: none;
        cursor: grab;
    }
    .wbx-scene { position: absolute; inset: 0; min-height: 0; }
    .wbx-benefits.wbx-benefits--visual { display: none; }
    .wbx-benefits.wbx-benefits--body { display: grid; }
    /* Composition centrée, dimensions bornées : rien n'est coupé de 320 à 767 px */
    .wbx-laptop { left: calc(50% - 132px); top: 38px; width: 204px; }
    .wbx-phone { left: calc(50% + 38px); right: auto; bottom: auto; top: 30px; width: 80px; max-width: none; }
    .wbx-phone__body { border-radius: 18px; }
    .wbx-phone__screen { border-radius: 13px; }
    .wbx-laptop__lid { border-radius: 10px 10px 3px 3px; }
    .wbx-laptop__base { height: 7px; }
    .wbx-chip { font-size: 11px; padding: 5px 10px 5px 5px; }
    .wbx-chip__dot { width: 20px; height: 20px; }
    .wbx-chip--offline { left: 14px; top: auto; bottom: 14px; background: rgba(12, 14, 34, .78); border-color: rgba(255, 255, 255, .18); }
    .wbx-chip--sync { display: none; }

    .wbx-body {
        flex: 1 1 auto;
        padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
    }
    .wbx-eyebrow { margin-right: 0; margin-bottom: 10px; }
    .wbx-title { font-size: 1.45rem; }
    .wbx-lead { font-size: 14px; margin-bottom: 16px; }
    /* Le bouton principal remonte avant les bénéfices sur mobile */
    .wbx-primary { order: 1; }
    .wbx-others-label { order: 2; }
    .wbx-platforms { order: 3; }
    .wbx-benefits { order: 4; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--wbx-line); }
    .wbx-foot { order: 5; }
    .wbx-fineprint { order: 6; }
    .wbx-all { margin-right: -6px; padding: 0 10px; }
}

@media (max-width: 379px) {
    /* Petits écrans : la composition se décale à gauche pour laisser le bouton Fermer dégagé */
    .wbx-laptop { left: 14px; top: 44px; width: 180px; }
    .wbx-phone { left: 148px; top: 36px; width: 70px; }
}
@media (max-width: 359px) {
    .wbx-platforms { grid-template-columns: 1fr; }
}

/* Écrans bas (paysage mobile, petits portables) */
@media (min-width: 768px) and (max-height: 760px) {
    .wbx-benefits--visual .wbx-benefit__text span { display: none; }
    .wbx-benefits.wbx-benefits--visual { gap: 8px; padding-bottom: 22px; }
    .wbx-body { padding-top: 28px; }
    .wbx-lead { margin-bottom: 14px; }
}

/* ---------- Keyframes ---------- */
@keyframes wbx-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -8px, 0); }
}
@keyframes wbx-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(30px, -24px, 0) scale(1.15); }
}
@keyframes wbx-pulse {
    0% { transform: scale(1); opacity: .7; }
    80%, 100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Mouvement réduit : aucune animation ---------- */
@media (prefers-reduced-motion: reduce) {
    #wb-download-modal *,
    #wb-download-modal *::before,
    #wb-download-modal *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Contraste élevé / forced colors */
@media (forced-colors: active) {
    .wbx-card { border: 2px solid CanvasText; }
    .wbx-cta, .wbx-platform, .wbx-installed { border: 1px solid ButtonText; }
}
