/**
 * BasePress Knowledge Base - Styles Ludotest
 *
 * CSS personnalisé pour intégrer BasePress au design Ludotest
 * Basé sur le thème "Modern" de BasePress
 */

/* ==========================================================================
   1. Variables spécifiques BasePress
   ========================================================================== */

:root {
    --bp-primary: var(--ludo-primary, #e36c1d);
    --bp-primary-light: #f59a4a;
    --bp-accent: var(--ludo-accent, #e5007d);
    --bp-text: #374151;
    --bp-text-muted: #6b7280;
    --bp-bg: #faf9f7;
    --bp-card-bg: #ffffff;
    --bp-border: rgba(0, 0, 0, 0.08);
    --bp-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --bp-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.12);
    --bp-radius: 16px;
    --bp-radius-sm: 8px;
    --bp-transition: 0.3s ease;
}

/* ==========================================================================
   2. Layout général BasePress
   ========================================================================== */

/* Conteneur principal */
.bpress-wrap {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--bp-text);
    background: transparent;
    padding: 40px 20px;
}

.bpress-content-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* Typographie */
.bpress-wrap h1,
.bpress-wrap h2,
.bpress-wrap h3,
.bpress-wrap h4,
.bpress-wrap h5,
.bpress-wrap h6 {
    color: var(--bp-text);
    font-weight: 600;
}

/* ==========================================================================
   3. En-tête de page (Page Header)
   ========================================================================== */

.bpress-page-header {
    background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 100%);
    padding: 80px 25px 60px;
    border-radius: var(--bp-radius);
    margin-bottom: 40px;
    text-align: center;
}

.bpress-page-header h1,
.bpress-page-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--bp-text) !important;
    margin-bottom: 15px;
}

.bpress-page-header p {
    font-size: 1.1rem;
    color: var(--bp-text-muted) !important;
    max-width: 600px;
    margin: 0 auto;
}

.bpress-product-header,
.bpress-kb-header {
    color: var(--bp-text);
}

/* ==========================================================================
   4. Barre de recherche
   ========================================================================== */

.bpress-searchbar-wrap {
    margin-top: 40px;
}

.bpress-search {
    max-width: 600px;
    height: 55px;
    margin: 0 auto;
}

input[type="text"].bpress-search-field {
    width: 100%;
    height: 100%;
    padding: 18px 60px 18px 25px;
    font-size: 1rem;
    border: 2px solid var(--bp-border);
    border-radius: 50px;
    background: var(--bp-card-bg);
    color: var(--bp-text);
    transition: var(--bp-transition);
    box-shadow: var(--bp-shadow);
}

input[type="text"].bpress-search-field:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 4px rgba(227, 108, 29, 0.15), var(--bp-shadow-hover);
}

.bpress-search input::placeholder {
    color: var(--bp-text-muted);
    font-weight: 400;
}

/* Icône de recherche (dans le champ) */
.bpress-search-form:before {
    display: none; /* Masquer l'icône par défaut car on utilise le bouton */
}

/* Bouton de recherche avec icône loupe */
.bpress-search-form button,
.bpress-search-form input[type="submit"] {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    padding: 0;
    background: var(--bp-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--bp-transition);
    font-size: 0; /* Masquer le texte */
    color: transparent;
    overflow: hidden;
}

.bpress-search-form button:before,
.bpress-search-form input[type="submit"]:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2.5px solid white;
    border-radius: 50%;
}

.bpress-search-form button:after,
.bpress-search-form input[type="submit"]:after {
    content: "";
    position: absolute;
    top: 60%;
    left: 60%;
    width: 2.5px;
    height: 8px;
    background: white;
    border-radius: 2px;
    transform: rotate(-45deg);
    transform-origin: top left;
}

.bpress-search-form button:hover,
.bpress-search-form input[type="submit"]:hover {
    background: var(--bp-primary-light);
    transform: translateY(-50%) scale(1.05);
}

/* Résultats de recherche live */
.bpress-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bp-card-bg);
    border-radius: var(--bp-radius);
    box-shadow: var(--bp-shadow-hover);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    border: 1px solid var(--bp-border);
}

.bpress-search-results .bpress-post-link {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bp-border);
    transition: var(--bp-transition);
}

.bpress-search-results .bpress-post-link:hover {
    background: rgba(227, 108, 29, 0.05);
}

.bpress-search-results .bpress-post-link:last-child {
    border-bottom: none;
}

/* ==========================================================================
   5. Knowledge Bases / Produits
   ========================================================================== */

.bpress-product,
.bpress-kb {
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 30px 25px 4em;
    box-shadow: var(--bp-shadow);
    transition: var(--bp-transition);
}

.bpress-product:hover,
.bpress-kb:hover {
    transform: translateY(-5px);
    box-shadow: var(--bp-shadow-hover);
    border-color: var(--bp-primary);
}

.bpress-product .bpress-product-title,
.bpress-kb .bpress-kb-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bp-text);
    transition: var(--bp-transition);
}

.bpress-product:hover .bpress-product-title,
.bpress-kb:hover .bpress-kb-title {
    color: var(--bp-primary);
}

/* Image de la Knowledge Base */
.bpress-product .bpress-product-image,
.bpress-kb .bpress-kb-image {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
}

/* ==========================================================================
   6. Sections (Liste)
   ========================================================================== */

/* Conteneur grille des sections - Force 2 colonnes côte à côte */
.bpress-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
}

/* Les colonnes BasePress deviennent des éléments de grille */
.bpress-grid > .bpress-col {
    display: contents !important; /* Les enfants remontent dans la grille */
}

/* Chaque section prend toute la largeur de sa cellule */
.bpress-grid .bpress-section {
    width: 100% !important;
    margin: 0 !important;
}

/* Responsive : 1 colonne sur mobile */
@media (max-width: 768px) {
    .bpress-grid {
        grid-template-columns: 1fr !important;
    }
}

.bpress-section {
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 30px 25px 3.5em;
    margin-bottom: 0; /* Pas de marge car géré par gap */
    box-shadow: var(--bp-shadow);
    transition: var(--bp-transition);
}

.bpress-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--bp-shadow-hover);
    border-color: var(--bp-primary);
}

.bpress-section .bpress-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bp-text);
    transition: var(--bp-transition);
}

.bpress-section:hover .bpress-heading {
    color: var(--bp-primary);
}

/* Icône de section */
.bpress-heading span[class^="bp-"],
.bpress-heading .bpress-heading-icon {
    color: var(--bp-primary) !important;
}

.bpress-heading span[class^="bp-"].colored,
.bpress-heading .bpress-heading-icon.colored {
    color: var(--bp-primary) !important;
}

/* Compteur d'articles */
.bpress-post-count {
    background-color: var(--bp-primary);
    color: white;
    font-weight: 600;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 12px;
    top: -16px;
    right: 20px;
}

/* Lien "Voir tous" */
.bpress-section a.bpress-viewall {
    color: var(--bp-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--bp-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bpress-section a.bpress-viewall:hover {
    color: var(--bp-accent);
    text-decoration: none;
    gap: 10px;
}

.bpress-section a.bpress-viewall:after {
    content: "→";
}

/* ==========================================================================
   7. Sections (Boxed/Grid)
   ========================================================================== */

.bpress-section-boxed {
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    box-shadow: var(--bp-shadow);
    transition: var(--bp-transition);
    overflow: hidden;
}

.bpress-section-boxed:hover {
    transform: translateY(-5px);
    box-shadow: var(--bp-shadow-hover);
    border-color: var(--bp-primary);
}

.bpress-section-boxed > a {
    padding: 30px;
    min-height: 250px;
}

.bpress-section-boxed .bpress-section-icon {
    color: var(--bp-primary) !important;
    font-size: 4em;
    padding-top: 15px;
    display: block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(227, 108, 29, 0.1) 0%, rgba(227, 108, 29, 0.05) 100%);
    border-radius: var(--bp-radius-sm);
    margin: 0 auto 20px;
    line-height: 50px;
    text-align: center;
}

.bpress-section-boxed .bpress-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bp-text);
    margin: 1em 0 0.5em;
    transition: var(--bp-transition);
}

.bpress-section-boxed:hover .bpress-section-title {
    color: var(--bp-primary);
}

.bpress-section-boxed p {
    color: var(--bp-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.bpress-section-boxed .bpress-viewall {
    color: var(--bp-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.bpress-section-boxed .bpress-viewall:hover {
    color: var(--bp-accent) !important;
}

/* ==========================================================================
   8. Liste des articles
   ========================================================================== */

.bpress-section-list,
.bpress-post-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.bpress-post-link {
    margin: 0;
    padding: 12px 16px;
    border-bottom: none;
    border-radius: var(--bp-radius-sm);
    transition: var(--bp-transition);
    background: var(--bp-bg);
    margin-bottom: 8px;
}

.bpress-post-link:last-child {
    margin-bottom: 0;
}

.bpress-post-link:hover {
    background: rgba(227, 108, 29, 0.08);
    padding-left: 22px;
}

.bpress-post-link a,
.bpress-post-link a:hover {
    color: var(--bp-text);
    text-decoration: none;
}

.bpress-post-link:hover a {
    color: var(--bp-primary);
}

.bpress-post-link .bpress-heading {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Icône devant les articles */
.bpress-post-link.show-icon {
    padding-left: 2.5em;
}

.bpress-post-link.show-icon:hover {
    padding-left: 3em;
}

/* ==========================================================================
   9. Single Section (Page de section)
   ========================================================================== */

.bpress-single-section {
    margin-bottom: 3em;
}

.bpress-single-section .bpress-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bp-text);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bp-primary);
}

/* ==========================================================================
   10. Article individuel
   ========================================================================== */

.bpress-content-area {
    background: var(--bp-card-bg);
    border-radius: var(--bp-radius);
    padding: 50px;
    box-shadow: var(--bp-shadow);
    margin-bottom: 30px;
}

.bpress-post-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--bp-border);
}

.bpress-post-header h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--bp-text);
    margin: 0 0 15px;
    line-height: 1.3;
}

/* Métadonnées */
.bpress-post-meta {
    font-size: 0.9rem;
    color: var(--bp-text-muted);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.bpress-post-meta span[class^="bp-"] {
    color: var(--bp-primary);
}

.bpress-post-likes span {
    color: var(--ludo-success, #17a2b8) !important;
}

.bpress-post-dislikes span {
    color: var(--ludo-error, #ef4444) !important;
}

/* Contenu de l'article */
.bpress-entry-content,
.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--bp-text);
}

.bpress-entry-content h2,
.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bp-text);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bp-primary);
}

.bpress-entry-content h3,
.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bp-text);
    margin: 30px 0 15px;
}

.bpress-entry-content p,
.entry-content p {
    margin-bottom: 20px;
}

.bpress-entry-content ul,
.bpress-entry-content ol,
.entry-content ul,
.entry-content ol {
    margin: 20px 0;
    padding-left: 25px;
}

.bpress-entry-content li,
.entry-content li {
    margin-bottom: 10px;
}

/* Liens dans le contenu */
.bpress-entry-content a,
.entry-content a {
    color: var(--bp-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--bp-transition);
}

.bpress-entry-content a:hover,
.entry-content a:hover {
    border-bottom-color: var(--bp-primary);
}

/* Copy link */
.bpress-copy-link,
.bpress-copy-link:hover,
.bpress-copy-link:focus {
    color: var(--bp-primary);
}

/* Blocs de code */
.bpress-entry-content pre,
.bpress-entry-content code,
.entry-content pre,
.entry-content code {
    background: var(--bp-bg);
    border-radius: var(--bp-radius-sm);
    font-family: 'Space Mono', 'Courier New', monospace;
}

.bpress-entry-content code,
.entry-content code {
    padding: 3px 8px;
    font-size: 0.9em;
}

.bpress-entry-content pre,
.entry-content pre {
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Blockquotes et notices */
.bpress-entry-content blockquote,
.entry-content blockquote {
    background: linear-gradient(135deg, rgba(227, 108, 29, 0.08) 0%, rgba(227, 108, 29, 0.03) 100%);
    border-left: 4px solid var(--bp-primary);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 var(--bp-radius-sm) var(--bp-radius-sm) 0;
}

/* Notices BasePress */
.bpress-notice {
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: var(--bp-radius-sm);
    border-left: 4px solid;
}

.bpress-notice.info {
    background: linear-gradient(135deg, rgba(227, 108, 29, 0.08) 0%, rgba(227, 108, 29, 0.03) 100%);
    border-left-color: var(--bp-primary);
}

.bpress-notice.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.03) 100%);
    border-left-color: var(--ludo-warning, #f59e0b);
}

.bpress-notice.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.03) 100%);
    border-left-color: var(--ludo-error, #ef4444);
}

.bpress-notice.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-left-color: var(--ludo-success, #17a2b8);
}

/* Notice restreinte */
.bpress-restricted-notice {
    border-left-color: var(--ludo-error, #ef4444);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
    border-radius: var(--bp-radius-sm);
}

/* Images */
.bpress-entry-content img,
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bp-radius-sm);
    box-shadow: var(--bp-shadow);
    margin: 20px 0;
}

/* ==========================================================================
   11. Breadcrumbs / Fil d'Ariane
   ========================================================================== */

.bpress-crumbs-wrap {
    background: var(--bp-card-bg);
    border-radius: var(--bp-radius-sm);
    padding: 15px 20px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    box-shadow: var(--bp-shadow);
}

.bpress-crumbs {
    margin: 0;
    padding: 0;
}

.bpress-crumbs li {
    display: inline-block;
}

.bpress-crumbs li a {
    color: var(--bp-text-muted);
    text-decoration: none;
    transition: var(--bp-transition);
}

.bpress-crumbs li a:hover {
    color: var(--bp-primary);
}

.bpress-breadcrumb-arrow {
    color: var(--bp-primary);
    margin: 0 10px;
}

/* ==========================================================================
   12. Sidebar
   ========================================================================== */

.bpress-sidebar {
    background: var(--bp-card-bg);
    border-radius: var(--bp-radius);
    padding: 30px;
    box-shadow: var(--bp-shadow);
}

.bpress-sidebar .widget,
.bpress-widget {
    margin-bottom: 30px;
}

.bpress-sidebar .widget:last-child,
.bpress-widget:last-child {
    margin-bottom: 0;
}

.bpress-sidebar .widget-title,
.bpress-widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bp-text);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bp-primary);
}

/* Navigation accordion */
.bpress-nav-accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bpress-nav-accordion li {
    margin-bottom: 5px;
}

.bpress-nav-accordion a {
    display: block;
    padding: 10px 15px;
    color: var(--bp-text);
    text-decoration: none;
    border-radius: var(--bp-radius-sm);
    transition: var(--bp-transition);
    font-size: 0.95rem;
}

.bpress-nav-accordion a:hover,
.bpress-nav-accordion a.active,
.bpress-nav-accordion .current > a {
    background: rgba(227, 108, 29, 0.08);
    color: var(--bp-primary);
}

.bpress-nav-accordion .current > a {
    font-weight: 600;
}

/* Sous-menus */
.bpress-nav-accordion ul {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
}

/* ==========================================================================
   13. Table des matières
   ========================================================================== */

.bpress-toc,
.bpress-toc-widget {
    background: var(--bp-bg);
    border-radius: var(--bp-radius);
    padding: 25px;
    margin-bottom: 30px;
}

.bpress-toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bp-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bpress-toc-title:before {
    content: "";
    display: block;
    width: 4px;
    height: 20px;
    background: var(--bp-primary);
    border-radius: 2px;
}

.bpress-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bpress-toc li {
    margin-bottom: 8px;
}

.bpress-toc a {
    color: var(--bp-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--bp-transition);
}

.bpress-toc a:hover {
    color: var(--bp-primary);
}

.bpress-toc ul ul {
    margin-left: 15px;
    margin-top: 8px;
}

/* ==========================================================================
   14. Votes / Feedback
   ========================================================================== */

.bpress-votes {
    margin-top: 40px;
    padding: 30px;
    background: var(--bp-bg);
    border-radius: var(--bp-radius);
    text-align: center;
}

.bpress-votes p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bp-text);
    margin-bottom: 20px;
}

.bpress-votes-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.bpress-vote-btn,
.bpress-votes a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    padding: 12px 25px;
    border: 2px solid var(--bp-border);
    border-radius: 50px;
    background: var(--bp-card-bg);
    color: var(--bp-text);
    font-weight: 500;
    cursor: pointer;
    transition: var(--bp-transition);
    text-decoration: none;
}

.bpress-vote-btn:hover,
.bpress-votes a:hover {
    border-color: var(--bp-primary);
    color: var(--bp-primary);
    text-decoration: none;
}

.bpress-votes .bpress-like:hover {
    background: var(--ludo-success, #17a2b8);
    border-color: var(--ludo-success, #17a2b8);
    color: white;
}

.bpress-votes .bpress-dislike:hover {
    background: var(--ludo-error, #ef4444);
    border-color: var(--ludo-error, #ef4444);
    color: white;
}

/* ==========================================================================
   15. Pagination
   ========================================================================== */

.bpress-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.bpress-pagination a,
.bpress-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--bp-radius-sm);
    font-weight: 500;
    transition: var(--bp-transition);
    text-decoration: none;
}

.bpress-pagination a {
    background: var(--bp-card-bg);
    color: var(--bp-text);
    border: 1px solid var(--bp-border);
}

.bpress-pagination a:hover {
    background: var(--bp-primary);
    color: white;
    border-color: var(--bp-primary);
}

.bpress-pagination span.current {
    background: var(--bp-primary);
    color: white;
}

/* ==========================================================================
   16. Articles précédent/suivant
   ========================================================================== */

.bpress-adjacent-articles {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--bp-border);
}

.bpress-prev-article,
.bpress-next-article {
    flex: 1;
    max-width: 45%;
}

.bpress-adjacent-articles a {
    display: block;
    padding: 20px;
    background: var(--bp-bg);
    border-radius: var(--bp-radius-sm);
    color: var(--bp-text);
    text-decoration: none;
    transition: var(--bp-transition);
}

.bpress-adjacent-articles a:hover {
    background: rgba(227, 108, 29, 0.08);
    color: var(--bp-primary);
}

.bpress-adjacent-articles .bpress-adj-label {
    display: block;
    font-size: 0.85rem;
    color: var(--bp-text-muted);
    margin-bottom: 5px;
}

.bpress-adjacent-articles .bpress-adj-title {
    font-weight: 600;
}

/* ==========================================================================
   17. Page de recherche
   ========================================================================== */

.bpress-search-page .bpress-post-link {
    background: var(--bp-card-bg);
    padding: 25px;
    margin-bottom: 15px;
    border-radius: var(--bp-radius);
    box-shadow: var(--bp-shadow);
}

.bpress-search-page .bpress-post-link:hover {
    box-shadow: var(--bp-shadow-hover);
}

.bpress-search-page .bpress-post-link.search .bpress-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.bpress-search-page .bpress-search-excerpt {
    color: var(--bp-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Highlight dans les résultats */
.bpress-search-page .bpress-highlight,
.bpress-highlight {
    background-color: rgba(227, 108, 29, 0.2);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   18. Login restreint
   ========================================================================== */

.bpress-login {
    max-width: 400px;
    padding: 40px;
    margin: 50px auto;
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    box-shadow: var(--bp-shadow);
}

.bpress-login label {
    display: block;
    font-weight: 500;
    color: var(--bp-text);
    margin-bottom: 8px;
}

.bpress-login input[type="text"],
.bpress-login input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: var(--bp-bg);
    border: 2px solid var(--bp-border);
    border-radius: var(--bp-radius-sm);
    font-size: 1rem;
    transition: var(--bp-transition);
    margin-bottom: 15px;
}

.bpress-login input[type="text"]:focus,
.bpress-login input[type="password"]:focus {
    border-color: var(--bp-primary);
    outline: none;
}

#bpress-restricted-login-submit[type="submit"] {
    width: 100%;
    padding: 14px 25px;
    background: var(--bp-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--bp-transition);
}

#bpress-restricted-login-submit[type="submit"]:hover {
    background: var(--bp-primary-light);
    transform: translateY(-2px);
}

/* ==========================================================================
   19. Boutons génériques
   ========================================================================== */

.bpress-button,
.bpress-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--bp-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--bp-transition);
}

.bpress-button:hover,
.bpress-btn:hover {
    background: var(--bp-primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(227, 108, 29, 0.3);
}

.bpress-button.secondary,
.bpress-btn.secondary {
    background: transparent;
    color: var(--bp-text);
    border: 2px solid var(--bp-border);
}

.bpress-button.secondary:hover,
.bpress-btn.secondary:hover {
    border-color: var(--bp-primary);
    color: var(--bp-primary);
    background: transparent;
    box-shadow: none;
}

/* ==========================================================================
   20. Grille de layout
   ========================================================================== */

.bpress-grid {
    display: grid;
    gap: 30px;
}

.bpress-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bpress-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bpress-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   21. Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .bpress-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .bpress-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bpress-wrap {
        padding: 20px 15px;
    }

    .bpress-page-header {
        padding: 50px 20px 40px;
    }

    .bpress-content-area {
        padding: 30px 20px;
    }

    .bpress-grid-2,
    .bpress-grid-3,
    .bpress-grid-4 {
        grid-template-columns: 1fr;
    }

    .bpress-section,
    .bpress-section-boxed {
        margin-bottom: 15px;
    }

    .bpress-adjacent-articles {
        flex-direction: column;
    }

    .bpress-prev-article,
    .bpress-next-article {
        max-width: 100%;
    }

    .bpress-votes-buttons {
        flex-direction: column;
    }

    .bpress-vote-btn,
    .bpress-votes a {
        width: 100%;
    }

    .bpress-post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .bpress-search {
        height: 50px;
    }

    input[type="text"].bpress-search-field {
        padding: 15px 50px 15px 20px;
    }
}

/* ==========================================================================
   22. Animations
   ========================================================================== */

/* Animation d'apparition pour les sections */
.bpress-section,
.bpress-section-boxed,
.bpress-kb,
.bpress-product {
    animation: bpFadeInUp 0.5s ease forwards;
}

@keyframes bpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation */
.bpress-grid > *:nth-child(1) { animation-delay: 0.1s; }
.bpress-grid > *:nth-child(2) { animation-delay: 0.15s; }
.bpress-grid > *:nth-child(3) { animation-delay: 0.2s; }
.bpress-grid > *:nth-child(4) { animation-delay: 0.25s; }
.bpress-grid > *:nth-child(5) { animation-delay: 0.3s; }
.bpress-grid > *:nth-child(6) { animation-delay: 0.35s; }

/* Focus amélioré pour accessibilité */
.bpress-search-field:focus,
.bpress-vote-btn:focus,
.bpress-pagination a:focus,
.bpress-button:focus {
    outline: 3px solid rgba(227, 108, 29, 0.3);
    outline-offset: 2px;
}

/* ==========================================================================
   23. Mode impression
   ========================================================================== */

@media print {
    .bpress-sidebar,
    .bpress-searchbar-wrap,
    .bpress-votes,
    .bpress-pagination,
    .bpress-crumbs-wrap,
    .bpress-adjacent-articles {
        display: none;
    }

    .bpress-content-area {
        box-shadow: none;
        padding: 0;
    }

    .bpress-entry-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
