/* WebLib Page Styles - Modern Design with High Specificity */

/* Hero Section - Modern design */
body #weblib-page .weblib-hero { 
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important; 
    color: #fff !important; 
    padding: 64px 24px 48px !important; 
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(30,64,175,0.15) !important;
}
body #weblib-page .weblib-hero h1 { 
    font-size: 2.5rem !important; 
    font-weight: 800 !important; 
    margin-bottom: 8px !important;
    letter-spacing: -0.02em !important;
}
body #weblib-page .weblib-hero p { 
    opacity: .95 !important; 
    font-size: 1.1rem !important; 
}

/* Filters Bar - Enhanced style */
body #weblib-page .weblib-filters { 
    background: #f8fafc !important; 
    border-bottom: 1px solid #e2e8f0 !important; 
    padding: 20px 24px !important; 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 12px !important; 
    align-items: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}
body #weblib-page .weblib-filters select, 
body #weblib-page .weblib-filters input[type=text] { 
    padding: 8px 12px !important; 
    border: 1px solid #cbd5e1 !important; 
    border-radius: 10px !important; 
    font-size: .9rem !important; 
    background: #fff !important;
    transition: border-color .2s !important;
}
body #weblib-page .weblib-filters select:focus, 
body #weblib-page .weblib-filters input[type=text]:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
}
body #weblib-page .weblib-filters input[type=text] { flex: 1; min-width: 180px; }
body #weblib-page .weblib-filters .filter-btn { 
    padding: 8px 16px !important; 
    background: #1e40af !important; 
    color: #fff !important; 
    border: none !important; 
    border-radius: 10px !important; 
    cursor: pointer !important; 
    font-size: .9rem !important;
    transition: all .2s ease !important;
}
body #weblib-page .weblib-filters .filter-btn:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(30,64,175,0.25) !important;
}

/* Type Pills - Improved hover effects */
body #weblib-page .weblib-type-pills { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 10px !important; 
    padding: 14px 24px !important; 
    background: #fff !important; 
    border-bottom: 1px solid #e2e8f0 !important; 
}
body #weblib-page .weblib-type-pills a { 
    padding: 6px 14px !important; 
    border-radius: 20px !important; 
    font-size: .9rem !important; 
    font-weight: 600 !important; 
    text-decoration: none !important; 
    background: #f1f5f9 !important; 
    color: #475569 !important; 
    transition: all .2s ease !important;
}
body #weblib-page .weblib-type-pills a:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(30,64,175,0.2) !important;
}
body #weblib-page .weblib-type-pills a.active, 
body #weblib-page .weblib-type-pills a:hover { 
    background: #1e40af !important; 
    color: #fff !important; 
}

/* Grid Wrapper - More spacious */
body #weblib-page .weblib-grid-wrap { 
    padding: 32px 24px !important; 
    max-width: 1280px !important; 
    margin: 0 auto !important; 
}
body #weblib-page .weblib-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 24px !important; 
}
@media (max-width: 768px) { 
    body #weblib-page .weblib-grid { grid-template-columns: repeat(2, 1fr) !important; } 
}
@media (max-width: 640px) { 
    body #weblib-page .weblib-grid { grid-template-columns: 1fr !important; }
    body #weblib-page .weblib-hero h1 { font-size: 1.75rem !important; }
    body #weblib-page .weblib-grid-wrap { padding: 20px !important; }
}

/* Cards - Modern design with enhanced shadows */
body #weblib-page .weblib-card { 
    background: #fff !important; 
    border-radius: 16px !important; 
    box-shadow: 0 4px 16px rgba(0,0,0,.08) !important; 
    overflow: hidden !important; 
    display: flex !important; 
    flex-direction: column !important; 
    transition: transform .2s ease, box-shadow .2s ease !important; 
}
body #weblib-page .weblib-card:hover { 
    transform: translateY(-4px) !important; 
    box-shadow: 0 8px 32px rgba(0,0,0,.15) !important; 
}
body #weblib-page .weblib-card-thumb { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    background: #e2e8f0; 
}
body #weblib-page .weblib-card-thumb-placeholder { 
    width: 100%; 
    height: 180px; 
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #3b82f6; 
    font-size: 2.5rem; 
}
body #weblib-page .weblib-card-body { 
    padding: 16px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}
body #weblib-page .weblib-card-title { 
    font-size: 1.05rem; 
    font-weight: 700; 
    color: #1e293b; 
    margin-bottom: 6px; 
    line-height: 1.45; 
}
body #weblib-page .weblib-card-desc { 
    font-size: .875rem; 
    color: #64748b; 
    flex: 1; 
    margin-bottom: 12px; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    line-height: 1.65;
}
body #weblib-page .weblib-card-meta { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-bottom: 12px; 
}
body #weblib-page .badge-type { 
    font-size: .75rem; 
    font-weight: 600; 
    padding: 4px 12px; 
    border-radius: 12px; 
}
body #weblib-page .badge-cours { background: #dbeafe; color: #1d4ed8; }
body #weblib-page .badge-quiz { background: #ede9fe; color: #7c3aed; }
body #weblib-page .badge-devoir { background: #fed7aa; color: #c2410c; }
body #weblib-page .badge-animation { background: #dcfce7; color: #15803d; }
body #weblib-page .badge-outil { background: #cffafe; color: #0e7490; }
body #weblib-page .badge-autre { background: #f1f5f9; color: #475569; }
body #weblib-page .weblib-vues { 
    font-size: .8rem; 
    color: #94a3b8; 
    margin-left: auto; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}
body #weblib-page .weblib-card-footer { padding: 0 16px 16px; }
body #weblib-page .btn-access { 
    display: block; 
    width: 100%; 
    padding: 10px; 
    background: #1e40af; 
    color: #fff; 
    border-radius: 8px; 
    text-align: center; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: .9rem; 
    transition: background .15s; 
}
body #weblib-page .btn-access:hover { background: #1d4ed8; }
body #weblib-page .btn-login { background: #f59e0b; }
body #weblib-page .btn-login:hover { background: #d97706; }
body #weblib-page .weblib-empty { 
    text-align: center; 
    padding: 80px 24px; 
    color: #94a3b8; 
}
body #weblib-page .weblib-empty i { 
    font-size: 3rem; 
    margin-bottom: 12px; 
    display: block; 
}

/* Pagination spacing */
body #weblib-page .weblib-grid-wrap > div:last-child { margin-top: 40px; }
