/* ============================================================
   glass.css — Reusable glassmorphism components (dark theme)
   ============================================================ */

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    border-radius: var(--r-xl);
}

.glass-pill {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border-hi);
    box-shadow: var(--glass-shadow-sm);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-radius: var(--r-pill);
}

/* Badge — small uppercase chip on light bg */
.badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 8px 13px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: var(--ink);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    transition: transform var(--t-fast) var(--ease-out),
                background var(--t-fast) var(--ease-out);
}
.badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.72);
}

/* CTA — primary action button (BLACK glass with blur) */
.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: var(--r-pill);
    background:
        linear-gradient(180deg, rgba(20, 20, 20, 0.92) 0%, rgba(0, 0, 0, 0.98) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 16px 36px -10px rgba(0, 0, 0, 0.55),
        0 4px 12px -4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    transition: transform var(--t-fast) var(--ease-out),
                box-shadow var(--t-fast) var(--ease-out),
                background var(--t-fast) var(--ease-out);
    will-change: transform;
}
.cta:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(180deg, rgba(40, 40, 40, 0.95) 0%, rgba(15, 15, 15, 1) 100%);
    box-shadow:
        0 22px 48px -10px rgba(0, 0, 0, 0.6),
        0 6px 16px -4px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.cta:active { transform: translateY(0); }
.cta svg { transition: transform var(--t-fast) var(--ease-out); }
.cta:hover svg { transform: translateX(3px); }

/* Language picker — top right, with more breathing room */
/* ============================================================
   Shared topbar — Logo links, Lang-Switch rechts
   ============================================================ */
.vdb-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:
        max(22px, calc(env(safe-area-inset-top) + 14px))
        max(32px, calc(env(safe-area-inset-right) + 20px))
        10px
        max(32px, calc(env(safe-area-inset-left) + 20px));
    pointer-events: none;
}
.vdb-topbar > * { pointer-events: auto; }

.vdb-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 14px 32px -10px rgba(0, 0, 0, 0.28),
        0 4px 10px -4px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    text-decoration: none;
    color: var(--ink);
    transition: transform var(--t-base) var(--ease-out),
                box-shadow var(--t-base) var(--ease-out),
                background var(--t-base);
}
.vdb-topbar-brand:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 18px 38px -10px rgba(0, 0, 0, 0.32),
        0 6px 14px -4px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

/* Topbar: ALWAYS icon-only — wordmark hidden at every viewport */
.vdb-topbar-wordmark { display: none !important; }

.vdb-topbar-signe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000;
    flex: 0 0 auto;
    box-shadow:
        0 4px 10px -2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vdb-topbar-signe img {
    width: 22px;
    height: 22px;
    display: block;
    filter: brightness(0) invert(1); /* black SIGNE → white inside black circle */
}

.vdb-topbar-wordmark {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1;
}

@media (max-width: 720px) {
    .vdb-topbar {
        padding:
            max(14px, calc(env(safe-area-inset-top) + 8px))
            14px 6px 14px;
    }
    .vdb-topbar-brand {
        gap: 0 !important;
        padding: 4px !important;
        border-radius: 999px !important;
    }
    .vdb-topbar-signe { width: 36px; height: 36px; }
    .vdb-topbar-signe img { width: 19px; height: 19px; }
    .vdb-topbar-wordmark { display: none !important; } /* icon-only on mobile */
    .vdb-topbar .lang-switch { padding: 3px; }
    .vdb-topbar .lang-switch button {
        padding: 6px 9px !important;
        font-size: 10.5px !important;
        min-width: 32px !important;
        min-height: 30px !important;
    }
}

/* Lang-switch inside topbar — drop the fixed positioning */
.vdb-topbar .lang-switch {
    position: static;
    top: auto; right: auto;
}

/* Fallback when lang-switch is standalone (legacy floating use) */
.lang-switch.is-floating,
body:not(:has(.vdb-topbar)) .lang-switch {
    position: fixed;
    top: max(24px, env(safe-area-inset-top));
    right: max(32px, env(safe-area-inset-right));
    z-index: var(--z-nav);
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: var(--glass-shadow-sm);
}
.lang-switch button,
.lang-switch a {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 9px 13px;
    min-width: 38px;
    min-height: 36px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.lang-switch button:hover,
.lang-switch a:hover { color: var(--ink); transform: translateY(-1px); }
.lang-switch button[aria-pressed="true"],
.lang-switch a[aria-pressed="true"] {
    background: #000;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 560px) {
    .lang-switch {
        top: max(14px, env(safe-area-inset-top));
        right: max(14px, env(safe-area-inset-right));
        padding: 3px;
    }
    .lang-switch button,
    .lang-switch a { padding: 8px 10px; min-width: 36px; min-height: 36px; font-size: 11px; }
}

/* Ensure topbar logo tap-target meets 44x44 minimum (accessibility) */
@media (max-width: 560px) {
    .vdb-topbar-brand { min-width: 44px; min-height: 44px; justify-content: center; }
}

/* ============================================================
   Polish — consistent hover-lift + CTA border-glow-pulse
   ============================================================ */

/* All glass surfaces get a subtle hover-lift */
.glass-card,
.glass-pill {
    transition:
        transform var(--t-base, 320ms) var(--ease-out, ease),
        box-shadow var(--t-base, 320ms) var(--ease-out, ease);
}
.glass-card:hover:not(:has(.cta:hover, .cta-link:hover, .lang-switch button:hover)) {
    /* card body itself hovers — skip when inner-button is hovered to avoid double-lift */
    transform: translateY(-2px);
}

/* CTA subtle pulse — drives attention without being aggressive */
.cta {
    position: relative;
    z-index: 0;
}
.cta::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
    z-index: -1;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.cta:hover::before { opacity: 1; }

/* Soft, infinite border-shimmer on the primary CTA (very subtle) */
.cta.pulse-glow::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(120deg,
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0) 70%);
    background-size: 240% 100%;
    animation: cta-shimmer 4s linear infinite;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
}
@keyframes cta-shimmer {
    0%   { background-position: 240% 0; }
    100% { background-position: -240% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .glass-card,
    .glass-pill { transition: none; }
    .cta.pulse-glow::after { animation: none; }
}
