/*
 * BELTEKN AFRICA : compléments au thème Ruboz (style.css).
 * Un seul style (clair), sans bascule de thème.
 */

/* ---------- Bases ---------- */
svg.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
.font-heading { font-family: Tropiline, serif; }
.bk-prose p { margin-bottom: 1rem; }
.bk-prose p:last-child { margin-bottom: 0; }
.bk-fullscreen { min-height: 100vh; }
.bk-honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-skip {
    position: fixed; top: 12px; left: 12px; z-index: 1100;
    padding: .5rem 1rem; border-radius: 8px; background: #07e; color: #fff;
    transform: translateY(-200%); transition: transform .2s ease;
}
.bk-skip:focus { transform: none; color: #fff; }

/* ---------- Logo ---------- */
.bk-logo, .navbar-brand img.bk-logo { height: 42px; width: auto; max-width: none; }
.footer .navbar-brand img.bk-logo { height: 48px; }
@media (max-width: 575.98px) { .bk-logo, .navbar-brand img.bk-logo { height: 36px; } }
/* Variante transparente : logo blanc tant que le menu n'est ni survolé ni épinglé. */
.header:not(.header-2) .logo-white { display: none; }
.header-2:not(:hover):not(.pinned) .logo-white { display: block; }

/* ---------- En-tête ---------- */
.header .navbar-expand-xl .navbar-nav .nav-link { padding-left: .75rem; padding-right: .75rem; white-space: nowrap; }
.header .navbar > .container > .d-flex { gap: 1.5rem !important; }
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .header .navbar-expand-xl .navbar-nav .nav-link { padding-left: .5rem; padding-right: .5rem; font-size: .9375rem; }
    .header .navbar-brand img.bk-logo { height: 36px; }
    .header .btn-gradient-primary { padding-left: 1rem; padding-right: 1rem; }
}
.header .btn { white-space: nowrap; }
.footer .btn { white-space: nowrap; }
.bk-lang { display: inline-flex; align-items: center; gap: .375rem; font-weight: 500; }
.header-2:not(:hover):not(.pinned) .bk-lang { color: #fff; }
.bk-menu-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0, 119, 238, .08); color: #07e;
}
.mega-menu { min-width: 520px; }
.dropdown-item.active, .dropdown-item:active { background: rgba(0, 119, 238, .08); color: #07e; }

/* ---------- Bandeau des pages intérieures ---------- */
.bk-page-header { min-height: 440px; display: flex; align-items: flex-end; }
.bk-page-header > .container { width: 100%; }
.bk-page-header__photo { z-index: 0; }
.bk-page-header__shade {
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(8, 8, 30, .92) 0%, rgba(8, 8, 30, .78) 45%, rgba(8, 8, 30, .35) 100%),
        linear-gradient(0deg, rgba(0, 119, 238, .25), rgba(0, 119, 238, 0) 60%);
}
.bk-page-header__lead { max-width: 640px; }
.bk-page-header .breadcrumb-item, .bk-page-header .breadcrumb-item a { color: rgba(255, 255, 255, .8); }
.bk-page-header .breadcrumb-item.active { color: #fff; }
.breadcrumb-item a { display: inline-flex; align-items: center; gap: .375rem; text-decoration: none; }

/* ---------- Accueil ---------- */
.hero-section h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); max-width: 620px; }
@media (max-width: 1199.98px) { .hero-section h1 { margin-left: auto; margin-right: auto; } }
.bk-hero-text { max-width: 500px; }
@media (max-width: 1199.98px) { .bk-hero-text { margin-left: auto; margin-right: auto; } }
@media (min-width: 1200px) { .slide-screen-marquee-section { right: -6%; width: 50%; } }
.bk-hero-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bk-hero-facts { font-size: .9375rem; }
.bk-hero-facts strong { font-family: Tropiline, serif; font-size: 1.75rem; font-weight: 400; margin-right: .25rem; }

.bk-partners { --gap: 4rem; }
.bk-partner {
    font-family: Tropiline, serif; font-size: clamp(1.375rem, 1rem + 1vw, 2rem);
    color: rgba(42, 42, 42, .4); width: auto !important; white-space: nowrap;
}

.bk-photo-stack { position: relative; padding: 0 0 2rem 2rem; }
.bk-photo-stack__main { aspect-ratio: 4 / 3; }
.bk-photo-stack__card { position: absolute; left: 0; bottom: 0; max-width: 260px; }
@media (max-width: 575.98px) { .bk-photo-stack { padding: 0 0 1.5rem 1rem; } .bk-photo-stack__card { max-width: 220px; } }

.bk-counter { font-family: Tropiline, serif; font-size: clamp(3rem, 2rem + 3vw, 4.5rem); line-height: 1; }
.bk-counter-label { max-width: 280px; }

.slide-deck-carousel .swiper-slide { height: auto; }
.article-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); }

/* ---------- Cartes, filtres ---------- */
.bk-chip {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .25rem .75rem; border-radius: 100px;
    background: rgba(0, 119, 238, .08); color: #07e;
    font-size: .8125rem; font-weight: 600; text-decoration: none; line-height: 1.4;
}
a.bk-chip:hover { background: #07e; color: #fff; }
.bk-meta { color: #6a6a6a; }
.bk-meta span { display: inline-flex; align-items: center; gap: .375rem; }
.bk-count { opacity: .6; margin-left: .25rem; font-weight: 400; }
.btn-primary .bk-count { opacity: .85; }
.bk-filter.active { background: #07e; border-color: #07e !important; color: #fff; }
.bk-search { min-width: 280px; max-width: 380px; }
.border-top > .btn-sm { white-space: nowrap; }
.bk-search label { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- Formulaires ---------- */
.form-floating > textarea.form-control { min-height: 140px; }
.bk-pay-option { cursor: pointer; transition: all .2s ease-in-out; }
.bk-pay-option:hover { border-color: rgba(0, 119, 238, .5) !important; }
.bk-pay-option:has(input:checked) { border-color: #07e !important; background: rgba(0, 119, 238, .05); }
.alert { border-radius: 12px; }

/* ---------- Fiche formation ---------- */
.bk-facts dt, .bk-facts dd { display: block; }
.bk-facts dt { display: flex; align-items: center; gap: .375rem; }
.list-group-item-action span { min-width: 0; }

/* ---------- Divers ---------- */
.bk-map iframe { border: 0; }
.bk-error-code { font-family: Tropiline, serif; font-size: clamp(6rem, 4rem + 10vw, 12rem); line-height: 1; margin-bottom: 1rem; }
.bk-summary dt, .bk-summary dd { margin: 0; }
.footer .text-opacity-100 { --ss-text-opacity: 1; }

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .bk-badge { font-size: .8125rem; gap: .5rem !important; padding-left: .875rem !important; max-width: 100%; }
    .bk-hero-facts { flex-wrap: wrap; font-size: .8125rem; }
    .bk-hero-facts strong { font-size: 1.375rem; }
}

/* ---------- Police : Syne pour l'interface, IBM Plex Sans pour la lecture ---------- */
:root { --ss-body-font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body { font-family: var(--ss-body-font-family); }
.navbar, .nav-link, .dropdown-item, .btn, .bk-badge, .bk-chip, .breadcrumb, .mobile-menu,
.accordion-button, .tab-btn, .page-link, .form-floating > label { font-family: "Syne", system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ---------- Photos de fond (à la place des vidéos du template) ---------- */
.bk-section-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.bk-section-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 42, 42, .2), rgba(42, 42, 42, .85)); }

/* ---------- Bouton WhatsApp ---------- */
.bk-whatsapp {
    position: fixed; z-index: 1000;
    left: calc(20px + env(safe-area-inset-left, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1rem .75rem .875rem; border-radius: 100px;
    background: #1fa855; color: #fff; text-decoration: none; font-weight: 600; font-size: .9375rem;
    box-shadow: 0 8px 24px rgba(31, 168, 85, .35); transition: transform .2s ease, box-shadow .2s ease;
}
.bk-whatsapp:hover, .bk-whatsapp:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 168, 85, .45); }
.bk-whatsapp__icon { width: 1.5rem !important; height: 1.5rem !important; }
@media (max-width: 575.98px) { .bk-whatsapp__label { display: none; } .bk-whatsapp { padding: .875rem; } }

/* ---------- Réduire les animations ---------- */
@media (prefers-reduced-motion: reduce) {
    .marquee--content { animation: none !important; }
    *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.bk-value-icon { margin-top: -3.25rem; position: relative; box-shadow: 0 0 0 6px #fff; }
/* Laisse la place du bouton WhatsApp sous la dernière ligne du pied de page. */
.footer > .container > .py-6:last-child { padding-bottom: 5.5rem !important; }

/* ---------- Responsive ---------- */
.row-cols-2 > * { flex: 0 0 auto; width: 50%; }
@media (min-width: 768px) { .row-cols-md-4 > * { flex: 0 0 auto; width: 25%; } }

@media (max-width: 767.98px) {
    /* Filtres sur une ligne qui défile au doigt plutôt que sur plusieurs lignes. */
    .bk-filters-scroll {
        flex-wrap: nowrap !important; justify-content: flex-start !important; overflow-x: auto;
        margin-left: -1rem; margin-right: -1rem; padding: 0 1rem .25rem;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .bk-filters-scroll::-webkit-scrollbar { display: none; }
    .bk-filters-scroll > * { flex-shrink: 0; white-space: nowrap; }
    .bk-stats .text-center { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .bk-stats .h2 { font-size: 2.25rem; margin-bottom: .5rem !important; }
    .bk-stats p { font-size: .875rem; }
    .bk-page-header { min-height: 360px; }
    .bk-search { min-width: 0; max-width: none; width: 100%; }
    .footer .py-10.py-xl-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
}
@media (max-width: 575.98px) {
    /* Pastilles de section : le texte seul, le bouton du dessous suffit. */
    .bk-badge .btn { display: none; }
    .bk-badge { padding: .375rem 1rem !important; }
    .article-card h3 { font-size: 1.375rem; }
    .accordion-button .fs-4 { font-size: 1.125rem !important; }
}

/* ---------- Écran de chargement ---------- */
.bk-loader { display: none; }
.bk-js .bk-loader { display: grid; }
html.bk-loading, html.bk-loading body { overflow: hidden; }
.bk-loader { transition: transform .85s cubic-bezier(.77, 0, .18, 1); will-change: transform; }
.bk-loader.is-done { transform: translateY(-100%); }
.bk-loader__logo { height: 42px; width: auto; }
.bk-loader .preloader__progress-bar { transition: none; }
@media (prefers-reduced-motion: reduce) {
    .bk-loader { transition: opacity .3s ease; }
    .bk-loader.is-done { transform: none; opacity: 0; }
    .bk-loader .preloader__mark span { animation: none; }
}
