/* WiseBled — Panneau latéral flottant (Cloud / App en ligne) */
.wb-dl-drawer {
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    background: transparent;
    color: #0f172a;
    position: fixed;
    inset: 0;
    overflow: hidden;
}
.wb-dl-drawer::backdrop {
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: wb-dl-fade 0.25s ease;
}
.wb-dl-drawer[open] {
    display: block;
}
.wb-dl-drawer-panel {
    position: fixed;
    top: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    width: min(380px, calc(100vw - 1.7rem));
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow:
        0 24px 64px -20px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(15, 23, 42, 0.05);
    padding: 1.1rem 1.15rem 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: wb-dl-drawer-in 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 480px) {
    .wb-dl-drawer-panel {
        top: auto;
        right: 0.65rem;
        left: 0.65rem;
        bottom: 0.65rem;
        width: auto;
        max-height: min(88vh, 560px);
    }
}

.wb-dl-drawer-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.wb-dl-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.wb-dl-drawer-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 2rem 1rem 0;
    flex-shrink: 0;
}
.wb-dl-drawer-brand {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #4f46e5, #6366f1);
    flex-shrink: 0;
    box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.65);
}
.wb-dl-drawer-brand img {
    display: block;
    filter: brightness(0) invert(1);
}
.wb-dl-drawer-head-copy { min-width: 0; }
.wb-dl-drawer-title {
    margin: 0;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}
.wb-dl-drawer-subtitle {
    margin: 0.18rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

/* Primary detected */
.wb-dl-drawer-primary {
    border-radius: 1rem;
    padding: 0.95rem 1rem 1rem;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    flex-shrink: 0;
}
.wb-dl-drawer-primary-top {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}
.wb-dl-drawer-primary-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.14);
    flex-shrink: 0;
}
.wb-dl-drawer-primary-copy { min-width: 0; flex: 1; }
.wb-dl-drawer-detected {
    display: inline-flex;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 0.18rem;
}
.wb-dl-drawer-primary-name {
    margin: 0;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.15;
}
.wb-dl-drawer-primary-meta {
    margin: 0.28rem 0 0;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.4;
}
.wb-dl-drawer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    border: none;
    box-shadow: 0 10px 28px -14px rgba(79, 70, 229, 0.75);
    transition: background 0.15s ease, transform 0.15s ease;
}
.wb-dl-drawer-cta:hover {
    background: #4338ca;
    color: #fff;
    transform: translateY(-1px);
}

/* Suggestions */
.wb-dl-drawer-suggestions {
    margin-top: 0.95rem;
    flex-shrink: 0;
}
.wb-dl-drawer-suggestions-label {
    margin: 0 0 0.5rem;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}
.wb-dl-drawer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.wb-dl-drawer-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.wb-dl-drawer-chip:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

/* Offline desktop — séparé, lien dylanecodeur */
.wb-dl-drawer-offline {
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 0.85rem;
    background: #fafafa;
    border: 1px dashed #e2e8f0;
    flex-shrink: 0;
}
.wb-dl-drawer-offline-label {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}
.wb-dl-drawer-offline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: #334155;
    text-decoration: none;
}
.wb-dl-drawer-offline-link:hover {
    color: #4f46e5;
}

.wb-dl-drawer-foot {
    margin-top: auto;
    padding-top: 1rem;
    text-align: center;
    flex-shrink: 0;
}
.wb-dl-drawer-all {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
}
.wb-dl-drawer-all:hover { color: #4338ca; text-decoration: underline; }

button.footer-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
}

/* Legacy: page /download/ hero + cards */
.wb-dl-cards { display: grid; gap: 0.75rem; }
.wb-dl-card {
    position: relative;
    border-radius: 1rem;
    padding: 1rem 1.05rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
}
.wb-dl-card-head { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.5rem; }
.wb-dl-card-icon {
    width: 2.35rem; height: 2.35rem; border-radius: 0.75rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; flex-shrink: 0;
}
.wb-dl-card-title { margin: 0; font-family: Outfit, system-ui, sans-serif; font-size: 1.02rem; font-weight: 800; color: #0f172a; }
.wb-dl-card-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    width: 100%; padding: 0.7rem 0.9rem; border-radius: 0.8rem;
    background: #4f46e5; color: #fff; font-size: 0.84rem; font-weight: 700; text-decoration: none;
}
.wb-dl-hero {
    display: flex; flex-direction: column; gap: 0.85rem;
    padding: 1.15rem 1.2rem 1.2rem; border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12);
}
.wb-dl-hero-top { display: flex; align-items: flex-start; gap: 0.85rem; }
.wb-dl-hero-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.9rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; flex-shrink: 0;
}
.wb-dl-hero-title {
    margin: 0; font-family: Outfit, system-ui, sans-serif; font-size: 1.35rem;
    font-weight: 800; color: #f8fafc;
}
.wb-dl-hero-meta { margin: 0.35rem 0 0; font-size: 0.8rem; color: #94a3b8; }
.wb-dl-hero-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    width: 100%; padding: 0.95rem 1.1rem; border-radius: 0.95rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
    font-size: 0.95rem; font-weight: 700; text-decoration: none;
}
.wb-dl-hero-alt {
    display: block; text-align: center; font-size: 0.82rem; font-weight: 600;
    color: #a5b4fc; text-decoration: none;
}

.wb-dl-trigger {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; cursor: pointer;
}
.header-dl-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 0.85rem; border-radius: 0.85rem; font-size: 0.82rem; font-weight: 700;
    color: #4338ca; background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15); text-decoration: none; white-space: nowrap;
}
.header-dl-btn:hover { background: rgba(79, 70, 229, 0.14); color: #3730a3; }

html.wb-dl-modal-open { overflow: hidden; }

@keyframes wb-dl-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes wb-dl-drawer-in {
    from { opacity: 0; transform: translateX(calc(100% + 1.25rem)); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .wb-dl-drawer::backdrop,
    .wb-dl-drawer-panel,
    .wb-dl-drawer-cta { animation: none; transition: none; }
}
