/* ============================================================
   instant-app.css — Coques instantanées (0 ms) + Shimmers BD
   ciblés + Mode hors-ligne pour les 6 pages principales de /app/
   (index, shortlinks, style, stats, tools, settings)
   ============================================================ */

/* Échange atomique en 1 seule frame entre la coque et la vraie page
   (Chrome 126+, Edge 126+, Safari 18.2+ / iOS 18.2+) : zéro frame noire,
   zéro double flash pendant que la nouvelle page finit de se parser. */
@view-transition { navigation: auto; }
::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) {
    animation: none !important;
    animation-duration: 0s !important;
    mix-blend-mode: normal;
}
::view-transition-old(root) { display: none; }

/* Garde la largeur de la barre de défilement constante sur ordi :
   empêche le décalage horizontal de 7,5 px à l'ouverture/fermeture de la coque. */
@media (min-width: 1024px) {
    html { scrollbar-gutter: stable; }
}

/* ── Conteneur principal de la coque instantanée ── */
#bxInstantShell {
    position: fixed;
    top: 60px;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 850;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background:
        radial-gradient(at   0% 0%, hsla(253, 16%,  7%, 1) 0, transparent 50%),
        radial-gradient(at  50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%),
        #050505;
    background-attachment: fixed;
    color: #fff;
    display: none;
    flex-direction: column;
}
@media (min-width: 1024px) {
    #bxInstantShell {
        top: 64px;
        bottom: 0;
        left: 280px;
    }
}
html.bx-shell-open #bxInstantShell { display: flex; }

/* Fond exact par page (évite tout flash de couleur de fond à l'arrivée de la vraie page) */
html[data-bx-shell-page="stats"]:not(.light) #bxInstantShell {
    background:
        radial-gradient(ellipse at top, rgba(0, 122, 255, 0.10) 0%, #050505 60%),
        #050505;
}
html[data-bx-shell-page="settings"]:not(.light) #bxInstantShell {
    background:
        radial-gradient(at  0% 0%, hsla(253, 16%,  7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        #050505;
}
html[data-bx-shell-page="stats"].light #bxInstantShell {
    background: #f3f4f9;
}

/* Fond clair (html.light) identique à theme-light.css */
html.light #bxInstantShell {
    background:
        radial-gradient(at   0% 0%, hsla(253, 60%, 92%, .85) 0, transparent 50%),
        radial-gradient(at  50% 0%, hsla(225, 82%, 91%, .75) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 82%, 93%, .80) 0, transparent 50%),
        #f3f4f9;
    color: #12141c;
}

/* Quand la coque est active, on garde la nav mobile au-dessus (bouton + net) */
html.bx-shell-open .pl-nav { z-index: 9999; }
html.bx-shell-open #pageLoaderBar,
html.bx-shell-open #pageLoaderVeil,
html.bx-shell-open #sl-cmodal,
html.bx-shell-open #obTour,
html.bx-shell-open #actionSheet,
html.bx-shell-open #overlayNavbar,
html.bx-shell-open #notifPanel,
html.bx-shell-open #fbOverlay,
html.bx-shell-open #pwaInstallOverlay,
html.bx-shell-open .pro-sheet,
html.bx-shell-open #profileSheet,
html.bx-shell-open #avatarModal,
html.bx-shell-open #previewModal,
html.bx-shell-open #deleteModal,
html.bx-shell-open #cancelConfirmModal { display: none !important; }
/* Mobile seulement : évite le scroll de fond derrière la coque sans faire sauter la scrollbar sur ordi */
@media (max-width: 1023px) {
    html.bx-shell-open body { overflow: hidden; }
}

/* Style.php sur mobile : masque topbar et bottom nav, occupe 100 % comme la vraie page */
@media (max-width: 1023px) {
    html.bx-shell-open.bx-shell-style #bxInstantShell {
        top: 0;
        bottom: 0;
        z-index: 10002;
        overflow: hidden;
    }
}
@media (min-width: 1024px) {
    html.bx-shell-open.bx-shell-style #bxInstantShell {
        overflow: hidden;
    }
}

/* Réserve l'espace exact des icônes Lucide avant createIcons() : zéro décalage du titre */
i[data-lucide] { display: inline-block; flex-shrink: 0; }

/* ── Arrivée sur la vraie page depuis une coque :
      - Le statique (titres, onglets, boutons) reste immobile (zéro flash).
      - Seules les données venues de la BD glissent et apparaissent en douceur. ── */
html.bx-from-shell .fade-in-up,
html.bx-from-shell .sp-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
@keyframes bxDbIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bxDbFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
html.bx-from-shell #link-container .item-content,
html.bx-from-shell #sl-list .sl-row,
html.bx-from-shell .sp-kpi-value,
html.bx-from-shell .sp-kpi-hint,
html.bx-from-shell .sp-insight-text,
html.bx-from-shell .sp-row,
html.bx-from-shell .sp-link,
html.bx-from-shell .sp-visit,
html.bx-from-shell #phoneDisplay,
html.bx-from-shell #pcName,
html.bx-from-shell #pcBio {
    animation: bxDbIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
html.bx-from-shell main .option-card > span.rounded-full,
html.bx-from-shell .sp-delta,
html.bx-from-shell #sl-folders .sl-fgroup,
html.bx-from-shell #sl-folders .sl-fchip b,
html.bx-from-shell main .glass-panel:first-of-type > div,
html.bx-from-shell main .custom-input {
    animation: bxDbFade 0.28s ease-out backwards;
}
/* Légère cascade sur les listes de liens et deeplinks */
html.bx-from-shell #link-container .list-item:nth-child(2) .item-content,
html.bx-from-shell #sl-list .sl-row:nth-child(2) { animation-delay: 0.03s; }
html.bx-from-shell #link-container .list-item:nth-child(3) .item-content,
html.bx-from-shell #sl-list .sl-row:nth-child(3) { animation-delay: 0.06s; }
html.bx-from-shell #link-container .list-item:nth-child(4) .item-content,
html.bx-from-shell #sl-list .sl-row:nth-child(4) { animation-delay: 0.09s; }
html.bx-from-shell #link-container .list-item:nth-child(5) .item-content,
html.bx-from-shell #sl-list .sl-row:nth-child(5) { animation-delay: 0.12s; }
html.bx-from-shell #link-container .list-item:nth-child(n+6) .item-content,
html.bx-from-shell #sl-list .sl-row:nth-child(n+6) { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) {
    html.bx-from-shell #link-container .item-content,
    html.bx-from-shell #sl-list .sl-row,
    html.bx-from-shell .sp-kpi-value,
    html.bx-from-shell .sp-kpi-hint,
    html.bx-from-shell .sp-insight-text,
    html.bx-from-shell .sp-row,
    html.bx-from-shell .sp-link,
    html.bx-from-shell .sp-visit,
    html.bx-from-shell #phoneDisplay,
    html.bx-from-shell #pcName,
    html.bx-from-shell #pcBio { animation: none; }
}

/* ── Shimmer ciblé UNIQUEMENT sur les emplacements de données BD ── */
:where(.bx-sh) {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.075);
    border-radius: 0.5rem;
}
:where(.bx-sh-l)  { border-radius: 0.375rem; }
.bx-sh-sm { opacity: 0.72; }
.bx-sh::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0)    0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.06) 60%,
        rgba(255, 255, 255, 0)  100%);
    transform: translateX(-100%);
    animation: bxShSweep 1.25s linear infinite;
    animation-delay: var(--bx-d, 0s);
}
@keyframes bxShSweep {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
html.light .bx-sh { background: rgba(17, 20, 38, 0.085); }
html.light .bx-sh::after {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0)    0%,
        rgba(255, 255, 255, 0.45) 45%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.45) 55%,
        rgba(255, 255, 255, 0)  100%);
}
@media (prefers-reduced-motion: reduce) {
    .bx-sh::after { animation: none; }
}

/* ── Mode hors-ligne (sans Wi-Fi) ── */
#bxOfflineBar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    background: rgba(17, 19, 27, 0.94);
    border-bottom: 1px solid rgba(251, 191, 36, 0.28);
    color: #fde68a;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    z-index: 20;
}
html.bx-offline-mode #bxOfflineBar { display: flex; }
html.light #bxOfflineBar {
    background: #fffbeb;
    border-bottom-color: rgba(217, 119, 6, 0.25);
    color: #92400e;
}
.bx-offbar-left { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.bx-offbar-left i { color: #f59e0b; flex-shrink: 0; }
.bx-offbar-sub { color: #9ca3af; font-weight: 500; }
html.light .bx-offbar-sub { color: #78716c; }
.bx-offbar-btn {
    flex-shrink: 0;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fde68a;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.bx-offbar-btn:hover { background: rgba(251, 191, 36, 0.26); }
html.light .bx-offbar-btn { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

.bx-off-box {
    display: none;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border-radius: 1rem;
    background: #0d0e14;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    text-align: left;
}
html.light .bx-off-box {
    background: #ffffff;
    border-color: rgba(17, 20, 38, 0.16);
}
.bx-off-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 0.75rem;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.bx-off-t { font-size: 13.5px; font-weight: 700; color: #f8fafc; line-height: 1.3; margin: 0; }
.bx-off-s { font-size: 12px; color: #9ca3af; line-height: 1.35; margin: 2px 0 0; }
html.light .bx-off-t { color: #0f172a; }
html.light .bx-off-s { color: #64748b; }
.bx-off-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 0.65rem;
    background: #007AFF;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.bx-off-btn:active { transform: scale(0.96); }

/* En mode hors-ligne : pause les shimmers et affiche la carte hors-ligne dans les zones BD */
html.bx-offline-mode .bx-db-zone .bx-db-shimmer { display: none !important; }
html.bx-offline-mode .bx-db-zone .bx-off-box { display: flex; }
html.bx-offline-mode .bx-pill-sh { display: none !important; }
html.bx-offline-mode .bx-sh::after { animation: none; opacity: 0; }

/* Toast hors-ligne */
#bxOffToast {
    position: fixed;
    left: 50%;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 14px);
    z-index: 2147483600;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    background: #14161f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    white-space: nowrap;
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    text-overflow: ellipsis;
}
#bxOffToast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { #bxOffToast { bottom: 28px; left: calc(50% + 140px); } }
html.light #bxOffToast { background: #0f172a; color: #fff; }

/* ============================================================
   STYLES AUTONOMES DES COQUES (indépendants du <style> de la page courante)
   ============================================================ */

/* ── Coque Shortlinks / Deeplinks ── */
.bxs-sl-new {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 16px 18px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(0,122,255,.16), rgba(0,210,255,.06));
    border: 1px solid rgba(0,210,255,.25);
    cursor: pointer;
}
.bxs-sl-plus {
    width: 42px; height: 42px; flex: none; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #007AFF, #00D2FF);
    color: #fff; font-size: 17px;
    box-shadow: 0 8px 20px -6px rgba(0,140,255,.7);
}
:where(.bxs-sl-stack) { display: flex; align-items: center; flex: none; }
.bxs-sl-stack img {
    width: 26px; height: 26px; border-radius: 8px; object-fit: contain;
    background: #fff; padding: 3px; border: 2px solid #0b0f19; margin-left: -8px;
}
.bxs-sl-stack img:first-child { margin-left: 0; }
.bxs-sl-search {
    display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px;
    border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
    color: #6b7280;
}
.bxs-sl-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff; font-size: 14px; }
.bxs-sl-search input::placeholder { color: #6b7280; }
.bxs-sl-tool {
    display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px;
    border-radius: 13px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
    color: #d1d5db; font-size: 13px; font-weight: 700; cursor: pointer;
}
.bxs-sl-folders { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.bxs-sl-chip {
    flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px;
    border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: #9ca3af;
}
.bxs-sl-chip.is-on { background: rgba(0,122,255,.18); border-color: rgba(0,122,255,.45); color: #fff; }
.bxs-sl-chip-add { border-style: dashed; color: #00D2FF; border-color: rgba(0,210,255,.35); }
.bxs-sl-row {
    padding: 12px 10px 12px 12px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.032) 0%, rgba(255,255,255,.01) 100%), #0e1018;
    border: 1px solid rgba(255,255,255,.075);
}
@media (min-width: 640px) { .bxs-sl-row { padding: 13px 14px 13px 15px; } }
.bxs-sl-inner { display: flex; align-items: center; gap: 12px; }
.bxs-sl-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; }
.bxs-sl-copy {
    width: 36px; height: 36px; flex: none; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0,210,255,.09); border: 1px solid rgba(0,210,255,.2); color: #00D2FF; font-size: 13.5px;
}
html.light .bxs-sl-row { background: #fff; border-color: rgba(15,23,42,.08); }
html.light .bxs-sl-search { background: #fff; border-color: rgba(15,23,42,.12); }
html.light .bxs-sl-tool { background: #fff; border-color: rgba(15,23,42,.12); color: #334155; }
html.light .bxs-sl-chip { background: #fff; border-color: rgba(15,23,42,.1); color: #475569; }
html.light .bxs-sl-chip.is-on { background: #007AFF; border-color: #007AFF; color: #fff; }

/* ── Coque Tools (.option-card vedettes) ── */
#bxInstantShell .option-card.tool-featured {
    border-color: rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.05);
    box-shadow: 0 0 24px rgba(0, 210, 255, 0.08);
}
#bxInstantShell .option-card.tool-featured-purple {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.08);
}

/* ── Coque Stats (reprend stats_styles.php) ── */
.bxs-sp {
    --sp-card: rgba(255,255,255,.03); --sp-card-2: rgba(255,255,255,.05);
    --sp-line: rgba(255,255,255,.07); --sp-txt: #f5f7fb; --sp-muted: #8b93a7;
    --sp-track: rgba(255,255,255,.06); --sp-grad: linear-gradient(90deg, #007AFF, #00D2FF);
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.25rem 1rem 3rem; color: var(--sp-txt);
}
@media (min-width: 1024px) { .bxs-sp { padding: 2rem 2rem 3rem; } }
html.light .bxs-sp {
    --sp-card: #fff; --sp-card-2: #f8f9fc; --sp-line: rgba(17,20,38,.10);
    --sp-txt: #12141c; --sp-muted: #6b7280; --sp-track: rgba(17,20,38,.07);
}
.bxs-sp-top { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; }
:where(.bxs-sp-back) {
    width: 2.25rem; height: 2.25rem; flex: none; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sp-track); border: 1px solid var(--sp-line); color: var(--sp-txt); font-size: .8rem;
}
.bxs-sp-seg { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; }
.bxs-sp-seg-it {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    color: var(--sp-muted); text-decoration: none; white-space: nowrap;
    border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.bxs-sp-seg-it i { font-size: .72rem; }
.bxs-sp-seg-it.is-active { color: var(--sp-txt); background: var(--sp-card); border-color: var(--sp-line); }
.bxs-sp-bar { margin: 0 0 1rem; padding: .5rem; background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 1.25rem; }
@media (min-width: 1024px) { .bxs-sp-bar { max-width: 480px; margin-bottom: 1.5rem; } }
.bxs-sp-chips { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; padding: .25rem; border-radius: .8rem; background: var(--sp-track); border: 1px solid var(--sp-line); }
.bxs-sp-chip { padding: .5rem 0; border-radius: .55rem; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--sp-muted); text-align: center; }
.bxs-sp-chip.is-active { color: #fff; background: var(--sp-grad); box-shadow: 0 6px 18px -6px rgba(0, 150, 255, .55); }
.bxs-sp-cal { flex: none; padding: .6rem .75rem; border-radius: .8rem; border: 1px solid var(--sp-line); background: var(--sp-card-2); color: var(--sp-muted); }
.bxs-sp-card { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 1.25rem; padding: 1.1rem; }
@media (min-width: 640px) { .bxs-sp-card { padding: 1.4rem; } }
html.light .bxs-sp-card { box-shadow: 0 1px 2px rgba(16, 20, 40, .04), 0 8px 24px -14px rgba(16, 20, 40, .18); }
.bxs-sp-kpis { display: flex; gap: .75rem; margin: 1rem -1rem 0; padding: 0 1rem .25rem; overflow-x: auto; scrollbar-width: none; }
.bxs-sp-kpis::-webkit-scrollbar { display: none; }
.bxs-sp-kpis > .bxs-sp-kpi { flex: 0 0 42%; min-width: 140px; padding: 1rem; }
@media (min-width: 640px) {
    .bxs-sp-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1rem 0 0; padding: 0; overflow: visible; }
    .bxs-sp-kpis > .bxs-sp-kpi { min-width: 0; }
}
@media (min-width: 1180px) { .bxs-sp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bxs-sp-kpi-lbl { display: flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; color: var(--sp-muted); }
.bxs-kpi--main { background: linear-gradient(135deg, rgba(0, 122, 255, .16), rgba(0, 210, 255, .06)); border-color: rgba(0, 150, 255, .35); }
html.light .bxs-sp .bxs-kpi--main { background: linear-gradient(135deg, rgba(0, 122, 255, .10), rgba(0, 210, 255, .04)), #fff; border-color: rgba(0, 122, 255, .35); }
.bxs-kpi--platform { background: linear-gradient(135deg, rgba(168, 85, 247, .14), rgba(0, 210, 255, .05)); border-color: rgba(168, 85, 247, .35); }
html.light .bxs-sp .bxs-kpi--platform { background: linear-gradient(135deg, rgba(168, 85, 247, .09), rgba(0, 210, 255, .03)), #fff; border-color: rgba(168, 85, 247, .35); }
.bxs-sp-insight { position: relative; overflow: hidden; }
.bxs-sp-insight::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, #007AFF, #00D2FF); }
.bxs-sp-sec-t { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--sp-txt); }
.bxs-sp-sec-t i { color: #00D2FF; font-size: .95rem; }
.bxs-sp-tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--sp-track); }
.bxs-sp-tab { padding: .3rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--sp-muted); }
.bxs-sp-tab.is-active { background: rgba(255, 255, 255, .12); color: var(--sp-txt); }
html.light .bxs-sp-tab.is-active { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.bxs-sd-banner { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; background: linear-gradient(120deg, rgba(0,122,255,.18), rgba(168,85,247,.14) 60%, rgba(0,210,255,.10)); border-color: rgba(0,150,255,.35); }
.bxs-sd-icon { width: 2.5rem; height: 2.5rem; border-radius: .85rem; background: var(--sp-grad); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 8px 20px -8px rgba(0,150,255,.7); }
.bxs-sd-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; background: rgba(245, 158, 11, .16); border: 1px solid rgba(245, 158, 11, .35); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fbbf24; }
.bxs-sd-cta { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.05rem; border-radius: .85rem; background: var(--sp-grad); color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(0,150,255,.7); }

/* ── Coque Style (aperçu téléphone + panneau édition exact) ── */
.bxs-style-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
:where(.bxs-style-mobbar) {
    height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px;
    background: rgba(5, 5, 5, 0.95); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
html.light .bxs-style-mobbar { background: rgba(255, 255, 255, 0.96); border-bottom-color: rgba(15, 23, 42, 0.08); }
.bxs-mob-btn {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e5e7eb; text-decoration: none; font-size: 13px; font-weight: 700;
}
.bxs-mob-btn:disabled { opacity: 0.32; }
.bxs-mob-ok { width: auto; padding: 0 14px; color: #fff; }
html.light .bxs-mob-btn { background: #f1f5f9; border-color: rgba(15,23,42,.08); color: #0f172a; }
.bxs-style-stage {
    flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.bxs-phone {
    width: 100%; height: 100%; background: #111111;
    display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.bxs-phone-inner {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 0 20px 18px; overflow: hidden;
}
.bxs-phone-foot {
    margin: auto -10px 0; width: calc(100% + 20px);
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 5px 5px 5px 10px; border-radius: 999px;
    background: #111113; border: 1px solid rgba(255,255,255,.14);
    font-size: 11.5px; color: #fff; white-space: nowrap; overflow: hidden;
}
.bxs-pbl-brand { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.bxs-pbl-brand > span { overflow: hidden; text-overflow: ellipsis; }
.bxs-pbl-brand img { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; }
.bxs-pbl-cta { flex-shrink: 0; padding: 7px 11px; border-radius: 999px; background: #fff; color: #0a0a0a; font-size: 11px; font-weight: 700; }
.bxs-style-panel {
    height: calc(50vh - 60px); flex: none;
    background: rgba(15, 15, 15, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; flex-direction: column; overflow: hidden;
}
html.light .bxs-style-panel { background: #ffffff; border-top-color: rgba(15, 23, 42, 0.1); }
.bxs-desk-btn {
    width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: #9ca3af; opacity: .35;
}
.bxs-style-tabs { display: flex; gap: 4px; }
.bxs-stab {
    flex: 1 1 0; min-width: 0; position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 2px; border-radius: 8px; font-size: 11px; font-weight: 600;
    color: #9ca3af; border: 1px solid transparent; background: transparent;
}
.bxs-stab i { font-size: 16px; }
.bxs-stab.active { background: rgba(99,102,241,.15); color: #818cf8; border-color: rgba(99,102,241,.3); }
.bxs-tab-pro { position: absolute; top: 3px; right: 5px; font-size: 9px !important; color: #f5c542; }
.bxs-opt {
    padding: 0.6rem 0.4rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,.1);
    text-align: center; font-size: 12px; font-weight: 500; color: #e5e7eb;
}
.bxs-col-box {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,.1); color: #e5e7eb;
}
html.light .bxs-opt, html.light .bxs-col-box { border-color: rgba(15,23,42,.12); color: #0f172a; }
@media (min-width: 1024px) {
    .bxs-style-root { flex-direction: row; }
    .bxs-style-stage { flex: 1; padding: 20px; }
    .bxs-phone {
        width: 300px; height: 600px; max-height: calc(100vh - 110px);
        border-radius: 2.5rem; border: 1px solid #1f2937;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,.6);
    }
    .bxs-style-panel {
        width: clamp(420px, calc(100vw - 800px), 760px);
        height: 100%; border-top: none; border-left: 1px solid rgba(255,255,255,.1);
    }
    .bxs-stab { flex: none; flex-direction: row; gap: 8px; padding: 8px 14px; font-size: 13px; }
    .bxs-stab i { font-size: 14px; }
    .bxs-tab-pro { position: static; }
}

/* ── Coque Settings (thèmes & faux champs) ── */
.bxs-input-fake {
    width: 100%; border-radius: 0.75rem; padding: 0.65rem 0.9rem; min-height: 40px;
    background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.1);
}
html.light .bxs-input-fake { background: #f8fafc; border-color: rgba(15, 23, 42, 0.12); }
.bxs-theme-opt {
    display: flex; flex-direction: column; overflow: hidden;
    background: rgba(255, 255, 255, 0.03); border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
}
.bxs-theme-opt.is-active { border-color: #6366f1; background: rgba(99, 102, 241, 0.1); }
.bxs-theme-mock { display: block; position: relative; height: 76px; overflow: hidden; }
.bxs-tm-layer { position: absolute; inset: 0; display: block; padding: 8px; }
.bxs-tm-dark { background: #0a0a0d; }
.bxs-tm-light { background: #f3f4f9; }
.bxs-theme-mock-system .bxs-tm-light { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.bxs-tm-bar { display: block; height: 6px; width: 42%; border-radius: 4px; margin-bottom: 8px; background: rgba(255,255,255,.15); }
.bxs-tm-light .bxs-tm-bar { background: rgba(15,23,42,.15); }
.bxs-tm-card { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 8px; background: rgba(255,255,255,.06); }
.bxs-tm-light .bxs-tm-card { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.bxs-tm-dot { width: 16px; height: 16px; border-radius: 5px; background: #6366f1; flex-shrink: 0; }
.bxs-tm-lines { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bxs-tm-lines i { display: block; height: 4px; border-radius: 3px; background: rgba(255,255,255,.22); width: 80%; }
.bxs-tm-lines i:last-child { width: 55%; opacity: .6; }
.bxs-tm-light .bxs-tm-lines i { background: rgba(15,23,42,.22); }
.bxs-theme-foot {
    display: flex; align-items: center; gap: 5px; padding: 0.6rem 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; font-weight: 600;
}
.bxs-theme-ck { margin-left: auto; color: #6366f1; display: none; flex-shrink: 0; }
.bxs-theme-opt.is-active .bxs-theme-ck { display: block; }
html.light .bxs-theme-opt { background: #fff; border-color: rgba(17,20,38,.1); }
html.light .bxs-theme-opt.is-active { border-color: #4f46e5; background: rgba(99,102,241,.07); }
html.light .bxs-theme-foot { border-top-color: rgba(17,20,38,.07); }
