/**
 * Hulyx Auto Captions - Focus v4.2
 * Transition in/out alignée sur l'apparition du menu footer
 */
#hcap-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    width: 100%;
    max-width: calc(100dvh * 9 / 16);
    height: 40px;
    z-index: 18;
    pointer-events: none;
    background: var(--h-bg-surface) !important;
    border-bottom: 1px solid var(--h-border-subtle);
    overflow: hidden;
    transform: translateZ(0);
/* État par défaut : hors écran en haut — identique au HUD */
    transform: translateX(-50%) translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#hcap-overlay.is-visible {
    transform: translateX(-50%) translateY(0%);
}
#hcap-overlay.hud-session-hidden {
    transform: translateX(-50%) translateY(-100%) !important;
    opacity: 0 !important;
}
#hcap-bar {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 25px;
    box-sizing: border-box;
    overflow: hidden;
}
#hcap-text {
    position: relative;
    display: inline-block;
    color: var(--h-text-primary);
    font-weight: 700;
text-transform: uppercase;
letter-spacing:1px;
    font-size: var(--hcap-fs, 13px);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px var(--h-bg-overlay);
    transform: translateZ(0);
, opacity;
    transition: opacity 0.5s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Curseur clignotant */
#hcap-text::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 14px;
    background: var(--h-text-primary);
    margin-left: 4px;
    vertical-align: middle;
    animation: hcap-blink 0.8s infinite;
}
@keyframes hcap-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
@media (max-width: 767.98px) {
    #hcap-overlay { max-width: 100vw; }
}