/* ==========================================================================
   Agni Bona — Styles partagés (header, sidebar, search, web-tv, a11y)
   Externalisé pour mise en cache navigateur (gain LCP)
   ========================================================================== */

:root {
    --agni-ink   : #112031;
    --agni-fire  : #a87317;
    --agni-amber : #c89218;
}

html { overflow-x: hidden; }

body {
    position: static !important;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body.ck-page .ul-header-2 .ul-header-bottom,
body.content-section .ul-header-2 .ul-header-bottom,
body.content-hub .ul-header-2 .ul-header-bottom,
body.biography-profile .ul-header-2 .ul-header-bottom,
body.village-page .ul-header-2 .ul-header-bottom {
    box-shadow: 0 10px 25px rgba(10, 22, 38, 0.12);
}

/* ── LANGUAGE SWITCHER ── */
.agni-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid rgba(17, 32, 49, 0.12);
    border-radius: 999px;
    background: #fff;
    font-family: 'Manrope', system-ui, sans-serif;
    margin-right: 4px;
}
.agni-lang-btn {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #5b748c;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}
.agni-lang-btn:hover { color: var(--agni-fire); }
.agni-lang-btn.is-active {
    background: var(--agni-ink);
    color: #fff;
}
.agni-lang-sep {
    color: rgba(17, 32, 49, 0.18);
    font-size: 12px;
    font-weight: 600;
}
@media (max-width: 575px) {
    .agni-lang-switch { padding: 3px 7px; }
    .agni-lang-btn { font-size: 11px; padding: 3px 6px; }
}

/* ── HEADER KOUNFAO ── */
.ul-header-2 .ul-header-bottom {
    margin-top: 0;
    padding: 0;
    background: #fff;
    border-top: 1px solid rgba(17, 32, 49, 0.08);
    border-bottom: 1px solid rgba(17, 32, 49, 0.08);
}

.ul-header-2 .ul-header-bottom .ul-header-bottom-wrapper {
    border-radius: 0 !important;
    padding: 8px 0;
    box-shadow: none;
    background: transparent;
}

.ul-header-2 .ul-header-bottom.sticky {
    top: 44px;
    z-index: 1100;
    background: #fff;
    box-shadow: 0 10px 25px rgba(10, 22, 38, 0.12);
}

body.ck-page .ul-header-2 .ul-header-bottom.sticky,
body.content-section .ul-header-2 .ul-header-bottom.sticky,
body.content-hub .ul-header-2 .ul-header-bottom.sticky,
body.biography-profile .ul-header-2 .ul-header-bottom.sticky,
body.village-page .ul-header-2 .ul-header-bottom.sticky {
    top: 44px;
}

.ul-header-2 .ul-header-nav { gap: 16px; }

.ul-header-2 .ul-header-nav > a,
.ul-header-2 .ul-header-nav .has-sub-menu > a {
    border-radius: 0 !important;
    padding: 10px 4px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.ul-header-2 .ul-header-nav > a:hover,
.ul-header-2 .ul-header-nav .has-sub-menu > a:hover,
.ul-header-2 .ul-header-nav > a.kf-active,
.ul-header-2 .ul-header-nav .has-sub-menu > a.kf-active {
    color: var(--agni-fire) !important;
    border-bottom-color: var(--agni-fire);
}

.ul-header-2 .ul-header-nav .has-sub-menu > a[role="button"]::after {
    content: "▾";
    margin-left: 5px;
    font-size: 10px;
    opacity: 0.55;
    transition: transform .2s ease, opacity .2s ease;
    display: inline-block;
}
.ul-header-2 .ul-header-nav .has-sub-menu:hover > a[role="button"]::after {
    opacity: 1;
    transform: rotate(180deg);
}
.ul-header-2 .ul-header-nav .has-sub-menu > a[role="button"] { cursor: pointer; }

.ul-header-2 .ul-header-submenu {
    border-radius: 0;
    border: 1px solid rgba(17, 32, 49, 0.14);
    box-shadow: 0 12px 25px rgba(10, 22, 38, 0.12);
    min-width: 220px;
}

.ul-header-2 .ul-header-submenu ul li a {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 9px 18px;
    display: block;
    color: var(--agni-ink);
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
}

.ul-header-2 .ul-header-submenu ul li a:hover {
    background: rgba(216, 87, 28, 0.06);
    color: var(--agni-fire);
}

.ul-header-2 .ul-header-submenu ul li a.kf-active-sub {
    color: var(--agni-fire);
    font-weight: 900;
}

.kf-canton-badge {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--agni-amber);
    margin-right: 6px;
    vertical-align: middle;
}

@media (max-width: 991px) {
    body.ck-page .ul-header-2 .ul-header-bottom,
    body.ck-page .ul-header-2 .ul-header-bottom.sticky,
    body.content-section .ul-header-2 .ul-header-bottom,
    body.content-section .ul-header-2 .ul-header-bottom.sticky,
    body.content-hub .ul-header-2 .ul-header-bottom,
    body.content-hub .ul-header-2 .ul-header-bottom.sticky,
    body.biography-profile .ul-header-2 .ul-header-bottom,
    body.biography-profile .ul-header-2 .ul-header-bottom.sticky,
    body.village-page .ul-header-2 .ul-header-bottom,
    body.village-page .ul-header-2 .ul-header-bottom.sticky {
        top: 44px;
    }
}

/* ── WEB TV LINK (avec icône, dernière position du menu) ── */
.ul-header-2 .ul-header-nav > a.agni-webtv-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--agni-fire);
    font-weight: 800;
}
.ul-header-2 .ul-header-nav > a.agni-webtv-link:hover,
.ul-header-2 .ul-header-nav > a.agni-webtv-link.kf-active,
.ul-header-2 .ul-header-nav > a.agni-webtv-link.is-active {
    color: var(--agni-fire) !important;
    border-bottom-color: var(--agni-fire);
}
.agni-webtv-link .agni-webtv-icon { flex-shrink: 0; }

/* ── QUICK WEB TV BUTTON (header actions, mobile + desktop) ── */
.agni-webtv-quick {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--agni-fire), var(--agni-amber));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(168, 115, 23, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-right: 4px;
}
.agni-webtv-quick:hover {
    transform: scale(1.08);
    color: #fff;
    box-shadow: 0 6px 18px rgba(168, 115, 23, 0.45);
}
.agni-webtv-quick:focus-visible {
    outline: 2px solid var(--agni-amber);
    outline-offset: 2px;
}
.agni-webtv-quick-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
    animation: agni-webtv-pulse 1.6s infinite;
}
@keyframes agni-webtv-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 575px) {
    .agni-webtv-quick { width: 34px; height: 34px; }
    .agni-webtv-quick svg { width: 18px; height: 18px; }
}

/* ── A11Y : visually-hidden (lecteurs d'écran uniquement) ── */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── A11Y : skip link (Aller au contenu) ── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--agni-ink);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--agni-amber);
    outline-offset: 2px;
    color: #fff;
}

/* ── A11Y : cibles tactiles ≥ 44×44 sur mobile (WCAG 2.5.5) ── */
@media (max-width: 991px) {
    .ul-header-search-opener,
    .ul-header-sidebar-opener,
    .ul-header-actions > button,
    .ul-sidebar-closer,
    .ul-search-closer {
        min-width: 44px;
        min-height: 44px;
    }
}
