/* ─────────────────────────────────────────────
   L'Explorateur Scientifique — Single (minimaliste)
   ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body.lexplo-single-page {
    margin: 0;
    padding: 0;
    background: #f7f8fa;
    font-family: 'Open Sans', sans-serif;
}

/* ── Mobile top bar ── */
.lexplo-mobile-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 52px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 200;
}
.lexplo-sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 8px 0;
}
.lexplo-sidebar-toggle__icon { font-size: 18px; }
.lexplo-mobile-bar__home {
    font-size: 22px;
    text-decoration: none;
    color: inherit;
}

/* ── Layout ── */
.lexplo-single {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.lexplo-sidebar {
    width: 280px;
    min-width: 280px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    /* Scrollbar thin */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.lexplo-sidebar::-webkit-scrollbar { width: 4px; }
.lexplo-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Sidebar head */
.lexplo-sidebar__head {
    padding: 20px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.lexplo-sidebar__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.15s;
}
.lexplo-sidebar__back:hover { color: #333; }

.lexplo-sidebar__category {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.lexplo-sidebar__badge {
    display: inline-block;
    background: rgb(0,173,147);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 3px;
}
.lexplo-sidebar__count {
    font-size: 11px;
    color: #aaa;
    font-weight: 600;
}

/* Sidebar list */
.lexplo-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
}
.lexplo-sidebar__item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    position: relative;
}
.lexplo-sidebar__item a:hover {
    background: #f5f5f5;
    color: #111;
}
.lexplo-sidebar__item.current a {
    background: rgba(0,173,147,0.07);
    color: rgb(0,130,110);
    border-left-color: rgb(0,173,147);
    font-weight: 700;
}

.lexplo-sidebar__thumb {
    width: 46px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #eee;
}
.lexplo-sidebar__thumb--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #f5f5f5;
    border-radius: 4px;
}
.lexplo-sidebar__item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.lexplo-sidebar__current-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(0,173,147);
    flex-shrink: 0;
    margin-left: auto;
}

/* Sidebar footer */
.lexplo-sidebar__foot {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.lexplo-sidebar__foot a {
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
.lexplo-sidebar__foot a:hover { color: #555; }

/* ── Main content ── */
.lexplo-content {
    flex: 1;
    min-width: 0;
    padding: 40px 56px 80px;
    max-width: 860px;
}

/* Breadcrumb */
.lexplo-content__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 16px;
    font-weight: 600;
}
.lexplo-content__breadcrumb a {
    color: rgb(0,173,147);
    text-decoration: none;
    transition: opacity 0.15s;
}
.lexplo-content__breadcrumb a:hover { opacity: 0.75; }

/* Title */
.lexplo-content__title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800;
    color: rgb(5,5,65);
    line-height: 1.2;
    margin: 0 0 28px;
}

/* ── Article content ── */
.lexplo-article {
    font-size: 16px;
    line-height: 1.8;
    color: #3a3a3a;
}

/* Video — ARVE plugin wrapper */
.lexplo-article .arve-wrapper,
.lexplo-article .arve-embed-container {
    margin-bottom: 24px !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,0.13);
}

/* PDF / Download button — MaxButtons plugin */
.lexplo-article .maxbutton,
.lexplo-article .wp-maxbutton-wrapper {
    margin: 0 0 32px !important;
    display: block;
}
.lexplo-article .maxbutton {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: rgb(0,173,147) !important;
    color: #fff !important;
    padding: 13px 26px !important;
    border-radius: 6px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border: none !important;
    transition: background 0.2s, transform 0.15s !important;
    box-shadow: 0 3px 12px rgba(0,173,147,0.3) !important;
}
.lexplo-article .maxbutton:hover {
    background: rgb(0,148,125) !important;
    transform: translateY(-1px) !important;
}
/* Inner span inside MaxButtons */
.lexplo-article .maxbutton .mb-text { color: inherit; }

/* Text formatting */
.lexplo-article h2,
.lexplo-article h3,
.lexplo-article h4 {
    font-family: 'Poppins', sans-serif;
    color: rgb(5,5,65);
    margin-top: 36px;
    margin-bottom: 14px;
    line-height: 1.3;
}
.lexplo-article h2 { font-size: 22px; font-weight: 800; }
.lexplo-article h3 { font-size: 18px; font-weight: 700; }
.lexplo-article h4 { font-size: 16px; font-weight: 700; color: #555; }
.lexplo-article p  { margin-bottom: 18px; }

.lexplo-article ul,
.lexplo-article ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.lexplo-article li { margin-bottom: 8px; }

.lexplo-article strong { color: rgb(5,5,65); font-weight: 700; }
.lexplo-article em    { color: #666; }

.lexplo-article blockquote {
    border-left: 4px solid rgb(0,173,147);
    margin: 28px 0;
    padding: 14px 24px;
    background: rgba(0,173,147,0.06);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

.lexplo-article a {
    color: rgb(0,173,147);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lexplo-article a:hover { opacity: 0.75; }

/* ── Prev / Next nav ── */
.lexplo-exp-nav {
    display: flex;
    gap: 16px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid #eee;
    justify-content: space-between;
    flex-wrap: wrap;
}
.lexplo-exp-nav__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    max-width: 300px;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    flex: 1;
}
.lexplo-exp-nav__btn:hover {
    border-color: rgb(0,173,147);
    background: rgba(0,173,147,0.04);
    transform: translateY(-1px);
}
.lexplo-exp-nav__btn--next { justify-content: flex-end; text-align: right; }
.lexplo-exp-nav__arrow {
    font-size: 20px;
    color: rgb(0,173,147);
    flex-shrink: 0;
}
.lexplo-exp-nav__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.lexplo-exp-nav__label small {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}

/* ── Sidebar overlay (mobile) ── */
.lexplo-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.25s;
}
.lexplo-sidebar-overlay.visible {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .lexplo-mobile-bar { display: flex; }

    .lexplo-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
        border-right: 1px solid #eee;
        box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    }
    .lexplo-sidebar.open {
        transform: translateX(0);
    }
    .lexplo-sidebar-overlay { display: block; }

    .lexplo-content { padding: 24px 24px 60px; }
}

@media (max-width: 600px) {
    .lexplo-content { padding: 20px 16px 60px; }
    .lexplo-exp-nav { flex-direction: column; }
    .lexplo-exp-nav__btn { max-width: 100%; }
    .lexplo-exp-nav__btn--next { justify-content: flex-start; text-align: left; }
}
