/* ── Blokka Theme — Header & Footer ────────────────────────────────────────── */

/* -- General -- */
.email-js, p a {
    color: var(--blokka-accent);
    text-decoration: none;
}

.error404 .btn-blokka {
    background-color: var(--blokka-accent);
    color: var(--blokka-bg)!important;
}

.error404 .btn-blokka:hover {
    background-color: var(--blokka-accent-2)!important;
}

/* ── Header ── */
.blokka-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--blokka-bg-dark, #0b2340);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#blokka-navbar {
    min-height: 5rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* Brand */
.blokka-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
    margin-right: 1.5rem;
}

.blokka-logo-img {
    max-height: 40px;
    width: auto;
    display: block;
}

.blokka-site-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    line-height: 1;
    margin-left: 1rem;
}

/* Nav links */
#blokka-navbar .nav-link {
    color: rgba(255, 255, 255, .82);
    font-weight: 500;
    font-size: .9rem;
    padding: .45rem .75rem;
    border-radius: .375rem;
    transition: color .15s, background .15s;
}

#blokka-navbar .nav-link:hover,
#blokka-navbar .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

#blokka-navbar .nav-link.active,
#blokka-navbar .nav-link[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

/* Dropdown */
#blokka-navbar .dropdown-menu {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    box-shadow: 0 .5rem 1.5rem -0.25rem rgba(0, 0, 0, .15);
    padding: .375rem;
    min-width: 180px;
    margin-top: .375rem;
}

#blokka-navbar .dropdown-item {
    border-radius: .375rem;
    font-size: .9rem;
    padding: .45rem .75rem;
    color: var(--blokka-fg, #0b2340);
    transition: background .15s;
}

#blokka-navbar .dropdown-item:hover,
#blokka-navbar .dropdown-item:focus {
    background: color-mix(in oklab, var(--blokka-accent, #2b6cb0) 10%, transparent);
    color: var(--blokka-accent, #2b6cb0);
}

#blokka-navbar .dropdown-item.active {
    background: var(--blokka-accent, #2b6cb0);
    color: #fff;
}

/* Toggler */
#blokka-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .3);
    padding: .35rem .6rem;
    border-radius: .375rem;
}

#blokka-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15);
}

#blokka-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C 255%2C 255%2C 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile collapse */
@media (max-width: 991.98px) {
    #blokka-navbar .navbar-collapse {
        padding: .75rem 0 .5rem;
        border-top: 1px solid rgba(255, 255, 255, .1);
        margin-top: .5rem;
    }

    #blokka-navbar .nav-link {
        padding: .5rem .75rem;
    }

    #blokka-navbar .dropdown-menu {
        background: rgba(255, 255, 255, .06);
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }

    #blokka-navbar .dropdown-item {
        color: rgba(255, 255, 255, .75);
    }

    #blokka-navbar .dropdown-item:hover {
        color: #fff;
        background: rgba(255, 255, 255, .08);
    }
}

/* ── Footer ── */
.blokka-footer {
    background: var(--blokka-bg-dark, #0b2340);
    color: rgba(255, 255, 255, .75);
    padding: 3rem 0 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
    margin-top: auto;
}

.blokka-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

/* Footer brand */
.blokka-footer-brand {
    text-decoration: none;
    flex-shrink: 0;
}

.blokka-footer-logo {
    max-height: 36px;
    width: auto;
    display: block;
    opacity: .9;
    transition: opacity .2s;
}

.blokka-footer-logo:hover {
    opacity: 1;
}

.blokka-footer-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
}

/* Footer nav */
.blokka-footer-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.blokka-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    justify-content: center;
}

.blokka-footer-menu li a {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    font-size: .875rem;
    padding: .25rem .5rem;
    border-radius: .25rem;
    transition: color .15s;
}

.blokka-footer-menu li a:hover {
    color: #fff;
}

/* Copyright */
.blokka-footer-copy {
    font-size: .8rem;
    color: rgba(255, 255, 255, .45);
    margin: 0;
    text-align: right;
    flex-shrink: 0;
}

/* Responsive footer */
@media (max-width: 767.98px) {
    .blokka-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .blokka-footer-nav {
        justify-content: center;
    }

    .blokka-footer-copy {
        text-align: center;
    }
}

/* ── Body layout (full-height) ── */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main,
body > .site-content,
body > #content {
    flex: 1;
}

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: unset!important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ── Scrollspy sommaire ── */
.blokka-scrollspy-nav {
    position: fixed;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    max-width: 220px;
}

.blokka-scrollspy-nav .list-group-item {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem !important;
    font-size: .8rem;
    font-weight: 500;
    color: var(--blokka-fg, #0b2340);
    padding: .45rem .85rem;
    line-height: 1.3;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: background .15s, color .15s, border-color .15s;
}

.blokka-scrollspy-nav .list-group-item:hover {
    background: #fff;
    color: var(--blokka-accent, #2b6cb0);
}

.blokka-scrollspy-nav .list-group-item.active {
    background: var(--blokka-accent, #2b6cb0);
    border-color: var(--blokka-accent, #2b6cb0);
    color: #fff;
}

@media (max-width: 1199px) {
    .blokka-scrollspy-nav {
        display: none;
    }
}

/* ── Footer — derniers articles ── */
.blokka-footer-posts {
    margin: 2rem 0;
}

.blokka-footer-posts-title {
    color: var(--blokka-light);
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .1em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.blokka-footer-posts .card {
    background: var(--blokka-bg-dark);
    border: 1px solid var(--blokka-light);
    color: var(--blokka-light);
}

.blokka-footer-posts .card .btn-blokka {
    background-color: var(--blokka-accent);
    color: var(--blokka-light);
}

.blokka-footer-posts .card .btn-blokka:hover {
    background-color: var(--blokka-accent-2);
    color: var(--blokka-light);
}

.blokka-footer-posts .card-img-top {
    height: 160px;
    object-fit: cover;
}

.blokka-footer-posts .card-title {
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
}

.blokka-footer-posts .card-text {
    font-size: .82rem;
    color: rgba(255, 255, 255, .6);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blokka-footer-posts .card-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: .75rem;
    color: rgba(255, 255, 255, .4) !important;
}

.blokka-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
    text-align: center;
}

/* ── Page 404 ── */
.blokka-404-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 3rem 1.5rem;
}

.blokka-404-inner {
    text-align: center;
    max-width: 560px;
}

.blokka-404-content {
    margin-bottom: 2rem;
}

.blokka-404-content h1,
.blokka-404-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.blokka-404-content p {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, .55);
}

.archive .btn-blokka {
    background-color: var(--blokka-accent);
    color: var(--blokka-bg)!important;
}

.archive .btn-blokka:hover {
    background-color: var(--blokka-accent-2)!important;
}

.card-footer.text-muted {
    font-size: 12px;
}