/* WiseBled — Page /download/ ultra moderne & responsive */
:root {
    --dl-bg: #030712;
    --dl-card: rgba(15, 23, 42, 0.55);
    --dl-border: rgba(255, 255, 255, 0.1);
    --dl-text: #f8fafc;
    --dl-muted: #94a3b8;
    --dl-accent: #6366f1;
    --dl-accent-2: #22d3ee;
    --dl-emerald: #34d399;
    --dl-radius: 1.5rem;
    --dl-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.page-download-shell {
    margin: 0;
    min-height: 100dvh;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    background: var(--dl-bg);
    color: var(--dl-text);
    overflow-x: hidden;
}

.dl-aurora {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    contain: strict;
}

.dl-aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: dl-float 16s ease-in-out infinite;
    will-change: transform;
}

.dl-aurora span:nth-child(1) {
    width: 55vw;
    height: 55vw;
    max-width: 520px;
    max-height: 520px;
    top: -15%;
    right: -10%;
    background: #4f46e5;
}

.dl-aurora span:nth-child(2) {
    width: 45vw;
    height: 45vw;
    max-width: 420px;
    max-height: 420px;
    bottom: -10%;
    left: -12%;
    background: #0891b2;
    animation-delay: -5s;
}

.dl-aurora span:nth-child(3) {
    width: 30vw;
    height: 30vw;
    max-width: 280px;
    max-height: 280px;
    top: 40%;
    left: 35%;
    background: #10b981;
    animation-delay: -9s;
    opacity: 0.35;
}

@keyframes dl-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, 24px) scale(1.05); }
    66% { transform: translate(18px, -16px) scale(0.96); }
}

.dl-grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: clamp(32px, 5vw, 56px) clamp(32px, 5vw, 56px);
    mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, black 10%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.dl-shell-inner {
    position: relative;
    z-index: 1;
    isolation: isolate;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.dl-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) 0.75rem;
    max-width: 76rem;
    margin: 0 auto;
    width: 100%;
}

.dl-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.dl-brand-logo {
    width: clamp(2rem, 5vw, 2.5rem);
    height: clamp(2rem, 5vw, 2.5rem);
    border-radius: 0.7rem;
    object-fit: contain;
    flex-shrink: 0;
}

.dl-brand-name {
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    letter-spacing: -0.03em;
}

.dl-home-link {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--dl-muted);
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.dl-home-link:hover {
    color: #fff;
    border-color: var(--dl-border);
    background: rgba(255, 255, 255, 0.04);
}

.dl-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem) max(2rem, env(safe-area-inset-bottom));
}

.dl-layout {
    width: min(100%, 26rem);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .dl-layout {
        width: min(100%, 68rem);
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: clamp(2rem, 4vw, 3.5rem);
        align-items: center;
    }
}

/* Colonne visuelle — desktop uniquement */
.dl-visual {
    display: none;
}

@media (min-width: 1024px) {
    .dl-visual {
        display: flex;
        align-items: center;
        justify-content: center;
        animation: dl-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}

.dl-showcase {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.dl-showcase-glow {
    position: absolute;
    inset: 10% 0 20%;
    background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(99, 102, 241, 0.45), transparent 70%);
    filter: blur(24px);
    pointer-events: none;
    z-index: 0;
}

.dl-device {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0.55rem;
    border-radius: 2.35rem;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 50%, #020617 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 40px 80px -24px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.dl-device-bezel {
    position: relative;
    border-radius: 1.85rem;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9 / 19.5;
}

.dl-device-island {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 28%;
    height: 0.55rem;
    border-radius: 999px;
    background: #000;
    z-index: 2;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.9);
}

.dl-device-screen {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.dl-device-youtube {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #0f172a;
}
.dl-device-youtube .hero-youtube-embed,
.dl-device-youtube .wise-yt-wrap {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.dl-showcase-caption {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 22rem;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #94a3b8;
}

/* Carte principale */
.dl-card {
    position: relative;
    border-radius: clamp(1.25rem, 3vw, var(--dl-radius));
    padding: clamp(1.25rem, 3.5vw, 2rem);
    background: var(--dl-card);
    border: 1px solid var(--dl-border);
    box-shadow: var(--dl-shadow);
    backdrop-filter: blur(24px) saturate(140%);
    animation: dl-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
    overflow: hidden;
}

.dl-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.45), rgba(34, 211, 238, 0.15), transparent 55%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes dl-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.dl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: clamp(0.68rem, 2vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    border: 1px solid rgba(129, 140, 248, 0.28);
    margin-bottom: 1rem;
}

.dl-badge svg {
    flex-shrink: 0;
}

.dl-title {
    font-family: Outfit, system-ui, sans-serif;
    font-size: clamp(1.55rem, 4.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0 0 0.75rem;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dl-subtitle {
    margin: 0 0 1.35rem;
    color: var(--dl-muted);
    font-size: clamp(0.92rem, 2.2vw, 1.02rem);
    line-height: 1.65;
    max-width: none;
}

.dl-progress-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin: 0.5rem 0 1.35rem;
}

.dl-progress-ring {
    --p: 0;
    position: relative;
    isolation: isolate;
    width: clamp(4.5rem, 14vw, 5.75rem);
    height: clamp(4.5rem, 14vw, 5.75rem);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--dl-accent) calc(var(--p) * 1%), rgba(255, 255, 255, 0.07) 0);
    box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.8);
}

.dl-progress-ring::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background: #0b1220;
    z-index: 0;
}

.dl-progress-ring svg {
    position: relative;
    z-index: 1;
    color: #a5b4fc;
}

.dl-countdown {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #cbd5e1;
    text-align: center;
}

.dl-countdown strong {
    color: #fff;
}

.dl-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.1rem;
    padding: 0.85rem 1.15rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.2vw, 0.98rem);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, background 0.22s ease;
}

.dl-btn:hover {
    transform: translateY(-2px);
}

.dl-btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #4338ca);
    color: #fff;
    box-shadow: 0 16px 40px -14px rgba(79, 70, 229, 0.95);
}

.dl-btn-primary:hover {
    box-shadow: 0 22px 48px -14px rgba(79, 70, 229, 1);
}

.dl-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dl-btn-ghost {
    background: transparent;
    color: var(--dl-muted);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    min-height: 2.75rem;
}

/* Badges stores officiels */
.dl-store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.dl-store-row--center {
    justify-content: center;
}

.dl-store-badge {
    display: inline-flex;
    line-height: 0;
    border-radius: 0.65rem;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.65);
}

.dl-store-badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.75);
}

.dl-store-badge img {
    display: block;
    width: auto;
    height: clamp(44px, 11vw, 54px);
    max-width: min(100%, 220px);
}

.dl-store-badge--apple img {
    height: clamp(40px, 10vw, 48px);
}

.dl-store-badge--google img {
    height: clamp(44px, 11vw, 54px);
}

.dl-store-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.65rem;
}

.dl-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 1.25rem 0;
}

.dl-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dl-feature {
    text-align: center;
    font-size: clamp(0.65rem, 1.8vw, 0.74rem);
    color: var(--dl-muted);
    line-height: 1.35;
    padding: 0.55rem 0.35rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dl-feature-icon {
    display: block;
    margin: 0 auto 0.35rem;
    color: #818cf8;
}

.dl-manual {
    margin: 1rem 0 0;
    text-align: center;
    font-size: clamp(0.78rem, 2vw, 0.85rem);
    color: #64748b;
}

.dl-manual a {
    color: #a5b4fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dl-hidden {
    display: none !important;
}

.dl-web-actions {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 520px) {
    .dl-web-actions {
        grid-template-columns: 1fr 1fr;
    }

    .dl-web-actions .dl-btn-primary {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .dl-layout {
        width: min(100%, 68rem);
    }

    .dl-card {
        max-width: none;
    }
}

@media (max-width: 1023px) {
    .dl-aurora span {
        filter: blur(72px);
        opacity: 0.32;
        animation-duration: 24s;
    }

    .dl-aurora span:nth-child(1) {
        width: min(70vw, 320px);
        height: min(70vw, 320px);
        top: -8%;
        right: -18%;
    }

    .dl-aurora span:nth-child(2) {
        width: min(60vw, 260px);
        height: min(60vw, 260px);
        bottom: -6%;
        left: -20%;
    }

    .dl-aurora span:nth-child(3) {
        display: none;
    }
}

@media (max-width: 519px) {
    .dl-features {
        grid-template-columns: 1fr;
    }

    .dl-feature {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        text-align: left;
        padding: 0.65rem 0.75rem;
    }

    .dl-feature-icon {
        margin: 0;
    }

    .dl-store-row {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }

    .dl-store-badge {
        width: min(100%, 280px);
        justify-content: center;
    }

    .dl-store-badge img {
        width: auto;
        height: clamp(46px, 12vw, 52px);
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dl-aurora span,
    .dl-card,
    .dl-visual {
        animation: none;
    }

    .dl-aurora span {
        opacity: 0.22;
    }

    .dl-btn:hover,
    .dl-store-badge:hover {
        transform: none;
    }
}
