/* ═══════════════════════════════════════════════════════════════════════════
   Binsfeld Accessibilité — Barre de navigation rapide & vidéos
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dyslexia font preload (OpenDyslexic, via jsdelivr) ───────────────────── */
@import url("https://cdn.jsdelivr.net/npm/open-dyslexic/open-dyslexic-regular.css");

/* ── Barre d'accès rapide ─────────────────────────────────────────────────── */
#access-focus-wrapper {
    outline: none;
}

.access-container {
    position: fixed;
    z-index: 2147483638;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    background: transparent;
}

.access-item {
    pointer-events: all;
    box-sizing: border-box;
    position: fixed !important;
    left: 24px;
    top: -80px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border: 2px solid var(--bacc-primary, #2563eb) !important;
    border-radius: 8px !important;
    box-shadow: 0 0 0 4px var(--bacc-primary-rgba, rgba(37,99,235,.2)) !important;
    max-width: 320px;
    width: 100% !important;
    height: 60px !important;
    padding: 0 14px;
    text-align: left !important;
    text-decoration: none !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 500;
    opacity: 0;
    transition: top .2s ease, opacity .2s ease;
    cursor: pointer;
    font-family: inherit;
}

.access-item:focus {
    top: 24px !important;
    opacity: 1 !important;
    outline: 3px solid var(--bacc-primary, #2563eb) !important;
    outline-offset: 3px !important;
    background: #fff !important;
    color: #111 !important;
}

.access-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.access-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.access-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--bacc-primary, #2563eb);
}

/* ── Vidéo : bouton version accessible ────────────────────────────────────── */
.bacc-video-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.bacc-video-wrap > .wp-block-embed {
    width: 100%;
    margin: 0;
}

.bacc-video-wrap .wp-block-embed iframe {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bacc-video-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: var(--bacc-button, #2563eb);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: .04em;
    transition: opacity .15s;
}

.bacc-video-link:hover {
    opacity: .85;
}

.bacc-video-link:focus-visible {
    outline: 3px solid var(--bacc-button, #2563eb);
    outline-offset: 4px;
}

.bacc-video-link svg {
    flex-shrink: 0;
}

/* ── Bouton flottant ──────────────────────────────────────────────────────── */
.bacc-floating-btn {
    position: fixed;
    z-index: 2147483635;
    display: flex;
    align-items: center;
    justify-content: center;
    width:  56px;
    height: 56px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--bacc-primary, #2563eb);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
    transition: transform .15s, box-shadow .15s;
}

.bacc-floating-btn:hover,
.bacc-floating-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.36);
}

.bacc-floating-btn:focus-visible {
    outline: 3px solid var(--bacc-primary, #2563eb);
    outline-offset: 3px;
}

.bacc-floating-btn--bottom-right {
    bottom: 24px;
    right:  24px;
}

.bacc-floating-btn--bottom-left {
    bottom: 24px;
    left:   24px;
}

.bacc-floating-btn svg {
    width:  30px;
    height: 30px;
    flex-shrink: 0;
}

.bacc-floating-btn img {
    width:  30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Texte masqué visuellement, lisible par les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Focus indicator arrow (optionnel, si thème l'utilise) ───────────────── */
#accessArrowIndicator {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 9999;
    object-fit: contain;
}

#accessArrowIndicator.active {
    opacity: 1;
}

/* ── Correctif font-size minimum (sans getComputedStyle loop) ────────────── */
.minimum-font-size {
    font-size: 11px !important;
}

/* ── Bouton inline [bacc_popup_button] ───────────────────────────────────── */
.bacc-popup-trigger {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    line-height: 1;
}

/* hide_on="mobile" : visible desktop, caché mobile */
@media (max-width: 782px) {
    .bacc-hide-mobile { display: none !important; }
}

/* hide_on="desktop" : visible mobile, caché desktop */
@media (min-width: 783px) {
    .bacc-hide-desktop { display: none !important; }
}

.bacc-popup-trigger:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

.bacc-popup-trigger img {
    display: block;
}
