/* ========================================
   Bibliothèque Numérique — Mobile First
   Colors: #C4161C (red), #4D5562 (dark gray)
   No border-radius
   ======================================== */

/* ---- Base / Mobile ---- */

.bn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff;
    color: #4D5562;
    padding: 32px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.bn__header {
    text-align: center;
    margin-bottom: 28px;
}

.bn__title {
    font-size: 24px;
    font-weight: 800;
    color: #C4161C;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.bn__subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #4D5562;
    margin: 0;
    line-height: 1.5;
}

/* Search */
.bn__search {
    margin-bottom: 28px;
}

.bn__search-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.bn__search-icon {
    position: absolute;
    right: 14px;
    color: #4D5562;
    pointer-events: none;
    flex-shrink: 0;
}

.bn__search-input {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: #1a1a1a;
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 0 !important;
    padding: 12px 16px 12px 44px;
    outline: none;
    transition: border-color 0.2s ease;
}

.bn__search-input::placeholder {
    color: #999999;
}

.bn__search-input:focus {
    border-color: #C4161C;
}

/* Layout */
.bn__layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Sidebar */
.bn__sidebar {
    margin-bottom: 24px;
}

.bn__sidebar-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #C4161C;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #C4161C;
}

/* Mobile select — visible on mobile only */
.bn__cat-select {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #4D5562;
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    padding: 12px 14px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234D5562' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    transition: border-color 0.2s ease;
}

.bn__cat-select:focus {
    border-color: #C4161C;
}

/* Desktop button list — hidden on mobile */
.bn__cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    flex-wrap: wrap;
    gap: 6px;
}

.bn__cat-item {
    margin: 0;
}

.bn__cat-btn {
    display: inline-block;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #4D5562;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bn__cat-btn:hover {
    background-color: #eaeaea;
    border-color: #C4161C;
    color: #C4161C;
}

.bn__cat-btn--active {
    background-color: #C4161C;
    color: #ffffff;
    border-color: #C4161C;
}

.bn__cat-btn--active:hover {
    background-color: #a81218;
    border-color: #a81218;
    color: #ffffff;
}

/* Content area */
.bn__content {
    flex: 1;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    border: 2px dashed #e0e0e0;
    border-radius: 0;
}

/* Empty state */
.bn__empty {
    text-align: center;
    padding: 40px 20px;
}

.bn__empty-icon {
    color: #C4161C;
    opacity: 0.35;
    margin-bottom: 14px;
}

.bn__empty-text {
    font-size: 15px;
    font-weight: 500;
    color: #4D5562;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Contact button */
.bn__contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background-color: #C4161C;
    border: none;
    border-radius: 0;
    padding: 12px 28px;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.bn__contact-btn:hover {
    background-color: #a81218;
    box-shadow: 0 4px 16px rgba(196, 22, 28, 0.25);
    color: #ffffff;
}

.bn__contact-btn:active {
    background-color: #8e0f14;
}

.bn__contact-btn svg {
    flex-shrink: 0;
}

/* ========================================
   Tablet  (≥ 768px)
   ======================================== */

@media (min-width: 768px) {
    .bn {
        padding: 48px 32px;
    }

    .bn__header {
        margin-bottom: 36px;
    }

    .bn__title {
        font-size: 32px;
    }

    .bn__subtitle {
        font-size: 15px;
    }

    .bn__search {
        margin-bottom: 36px;
    }

    .bn__search-input {
        font-size: 15px;
        padding: 14px 18px 14px 48px;
    }

    /* Switch to sidebar layout */
    .bn__layout {
        flex-direction: row;
        gap: 32px;
    }

    .bn__sidebar {
        width: 200px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    /* Hide mobile select, show button list */
    .bn__cat-select {
        display: none;
    }

    .bn__cat-list {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .bn__cat-btn {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 14px;
        font-size: 14px;
    }

    .bn__content {
        min-height: 400px;
    }

    .bn__empty {
        padding: 48px 24px;
    }

    .bn__empty-text {
        font-size: 17px;
    }

    .bn__contact-btn {
        font-size: 15px;
        padding: 14px 32px;
    }
}

/* ========================================
   Desktop  (≥ 1025px)
   ======================================== */

@media (min-width: 1025px) {
    .bn {
        padding: 60px 40px;
    }

    .bn__header {
        margin-bottom: 40px;
    }

    .bn__title {
        font-size: 36px;
    }

    .bn__subtitle {
        font-size: 16px;
    }

    .bn__search-input {
        font-size: 16px;
        padding: 16px 20px 16px 52px;
    }

    .bn__layout {
        gap: 40px;
    }

    .bn__sidebar {
        width: 240px;
    }

    .bn__sidebar-title {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .bn__content {
        min-height: 500px;
    }

    .bn__empty {
        padding: 64px 32px;
    }

    .bn__empty-icon {
        width: 56px;
        height: 56px;
    }

    .bn__empty-text {
        font-size: 18px;
    }

    .bn__contact-btn {
        font-size: 16px;
        padding: 14px 36px;
    }
}
